:root {
  --espresso: #1a110c;
  --espresso-2: #24170f;
  --cream: #f4ede3;
  --cream-dim: #d9cbb8;
  --terracotta: #b5532e;
  --terracotta-light: #e08a5f; /* AA on espresso for small text */
  --brass: #c9a25c;
  --serif: "Fraunces", "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 64px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--espresso);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--terracotta-light); outline-offset: 4px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  background: var(--cream); color: var(--espresso); padding: 10px 16px; border-radius: 999px;
  text-decoration: none; font-weight: 600; transition: top .2s;
}
.skip:focus { top: 16px; }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center; align-content: center; gap: 18px;
  background: var(--espresso);
  transition: opacity .9s ease, visibility .9s, transform .9s cubic-bezier(.7,0,.2,1);
}
.preloader img { border-radius: 50%; animation: pulse 1.6s ease-in-out infinite; }
.preloader__count { font-family: var(--serif); font-size: clamp(40px, 8vw, 88px); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.preloader__bar { width: min(240px, 60vw); height: 2px; background: rgba(244,237,227,.15); overflow: hidden; }
.preloader__bar i { display: block; height: 100%; width: 0; background: var(--terracotta-light); transition: width .3s ease; }
.preloader.is-done { opacity: 0; visibility: hidden; transform: translateY(-4%); }
@keyframes pulse { 50% { transform: scale(1.06); } }

/* ---------- Film layer (single fixed canvas) ---------- */
.film { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.film__poster, #film { position: absolute; inset: 0; width: 100%; height: 100%; }
.film__poster { object-fit: cover; object-position: 70% 50%; transition: opacity .6s ease; }
#film { opacity: 0; transition: opacity .6s ease; }
.film.is-live #film { opacity: 1; }
.film.is-live .film__poster { opacity: 0; }
.film__vignette {
  position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 60% 50%, transparent 55%, rgba(10,6,4,.55) 100%);
}

/* ---------- Top bar + HUD ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--gutter);
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.topbar__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: .02em; }
.topbar__brand img { border-radius: 50%; }

.hud {
  position: fixed; left: var(--gutter); bottom: 24px; z-index: 40;
  display: flex; align-items: baseline; gap: 8px;
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--cream-dim);
  transition: opacity .5s ease;
}
.hud.is-hidden { opacity: 0; }
.hud__num { font-family: var(--serif); font-size: 28px; letter-spacing: 0; color: var(--cream); font-variant-numeric: tabular-nums; }
.hud__label { margin-left: 10px; }
.hud__bar { align-self: center; width: 96px; height: 2px; margin-left: 12px; background: rgba(244,237,227,.18); overflow: hidden; }
.hud__bar i { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0); background: var(--terracotta-light); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 12px 22px; border-radius: 999px;
  font-weight: 600; text-decoration: none; letter-spacing: .01em;
  transition: background-color .25s, color .25s, border-color .25s, transform .35s cubic-bezier(.2,.7,.1,1);
  will-change: transform;
}
.btn--ghost { border: 1px solid rgba(244,237,227,.5); color: var(--cream); backdrop-filter: blur(6px); background: rgba(26,17,12,.35); }
.btn--ghost:hover { background: var(--cream); color: var(--espresso); }
.btn--solid { background: var(--cream); color: var(--espresso); }
.btn--solid:hover { background: var(--terracotta-light); }
.btn--xl { font-size: clamp(18px, 2.2vw, 24px); padding: 20px 40px; }

/* ---------- Scrub scenes (spacers + sticky copy over the fixed film) ---------- */
main { position: relative; z-index: 1; }
.scene { position: relative; height: 520vh; }
.scene[data-scene="icon"] { height: 480vh; }
.scene[data-scene="resolve"] { height: 420vh; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.film__shade { position: absolute; inset: 0; transition: opacity .8s ease; }
.film__shade--left { background: linear-gradient(90deg, rgba(26,17,12,.78) 0%, rgba(26,17,12,.38) 36%, rgba(26,17,12,0) 58%); }
.film__shade--right { opacity: 0; background: linear-gradient(270deg, rgba(26,17,12,.78) 0%, rgba(26,17,12,.38) 36%, rgba(26,17,12,0) 58%); }

.copy {
  position: absolute; left: var(--gutter); top: 50%; transform: translateY(-50%);
  width: min(46vw, 680px);
  display: grid; gap: 18px;
}
.copy--right { left: auto; right: var(--gutter); text-align: right; justify-items: end; }
.copy > [data-window] { opacity: 0; transform: translateY(22px); filter: blur(6px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.1,1), filter .7s ease; }
.copy > [data-window].is-on { opacity: 1; transform: none; filter: none; }
.copy > .line--big { position: absolute; top: 50%; left: 0; width: 100%; transform: translateY(-40%); }
.copy > .line--big.is-on { transform: translateY(-50%); }

.kicker { margin: 0; text-transform: uppercase; letter-spacing: .22em; font-size: 12px; font-weight: 600; color: var(--terracotta-light); }
.display {
  margin: 0; font-family: var(--serif); font-weight: 400;
  font-size: clamp(42px, 6.4vw, 112px); line-height: .98; letter-spacing: -.025em;
  text-wrap: balance;
}
.display em { font-style: italic; color: var(--cream-dim); }
.line { margin: 0; font-size: clamp(16px, 1.45vw, 21px); color: var(--cream-dim); max-width: 34ch; }
.line--big { font-family: var(--serif); font-style: italic; font-size: clamp(34px, 4.4vw, 72px); line-height: 1.02; color: var(--cream); max-width: 12ch; }
.copy--right .line { margin-left: auto; }

/* word-by-word mask reveal */
.reveal .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.reveal .w > span { display: inline-block; transform: translateY(110%) rotate(4deg); transform-origin: left bottom; transition: transform 1s cubic-bezier(.2,.7,.1,1); }
.reveal.is-on .w > span { transform: none; }
.copy > .reveal[data-window] { opacity: 1; transform: none; filter: none; }

.scroll-cue {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: grid; justify-items: center; gap: 8px;
  font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--cream-dim);
  opacity: 0; transition: opacity .6s;
}
.scroll-cue.is-on { opacity: 1; }
.scroll-cue i { width: 1px; height: 44px; background: linear-gradient(var(--cream), transparent); animation: cue 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- After the film: solid content over the canvas ---------- */
.after {
  position: relative; background: var(--espresso);
  box-shadow: 0 -120px 120px -40px var(--espresso);
}

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  padding: clamp(80px, 12vw, 160px) var(--gutter);
}
.stat { display: grid; gap: 6px; }
.stat__num { font-family: var(--serif); font-size: clamp(48px, 6vw, 96px); line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat__label { color: var(--cream-dim); font-size: 15px; }

.marquee { overflow: hidden; border-block: 1px solid rgba(244,237,227,.12); padding: 28px 0; }
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee ul { display: flex; margin: 0; padding: 0; list-style: none; }
.marquee li {
  font-family: var(--serif); font-style: italic; font-size: clamp(28px, 4vw, 56px);
  padding: 0 .9em; white-space: nowrap; color: var(--cream);
}
.marquee li::after { content: "✦"; font-style: normal; font-size: .45em; color: var(--terracotta-light); margin-left: 1.8em; vertical-align: middle; }

.visit {
  padding: clamp(96px, 14vw, 200px) var(--gutter) clamp(80px, 10vw, 140px);
  display: grid; gap: clamp(40px, 6vw, 72px); justify-items: start;
}
.visit .display { font-size: clamp(40px, 6vw, 96px); max-width: 14ch; }
.visit__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; width: 100%; perspective: 900px; }
.card {
  font-style: normal; padding: 28px; border-radius: 20px;
  background: linear-gradient(160deg, #2b1c13, var(--espresso-2));
  border: 1px solid rgba(244,237,227,.1);
  display: grid; gap: 10px; align-content: start;
  transition: transform .5s cubic-bezier(.2,.7,.1,1), border-color .3s;
  transform-style: preserve-3d;
}
.card:hover { border-color: rgba(224,138,95,.5); }
.card h3 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .2em; color: var(--terracotta-light); }
.card p { margin: 0; font-size: 18px; }
.link { font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(244,237,227,.4); justify-self: start; padding-bottom: 2px; }
.link:hover { border-color: var(--terracotta-light); color: var(--terracotta-light); }

.footer { padding: 32px var(--gutter); color: var(--cream-dim); font-size: 14px; border-top: 1px solid rgba(244,237,227,.12); }
.footer p { margin: 0; }

/* ---------- Preview seal (remove before publishing) ---------- */
.preview-seal {
  --size: clamp(150px, 17vw, 230px);
  position: fixed; right: clamp(12px, 3vw, 48px); top: 50%; z-index: 85;
  width: var(--size); height: var(--size); margin-top: calc(var(--size) / -2);
  border-radius: 50%;
  background: rgba(181,83,46,.92); color: var(--cream);
  border: 3px double rgba(244,237,227,.85);
  box-shadow: 0 0 0 6px rgba(181,83,46,.35), 0 18px 50px rgba(0,0,0,.45);
  transform: rotate(-14deg);
  pointer-events: none; user-select: none;
  display: grid; place-items: center;
}
.preview-seal__ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: sealSpin 22s linear infinite; }
.preview-seal__ring text { fill: var(--cream); font-family: var(--sans); font-size: 15px; font-weight: 700; letter-spacing: 3.2px; }
.preview-seal__core {
  display: grid; justify-items: center; gap: 2px;
  width: 64%; aspect-ratio: 1; align-content: center; border-radius: 50%;
  border: 1px solid rgba(244,237,227,.6);
}
.preview-seal__core b { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: calc(var(--size) * .2); line-height: 1; }
.preview-seal__core small { font-size: calc(var(--size) * .052); letter-spacing: .18em; text-transform: uppercase; opacity: .85; }
@keyframes sealSpin { to { transform: rotate(360deg); } }
@media (max-aspect-ratio: 17/20) {
  /* portrait: big stamp in the top-right corner, above the subject, clear of the copy */
  .preview-seal { --size: 128px; top: 84px; right: 10px; margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) { .preview-seal__ring { animation: none; } }

/* ---------- Grain + cursor ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 60; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0,0); } 20% { transform: translate(-3%,2%); } 40% { transform: translate(2%,-3%); }
  60% { transform: translate(-2%,-1%); } 80% { transform: translate(3%,3%); } 100% { transform: translate(0,0); }
}
.cursor { display: none; }
@media (pointer: fine) {
  .cursor {
    display: block; position: fixed; left: 0; top: 0; z-index: 80; pointer-events: none;
    width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
    background: var(--cream); mix-blend-mode: difference;
    transition: width .25s, height .25s, margin .25s;
  }
  .cursor.is-hover { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
}

/* ---------- Mobile ---------- */
@media (max-width: 900px) and (min-aspect-ratio: 17/20) {
  /* small landscape: keep the side layout, just tighter */
  .copy { width: min(52vw, 560px); gap: 12px; }
  .display { font-size: clamp(34px, 6vw, 64px); }
  .line { font-size: 15px; }
}
@media (max-aspect-ratio: 17/20) {
  /* portrait: the subject sits in the upper half, copy reads at the bottom */
  .film__shade--left { background: linear-gradient(0deg, rgba(26,17,12,.94) 0%, rgba(26,17,12,.7) 30%, rgba(26,17,12,0) 52%); opacity: 1 !important; }
  .film__shade--right { display: none; }
  .copy, .copy--right {
    left: 16px; right: 16px; top: auto; bottom: 72px; transform: none;
    width: auto; text-align: left; justify-items: start;
  }
  .copy > .line--big { top: auto; bottom: 0; transform: translateY(10px); }
  .copy > .line--big.is-on { transform: none; }
  .copy--right .line { margin-left: 0; }
  .display { font-size: clamp(36px, 10.5vw, 54px); }
  .hud { bottom: 20px; }
  .hud__label, .hud__bar { display: none; }
  .scroll-cue { display: none; }
  .scene { height: 420vh; }
}
@media (max-width: 760px) {
  .topbar__brand span { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 40px 16px; }
  .visit__grid { grid-template-columns: 1fr; }
  .btn--xl { width: 100%; }
}

/* ---------- Reduced motion: static film, all copy visible ---------- */
@media (prefers-reduced-motion: reduce) {
  .copy > [data-window] { opacity: 1; transform: none; filter: none; transition: none; }
  .copy > .line--big { position: static; transform: none; }
  .reveal .w > span { transform: none; transition: none; }
  .grain, .preloader img, .scroll-cue i { animation: none; }
}
