@font-face {
  font-family: 'Cormorant Garamond';
  src: url('fonts/cormorant-garamond-latin.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('fonts/cormorant-garamond-italic-latin.woff2') format('woff2');
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/inter-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ivory: #f5f0e8;
  --sand: #e7ddcf;
  --stone: #b9a893;
  --walnut: #7a5234;
  --ink: #1b1916;
  --ink-soft: #5a534b;
  --night: #0e0d0c;

  --serif: 'Cormorant Garamond', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* The site is a phone-shaped column. On a phone it is the full screen;
     on anything wider it becomes a centred 9:16 column. */
  --col: min(100vw, calc(100svh * 9 / 16));
  --gutter: 24px;
  --ease: cubic-bezier(.22, .61, .36, 1);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html {
  background: var(--night);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--night);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.app {
  position: relative;
  width: var(--col);
  margin-inline: auto;
}

/* ---------- Fixed stage (canvas + overlays) ---------- */

.stage {
  position: fixed;
  top: 0;
  left: 50%;
  width: var(--col);
  height: 100lvh;
  transform: translateX(-50%);
  overflow: hidden;
  background: var(--night) url('frames/v1/f_0001.webp') center / cover no-repeat;
  z-index: 0;
}

.stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Scrims keep white text legible over bright sky and white walls. */
.stage::before,
.stage::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 1;
}
.stage::before {
  top: 0;
  height: 22%;
  background: linear-gradient(to bottom, rgba(10, 9, 8, .55), rgba(10, 9, 8, 0));
}
.stage::after {
  bottom: 0;
  height: 48%;
  background: linear-gradient(to top, rgba(10, 9, 8, .82) 0%, rgba(10, 9, 8, .45) 45%, rgba(10, 9, 8, 0) 100%);
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  /* svh so text stays above the browser toolbar on mobile */
  height: 100svh;
  text-shadow: 0 1px 18px rgba(0, 0, 0, .35);
}

/* Top bar */
.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--safe-top) + 18px) var(--gutter) 0;
  pointer-events: auto;
}

.wordmark {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: .02em;
  text-decoration: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid rgba(245, 240, 232, .55);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(20, 18, 16, .18);
  transition: background .3s var(--ease);
}
.pill:active { background: rgba(245, 240, 232, .2); }

/* Hero (start of tour) */
.hero {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: calc(var(--safe-bottom) + 150px);
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, .82);
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 13vw, 60px);
  line-height: .98;
  letter-spacing: -.01em;
}
.hero h1 em { font-style: italic; }

.hero p.lede {
  margin: 16px 0 0;
  max-width: 30ch;
  font-size: 15px;
  font-weight: 300;
  color: rgba(245, 240, 232, .88);
}

/* Chapters */
.chapter {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: calc(var(--safe-bottom) + 92px);
}

.chapter h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 9.6vw, 44px);
  line-height: 1.04;
}

.chapter p {
  margin: 12px 0 0;
  max-width: 32ch;
  font-size: 15px;
  font-weight: 300;
  color: rgba(245, 240, 232, .88);
}

/* Shared in/out transition for timed overlay elements */
.fade {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s var(--ease), transform .8s var(--ease);
}
.fade.is-active {
  opacity: 1;
  transform: none;
}
.fade > * {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .6s var(--ease), transform .8s var(--ease);
}
.fade.is-active > * { opacity: 1; transform: none; }
.fade.is-active > :nth-child(2) { transition-delay: .08s; }
.fade.is-active > :nth-child(3) { transition-delay: .16s; }

/* Progress + counter */
.progress {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: calc(var(--safe-bottom) + 44px);
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .18em;
  font-variant-numeric: tabular-nums;
  color: rgba(245, 240, 232, .8);
}
.progress-track {
  position: relative;
  flex: 1;
  height: 1px;
  background: rgba(245, 240, 232, .28);
  overflow: hidden;
}
.progress-bar {
  position: absolute;
  inset: 0;
  background: var(--ivory);
  transform-origin: left center;
  transform: scaleX(0);
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: calc(var(--safe-bottom) + 70px);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, .75);
  opacity: 0;
  transition: opacity .5s var(--ease);
}
.scroll-cue.is-active { opacity: 1; }
.scroll-cue::after {
  content: '';
  width: 1px;
  height: 30px;
  background: linear-gradient(to bottom, rgba(245, 240, 232, .9), rgba(245, 240, 232, 0));
  animation: cue 1.8s var(--ease) infinite;
  transform-origin: top;
}
@keyframes cue {
  0% { transform: scaleY(0); opacity: 1; }
  60% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* The hero sits where the scroll cue would collide on short screens */
@media (max-height: 640px) {
  .hero { bottom: calc(var(--safe-bottom) + 108px); }
  .hero p.lede { display: none; }
  .scroll-cue { display: none; }
}

/* ---------- Scroll track for the film ---------- */

.film {
  position: relative;
  /* Scroll distance for the whole tour: ~11 screens ≈ 13 px of scroll per frame */
  height: 1100svh;
  z-index: 1;
  /* Let taps reach the top bar links on the fixed stage underneath */
  pointer-events: none;
}

/* ---------- Loader ---------- */

.loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: var(--night);
  transition: opacity .8s var(--ease), visibility 0s linear .8s;
}
.is-ready .loader { opacity: 0; visibility: hidden; }
.loader-inner { width: min(220px, 60vw); text-align: center; }
.loader-mark {
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: .02em;
  margin-bottom: 18px;
}
.loader-track {
  height: 1px;
  background: rgba(245, 240, 232, .18);
  overflow: hidden;
}
.loader-bar {
  height: 100%;
  background: var(--ivory);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform .3s linear;
}
.loader-note {
  margin-top: 14px;
  font-size: 10px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, .55);
}

/* ---------- Details (after the tour) ---------- */

.details {
  position: relative;
  z-index: 3;
  background: var(--ivory);
  color: var(--ink);
  border-radius: 28px 28px 0 0;
  padding: 44px var(--gutter) calc(var(--safe-bottom) + 32px);
  box-shadow: 0 -30px 60px rgba(0, 0, 0, .35);
}

.details .eyebrow { color: var(--walnut); }

.details h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 40px;
  line-height: 1.04;
}

.details h3 {
  margin: 0 0 18px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.intro p {
  margin: 16px 0 0;
  color: var(--ink-soft);
  font-weight: 300;
}

.block { margin-top: 44px; }

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  border-top: 1px solid var(--sand);
}
.fact {
  padding: 18px 0;
  border-bottom: 1px solid var(--sand);
}
.fact:nth-child(odd) { padding-right: 12px; border-right: 1px solid var(--sand); }
.fact:nth-child(even) { padding-left: 18px; }
.fact dt {
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.fact dd {
  margin: 4px 0 0;
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1.1;
}
.fact dd small {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-soft);
  margin-left: 2px;
}

.features {
  list-style: none;
  margin: 0;
  padding: 0;
}
.features li {
  display: flex;
  gap: 14px;
  align-items: baseline;
  padding: 13px 0;
  border-bottom: 1px solid var(--sand);
  font-size: 15px;
}
.features li::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--walnut);
  transform: translateY(-2px);
}

.price {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 22px 0;
  border-top: 1px solid var(--sand);
  border-bottom: 1px solid var(--sand);
}
.price span {
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.price strong {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 30px;
}

.contact {
  scroll-margin-top: calc(var(--safe-top) + 16px);
  margin-top: 44px;
  padding: 28px 22px;
  border-radius: 20px;
  background: var(--ink);
  color: var(--ivory);
}
.contact h2 { font-size: 34px; }
.contact p {
  margin: 10px 0 22px;
  font-weight: 300;
  color: rgba(245, 240, 232, .78);
}
.agent {
  font-size: 13px;
  letter-spacing: .04em;
  color: rgba(245, 240, 232, .7);
  margin-bottom: 18px;
}
.agent strong { color: var(--ivory); font-weight: 500; }

.actions { display: grid; gap: 10px; }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform .2s var(--ease), background .2s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--ivory); color: var(--ink); }
.btn-ghost { border: 1px solid rgba(245, 240, 232, .35); color: var(--ivory); }

.replay {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 36px;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--stone);
  padding-bottom: 4px;
}

.footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--sand);
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.footer p { margin: 0 0 6px; }

/* ---------- Wider screens: explain it is a mobile experience ---------- */

.desktop-note { display: none; }

@media (min-width: 900px) and (min-aspect-ratio: 4/3) {
  .desktop-note {
    display: block;
    position: fixed;
    top: 50%;
    left: calc((100vw - var(--col)) / 4);
    transform: translate(-50%, -50%);
    width: min(260px, calc((100vw - var(--col)) / 2 - 48px));
    color: rgba(245, 240, 232, .7);
    font-size: 13px;
    text-align: center;
    z-index: 0;
  }
  .desktop-note strong {
    display: block;
    margin-bottom: 8px;
    font-family: var(--serif);
    font-weight: 400;
    font-size: 26px;
    line-height: 1.1;
    color: var(--ivory);
  }
  .details { border-radius: 28px 28px 0 0; }
}

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

@media (prefers-reduced-motion: reduce) {
  .fade, .fade > *, .scroll-cue, .loader, .loader-bar { transition: none; }
  .scroll-cue::after { animation: none; }
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
