/* Urokai Games
   Dusk violet leads (the top bar and the hero); the rest of the page alternates ink and a slightly lifted panel tone.
   Gold (Stickline's title colour) is an accent only: primary buttons, the logo mark, key links and thin rules.
   One typeface (Archivo, self-hosted): compressed and heavy for headings, normal width for reading. */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-var.woff2") format("woff2");
  font-weight: 400 900;
  font-stretch: 62% 125%;
  font-display: swap;
  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;
}

:root {
  color-scheme: dark;
  --ink: #16151a;
  --dusk: #2a2431;    /* lead colour: the hero and the top bar */
  --panel: #1e1c24;
  --raised: #27242e;
  --paper: #f5efe2;
  --muted: #c9c1cf;   /* secondary text on ink, 10:1 */
  --gold: #f2b630;
  --gold-hover: #ffc94d;
  --red-light: #ff9b8d; /* the red army's light tone, for boss levels */
  --red: #e0473a;
  --line: rgba(245, 239, 226, 0.12);

  --face: "Archivo", system-ui, sans-serif;
  --size-xl: clamp(4rem, 18.6vw, 17rem);    /* page title: "Urokai Games" fills the grid width */
  --size-xl-game: clamp(3.5rem, 11vw, 11rem);
  --size-big: clamp(3rem, 8.5vw, 8.5rem);   /* the Stickline chapter heading */
  --size-l: clamp(2.5rem, 5vw, 4.5rem);      /* section headings */
  --size-m: clamp(1.5rem, 2.4vw, 2rem);      /* names in lists */
  --size-body: clamp(1.0625rem, 1.1vw, 1.1875rem);
  --size-s: 0.9375rem;

  --margin: clamp(20px, 3.4vw, 48px);
  --gap: clamp(20px, 2.4vw, 32px);
  --section: clamp(72px, 9vw, 136px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 400 var(--size-body) / 1.6 var(--face);
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
}
img, iframe { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { color: var(--gold); }
p { margin: 0; max-width: 64ch; }
h1, h2, h3 { margin: 0; font-weight: 900; font-stretch: 62%; line-height: 0.92; letter-spacing: -0.005em; text-wrap: balance; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--margin); top: -100px; z-index: 10; background: var(--gold); color: var(--ink); padding: 12px 18px; font-weight: 700; }
.skip:focus { top: 12px; }

/* ---------- Sections ---------- */
.chapter { padding: var(--section) var(--margin); }
.chapter > .inner { max-width: 1320px; margin: 0 auto; }
.field-ink   { background: var(--ink); }
.field-panel { background: var(--panel); }
.field-dusk  { background: var(--dusk); }
.h-big { font-size: var(--size-big) !important; }
.chapter h2 { font-size: var(--size-l); margin-bottom: clamp(28px, 3.2vw, 44px); }
.lede { font-size: clamp(1.1875rem, 1.6vw, 1.4375rem); line-height: 1.45; color: var(--paper); }
.muted { color: var(--muted); }

/* One 12-column grid */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: clamp(32px, 4vw, 48px); }
.grid > * { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .span-5 { grid-column: span 5; }
  .span-6 { grid-column: span 6; }
  .span-7 { grid-column: span 7; }
  .start-7 { grid-column: 7 / -1; }
  .start-8 { grid-column: 8 / -1; }
}
.stack > * + * { margin-top: 1.1em; }

/* ---------- Top bar ---------- */
.bar { background: var(--dusk); padding: 14px var(--margin); }
.bar .inner { max-width: 1320px; margin: 0 auto; display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 900; font-stretch: 62%; font-size: 1.75rem; line-height: 1; }
.wordmark:hover { color: var(--paper); }
.wordmark svg { width: 32px; height: 32px; flex: none; }
.bar nav { display: flex; gap: clamp(14px, 2.4vw, 32px); margin-left: auto; font-weight: 600; }
.bar nav a { text-decoration: none; padding: 10px 0; color: var(--muted); }
.bar nav a:hover, .bar nav a[aria-current="page"] { color: var(--paper); text-decoration: underline; text-decoration-color: var(--gold); }
@media (max-width: 640px) {
  .bar nav { display: none; }
  .bar .btn { margin-left: auto; }
}

/* ---------- Buttons: square, flat; gold is the primary action ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  font: 800 1.0625rem/1 var(--face); font-stretch: 100%; text-decoration: none;
  background: var(--gold); color: var(--ink); border: 2px solid var(--gold); cursor: pointer;
  transition: transform 0.18s var(--ease-out), background-color 0.18s var(--ease-out);
}
.btn:hover { background: var(--gold-hover); border-color: var(--gold-hover); color: var(--ink); transform: translateY(-2px); }
.btn:active { transform: translateY(1px); transition-duration: 0.06s; }
.btn svg { width: 15px; height: 15px; }
.btn-ghost { background: transparent; color: var(--paper); border-color: rgba(245, 239, 226, 0.5); }
.btn-ghost:hover { background: transparent; color: var(--gold); border-color: var(--gold); }
.btn-small { min-height: 44px; padding: 0 18px; font-size: 1rem; }
.link-strong { font-weight: 700; padding: 12px 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }

/* ---------- Hero: the live battle is the centrepiece ---------- */
.hero { padding-top: clamp(48px, 6vw, 88px); padding-bottom: clamp(56px, 7vw, 104px); }
.hero h1 { font-size: var(--size-xl); letter-spacing: -0.015em; margin-left: -0.04em; }
.hero.game h1 { font-size: var(--size-xl-game); }
.legal-hero.hero h1, .lost h1 { font-size: clamp(3.5rem, 11vw, 11rem); }
.hero .intro { display: grid; gap: 24px; margin-top: clamp(20px, 2.4vw, 32px); align-items: end; }
.hero .intro p { font-size: clamp(1.25rem, 1.9vw, 1.75rem); line-height: 1.35; font-weight: 500; max-width: 32ch; color: var(--paper); }
@media (min-width: 900px) { .hero .intro { grid-template-columns: 1fr auto; } }
.stage { position: relative; margin-top: clamp(36px, 4.4vw, 60px); background: #0e0d11; aspect-ratio: 16 / 9; overflow: hidden; outline: 1px solid var(--line); }
.stage img, .stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.stage iframe { pointer-events: none; opacity: 0; transition: opacity 0.8s var(--ease-out); }
.stage iframe.on { opacity: 1; }
.stage-caption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 14px; font-size: var(--size-s); color: var(--muted); }
.stage-caption a { color: var(--paper); }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--red); margin-right: 8px; }
@media (prefers-reduced-motion: no-preference) { .live .live-dot { animation: pulse 1.6s ease-in-out infinite; } }
@keyframes pulse { 50% { opacity: 0.25; } }

/* ---------- Pictures and facts ---------- */
.shot { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
figure { margin: 0; }
figcaption { font-size: var(--size-s); padding-top: 10px; color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 32px 0 36px; }
.facts div { background: var(--raised); padding: 16px 18px; }
.field-panel .facts div, .field-dusk .facts div { background: rgba(245, 239, 226, 0.08); }
.facts dt { font-size: var(--size-s); color: var(--muted); }
.facts dd { margin: 4px 0 0; font-size: 1.25rem; font-weight: 800; font-stretch: 85%; line-height: 1.2; }

/* ---------- Lists (units, levels) ---------- */
.biglist { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(28px, 3vw, 40px) var(--gap); }
@media (min-width: 700px) { .biglist.cols-2, .biglist.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .biglist.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.biglist strong { display: block; font-size: var(--size-m); font-weight: 900; font-stretch: 62%; line-height: 1; margin-bottom: 8px; }
.biglist .meta { display: block; font-weight: 700; font-size: var(--size-s); color: var(--gold); margin-bottom: 4px; }
.biglist p { font-size: 1.0625rem; color: var(--muted); }
.levels li { display: grid; grid-template-columns: calc(var(--size-m) * 1.05) 1fr; column-gap: 12px; }
.levels .n { font-size: var(--size-m); font-weight: 900; font-stretch: 62%; line-height: 1; font-variant-numeric: tabular-nums; color: rgba(245, 239, 226, 0.4); }
.levels .meta { color: var(--muted); font-weight: 600; }
.levels .boss { color: var(--red-light); font-weight: 700; }

/* ---------- Studio: statement + a 2x2 grid of values ---------- */
.values { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 600px) { .values { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.values li { background: var(--panel); padding: 22px 22px 24px; border-top: 2px solid var(--gold); }
.field-panel .values li { background: var(--ink); }
.field-dusk .values li { background: rgba(245, 239, 226, 0.06); }
.values h3 { font-size: 1.375rem; font-stretch: 85%; font-weight: 800; line-height: 1.15; margin-bottom: 8px; }
.values p { font-size: 1.0625rem; color: var(--muted); }

/* ---------- Contact band ---------- */
.contact-band { padding-top: clamp(56px, 6vw, 88px); padding-bottom: clamp(56px, 6vw, 88px); }
.contact-band .inner { display: grid; gap: 24px 48px; align-items: center; }
@media (min-width: 900px) { .contact-band .inner { grid-template-columns: 1fr auto; } }
.contact-band h2 { margin-bottom: 12px; }
.contact-band p { color: var(--muted); }
.mail { font-weight: 800; font-size: clamp(1.25rem, 1.8vw, 1.5rem); color: var(--gold); overflow-wrap: anywhere; }
.copy-status { font-size: var(--size-s); color: var(--muted); min-height: 1.5em; }

/* ---------- Controls table ---------- */
.controls { width: 100%; border-collapse: collapse; font-size: 1.0625rem; }
.controls th, .controls td { text-align: left; vertical-align: top; padding: 14px 0; border-bottom: 1px solid var(--line); }
.controls th { font-weight: 600; padding-right: 20px; width: 36%; color: var(--muted); }
kbd { font: 800 0.875rem/1 var(--face); background: var(--paper); color: var(--ink); padding: 5px 7px; display: inline-block; min-width: 1.7em; text-align: center; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); border-top: 1px solid var(--line); padding: 40px var(--margin) 44px; }
.footer .inner { max-width: 1320px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; }
.footer .brand { display: flex; align-items: center; gap: 14px; }
.footer .brand .wordmark { font-size: 1.5rem; }
.footer .brand small { font-size: var(--size-s); color: var(--muted); }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 1rem; }
.footer a { text-decoration: none; font-weight: 600; padding: 6px 0; }
.footer a:hover { text-decoration: underline; }

/* ---------- Privacy (long reading page) ---------- */

.legal-hero .updated { margin-top: 24px; font-size: var(--size-s); color: var(--muted); }
.legal-body { max-width: 68ch; }
.legal-body h2 { font-size: var(--size-m); line-height: 1.05; margin: clamp(40px, 4vw, 56px) 0 14px; }
.legal-body h2:first-child { margin-top: 0; }
.legal-body p + p { margin-top: 1em; }
.legal-body ul { margin: 0; padding-left: 1.2em; }
.legal-body li + li { margin-top: 0.4em; }
.legal-body a:not(.btn), .legal-hero a:not(.btn) { font-weight: 700; color: var(--gold); }
.legal-body code { font-size: 0.9em; background: var(--raised); padding: 1px 6px; }

/* A button that reads as a link ("Cookie settings") */
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
.link-btn:hover { color: var(--gold); }
.legal-body .link-btn { font-weight: 700; color: var(--gold); }
.footer .link-btn { font-weight: 600; padding: 6px 0; text-decoration: none; }
.footer .link-btn:hover { text-decoration: underline; }

/* ---------- 404 ---------- */

.lost p { font-size: clamp(1.1875rem, 1.7vw, 1.5rem); margin: 24px 0 36px; max-width: 34ch; color: var(--muted); }

/* ---------- Entrance: content stays visible without script ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-rise] { opacity: 0; transform: translateY(20px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
  .js [data-rise].in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:hover { transform: none; }
}

/* ---------- Press kit ---------- */
.sheet { margin: 0; display: grid; gap: 0; }
.sheet div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 520px) { .sheet div { grid-template-columns: minmax(0, 9.5em) minmax(0, 1fr); gap: 16px; } }
.sheet dd { overflow-wrap: anywhere; }
.sheet dt { color: var(--muted); }
.sheet dd { margin: 0; font-weight: 700; }
.sheet a, .files a { color: var(--gold); }
.points { margin: 0; padding-left: 1.2em; color: var(--muted); }
.points li + li { margin-top: 0.4em; }
.small-h { font-size: 1.375rem; font-stretch: 85%; font-weight: 800; margin: 0 0 14px; }
.files { list-style: none; margin: 0; padding: 0; }
.files li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.files a { font-weight: 700; }
.files span { color: var(--muted); font-size: var(--size-s); }
.head-row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; margin-bottom: clamp(28px, 3.2vw, 44px); }
.head-row h2 { margin-bottom: 0 !important; }
.gallery { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); align-items: start; }
.gallery a { display: block; background: #0e0d11; }
.gallery img { width: 100%; height: auto; }
.gallery a:hover img { outline: 2px solid var(--gold); outline-offset: 3px; }
.gallery span { display: block; padding-top: 10px; font-size: var(--size-s); color: var(--muted); }
.logo-preview { width: 100%; height: auto; outline: 1px solid var(--line); }
video.shot { background: #0e0d11; }
