/* The Inn at Rancho Santana — landing page
   Brand web palette + type (Rancho Santana Brand Experience Guide) */
:root {
  --warm-white: #FFFDF0;
  --terracotta: #CB6644;
  --slate: #2F323D;
  --sand: #BAA27C;
  --ink: #2F323D;
  --ink-soft: #5b5e66;
  --line: rgba(47, 50, 61, .14);
  --on-dark: #FFFDF0;
  --on-dark-soft: rgba(255, 253, 240, .68);
  --line-dark: rgba(255, 253, 240, .16);

  --serif: 'ivy-mode', 'Playfair Display', Georgia, serif;
  --sans: 'Lexend', system-ui, sans-serif;

  --gutter: clamp(20px, 5vw, 72px);
  --max: 1280px;
  --nav-h: 68px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--nav-h); }
body {
  margin: 0;
  background: var(--warm-white);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(15px, 1.05vw + 10px, 18px);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--slate); color: var(--warm-white); padding: 8px 14px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 3px; }

.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { max-width: calc(860px + var(--gutter) * 2); }

.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 3.4vw, 50px);
  line-height: 1.1;
  letter-spacing: -.005em;
  margin: 0 0 clamp(28px, 4vw, 56px);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .7em;
  border: 1px solid currentColor; background: transparent;
  padding: .9em 1.6em; border-radius: 0;
  font-family: var(--sans); font-weight: 600; font-size: 13px;
  letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn--accent { background: var(--terracotta); border-color: var(--terracotta); color: var(--warm-white); }
.btn--accent:hover { background: #b75738; border-color: #b75738; }
.btn--light { color: var(--warm-white); background: rgba(47, 50, 61, .25); backdrop-filter: blur(6px); }
.btn--light:hover { background: var(--warm-white); color: var(--slate); }
.btn--ghost { color: var(--on-dark); border-color: var(--line-dark); }
.btn--ghost:hover { border-color: var(--on-dark); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 32px;
  padding: 0 var(--gutter);
  color: var(--warm-white);
  transition: background .4s var(--ease), color .4s var(--ease), box-shadow .4s var(--ease);
}
.nav.is-solid { background: rgba(255, 253, 240, .94); color: var(--ink); box-shadow: 0 1px 0 var(--line); backdrop-filter: blur(10px); }
.nav__brand {
  font-weight: 600; font-size: 13px; letter-spacing: .28em; text-transform: uppercase;
  text-decoration: none; margin-right: auto;
}
.nav__links { display: flex; gap: 28px; }
.nav__links a, .nav__phone { font-size: 13px; letter-spacing: .08em; text-decoration: none; opacity: .85; transition: opacity .2s; }
.nav__links a:hover, .nav__phone:hover { opacity: 1; }
.nav__phone { font-weight: 600; opacity: 1; white-space: nowrap; }
.nav__phone-label { font-weight: 400; opacity: .7; margin-right: .3em; }

/* ---------- Scroll-scrubbed drone sequences ---------- */
.scrub { position: relative; height: 380vh; background: var(--slate); }
.scrub--close { height: 320vh; }
.scrub__stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.scrub__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scrub__shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(20, 22, 28, .38) 0%, rgba(20, 22, 28, 0) 34%, rgba(20, 22, 28, 0) 75%, rgba(20, 22, 28, .25) 100%);
}
.scrub__shade--close { background: linear-gradient(to bottom, rgba(20, 22, 28, .30) 0%, rgba(20, 22, 28, 0) 45%); }
.scrub__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255, 253, 240, .12); transition: opacity .6s; }
.scrub__progress i { display: block; height: 100%; width: 0; background: var(--sand); transition: width .3s linear; }
.scrub__progress.is-done { opacity: 0; }

.hero__title {
  position: absolute; left: 0; right: 0; top: 17vh; top: 17svh;
  text-align: center; color: var(--warm-white); padding: 0 var(--gutter);
  text-shadow: 0 2px 30px rgba(20, 22, 28, .25);
  will-change: transform, opacity;
}
.hero__title h1 {
  margin: 0; font-family: var(--serif); font-weight: 400;
  font-size: clamp(56px, 9vw, 150px); line-height: .95; letter-spacing: -.01em;
}
.hero__title h1 span {
  display: block; margin-top: .55em;
  font-family: var(--sans); font-weight: 400; font-size: clamp(12px, .35em, 22px);
  letter-spacing: .34em; text-transform: uppercase;
}
.hero__cue {
  position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%);
  color: var(--warm-white); font-size: 11px; letter-spacing: .3em; text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.hero__cue span { width: 1px; height: 46px; background: linear-gradient(var(--warm-white), transparent); animation: cue 2.4s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- Intro (slides over the hero) ---------- */
.intro {
  position: relative; z-index: 2;
  margin-top: -100vh; margin-top: -100svh;
  background: var(--warm-white);
  padding: clamp(72px, 10vw, 150px) 0 clamp(80px, 10vw, 140px);
  box-shadow: 0 -30px 60px rgba(20, 22, 28, .18);
}
.intro__lede {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(24px, 2.7vw, 40px); line-height: 1.32;
  max-width: 26em; margin: 0 auto clamp(64px, 9vw, 130px); text-align: center;
}
.intro__grid { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.intro__text h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 2.6vw, 40px); line-height: 1.15; margin: 0 0 28px; }
.intro__text p { margin: 0 0 1.2em; color: var(--ink-soft); max-width: 34em; }
.intro__photos { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.intro__photos .ph { width: 100%; height: 100%; object-fit: cover; background: #e9e4d4; }
.ph--a { grid-column: 1 / -1; aspect-ratio: 3 / 2; }
.ph--b, .ph--c { aspect-ratio: 4 / 5; }
.ph--b { object-position: 50% 60%; }

/* ---------- 360 walkthrough ---------- */
.pano { padding: clamp(40px, 6vw, 80px) 0 clamp(80px, 10vw, 140px); }
.pano__frame {
  position: relative; margin: 0 var(--gutter); max-width: var(--max);
  aspect-ratio: 16 / 9; background: var(--slate); overflow: hidden;
}
@media (min-width: 1424px) { .pano__frame { margin: 0 auto; } }
.pano__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.82); transition: transform 1.2s var(--ease); }
.pano__frame:hover .pano__poster { transform: scale(1.02); }
.pano__start { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.pano__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Rooms ---------- */
.rooms { background: var(--slate); color: var(--on-dark); padding: clamp(80px, 10vw, 140px) 0; }
.tabs {
  display: flex; gap: clamp(18px, 3vw, 44px);
  border-bottom: 1px solid var(--line-dark);
  margin-bottom: clamp(32px, 4vw, 56px);
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; background: none; border: 0; padding: 0 0 18px; position: relative;
  font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--on-dark-soft);
  transition: color .3s;
}
.tab::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--terracotta); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease); }
.tab:hover { color: var(--on-dark); }
.tab[aria-selected="true"] { color: var(--on-dark); }
.tab[aria-selected="true"]::after { transform: scaleX(1); }

.room { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.room[hidden] { display: none; }
.room.is-entering { animation: roomIn .6s var(--ease) both; }
@keyframes roomIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.gallery__main { position: relative; aspect-ratio: 3 / 2; background: #393c48; overflow: hidden; }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; background: rgba(47, 50, 61, .45); color: var(--warm-white); font-size: 20px; backdrop-filter: blur(4px); }
.gallery__nav--prev { left: 12px; } .gallery__nav--next { right: 12px; }
.gallery__thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; }
.gallery__thumbs button { flex: none; width: 92px; aspect-ratio: 3 / 2; padding: 0; border: 0; opacity: .5; transition: opacity .25s; background: #393c48; }
.gallery__thumbs button[aria-current="true"], .gallery__thumbs button:hover { opacity: 1; }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.gallery__empty {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 6px;
  color: var(--on-dark-soft); font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  background:
    radial-gradient(120% 90% at 30% 20%, rgba(186, 162, 124, .16), transparent 60%),
    repeating-linear-gradient(135deg, rgba(255,253,240,.03) 0 1px, transparent 1px 14px);
}
.gallery__empty strong { font-family: var(--serif); font-weight: 400; font-size: 22px; letter-spacing: 0; text-transform: none; color: var(--on-dark); }

.room__info h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3vw, 46px); line-height: 1.05; margin: 0 0 18px; }
.room__desc { color: var(--on-dark-soft); margin: 0 0 26px; }
.room__features { list-style: none; margin: 0 0 30px; padding: 0; border-top: 1px solid var(--line-dark); }
.room__features li { padding: 11px 0; border-bottom: 1px solid var(--line-dark); font-size: .92em; }
.room__plans { display: grid; gap: 14px; grid-template-columns: repeat(var(--n, 1), 1fr); margin-bottom: 28px; }
.plan { margin: 0; }
.plan button { display: block; width: 100%; padding: 0; border: 0; background: none; }
.plan img, .tour__plans img {
  width: 100%; height: auto;
  opacity: .88;
  transition: opacity .3s;
}
.plan button:hover img { opacity: 1; }
.plan figcaption { margin-top: 6px; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--on-dark-soft); }
.room__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.room__actions .btn svg { width: 16px; height: 16px; }

/* ---------- Inclusions ---------- */
.includes { padding: clamp(80px, 10vw, 140px) 0 clamp(60px, 8vw, 110px); }
.includes__list { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: clamp(40px, 6vw, 96px); }
.includes__list li {
  break-inside: avoid; padding: 18px 0 18px 28px; border-top: 1px solid var(--line); position: relative;
}
.includes__list li::before { content: ''; position: absolute; left: 0; top: 30px; width: 12px; height: 1px; background: var(--terracotta); }
.includes__note { margin: 32px 0 0; font-size: .85em; color: var(--ink-soft); font-style: italic; }

/* ---------- FAQ ---------- */
.faq { padding: clamp(40px, 6vw, 80px) 0 clamp(90px, 11vw, 160px); }
.faq__list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 24px 48px 24px 0; position: relative;
  font-family: var(--serif); font-size: clamp(19px, 1.6vw, 24px); line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after { content: ''; position: absolute; right: 6px; top: 50%; width: 16px; height: 1px; background: var(--ink); transition: transform .35s var(--ease); }
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq details p { margin: 0 0 28px; color: var(--ink-soft); max-width: 46em; animation: roomIn .45s var(--ease) both; }

/* ---------- Closing + contact ---------- */
.contact { color: var(--warm-white); text-align: center; }
.contact--over { position: absolute; left: 0; right: 0; top: 18vh; top: 18svh; padding: 0 var(--gutter); opacity: 0; text-shadow: 0 2px 24px rgba(20, 22, 28, .3); will-change: opacity, transform; }
.contact__name { font-family: var(--serif); font-size: clamp(34px, 5vw, 76px); line-height: 1.02; margin: 0 0 28px; }
.contact__label { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; margin: 0 0 6px; opacity: .8; }
.contact__phone { font-size: clamp(20px, 2vw, 28px); font-weight: 400; letter-spacing: .06em; text-decoration: none; border-bottom: 1px solid rgba(255, 253, 240, .45); padding-bottom: 2px; }
.contact__phone:hover { border-color: var(--warm-white); }
.contact--plain { background: var(--slate); padding: clamp(90px, 12vw, 160px) var(--gutter); }

.foot { background: var(--slate); color: var(--on-dark-soft); text-align: center; font-size: 12px; padding: 28px var(--gutter) 34px; border-top: 1px solid var(--line-dark); }
.foot p { margin: 4px 0; }

/* ---------- 3D tour viewer ---------- */
.tour { position: fixed; inset: 0; z-index: 80; display: flex; background: #1d1f26; color: var(--on-dark); animation: fadeIn .35s var(--ease) both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.tour__viewer { flex: 1; position: relative; min-width: 0; }
.tour__viewer iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tour__side { width: 360px; flex: none; overflow-y: auto; padding: 28px 28px 36px; background: var(--slate); border-left: 1px solid var(--line-dark); }
.tour__close { display: block; margin-left: auto; background: none; border: 1px solid var(--line-dark); padding: 8px 14px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.tour__close span { font-size: 16px; margin-left: 4px; }
.tour__close:hover { border-color: var(--on-dark); }
.tour__eyebrow { margin: 28px 0 6px; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--sand); }
.tour__side h3 { font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.05; margin: 0 0 6px; }
.tour__shown { margin: 0 0 24px; font-size: 12px; color: var(--on-dark-soft); letter-spacing: .08em; }
.tour__plans { display: grid; gap: 18px; margin-bottom: 24px; }
.tour__plans figure { margin: 0; }
.tour__plans figcaption { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--on-dark-soft); margin-top: 6px; }
.tour__features { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line-dark); font-size: 14px; }
.tour__features li { padding: 9px 0; border-bottom: 1px solid var(--line-dark); }
.tour__toggle { display: none; }

/* Floor plan lightbox */
.plan-box { position: fixed; inset: 0; z-index: 90; background: rgba(29, 31, 38, .96); display: grid; place-items: center; padding: 60px 24px 24px; animation: fadeIn .3s both; }
.plan-box img { max-height: 100%; max-width: min(1400px, 100%); width: auto; background: #fff; padding: 2vw; }
.plan-box button { position: absolute; top: 16px; right: 16px; background: none; border: 1px solid var(--line-dark); color: var(--on-dark); padding: 8px 14px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .intro__grid, .room { grid-template-columns: 1fr; }
  .intro__photos { order: -1; }
}
@media (max-width: 720px) {
  :root { --nav-h: 58px; }
  .nav { gap: 16px; }
  .nav__links { display: none; }
  .nav__phone-label { display: none; }
  .scrub { height: 320vh; }
  .scrub--close { height: 280vh; }
  .hero__title { top: 15svh; }
  .includes__list { columns: 1; }
  .gallery__thumbs button { width: 72px; }
  .room__plans { grid-template-columns: 1fr; }

  .tour { flex-direction: column; }
  .tour__side {
    position: absolute; left: 0; right: 0; bottom: 0; width: auto; max-height: 72svh;
    border-left: 0; border-top: 1px solid var(--line-dark); padding: 14px 20px 24px;
    transform: translateY(calc(100% - 64px)); transition: transform .45s var(--ease);
  }
  .tour.is-sheet-open .tour__side { transform: none; }
  .tour__toggle {
    display: block; position: absolute; top: 14px; left: 20px; background: none; border: 0; padding: 8px 0;
    font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--sand);
  }
  .tour__eyebrow { margin-top: 18px; }
  .tour__viewer { height: calc(100svh - 64px); flex: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__cue span { animation: none; }
  .room.is-entering, .faq details p { animation: none; }
}
