/* Extra Perk website, version 3.0 (18.11): "a pearl gamepad on a dark stage".
   After the management feedback on 2.0 and the study of 24 publisher sites (research/publishers/FINDINGS.md):
   a dark neutral base, ONE accent used only for actions and marks, hairlines instead of black outlines,
   soft studio light instead of patterns and grain, calm type, and nothing that moves by itself.
   The interactive gamepad stays: keys press, the plate leans towards the cursor, the arrows nudge it; the screen
   powers on once on load and the pitch key breathes a calm light. The looping animations (arcade pulse, nudging
   arrows, tilting perk cards) are only switched off: html.gp-motion (config.js gamepadMotion) brings them back.
   Chosen in the workshop of drafts/3.0 (accent B blue). Single dark look on purpose. Version 2 is in releases/2.0. */

/* Rubik, served from this site (SIL Open Font License, see assets/fonts/Rubik-OFL.txt).
   One variable file per subset covers every weight from 400 to 900. */
@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/rubik-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/rubik-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;
}

/* ===================================================================== Tokens */

:root {
  color-scheme: dark;

  /* Neutrals: near-black stage, raised surfaces, hairlines */
  --bg-deep: #0A0B0D;      /* hero, final call, footer */
  --bg: #0F1013;           /* page */
  --bg-raise: #131418;     /* alternate band */
  --surface: #16171C;      /* cards */
  --surface-2: #1C1E24;    /* raised / selected cards */
  --surface-3: #25272E;
  --line: rgba(255, 255, 255, 0.075);
  --line-2: rgba(255, 255, 255, 0.13);
  --line-3: rgba(255, 255, 255, 0.22);
  --text: #F3F2EF;
  --text-2: #A9ACB4;       /* 8.4:1 on --bg */
  --text-3: #82858E;       /* 4.9:1 on --bg: labels */
  --h1-dim: #8A8D96;
  --ok: #3FD68A;
  --warn: #E9B44C;
  --error: #FF7466;

  /* The gamepad: pearl plastic, graphite keys */
  --pearl-hi: #FFFFFF;
  --pearl: #ECEDF0;
  --pearl-lo: #D2D4D9;
  --pearl-edge: #A7AAB1;
  --pearl-ink: #2A2C33;
  --key-hi: #3C3F46;
  --key-lo: #141519;
  --key-bezel: #0C0D10;
  --key-side: #050506;

  /* Accent B, electric blue (default). One colour for every action: the pitch key, buttons, links, marks. */
  --accent: #3D5BF5;
  --accent-hi: #5571FF;
  --accent-ink: #FFFFFF;           /* text on the accent (5.2:1) */
  --accent-text: #8FA2FF;          /* the accent as text on dark (7.8:1) */
  --accent-face-hi: #7E94FF;       /* the 3D accent key */
  --accent-face-lo: #2A44D6;
  --accent-bezel: #16236C;
  --accent-side: #0B133F;
  --accent-glow: rgba(77, 107, 255, 0.42);
  --logo-accent: #6E86FF;

  /* Type */
  --font: "Rubik", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-0: 1.0625rem;
  --fs-1: 1.25rem;
  --fs-2: clamp(1.4rem, 1.2rem + 0.8vw, 1.8rem);
  --fs-3: clamp(2.25rem, 1.45rem + 2.7vw, 3.9rem);
  --fs-4: clamp(2.7rem, 1.4rem + 4.6vw, 5.5rem);

  /* Space and shape */
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --wrap: 1240px;
  --section: clamp(4.5rem, 3rem + 4.6vw, 7.5rem);
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ===================================================================== Base */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  background: var(--bg-deep);
  scrollbar-color: #2B2D34 var(--bg-deep);
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-0);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* Paints the phone's top safe area behind the sticky header. */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 60;
  background: var(--bg-deep);
}

::selection { background: color-mix(in srgb, var(--accent) 45%, transparent); color: #fff; }

img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { margin: 0; text-wrap: balance; font-weight: 500; }
p { margin: 0; }

h1, h2 { letter-spacing: -0.032em; }
h1 { font-size: var(--fs-4); line-height: 1.02; }
h2 { font-size: var(--fs-3); line-height: 1.04; }
h3 { font-size: var(--fs-1); line-height: 1.2; letter-spacing: -0.012em; }

a { color: var(--accent-text); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

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

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 32px);
  margin-inline: auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}

.section { padding-block: var(--section); }
.lead { font-size: var(--fs-1); line-height: 1.5; color: var(--text-2); }

/* Small uppercase label: section kickers, card labels, roles */
.kicker, .eyebrow {
  font: 600 var(--fs-xs)/1 var(--font);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: 10px;
}
.skip:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }

.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;
}

/* ===================================================================== Buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  min-height: 52px;
  padding: 0.8em 1.6em;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 500 1rem/1.1 var(--font);
  letter-spacing: 0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 120ms ease;
}
.btn:hover { text-decoration: none; }
/* The action: the only filled colour on the screen */
.btn-pitch {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 10px 26px -12px var(--accent-glow);
}
.btn-pitch:hover { background: var(--accent-hi); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26), 0 14px 32px -12px var(--accent-glow); }
.btn-pitch:active, .btn-pitch.is-down { transform: translateY(1px); }
/* Secondary: hairline on dark */
.btn-plain { background: transparent; color: var(--text); border-color: var(--line-3); }
.btn-plain:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.34); }
.btn-ink { background: rgba(255, 255, 255, 0.06); color: var(--text); border-color: var(--line-2); }
.btn-ink:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--line-3); }
.btn-down svg { width: 1.1em; height: 1.1em; }
.btn-sm { min-height: 40px; padding: 0.55em 1.15em; font-size: 0.94rem; }
.btn-big { min-height: 56px; padding-inline: 2em; font-size: 1.06rem; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ===================================================================== Header */

.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: color-mix(in srgb, var(--bg-deep) 80%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(18px);
  backdrop-filter: saturate(1.4) blur(18px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; flex: none; color: var(--text); }
.brand:focus-visible { outline-offset: 6px; }

/* The logo is inline SVG so its fifth key takes the accent: four keys and the wordmark in the text colour. */
.logo { display: block; height: 28px; width: auto; color: inherit; overflow: visible; }
.logo .lk { fill: currentColor; }
.logo .la-ring { fill: none; stroke: var(--logo-accent); }
.logo .la-dot { fill: var(--logo-accent); }
.brand .logo-mark { display: none; height: 26px; }

.site-nav { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 28px); }
.nav-menu { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 28px); margin: 0; padding: 0; list-style: none; }
.site-nav a:not(.btn), .nav-toggle {
  position: relative;
  color: var(--text-2);
  text-decoration: none;
  font: 500 0.95rem/1.2 var(--font);
  padding: 6px 2px;
  transition: color 160ms ease;
}
.site-nav a:not(.btn):hover, .nav-toggle:hover, .nav-toggle[aria-expanded="true"] { color: var(--text); }
.site-nav a:not(.btn)[aria-current="page"] { color: var(--text); }
.site-nav .nav-menu a:not(.btn)[aria-current="page"]::after {
  content: ""; position: absolute; left: 50%; bottom: -4px; translate: -50% 0;
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent-text);
}
.label-short { display: none; }
.nav-toggle { display: none; align-items: center; gap: 9px; min-height: 40px; background: none; border: 0; cursor: pointer; }
.nav-toggle::before {
  content: ""; width: 18px; height: 11px;
  background: linear-gradient(currentColor 0 0) top / 100% 1.5px no-repeat,
              linear-gradient(currentColor 0 0) center / 100% 1.5px no-repeat,
              linear-gradient(currentColor 0 0) bottom / 100% 1.5px no-repeat;
}
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 6px max(16px, env(safe-area-inset-right, 0px)) 14px max(16px, env(safe-area-inset-left, 0px));
    /* Solid: a blur inside the blurred header doesn't reach the page, so a see-through menu would show the text below */
    background: var(--bg-deep);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -20px rgba(0, 0, 0, 0.8);
  }
  .nav-menu.is-open { display: flex; }
  .site-nav .nav-menu a { display: block; padding: 15px 2px; font-size: 1.12rem; color: var(--text); border-bottom: 1px solid var(--line); }
  .site-nav .nav-menu a[aria-current="page"]::after { display: none; }
  .nav-menu li:last-child a { border-bottom: 0; }
}
@media (max-width: 560px) {
  :root { --header-h: 60px; }
  .brand .logo-full { height: 23px; }
}
@media (max-width: 440px) {
  .brand .logo-full { height: 20px; }
  .site-nav .btn-sm .label-long { display: none; }
  .site-nav .btn-sm .label-short { display: inline; }
}
@media (max-width: 330px) {
  .brand .logo-full { display: none; }
  .brand .logo-mark { display: block; }
}

/* ===================================================================== Status LED */

.status {
  display: inline-flex; align-items: center; gap: 0.65em;
  font: 600 var(--fs-xs)/1 var(--font);
  letter-spacing: 0.04em;
  padding: 0.6em 0.95em 0.6em 0.8em;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--text-2);
}
.status::before {
  content: ""; width: 0.55em; height: 0.55em; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(63, 214, 138, 0.16), 0 0 10px rgba(63, 214, 138, 0.7);
}
.status-sm { font-size: 0.78rem; }
.status.is-paused::before { background: var(--warn); box-shadow: 0 0 0 3px rgba(233, 180, 76, 0.16); }

/* ===================================================================== Keys */

/* A graphite cap with a machined face, mounted in a recessed well. --k is the cap's diameter. */
.key {
  --k: 100px;
  --face-hi: var(--key-hi);
  --face-lo: var(--key-lo);
  --bezel: var(--key-bezel);
  --side: var(--key-side);
  --travel: 0px;
  position: relative;
  display: block;
  width: var(--k); height: var(--k);
  padding: 0; border: 0; border-radius: 50%;
  cursor: pointer;
  background:
    repeating-radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.04) 0 1px, transparent 1.5px 5px),
    radial-gradient(circle at 50% 28%, var(--face-hi), var(--face-lo) 74%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 0 calc(var(--k) * 0.05) var(--bezel),
    0 calc(var(--k) * 0.085 - var(--travel)) 0 calc(var(--k) * 0.05) var(--side),
    0 calc(var(--k) * 0.22 - var(--travel) * 2) calc(var(--k) * 0.24) rgba(0, 0, 0, 0.34);
  transform: translateY(var(--travel));
  transition: transform 90ms ease-out, box-shadow 90ms ease-out;
  -webkit-tap-highlight-color: transparent;
}
/* Soft studio highlight on the cap */
.key::after {
  content: ""; position: absolute; left: 22%; top: 9%; width: 56%; height: 26%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.2), transparent);
  pointer-events: none;
}
.key.is-down { --travel: calc(var(--k) * 0.06); }
/* The action key (historic class name): the accent */
.key-blue {
  --face-hi: var(--accent-face-hi);
  --face-lo: var(--accent-face-lo);
  --bezel: var(--accent-bezel);
  --side: var(--accent-side);
}
.key-blue::after { background: radial-gradient(closest-side, rgba(255, 255, 255, 0.34), transparent); }

/* Recessed well in the surface the key is mounted in (pearl plastic by default) */
.well {
  position: relative;
  display: grid; place-items: center;
  border-radius: 50%;
  width: calc(var(--k) * 1.22); height: calc(var(--k) * 1.22);
  background: radial-gradient(circle at 50% 62%, rgba(24, 26, 32, 0.28), rgba(24, 26, 32, 0.08) 70%);
  box-shadow: inset 0 calc(var(--k) * 0.045) calc(var(--k) * 0.07) rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255, 255, 255, 0.85);
}
/* Variant B (approved 16.11): lift the key by half its 3D side so the whole silhouette sits centred in the well. */
.well > .key { transform: translateY(calc(var(--k) * -0.0425 + var(--travel))); }

/* ===================================================================== The gamepad */

/* A pearl plate on the dark stage: satin plastic, a thin edge, a long soft shadow. No outline.
   Shadows only, no filters: a filter inside the tilting plate would blur it. */
.pad {
  --k: clamp(50px, 5.8vw, 90px);
  position: relative;
  justify-self: center;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-items: center;
  gap: calc(var(--k) * 0.75);
  padding: calc(var(--k) * 0.42) calc(var(--k) * 0.62);
  border-radius: calc(var(--k) * 0.9);
  background:
    radial-gradient(130% 120% at 28% -12%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 56%),
    linear-gradient(180deg, var(--pearl) 0%, var(--pearl-lo) 100%);
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 calc(var(--k) * -0.05) calc(var(--k) * 0.1) rgba(40, 44, 52, 0.16),
    0 calc(var(--k) * 0.035) 0 var(--pearl-edge),
    0 calc(var(--k) * 0.07) 0 #7E8189,
    0 calc(var(--k) * 0.55) calc(var(--k) * 0.85) calc(var(--k) * -0.22) rgba(0, 0, 0, 0.8),
    0 calc(var(--k) * 1.2) calc(var(--k) * 1.7) calc(var(--k) * -0.45) rgba(0, 0, 0, 0.55);
}
.pad .key, .pad .well { --k: inherit; }
.gp-cluster {
  --kc: calc(var(--k) * 0.78);
  display: grid;
  grid-template-columns: repeat(3, calc(var(--kc) * 1.08));
  grid-template-rows: repeat(3, calc(var(--kc) * 1.08));
  place-items: center;
}
.gp-cluster .well, .gp-cluster .key { --k: var(--kc); }
.gp-up { grid-area: 1 / 2; }
.gp-left { grid-area: 2 / 1; }
.gp-right { grid-area: 2 / 3; }
.gp-down { grid-area: 3 / 2; }
.gp-action { --ka: calc(var(--k) * 1.15); display: grid; justify-items: center; gap: calc(var(--k) * 0.3); }
.gp-action .well, .gp-action .key { --k: var(--ka); }
/* Arrow printed on a key face */
.gp-arrow {
  position: absolute; left: 50%; top: 50%;
  width: 32%; height: 28%;
  translate: -50% -50%;
  background: rgba(255, 255, 255, 0.34);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  pointer-events: none;
}
.gp-arrow.to-right { rotate: 90deg; }
.gp-arrow.to-down { rotate: 180deg; }
.gp-arrow.to-left { rotate: 270deg; }
.pad .label {
  text-align: center;
  font: 600 max(0.68rem, calc(var(--k) * 0.135))/1.2 var(--font);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pearl-ink);
}
.pad .label::before {
  content: "";
  display: block;
  margin: 0 auto calc(var(--k) * 0.1);
  width: 0; height: 0;
  border-left: calc(var(--k) * 0.075) solid transparent;
  border-right: calc(var(--k) * 0.075) solid transparent;
  border-bottom: calc(var(--k) * 0.09) solid var(--pearl-ink);
}

/* ===================================================================== Hero */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  overflow: clip;
  background: var(--bg-deep);
  display: grid; align-items: center;
  /* Content height, not a full screen: on a laptop the Pitch requirements block and the game worlds behind it
     peek in at the bottom of the first screen (as in version 2), so the page shows games and invites a scroll. */
  padding-block: clamp(3rem, 1.5rem + 4.5vw, 6rem) clamp(2.5rem, 1rem + 4vw, 5rem);
}
/* Studio light: a key light over the gamepad, a soft wash from the top, a faint glow of the action key below it */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(34% 52% at 73% 40%, rgba(255, 255, 255, 0.085), transparent 72%),
    radial-gradient(80% 60% at 30% -10%, rgba(255, 255, 255, 0.045), transparent 70%),
    radial-gradient(30% 34% at 76% 70%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 72%);
}
/* Into the page below */
.hero::after {
  content: ""; position: absolute; inset: auto 0 0; height: 26%; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--bg));
}
.hero .wrap {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2.5rem, 1rem + 5vw, 6rem);
}
.hero-copy { min-width: 0; display: grid; gap: 1.75rem; justify-items: start; container-type: inline-size; }
/* Two lines, each a whole phrase: the first one dim, the second one bright, sized to the column so neither wraps.
   "AI-assisted games" is the wider line: 8.22em in Rubik 500 at this tracking, so 11.6cqi leaves a little room. */
.hero-copy h1 { font-size: min(6rem, 11.6cqi); line-height: 1.02; letter-spacing: -0.038em; }
.hero-copy h1 .line { display: block; white-space: nowrap; color: var(--h1-dim); }
.hero-copy h1 .line-accent {
  color: var(--text);
  background: linear-gradient(180deg, #FFFFFF 30%, #C9CBD1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-copy .lead { font-size: clamp(1.15rem, 1rem + 0.55vw, 1.45rem); max-width: 30ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 0.4rem; }
/* The stage under the gamepad: light pooled on the floor and a contact shadow right under the plate.
   They sit on a wrapper, not on the plate, so the plate can lean in 3D without carrying them. */
.pad-stage { position: relative; isolation: isolate; justify-self: center; display: grid; place-items: center; }
.pad-stage::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: -45%; right: -45%; top: 35%; bottom: -60%;
  background: radial-gradient(50% 42% at 50% 62%, rgba(255, 255, 255, 0.075), transparent 72%);
}
.pad-stage::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: 3%; right: 3%; top: 84%; height: 28%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.4) 55%, transparent);
}
@media (max-width: 880px) {
  .hero { min-height: 0; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: clamp(3.5rem, 2rem + 6vw, 5rem); }
  .hero::before {
    background:
      radial-gradient(70% 34% at 50% 78%, rgba(255, 255, 255, 0.08), transparent 72%),
      radial-gradient(90% 40% at 30% 0%, rgba(255, 255, 255, 0.045), transparent 70%),
      radial-gradient(50% 20% at 55% 92%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 72%);
  }
  .pad { --k: clamp(44px, 12.5vw, 92px); }
}

/* ===================================================================== Section heads */

.head { display: grid; gap: 1rem; margin-bottom: clamp(2.25rem, 1.6rem + 2.2vw, 4rem); }
.head p { font-size: var(--fs-1); color: var(--text-2); max-width: 36ch; }

/* ===================================================================== Pitch requirements */

/* The user's collage of four made-up game worlds, dimmed into the dark like key art behind glass. */
#requirements { position: relative; isolation: isolate; overflow: hidden; overflow: clip; background: var(--bg); padding-top: clamp(3.25rem, 2rem + 3vw, 5rem); }
#requirements::before {
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: url("../img/game-worlds-1600.webp") center 35% / cover no-repeat;
  opacity: 0.38;
  filter: saturate(0.9);
}
/* A short fade in from the hero, a longer one out into Perks; the middle keeps the worlds in view */
#requirements::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 25%, transparent) 16%, color-mix(in srgb, var(--bg) 40%, transparent) 62%, var(--bg) 100%);
}
#requirements .head h2 { text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6); }
@media (max-width: 900px) {
  #requirements::before { background-image: url("../img/game-worlds-960.webp"); }
}
.reqs-box {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  border-radius: var(--r-xl);
  overflow: hidden;
  background: color-mix(in srgb, var(--surface) 76%, transparent);
  -webkit-backdrop-filter: blur(24px) saturate(1.25);
  backdrop-filter: blur(24px) saturate(1.25);
  border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 50px 90px -50px rgba(0, 0, 0, 0.95);
}
.reqs-col { min-width: 0; padding: clamp(1.6rem, 1rem + 2.4vw, 3.25rem); }
.reqs-col + .reqs-col { border-left: 1px solid var(--line); background: rgba(0, 0, 0, 0.2); }
.reqs-col h3 {
  font: 600 var(--fs-xs)/1 var(--font);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 1.75rem;
}
.reqs-col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 1.15rem; }
.reqs-col li {
  display: flex; align-items: center; gap: 0.8em;
  font-weight: 400;
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.5rem);
  line-height: 1.25;
  letter-spacing: -0.012em;
  color: var(--text-2);
}
/* Not needed: a thin cross in a ring, the words in the quiet colour */
.reqs-col li::before {
  content: "";
  flex: none;
  width: 1.05em; height: 1.05em; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--line-3);
  background:
    linear-gradient(45deg, transparent 44%, var(--text-3) 44% 56%, transparent 56%) center / 42% 42% no-repeat,
    linear-gradient(-45deg, transparent 44%, var(--text-3) 44% 56%, transparent 56%) center / 42% 42% no-repeat;
}
/* Needed: the accent check, the words bright */
.reqs-col .reqs-need li { color: var(--text); }
.reqs-col .reqs-need li::before { display: none; }
.reqs-need li svg { flex: none; width: 1.05em; height: 1.05em; padding: 0.22em; border-radius: 50%; background: var(--accent); color: var(--accent-ink); }
@media (max-width: 760px) {
  .reqs-box { grid-template-columns: minmax(0, 1fr); }
  .reqs-col + .reqs-col { border-left: 0; border-top: 1px solid var(--line); }
}

/* ===================================================================== Perks */

.band-ink { background: var(--bg); }
.band-ink .head p { color: var(--text-2); }

.perks {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(10px, 0.5rem + 0.7vw, 18px);
  margin: 0; padding: 0; list-style: none;
}
.perk {
  min-width: 0;
  width: 100%;
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "icon top" "name name" "sum sum";
  align-items: start;
  align-content: start;
  gap: 0.4rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  font: inherit;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  padding: 1.3rem 1.3rem 1.5rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0) 55%), var(--surface);
  transition: border-color 200ms ease, background-color 200ms ease, box-shadow 240ms ease, transform 260ms var(--ease);
}
/* Hover: the rim lights up and the card lifts 3px. The hit area reaches a little past the card, so a lifted card
   never slides out from under a cursor at its bottom edge (without it the card lost the hover, dropped and jittered). */
.perk:hover { border-color: var(--line-3); transform: translateY(-3px); }
.perk::after { content: ""; position: absolute; inset: -4px 0 -8px; }
.perk > span { position: relative; }
.perk-top { grid-area: top; justify-self: end; display: flex; align-items: center; gap: 8px; min-height: 26px; }
.hotkey {
  display: inline-grid; place-items: center;
  min-width: 26px; height: 26px; padding: 0 6px;
  border-radius: 7px;
  font: 600 0.78rem/1 var(--font);
  color: var(--text-3);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px var(--line-2), 0 2px 0 rgba(0, 0, 0, 0.55);
  transition: translate 80ms ease, box-shadow 80ms ease;
}
.hotkey.is-pressed { translate: 0 2px; box-shadow: inset 0 0 0 1px var(--line-2), 0 0 0 rgba(0, 0, 0, 0.55); }
.perk-rarity {
  font: 600 0.7rem/1 var(--font);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.perk-icon {
  grid-area: icon;
  width: 50px; height: 50px; border-radius: 14px;
  display: grid; place-items: center;
  margin-bottom: 1.75rem;
  color: var(--text);
  background: linear-gradient(180deg, var(--surface-3), var(--surface-2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 0 0 1px var(--line);
  transition: background-color 200ms ease, color 200ms ease;
}
.perk-icon svg { width: 25px; height: 25px; }
.perk-name { grid-area: name; font-weight: 500; font-size: clamp(1.1rem, 1rem + 0.35vw, 1.3rem); line-height: 1.2; letter-spacing: -0.012em; }
.perk-sum { grid-area: sum; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.45; }
.perk:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
/* The chosen perk: an accent rim, the icon lit */
.perk[aria-selected="true"] {
  border-color: color-mix(in srgb, var(--accent) 70%, transparent);
  background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 62%), var(--surface-2);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent), 0 26px 50px -28px var(--accent-glow);
}
.perk[aria-selected="true"] .perk-icon { color: var(--accent-ink); background: var(--accent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.perk[aria-selected="true"] .hotkey { color: var(--text); }
/* The extra perk: the same card with a faint accent light */
.perk-extra { background: radial-gradient(130% 100% at 100% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%), var(--surface); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.perk-extra .perk-icon { color: var(--accent-text); }
.perk-extra .perk-icon svg { width: 28px; height: 28px; }

.perk-panels { margin-top: clamp(12px, 0.5rem + 0.7vw, 18px); }
.perk-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr);
  gap: 2rem clamp(2rem, 1rem + 4vw, 5.5rem);
  padding: clamp(1.6rem, 1rem + 2.6vw, 3.4rem);
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0) 40%), var(--surface);
  border: 1px solid var(--line);
}
.perk-panel:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
.perk-panel.is-entering { animation: panel-in 320ms var(--ease); }
@keyframes panel-in { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: none; } }
.perk-panel-kicker {
  font: 600 var(--fs-xs)/1 var(--font);
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent-text);
}
.perk-panel h3 {
  margin: 0.75rem 0 1rem;
  font-size: clamp(2rem, 1.4rem + 2vw, 3.1rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
}
.perk-panel-head p:last-child { color: var(--text-2); font-size: var(--fs-1); line-height: 1.5; max-width: 30ch; }
.perk-panel ul { margin: 0; padding: 0; list-style: none; display: grid; align-content: center; }
.perk-panel li {
  display: flex; align-items: baseline; gap: 0.95rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line);
  line-height: 1.45;
}
.perk-panel li:first-child { padding-top: 0.2rem; }
.perk-panel li:last-child { border-bottom: 0; padding-bottom: 0.2rem; }
.perk-panel li::before {
  content: ""; flex: none;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-text);
  translate: 0 -0.18em;
}
@media (max-width: 760px) { .perk-panel { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1060px) {
  .perks { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .perks .perk { grid-column: span 2; }
  .perks .perk:nth-child(4) { grid-column: 2 / span 2; }
}
@media (max-width: 680px) {
  .perks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .perks .perk, .perks .perk:nth-child(4) { grid-column: auto; }
  .perks .perk-extra { grid-column: 1 / -1; }
  .perk { padding: 1rem 1rem 1.1rem; }
  .perk-sum { display: none; }
  .perk-icon { width: 42px; height: 42px; border-radius: 12px; margin-bottom: 1rem; }
  .perk-icon svg { width: 22px; height: 22px; }
}

/* ===================================================================== Proof: Kingdom Debt (hidden since 16.11) */

.proof { position: relative; background: var(--bg-deep); overflow: hidden; }
.proof-shot img { width: 100%; height: clamp(440px, 48vw, 680px); object-fit: cover; object-position: 50% 80%; transition: opacity 180ms ease; }
.proof-shot img.is-swapping { opacity: 0; }
.proof-shot::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, var(--bg-deep) 88%); }
.proof-copy { position: absolute; inset: auto 0 0 0; z-index: 1; padding-bottom: clamp(1.75rem, 1rem + 3vw, 3.5rem); }
.proof-copy .wrap { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem 3rem; }
.proof-text { display: grid; gap: 1rem; }
.proof-text h2 span { color: var(--accent-text); }
.proof-text p { max-width: 42ch; color: var(--text-2); font-size: var(--fs-1); }
.proof-text small { color: var(--text-3); }
.thumbs { display: flex; gap: 12px; }
.thumb { width: clamp(112px, 10.5vw, 160px); aspect-ratio: 16 / 9; padding: 0; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: var(--surface); cursor: pointer; opacity: 0.7; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb[aria-pressed="true"] { opacity: 1; border-color: var(--accent-text); }

/* ===================================================================== How it works */

.band-sun { background: var(--bg-raise); }
.track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 clamp(1.25rem, 0.5rem + 2.2vw, 2.75rem);
  margin: 0; padding: 0; list-style: none;
  counter-reset: step;
}
/* One line runs through all four steps; each step is a node on it */
.track li {
  position: relative;
  min-width: 0;
  display: grid; gap: 0.65rem; align-content: start;
  padding-top: 2.4rem;
  border-top: 1px solid var(--line-2);
  counter-increment: step;
}
.track li::before {
  content: ""; position: absolute; top: -5px; left: 0;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 0 5px var(--bg-raise);
}
.track li:last-child::before { background: var(--accent); box-shadow: 0 0 0 5px var(--bg-raise), 0 0 18px var(--accent-glow); }
.track h3 {
  font-size: clamp(1.6rem, 1.2rem + 1.3vw, 2.3rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.track h3::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 0.9rem;
  font: 600 var(--fs-xs)/1 var(--font);
  letter-spacing: 0.16em;
  color: var(--text-3);
}
.track-sum { color: var(--text-2); font-size: 1.06rem; line-height: 1.45; max-width: 24ch; }
.track-roles { margin: 1.1rem 0 0; display: grid; gap: 1.05rem; }
.track-roles div { display: grid; gap: 0.45rem; justify-items: start; }
.track-roles dt {
  font: 600 0.7rem/1 var(--font);
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.5em 0.8em; border-radius: 999px;
}
.track-roles .role-you { color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-3); }
.track-roles .role-we { color: var(--text); background: rgba(255, 255, 255, 0.09); }
/* Together is the finale of the track: the accent, once */
.track-roles .role-together { color: var(--accent-ink); background: var(--accent); }
.track-roles .track-finale dd { color: var(--text); font-weight: 600; }
.track-roles dd { margin: 0; color: var(--text-2); font-size: 1rem; line-height: 1.5; max-width: 30ch; }
.reveal-on .track[data-reveal] { opacity: 1; translate: none; }
.reveal-on .track li { opacity: 0; translate: 0 14px; transition: opacity 0.7s ease, translate 0.8s var(--ease); }
.reveal-on .track.is-in li { opacity: 1; translate: none; }
.reveal-on .track.is-in li:nth-child(2) { transition-delay: 0.12s; }
.reveal-on .track.is-in li:nth-child(3) { transition-delay: 0.24s; }
.reveal-on .track.is-in li:nth-child(4) { transition-delay: 0.36s; }
@media (max-width: 860px) {
  .track { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: 3rem; }
}
@media (max-width: 560px) {
  .track { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .track li { border-top: 0; border-left: 1px solid var(--line-2); padding: 0 0 2.6rem 1.75rem; }
  .track li:last-child { padding-bottom: 0; border-left-color: transparent; }
  .track li::before { top: 0.15rem; left: -5px; }
  .track h3::before { margin-bottom: 0.7rem; }
}

/* ===================================================================== Our team */

.team {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 1rem + 5vw, 6rem);
  align-items: center;
}
.team-copy { min-width: 0; display: grid; gap: 1.3rem; justify-items: start; }
.team-copy p { font-size: var(--fs-1); max-width: 38ch; color: var(--text-2); line-height: 1.55; }
.team-copy .team-lead { color: var(--text); font-size: clamp(1.4rem, 1.15rem + 1vw, 2rem); line-height: 1.25; letter-spacing: -0.02em; font-weight: 400; }
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 2.5rem clamp(1.25rem, 1rem + 1vw, 2rem);
  margin: 0; padding: 0;
  list-style: none;
}
/* From three people on, the heading goes on top and the cards line up in a row below it. */
.team:has(.member:nth-child(3)) { grid-template-columns: minmax(0, 1fr); align-items: start; }
.member { display: grid; gap: 1.1rem; align-content: start; }
/* A portrait, then the name on it like a character select: no frame, no tilt */
.player-card {
  position: relative;
  margin: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 40px 70px -40px rgba(0, 0, 0, 0.9);
}
.player-card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform 700ms var(--ease); }
.player-card:hover img { transform: scale(1.03); }
.player-card figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 0.75rem;
  padding: 3.5rem 1.15rem 1.05rem;
  background: linear-gradient(180deg, transparent, rgba(8, 9, 11, 0.86));
  color: #fff;
  font-weight: 500; font-size: 1.15rem; line-height: 1.15; letter-spacing: -0.01em;
}
.player-card figcaption span {
  flex: none;
  font: 600 0.7rem/1 var(--font);
  letter-spacing: 0.14em;
  padding: 0.5em 0.65em;
  border-radius: 6px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.member-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; }
.member-role { font: 600 var(--fs-xs)/1.25 var(--font); letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); }
.member-link {
  display: inline-flex; align-items: center; gap: 0.35em;
  font-weight: 600; font-size: 0.9rem;
  color: var(--text-2); text-decoration: none;
  transition: color 160ms ease;
}
.member-link svg { width: 1em; height: 1em; }
.member-link:hover { color: var(--text); }
.member-bio { color: var(--text-2); font-size: 1rem; line-height: 1.55; }
@media (max-width: 760px) { .team { grid-template-columns: minmax(0, 1fr); } }

/* ===================================================================== Final call: the big key */

.final {
  position: relative;
  isolation: isolate;
  background: var(--bg-deep);
  text-align: center;
  padding-block: clamp(5rem, 3.5rem + 7vw, 10rem);
  border-top: 1px solid var(--line);
  /* The light behind the big key is wider than a phone screen; clip it so the page can't scroll sideways. */
  overflow: hidden;
  overflow: clip;
}
.final::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(44% 56% at 50% 46%, rgba(255, 255, 255, 0.06), transparent 72%);
}
.final .wrap { display: grid; justify-items: center; gap: clamp(2.2rem, 1.4rem + 2.4vw, 3.6rem); }
.final h2 { max-width: 16ch; }
.final .glow {
  position: absolute; inset: -70%; z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
  pointer-events: none;
}
.final .well, .final .big-key { --k: clamp(150px, 20vw, 220px); }
/* On the dark stage the well is a deep recess */
.final .well { background: radial-gradient(circle at 50% 60%, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.25) 70%); box-shadow: inset 0 6px 16px rgba(0, 0, 0, 0.7), 0 1px 0 rgba(255, 255, 255, 0.06); }
.final .big-key span {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font: 600 calc(var(--k) * 0.115)/1 var(--font);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
/* Contacts: two cards under the key, one address per topic (17.11) */
.contact-cards { width: 100%; max-width: 760px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 0.5rem; }
.contact-card {
  display: grid; gap: 0.7rem; min-width: 0; text-align: left;
  padding: 1.2rem 1.25rem 1.25rem;
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
}
.contact-label { margin: 0; font: 600 0.75rem/1 var(--font); letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); }
.contact-card .mail { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.contact-card a { color: var(--text); text-decoration: none; font-weight: 400; font-size: clamp(1rem, 0.9rem + 0.4vw, 1.15rem); overflow-wrap: anywhere; }
.contact-card a:hover { color: var(--accent-text); }
@media (max-width: 560px) { .contact-cards { grid-template-columns: minmax(0, 1fr); } }

/* Icon copy button: the icon turns into a check and a small "Copied" tip shows (site.js) */
.copy-icon { position: relative; flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, 0.05); color: var(--text-2); cursor: pointer; transition: background-color 160ms ease, color 160ms ease; }
.copy-icon:hover { background: rgba(255, 255, 255, 0.1); color: var(--text); }
.copy-icon svg { grid-area: 1 / 1; width: 16px; height: 16px; transition: opacity 120ms ease; }
.copy-icon .ic-done { opacity: 0; color: var(--ok); }
.copy-icon.is-copied .ic-copy { opacity: 0; }
.copy-icon.is-copied .ic-done { opacity: 1; }
.copy-tip { position: absolute; bottom: calc(100% + 8px); left: 50%; translate: -50% 0; padding: 0.45em 0.7em; border-radius: 8px; background: var(--text); color: var(--bg); font: 600 0.75rem/1 var(--font); white-space: nowrap; pointer-events: none; }
.copy-tip:empty { display: none; }

/* ===================================================================== Reveal on scroll */

.reveal-on [data-reveal] {
  opacity: 0;
  translate: 0 18px;
  transition: opacity 0.8s ease, translate 0.9s var(--ease);
}
.reveal-on [data-reveal].is-in { opacity: 1; translate: none; }
/* Perk cards keep their hover transitions next to the reveal */
.reveal-on .perk[data-reveal] { transition: opacity 0.8s ease, translate 0.9s var(--ease), border-color 200ms ease, background-color 200ms ease, box-shadow 240ms ease, transform 260ms var(--ease); }
.reveal-on .perks [data-reveal]:nth-child(2) { transition-delay: 60ms, 60ms, 0s, 0s, 0s, 0s; }
.reveal-on .perks [data-reveal]:nth-child(3) { transition-delay: 120ms, 120ms, 0s, 0s, 0s, 0s; }
.reveal-on .perks [data-reveal]:nth-child(4) { transition-delay: 180ms, 180ms, 0s, 0s, 0s, 0s; }
.reveal-on .perks [data-reveal]:nth-child(5) { transition-delay: 240ms, 240ms, 0s, 0s, 0s, 0s; }
.reveal-on .team-grid[data-reveal] { transition-delay: 120ms; }
@media print { .reveal-on [data-reveal], .reveal-on .track li { opacity: 1; translate: none; } }

/* ===================================================================== Footer */

.site-footer {
  position: relative;
  background: var(--bg-deep);
  border-top: 1px solid var(--line);
  color: var(--text-3);
  padding-block: clamp(2.6rem, 2rem + 2vw, 3.6rem) 2rem;
  font-size: 0.95rem;
}
.final + .site-footer, main:has(> .final:last-child) + .site-footer { border-top-color: var(--line); }
.site-footer a { color: var(--text-2); text-decoration: none; transition: color 160ms ease; }
.site-footer a:hover { color: var(--text); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.4rem 2rem; }
.footer-brand { color: var(--text); }
.footer-brand .logo { height: 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; margin: 0; padding: 0; list-style: none; }
.footer-base { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.9rem 2rem; margin-top: 2rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.footer-legal { margin: 0; flex: 1 1 480px; font-size: 0.875rem; line-height: 1.6; }
/* Computers: the trademarks sentence on its own line; phones and tablets keep one flowing paragraph */
@media (max-width: 860px) { .footer-legal .br-wide { display: none; } }
.footer-base .status { margin: 0; }

/* ===================================================================== Social links */

/* site.js fills every [data-socials]; URLs in config.js. A tab on the right edge on computers,
   a row in the menu on phones, and the footer. */
.socials { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.social {
  position: relative; display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--text-2);
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
/* Hover and keyboard focus: the button lights up in the accent, like the chosen perk card (18.11) */
.social:hover, .social:focus-visible, .social.is-soon {
  color: var(--accent-text);
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  border-color: color-mix(in srgb, var(--accent-text) 50%, transparent);
}
.social svg { width: 17px; height: 17px; fill: currentColor; }
.soon-tip { position: absolute; bottom: calc(100% + 8px); left: 50%; translate: -50% 0; z-index: 2; padding: 0.45em 0.7em; border-radius: 8px; background: var(--text); color: var(--bg); font: 600 0.75rem/1 var(--font); white-space: nowrap; pointer-events: none; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4); }
.soon-tip:empty { display: none; }
.site-footer .social { color: var(--text-2); }
.site-footer .social:hover, .site-footer .social:focus-visible, .site-footer .social.is-soon { color: var(--accent-text); }
.footer-socials .social { width: 36px; height: 36px; border-radius: 10px; }
.footer-socials .social svg { width: 15px; height: 15px; }

.social-rail {
  position: fixed; right: 0; top: 50%; translate: 0 -50%; z-index: 40;
  padding: 6px max(6px, env(safe-area-inset-right, 0px)) 6px 6px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line-2);
  border-right: 0;
  border-radius: 16px 0 0 16px;
  box-shadow: 0 20px 40px -16px rgba(0, 0, 0, 0.7);
}
.social-rail .socials { flex-direction: column; gap: 2px; }
.social-rail .social { width: 42px; height: 42px; background: transparent; border-color: transparent; border-radius: 11px; }
.social-rail .social svg { width: 18px; height: 18px; }
.social-rail .social:hover, .social-rail .social:focus-visible, .social-rail .social.is-soon {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  border-color: color-mix(in srgb, var(--accent-text) 50%, transparent);
}
.social-rail .soon-tip { bottom: auto; left: auto; top: 50%; right: calc(100% + 12px); translate: 0 -50%; }
@media (max-width: 860px) { .social-rail { display: none; } }
@media print { .social-rail { display: none; } }

.menu-socials { display: none; }
@media (max-width: 860px) {
  .nav-menu .menu-socials { display: block; padding: 16px 2px 6px; }
  .site-nav .nav-menu .menu-socials a { display: inline-grid; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); }
  .site-nav .nav-menu .menu-socials .social:hover, .site-nav .nav-menu .menu-socials .social.is-soon {
    color: var(--accent-text);
    background: color-mix(in srgb, var(--accent) 18%, transparent);
    border-color: color-mix(in srgb, var(--accent-text) 50%, transparent);
  }
}

/* ===================================================================== Email + copy */

.email-row { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.email-row a { font-weight: 500; overflow-wrap: anywhere; color: var(--text); text-decoration: none; }
.email-row a:hover { color: var(--accent-text); }
.copy {
  font: 600 0.78rem/1 var(--font);
  padding: 0.5em 0.8em;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-2);
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}
.copy:hover { background: rgba(255, 255, 255, 0.1); color: var(--text); }

/* ===================================================================== Inner pages */

/* Page head (privacy, 404) and the full screens (pitch, press, games): the same dark stage as the home hero */
.page-head, .screen { position: relative; isolation: isolate; background: var(--bg-deep); }
.page-head::before, .screen::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 70% at 82% 10%, rgba(255, 255, 255, 0.06), transparent 72%),
    radial-gradient(70% 60% at 20% -10%, rgba(255, 255, 255, 0.035), transparent 70%),
    radial-gradient(30% 40% at 86% 40%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 72%);
}
.page-head {
  padding-block: clamp(3.25rem, 2rem + 4.4vw, 6.5rem);
  margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem);
  border-bottom: 1px solid var(--line);
}
.page-head .wrap { position: relative; z-index: 1; display: grid; gap: 1.25rem; justify-items: start; }
.page-head h1 { font-size: clamp(2.6rem, 1.7rem + 3.8vw, 4.9rem); }
.page-head .lead { max-width: 42ch; }
.page-head .pad.pad-mini {
  --k: clamp(36px, 3.4vw, 52px);
  position: absolute; right: var(--gutter-r); top: 50%;
  translate: 0 -50%;
}
@media (max-width: 900px) { .page-head .pad.pad-mini { display: none; } }

.screen {
  min-height: calc(100svh - var(--header-h));
  display: grid; align-content: center;
  padding-block: clamp(3rem, 2rem + 4vw, 6rem);
}
.screen .wrap { position: relative; z-index: 1; width: 100%; }
.screen-top { display: grid; gap: 1rem; justify-items: start; margin-bottom: clamp(2rem, 1.4rem + 2vw, 3rem); }
.screen-top h1 { font-size: clamp(2.6rem, 1.7rem + 3.8vw, 4.9rem); }
.screen-top .lead { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem); max-width: 44ch; }
.screen-cols { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: clamp(1.25rem, 0.8rem + 2vw, 2.5rem); align-items: start; }
.screen-cols .form-foot { margin-top: 0; }
.side-stack { min-width: 0; display: grid; gap: 1rem; }
.side-card {
  display: grid; gap: 0.7rem; justify-items: start;
  padding: clamp(1.3rem, 1rem + 1vw, 1.9rem);
  border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  border: 1px solid var(--line);
}
.side-card h2 { font-size: 1.35rem; letter-spacing: -0.015em; line-height: 1.2; }
.side-card p { color: var(--text-2); }
@media (max-width: 880px) {
  .screen { min-height: 0; }
  .screen-cols { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Forms ---------- */

.form-card {
  min-width: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0) 30%), var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  padding: clamp(1.4rem, 0.8rem + 2.4vw, 2.75rem);
  box-shadow: 0 50px 90px -50px rgba(0, 0, 0, 0.95);
}
.notice {
  display: grid; gap: 0.25rem;
  padding: 0.95rem 1.15rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}
.notice strong { font-weight: 600; color: var(--text); }
.notice-preview { background: rgba(233, 180, 76, 0.09); border: 1px solid rgba(233, 180, 76, 0.32); color: #EBD3A6; }
.notice-error { background: rgba(255, 116, 102, 0.09); border: 1px solid rgba(255, 116, 102, 0.36); color: #FFCBC4; }
.notice a { color: inherit; }

.field { display: grid; gap: 0.45rem; margin-bottom: 1.4rem; }
.field label, .field legend { font-weight: 500; font-size: 0.98rem; color: var(--text); }
.field .opt { font-weight: 400; color: var(--text-3); }
.hint { font-size: 0.9rem; color: var(--text-3); margin-top: -0.15rem; }
.field input[type="email"],
.field input[type="text"],
.field input[type="url"],
.field textarea {
  width: 100%;
  font: 400 1rem/1.45 var(--font);
  color: var(--text);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}
.field input::placeholder, .field textarea::placeholder { color: #5E616A; }
.field input:hover, .field textarea:hover { border-color: var(--line-3); }
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus, .field textarea:focus {
  outline: none;
  background: rgba(0, 0, 0, 0.4);
  border-color: var(--accent-text);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}
.field.has-error input, .field.has-error textarea { border-color: var(--error); }
.field-error { color: var(--error); font-size: 0.9rem; font-weight: 500; }
.field-error:empty { display: none; }
.counter { font-size: 0.82rem; color: var(--text-3); justify-self: end; font-variant-numeric: tabular-nums; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: minmax(0, 1fr); } }

fieldset.field { border: 0; padding: 0; margin: 0 0 1.6rem; min-width: 0; }
fieldset.field legend { padding: 0; margin-bottom: 0.6rem; }
.choice-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-chips label { position: relative; cursor: pointer; font-weight: 500; font-size: 0.92rem; }
.choice-chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-chips span {
  display: inline-block;
  padding: 0.55em 1em;
  border-radius: 999px;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-2);
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}
.choice-chips label:hover span { border-color: var(--line-3); color: var(--text); }
.choice-chips input:checked + span {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  border-color: color-mix(in srgb, var(--accent-text) 70%, transparent);
}
.choice-chips input:focus-visible + span { outline: 2px solid var(--accent-text); outline-offset: 2px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-foot { display: grid; gap: 1rem; margin-top: 0.5rem; }
.form-foot .btn { justify-self: start; min-height: 54px; padding-inline: 1.9em; }
.privacy-note { font-size: 0.88rem; color: var(--text-3); max-width: 36rem; }
.privacy-note a { color: var(--text-2); }

/* ---------- Pitch page ---------- */

.pitch-intro { display: grid; gap: 1.4rem; justify-items: start; }
.pitch-intro h2 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); letter-spacing: -0.025em; }
.ready-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.85rem; }
.ready-list li { position: relative; padding-left: 1.6rem; color: var(--text-2); }
.ready-list li strong { color: var(--text); font-weight: 600; }
.ready-list li::before {
  content: ""; position: absolute; left: 0.2rem; top: 0.62em;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-3);
}
.ready-list li.is-key::before { background: var(--accent-text); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }

/* Progress: numbered dots joined by a line */
.steps { display: flex; margin: 0 0 2rem; padding: 0; list-style: none; }
.steps li { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 0.55rem; font-weight: 500; font-size: 0.9rem; color: var(--text-3); }
.steps li:last-child { flex: 0 0 auto; }
.steps li span {
  flex: none; display: grid; place-items: center;
  width: 1.9rem; height: 1.9rem; border-radius: 50%;
  font-weight: 600; font-size: 0.82rem;
  color: var(--text-3);
  box-shadow: inset 0 0 0 1px var(--line-3);
}
.steps li:not(:last-child)::after { content: ""; flex: 1 1 auto; min-width: 12px; height: 1px; margin-right: 0.55rem; background: var(--line-2); }
.steps li[aria-current="step"] { color: var(--text); }
.steps li[aria-current="step"] span { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.steps li.is-done { color: var(--text-2); }
.steps li.is-done span { background: rgba(255, 255, 255, 0.1); color: var(--text); box-shadow: none; }
.steps li.is-done::after { background: var(--line-3); }
@media (max-width: 560px) { .steps li:not([aria-current="step"]) { font-size: 0; gap: 0; } .steps li:not([aria-current="step"]) span { font-size: 0.82rem; } .steps li:not([aria-current="step"]):not(:last-child)::after { margin-left: 0.55rem; } }

.step-title { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); letter-spacing: -0.025em; margin-bottom: 1.4rem; }
.step-title:focus { outline: none; }
.step-nav { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-top: 0.5rem; }
.step-nav .btn { min-height: 52px; padding-inline: 1.7em; }
.step-nav .btn-pitch { margin-left: auto; }
.step .privacy-note { margin-top: 1rem; }

/* Review: answers grouped by step, each with an Edit button */
.review { display: grid; gap: 1.5rem; margin-bottom: 1.5rem; }
.review-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.7rem; }
.review-group { border-top: 1px solid var(--line-2); padding-top: 1rem; }
.review-group h3 { font-size: 1.15rem; }
.review-edit { background: none; border: 0; padding: 4px 2px; font: 600 0.92rem/1 var(--font); color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.review-edit:hover { color: var(--text); }
.review dl { margin: 0; display: grid; gap: 0.6rem; }
.review dl div { display: grid; grid-template-columns: minmax(0, 10.5rem) minmax(0, 1fr); gap: 1rem; }
.review dt { color: var(--text-3); font-size: 0.92rem; }
.review dd { margin: 0; min-width: 0; overflow-wrap: anywhere; white-space: pre-line; color: var(--text); }
.review dd.is-empty { color: var(--text-3); }
@media (max-width: 560px) { .review dl div { grid-template-columns: minmax(0, 1fr); gap: 0.1rem; } }

.sub-field { margin: 0.9rem 0 0; max-width: 26rem; }
.side-card .achievement { margin-bottom: 0.4rem; }
.success:focus { outline: none; } /* focus moves here after sending so screen readers announce it */

.success { display: grid; gap: 1rem; justify-items: start; padding-block: 0.5rem; }
.success h2 { font-size: clamp(2rem, 1.4rem + 2vw, 3rem); }
.success p { color: var(--text-2); font-size: var(--fs-1); }
/* Achievement toast, like a console trophy */
.achievement {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 20px 11px 11px;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--surface-3), var(--surface-2));
  border: 1px solid var(--line-2);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.8);
  animation: toast-in 420ms var(--ease) both;
}
.achievement .key { --k: 40px; cursor: default; }
.achievement small { display: block; font: 600 0.68rem/1 var(--font); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 5px; }
.achievement strong { font-weight: 600; font-size: 1.08rem; line-height: 1; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.achievement.is-locked { justify-self: start; animation: none; background: rgba(255, 255, 255, 0.03); border-color: var(--line); box-shadow: none; color: var(--text-3); }
.achievement.is-locked small { color: var(--text-3); }
.achievement.is-locked .key { filter: grayscale(1); opacity: 0.45; }

/* ---------- Games page ---------- */

.games-grid { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 0.7rem + 1.4vw, 1.75rem); }
.game-card {
  min-width: 0; display: grid; grid-template-rows: auto 1fr;
  border-radius: var(--r-lg); overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 200ms ease;
}
.game-card:hover { border-color: var(--line-2); }
.game-art { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid var(--line); }
.game-body { display: grid; gap: 0.75rem; align-content: start; justify-items: start; padding: clamp(1.15rem, 0.9rem + 0.8vw, 1.6rem); }
.game-body p { color: var(--text-2); }
.game-title { font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.75rem); letter-spacing: -0.02em; }
.game-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-block; padding: 0.45em 0.8em; border-radius: 999px; font: 600 0.7rem/1.2 var(--font); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line-2); }
/* Locked slot: a dark screen with a spot of light and a padlock key */
.game-card.is-locked .game-art { background: radial-gradient(60% 70% at 50% 35%, #23252C, #121317 75%); color: var(--text-2); }
/* The padlock is a key you can press: it lights the "Coming soon" tag up in the accent, which then fades (site.js) */
.game-lock {
  position: relative; display: grid; place-items: center;
  width: 88px; height: 88px; padding: 0; border: 0; border-radius: 50%;
  color: var(--text-2); cursor: pointer;
  background: radial-gradient(circle at 50% 28%, var(--key-hi), var(--key-lo) 74%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 0 4px var(--key-bezel), 0 7px 0 4px var(--key-side), 0 20px 30px rgba(0, 0, 0, 0.5);
  transition: box-shadow 1.6s ease-out, color 1.6s ease-out, translate 90ms ease-out;
}
.game-lock:active { translate: 0 4px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 0 4px var(--key-bezel), 0 3px 0 4px var(--key-side), 0 12px 20px rgba(0, 0, 0, 0.5); }
.game-lock svg { width: 38px; height: 38px; }
.game-card .tag { transition: background-color 1.6s ease-out, border-color 1.6s ease-out, color 1.6s ease-out; }
.game-card.is-lit .game-lock { transition: none; color: var(--text); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 0 4px var(--key-bezel), 0 7px 0 4px var(--key-side), 0 0 60px 6px var(--accent-glow); }
.game-card.is-lit .tag { transition: none; color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.game-card.is-locked .game-title { color: var(--text-2); }
/* Open slot: the accent pitch key on pearl */
.game-card.is-open { border-color: color-mix(in srgb, var(--accent) 32%, var(--line)); }
.game-card.is-open .game-art { background: radial-gradient(60% 70% at 50% 30%, var(--pearl-hi), var(--pearl) 55%, var(--pearl-lo)); }
.game-card.is-open .well, .game-card.is-open .key { --k: 76px; }
@media (max-width: 760px) { .games-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Prose (privacy) ---------- */

.prose { max-width: 46rem; padding-bottom: var(--section); }
.prose h2 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem); letter-spacing: -0.025em; margin: 2.75rem 0 0.9rem; scroll-margin-top: calc(var(--header-h) + 16px); }
.prose p, .prose li { color: var(--text-2); }
.prose p + p { margin-top: 0.9em; }
.prose ul { padding-left: 1.2rem; }
.prose li + li { margin-top: 0.4rem; }
.prose strong { color: var(--text); font-weight: 600; }
.prose-meta { font-weight: 600; color: var(--text) !important; margin-bottom: 0.9rem; }
.prose-lead { font-style: italic; margin-bottom: 0.6rem; }
.toc { margin: 1.8rem 0 0.6rem; padding: 1.25rem 1.4rem; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.toc ol { margin: 0; padding-left: 1.3rem; columns: 2; column-gap: 2rem; color: var(--text-3); }
.toc li { break-inside: avoid; margin: 0 0 0.35rem; }
.toc a { color: var(--text); font-weight: 500; text-decoration: none; }
.toc a:hover { color: var(--accent-text); }
@media (max-width: 560px) { .toc ol { columns: 1; } }
.table-wrap { overflow-x: auto; margin: 0.9rem 0 1.1rem; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); }
.legal-table { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: 0.94rem; }
.legal-table th, .legal-table td { padding: 0.8rem 0.95rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.legal-table th { font-weight: 600; color: var(--text); background: rgba(255, 255, 255, 0.03); }
.legal-table td { color: var(--text-2); }
.legal-table tr:last-child td { border-bottom: 0; }

/* ---------- 404: the wrong key stays pressed ---------- */

.page-404 { margin-bottom: 0; border-bottom: 0; padding-block: clamp(4.5rem, 3rem + 7vw, 10rem); }
.page-404 .pad.pad-mini { --k: clamp(44px, 4.8vw, 70px); }

/* ===================================================================== Interactive motion (stays on) */

/* The gamepad leans towards the cursor; site.js adds .is-leaning and sets --rx/--ry only while the cursor
   is over the hero, so at rest nothing sits in 3D and the text stays crisp. */
.hero .pad {
  translate: var(--nx, 0px) var(--ny, 0px);
  transition: transform 420ms var(--ease), translate 220ms var(--ease);
}
.hero .pad.is-leaning { transform: perspective(1100px) rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg)); }
.perk.is-leaning { transform: perspective(800px) rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg)); }

/* Easter egg: the arrows nudge the gamepad; five steps out it levels up and springs home (site.js) */
.hero .pad.is-homing { transition: transform 420ms var(--ease), translate 700ms cubic-bezier(.3, 1.35, .4, 1); }
.level-up {
  position: absolute; left: 50%; bottom: calc(100% + 26px); z-index: 3;
  translate: -50% 0;
  padding: 0.6em 1em 0.62em;
  border-radius: 999px;
  font: 600 0.85rem/1 var(--font);
  letter-spacing: 0.16em; text-transform: uppercase; white-space: nowrap;
  color: var(--text);
  background: color-mix(in srgb, var(--surface-3) 88%, transparent);
  border: 1px solid var(--line-2);
  box-shadow: 0 16px 34px -14px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  opacity: 0;
}
.level-up::before { content: "★"; color: var(--accent-text); margin-right: 0.6em; }
.level-up:empty { display: none; }
.level-up.is-on { animation: level-up 1.9s var(--ease) both; }
@keyframes level-up {
  0% { opacity: 0; transform: translateY(10px); }
  14% { opacity: 1; transform: translateY(0); }
  78% { opacity: 1; transform: translateY(-4px); }
  100% { opacity: 0; transform: translateY(-16px); }
}

/* While the pad leans in 3D, site.js lays a flat copy of "Pitch your game" exactly over the label,
   so the words stay crisp (a tilted element is drawn as a picture and turned, which blurs text). */
.hero .pad.label-lifted .label { visibility: hidden; }
.pad-label-flat {
  position: absolute; left: 0; top: 0; z-index: 3; margin: 0; pointer-events: none;
  visibility: hidden;
  text-align: center;
  font: 600 var(--flat-fs, 0.7rem)/1.2 var(--font);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pearl-ink);
}
.pad-label-flat.is-on { visibility: visible; }
.pad-label-flat::before {
  content: ""; display: block;
  margin: 0 auto var(--flat-am, 6px);
  width: 0; height: 0;
  border-left: var(--flat-aw, 6px) solid transparent;
  border-right: var(--flat-aw, 6px) solid transparent;
  border-bottom: var(--flat-ah, 7px) solid var(--pearl-ink);
}

/* ===================================================================== The pitch key breathes (on)

   The action key on the hero gamepad breathes a soft light, so it reads as the button you can press
   (18.11: a calm light instead of the arcade pulse). config.js gamepadGlow puts .gp-glow on <html>.
   With the loops on (.gp-motion) the old arcade pulse below takes over. */

@keyframes key-breathe { 0%, 100% { opacity: 0.25; } 50% { opacity: 0.78; } }
@keyframes cap-breathe { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }
html.gp-glow:not(.gp-motion) .hero .well-live::before {
  content: ""; position: absolute; inset: calc(var(--k) * -0.17); border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, var(--accent-glow) 52%, transparent 100%);
  opacity: 0.25;
  animation: key-breathe 3.8s ease-in-out infinite;
}
html.gp-glow:not(.gp-motion) .hero .key-blue[data-press-link]::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.08) 62%, transparent 78%);
  opacity: 0;
  animation: cap-breathe 3.8s ease-in-out infinite;
}

/* ===================================================================== Looping motion: switched off (18.11)

   Kept, not deleted: config.js gamepadMotion: true (or "Loops" in the draft's review switch) puts .gp-motion on <html>:
   the arcade pulse on every pitch key, the nudging arrows, and site.js tilts the perk cards again.
   The power-on intro below is separate (config.js gamepadIntro, on). */

@keyframes key-glow { 50% { opacity: 1; } }
@keyframes arrow-nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(calc(var(--k) * -0.16)); } }
@keyframes nudge { 0%, 100% { transform: translateY(-1px); } 50% { transform: translateY(3px); } }
html.gp-motion .well-live::before {
  content: ""; position: absolute; inset: calc(var(--k) * -0.14); border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, var(--accent-glow) 58%, transparent 100%);
  opacity: 0;
  animation: key-glow 2.6s ease-in-out infinite;
}
html.gp-motion .key-blue[data-press-link]::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.12) 62%, transparent 78%);
  opacity: 0;
  animation: key-glow 2.6s ease-in-out infinite;
}
html.gp-motion .hero .pad .label::before, html.gp-motion .pad-label-flat::before { animation: arrow-nudge 1.3s ease-in-out infinite; }
html.gp-motion .btn-down svg { animation: nudge 1.6s ease-in-out infinite; }

/* Intro: the first screen powers on like an arcade cabinet. site.js puts .intro-play on <html> for the length
   of the intro (only with .gp-motion) and numbers the keys (--i) and the headline lines (--j). */
@keyframes intro-power {
  0% { filter: brightness(0.12) saturate(0.3); }
  8% { filter: brightness(1.15); }
  12% { filter: brightness(0.3) saturate(0.5); }
  20% { filter: brightness(1.1); }
  24% { filter: brightness(0.55); }
  36%, 100% { filter: none; }
}
@keyframes intro-light {
  0% { filter: brightness(0.45); }
  40% { filter: brightness(1.9) drop-shadow(0 0 14px rgba(255, 255, 255, 0.7)); }
  100% { filter: none; }
}
@keyframes intro-type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes intro-rise { from { translate: 0 0.45em; opacity: 0; } to { translate: 0 0; opacity: 1; } }
@keyframes intro-scan { 0%, 55% { opacity: 1; } 100% { opacity: 0; } }
html.intro-play .hero { animation: intro-power 1000ms steps(1, end) both; }
html.intro-play .hero [data-keypad] [data-key] { animation: intro-light 520ms ease-out both; animation-delay: calc(820ms + var(--i, 0) * 120ms); }
html.intro-play .hero-copy h1 .line { animation: intro-type 520ms steps(18, end) both; animation-delay: calc(380ms + var(--j, 0) * 380ms); }
html.intro-play :is(.hero-copy .lead, .hero-actions) { animation: intro-rise 420ms ease-out both; animation-delay: 1150ms; }
html.intro-play .hero .wrap::after {
  content: ""; position: absolute; inset: -60vh -100vw; z-index: 2; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0 2px, transparent 2px 4px);
  animation: intro-scan 1100ms linear both;
}

/* ===================================================================== Reduced motion */

@media (prefers-reduced-motion: reduce) {
  .key, .perk, .hotkey, .player-card img { transition: none; }
  .perk:hover { transform: none; }
  .perk-panel.is-entering, .achievement, .level-up.is-on { animation: none; }
  .level-up.is-on { opacity: 1; }
  .hero .pad, .hero .pad.is-homing { transition: none; }
  .hero .pad.is-leaning, .perk.is-leaning { transform: none; }
  .player-card:hover img { transform: none; }
  html.gp-glow:not(.gp-motion) .hero .well-live::before { animation: none; opacity: 0.5; }
  html.gp-glow:not(.gp-motion) .hero .key-blue[data-press-link]::before { animation: none; }
  html.gp-motion .well-live::before, html.gp-motion .key-blue[data-press-link]::before,
  html.gp-motion .hero .pad .label::before, html.gp-motion .pad-label-flat::before, html.gp-motion .btn-down svg { animation: none; }
  html.intro-play .hero, html.intro-play .hero * { animation: none !important; }
}
