/* ============================================================
   NUKA HOTEL — The Standard
   Dark-first inversion of the Nuka token sheet (nuka-home-demo).
   Serif display: Cormorant Garamond · Body: Geist · Labels: Geist Mono
   Static-first: every chapter reads stacked with no JS; main.js
   adds .craft--scrub / .project--pin / .company--pin enhancements.
   ============================================================ */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond-latin.woff2") format("woff2");
  font-weight: 300 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond-latin-italic.woff2") format("woff2");
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("../fonts/geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/geistmono-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #EDE7DC;         /* bone — warm, never cold grey */
  --bg-deep: #E2DACB;    /* sunken bone: loader, alternating chapters */
  --text: #171310;       /* warm ink */
  --text-muted: #6B5F52;
  --line: color-mix(in srgb, #171310 14%, transparent);
  --line-strong: color-mix(in srgb, #171310 26%, transparent);
  --red: #ED2224;        /* fills only */
  --red-text: #C41B1D;   /* red that must be read on bone */
  --bone: #EDE7DC;       /* fixed light value for text over film/photos */

  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, Consolas, monospace;

  --d1: clamp(3rem, 9vw, 8.5rem);
  --d2: clamp(2.1rem, 5.5vw, 4.4rem);
  --body-size: 17px;
  --micro: 12px;

  --pad-x: clamp(20px, 5vw, 72px);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: auto; }
html.is-loading { overflow: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--body-size);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* the red-thread segments are absolutely positioned against <main> */
main { position: relative; }

img, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; font-weight: 300; }

:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

::selection { background: var(--red); color: #FFF7F4; }

/* ---------- shared type ---------- */
.d1, .d2 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.d1 { font-size: var(--d1); }
.d2 { font-size: var(--d2); }

.eyebrow, .mono-label {
  font-family: var(--font-mono);
  font-size: var(--micro);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}
.eyebrow { display: inline-flex; align-items: center; gap: 14px; }
.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--red);
  flex: none;
}

/* ---------- lockup ---------- */
.lockup .wm { fill: var(--text); }
.lockup .dot { fill: var(--red); }
.lockup__hotel {
  display: block;
  font-family: var(--font-body);
  font-weight: 300;
  text-transform: uppercase;
  color: var(--text);
  letter-spacing: 0.58em;
  margin-right: -0.58em; /* kill trailing letterspace so it centers true */
  text-align: center;
}

/* ---------- grain ---------- */
/* no mix-blend-mode here: a full-viewport blended layer forces the compositor
   to re-blend every scrolled frame — it was the main source of scrub lag */
.grain {
  position: fixed; inset: -50%;
  width: 200%; height: 200%;
  pointer-events: none;
  z-index: 90;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}
@media (max-width: 768px) { .grain { opacity: 0.03; } }

/* ---------- loader (the film inside the mark) ----------
   A bone panel with the NUKA letterforms punched out; the hero film
   plays through the letters while the page loads. JS pins the mark to
   the hero lockup's exact rendered box, so on release the panel simply
   dissolves (.is-open) while the hero's bone lockup fades in at the
   same spot — the mark never moves, it turns from window into logo. */
.loader {
  position: fixed; inset: 0;
  z-index: 200;
  background: transparent;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0;
}
.loader.is-done { visibility: hidden; }
.loader__panel {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  transition: opacity 1.5s var(--ease);
}
.loader.is-open .loader__panel { opacity: 0; }
.loader__meta {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center;
}
.loader__meta .lockup__hotel { font-size: clamp(14px, 2.6vw, 22px); margin-top: 0; }
.loader__meta, .loader__enter { transition: opacity 0.45s var(--ease); }
.loader.is-opening .loader__meta,
.loader.is-opening .loader__enter { opacity: 0; }
.loader__est {
  font-family: var(--font-mono);
  font-size: var(--micro);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 26px;
}
.loader__track {
  width: min(52vw, 220px); height: 1px;
  background: var(--line);
  margin-top: 18px;
  overflow: hidden;
}
.loader__fill {
  width: 100%; height: 100%;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.4s linear;
}
.loader__enter {
  margin-top: 34px;
  font-family: var(--font-mono);
  font-size: var(--micro);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  padding: 12px 34px;
  cursor: pointer;
}

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(16px, 2.6vw, 28px) var(--pad-x);
  pointer-events: none;
  transition: color 0.4s var(--ease);
}
/* over the hero film the nav flips to bone (JS toggles the class) */
.nav--onmedia {
  --text: var(--bone);
  --line-strong: color-mix(in srgb, #EDE7DC 34%, transparent);
  color: var(--bone);
}
.nav__brand, .nav__cta { pointer-events: auto; }
.nav__brand { display: flex; align-items: baseline; gap: 9px; }
.lockup--nav { width: 64px; height: auto; transform: translateY(2px); }
.nav__sub {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
}
.nav__cta {
  font-family: var(--font-mono);
  font-size: var(--micro);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 11px 26px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: color-mix(in srgb, var(--bg-deep) 42%, transparent);
  transition: transform 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.nav__cta:hover { transform: translateY(-1px); background: var(--red); border-color: var(--red); }
.nav__cta:active { transform: scale(0.98); }

/* ---------- chapters shared ---------- */
.chapter { position: relative; padding: clamp(96px, 16vh, 180px) var(--pad-x); }
.chapter__head { max-width: 1200px; margin: 0 auto clamp(48px, 8vh, 96px); }
.chapter__head .d2 { margin-top: 22px; }

/* reveal states (JS adds .rv-init then .in) */
[data-reveal].rv-init { opacity: 0; transform: translateY(26px); }
[data-reveal].in {
  opacity: 1; transform: none;
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  overflow: hidden;
  /* text over film stays bone regardless of page theme */
  --text: var(--bone);
  color: var(--bone);
}
.hero__media { position: absolute; inset: 0; }
.hero__video {
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(14,11,9,0.55) 0%, rgba(14,11,9,0.12) 26%, rgba(14,11,9,0.16) 62%, rgba(14,11,9,0.78) 100%),
    radial-gradient(120% 90% at 50% 46%, transparent 42%, rgba(14,11,9,0.42) 100%);
}
.hero__content {
  position: relative;
  z-index: 2;
  display: flex; flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 var(--pad-x);
}
.hero__eyebrow { color: color-mix(in srgb, var(--text) 78%, transparent); }
.hero__lockup { margin-top: clamp(26px, 5vh, 48px); }
.lockup--hero { width: min(60vw, 420px); height: auto; filter: drop-shadow(0 2px 24px rgba(14,11,9,0.45)); }
.lockup__hotel--hero { font-size: clamp(14px, 2.6vw, 22px); margin-top: 14px; text-shadow: 0 1px 18px rgba(14,11,9,0.5); }
.hero__line {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.5rem, 3.4vw, 2.6rem);
  letter-spacing: 0.01em;
  margin-top: clamp(30px, 6vh, 56px);
  text-shadow: 0 1px 22px rgba(14,11,9,0.55);
}
.hero__hint {
  position: absolute;
  bottom: clamp(22px, 5vh, 44px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.hero__hint span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text) 72%, transparent);
}
.hero__hint i {
  width: 1px; height: 44px;
  background: linear-gradient(to bottom, var(--text), transparent);
  opacity: 0.6;
  animation: hint-drip 2.2s var(--ease) infinite;
  transform-origin: top center;
}
@keyframes hint-drip {
  0% { transform: scaleY(0); }
  45% { transform: scaleY(1); }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ---------- 01 heritage ---------- */
.heritage { background: var(--bg); }
.heritage__grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(20px, 3vw, 44px);
  align-items: start;
}
.heritage__fig img {
  width: 100%;
  filter: grayscale(1) contrast(1.04);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 86%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 86%, transparent 100%);
}
.heritage__fig--a { grid-column: 1 / span 7; }
.heritage__copy {
  grid-column: 9 / span 4;
  align-self: center;
  display: flex; flex-direction: column; gap: 1em;
  color: var(--text-muted);
  max-width: 44ch;
}
.heritage__copy p:first-child { color: var(--text); }
.heritage__fig--b { grid-column: 2 / span 4; margin-top: clamp(-40px, -4vh, -16px); }
.heritage__fig--c { grid-column: 7 / span 5; margin-top: clamp(32px, 8vh, 96px); }
.heritage__note {
  grid-column: 7 / span 5;
  color: var(--text-muted);
  font-size: 14px;
  display: flex; align-items: baseline; gap: 12px;
  margin-top: 18px;
}

/* ---------- drift bands (ghost typography, yodezeen-style) ----------
   Perpetual, not scroll-linked: each line breathes back and forth on
   its own clock (--dfrom/--dto/--dd inline per line). */
.drift {
  position: relative;
  overflow: hidden;
  padding: clamp(64px, 11vh, 130px) 0;
  display: flex; flex-direction: column;
  gap: clamp(4px, 1.2vh, 14px);
}
.drift__line {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.04;
  white-space: nowrap;
  will-change: transform;
  padding-left: var(--pad-x);
  animation: drift-go var(--dd, 22s) ease-in-out infinite alternate;
}
@keyframes drift-go {
  from { transform: translateX(var(--dfrom, 0%)); }
  to   { transform: translateX(var(--dto, -30%)); }
}
.drift__line--ghost {
  font-size: clamp(3.4rem, 9vw, 8.6rem);
  color: color-mix(in srgb, var(--text) 7%, transparent);
}
.drift__line--ink {
  font-size: clamp(1.9rem, 4.2vw, 3.3rem);
  color: var(--text);
  margin-left: clamp(24px, 12vw, 220px);
}
.drift__line em { font-style: italic; }

/* ---------- red thread (SVG overlays are built by JS) ---------- */
.thread-seg {
  position: absolute;
  left: 0; width: 100%;
  z-index: 3;
  pointer-events: none;
  overflow: visible;
}
.thread-seg path {
  fill: none;
  stroke: var(--red-text);
  stroke-width: 2.4;
  stroke-linecap: round;
  opacity: 0.92;
}
.thread-seg circle { fill: var(--red); }

/* ---------- 02 craft ---------- */
.craft { padding-bottom: 0; }
.craft__film { position: relative; }
.craft__stage { position: relative; }
.craft__stage video { width: 100%; }
.craft__stage canvas { display: none; }
.craft__caption {
  padding: 26px 0 8px;
  display: flex; flex-direction: column; gap: 8px;
}
.craft__caption p {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 2.1rem);
  line-height: 1.15;
}

/* scrub mode (JS adds .craft--scrub on desktop) */
.craft--scrub .craft__film { height: 500vh; margin-inline: calc(var(--pad-x) * -1); }
.craft--scrub .craft__stage { height: 100dvh; overflow: hidden; }
.craft--scrub .craft__stage video { display: none; }
.craft--scrub .craft__stage canvas { display: block; width: 100%; height: 100%; }
.craft--scrub .craft__caption {
  position: absolute;
  left: var(--pad-x); bottom: clamp(40px, 9vh, 90px);
  max-width: 520px;
  padding: 0;
  opacity: 0;
  color: var(--bone);
  text-shadow: 0 1px 18px rgba(14,11,9,0.6);
}
.craft--scrub .craft__caption p { font-size: clamp(1.6rem, 3vw, 2.6rem); }
.craft--scrub .craft__caption .mono-label { color: color-mix(in srgb, #EDE7DC 76%, transparent); }
.craft--scrub .craft__stage::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(14,11,9,0.32) 0%, transparent 22%, transparent 62%, rgba(14,11,9,0.6) 100%);
}
.craft--scrub .craft__caption { z-index: 2; }

.craft__frames { padding: clamp(96px, 14vh, 160px) 0 clamp(96px, 16vh, 180px); }
.craft__frame {
  max-width: 1200px;
  margin: 0 auto clamp(80px, 14vh, 150px);
  position: relative;
}
.craft__frame img {
  width: min(72%, 760px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 80%, transparent 100%),
                      linear-gradient(to right, #000 0%, #000 88%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 80%, transparent 100%),
                      linear-gradient(to right, #000 0%, #000 88%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-composite: intersect;
}
.craft__frame figcaption {
  position: absolute;
  right: 0; bottom: clamp(-10px, -1vh, 0px);
  display: flex; flex-direction: column; gap: 10px;
  text-align: right;
}
.craft__frame--alt img { margin-left: auto; }
.craft__frame--alt figcaption { right: auto; left: 0; text-align: left; }
.craft__word { font-style: italic; }

/* ---------- the collection (spec sheets) ---------- */
.collection { background: var(--bg); }
.collection__grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(36px, 6vh, 80px) clamp(28px, 5vw, 90px);
}
.coll { max-width: 520px; }
.coll:nth-child(even) { margin-top: clamp(44px, 9vh, 120px); justify-self: end; }
.coll img {
  width: 100%;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 86%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 86%, transparent 100%);
}
.coll figcaption {
  display: flex; flex-direction: column; gap: 8px;
  margin-top: 4px;
}
.coll__word {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  line-height: 1.1;
}
.collection__foot {
  display: block;
  max-width: 1200px;
  margin: clamp(40px, 7vh, 80px) auto 0;
  color: color-mix(in srgb, var(--text-muted) 78%, transparent);
}
@media (max-width: 900px) {
  .collection__grid { grid-template-columns: 1fr; }
  .coll { max-width: none; }
  .coll:nth-child(even) { margin-top: 0; justify-self: stretch; }
}

/* ---------- 03 project ---------- */
.project { padding-left: 0; padding-right: 0; background: var(--bg); }
.project__track {
  display: flex; flex-direction: column;
  gap: clamp(48px, 8vh, 90px);
  padding: 0 var(--pad-x);
}
.project__panel--title { max-width: 720px; }
.project__panel--title .d1 { margin-top: 22px; }
.project__sub { color: var(--text-muted); max-width: 40ch; margin-top: 26px; }
.project__panel--img img {
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 88%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 88%, transparent 100%);
}
.project__panel--img figcaption { margin-top: 14px; }

/* pin mode (JS adds .project--pin on desktop) */
.project--pin .project__pin { height: 100dvh; overflow: hidden; display: flex; align-items: center; }
.project--pin .project__track {
  flex-direction: row;
  align-items: center;
  gap: clamp(48px, 6vw, 110px);
  padding: 0 var(--pad-x);
  width: max-content;
  will-change: transform;
}
.project--pin .project__panel { flex: none; }
.project--pin .project__panel--title { width: min(44vw, 640px); }
.project--pin .project__panel--img img { width: auto; height: 62vh; }
.project--pin .project__panel--tall img { height: 78vh; }
.project__panel--close { display: flex; flex-direction: column; gap: 18px; max-width: 560px; }
.project--pin .project__panel--close { padding-right: clamp(24px, 8vw, 140px); }

/* ---------- 04 company (typographic "Trusted by") ----------
   No photography: each house is a full beat of type — a giant ghost
   initial behind, the name in display serif, mono metadata, and the
   real logo as a small dark film-credit chip (the logo crops are
   white-on-black frames, so they live on ink). */
.company { background: var(--bg); }
.company__stage { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: clamp(72px, 11vh, 130px); }
.company__house {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start;
  gap: clamp(14px, 2.4vh, 24px);
  padding-top: clamp(8px, 2vh, 20px);
}
.company__ghost {
  position: absolute;
  right: clamp(-20px, -1vw, 0px);
  top: 50%;
  transform: translateY(-54%);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(16rem, 34vw, 34rem);
  line-height: 1;
  color: color-mix(in srgb, var(--text) 5%, transparent);
  pointer-events: none;
  user-select: none;
}
.company__trust { color: var(--red-text); }
.company__name { position: relative; }
.company__name em { font-style: italic; }
.company__meta { letter-spacing: 0.2em; }
.company__chip {
  display: inline-flex; align-items: center; justify-content: center;
  background: #0E0B09;
  border-radius: 2px;
  padding: clamp(16px, 2.6vh, 28px) clamp(24px, 3vw, 40px);
  margin-top: clamp(8px, 1.8vh, 18px);
}
/* the marks are the recognition — show them big; letterboxing inside the
   plate is invisible (black crop on ink chip through screen blending) */
.company__chip img {
  height: clamp(88px, 15vh, 150px);
  width: auto;
  max-width: min(74vw, 500px);
  object-fit: contain;
  mix-blend-mode: screen;
  opacity: 0.95;
}
/* the Emerald lockup is square — give it extra height to read equal */
.company__house[data-house="0"] .company__chip img { height: clamp(120px, 20vh, 190px); }
.company__stitchline { display: none; }

/* pin mode (JS adds .company--pin on desktop) */
.company--pin .company__pin { height: 100dvh; position: relative; }
.company--pin .company__stage { position: relative; height: 100%; max-width: none; display: block; }
.company--pin .company__house {
  position: absolute; inset: 0;
  opacity: 0;
  will-change: opacity;
  justify-content: center;
  padding: 0 var(--pad-x) 0 max(var(--pad-x), calc((100vw - 1200px) / 2));
}
.company--pin .company__ghost { right: clamp(10px, 4vw, 90px); }
.company--pin .company__stitchline {
  display: block;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: clamp(34px, 7vh, 70px);
  width: min(46vw, 320px);
  height: 1px;
  background: var(--line-strong);
}
.company--pin .company__stitchline i {
  display: block;
  height: 100%;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

.company__note {
  display: block;
  max-width: 1200px;
  margin: clamp(36px, 5vh, 60px) auto 0;
  color: color-mix(in srgb, var(--text-muted) 78%, transparent);
}

/* ---------- 05 beyond ---------- */
.beyond { background: var(--bg); }
.beyond__lines { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: clamp(10px, 2vh, 24px); }
.beyond__line { line-height: 1.08; }
.beyond__line:nth-child(2) { margin-left: clamp(24px, 10vw, 180px); }
.beyond__line:nth-child(3) { margin-left: clamp(48px, 20vw, 360px); }
.beyond__line:nth-child(4) { margin-left: clamp(12px, 5vw, 90px); }
.beyond__stats {
  max-width: 1200px;
  margin: clamp(80px, 12vh, 140px) auto 0;
  display: flex; flex-wrap: wrap;
  gap: clamp(40px, 7vw, 110px);
  border-top: 1px solid var(--line);
  padding-top: clamp(36px, 5vh, 60px);
}
.stat { display: flex; flex-direction: column; gap: 8px; }
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5.4rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat__plus { display: none; }
.stat__num::after { content: ""; }
.stat:first-child .stat__num::after { content: "+"; color: var(--red-text); }

/* ---------- finale: the film inside the mark ---------- */
.finale { background: var(--bg); }
.finale__pin { position: relative; }
.finale canvas { display: none; }
.finale__static { display: block; width: 100%; height: auto; }

/* pin mode (JS adds .finale--pin on desktop) */
.finale--pin .finale__pin { height: 100dvh; overflow: hidden; }
.finale--pin canvas { display: block; width: 100%; height: 100%; }
.finale--pin .finale__static { display: none; }

/* ---------- contact + footer ---------- */
.contact {
  min-height: 100dvh;
  display: flex; flex-direction: column;
  justify-content: space-between;
  background: var(--bg);
  padding-bottom: 0;
}
.contact__inner {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  gap: clamp(22px, 4vh, 38px);
  padding-top: clamp(40px, 8vh, 90px);
}
.contact__cta {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: var(--red);
  color: #FFF7F4;
  border-radius: 2px;
  padding: 18px 54px;
  margin-top: clamp(10px, 2vh, 22px);
  transition: transform 0.18s var(--ease), background 0.18s var(--ease);
}
.contact__cta:hover { transform: translateY(-1px); background: #C41B1D; }
.contact__cta:active { transform: scale(0.98); }

.footer {
  margin-top: clamp(80px, 12vh, 140px);
  border-top: 1px solid var(--line);
  padding: clamp(40px, 6vh, 64px) 0 clamp(28px, 4vh, 44px);
  display: flex; flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.footer__brand { display: flex; align-items: baseline; gap: 8px; }
.lockup--footer { width: 74px; height: auto; }
.footer__sub {
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
}
.footer__line { color: var(--text-muted); font-size: 14px; }
.footer__meta { letter-spacing: 0.12em; }
.footer__tag { color: color-mix(in srgb, var(--text-muted) 62%, transparent); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .heritage__grid { grid-template-columns: repeat(6, 1fr); }
  .heritage__fig--a { grid-column: 1 / span 6; }
  .heritage__copy { grid-column: 1 / span 6; max-width: 60ch; }
  .heritage__fig--b { grid-column: 1 / span 3; margin-top: 0; }
  .heritage__fig--c { grid-column: 4 / span 3; margin-top: clamp(24px, 6vh, 48px); }
  .heritage__note { grid-column: 1 / span 6; }
  .craft__frame img { width: 100%; }
  .craft__frame figcaption { position: static; text-align: left; margin-top: 16px; }
}
@media (max-width: 768px) {
  .thread-seg path { stroke-width: 2; }
  .finale { padding: 0; }

  /* hero: content sits low so the film itself is visible */
  .hero { justify-content: flex-end; }
  .hero__content { padding-bottom: 15vh; }
  .hero__hint { display: none; }
  .lockup--hero { width: min(56vw, 280px); }
  .lockup__hotel--hero { font-size: 13px; margin-top: 10px; }
  .hero__line { font-size: clamp(1.1rem, 4.6vw, 1.4rem); margin-top: 20px; }
  .hero__eyebrow { font-size: 10px; }

  /* pinned experiences, phone-sized */
  .craft--scrub .craft__caption { max-width: 78vw; bottom: 34px; }
  .craft--scrub .craft__caption p { font-size: clamp(1.3rem, 6vw, 1.6rem); }
  .project--pin .project__panel--title { width: 80vw; }
  .project--pin .project__track { gap: 30px; }
  .project--pin .project__panel--img img { height: 46vh; }
  .project--pin .project__panel--tall img { height: 55vh; }
  .project--pin .project__panel--close { max-width: 80vw; padding-right: 12vw; }
}
@media (max-width: 560px) {
  .lockup--nav { width: 52px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero__hint i { animation: none; }
  .drift__line { animation: none; }
  [data-reveal].rv-init { opacity: 1; transform: none; }
  .loader, .loader__panel, .loader__meta { transition: none; }
}
