/* Sunset Wellness Villa — palette shared with the guest app (cream / terracotta / near-black). */
:root {
  --bg: #f6f1ea;
  --bg-2: #efe6da;
  --ink: #2a231e;
  --muted: #7d7166;
  --line: #e2d6c6;
  --accent: #c8643b;
  --accent-2: #e47a4b;
  --night: #16120f;
  --night-ink: #f2e9df;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 5vw, 64px);
  --max: 1240px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
picture { display: contents; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.05; margin: 0; letter-spacing: -.01em; }
h2 { font-size: clamp(38px, 6vw, 76px); }
h3 { font-size: clamp(26px, 2.6vw, 34px); margin-bottom: .4em; }
em { font-style: italic; color: var(--accent); }
.eyebrow { font: 600 12px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--accent); margin: 0 0 18px; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 4px; }

/* Placeholders still to fill in (see README). Visible only on localhost / preview. */
.show-todo [data-todo] { outline: 2px dashed #e0a100; outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 28px; border-radius: 999px;
  background: var(--accent); color: #fff; text-decoration: none;
  font: 600 15px/1 var(--sans); letter-spacing: .02em;
  border: 1px solid var(--accent);
  transition: transform .3s var(--ease), background .3s, box-shadow .3s;
}
.btn:hover { transform: translateY(-2px); background: var(--accent-2); box-shadow: 0 12px 30px -12px rgba(200,100,59,.7); }
.btn-ghost { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn-ghost:hover { background: rgba(255,255,255,.18); box-shadow: none; }
.btn-sm { min-height: 40px; padding: 0 20px; font-size: 14px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 14px var(--gutter); padding-top: max(14px, env(safe-area-inset-top));
  color: #fff; transition: background .4s, color .4s, box-shadow .4s, transform .4s var(--ease);
}
.nav.solid { background: rgba(246,241,234,.88); color: var(--ink); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); box-shadow: 0 1px 0 var(--line); }
.nav.hide { transform: translateY(-100%); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 19px/1 var(--serif); letter-spacing: .01em; margin-right: auto; }
.brand svg, .foot-brand svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.brand svg circle, .foot-brand svg circle { stroke: var(--accent-2); }
.links { display: flex; gap: 28px; }
.links a { text-decoration: none; font-size: 14px; font-weight: 500; opacity: .85; position: relative; }
.links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.links a:hover::after { transform: scaleX(1); }
.guest { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 4px; text-decoration: none; font-size: 14px; font-weight: 600; opacity: .9; transition: opacity .3s; }
.guest:hover { opacity: 1; }
.guest svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.nav { gap: clamp(12px, 2.4vw, 24px); }
@media (max-width: 820px) { .links { display: none; } .brand span { font-size: 17px; } }
@media (max-width: 440px) { .brand span { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; height: 100svh; min-height: 560px; color: #fff; overflow: hidden; display: flex; align-items: flex-end; }
.hero-media { position: absolute; inset: 0; }
.hero-img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; transform: scale(1.12); animation: heroZoom 18s var(--ease) forwards; }
@keyframes heroZoom { to { transform: scale(1); } }
.hero-shade { position: absolute; inset: 0; background:
  linear-gradient(180deg, rgba(22,18,15,.45) 0%, rgba(22,18,15,0) 22%),
  linear-gradient(0deg, rgba(22,18,15,.82) 0%, rgba(22,18,15,.4) 45%, rgba(22,18,15,0) 72%); }
@media (max-width: 600px) { .hero-shade { background: linear-gradient(180deg, rgba(22,18,15,.4) 0%, rgba(22,18,15,0) 18%), linear-gradient(0deg, rgba(22,18,15,.88) 0%, rgba(22,18,15,.5) 50%, rgba(22,18,15,0) 80%); } }
.hero-content { position: relative; width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) clamp(72px, 12vh, 120px); }
.hero .eyebrow { color: #fbe0c8; text-shadow: 0 1px 12px rgba(0,0,0,.55); }
.hero-title { font-size: clamp(56px, 12.5vw, 168px); line-height: .92; font-weight: 500; letter-spacing: -.02em; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title .line > * { display: inline-block; transform: translateY(105%); animation: rise 1.2s var(--ease) forwards; animation-delay: var(--d); }
.hero-title em { color: #f3b48a; }
.hero-sub { max-width: 560px; font-size: clamp(16px, 1.6vw, 19px); color: rgba(255,255,255,.88); margin: 22px 0 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.reveal-load { opacity: 0; transform: translateY(18px); animation: fadeUp 1s var(--ease) forwards; animation-delay: var(--d); }
@keyframes rise { to { transform: translateY(0); } }
@keyframes fadeUp { to { opacity: 1; transform: none; } }
.scroll-cue { position: absolute; left: 50%; bottom: 22px; width: 24px; height: 40px; margin-left: -12px; border: 1.5px solid rgba(255,255,255,.6); border-radius: 12px; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: #fff; animation: cue 2s infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
@media (max-width: 600px) { .scroll-cue { display: none; } .hero-cta .btn { flex: 1 1 auto; } }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Intro ---------- */
section { position: relative; }
.intro, .day, .house, .gallery, .location { max-width: var(--max); margin: 0 auto; padding: clamp(80px, 13vw, 160px) var(--gutter) 0; }
.lead { font: 500 clamp(30px, 4.4vw, 58px)/1.15 var(--serif); max-width: 22ch; margin: 0; letter-spacing: -.01em; }
.facts { list-style: none; padding: 0; margin: clamp(48px, 7vw, 88px) 0 0; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); }
.facts li { padding: 26px 0 0; display: flex; flex-direction: column; gap: 6px; }
.facts strong { font: 500 clamp(42px, 5vw, 64px)/1 var(--serif); }
.facts small { font-size: .45em; margin-left: 2px; }
.facts span { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 700px) { .facts { grid-template-columns: repeat(3, 1fr); row-gap: 28px; } }

.section-head { margin-bottom: clamp(40px, 6vw, 72px); }

/* ---------- Day story ---------- */
.story { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(32px, 6vw, 96px); }
.story-stage { position: sticky; top: 12vh; height: 76vh; border-radius: 22px; overflow: hidden; background: var(--night); }
.stage-img { position: absolute; inset: 0; opacity: 0; transform: scale(1.06); transition: opacity 1.1s var(--ease), transform 2.4s var(--ease); }
.stage-img.is-active { opacity: 1; transform: scale(1); }
.stage-img img { width: 100%; height: 100%; object-fit: cover; }
.stage-time { position: absolute; left: 22px; bottom: 20px; padding: 10px 16px; border-radius: 999px; background: rgba(22,18,15,.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff; font: 500 22px/1 var(--serif); letter-spacing: .04em; }
.steps { list-style: none; margin: 0; padding: 0; }
.step { min-height: 76vh; display: flex; flex-direction: column; justify-content: center; opacity: .28; transition: opacity .6s; }
.step.is-active { opacity: 1; }
.step-time { font: 600 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin: 0 0 16px; }
.step p:last-child { color: var(--muted); max-width: 42ch; margin: 0; }
.step-img { display: none; }
@media (max-width: 899px) {
  .story { display: block; }
  .story-stage { display: none; }
  .step { min-height: 0; opacity: 1; margin-bottom: 64px; }
  .step-img { display: block; margin: 0 calc(var(--gutter) * -1) 26px; aspect-ratio: 4 / 3.4; overflow: hidden; }
  .step-img img { width: 100%; height: 100%; object-fit: cover; }
}

/* ---------- Sunset band ---------- */
.band { height: clamp(520px, 100vh, 900px); margin-top: clamp(60px, 10vw, 140px); overflow: hidden; display: flex; align-items: center; justify-content: center; color: #fff; }
.band-media { position: absolute; inset: -15% 0; will-change: transform; }
.band-media img { width: 100%; height: 100%; object-fit: cover; }
.band::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(22,18,15,.35), rgba(22,18,15,.1) 70%); }
.band-quote { position: relative; z-index: 1; margin: 0; padding: 0 var(--gutter); max-width: 980px; text-align: center; }
.band-quote p { font: 500 clamp(32px, 5.4vw, 72px)/1.1 var(--serif); margin: 0; text-shadow: 0 2px 30px rgba(0,0,0,.35); }
.band-quote em { color: #ffd2b0; }

/* ---------- House ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 36px); }
.card-img { aspect-ratio: 4 / 5; overflow: hidden; border-radius: 18px; margin-bottom: 22px; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.card:hover .card-img img { transform: scale(1.05); }
.card p { color: var(--muted); margin: 0; }
.amenities { list-style: none; padding: 0; margin: clamp(48px, 6vw, 80px) 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.amenities li { padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; background: #fffdf9; }
@media (max-width: 899px) {
  .cards { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 82%; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 8px; scrollbar-width: none; }
  .cards::-webkit-scrollbar { display: none; }
  .card { scroll-snap-align: center; }
}

/* ---------- Assistant ---------- */
.assistant { overflow-x: clip; max-width: var(--max); margin: 0 auto; padding: clamp(80px, 13vw, 160px) var(--gutter) 0; display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(40px, 7vw, 110px); align-items: center; }
.ai-text > p { color: var(--muted); max-width: 46ch; margin: 24px 0 28px; }
.ai-points { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.ai-points li { padding: 14px 0 14px 30px; border-bottom: 1px solid var(--line); color: var(--muted); position: relative; }
.ai-points li::before { content: ""; position: absolute; left: 4px; top: 23px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgba(200,100,59,.14); }
.ai-points b { color: var(--ink); font-weight: 600; }
.phone-wrap { display: flex; justify-content: center; position: relative; }
.phone-wrap::before { content: ""; position: absolute; width: 120%; aspect-ratio: 1; top: 50%; left: 50%; translate: -50% -50%; background: radial-gradient(circle, rgba(228,122,75,.28), rgba(228,122,75,0) 62%); z-index: -1; }
.phone { width: min(330px, 86vw); aspect-ratio: 9 / 17; background: #f6f1ea; border: 10px solid #16120f; border-radius: 46px; padding: 46px 16px 16px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 40px 80px -30px rgba(42,35,30,.55), 0 0 0 1px #352c25; position: relative; overflow: hidden; font-size: 13px; line-height: 1.4; }
.ph-notch { position: absolute; top: 10px; left: 50%; translate: -50% 0; width: 92px; height: 24px; border-radius: 14px; background: #16120f; }
.ph-hello { margin: 0; font: 500 22px/1.1 var(--serif); }
.ph-sauna { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-radius: 18px; background: #fffdf9; border: 1px solid var(--line); }
.ph-sauna small { display: block; color: var(--muted); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.ph-sauna b { font: 500 30px/1 var(--serif); }
.ph-dot { font-size: 12px; font-weight: 600; color: var(--accent); display: flex; align-items: center; gap: 6px; }
.ph-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.ph-chat { flex: 1; display: flex; flex-direction: column; gap: 8px; justify-content: flex-end; }
.bub { margin: 0; padding: 9px 13px; border-radius: 16px; max-width: 84%; opacity: 0; transform: translateY(10px) scale(.97); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.bub.me { align-self: flex-end; background: #2a231e; color: #fff; border-bottom-right-radius: 5px; }
.bub.bot { align-self: flex-start; background: #fffdf9; border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.bub.card { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.bub.card i { font-style: normal; background: var(--accent); color: #fff; padding: 6px 12px; border-radius: 999px; font-size: 12px; }
.bub.typing { display: flex; gap: 4px; padding: 12px 14px; }
.bub.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.bub.typing span:nth-child(2) { animation-delay: .2s; } .bub.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .25; } }
.phone-wrap.in .bub { opacity: 1; transform: none; }
.phone-wrap.in .bub:nth-child(1) { transition-delay: .5s; }
.phone-wrap.in .bub:nth-child(2) { transition-delay: 1.4s; }
.phone-wrap.in .bub:nth-child(3) { transition-delay: 2.1s; }
.phone-wrap.in .bub:nth-child(4) { transition-delay: 3.2s; }
.phone-wrap.in .bub:nth-child(5) { transition-delay: 3.9s; }
.ph-input { padding: 12px 16px; border-radius: 999px; background: #fffdf9; border: 1px solid var(--line); color: var(--muted); }
.no-js .bub { opacity: 1; transform: none; }
@media (max-width: 899px) { .assistant { grid-template-columns: none; } .phone-wrap { order: -1; } }

/* ---------- Gallery ---------- */
.filters { display: flex; gap: 8px; overflow-x: auto; margin: -24px calc(var(--gutter) * -1) 28px; padding: 0 var(--gutter); scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters button { flex: none; font: 500 14px/1 var(--sans); padding: 12px 18px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; transition: background .3s, color .3s, border-color .3s; }
.filters button[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.grid { columns: 3 300px; column-gap: 14px; }
.grid figure { margin: 0 0 14px; break-inside: avoid; border-radius: 14px; overflow: hidden; cursor: zoom-in; position: relative; animation: fadeUp .6s var(--ease) both; }
.grid figure img { width: 100%; transition: transform 1.2s var(--ease), filter .6s; }
.grid figure:hover img { transform: scale(1.04); }
.grid figure[hidden] { display: none; }
@media (max-width: 600px) { .grid { columns: 2; column-gap: 8px; } .grid figure { margin-bottom: 8px; border-radius: 10px; } }

/* ---------- Location ---------- */
.location { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.loc-text > p { color: var(--muted); max-width: 46ch; margin: 24px 0 28px; }
.distances { list-style: none; padding: 0; margin: 0 0 28px; border-top: 1px solid var(--line); }
.distances li { display: flex; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); }
.distances b { font: 500 22px/1 var(--serif); }
.link-arrow { font-weight: 600; color: var(--accent); text-decoration: none; }
.link-arrow::after { content: " →"; transition: margin .3s; }
.link-arrow:hover::after { margin-left: 6px; }
.loc-map { aspect-ratio: 1 / 1; border-radius: 22px; overflow: hidden; background: var(--bg-2); }
.loc-map { position: relative; }
.loc-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: saturate(.75) sepia(.12); }
.map-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.55) saturate(.9); }
.map-load { position: absolute; inset: 0; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 0; background: none; color: #fff; cursor: pointer; font: inherit; }
.map-load b { font: 500 30px/1 var(--serif); }
.map-load small { font-size: 13px; opacity: .75; letter-spacing: .04em; }
.map-load:hover b { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.pin { width: 46px; height: 46px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--accent); box-shadow: 0 10px 30px -8px rgba(0,0,0,.6); margin-bottom: 10px; position: relative; animation: bob 2.4s ease-in-out infinite; }
.pin::after { content: ""; position: absolute; inset: 15px; border-radius: 50%; background: #fff; }
@keyframes bob { 50% { translate: 0 -6px; } }
@media (max-width: 899px) { .location { grid-template-columns: none; } .loc-map { aspect-ratio: 4 / 3.4; } }

/* ---------- Book ---------- */
.book { margin-top: clamp(100px, 14vw, 180px); min-height: 92vh; display: flex; align-items: center; color: var(--night-ink); overflow: hidden; background: var(--night); }
.book-media { position: absolute; inset: 0; }
.book-media img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.book::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(22,18,15,.85) 0%, rgba(22,18,15,.35) 70%); }
.book-content { position: relative; z-index: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: 100px var(--gutter); }
.book-content h2 { max-width: 12ch; }
.book-content em { color: #f3b48a; }
.book .eyebrow { color: #f3c9a8; }
.book-content .call { margin: 22px 0 0; font-size: 15px; }
.book-content .call a { color: #f3b48a; font-weight: 600; text-decoration: none; }
.book-content p { max-width: 46ch; color: rgba(242,233,223,.8); margin: 24px 0 32px; }

/* ---------- Footer ---------- */
.footer { background: var(--night); color: rgba(242,233,223,.7); padding: 56px var(--gutter) calc(40px + env(safe-area-inset-bottom)); display: grid; gap: 22px; justify-items: center; text-align: center; border-top: 1px solid #2b231d; }
.foot-brand { display: flex; align-items: center; gap: 10px; color: var(--night-ink); font: 600 22px/1 var(--serif); }
.guest-link { text-decoration: none; font-size: 15px; padding: 14px 22px; border: 1px solid #352c25; border-radius: 999px; transition: border-color .3s, color .3s; }
.guest-link b { color: var(--accent-2); font-weight: 600; }
.guest-link:hover { border-color: var(--accent-2); color: var(--night-ink); }
.small { font-size: 13px; margin: 0; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(12,10,8,.96); display: flex; align-items: center; justify-content: center; animation: fadeUp .3s both; touch-action: pan-y; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 94vw; max-height: 86vh; width: auto; border-radius: 6px; user-select: none; }
.lightbox button { position: absolute; background: rgba(255,255,255,.08); color: #fff; border: 0; width: 52px; height: 52px; border-radius: 50%; font-size: 30px; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: rgba(255,255,255,.18); }
.lb-close { top: max(16px, env(safe-area-inset-top)); right: 16px; }
.lb-prev { left: 16px; } .lb-next { right: 16px; }
.lb-count { position: absolute; bottom: max(18px, env(safe-area-inset-bottom)); margin: 0; color: rgba(255,255,255,.6); font-size: 13px; letter-spacing: .1em; }
@media (max-width: 600px) { .lb-prev, .lb-next { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .hero-img { transform: none; }
}
