/* Xtrover design tokens. Dark, cold, one electric accent. Mobile first. */
:root {
  /* Surfaces: near-black with a hint of blue so it reads as night, not void */
  --bg: #07080c;
  --bg-2: #0c0d13;
  --bg-3: #13141c;
  --line: rgba(236, 240, 255, 0.08);
  --line-strong: rgba(236, 240, 255, 0.18);
  --glass: rgba(236, 240, 255, 0.04);
  --glass-2: rgba(236, 240, 255, 0.07);

  /* Ink */
  --ink: #eef1f8;
  --ink-2: rgba(238, 241, 248, 0.66);
  --ink-3: rgba(238, 241, 248, 0.42);
  --ink-4: rgba(238, 241, 248, 0.22);

  /* Brand */
  --cyan: #46f0ff;
  --violet: #9a66ff;
  --magenta: #ff4fa8;
  --gold: #ffc44d;
  --gold-2: #ff8a3d;
  --accent: var(--cyan);
  --accent-2: var(--violet);
  --accent-ink: #06070a;

  /* Type */
  --font-display: "Unbounded Variable", "Unbounded", system-ui, sans-serif;
  --font-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-body: "Manrope Variable", "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;

  /* Fluid type scale (360px → 1440px). Display to body ratio ≈ 12:1. */
  --t-xs: clamp(0.68rem, 0.64rem + 0.18vw, 0.78rem);
  --t-sm: clamp(0.84rem, 0.8rem + 0.2vw, 0.95rem);
  --t-md: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  --t-lg: clamp(1.2rem, 1.05rem + 0.8vw, 1.6rem);
  --t-xl: clamp(1.6rem, 1.2rem + 2vw, 2.6rem);
  --t-2xl: clamp(2.1rem, 1.3rem + 4.2vw, 4.6rem);
  --t-3xl: clamp(2.6rem, 1.4rem + 6.4vw, 7rem);
  --t-hero: clamp(3rem, 13.6vw, 13.5rem);

  /* Space */
  --gutter: clamp(18px, 4.2vw, 56px);
  --section: clamp(110px, 16vw, 220px);
  --max: 1360px;
  --nav-h: 64px;

  /* Radius / motion */
  --r-sm: 10px;
  --r-md: 20px;
  --r-lg: 30px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-spring: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-in-out: cubic-bezier(0.87, 0, 0.13, 1);
  --dur: 0.6s;

  color-scheme: dark;
}

/* Game chapter: palette turns warm while the 29 Royale section is in view. */
:root[data-theme="royale"] {
  --accent: var(--gold);
  --accent-2: var(--gold-2);
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur: 0.01s; }
}
*,
*::before,
*::after { box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  min-height: 100svh;
  background: transparent; /* the colour is on html, so the streams canvas can sit above it */
  font-size: var(--t-md);
  line-height: 1.6;
  overflow-x: clip;
}

img, svg, video, canvas { display: block; max-width: 100%; }
img { outline: 1px solid rgba(255, 255, 255, 0.08); outline-offset: -1px; }
.btn > svg:first-child { margin-left: 0.06em; } /* optical centre: the play triangle is pointed, so it sits a hair right */
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 1.5px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--accent-ink); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.035em;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
em { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: 0; }

/* Film grain over everything: makes black feel physical. */
body::after {
  content: ""; position: fixed; inset: -50%; z-index: 90; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.035; mix-blend-mode: overlay;
  animation: grain 0.6s steps(3) infinite;
}
@keyframes grain { 0% { transform: translate(0, 0); } 33% { transform: translate(-3%, 2%); } 66% { transform: translate(2%, -3%); } 100% { transform: translate(0, 0); } }
@media (prefers-reduced-motion: reduce) { body::after { animation: none; } }

/* Layout */
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.section { position: relative; padding-block: var(--section); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex; align-items: center; gap: 12px;
}
.eyebrow b { color: var(--accent); font-weight: 500; }
.lede { font-size: var(--t-lg); color: var(--ink-2); line-height: 1.4; max-width: 34ch; letter-spacing: -0.01em; }
.muted { color: var(--ink-3); }
.mono { font-family: var(--font-mono); font-size: var(--t-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }

/* Buttons */
.btn {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  padding: 0 1.5em;
  border-radius: 999px;
  font-family: var(--font-body); font-weight: 600; font-size: var(--t-sm); letter-spacing: 0.01em;
  color: var(--accent-ink); background: var(--ink);
  transition: transform 0.12s var(--ease-out), box-shadow var(--dur), background var(--dur), color var(--dur);
  min-height: 50px; white-space: nowrap;
  overflow: hidden;
}
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--accent); transform: translateY(102%); transition: transform 0.5s var(--ease-out); border-radius: inherit; }
.btn:hover::before { transform: translateY(0); }
.btn:active { transform: scale(0.97); }
.btn--accent { background: var(--accent); }
.btn--accent::before { background: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn--ghost::before { background: var(--ink); }
.btn--ghost:hover { color: var(--accent-ink); }
.btn svg { width: 1.05em; height: 1.05em; }
.btn .arrow { transition: transform 0.4s var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }

/* Glass surface */
.card {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(160deg, rgba(255,255,255,0.08), transparent 40%); }
@media (prefers-reduced-transparency: reduce) { .card { backdrop-filter: none; background: var(--bg-3); } }

/* Reveal (GSAP drives .is-in) */
.reveal { opacity: 0; transform: translateY(32px); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* Line reveal (SplitText masks) */
.lines .line { overflow: clip; }

/* ---------- Nav: a floating glass bar ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  pointer-events: none;
}
.nav > * { pointer-events: auto; }
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(7, 8, 12, 0.84);
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 16px 32px -22px rgba(0, 0, 0, 0.9);
  opacity: 0; transition: opacity 0.5s;
}
@media (prefers-reduced-transparency: reduce) { .nav::before { background: rgba(7, 8, 12, 0.97); -webkit-backdrop-filter: none; backdrop-filter: none; } }
.nav.is-solid::before { opacity: 1; }
.nav__logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.1em; }
.nav__logo .x-mark { width: 26px; height: 26px; }
.nav__links {
  display: none; align-items: center; gap: 2px;
  padding: 4px; border-radius: 999px;
  background: rgba(12, 13, 19, 0.55); border: 1px solid var(--line);
  backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
  font-size: var(--t-sm); color: var(--ink-2);
  position: absolute; left: 50%; transform: translateX(-50%);
}
.nav__links a { position: relative; display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border-radius: 999px; transition: color 0.3s var(--ease-out), background 0.3s var(--ease-out); }
.nav__links a:hover, .nav__links a.is-current { color: var(--ink); background: var(--glass-2); }
.nav__cta { display: none; min-height: 40px; padding-inline: 1.2em; font-size: var(--t-xs); letter-spacing: 0.08em; text-transform: uppercase; }
.nav__burger { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: rgba(12, 13, 19, 0.55); border: 1px solid var(--line); backdrop-filter: blur(20px); }
.nav__burger span { display: block; width: 18px; height: 1.5px; background: var(--ink); margin: 3px 0; transition: transform 0.5s var(--ease-out), opacity 0.3s; }
.nav.is-open .nav__burger span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.nav.is-open .nav__burger span:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }
.menu {
  position: fixed; inset: 0; z-index: 40; background: rgba(7, 8, 12, 0.94); backdrop-filter: blur(28px);
  display: grid; align-content: end; padding: var(--gutter); padding-bottom: calc(var(--gutter) + 24px);
  opacity: 0; visibility: hidden; transition: opacity 0.45s var(--ease-spring), visibility 0.45s var(--ease-spring);
}
.menu.is-open { opacity: 1; visibility: visible; }
.menu a { font-family: var(--font-display); font-size: var(--t-2xl); font-weight: 500; letter-spacing: -0.03em; padding: 0.18em 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; transform: translateY(20px); opacity: 0; transition: transform 0.7s var(--ease-out), opacity 0.7s; }
.menu a small { font: 500 var(--t-xs) var(--font-mono); color: var(--ink-3); letter-spacing: 0.2em; }
.menu.is-open a { transform: none; opacity: 1; }
.menu.is-open a:nth-child(2) { transition-delay: 0.05s; } .menu.is-open a:nth-child(3) { transition-delay: 0.1s; } .menu.is-open a:nth-child(4) { transition-delay: 0.15s; } .menu.is-open a:nth-child(5) { transition-delay: 0.2s; }
.menu .menu__small { margin-top: 24px; font-size: var(--t-sm); color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 18px; }
.menu .menu__small a { font: inherit; border: 0; padding: 0; transform: none; opacity: 1; display: inline; }
@media (min-width: 900px) {
  .nav__links, .nav__cta { display: inline-flex; }
  .nav__burger, .menu { display: none; }
}

/* Scroll progress hairline */
.progress { position: fixed; left: 0; top: calc(var(--nav-h) - 1px); height: 2px; width: 100%; z-index: 51; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, var(--accent), var(--accent-2)); pointer-events: none; }

/* ---------- Cursor ---------- */
@media (hover: hover) and (pointer: fine) {
  .cursor { position: fixed; left: 0; top: 0; z-index: 95; pointer-events: none; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--ink); mix-blend-mode: difference; }
  .cursor__ring { position: fixed; left: 0; top: 0; z-index: 95; pointer-events: none; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%; border: 1px solid rgba(238, 241, 248, 0.5); mix-blend-mode: difference; display: grid; place-items: center; font: 500 10px var(--font-mono); letter-spacing: 0.1em; color: #fff; }
  .cursor__ring span { opacity: 0; transition: opacity 0.2s; }
  .cursor__ring.is-label { width: 72px; height: 72px; margin: -36px 0 0 -36px; background: rgba(238, 241, 248, 0.9); border-color: transparent; }
  .cursor__ring.is-label span { opacity: 1; color: #000; }
  .cursor__ring.is-link { width: 52px; height: 52px; margin: -26px 0 0 -26px; }
}
@media (hover: none), (pointer: coarse) { .cursor, .cursor__ring { display: none; } }

/* ---------- Footer ---------- */
.footer { position: relative; overflow: clip; border-top: 1px solid var(--line); padding: 72px 0 28px; background: transparent; font-size: var(--t-sm); }
.footer__grid { display: grid; gap: 40px; }
.footer__brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 600; letter-spacing: 0.1em; font-size: 0.95rem; }
.footer__brand .x-mark { width: 30px; height: 30px; }
.footer h4 { font-size: var(--t-xs); letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-3); font-family: var(--font-mono); font-weight: 500; margin-bottom: 16px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer a { transition: color 0.3s; }
.footer a:hover { color: var(--accent); }
.footer address { font-style: normal; color: var(--ink-2); line-height: 1.7; }
.footer .reg { font-variant-numeric: tabular-nums; font-family: var(--font-mono); color: var(--ink-2); font-size: var(--t-xs); display: grid; gap: 6px; letter-spacing: 0.06em; }
.footer .reg b { color: var(--ink-3); font-weight: 500; margin-right: 8px; }
.footer__word { margin-top: 64px; font-family: var(--font-display); font-weight: 700; font-size: clamp(3.4rem, 16.4vw, 17rem); line-height: 0.78; letter-spacing: -0.06em; color: transparent; -webkit-text-stroke: 1px var(--line-strong); white-space: nowrap; user-select: none; pointer-events: none; }
.footer__word span { display: inline-block; }
.footer__bottom { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; color: var(--ink-3); font-size: var(--t-xs); font-family: var(--font-mono); letter-spacing: 0.06em; }
.footer__bottom .x-mark { width: 12px; height: 12px; display: inline-block; vertical-align: -1px; margin-right: 6px; }
@media (min-width: 720px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } }

/* Logo mark gradient (shared by every inline x-mark) */
.x-mark { fill: url(#xg); }

/* a visitor who has already seen the intro never gets it, so the page snapshot for a transition is never the loader */
.seen .loader { display: none; }

/* ---------- page transitions ---------- */
/* Cross-document view transitions (Chromium, Safari). The leaving page eases out quickly; the arriving page rises on a spring curve, a beat later. No blur: it greys the page while it moves. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 0.26s cubic-bezier(0.4, 0, 1, 1) both vt-leave; }
::view-transition-new(root) { animation: 0.66s var(--ease-spring) 0.1s both vt-enter; }
@keyframes vt-leave { to { opacity: 0; transform: scale(0.985) translateY(-6px); } }
@keyframes vt-enter { from { opacity: 0; transform: scale(0.99) translateY(16px); } }
/* fixed chrome stays still while the page underneath changes */
.nav { view-transition-name: nav; }
.progress { view-transition-name: progress; }
#cursor { view-transition-name: cursor; }
#cursor-ring { view-transition-name: cursor-ring; }
::view-transition-group(nav), ::view-transition-old(nav), ::view-transition-new(nav),
::view-transition-group(progress), ::view-transition-old(progress), ::view-transition-new(progress),
::view-transition-group(cursor), ::view-transition-old(cursor), ::view-transition-new(cursor),
::view-transition-group(cursor-ring), ::view-transition-old(cursor-ring), ::view-transition-new(cursor-ring) { animation: none; }

/* Fallback (Firefox and others): the leave fade is in js/lib/transition.js, the arrival rise is here. */
html:not(.vt-native) main { transition: opacity 0.26s cubic-bezier(0.4, 0, 1, 1), transform 0.26s cubic-bezier(0.4, 0, 1, 1); }
html:not(.vt-native).is-leaving main { opacity: 0; transform: scale(0.985) translateY(-6px); }
html:not(.vt-native) body.page main { animation: page-in 0.66s var(--ease-spring) 0.1s backwards; }
@keyframes page-in { from { opacity: 0; transform: scale(0.99) translateY(16px); } }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: vt-fade 0.2s linear both; }
  html:not(.vt-native) body.page main, html:not(.vt-native) main { animation: none; transition: none; }
}
@keyframes vt-fade { from { opacity: 0; } to { opacity: 1; } }
/* Secondary pages: articles, listings, legal. Calm, readable, no effects. */
.page main { padding-top: calc(72px + var(--gutter)); min-height: 70svh; }
.article, .legal, .listing { padding-bottom: var(--section); }
.article__head, .listing__head { max-width: 46rem; padding: 32px 0 40px; display: grid; gap: 18px; }
.article__head h1, .listing__head h1 { font-size: var(--t-2xl); }
.article__meta { font-family: var(--font-mono); font-size: var(--t-xs); color: var(--ink-3); letter-spacing: 0.06em; }

.prose { max-width: 42rem; font-size: var(--t-md); color: var(--ink-2); }
.prose h2 { font-size: var(--t-xl); color: var(--ink); margin: 2.2em 0 0.7em; scroll-margin-top: 90px; }
.prose h3 { font-size: var(--t-lg); color: var(--ink); margin: 1.8em 0 0.5em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1em; }
.prose li { margin: 0.35em 0; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--ink); }
.prose code { font-family: var(--font-mono); font-size: 0.9em; background: var(--glass); padding: 0.1em 0.4em; border-radius: 6px; }
.prose table { border-collapse: collapse; width: 100%; font-size: var(--t-sm); margin: 1.2em 0; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--ink); font-weight: 600; }
.prose blockquote { margin: 1.4em 0; padding: 0.2em 0 0.2em 1.2em; border-left: 2px solid var(--accent); color: var(--ink); font-size: var(--t-lg); line-height: 1.35; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }

.toc { margin: 0 0 40px; padding: 20px 22px; background: var(--glass); border: 1px solid var(--line); border-radius: var(--r-md); max-width: 42rem; }
.toc ol { margin: 0; padding: 0; list-style: none; font-size: var(--t-sm); color: var(--ink-2); }
.toc li { padding: 4px 0; }
.toc a:hover { color: var(--accent); }

.faq { max-width: 42rem; margin-top: 56px; }
.faq h2 { font-size: var(--t-xl); margin-bottom: 18px; }
.faq details { border-top: 1px solid var(--line); padding: 14px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 700; font-size: var(--t-md); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-family: var(--font-display); }
.faq details[open] summary::after { content: "–"; }
.faq p { margin-top: 10px; color: var(--ink-2); }

.article__cta { margin-top: 56px; padding: 24px; display: grid; gap: 18px; max-width: 42rem; }
.article__cta h3 { font-size: var(--t-lg); margin: 8px 0 4px; }
@media (min-width: 640px) { .article__cta { grid-template-columns: 1fr auto; align-items: center; } }

.related { margin-top: 72px; }
.related h2 { font-size: var(--t-xl); margin-bottom: 20px; }

.cards { display: grid; gap: 14px; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); } }
.post { padding: 22px; display: grid; gap: 10px; align-content: start; transition: transform var(--dur) var(--ease-out), border-color var(--dur), background var(--dur); }
.post:hover { transform: translateY(-4px); border-color: var(--line-strong); background: rgba(255, 255, 255, 0.06); }
.post__kind { font-family: var(--font-mono); font-size: var(--t-xs); letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.post h3 { font-size: var(--t-lg); line-height: 1.15; }
.post p { color: var(--ink-2); font-size: var(--t-sm); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post__meta { font-family: var(--font-mono); font-size: var(--t-xs); color: var(--ink-3); }

.legal .prose { max-width: 46rem; }
@media print {
  .nav, .menu, .footer, .toc { display: none !important; }
  html, body { background: #fff; color: #000; }
  .prose, .prose h2, .prose h3, .article__head { color: #000; }
}
/* ---------- Loader ---------- */
.loader { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: grid; place-items: center; transition: opacity 0.7s var(--ease-in-out), visibility 0.7s; }
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__mark { width: clamp(72px, 12vw, 120px); color: var(--ink); }
.loader__mark path { transition: fill 0.6s; }
.loader.is-full .loader__mark path { fill: var(--ink); }
.loader__meta { position: absolute; left: var(--gutter); right: var(--gutter); bottom: calc(var(--gutter) + 14px); display: flex; justify-content: space-between; align-items: baseline; }
.loader__meta > span:first-child { font-family: var(--font-display); font-weight: 600; font-size: var(--t-xl); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.loader__bar { position: absolute; left: var(--gutter); right: var(--gutter); bottom: var(--gutter); height: 1px; background: var(--line); }
.loader__bar i { display: block; height: 100%; width: 0; background: var(--ink); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: grid; align-items: end; padding: calc(var(--nav-h) + var(--gutter)) 0 calc(var(--gutter) + 44px); overflow: clip; isolation: isolate; }
.hero::before { content: ""; position: fixed; inset: 0; z-index: -2; background: radial-gradient(70% 60% at 50% 45%, rgba(70, 90, 160, 0.16), transparent 70%), radial-gradient(50% 40% at 80% 20%, rgba(154, 102, 255, 0.1), transparent 70%); }
.streams { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.hero__gl { position: fixed; inset: 0; width: 100vw; height: 100svh; z-index: -1; }
.hero.no-gl .hero__gl { display: none; }
/* a dark, transparent layer between the page and the particles: content sits on it, the streams run behind */
.veil { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0; background: rgba(7, 8, 12, 0.6); }
.hero.no-gl::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url(/media/hero-poster.jpg) center / cover no-repeat; opacity: 0.9; }
.hero__content { display: grid; gap: 18px; }
.hero__top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.hero__meta { display: none; }
.hero__title { font-size: var(--t-hero); line-height: 0.86; letter-spacing: -0.055em; display: flex; margin-left: -0.04em; font-weight: 700; }
.hero__title .ch { display: inline-block; will-change: transform, opacity; }
.hero__row { display: grid; gap: 22px; align-items: end; }
.hero__sub { font-family: var(--font-display); font-size: var(--t-xl); font-weight: 500; letter-spacing: -0.03em; line-height: 1; color: var(--ink); }
.hero__sub em { font-size: 1.12em; color: var(--accent); }
.hero__aside { display: grid; gap: 18px; }
.hero__tag { color: var(--ink-2); max-width: 34ch; font-size: var(--t-md); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 10px; }
.hero__foot { position: absolute; left: 0; right: 0; bottom: var(--gutter); display: flex; justify-content: space-between; align-items: center; }
.hero__foot > span:last-child { display: none; }
.hero__scroll { display: inline-flex; align-items: center; gap: 12px; }
.hero__scroll i { width: 44px; height: 1px; background: var(--ink-3); position: relative; overflow: hidden; }
.hero__scroll i::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: translateX(-100%); animation: scrollhint 2.2s var(--ease-in-out) infinite; }
@keyframes scrollhint { 40% { transform: translateX(0); } 80%, 100% { transform: translateX(100%); } }
@media (min-width: 900px) {
  .hero { align-items: center; }
  .hero__meta, .hero__foot > span:last-child { display: inline; }
  .hero__row { grid-template-columns: 1.1fr 0.9fr; }
  .hero__aside { justify-self: end; max-width: 420px; }
}

/* ---------- Intro ---------- */
.intro__title { font-size: var(--t-3xl); margin-top: 18px; max-width: 12ch; }
.intro__title em { color: var(--accent); font-size: 1.1em; }
.intro__grid { display: grid; gap: 40px; margin-top: 40px; }
.intro__values { list-style: none; margin: 0; padding: 0; display: grid; }
.intro__values li { display: grid; gap: 6px; padding: 18px 0; border-top: 1px solid var(--line); }
.intro__values li:last-child { border-bottom: 1px solid var(--line); }
.intro__values b { font-family: var(--font-display); font-weight: 500; font-size: var(--t-md); letter-spacing: -0.015em; line-height: 1.3; }
@media (min-width: 900px) { .intro__grid { grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; } }

/* ---------- 29 Royale: sticky scene, scrolling beats ---------- */
.game { position: relative; isolation: isolate; display: grid; }
.game::before { content: ""; position: absolute; inset: 0; z-index: -2; background: radial-gradient(70% 50% at 30% 40%, rgba(90, 60, 170, 0.22), transparent 70%), radial-gradient(40% 40% at 80% 80%, rgba(255, 196, 77, 0.08), transparent 70%); }
.game__visual { position: sticky; top: 0; height: 54svh; z-index: 1; overflow: hidden; background: radial-gradient(60% 55% at 50% 45%, rgba(255, 196, 77, 0.16), transparent 70%), #000; display: grid; place-items: center; perspective: 1100px; }
.game__visual::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22%; background: linear-gradient(to bottom, transparent, var(--bg)); pointer-events: none; }
.game__caption { position: absolute; left: var(--gutter); bottom: 18px; color: var(--ink-3); }

/* the Jack of Hearts: brushed gold metal that catches light as the pointer moves, a glint on a slow loop, flat-design Jack medallion; tilts and flips */
.jack { position: relative; width: min(calc(36svh * 5 / 7), 280px); aspect-ratio: 5 / 7; container-type: inline-size; transform-style: preserve-3d; cursor: pointer; outline: none; border-radius: 16px; touch-action: manipulation; --gx: 30; --gy: 20; will-change: transform; }
.jack:focus-visible { outline: 2px solid var(--accent); outline-offset: 10px; }
.jack__inner { position: absolute; inset: 0; transform-style: preserve-3d; }
.jack__face { position: absolute; inset: 0; border-radius: 16px; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; border: 1px solid #5a3a0a; box-shadow: inset 0 0 0 1px rgba(255, 245, 205, 0.6), inset 0 -18px 30px -12px rgba(60, 35, 0, 0.45), 0 34px 60px -24px rgba(0, 0, 0, 0.9), 0 0 70px -12px rgba(255, 196, 77, 0.42); isolation: isolate; }
/* brushed metal: a banded gold base with fine grain; the band position follows the pointer */
.jack__face {
  background:
    linear-gradient(105deg, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0.9) 49%, rgba(255, 255, 255, 0) 60%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, rgba(0, 0, 0, 0.06) 1px 3px),
    linear-gradient(180deg, #4a3108 0%, #c99632 15%, #fff1bf 29%, #b07a22 45%, #f6d77a 60%, #6b4610 77%, #e8b957 91%, #7a520f 100%);
  background-size: 260% 100%, 100% 100%, 100% 100%;
  background-position: calc(100% - var(--gx) * 1%) 0, 0 0, 0 0;
}
.jack__face::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at calc(var(--gx) * 1%) calc(var(--gy) * 1%), rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 40%); mix-blend-mode: soft-light; pointer-events: none; }
.jack__face::after { content: ""; position: absolute; inset: -40%; background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.75) 50%, transparent 58%); animation: jack-glint 6s ease-in-out infinite; pointer-events: none; }
@keyframes jack-glint { 0%, 45% { transform: translateX(-75%); } 100% { transform: translateX(75%); } }
/* engraved inner frame */
.jack__front::before, .jack__back::before { outline: 1px solid rgba(70, 42, 4, 0.55); outline-offset: -9px; border-radius: 10px; }
.jack__front { color: #2b1a02; }
.jack__img { position: absolute; inset: 9px; width: calc(100% - 18px); height: calc(100% - 18px); object-fit: cover; border-radius: 9px; box-shadow: 0 0 0 1px rgba(70, 42, 4, 0.7), 0 1px 0 rgba(255, 245, 205, 0.7); }
.jack__back { transform: rotateY(180deg); display: grid; place-items: center; }
.jack__logo { width: 52%; height: auto; margin-top: -12%; filter: drop-shadow(0 1px 0 rgba(255, 241, 191, 0.5)); }
.jack__word { position: absolute; bottom: 13%; left: 0; right: 0; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 8.5cqi; letter-spacing: 0.34em; padding-left: 0.34em; color: #2b1a02; text-shadow: 0 1px 0 rgba(255, 241, 191, 0.65); }
@media (min-width: 900px) { .jack { width: min(calc(60svh * 5 / 7), 340px); } }
@media (prefers-reduced-motion: reduce) { .jack__face::after, .jack__back::after { animation: none; } }
.game__copy { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.game__beat { min-height: 48svh; display: grid; align-content: center; gap: 22px; padding-block: 40px; }
.game__title { font-size: var(--t-3xl); display: grid; }
.game__title span { display: block; }
.game__title em { color: var(--accent); font-size: 1.1em; }
.game__big { font-family: var(--font-display); font-weight: 600; font-size: var(--t-3xl); letter-spacing: -0.04em; line-height: 1; }
.game__big em { color: var(--accent); font-size: 1.1em; }
.game__stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 20px; max-width: 480px; }
.game__stats li { display: grid; gap: 4px; border-top: 1px solid var(--line-strong); padding-top: 12px; }
.game__stats b { font-variant-numeric: tabular-nums; font-family: var(--font-display); font-size: var(--t-xl); line-height: 1; letter-spacing: -0.03em; font-weight: 600; }
.game__stats b small { font-size: 0.5em; color: var(--accent); vertical-align: top; margin-left: 2px; }
.game__stats span { color: var(--ink-3); font-size: var(--t-xs); font-family: var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; }
.game__cta { display: flex; flex-wrap: wrap; gap: 10px; }
.game__note { font-family: var(--font-mono); font-size: var(--t-xs); letter-spacing: 0.14em; text-transform: uppercase; }
.game__features { display: grid; gap: 0; border-top: 1px solid var(--line); margin-top: 8px; }
.feat { padding: 22px 0; display: grid; gap: 8px; border-bottom: 1px solid var(--line); }
.feat h3 { font-size: var(--t-lg); font-weight: 500; letter-spacing: -0.02em; }
.feat p { color: var(--ink-2); font-size: var(--t-sm); max-width: 44ch; }
@media (min-width: 900px) {
  .game { grid-template-columns: 1fr 1fr; }
  .game__visual { height: 100svh; }
  .game__visual::after { display: none; }
  .game__copy { width: auto; margin: 0; padding: 0 var(--gutter) 0 clamp(24px, 4vw, 64px); }
  .game__beat { min-height: 100svh; padding-block: 80px; }
  .game__title { font-size: var(--t-2xl); }
  .game__big { font-size: var(--t-2xl); }
}

/* ---------- Studio ---------- */
.studio__grid { display: grid; gap: 40px; }
.studio__lead { display: grid; gap: 18px; }
.studio h2 { font-size: var(--t-3xl); }
.spec { margin: 0; align-self: end; display: grid; }
.spec > div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.spec > div:last-child { border-bottom: 1px solid var(--line); }
.spec dt { font-family: var(--font-mono); font-size: var(--t-xs); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); padding-top: 3px; }
.spec dd { margin: 0; color: var(--ink); }
.spec a { color: var(--accent); }
@media (min-width: 900px) { .studio__grid { grid-template-columns: 1.1fr 0.9fr; gap: 80px; } }
.strip { margin-top: 80px; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.strip__track { display: flex; width: max-content; }
.strip__item { width: min(78vw, 420px); padding: 36px 28px 40px; border-right: 1px solid var(--line); display: grid; gap: 12px; align-content: start; }
.strip__item span { font-family: var(--font-serif); font-style: italic; font-size: var(--t-2xl); color: var(--ink-4); line-height: 1; }
.strip__item b { font-family: var(--font-display); font-size: var(--t-lg); font-weight: 500; letter-spacing: -0.02em; }
.strip__item p { color: var(--ink-2); font-size: var(--t-sm); max-width: 32ch; }

/* ---------- Journal: editorial rows ---------- */
.journal__head { display: grid; gap: 20px; margin-bottom: 36px; }
.journal__head h2 { font-size: var(--t-3xl); margin-top: 14px; }
.journal__links { display: flex; gap: 24px; font-size: var(--t-sm); color: var(--ink-2); }
.journal__links a:hover { color: var(--accent); }
.journal__list { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "i kind kind" "i title title" "i meta arrow"; column-gap: 16px; row-gap: 8px; align-items: baseline; padding: 20px 0; border-bottom: 1px solid var(--line); position: relative; transition: padding 0.5s var(--ease-out); }
.row::before { content: ""; position: absolute; inset: 0 calc(-1 * var(--gutter) / 2); background: var(--glass); border-radius: var(--r-sm); opacity: 0; transition: opacity 0.4s; z-index: -1; }
.row:hover::before { opacity: 1; }
.row:hover { padding-left: 10px; }
.row__i { grid-area: i; font-family: var(--font-mono); font-size: var(--t-xs); color: var(--ink-3); align-self: start; padding-top: 4px; }
.row__kind { grid-area: kind; font-family: var(--font-mono); font-size: var(--t-xs); letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); }
.row__title { grid-area: title; font-family: var(--font-display); font-weight: 500; font-size: var(--t-lg); letter-spacing: -0.025em; line-height: 1.15; text-wrap: balance; max-width: 30ch; }
.row__meta { grid-area: meta; font-variant-numeric: tabular-nums; font-family: var(--font-mono); font-size: var(--t-xs); color: var(--ink-3); white-space: nowrap; }
.row__arrow { grid-area: arrow; font-family: var(--font-display); color: var(--ink-3); transition: transform 0.5s var(--ease-out), color 0.3s; align-self: end; }
.row:hover .row__arrow { transform: translateX(6px); color: var(--accent); }
@media (min-width: 900px) {
  .journal__head { grid-template-columns: 1fr auto; align-items: end; }
  .row { grid-template-columns: 56px 110px 1fr auto auto; grid-template-areas: "i kind title meta arrow"; column-gap: 24px; padding: 26px 0; }
  .row__title { font-size: var(--t-xl); }
}

/* ---------- Contact ---------- */
.contact { overflow: clip; }
.contact__title { font-size: var(--t-hero); line-height: 0.9; margin: 14px 0 28px; }
.contact__title em { color: var(--accent); }
.contact__email { display: inline-block; font-family: var(--font-display); font-size: clamp(1.1rem, 4.4vw, 3.4rem); font-weight: 500; letter-spacing: -0.03em; color: var(--ink); position: relative; padding-bottom: 8px; word-break: break-all; }
.contact__email::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent); transform: scaleX(0.18); transform-origin: left; transition: transform 0.6s var(--ease-out); }
.contact__email:hover::after { transform: scaleX(1); }
.contact__cols { display: grid; gap: 24px; margin-top: 56px; border-top: 1px solid var(--line); padding-top: 28px; }
.contact__cols > div { display: grid; gap: 8px; }
.contact__cols p:last-child { color: var(--ink-2); font-size: var(--t-sm); max-width: 30ch; }
@media (min-width: 720px) { .contact__cols { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 60; background: var(--ink); color: var(--accent-ink); padding: 10px 16px; border-radius: 999px; font-size: var(--t-sm); font-weight: 600; opacity: 0; visibility: hidden; transition: opacity 0.3s, transform 0.3s var(--ease-out), visibility 0.3s; pointer-events: none; }
.toast.is-on { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* small phones: the outline wordmark and the hero eyebrow must fit the gutter */
@media (max-width: 480px) {
  .footer__word { font-size: 13.6vw; }
}
@media (max-width: 380px) {
  .hero__eyebrow { letter-spacing: 0.06em; }
}

/* phones held sideways: the sticky panel takes the screen height so the card reads */
@media (orientation: landscape) and (max-height: 520px) {
  .game__visual { height: 100svh; }
  .game__visual::after { display: none; }
  .jack { width: min(calc(68svh * 5 / 7), 280px); }
}

/* illustrations in articles and listings */
.article__fig { margin: 0 0 44px; display: grid; gap: 12px; }
.prose .article__fig { margin: 44px 0; }
.article__fig--hero { margin-top: 8px; }
.article__fig svg.fig { width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--line); }
.article__fig figcaption { font-family: var(--font-mono); font-size: var(--t-xs); color: var(--ink-3); letter-spacing: 0.04em; line-height: 1.5; }
.post__art { aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); margin-bottom: 6px; }
.post__art svg.fig { width: 100%; height: 100%; display: block; }

