/* Cape Wren. Brand settings live in :root; change these to restyle the template. */
@font-face { font-family: 'Cormorant'; src: url('../fonts/cormorant-latin-300-normal.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cormorant'; src: url('../fonts/cormorant-latin-300-italic.woff2') format('woff2'); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: 'Cormorant'; src: url('../fonts/cormorant-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('../fonts/space-grotesk-latin-wght-normal.woff2') format('woff2'); font-weight: 300 700; font-style: normal; font-display: swap; }

:root {
  --night: #121726;     /* dark ground behind the scene and the footer */
  --night-2: #1b2234;
  --sand: #efe9df;      /* light ground: rooms, house, getting here, book */
  --sand-2: #e5ddcf;
  --ink: #1d2433;
  --ink-2: #4b5263;
  --muted: #7a7f8c;
  --dusk: #e8956a;      /* the evening light: small accents only */
  --white: #f7f3ec;
  --white-2: rgba(247, 243, 236, 0.74);
  --line: rgba(29, 36, 51, 0.16);
  --line-2: rgba(29, 36, 51, 0.3);
  --line-light: rgba(247, 243, 236, 0.22);
  --serif: 'Cormorant', 'Cormorant Garamond', Georgia, serif;
  --sans: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: clamp(20px, 4.5vw, 72px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--night); color: var(--white); -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; }
ol, ul { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--dusk); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; background: var(--white); color: var(--night); border-radius: 8px; text-decoration: none; }
.skip:focus { top: 12px; }

.label { font: 500 12px/1.2 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--white-2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px;
  border-radius: 999px; border: 1px solid var(--white); background: var(--white); color: var(--night);
  font: 500 15px/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.2s var(--ease);
}
.btn:hover { background: #fff; }
.btn:active { transform: scale(0.98); }
.btn-ghost { background: transparent; color: var(--white); border-color: var(--line-light); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(247, 243, 236, 0.1); border-color: var(--white-2); }
.btn-dark { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn-dark:hover { background: #2a3347; }
.btn-small { min-height: 40px; padding: 0 18px; font-size: 14px; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 20; height: 76px; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: linear-gradient(rgba(10, 13, 22, 0.5), rgba(10, 13, 22, 0));
}
.nav-brand { font: 400 28px/1 var(--serif); letter-spacing: 0.06em; text-decoration: none; }
.nav-links { display: flex; gap: 30px; font-size: 14px; }
.nav-links a { text-decoration: none; color: var(--white-2); transition: color 0.3s; }
.nav-links a:hover { color: var(--white); }
.scrolled .nav { background: rgba(18, 23, 38, 0.86); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }

/* ---------- The scene ---------- */
.stage { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.4s var(--ease); }
.scene-ready .stage canvas { opacity: 1; }
.instant .stage canvas { transition: none; }
/* Shade low and to the left, behind the text. */
.stage-shade { position: absolute; inset: 0; background:
  radial-gradient(90% 70% at 0% 100%, rgba(8, 10, 18, 0.62) 0%, rgba(8, 10, 18, 0.25) 45%, rgba(8, 10, 18, 0) 70%); }

main, .footer { position: relative; z-index: 1; }

/* ---------- The day (pinned) ---------- */
.day-pin { position: relative; height: 100svh; overflow: hidden; }
.clock { position: absolute; top: 108px; right: var(--gutter); font: italic 300 clamp(30px, 3.4vw, 50px)/1 var(--serif); color: var(--white); text-shadow: 0 2px 30px rgba(0, 0, 0, 0.25); font-variant-numeric: tabular-nums; }
.chapters { position: absolute; left: var(--gutter); bottom: clamp(72px, 11vh, 120px); width: min(680px, 56vw); }
.chapter { position: absolute; left: 0; right: 0; bottom: 0; }
.chapter-text { display: grid; gap: 16px; opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 1s var(--ease); pointer-events: none; }
.chapter.is-active .chapter-text { opacity: 1; transform: none; transition-delay: 0.1s; pointer-events: auto; }
.title { font: 300 clamp(46px, 5.8vw, 96px)/0.95 var(--serif); letter-spacing: -0.01em; text-shadow: 0 2px 40px rgba(0, 0, 0, 0.25); }
.lede { color: var(--white); max-width: 40ch; font-size: 18px; text-shadow: 0 1px 20px rgba(0, 0, 0, 0.35); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.day-bar { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 40px; height: 1px; background: var(--line-light); }
.day-bar span { position: absolute; inset: 0; background: var(--white); transform-origin: left; transform: scaleX(0); }

/* ---------- Light sections ---------- */
.section { padding: clamp(96px, 11vw, 160px) var(--gutter); background: var(--sand); color: var(--ink); }
.section .label { color: #b0603a; }
.section + .section { padding-top: 0; }
.rooms { box-shadow: 0 -40px 80px rgba(0, 0, 0, 0.35); }
.section-head { display: grid; gap: 18px; max-width: 860px; margin-bottom: clamp(44px, 5vw, 72px); }
.section-title { font: 300 clamp(40px, 4.8vw, 76px)/1 var(--serif); letter-spacing: -0.01em; }
.section-lede { color: var(--ink-2); max-width: 54ch; }

.room-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.room { display: grid; grid-template-rows: auto auto 1fr auto; gap: 14px; padding-top: 22px; border-top: 1px solid var(--line-2); }
.room-count { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.room h3 { font: 400 34px/1.05 var(--serif); }
.room p { color: var(--ink-2); }
.room-rate { font: 300 40px/1 var(--serif); color: var(--ink) !important; margin-top: 8px; }
.room-rate span { font: 400 13px/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-right: 8px; vertical-align: middle; }

.included { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.included li { display: grid; gap: 10px; align-content: start; padding-top: 22px; border-top: 1px solid var(--line-2); }
.included h3 { font: 400 28px/1.1 var(--serif); }
.included p { color: var(--ink-2); }

.getting-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.getting .section-head { margin-bottom: 0; }
.facts { border-bottom: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.facts dt { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.facts a { text-underline-offset: 3px; }

.book { background: var(--sand-2); padding-top: clamp(96px, 11vw, 160px) !important; }
.book-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 24px; max-width: 1100px; }
.field { display: grid; gap: 8px; }
.field span { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 10px;
  background: rgba(255, 255, 255, 0.55); color: var(--ink); font: 400 17px/1.3 var(--sans);
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); background: #fff; }
.field.invalid input, .field.invalid select { border-color: #b0603a; }
.field-wide { grid-column: 1 / -1; }
.form-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.form-status { color: var(--ink-2); font-size: 15px; }

.footer { padding: 48px var(--gutter) 40px; display: flex; flex-wrap: wrap; gap: 10px 36px; align-items: baseline; background: var(--night); color: var(--white-2); font-size: 15px; }
.footer-brand { font: 400 28px/1 var(--serif); color: var(--white); letter-spacing: 0.06em; }
.footer-small { margin-left: auto; }

/* ---------- Still version: reduced motion, no WebGL, or opened from the folder ---------- */
:root:not(.live) .stage { display: none; }
:root:not(.live) .day-pin { height: auto; overflow: visible; }
:root:not(.live) .clock, :root:not(.live) .day-bar { display: none; }
:root:not(.live) .chapters { position: static; width: auto; }
:root:not(.live) .chapter {
  position: relative; min-height: 100svh; display: flex; align-items: flex-end; padding: 120px var(--gutter) clamp(72px, 11vh, 120px);
  background: var(--night) var(--bg) center / cover no-repeat;
}
:root:not(.live) .chapter::before { content: ''; position: absolute; inset: 0; background: radial-gradient(90% 70% at 0% 100%, rgba(8, 10, 18, 0.66) 0%, rgba(8, 10, 18, 0.2) 50%, rgba(8, 10, 18, 0) 75%); }
:root:not(.live) .chapter-text { position: relative; opacity: 1; transform: none; pointer-events: auto; max-width: 600px; }

.poster-mode .nav, .poster-mode main, .poster-mode .footer, .poster-mode .skip, .poster-mode .stage-shade { visibility: hidden; }

/* ---------- Tablets and phones ---------- */
@media (max-width: 980px) {
  .room-list { grid-template-columns: minmax(0, 1fr); }
  .included { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .getting-grid { grid-template-columns: minmax(0, 1fr); }
  .book-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chapters { width: auto; right: var(--gutter); }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav { height: 64px; }
  .nav-links { display: none; }
  .clock { top: 84px; }
  .lede { font-size: 16px; }
  .stage-shade { background: linear-gradient(0deg, rgba(8, 10, 18, 0.72) 0%, rgba(8, 10, 18, 0.35) 40%, rgba(8, 10, 18, 0) 62%); }
  .included { grid-template-columns: minmax(0, 1fr); }
  .book-form { grid-template-columns: minmax(0, 1fr); }
  .footer-small { margin-left: 0; }
}

/* Entrances: js/scroll.js marks elements .reveal and adds .in when they come into view. */
.live .reveal { opacity: 0; transform: translateY(26px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.live .reveal.in, .instant .reveal { opacity: 1; transform: none; }
.instant .reveal { transition: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}

/* Screenshot mode: captions switch without fading. */
.instant .chapter-text { transition: none !important; }
