/* ==========================================================================
   Ridge House Palm Springs
   Palette and type carried over from the original Squarespace build:
   accent gold hsl(46.8 100% 50%), dark accent #383838, light accent #f5f5f3,
   Kepler Std (Adobe Typekit) replaced by Source Serif 4, self-hosted.
   ========================================================================== */

@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-latin-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-latin-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --ink: #383838;
  --ink-soft: #5c5c5a;
  --gold: #ffc700;
  --gold-deep: #c99a00;
  --bone: #f5f5f3;
  --white: #fff;
  --rule: #e2e2dd;

  --measure: 46rem;
  --page: 76rem;
  --gutter: clamp(1.25rem, 5vw, 3.5rem);

  --serif: "Source Serif 4", "Kepler Std", Georgia, "Times New Roman", serif;

  --tracking-wide: 0.18em;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 0.35vw + 1rem, 1.1875rem);
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { color: var(--gold-deep); }

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 4.4vw, 3.9rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.6rem); }
h3 { font-size: clamp(1.25rem, 1.6vw, 1.6rem); }

p { margin: 0 0 1.25em; }
p:last-child { margin-bottom: 0; }

/* --- Skip link ------------------------------------------------------------ */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  z-index: 200;
}
.skip:focus { left: 0; color: var(--white); }

:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 3px;
}

/* --- Layout helpers ------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow { max-width: calc(var(--measure) + 2 * var(--gutter)); }

.section { padding-block: clamp(3.5rem, 8vw, 7rem); }
.section--bone { background: var(--bone); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }

.center { text-align: center; }

.eyebrow {
  font-size: 0.8125rem;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 1.25rem;
}

.lead { font-size: clamp(1.125rem, 0.5vw + 1rem, 1.375rem); line-height: 1.65; }

/* --- Buttons -------------------------------------------------------------- */

.btn {
  display: inline-block;
  font-family: var(--serif);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  text-decoration: none;
  padding: 1.05em 2.4em;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}
.btn--light {
  background: transparent;
  border-color: var(--white);
  color: var(--white);
}
.btn--light:hover { background: var(--white); border-color: var(--white); color: var(--ink); }
.btn[disabled] { opacity: 0.5; cursor: progress; }

.textlink {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 0.2em;
}
.textlink:hover { border-color: var(--ink); }

/* --- Header --------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--rule);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 5.25rem;
}

.wordmark {
  text-decoration: none;
  line-height: 1.05;
  display: block;
}
.wordmark__name {
  display: block;
  font-size: clamp(1.05rem, 1.4vw, 1.35rem);
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.wordmark__place {
  display: block;
  font-size: 0.6875rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 0.35em;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle svg { display: block; }

.nav { display: flex; align-items: center; gap: clamp(1.25rem, 2.4vw, 2.25rem); }

.nav a {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  text-decoration: none;
  padding-block: 0.35rem;
  border-bottom: 1px solid transparent;
}
.nav a:hover { border-color: var(--gold); color: var(--ink); }
.nav a[aria-current="page"] { border-color: var(--ink); }

.nav__ig { display: inline-flex; align-items: center; border: 0 !important; }
.nav__ig svg { width: 1.125rem; height: 1.125rem; }

@media (max-width: 800px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    inset: 100% 0 auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--rule);
    padding: 0.5rem var(--gutter) 1.5rem;
    display: none;
  }
  .nav[data-open="true"] { display: flex; }
  .nav a { width: 100%; padding-block: 0.9rem; border-bottom: 1px solid var(--rule); }
  .nav a:last-child { border-bottom: 0; }
}

/* --- Hero ----------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: min(80vh, 46rem);
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
.hero--short { min-height: min(52vh, 30rem); }

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(20, 18, 15, 0.42), rgba(20, 18, 15, 0.28) 45%, rgba(20, 18, 15, 0.55));
}

.hero__body {
  color: var(--white);
  padding: clamp(4rem, 10vw, 7rem) var(--gutter);
  max-width: 52rem;
}
.hero__body h1 { color: var(--white); text-shadow: 0 1px 24px rgba(0, 0, 0, 0.35); }
.hero__body .btn { margin-top: 1.75rem; }

/* --- Intro ---------------------------------------------------------------- */

.intro { text-align: center; }
.intro p { margin-inline: auto; max-width: var(--measure); }

.rule {
  width: 3.5rem;
  height: 1px;
  background: var(--gold);
  border: 0;
  margin: 0 auto 2.25rem;
}

/* --- Feature pair (Rooms / Lifestyle) ------------------------------------- */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
}

.feature { display: flex; flex-direction: column; }
.feature img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.feature__body { padding-top: 1.5rem; }
.feature h3 { margin-bottom: 0.5rem; }
.feature p { margin-bottom: 1.25rem; }

/* --- Banner CTA ----------------------------------------------------------- */

.banner {
  position: relative;
  display: grid;
  place-items: center;
  text-align: center;
  min-height: min(62vh, 34rem);
  overflow: hidden;
  isolation: isolate;
}
.banner__media { position: absolute; inset: 0; z-index: -2; }
.banner__media img { width: 100%; height: 100%; object-fit: cover; }
.banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(20, 18, 15, 0.42);
}
.banner__body { color: var(--white); padding: clamp(3rem, 8vw, 5rem) var(--gutter); }
.banner__body h2 { color: var(--white); }

/* --- Gallery -------------------------------------------------------------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(22rem, 100%), 1fr));
  gap: clamp(0.5rem, 1.2vw, 1rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.gallery button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--bone);
  cursor: zoom-in;
  overflow: hidden;
}
.gallery img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 0.6s var(--ease), opacity 0.3s var(--ease);
}
.gallery button:hover img { transform: scale(1.035); opacity: 0.94; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  place-items: center;
  background: rgba(14, 13, 11, 0.94);
  padding: clamp(1rem, 4vw, 3rem);
}
.lightbox[open] { display: grid; }
.lightbox::backdrop { background: rgba(14, 13, 11, 0.94); }
.lightbox img {
  max-width: 100%;
  max-height: 84vh;
  margin-inline: auto;
  object-fit: contain;
}
.lightbox__caption {
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  margin-top: 1rem;
}
.lightbox__btn {
  position: absolute;
  background: none;
  border: 0;
  color: var(--white);
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1;
  padding: 0.75rem 1rem;
  cursor: pointer;
  opacity: 0.75;
}
.lightbox__btn:hover { opacity: 1; color: var(--gold); }
.lightbox__btn--close { top: 0.5rem; right: 0.75rem; font-size: 1.75rem; }
.lightbox__btn--prev { left: 0.25rem; top: 50%; transform: translateY(-50%); }
.lightbox__btn--next { right: 0.25rem; top: 50%; transform: translateY(-50%); }

/* --- Rates / info cards --------------------------------------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

.card {
  background: var(--white);
  border: 1px solid var(--rule);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}
.section--bone .card { background: var(--white); }
.card h3 { font-size: 1.1875rem; margin-bottom: 0.9rem; }
.card ul { margin: 0; padding-left: 1.1rem; }
.card li { margin-bottom: 0.5rem; }
.card li:last-child { margin-bottom: 0; }

.rate-list { list-style: none; margin: 0; padding: 0; }
.rate-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--rule);
}
.rate-list li:last-child { border-bottom: 0; }
.rate-list .rate-list__price { font-weight: 600; white-space: nowrap; }

.note {
  font-size: 0.9375rem;
  color: var(--ink-soft);
  font-style: italic;
}

/* --- Forms ---------------------------------------------------------------- */

.form { display: grid; gap: 1.35rem; }
.form__row { display: grid; gap: 1.35rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }

.field { display: grid; gap: 0.45rem; }
.field > span {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.field > span .req { color: var(--gold-deep); }
.field small { color: var(--ink-soft); font-size: 0.8125rem; letter-spacing: 0; text-transform: none; font-weight: 400; }

.field input,
.field select,
.field textarea {
  font-family: var(--serif);
  font-size: 1.0625rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 0;
  padding: 0.85rem 0.95rem;
  width: 100%;
  transition: border-color 0.2s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23383838' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 0.75rem;
  padding-right: 2.5rem;
}
.field textarea { min-height: 11rem; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--ink); outline: none; }
/* Only flag bad fields once the visitor has actually tried to submit. */
.form.is-validated .field input:invalid,
.form.is-validated .field select:invalid,
.form.is-validated .field textarea:invalid { border-color: #b3402f; }

.form__status {
  padding: 1rem 1.15rem;
  border-left: 3px solid var(--gold);
  background: var(--bone);
  font-size: 1rem;
}
.form__status[hidden] { display: none; }
.form__status--error { border-left-color: #b3402f; }

.hp { position: absolute; left: -9999px; }

/* --- Article (privacy) ---------------------------------------------------- */

.prose h2 { font-size: clamp(1.35rem, 1.8vw, 1.7rem); margin-top: 2.5rem; }
.prose h2:first-of-type { margin-top: 1.5rem; }
.prose ul { padding-left: 1.2rem; margin-bottom: 1.5rem; }
.prose li { margin-bottom: 0.4rem; }
.prose .meta { color: var(--ink-soft); font-size: 0.9375rem; letter-spacing: 0.04em; }

/* --- Footer --------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: clamp(3rem, 6vw, 4.5rem);
  text-align: center;
}
.site-footer h2 {
  font-size: clamp(1.125rem, 1.6vw, 1.5rem);
  font-weight: 600;
  margin-bottom: 1.5rem;
}
.site-footer__ig {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  text-decoration: none;
}
.site-footer__ig svg { width: 1.125rem; height: 1.125rem; }
.site-footer__meta {
  margin-top: 2rem;
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: center;
}
.site-footer__meta a { color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid var(--rule); }
.site-footer__meta a:hover { color: var(--ink); border-color: var(--gold); }

/* --- Motion preferences --------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
