/* ═══════════════════════════════════════════════════════════════
   LAEM DAO — One Day at the Resort
   Design + build: Refinery.sol concept demo. No photography, all code.
   All colors flow from the Sky Engine tokens set on :root (see js/sky.js).
   ═══════════════════════════════════════════════════════════════ */

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--sky-lo); /* painted over by .backdrop; keeps overscroll sane */
  overflow-x: clip;
  transition: color .3s linear;
}

img, svg, canvas { max-width: 100%; display: block; }

[hidden] { display: none !important; }

a { color: inherit; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.container { max-width: 1180px; margin-inline: auto; padding-inline: var(--gutter); }

/* ---- Backdrop: the sky itself ---- */
.backdrop {
  position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(180deg, var(--sky-hi) 0%, var(--sky-lo) 100%);
}

/* ---- Skip link ---- */
.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 300;
  padding: 10px 18px; border-radius: 999px;
  background: var(--ink); color: var(--sky-lo);
  font-size: 14px; text-decoration: none;
  transform: translateY(-64px); opacity: 0;
  transition: transform .2s, opacity .2s;
}
.skip-link:focus-visible { transform: none; opacity: 1; }

/* ═══════════════ NAV ═══════════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; padding-inline: clamp(16px, 3vw, 36px);
  background: linear-gradient(to bottom, color-mix(in srgb, var(--sky-hi) 55%, transparent), transparent);
  pointer-events: none;
}
.nav > * { pointer-events: auto; }

.brand {
  display: flex; align-items: baseline; gap: 9px;
  text-decoration: none; color: var(--ink);
}
.brand-star { width: 16px; height: 16px; align-self: center; color: var(--accent); }
.brand-name {
  font-family: var(--font-display); font-weight: 560; font-size: 19px;
  letter-spacing: .22em; white-space: nowrap;
}
.bk-short { display: none; }
.brand-th { font-size: 12px; font-weight: 500; color: var(--ink-soft); letter-spacing: .04em; }

.nav-right { display: flex; align-items: center; gap: 12px; }

.lang-pill {
  display: flex; padding: 3px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.lp-opt {
  padding: 5px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .06em;
  color: var(--ink-soft); transition: background .25s, color .25s;
}
html[lang="en"] .lp-opt[data-lang="en"],
html[lang="th"] .lp-opt[data-lang="th"] { background: var(--ink); color: var(--sky-lo); }

/* ═══════════════ BUTTONS ═══════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 30px; border-radius: 999px;
  font-family: var(--font-body); font-size: 15px; font-weight: 600; letter-spacing: .03em;
  text-decoration: none; white-space: nowrap;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), background .3s, color .3s, border-color .3s;
  will-change: transform;
}
.btn-primary, .btn-book { background: var(--ink); color: var(--sky-lo); }
.btn-primary:hover, .btn-book:hover { transform: translateY(-2px); }
.btn-book { padding: 11px 22px; font-size: 14px; }
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1.5px solid color-mix(in srgb, var(--ink) 38%, transparent);
}
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }

/* ═══════════════ DAY DIAL ═══════════════ */
.daydial {
  position: fixed; right: 18px; top: 50%; z-index: 150;
  transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.dial-face { width: 48px; height: 48px; }
.dial-ring { fill: none; stroke: var(--line); stroke-width: 1.5; }
.dial-orb  { fill: var(--glow); stroke: color-mix(in srgb, var(--ink) 30%, transparent); stroke-width: 1; }
.dial-orb-g { transform-origin: 24px 24px; }
.dial-time {
  margin: 0; font-size: 11.5px; font-weight: 600; letter-spacing: .08em;
  color: var(--ink-soft); font-variant-numeric: tabular-nums;
}
.dial-dots { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.dial-dots a {
  display: block; width: 9px; height: 9px; border-radius: 50%;
  background: color-mix(in srgb, var(--ink) 26%, transparent);
  transition: background .3s, transform .3s;
}
.dial-dots a:hover { transform: scale(1.5); }
.dial-dots li.on a { background: var(--accent); transform: scale(1.35); }

/* ═══════════════ SHARED SCENE PIECES ═══════════════ */
.scene { position: relative; padding: clamp(96px, 14vh, 150px) 0; scroll-margin-top: 84px; }

.kicker {
  margin: 0 0 18px; font-size: 12.5px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink); opacity: .74;
}
.kicker::before { content: "✦ "; color: var(--accent); opacity: 1; }

.scene-title {
  margin: 0 0 28px;
  font-family: var(--font-display); font-weight: 460;
  font-size: clamp(34px, 5.4vw, 66px);
  line-height: 1.06; letter-spacing: -0.015em;
}
.scene-title em { font-style: italic; color: var(--accent); }
html[lang="th"] .scene-title { font-weight: 600; line-height: 1.22; letter-spacing: 0; }
html[lang="th"] .scene-title em { font-style: normal; }

/* Scroll reveals: hidden only when JS is on and motion allowed */
.js [data-reveal] { opacity: 0; transform: translateY(26px); }
.js [data-reveal].is-in { opacity: 1; transform: none; transition: opacity .8s ease, transform .8s cubic-bezier(.22,.9,.32,1); }

/* Count-up stats */
.stats { display: flex; gap: clamp(24px, 5vw, 64px); flex-wrap: wrap; margin: 34px 0 0; }
.stat dt.stat-num {
  font-family: var(--font-display); font-weight: 480;
  font-size: clamp(40px, 5vw, 60px); line-height: 1; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat dd { margin: 6px 0 0; font-size: 14px; font-weight: 500; color: var(--ink-soft); letter-spacing: .04em; }

/* ═══════════════ 05:58 HERO ═══════════════ */
.hero {
  min-height: 100svh; padding: 0;
  display: flex; align-items: flex-end;
}
.gl-wrap { position: absolute; inset: 0; overflow: hidden; }
.gl-wrap canvas { width: 100%; height: 100%; }
.gl-wrap.no-gl { background:
  radial-gradient(120% 60% at 70% 78%, color-mix(in srgb, var(--glow) 55%, transparent), transparent 60%),
  linear-gradient(180deg, var(--sky-hi) 0%, var(--sky-lo) 78%, color-mix(in srgb, var(--sky-hi) 60%, var(--sky-lo)) 100%); }
.gl-wrap.no-gl canvas { display: none; }

.hero-inner { position: relative; width: 100%; padding-bottom: clamp(56px, 10vh, 120px); }
.hero-title {
  margin: 0 0 22px;
  font-family: var(--font-display); font-weight: 440;
  font-size: clamp(46px, 8.2vw, 112px);
  line-height: 1.02; letter-spacing: -0.02em;
}
.hero-title em { font-style: italic; color: var(--accent); }
html[lang="th"] .hero-title { font-weight: 600; line-height: 1.18; letter-spacing: 0; }
html[lang="th"] .hero-title em { font-style: normal; }
.hero-sub { max-width: 560px; margin: 0 0 34px; font-size: clamp(16px, 1.6vw, 19px); font-weight: 400; color: var(--ink-soft); }

.hero-actions { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.scroll-cue {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 500; color: var(--ink-soft); text-decoration: none;
}
.scroll-cue:hover { color: var(--ink); }
.cue-arrow { display: inline-block; animation: cue-bob 2.2s ease-in-out infinite; }
@keyframes cue-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* ═══════════════ 09:00 CLIFF ═══════════════ */
.cliff-grid {
  display: grid; grid-template-columns: 1.15fr 1fr;
  gap: clamp(28px, 5vw, 72px); align-items: center;
}
.cliff-art { margin: 0; }
#cliff-svg .draw { stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#cliff-svg .draw.soft { stroke: var(--ink-soft); stroke-width: 1.5; }
#cliff-svg .draw.acc { stroke: var(--accent); }
.js #cliff-svg .draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
.cliff-copy p { max-width: 46ch; }

/* ═══════════════ 12:00 VILLAS ═══════════════ */
.villas { padding-bottom: clamp(96px, 14vh, 150px); }
.villas-head { margin-bottom: 34px; }
body.pin-mode .pin-wrap {
  min-height: 100vh; padding-top: 82px;
  display: flex; flex-direction: column; justify-content: center;
}
.drag-hint { margin: 0; font-size: 13px; font-weight: 500; color: var(--ink-soft); letter-spacing: .04em; }

.track-viewport { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
.track-viewport::-webkit-scrollbar { display: none; }
body.pin-mode .track-viewport { overflow: hidden; }

.villa-track {
  display: flex; gap: clamp(18px, 2.5vw, 30px);
  padding: 6px var(--gutter) 44px;
  scroll-snap-type: x mandatory;
  width: max-content;
}
body.pin-mode .villa-track { scroll-snap-type: none; will-change: transform; }

.villa-card {
  scroll-snap-align: center;
  width: min(420px, 82vw);
}
body.pin-mode .villa-card { width: clamp(460px, 42vw, 560px); }
.villa-card {
  border-radius: 22px; border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding: clamp(20px, 2.6vw, 30px);
  transition: transform .4s cubic-bezier(.22,.9,.32,1), box-shadow .4s;
}
.villa-card:hover { box-shadow: 0 24px 60px -28px color-mix(in srgb, var(--ink) 45%, transparent); }

.plan { margin: 0 0 18px; border-radius: 14px; border: 1px dashed var(--line); padding: 10px; }
.plan .p-main { stroke: var(--ink); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.plan .p-soft { stroke: var(--ink-soft); stroke-width: 1.3; fill: none; stroke-linecap: round; }
.plan .p-acc  { stroke: var(--accent); stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }

.villa-name { margin: 0 0 4px; font-family: var(--font-display); font-weight: 520; font-size: 27px; letter-spacing: -.01em; }
html[lang="th"] .villa-name { font-weight: 600; }
.villa-tag { margin: 0 0 12px; font-style: italic; color: var(--accent); font-size: 15.5px; }
html[lang="th"] .villa-tag { font-style: normal; }
.villa-spec { margin: 0 0 16px; font-size: 14px; font-weight: 500; color: var(--ink-soft); letter-spacing: .03em; }
.villa-rate { margin: 0 0 18px; font-family: var(--font-display); font-size: 30px; font-weight: 500; }
.villa-rate small { font-family: var(--font-body); font-size: 13.5px; font-weight: 500; color: var(--ink-soft); }

/* ═══════════════ 15:20 POOL ═══════════════ */
.pool { padding-inline: clamp(10px, 2vw, 28px); }
.pool-panel {
  position: relative; overflow: hidden;
  border-radius: 28px; border: 1px solid var(--line);
  min-height: min(88vh, 760px);
  display: flex; align-items: center;
}
#gl-pool { position: absolute; inset: 0; width: 100%; height: 100%; }
.pool-panel.no-gl { background:
  radial-gradient(90% 70% at 30% 40%, color-mix(in srgb, var(--sky-hi) 70%, #ffffff22), transparent 70%),
  linear-gradient(160deg, color-mix(in srgb, var(--sky-hi) 80%, var(--ink)) 0%, var(--sky-hi) 55%, color-mix(in srgb, var(--sky-lo) 70%, var(--sky-hi)) 100%); }
.pool-panel.no-gl #gl-pool { display: none; }

.pool-inner { position: relative; padding-block: clamp(48px, 8vh, 90px); }
.pool-inner .kicker, .pool-inner .scene-title, .pool-inner .pool-copy, .pool-inner .stat dt.stat-num { color: #F4FAFC; }
.pool-inner .kicker { opacity: .85; }
.pool-inner .scene-title em, .pool-inner .kicker::before { color: #FFE3B8; }
.pool-copy { max-width: 44ch; color: #DCEEF4; font-size: clamp(16px, 1.5vw, 18px); }
.pool-inner .stat dd { color: #BADAE4; }

/* ═══════════════ 18:30 DINING ═══════════════ */
.dining .container { position: relative; }
.dining-sun { position: absolute; right: var(--gutter); top: -30px; width: clamp(80px, 12vw, 150px); opacity: .95; pointer-events: none; }
.sun-disc { fill: var(--glow); }
.sun-halo { fill: none; stroke: var(--glow); stroke-width: 1.5; opacity: .5; }

.dining-note { max-width: 46ch; margin: 0 0 44px; font-size: clamp(16px, 1.5vw, 18px); color: var(--ink-soft); }

.menu { list-style: none; margin: 0; padding: 0; max-width: 720px; }
.menu-line {
  display: flex; align-items: baseline; gap: 22px;
  padding: 20px 4px; border-bottom: 1px solid var(--line);
}
.menu-line:first-child { border-top: 1px solid var(--line); }
.menu-no { font-size: 13px; font-weight: 600; color: var(--accent); letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.menu-dish { font-family: var(--font-display); font-weight: 480; font-size: clamp(19px, 2.4vw, 27px); letter-spacing: -.005em; line-height: 1.25; }
html[lang="th"] .menu-dish { font-weight: 500; }
.menu-close { margin: 26px 0 0; font-size: 14px; font-weight: 500; letter-spacing: .06em; color: var(--ink-soft); }

/* ═══════════════ NIGHT WRAP (spa + book) ═══════════════ */
.night-wrap { position: relative; }
#starfield { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.night-wrap > .scene { position: relative; }

/* ═══════════════ 21:00 SPA ═══════════════ */
.treatments {
  list-style: none; margin: 40px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.treatment {
  border-radius: 20px; border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding: 26px 24px;
}
.treatment h3 { margin: 0 0 6px; font-family: var(--font-display); font-weight: 520; font-size: 21px; line-height: 1.25; }
html[lang="th"] .treatment h3 { font-weight: 600; }
.t-spec { margin: 0 0 18px; font-size: 13.5px; font-weight: 500; color: var(--ink-soft); letter-spacing: .04em; }
.t-price { margin: 0; font-family: var(--font-display); font-size: 24px; font-weight: 500; }
.spa-note { margin: 30px 0 0; font-size: 15px; color: var(--ink-soft); max-width: 52ch; }

/* ═══════════════ 00:00 BOOKING ═══════════════ */
.book-sub { max-width: 52ch; margin: 0 0 44px; color: var(--ink-soft); }

.booking {
  position: relative;
  display: grid; grid-template-columns: minmax(300px, 420px) 1fr;
  gap: clamp(22px, 3.5vw, 44px);
  border-radius: 26px; border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  padding: clamp(20px, 3.2vw, 40px);
}

/* Calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-title { margin: 0; font-family: var(--font-display); font-weight: 520; font-size: 19px; }
.cal-nav {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); display: grid; place-items: center;
  transition: background .25s, color .25s;
}
.cal-nav:hover:not(:disabled) { background: var(--ink); color: var(--sky-lo); }
.cal-nav:disabled { opacity: .35; cursor: default; }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-dow {
  text-align: center; font-size: 11px; font-weight: 600; letter-spacing: .08em;
  color: var(--ink-soft); padding: 6px 0 8px; text-transform: uppercase;
}
.cal-day {
  position: relative; aspect-ratio: 1; min-height: 38px;
  display: grid; place-items: center; border-radius: 10px;
  font-size: 14.5px; font-weight: 500; font-variant-numeric: tabular-nums;
  transition: background .2s, color .2s;
}
.cal-day:hover:not(:disabled) { background: color-mix(in srgb, var(--ink) 12%, transparent); }
.cal-day:disabled { opacity: .32; cursor: default; }
.cal-day.in-range { background: color-mix(in srgb, var(--accent) 22%, transparent); border-radius: 0; }
.cal-day.sel { background: var(--accent); color: #FFF6EA; }
.cal-day.sel.ci { border-radius: 10px 0 0 10px; }
.cal-day.sel.co { border-radius: 0 10px 10px 0; }
.cal-day.sel.ci.co { border-radius: 10px; }
.cal-hint { margin: 14px 0 0; font-size: 13px; color: var(--ink-soft); }

/* Form */
.booking-form { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }

.field input, .field select {
  width: 100%; padding: 13px 16px;
  border-radius: 12px; border: 1.5px solid var(--line);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  font: inherit; font-size: 15.5px; color: var(--ink);
  transition: border-color .25s;
  appearance: none; -webkit-appearance: none;
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 21px) 55%, calc(100% - 16px) 55%;
  background-size: 5px 5px; background-repeat: no-repeat;
  padding-right: 42px;
}
.field input:focus-visible, .field select:focus-visible { outline: none; border-color: var(--accent); }
.field input::placeholder { color: color-mix(in srgb, var(--ink-soft) 65%, transparent); }
.field input[aria-invalid="true"] { border-color: #C34A3A; }

.field-err { margin: 0; font-size: 13.5px; font-weight: 500; color: #C34A3A; }
[data-scene="midnight"] .field-err { color: #F2A08F; }

.stepper {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1.5px solid var(--line); border-radius: 999px; padding: 4px; width: max-content;
}
.step-btn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 19px; transition: background .2s, color .2s; }
.step-btn:hover:not(:disabled) { background: var(--ink); color: var(--sky-lo); }
.step-btn:disabled { opacity: .35; cursor: default; }
.stepper output { min-width: 34px; text-align: center; font-weight: 600; font-size: 16px; }

.summary { border-top: 1px dashed var(--line); padding-top: 16px; }
.sum-line { margin: 0 0 6px; font-size: 15px; color: var(--ink-soft); }
.sum-total { font-family: var(--font-display); font-size: 26px; font-weight: 520; color: var(--ink); }
.sum-empty { font-style: italic; }
html[lang="th"] .sum-empty { font-style: normal; }

.btn-submit { margin-top: 4px; align-self: flex-start; }

/* Confirmation */
.booking-confirm { grid-column: 1 / -1; text-align: center; padding: clamp(24px, 5vw, 56px) 12px; }
.confirm-star { width: 34px; height: 34px; margin: 0 auto 18px; color: var(--glow); }
.booking-confirm h3 { margin: 0 0 14px; font-family: var(--font-display); font-weight: 480; font-size: clamp(28px, 4vw, 44px); letter-spacing: -.01em; }
html[lang="th"] .booking-confirm h3 { font-weight: 600; }
.confirm-detail { margin: 0 0 10px; font-size: 16.5px; }
.confirm-note { margin: 0 0 28px; font-size: 14px; color: var(--ink-soft); }

/* ═══════════════ FOOTER ═══════════════ */
.footer { position: relative; padding: 90px 0 130px; }
.footer::before {
  content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter);
  height: 1px; background: var(--line);
}
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: clamp(28px, 5vw, 70px); }
.f-word { margin: 0 0 18px; font-family: var(--font-display); font-weight: 560; font-size: 22px; letter-spacing: .2em; }
.f-th { font-family: var(--font-body); font-size: 14px; font-weight: 500; letter-spacing: .04em; color: var(--ink-soft); margin-left: 6px; }
.f-map { margin: 0; max-width: 300px; }
.m-coast { stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.m-route { stroke: var(--ink-soft); stroke-width: 1.3; stroke-dasharray: 5 7; stroke-linecap: round; }
.m-star { fill: var(--glow); }
.m-town { fill: var(--ink-soft); }

.f-col h4 { margin: 0 0 14px; font-size: 12.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); }
.f-col p { margin: 0 0 12px; font-size: 15px; }
.f-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.f-links a { text-decoration: none; font-size: 15px; transition: color .2s; }
.f-links a:hover { color: var(--accent); }

.f-legal {
  margin-top: 64px; padding-top: 26px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: baseline; gap: 20px; flex-wrap: wrap;
}
.f-legal p { margin: 0; font-size: 14px; color: var(--ink-soft); max-width: 62ch; }
.f-refinery { color: var(--ink); font-weight: 600; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.f-see { font-size: 14px; font-weight: 600; text-decoration: none; color: var(--accent); white-space: nowrap; }
.f-see:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ═══════════════ REFINERY BADGE ═══════════════ */
.refinery-badge {
  position: fixed; left: 14px; bottom: 14px; z-index: 180;
  display: flex; align-items: center; gap: 2px;
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-size: 12.5px; font-weight: 600;
  max-width: calc(100vw - 120px);
}
.refinery-badge a { text-decoration: none; padding: 9px 6px 9px 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.refinery-badge a:hover { color: var(--accent); }
.refinery-badge button { padding: 9px 12px 9px 4px; font-size: 11px; color: var(--ink-soft); }
.refinery-badge button:hover { color: var(--ink); }
.refinery-badge.hide { display: none; }

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 980px) {
  .cliff-grid { grid-template-columns: 1fr; gap: 34px; }
  .treatments { grid-template-columns: 1fr; }
  .booking { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .f-brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .dial-dots { display: none; }
  .daydial { top: auto; bottom: 14px; right: 14px; transform: none; flex-direction: row; gap: 8px;
    border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: 6px 12px 6px 7px; }
  .dial-face { width: 26px; height: 26px; }
  .footer { padding-bottom: 150px; }
}

@media (max-width: 640px) {
  :root { --gutter: 24px; }
  body { font-size: 16px; }
  .brand-th { display: none; }
  .nav { height: 64px; }
  .btn-book { padding: 10px 16px; font-size: 13px; }
  .scene { scroll-margin-top: 72px; }
  .hero-actions { gap: 18px; }
  .stats { gap: 24px; }
  .dining-sun { top: -46px; }
  .menu-line { gap: 14px; padding-block: 16px; }
  .f-legal { flex-direction: column; }
}

@media (max-width: 480px) {
  :root { --gutter: 20px; }
  .bk-long { display: none; }
  .bk-short { display: inline; }
  .villa-card { width: min(340px, 86vw); }
  .booking { padding: 18px 14px; }
  .cal-day { min-height: 34px; font-size: 13.5px; }
  .btn-submit { align-self: stretch; }
}

@media (max-width: 360px) {
  :root { --gutter: 16px; }
  .booking { padding: 16px 10px; }
  .cal-grid { gap: 2px; }
  .cal-day { aspect-ratio: auto; min-height: 0; height: 36px; font-size: 13px; }
  .cal-nav { width: 34px; height: 34px; }
  .brand-name { font-size: 16px; letter-spacing: .16em; }
  .lp-opt { padding: 4px 9px; font-size: 11.5px; }
  .btn-book { padding: 9px 12px; font-size: 12px; }
  .hero-title { font-size: clamp(38px, 13vw, 46px); }
  .refinery-badge { font-size: 11.5px; max-width: calc(100vw - 128px); }
}

/* ═══════════════ REDUCED MOTION ═══════════════
   The day still passes — but as stills, not film.
   Each scene keeps its own fixed time-of-day palette. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .backdrop { display: none; }
  .cue-arrow { animation: none; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .js #cliff-svg .draw { stroke-dasharray: none; stroke-dashoffset: 0; }
  #gl-hero, #gl-pool, #starfield { display: none; }

  [data-scene] { background: linear-gradient(180deg, var(--sky-hi), var(--sky-lo)); }
  [data-scene="dawn"]      { --sky-hi:#A899C2; --sky-lo:#EFC3A4; --ink:#2E2440; --ink-soft:#5A4E6E; --accent:#B4552D; --line:rgba(46,36,64,.18); --surface:rgba(255,253,248,.62); --glow:#F7D9B4; }
  [data-scene="morning"]   { --sky-hi:#93BED8; --sky-lo:#F2E2C4; --ink:#223038; --ink-soft:#4A5E6A; --accent:#B4552D; --line:rgba(34,48,56,.18); --surface:rgba(255,253,248,.62); --glow:#FBE9C0; }
  [data-scene="noon"]      { --sky-hi:#79B4DC; --sky-lo:#F6EEDC; --ink:#1E2B33; --ink-soft:#46606E; --accent:#BE5327; --line:rgba(30,43,51,.18); --surface:rgba(255,253,248,.62); --glow:#FFF3D0; }
  [data-scene="afternoon"] { --sky-hi:#6FAECF; --sky-lo:#F2DDB8; --ink:#21313A; --ink-soft:#4A6472; --accent:#BE5327; --line:rgba(33,49,58,.18); --surface:rgba(255,253,248,.62); --glow:#FFEDBE; }
  [data-scene="golden"]    { --sky-hi:#C4693A; --sky-lo:#EFB463; --ink:#33150B; --ink-soft:#6E3A22; --accent:#822D12; --line:rgba(51,21,11,.2); --surface:rgba(255,248,236,.6); --glow:#FFD98F; }
  [data-scene="night"]     { --sky-hi:#1D2644; --sky-lo:#314064; --ink:#EAE6F4; --ink-soft:#AEB2CE; --accent:#EDBE72; --line:rgba(234,230,244,.2); --surface:rgba(16,20,38,.55); --glow:#C9D4F2; }
  [data-scene="midnight"]  { --sky-hi:#0C1124; --sky-lo:#181F38; --ink:#EDE9F7; --ink-soft:#A6ACC8; --accent:#EDBE72; --line:rgba(237,233,247,.2); --surface:rgba(16,20,38,.55); --glow:#C9D4F2; }
  .footer, .night-wrap     { --sky-hi:#0C1124; --sky-lo:#181F38; --ink:#EDE9F7; --ink-soft:#A6ACC8; --accent:#EDBE72; --line:rgba(237,233,247,.2); --surface:rgba(16,20,38,.55); --glow:#C9D4F2;
                             background: linear-gradient(180deg, var(--sky-hi), var(--sky-lo)); }
  .night-wrap [data-scene] { background: none; }
  .gl-wrap { background: linear-gradient(180deg, #A899C2, #EFC3A4); }
  .pool-panel { background: linear-gradient(160deg, #35708E 0%, #6FAECF 60%, #9CCAE0 100%); }
  #gl-pool { display: none; }
  .night-wrap {
    background-image:
      radial-gradient(circle at 12% 18%, rgba(237,190,114,.9) 0 1.5px, transparent 3px),
      radial-gradient(circle at 78% 8%,  rgba(201,212,242,.9) 0 1px,   transparent 2.5px),
      radial-gradient(circle at 55% 30%, rgba(201,212,242,.7) 0 1px,   transparent 2.5px),
      radial-gradient(circle at 90% 45%, rgba(237,190,114,.8) 0 1.5px, transparent 3px),
      radial-gradient(circle at 25% 60%, rgba(201,212,242,.8) 0 1px,   transparent 2.5px),
      linear-gradient(180deg, #0C1124, #181F38);
  }
}
