/* ==========================================================================
   Anchor Point — design system
   Shared by every page: tokens, type, buttons, the HUD header, footer,
   forms, dialogs and the inner-page layouts. Homepage sections live in
   ap-home.css.

   The palette is the game's own UI identity (GDD §8.1): deep navy panels,
   snow-white type, frost-blue secondary text and the quality-tier glows —
   plus the logo's red for anything you can press.
   ========================================================================== */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("/assets/fonts/archivo-var-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("/assets/fonts/archivo-var-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/instrument-serif-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/instrument-serif-italic-latin.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono-var-latin.woff2") format("woff2");
}

:root {
  /* surfaces */
  --ink-0: #04070b;
  --ink-1: #070d15;
  --ink-2: #0d1b2e;          /* game: Midnight */
  --navy: #1b2a4a;           /* game: Deep Navy */
  --navy-2: #22355c;
  --glass: rgba(13, 27, 46, .58);
  --glass-strong: rgba(9, 18, 31, .84);
  --line: rgba(240, 242, 245, .12);
  --line-strong: rgba(240, 242, 245, .24);

  /* type colours */
  --snow: #f0f2f5;           /* game: Snow White */
  --white: #ffffff;
  --frost: #8b9dc3;          /* game: Frost Blue */
  --mist: #b9c4d8;
  --dim: #6c7a96;

  /* brand + accents */
  --red: #e3171a;            /* the wordmark */
  --red-hot: #fb3030;        /* the studio mark */
  --red-deep: #a80e10;
  --amber: #ffb547;          /* wheelhouse lamps */
  --brass: #c9a66b;
  --sea: #3b8ea5;
  --kelp: #7fae5c;

  /* the field-guide paper */
  --paper: #efe6d2;
  --paper-2: #e6dbc2;
  --paper-ink: #24221d;
  --paper-dim: #6f6656;
  --paper-line: rgba(36, 34, 29, .16);

  /* quality tiers (game: Quality Glow) */
  --q-normal: #a9b4c6;
  --q-bronze: #cd7f32;
  --q-silver: #c0c0c0;
  --q-gold: #ffd700;
  --q-diamond: #b9f2ff;
  --q-legendary: #ff6eff;

  /* type */
  --f-display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --f-sans: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --fs-hero: clamp(3.4rem, 1.6rem + 6.4vw, 8.6rem);
  --fs-1: clamp(2.9rem, 1.5rem + 5vw, 7.2rem);
  --fs-2: clamp(2.2rem, 1.3rem + 3.2vw, 4.6rem);
  --fs-3: clamp(1.6rem, 1.15rem + 1.6vw, 2.6rem);
  --fs-lede: clamp(1.06rem, .98rem + .38vw, 1.32rem);
  --fs-body: 1rem;
  --fs-small: .875rem;
  --fs-micro: .72rem;

  /* layout */
  --gutter: clamp(18px, 4vw, 56px);
  --max: 1360px;
  --hud-h: 72px;
  --radius: 4px;
  --radius-lg: 14px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --shadow-1: 0 10px 40px -12px rgba(0, 0, 0, .6);
  --shadow-2: 0 30px 90px -20px rgba(0, 0, 0, .75);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--hud-h) + 12px); }
body {
  margin: 0;
  background: var(--ink-0);
  color: var(--snow);
  font-family: var(--f-sans);
  font-size: var(--fs-body);
  font-stretch: 100%;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video, canvas, svg, picture { display: block; max-width: 100%; }
img, video { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, h4, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
::selection { background: var(--red); color: var(--white); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 2px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 200; padding: 10px 16px;
  background: var(--snow); color: var(--ink-0); font-weight: 700; border-radius: var(--radius);
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

/* Lenis smooth scroll */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* film grain over everything — cheap, static, and it ties the generated
   concept art and the live WebGL views into one photographic surface */
.grain {
  pointer-events: none; position: fixed; inset: -50%; z-index: 150; opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  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); }
}

/* ---------- layout ---------- */
.container { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.container--narrow { width: min(100% - 2 * var(--gutter), 860px); margin-inline: auto; }
.section { position: relative; padding-block: clamp(96px, 14vh, 180px); }

/* ---------- type ---------- */
.kicker {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--f-mono); font-size: var(--fs-micro); font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase; color: var(--frost);
}
.kicker::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .6; }
.kicker b { color: var(--snow); font-weight: 600; }
.display {
  font-family: var(--f-display); font-weight: 400; font-size: var(--fs-1);
  line-height: .92; letter-spacing: -.022em; color: var(--white);
  text-wrap: balance;
}
.display em, .title em { font-style: italic; color: var(--mist); }
.title {
  font-family: var(--f-display); font-weight: 400; font-size: var(--fs-2);
  line-height: .98; letter-spacing: -.018em; color: var(--white); text-wrap: balance;
}
.subtitle { font-family: var(--f-display); font-size: var(--fs-3); line-height: 1.05; letter-spacing: -.01em; font-weight: 400; }
.lede { font-size: var(--fs-lede); line-height: 1.55; color: var(--mist); max-width: 62ch; text-wrap: pretty; }
.lede strong { color: var(--snow); font-weight: 600; }
.eyebrow {
  font-family: var(--f-sans); font-stretch: 75%; font-weight: 650; font-size: .8rem;
  letter-spacing: .16em; text-transform: uppercase; color: var(--frost);
}
.mono { font-family: var(--f-mono); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- buttons ---------- */
.btn {
  --bg: transparent; --fg: var(--snow); --bd: var(--line-strong);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 52px; padding: 0 26px;
  background: var(--bg); color: var(--fg); border: 1px solid var(--bd); border-radius: var(--radius);
  font-family: var(--f-sans); font-stretch: 80%; font-weight: 650; font-size: .86rem;
  letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
  transition: transform .4s var(--ease-out), background-color .3s, border-color .3s, color .3s, box-shadow .4s;
}
.btn::after { /* glint sweep */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .28) 48%, transparent 66%);
  transform: translateX(-120%); transition: transform .8s var(--ease-out);
}
.btn:hover::after { transform: translateX(120%); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--red {
  --bg: var(--red); --fg: var(--white); --bd: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 14px 34px -14px rgba(227, 23, 26, .9);
}
.btn--red:hover { --bg: var(--red-hot); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 18px 44px -12px rgba(251, 48, 48, .95); }
.btn--glass {
  --bg: rgba(240, 242, 245, .06); --bd: rgba(240, 242, 245, .26);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.btn--glass:hover { --bg: rgba(240, 242, 245, .14); --bd: rgba(240, 242, 245, .5); }
.btn--ink { --bg: var(--paper-ink); --fg: var(--paper); --bd: transparent; }
.btn--ink:hover { --bg: #000; }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: .74rem; gap: 8px; }
.btn--lg { min-height: 60px; padding: 0 32px; font-size: .92rem; }
.btn .play {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--snow); color: var(--ink-0); margin-left: -8px;
}
.btn .play svg { width: 10px; height: 10px; margin-left: 2px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 10px; color: var(--snow);
  font-family: var(--f-sans); font-stretch: 80%; font-weight: 650; font-size: .82rem;
  letter-spacing: .14em; text-transform: uppercase;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .5s var(--ease-out); padding-bottom: 4px;
}
.link-arrow:hover { background-size: 100% 1px; }
.link-arrow i { font-style: normal; transition: transform .4s var(--ease-out); }
.link-arrow:hover i { transform: translateX(4px); }

/* ---------- chips & tags ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  font-family: var(--f-mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mist);
  background: rgba(4, 7, 11, .32); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red-hot); box-shadow: 0 0 0 0 rgba(251, 48, 48, .6); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(251, 48, 48, .55); } 70% { box-shadow: 0 0 0 9px rgba(251, 48, 48, 0); } 100% { box-shadow: 0 0 0 0 rgba(251, 48, 48, 0); } }
.concept-tag {
  font-family: var(--f-mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(240, 242, 245, .58);
}
.concept-tag::before { content: "◇ "; color: var(--amber); }

/* ---------- glass panel ---------- */
.glass {
  background: linear-gradient(180deg, rgba(27, 42, 74, .5), rgba(13, 27, 46, .62));
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  backdrop-filter: blur(22px) saturate(130%); -webkit-backdrop-filter: blur(22px) saturate(130%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), var(--shadow-2);
}

/* ==========================================================================
   HUD header — the game's perimeter-information layout: brand left, a
   compass tape centre (it turns as you scroll), clock and sound right.
   ========================================================================== */
.hud {
  position: fixed; inset: 0 0 auto; z-index: 100; height: var(--hud-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px;
  padding: 0 var(--gutter);
  transition: background-color .5s, backdrop-filter .5s, border-color .5s, transform .6s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.hud.is-solid {
  background: rgba(4, 7, 11, .62);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--line);
}
.hud.is-hidden { transform: translateY(-100%); }
.hud__left { display: flex; align-items: center; gap: 28px; min-width: 0; }
.hud__brand img { width: 92px; height: auto; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .5)); }
.hud__brand { transition: opacity .5s, visibility .5s; }
.home .hud:not(.is-solid) .hud__brand { opacity: 0; visibility: hidden; }
.hud__nav { display: flex; gap: 22px; }
.hud__nav a {
  position: relative; font-family: var(--f-sans); font-stretch: 78%; font-weight: 600; font-size: .78rem;
  letter-spacing: .15em; text-transform: uppercase; color: var(--mist); padding: 6px 0; transition: color .3s; white-space: nowrap;
}
.hud__nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--red-hot);
  transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease-out);
}
.hud__nav a:hover, .hud__nav a[aria-current="true"] { color: var(--white); }
.hud__nav a:hover::after, .hud__nav a[aria-current="true"]::after { transform: scaleX(1); transform-origin: left; }
.hud__right { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }

.compass {
  position: relative; width: clamp(180px, 22vw, 320px); height: 38px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
}
.compass__tape { position: absolute; left: 50%; top: 0; height: 100%; display: flex; will-change: transform; }
.compass__tick {
  position: relative; width: 12px; flex: none; height: 100%;
  font-family: var(--f-mono); font-size: .62rem; color: var(--frost);
}
.compass__tick::before { content: ""; position: absolute; left: 50%; bottom: 6px; width: 1px; height: 5px; background: rgba(240, 242, 245, .35); }
.compass__tick.is-major::before { height: 9px; background: rgba(240, 242, 245, .7); }
.compass__tick span { position: absolute; left: 50%; top: 3px; transform: translateX(-50%); letter-spacing: .06em; }
.compass__tick.is-cardinal span { color: var(--white); font-weight: 700; }
.compass__tick.is-north span { color: var(--red-hot); }
.compass__needle {
  position: absolute; left: 50%; bottom: 0; width: 0; height: 0; transform: translateX(-50%);
  border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 6px solid var(--amber);
}
.compass__waypoint {
  position: absolute; inset: auto 0 -1px; text-align: center; font-family: var(--f-mono); font-size: .56rem;
  letter-spacing: .2em; text-transform: uppercase; color: var(--amber); opacity: 0;
}

.hud__clock {
  display: inline-flex; align-items: baseline; gap: 8px; font-family: var(--f-mono);
  font-size: .72rem; letter-spacing: .12em; color: var(--frost); text-transform: uppercase; white-space: nowrap;
}
.hud__clock b { font-size: .88rem; color: var(--snow); font-weight: 500; letter-spacing: .04em; }

.sound-toggle {
  position: relative; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--line-strong); color: var(--snow);
  background: rgba(4, 7, 11, .3); transition: border-color .3s, background-color .3s;
}
.sound-toggle:hover { border-color: rgba(240, 242, 245, .6); }
.sound-toggle .spk { width: 20px; height: 20px; }
.sound-toggle .bars { display: none; align-items: flex-end; gap: 2px; height: 14px; }
.sound-toggle[aria-pressed="true"] .spk { display: none; }
.sound-toggle[aria-pressed="true"] .bars { display: flex; }
.sound-toggle[aria-pressed="true"] { border-color: rgba(255, 181, 71, .6); color: var(--amber); }
.sound-toggle .bars i { width: 2px; height: 3px; background: currentColor; border-radius: 1px; transition: height .3s; }
.sound-toggle[aria-pressed="true"] .bars i { animation: eq 1s ease-in-out infinite; }
.sound-toggle[aria-pressed="true"] .bars i:nth-child(2) { animation-delay: -.3s; }
.sound-toggle[aria-pressed="true"] .bars i:nth-child(3) { animation-delay: -.6s; }
.sound-toggle[aria-pressed="true"] .bars i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 14px; } }

.burger { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); position: relative; }
.burger span { position: absolute; left: 13px; right: 13px; height: 1.5px; background: var(--snow); transition: transform .4s var(--ease-out), opacity .3s; }
.burger span:nth-child(1) { top: 17px; } .burger span:nth-child(2) { top: 25px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

.drawer {
  position: fixed; inset: 0; z-index: 99; display: flex; flex-direction: column; justify-content: center; gap: 6px;
  padding: calc(var(--hud-h) + 24px) var(--gutter) 40px;
  background: rgba(4, 7, 11, .94); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  opacity: 0; visibility: hidden; transition: opacity .45s var(--ease-out), visibility .45s;
}
.drawer.is-open { opacity: 1; visibility: visible; }
.drawer a { transform: translateY(16px); opacity: 0; transition: transform .6s var(--ease-out), opacity .6s; }
.drawer a:not(.btn) { font-family: var(--f-display); font-size: clamp(2.2rem, 9vw, 3.4rem); line-height: 1.12; color: var(--white); }
.drawer.is-open a { transform: none; opacity: 1; }
.drawer.is-open a:nth-child(2) { transition-delay: .04s; } .drawer.is-open a:nth-child(3) { transition-delay: .08s; }
.drawer.is-open a:nth-child(4) { transition-delay: .12s; } .drawer.is-open a:nth-child(5) { transition-delay: .16s; }
.drawer.is-open a:nth-child(6) { transition-delay: .2s; } .drawer.is-open a:nth-child(7) { transition-delay: .24s; }
.drawer.is-open a:nth-child(8) { transition-delay: .28s; }
.drawer .btn { margin-top: 28px; align-self: flex-start; }

@media (max-width: 1240px) { .hud__nav { display: none; } }
@media (max-width: 860px) {
  .compass, .hud__clock { display: none; }
  /* Two columns: drop the centre slot (the compass, or an inner page's spacer). */
  .hud > :not(.hud__left):not(.hud__right) { display: none; }
  .hud { grid-template-columns: 1fr auto; }
  .burger { display: block; }
  .hud__right .btn { display: none; }
}

/* ==========================================================================
   Forms — the waitlist
   ========================================================================== */
.signup { display: flex; gap: 10px; flex-wrap: wrap; width: 100%; max-width: 560px; }
.signup__field { position: relative; flex: 1 1 260px; }
.signup input[type="email"] {
  width: 100%; min-height: 60px; padding: 0 18px; border-radius: var(--radius);
  background: rgba(4, 7, 11, .55); border: 1px solid var(--line-strong); color: var(--white);
  font-family: var(--f-mono); font-size: .95rem; letter-spacing: .02em;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: border-color .3s, background-color .3s;
}
.signup input[type="email"]::placeholder { color: var(--dim); }
.signup input[type="email"]:focus { outline: none; border-color: var(--amber); background: rgba(4, 7, 11, .75); }
.signup .btn { flex: 0 0 auto; min-height: 60px; }
.signup__status { min-height: 1.4em; margin-top: 12px; font-family: var(--f-mono); font-size: .8rem; color: var(--amber); }
.signup__status.is-ok { color: #8fe3a4; }
.signup__status.is-err { color: #ff8b8b; }
.signup__fine { margin-top: 10px; font-size: .78rem; color: var(--dim); max-width: 56ch; }
.signup__fine a { text-decoration: underline; text-underline-offset: 3px; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.signup.is-busy .btn { opacity: .6; pointer-events: none; }

/* ==========================================================================
   Dialogs (film, fish plates) — native <dialog>
   ========================================================================== */
dialog {
  padding: 0; border: 0; color: inherit; background: transparent; max-width: none; max-height: none;
}
dialog::backdrop { background: rgba(2, 4, 7, .86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.dialog-close {
  position: absolute; top: 16px; right: 16px; z-index: 3; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(4, 7, 11, .6); border: 1px solid var(--line-strong); color: var(--snow);
  transition: transform .4s var(--ease-out), background-color .3s;
}
.dialog-close:hover { transform: rotate(90deg); background: rgba(4, 7, 11, .9); }
.dialog-close svg { width: 16px; height: 16px; }

.film { width: min(96vw, 1440px); }
.film[open] { animation: rise .6s var(--ease-out); }
.film__frame { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-2); }
.film__frame video { width: 100%; height: 100%; object-fit: cover; }
.film__meta { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 4px 0; }
.film__meta .concept-tag { color: var(--frost); }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   Footer
   ========================================================================== */
.foot { position: relative; background: var(--ink-0); border-top: 1px solid var(--line); padding: 72px 0 36px; overflow: hidden; }
.foot__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 40px; }
.foot__brand { display: flex; flex-direction: column; gap: 22px; }
.foot__brand .ap { width: 200px; }
.foot__studio { display: flex; align-items: center; gap: 14px; color: var(--mist); font-size: .9rem; }
.foot__studio img { width: 52px; height: 52px; }
.foot__studio b { display: block; color: var(--snow); font-family: var(--f-sans); font-stretch: 80%; letter-spacing: .1em; text-transform: uppercase; font-size: .8rem; }
.foot h2 { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); font-weight: 500; margin-bottom: 16px; }
.foot ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.foot li a { color: var(--mist); font-size: .94rem; transition: color .25s; }
.foot li a:hover { color: var(--white); }
.foot__legal {
  margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font-family: var(--f-mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--dim);
}
.foot__legal a { text-decoration: underline; text-underline-offset: 3px; }
.foot__wordmark {
  position: absolute; left: 50%; bottom: -3vw; transform: translateX(-50%); width: 118vw; max-width: none;
  opacity: .035; pointer-events: none; filter: grayscale(1) brightness(3);
}
@media (max-width: 960px) { .foot__grid { grid-template-columns: 1fr 1fr; } .foot__brand { grid-column: 1 / -1; } }

/* ==========================================================================
   Reveal-on-scroll primitives (JS adds .is-in). Without JS everything shows.
   ========================================================================== */
.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out); transition-delay: var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-reveal="fade"] { transform: none; }
.js [data-reveal="left"] { transform: translateX(-30px); }

/* ==========================================================================
   Inner pages — page hero, prose (Journal, tech logs, privacy), cards
   ========================================================================== */
.page-hero {
  position: relative; min-height: clamp(460px, 72vh, 760px); display: flex; align-items: flex-end;
  padding: calc(var(--hud-h) + 60px) 0 clamp(48px, 8vh, 90px); overflow: hidden; isolation: isolate;
}
.page-hero__media { position: absolute; inset: 0; z-index: -2; }
.page-hero__media img, .page-hero__media picture { width: 100%; height: 100%; object-fit: cover; }
.page-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(4, 7, 11, .55) 0%, rgba(4, 7, 11, .15) 35%, rgba(4, 7, 11, .9) 88%, var(--ink-0) 100%);
}
.page-hero .display { margin-top: 18px; font-size: clamp(2.8rem, 1.6rem + 4.6vw, 6.4rem); }
.page-hero .lede { margin-top: 22px; }
.page-hero .concept-tag { position: absolute; right: var(--gutter); bottom: 18px; }
.crumbs { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--frost); }
.crumbs a { color: var(--mist); }
.crumbs a:hover { color: var(--white); }

.prose { font-size: 1.08rem; line-height: 1.78; color: #d6dbe6; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.7rem); line-height: 1.05; color: var(--white); margin-top: 2.2em; letter-spacing: -.01em; }
.prose h3 { font-family: var(--f-sans); font-stretch: 85%; font-size: 1.12rem; letter-spacing: .04em; color: var(--white); margin-top: 1.9em; }
.prose a { color: var(--white); text-decoration: underline; text-decoration-color: var(--red-hot); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose strong { color: var(--white); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--red-hot); }
.prose blockquote { border-left: 2px solid var(--red-hot); padding: .2em 0 .2em 1.2em; font-family: var(--f-display); font-size: 1.5rem; line-height: 1.3; color: var(--white); }
.prose figure { margin-block: 2em; }
.prose figure img { border-radius: 10px; width: 100%; }
.prose figcaption { margin-top: 10px; font-family: var(--f-mono); font-size: .74rem; letter-spacing: .06em; color: var(--dim); }
.prose code { font-family: var(--f-mono); font-size: .88em; background: rgba(240, 242, 245, .08); padding: .1em .4em; border-radius: 3px; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--frost); font-weight: 500; }
.prose hr { border: 0; height: 1px; background: var(--line); margin-block: 2.5em; }

.article-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 22px; font-family: var(--f-mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--frost); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 22px; }
.card {
  position: relative; display: flex; flex-direction: column; min-height: 420px; border-radius: var(--radius-lg); overflow: hidden;
  isolation: isolate; border: 1px solid var(--line); background: var(--ink-1);
  transition: transform .6s var(--ease-out), border-color .4s;
}
.card:hover { transform: translateY(-6px); border-color: var(--line-strong); }
.card__media { position: absolute; inset: 0; z-index: -2; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease-out); }
.card:hover .card__media img { transform: scale(1.06); }
.card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(4, 7, 11, 0) 25%, rgba(4, 7, 11, .94) 92%); }
.card__body { margin-top: auto; padding: 26px; display: grid; gap: 10px; }
.card__body h3 { font-family: var(--f-display); font-weight: 400; font-size: 1.85rem; line-height: 1.04; color: var(--white); }
.card__body p { color: var(--mist); font-size: .95rem; }
.card__go { margin-top: 6px; font-family: var(--f-sans); font-stretch: 80%; font-weight: 650; font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--snow); }

.panel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 18px; }
.panel { padding: 28px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: linear-gradient(180deg, rgba(27, 42, 74, .35), rgba(13, 27, 46, .25)); }
.panel h3 { font-family: var(--f-display); font-weight: 400; font-size: 1.7rem; line-height: 1.05; color: var(--white); margin: 12px 0 10px; }
.panel p { color: var(--mist); font-size: .97rem; }

.cta-band { position: relative; overflow: hidden; isolation: isolate; border-radius: 20px; padding: clamp(36px, 6vw, 80px); border: 1px solid var(--line); }
.cta-band__media { position: absolute; inset: 0; z-index: -2; }
.cta-band__media img { width: 100%; height: 100%; object-fit: cover; }
.cta-band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(4, 7, 11, .92) 20%, rgba(4, 7, 11, .4)); }
.cta-band .title { max-width: 14ch; }
.cta-band .signup { margin-top: 28px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .grain { display: none; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
