/* Effective Intelligence : scroll cinema
   Canvas is black, orange is the light source, bone is the type.
   Scenes are sticky stages driven by a per-scene progress variable --p (0 to 1),
   which main.js damps so the motion eases into and out of a stop.

   Everything below is tokenised. If a value is not in :root it does not belong
   in a rule: that is what kept the first version from reading as a system. */
@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@0,6..96,400;0,6..96,700;0,6..96,900;1,6..96,500;1,6..96,700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* colour */
  --orange: #ff4a00;
  --orange-rgb: 255 74 0;
  --ink: #060504;
  --ink-rgb: 6 5 4;
  --bone: #f5f0e8;
  --bone-dim: #b3aa9c;
  --line: rgb(245 240 232 / 0.14);

  /* type faces */
  --display: "Bodoni Moda", "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  /* display scale, 1.25 ratio. Large sizes get negative tracking, tight leading. */
  --d1: clamp(3.25rem, 12vw, 10rem);      /* the rupture word */
  --d2: clamp(2.75rem, 7.5vw, 6.4rem);    /* hero, portal */
  --d3: clamp(2.1rem, 5.2vw, 4.2rem);     /* grid h2, scores h1, metrics */
  --d4: clamp(1.75rem, 3.6vw, 3rem);      /* section headings */
  --d5: clamp(1.3rem, 2vw, 1.6rem);       /* card headings */

  /* label scale, tracking rises as size falls */
  --label-lg: 12px;  --track-lg: 0.16em;
  --label-md: 11px;  --track-md: 0.20em;
  --label-sm: 10px;  --track-sm: 0.24em;

  /* body */
  --body: 14.5px;
  --body-sm: 13px;

  /* spacing, 4px base */
  --s2: 8px;  --s3: 12px;  --s4: 16px;  --s5: 24px;
  --s6: 32px; --s7: 48px;  --s8: 64px;  --s9: 96px; --s10: 128px;
  --section-y: var(--s10);

  /* radii, two only */
  --r-chip: 2px;
  --r-panel: 4px;

  /* motion */
  --t-fast: 140ms;
  --t-base: 240ms;
  --t-slow: 380ms;
  --t-reveal: 640ms;
  --ease-out: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-expo: cubic-bezier(0.22, 1, 0.36, 1);

  --maxw: 1180px;
  --p: 0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--ink); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--mono);
  font-size: var(--body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* grain: plain opacity, not a blend pass, so it does not force a full viewport
   re-composite on every frame */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 200;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--s5); }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: var(--r-chip);
}
#sleep :focus-visible, .portal :focus-visible { outline-color: var(--ink); }

.mono-label {
  font-family: var(--mono); font-size: var(--label-md); letter-spacing: var(--track-md);
  text-transform: uppercase; color: var(--orange);
}

/* shared display recipes so headings cannot drift apart again */
.h-hero { font-family: var(--display); font-weight: 900; text-transform: uppercase;
  font-size: var(--d2); line-height: 0.88; letter-spacing: -0.035em; }
.h-mid  { font-family: var(--display); font-weight: 900; text-transform: uppercase;
  font-size: var(--d3); line-height: 0.9; letter-spacing: -0.03em; }
.h-section { font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: var(--d4); line-height: 0.95; letter-spacing: -0.025em; }

/* ---------------- nav ---------------- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 120;
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s3) var(--s5);
  background: rgb(var(--ink-rgb) / 0.62);
  backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid var(--line);
}
nav .brand { display: flex; align-items: center; gap: 11px; }
nav .brand img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
nav .brand b { font-family: var(--display); font-weight: 700; font-size: 16px; }
nav .links { display: flex; gap: var(--s5); align-items: center; }
nav .links a {
  font-size: var(--label-md); letter-spacing: var(--track-md); text-transform: uppercase;
  color: var(--bone-dim); transition: color var(--t-fast) var(--ease-out);
}
nav .links a:hover { color: var(--orange); }
nav .links a[aria-current] { color: var(--bone); }
nav .cta {
  background: var(--orange); color: var(--ink); padding: 9px 15px; border-radius: var(--r-chip);
  font-weight: 600; font-size: var(--label-md); letter-spacing: 0.18em; text-transform: uppercase;
  transition: transform var(--t-fast) var(--ease-expo);
}
nav .cta:hover { transform: scale(1.03); }
nav .cta:active { transform: scale(0.98); }
/* on the orange scenes the translucent bar turns muddy: go solid ink instead */
body.on-orange nav { background: var(--ink); }

/* ---------------- scene scaffold ---------------- */
.scene { position: relative; }
.stage {
  position: sticky; top: 0; height: 100vh; width: 100%;
  overflow: hidden; display: grid; place-items: center;
}
.layer {
  position: absolute; inset: -12% -6%;
  width: 112%; height: 124%;
  max-width: none; /* the global img cap would pin layers to the stage width */
  object-fit: cover;
  mix-blend-mode: screen;
  pointer-events: none;
}
.scene.active .layer, .scene.active .tcard { will-change: transform; }

/* Global veil only. The heavy radial used to sit exactly on each scene's focal
   point and kill the art, so the darkening now travels with the copy instead. */
.stage::after {
  content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background: linear-gradient(rgb(var(--ink-rgb) / 0.5), rgb(var(--ink-rgb) / 0.12) 45%, rgb(var(--ink-rgb) / 0.68));
}
#sleep .stage::after { display: none; }

.stage-content { position: relative; z-index: 5; text-align: center; padding: 0 var(--s5); }
/* local plate: protects the copy without touching the artwork around it */
.stage-content::before {
  content: ""; position: absolute; inset: -12% -10%; z-index: -1; pointer-events: none;
  background: radial-gradient(72% 62% at 50% 50%,
    rgb(var(--ink-rgb) / 0.94), rgb(var(--ink-rgb) / 0.78) 52%, rgb(var(--ink-rgb) / 0) 86%);
}
#sleep .stage-content::before { display: none; }

/* ---------------- scene 1 : the tower ---------------- */
#tower { height: 240vh; }
#tower .stage { background: radial-gradient(120% 80% at 50% 8%, rgb(var(--orange-rgb) / 0.16), transparent 60%), var(--ink); }
.hero-title { font-family: var(--display); font-weight: 900; text-transform: uppercase;
  font-size: var(--d2); line-height: 0.88; letter-spacing: -0.035em; }
.hero-title em { font-style: italic; color: var(--orange); font-weight: 700; }
.hero-sub { max-width: 46ch; margin: var(--s5) auto var(--s6); color: var(--bone-dim); font-size: var(--body); }
.actions { display: flex; gap: var(--s3); justify-content: center; flex-wrap: wrap; }

/* second beat: the scene used to run 140vh with nothing on screen at all */
.tower-beat {
  position: absolute; z-index: 6; left: 50%; top: 50%; width: min(760px, 88vw);
  transform: translate(-50%, -50%);
  font-family: var(--display); font-style: italic; font-weight: 500;
  font-size: clamp(1.5rem, 3.6vw, 2.9rem); line-height: 1.16; letter-spacing: -0.02em;
  color: var(--bone); text-align: center;
  opacity: 0; pointer-events: none;
}
.tower-beat b { color: var(--orange); font-weight: 500; font-style: normal; }

.btn-primary {
  background: var(--orange); color: var(--ink); font-weight: 600; padding: 13px 22px;
  border-radius: var(--r-chip); text-transform: uppercase; letter-spacing: 0.18em;
  font-size: var(--label-md); transition: transform var(--t-fast) var(--ease-expo);
}
.btn-primary:hover { transform: scale(1.03); }
.btn-primary:active { transform: scale(0.98); }
.btn-ghost {
  border: 1px solid var(--line); color: var(--bone); padding: 13px 20px; border-radius: var(--r-chip);
  text-transform: uppercase; letter-spacing: 0.18em; font-size: var(--label-md);
  transition: border-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
}
.btn-ghost:hover { border-color: var(--orange); color: var(--orange); }

.scroll-hint {
  position: absolute; bottom: var(--s6); left: 0; right: 0; text-align: center;
  font-size: var(--label-sm); letter-spacing: var(--track-sm); text-transform: uppercase;
  color: var(--bone-dim); z-index: 6;
}
.scroll-hint::after {
  content: ""; display: block; width: 1px; height: 30px; margin: var(--s2) auto 0;
  background: linear-gradient(var(--orange), transparent);
  animation: drop 1.9s ease-in-out infinite;
}
@keyframes drop { 0%,100% { opacity: 0.2; transform: scaleY(0.4); transform-origin: top; } 50% { opacity: 1; transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .scroll-hint::after { animation: none; opacity: 0.6; } }

/* JS owns only this custom property, never the transform channel itself,
   so an element can still compose its own centring transform */
[data-fade] { transform: translate3d(0, var(--fade-y, 0px), 0); }

/* ---------------- terminal ---------------- */
.term {
  margin: var(--s6) auto 0; border: 1px solid var(--line); border-radius: var(--r-panel);
  background: rgb(var(--ink-rgb) / 0.82); overflow: hidden; max-width: 520px; text-align: left;
  backdrop-filter: blur(6px);
}
.term-bar { display: flex; align-items: center; gap: 6px; padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line); }
.term-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); opacity: 0.7; }
.term-bar span { margin-left: var(--s2); font-size: var(--label-sm); letter-spacing: var(--track-sm); text-transform: uppercase; color: var(--bone-dim); }
.term-body { padding: var(--s3); font-size: var(--body-sm); display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.term-body code { color: var(--bone); }
.term-body code b { color: var(--orange); font-weight: 400; }
.copy-btn {
  background: none; border: 1px solid var(--line); color: var(--bone-dim); cursor: pointer;
  padding: 6px 10px; border-radius: var(--r-chip); font-family: var(--mono);
  font-size: var(--label-sm); letter-spacing: var(--track-sm);
  transition: border-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
}
.copy-btn:hover { border-color: var(--orange); color: var(--orange); }
.copy-btn.done { border-color: var(--orange); color: var(--orange); }

/* ---------------- scene 2 : the sleep ---------------- */
#sleep { height: 200vh; }
#sleep .stage { background: var(--orange); color: var(--ink); }
#sleep .eye {
  position: absolute; width: min(78vh, 88vw); aspect-ratio: 1; border-radius: 50%;
  object-fit: cover; mix-blend-mode: multiply; opacity: 0.85;
}
/* no blend on the word: multiply drew a visible rectangular seam across it */
.sleep-word {
  font-family: var(--display); font-weight: 900; text-transform: uppercase;
  font-size: var(--d1); line-height: 0.84; letter-spacing: -0.035em;
  position: relative; z-index: 6; color: var(--ink);
}
.sleep-note {
  position: relative; z-index: 6; margin-top: var(--s5); max-width: 40ch; margin-inline: auto;
  font-size: var(--body-sm); color: rgb(var(--ink-rgb) / 0.92);
}

/* ---------------- generic block ---------------- */
.block { padding: var(--section-y) 0; position: relative; }
/* the fixed bar used to slice the top of every section heading */
.block, .scene { scroll-margin-top: 72px; }
.sec-head { display: flex; align-items: baseline; gap: var(--s4); margin-bottom: var(--s7); flex-wrap: wrap; }
.sec-head .num { font-family: var(--mono); color: var(--orange); font-size: var(--label-lg); letter-spacing: var(--track-lg); }
.sec-head h2 { font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: var(--d4); line-height: 0.95; letter-spacing: -0.025em; }
.sec-head p { color: var(--bone-dim); max-width: 44ch; font-size: var(--body); }

.reveal { transition: opacity var(--t-reveal) var(--ease-out), transform var(--t-reveal) var(--ease-expo); }
html.js .reveal { opacity: 0; transform: translateY(26px); }
html.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; }
}

/* ---------------- scene 3 : the work ---------------- */
#work { position: relative; overflow: hidden; }
#work .bg {
  position: absolute; inset: -10% -4%; width: 108%; height: 120%; max-width: none;
  object-fit: cover; opacity: 0.42; mix-blend-mode: screen;
  /* the artwork used to end on a hard rectangular edge mid section */
  mask-image: radial-gradient(120% 80% at 50% 40%, #000 45%, transparent 88%);
  -webkit-mask-image: radial-gradient(120% 80% at 50% 40%, #000 45%, transparent 88%);
}
#work .wrap { position: relative; z-index: 3; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.feat {
  background: rgb(var(--ink-rgb) / 0.88); padding: var(--s6) var(--s5);
  transition: background var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out);
  backdrop-filter: blur(3px);
}
.feat:hover { background: rgb(var(--ink-rgb) / 0.94); box-shadow: inset 0 0 0 1px rgb(var(--orange-rgb) / 0.18); }
.feat .num { font-family: var(--mono); font-size: var(--label-md); color: var(--orange); letter-spacing: var(--track-md); }
.feat h3 { font-family: var(--display); font-weight: 700; font-size: var(--d5); text-transform: uppercase; margin: var(--s3) 0 var(--s2); line-height: 1.08; letter-spacing: -0.015em; }
.feat p { color: var(--bone-dim); font-size: var(--body-sm); }
/* staggered entrance: one card at a time, not six at once */
html.js .features .feat { opacity: 0; transform: translateY(22px);
  transition: opacity var(--t-reveal) var(--ease-out), transform var(--t-reveal) var(--ease-expo);
  transition-delay: calc(var(--i, 0) * 70ms); }
html.js .features.in .feat { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html.js .features .feat { opacity: 1; transform: none; transition-delay: 0ms; } }
@media (max-width: 880px) { .features { grid-template-columns: 1fr; } }

/* ---------------- scene 4 : the arcana ---------------- */
#arcana { height: 260vh; }
#arcana .stage { background: var(--ink); }
.spread { position: relative; width: min(1100px, 92vw); height: min(62vh, 520px);
  transform: translateY(-11%); z-index: 5; }
.spread .tcard {
  position: absolute; top: 50%; left: 50%; width: clamp(126px, 13.5vw, 196px);
  aspect-ratio: 3/4; border-radius: var(--r-panel); overflow: hidden;
  border: 1px solid rgb(var(--orange-rgb) / 0.35);
  box-shadow: 0 24px 60px rgb(var(--ink-rgb) / 0.75);
  transform-origin: center bottom;
  background: var(--ink);
  /* the centring lives in CSS so the scene survives reduced motion and no JS */
  transform: translate3d(calc(-50% + var(--tx, 0px)), calc(-50% + var(--ty, 0px)), 0) rotate(var(--trot, 0deg));
  transition: box-shadow var(--t-slow) var(--ease-out), border-color var(--t-slow) var(--ease-out);
}
.spread .tcard:hover {
  box-shadow: 0 30px 80px rgb(var(--ink-rgb) / 0.85), 0 0 64px rgb(var(--orange-rgb) / 0.28);
  border-color: rgb(var(--orange-rgb) / 0.85);
  z-index: 20 !important;
}
.spread .tcard img { width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--t-slow) var(--ease-expo), filter var(--t-slow) var(--ease-out); }
.spread .tcard:hover img { transform: scale(1.05); filter: brightness(1.3) saturate(1.06); }
.spread .tcard figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: var(--s5) var(--s2) var(--s2);
  background: linear-gradient(to top, rgb(var(--ink-rgb) / 0.95), transparent);
  font-size: var(--label-sm); letter-spacing: var(--track-sm); text-transform: uppercase;
  text-align: center; color: var(--bone);
  opacity: 0; transform: translateY(6px);
  transition: opacity var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-expo);
}
.spread .tcard:hover figcaption { opacity: 1; transform: none; }
.arcana-caption { position: absolute; left: 50%; bottom: 6vh; transform: translateX(-50%);
  text-align: center; z-index: 8; width: min(560px, 88vw); }
.arcana-caption h2 { font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: var(--d4); line-height: 0.95; letter-spacing: -0.025em; }
.arcana-caption p { color: var(--bone-dim); font-size: var(--body-sm); margin-top: var(--s3); }
/* static fan for reduced motion and no JS: the scene must still read */
@media (prefers-reduced-motion: reduce) {
  .spread .tcard { --tx: calc((var(--i) - 3) * 132px); --trot: calc((var(--i) - 3) * 7deg);
    --ty: calc(abs(var(--i) - 3) * 14px); }
}
html:not(.js) .spread .tcard { --tx: calc((var(--i) - 3) * 132px); --trot: calc((var(--i) - 3) * 7deg); }

/* ---------------- scene 5 : the myth ---------------- */
#myth { overflow: hidden; }
.myth-rail { display: flex; gap: var(--s5);
  padding-left: max(var(--s5), calc((100vw - var(--maxw)) / 2 + var(--s5)));
  padding-right: var(--s5); }
.myth-rail figure { flex: 0 0 auto; width: min(360px, 72vw); }
.myth-rail img { width: 100%; aspect-ratio: 1; object-fit: cover;
  border: 1px solid var(--line); border-radius: var(--r-panel);
  /* two of the four masters ship on cream paper: unify them to the black field */
  filter: brightness(0.92) contrast(1.06);
  transition: border-color var(--t-base) var(--ease-out), filter var(--t-base) var(--ease-out); }
.myth-rail figure:hover img { border-color: rgb(var(--orange-rgb) / 0.5); filter: brightness(1.02) contrast(1.08); }
.myth-rail figcaption { margin-top: var(--s3); font-size: var(--body-sm); color: var(--bone-dim); }
.myth-rail figcaption b { color: var(--orange); font-weight: 500; display: block;
  font-family: var(--mono); font-size: var(--label-md); letter-spacing: var(--track-md);
  text-transform: uppercase; margin-bottom: 5px; }

/* ---------------- scene 6 : the grid ---------------- */
#grid-scene { height: 220vh; }
#grid-scene .stage { background: var(--ink); }
.metrics { display: flex; gap: clamp(var(--s5), 6vw, 80px); justify-content: center; flex-wrap: wrap; margin-top: var(--s6); }
.metric { text-align: center; }
.metric b { display: block; font-family: var(--display); font-weight: 900; color: var(--orange);
  font-size: var(--d3); line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.metric span { font-size: var(--label-md); letter-spacing: var(--track-md); text-transform: uppercase; color: #c9c0b2; }

/* ---------------- scene 7 : portal ---------------- */
.portal { position: relative; padding: var(--section-y) 0 var(--s9); text-align: center; overflow: hidden; background: var(--orange); color: var(--ink); }
/* the asset now carries real alpha, so no blend mode and no plate rectangle */
.portal .mascot {
  position: absolute; right: 4%; bottom: 0; height: 90%; width: auto; pointer-events: none;
}
html.js .portal .mascot {
  opacity: 0; transform: translate3d(40px, 0, 0);
  transition: transform 900ms var(--ease-expo), opacity var(--t-slow) var(--ease-out);
}
html.js .portal.in .mascot { opacity: 1; transform: none; }
.portal h2 { font-family: var(--display); font-weight: 900; font-size: var(--d2);
  text-transform: uppercase; letter-spacing: -0.035em; line-height: 0.9; position: relative; }
.portal p { max-width: 46ch; margin: var(--s4) auto var(--s6); font-size: var(--body); position: relative; }
.portal .btn-primary { background: var(--ink); color: var(--orange); }
.portal .term { background: rgb(var(--ink-rgb) / 0.92); border-color: rgb(var(--ink-rgb) / 0.3); }
.portal .term-body code { color: var(--bone); }
/* staged entrance: the conversion moment used to be the most static block */
html.js .portal .stagger { opacity: 0; transform: translateY(20px);
  transition: opacity var(--t-reveal) var(--ease-out), transform var(--t-reveal) var(--ease-expo); }
html.js .portal.in .stagger { opacity: 1; transform: none; }
html.js .portal .stagger:nth-child(1) { transition-delay: 0ms; }
html.js .portal .stagger:nth-child(2) { transition-delay: 70ms; }
html.js .portal .stagger:nth-child(3) { transition-delay: 140ms; }
html.js .portal .stagger:nth-child(4) { transition-delay: 210ms; }
html.js .portal .stagger:nth-child(5) { transition-delay: 280ms; }
@media (prefers-reduced-motion: reduce) {
  html.js .portal .stagger { opacity: 1; transform: none; transition-delay: 0ms; }
  html.js .portal .mascot { opacity: 1; transform: none; }
}
@media (max-width: 780px) { .portal .mascot, html.js .portal.in .mascot { opacity: 0.16; } }

/* ---------------- marquee ---------------- */
.marquee { --marquee-dur: 36s; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--orange); color: var(--ink); overflow: hidden; white-space: nowrap; }
.marquee-track { display: inline-flex; animation: scroll var(--marquee-dur) linear infinite; }
.marquee-track span { font-family: var(--display); font-weight: 700; font-style: italic;
  font-size: 30px; padding: var(--s4) var(--s6); text-transform: uppercase; }
.marquee-track span::after { content: "✦"; margin-left: var(--s6); font-style: normal; opacity: 0.45; }
@keyframes scroll { to { transform: translateX(-50%); } }
@media (max-width: 700px) { .marquee { --marquee-dur: 22s; } .marquee-track span { font-size: 21px; padding: var(--s3) var(--s5); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ---------------- footer ---------------- */
footer { padding: var(--s8) 0 var(--s7); border-top: 1px solid var(--line); }
footer .grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: var(--s6); margin-bottom: var(--s6); }
footer h4 { font-family: var(--mono); font-size: var(--label-md); letter-spacing: var(--track-md); text-transform: uppercase; color: var(--orange); margin-bottom: var(--s3); }
footer a { display: block; color: var(--bone-dim); font-size: var(--body-sm); padding: 3px 0; transition: color var(--t-fast) var(--ease-out); }
footer a:hover { color: var(--orange); }
footer p { color: var(--bone-dim); font-size: var(--body-sm); max-width: 34ch; }
footer .stamp { display: flex; align-items: center; justify-content: space-between; padding-top: var(--s5); border-top: 1px solid var(--line); flex-wrap: wrap; gap: var(--s3); }
footer .stamp img { width: 38px; height: 38px; border-radius: 50%; }
footer .stamp .ver { font-family: var(--mono); font-size: var(--label-sm); color: var(--bone-dim); letter-spacing: var(--track-sm); }
@media (max-width: 780px) { footer .grid { grid-template-columns: 1fr 1fr; } }

/* ---------------- scores page ---------------- */
.scores-hero { padding: calc(var(--s10) + var(--s2)) 0 var(--s6); position: relative; }
.scores-hero h1 { font-family: var(--display); font-weight: 900; font-size: var(--d3);
  text-transform: uppercase; letter-spacing: -0.03em; line-height: 0.94; }
.scores-hero p { color: var(--bone-dim); max-width: 78ch; margin-top: var(--s4); font-size: var(--body); }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-panel); margin: var(--s6) 0 var(--s5); }
table.scores { width: 100%; border-collapse: collapse; font-size: var(--body-sm); min-width: 660px; }
table.scores th { text-align: left; padding: var(--s3) var(--s4); font-family: var(--mono);
  font-size: var(--label-sm); letter-spacing: var(--track-sm); text-transform: uppercase;
  color: var(--orange); border-bottom: 1px solid var(--line); }
table.scores td { padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
table.scores tr { transition: background var(--t-fast) var(--ease-out); }
table.scores tr:hover td { background: rgb(var(--orange-rgb) / 0.06); }
table.scores .name { font-family: var(--display); font-size: 15px; }
.tier { display: inline-block; width: 22px; height: 22px; line-height: 22px; text-align: center;
  border-radius: var(--r-chip); font-family: var(--mono); font-weight: 600; font-size: var(--label-md); }
.tier-A { background: var(--orange); color: var(--ink); }
.tier-B { background: rgb(var(--orange-rgb) / 0.5); color: var(--bone); }
.tier-C { background: rgb(var(--orange-rgb) / 0.22); color: var(--bone); }
.tier-D { background: rgb(245 240 232 / 0.09); color: var(--bone-dim); }
.usd { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.usd.pos { color: var(--orange); }
.contends { font-family: var(--mono); font-size: var(--label-md); color: var(--bone-dim); letter-spacing: 0.08em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------- mobile ---------------- */
@media (max-width: 780px) {
  /* the nav used to delete four of five links and replace them with nothing */
  nav { padding: 10px var(--s4); }
  nav .brand b { display: none; }
  nav .links { gap: var(--s4); overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  nav .links::-webkit-scrollbar { display: none; }
  nav .links a { white-space: nowrap; font-size: var(--label-sm); letter-spacing: 0.14em; }
}
@media (max-width: 700px) {
  :root { --section-y: var(--s8); }
  #tower { height: 200vh; }
  #arcana { height: 210vh; }
  #sleep, #grid-scene { height: 170vh; }
  .layer { inset: -8% -4%; width: 108%; height: 116%; }
  /* copy must win over the brightest layers on a small screen */
  .stage-content::before { inset: -16% -14%;
    background: radial-gradient(80% 66% at 50% 50%,
      rgb(var(--ink-rgb) / 0.96), rgb(var(--ink-rgb) / 0.84) 58%, rgb(var(--ink-rgb) / 0) 92%); }
  .metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); }
  .metric span { font-size: 9px; letter-spacing: 0.12em; line-height: 1.3; }
  .term-body { flex-wrap: wrap; }
}
