/* ==========================================================================
   Newrare — game studio site
   Vanilla CSS, no framework, no web font. Dark by design.
   Sections: tokens · base · nav · hero · buttons · sections · games ·
             apps · studio · contact · legal · doc · footer · modals ·
             responsive
   ========================================================================== */

/* ─────────────────────────────── tokens ─────────────────────────────── */
:root {
  --ink: #05060c;
  --ink-2: #080b16;
  --surface: #0f1425;
  --surface-2: #141a2e;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .16);

  --text: #eef1ff;
  --muted: #949dc0;
  --dim: #6b7398;

  --a1: #4bf5ff;
  --a2: #7a5cff;
  --a3: #ff4fbe;

  --radius: 18px;
  --radius-sm: 12px;
  --pad: clamp(18px, 4vw, 28px);
  --nav-h: 64px;

  color-scheme: dark;
}

/* ──────────────────────────────── base ─────────────────────────────── */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

/* No scroll-margin-top on the sections to go with it: the two ADD UP, and a
   section landed on by an anchor was clearing the sticky nav twice — 152px of
   gap where 76 was meant. scroll-padding-top alone covers every target,
   including the legal <details> panels. */

body {
  background: var(--ink);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body.locked { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

svg { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; }

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

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--pad);
}

.grad {
  background: linear-gradient(100deg, var(--a1), var(--a2) 55%, var(--a3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 999px;
}

.skip:focus { left: 12px; }

/* ───────────────────────────────── nav ────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: transparent;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition: background .3s ease, backdrop-filter .3s ease, box-shadow .3s ease;
}

/* Glass only once the page has moved: over the hero the bar is invisible and
   the artwork runs to the top of the screen. */
.nav.scrolled {
  background: linear-gradient(180deg, rgba(6, 8, 18, .82), rgba(6, 8, 18, .58));
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  box-shadow: 0 12px 30px -22px #000;
}

/* The hairline is an accent gradient rather than a flat rule — it is the one
   piece of chrome the whole site is seen through. */
.nav::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg,
      transparent,
      rgba(75, 245, 255, .35) 22%,
      rgba(122, 92, 255, .45) 50%,
      rgba(255, 79, 190, .3) 78%,
      transparent);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}

.nav.scrolled::after { opacity: 1; }

.nav-inner {
  height: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -.2px;
  transition: transform .18s ease;
}

.brand:hover { transform: translateY(-1px); }

.brand-mark {
  border-radius: 9px;
  box-shadow: 0 6px 18px -8px var(--a2);
  transition: box-shadow .2s ease;
}

.brand:hover .brand-mark { box-shadow: 0 8px 22px -6px var(--a1); }

.brand-name { font-size: 18px; }

.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  transition: color .18s ease, background .18s ease;
}

.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, .06); }

/* Scroll spy: which section the reader is in, marked in the bar. */
.nav-links a.active {
  color: var(--text);
  background: rgba(122, 92, 255, .16);
  box-shadow: inset 0 0 0 1px rgba(122, 92, 255, .35);
}

.nav-actions { display: flex; align-items: center; gap: 10px; }

.lang {
  width: 46px;
  height: 34px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .5px;
  color: var(--muted);
  transition: color .18s ease, border-color .18s ease;
}

.lang:hover { color: var(--a1); border-color: var(--a1); }

.burger { display: none; width: 40px; height: 34px; padding: 8px 6px; }

.burger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}

.burger span + span { margin-top: 5px; }

.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ──────────────────────────────── hero ───────────────────────────── */
/* The nav is transparent until the page moves, so the hero starts under it and
   pays the bar's height back in padding. */
.hero {
  position: relative;
  margin-top: calc(var(--nav-h) * -1);
  padding: calc(var(--nav-h) + clamp(48px, 9vh, 104px)) 0 clamp(56px, 10vh, 110px);
  overflow: hidden;
  isolation: isolate;
}

.hero-fx { position: absolute; inset: 0; z-index: -1; }

/* An arcade floor: a perspective grid running toward the reader. The scroll is
   on background-position, which the compositor animates for free. */
.hero-grid {
  position: absolute;
  inset: -30% -20% -10%;
  background-image:
    linear-gradient(to right, rgba(122, 92, 255, .26) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(75, 245, 255, .18) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: perspective(560px) rotateX(60deg);
  transform-origin: top center;
  /* The vanishing point sits above the viewport, so the near floor is at the
     bottom: the mask keeps it and dissolves the distance, which leaves the
     headline on a clean ground. */
  mask-image: linear-gradient(180deg, transparent 4%, rgba(0, 0, 0, .35) 42%, #000 96%);
  -webkit-mask-image: linear-gradient(180deg, transparent 4%, rgba(0, 0, 0, .35) 42%, #000 96%);
  opacity: .9;
  animation: floor 6s linear infinite;
}

@keyframes floor {
  from { background-position: 0 0; }
  to { background-position: 0 60px; }
}

/* CRT scanlines, just visible enough to read as a screen. */
.hero-scan {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, .035) 0 1px,
      transparent 1px 4px);
  mask-image: linear-gradient(180deg, #000 30%, transparent);
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent);
  pointer-events: none;
}

/* A horizon line where the floor meets the sky. */
.hero-fx::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--a1), var(--a2), transparent);
  opacity: .5;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .5;
  will-change: transform;
}

.hero-glow-a {
  width: 44vw;
  height: 44vw;
  min-width: 320px;
  min-height: 320px;
  top: -14%;
  left: -6%;
  background: var(--a2);
  animation: drift 22s ease-in-out infinite alternate;
}

.hero-glow-b {
  width: 38vw;
  height: 38vw;
  min-width: 280px;
  min-height: 280px;
  top: 6%;
  right: -8%;
  background: var(--a1);
  opacity: .32;
  animation: drift 18s ease-in-out infinite alternate-reverse;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(4vw, 5vh, 0) scale(1.15); }
}

/* The cast: two of the games' own characters, filled in by initHeroCast() in
   script.js. They stand ON the horizon line the grid ends at, in the margins
   either side of the headline — never behind it, which is why the whole layer
   is hidden below 1080px, where the text column takes the full width and the
   only place left for a character would be under the words. */
.hero-cast {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: none;
}

@media (min-width: 1080px) {
  .hero-cast { display: block; }
}

.hero-face {
  position: absolute;
  bottom: 0;
  width: clamp(150px, 15vw, 250px);
  height: auto;
  /* The paintings are dark and the headline is the subject: the cast reads as
     figures lit by the floor, not as two competing illustrations. */
  opacity: .82;
  filter: drop-shadow(0 18px 34px rgba(4, 6, 20, .7));
  /* They fade up on arrival, then breathe. One animation each, the second
     offset by initHeroCast so the two are never in step. */
  animation: hero-face-in .9s ease-out both, hero-float 7s ease-in-out 1s infinite;
  will-change: transform;
}

.hero-face-left { left: clamp(8px, 3vw, 64px); }
.hero-face-right { right: clamp(8px, 3vw, 64px); transform: scaleX(-1); }

@keyframes hero-face-in {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: .82; transform: translateY(0); }
}

@keyframes hero-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* A mirrored character must stay mirrored through both animations, so the
   right-hand side gets its own keyframes rather than a transform that the
   animation would overwrite. */
.hero-face-right { animation-name: hero-face-in-r, hero-float-r; }

@keyframes hero-face-in-r {
  from { opacity: 0; transform: scaleX(-1) translateY(28px); }
  to { opacity: .82; transform: scaleX(-1) translateY(0); }
}

@keyframes hero-float-r {
  0%, 100% { transform: scaleX(-1) translateY(0); }
  50% { transform: scaleX(-1) translateY(-14px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-face { animation: hero-face-in .9s ease-out both; }
  .hero-face-right { animation-name: hero-face-in-r; }
}

.hero-inner { position: relative; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 16px;
  margin-bottom: 24px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 255, 255, .03);
}

/* A live dot: the chip says a studio that is currently shipping. */
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--a1);
  box-shadow: 0 0 0 0 rgba(75, 245, 255, .55);
  animation: pulse 2.4s ease-out infinite;
  flex: none;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(75, 245, 255, .55); }
  70%, 100% { box-shadow: 0 0 0 9px rgba(75, 245, 255, 0); }
}

h1 {
  font-size: clamp(36px, 7.8vw, 72px);
  line-height: 1.02;
  font-weight: 850;
  letter-spacing: -1.8px;
  text-wrap: balance;
}

h1 span { display: block; }

.lead {
  max-width: 640px;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: clamp(15px, 2.2vw, 18px);
}

.hero-cta {
  margin-top: 34px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stats {
  margin: 46px auto 0;
  max-width: 620px;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.hero-stats li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .025);
}

.hero-stats b {
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 850;
  letter-spacing: -.6px;
  background: linear-gradient(120deg, var(--a1), var(--a2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-stats span {
  font-size: 12px;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--dim);
}

/* A tile whose label is a sentence rather than a unit: uppercase tracking is
   for two words, not for a list of titles. */
.hero-stats .stat-wide span {
  text-transform: none;
  letter-spacing: .1px;
  font-size: 12.5px;
  line-height: 1.45;
}

/* ─────────────────────────────── buttons ─────────────────────────── */
/* A button never carries a real border. A 1px transparent border under a
   gradient background leaves the page showing through exactly where a pill's
   curve is tightest — the hairline on the left and right edges that reads as a
   cropped radius. The outline is an inset shadow instead, which paints inside
   the radius, and every variant keeps the same geometry. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 23px;
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  transition: transform .16s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}

.btn-sm { padding: 10px 17px; font-size: 14px; }

.btn-primary {
  background-image: linear-gradient(100deg, var(--a1), var(--a2));
  color: #05060c;
  box-shadow: 0 10px 30px -12px var(--a2);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -12px var(--a2); }

.btn-ghost {
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-2);
}

.btn-ghost:hover {
  color: var(--a1);
  background-color: rgba(75, 245, 255, .07);
  box-shadow: inset 0 0 0 1px var(--a1);
}

.btn:active { transform: translateY(0) scale(.98); }

/* A CTA whose destination does not exist yet keeps the exact geometry of the
   live one and loses its colour: two cards side by side then read as one row
   of buttons instead of a button facing a status chip. It is a real disabled
   <button>, so it is inert and announced as such — never a link to nowhere. */
.btn[disabled] {
  cursor: not-allowed;
  color: var(--dim);
  background-image: none;
  background-color: rgba(255, 255, 255, .035);
  box-shadow: inset 0 0 0 1px var(--line);
}

.btn[disabled] svg { opacity: .55; }

.btn[disabled]:hover,
.btn[disabled]:active {
  transform: none;
  color: var(--dim);
  background-color: rgba(255, 255, 255, .035);
  box-shadow: inset 0 0 0 1px var(--line);
}

/* ─────────────────────────────── sections ────────────────────────── */
.section { padding: clamp(56px, 9vw, 96px) 0; }

.section-alt {
  background: linear-gradient(180deg, transparent, var(--ink-2) 18%, var(--ink-2) 82%, transparent);
}

.section-head { max-width: 660px; margin-bottom: clamp(30px, 5vw, 44px); }

.section-head h2 {
  font-size: clamp(26px, 4.6vw, 40px);
  font-weight: 850;
  letter-spacing: -1px;
  line-height: 1.1;
}

.sub { margin-top: 12px; color: var(--muted); font-size: clamp(14px, 2vw, 17px); }

/* ──────────────────────────────── games ──────────────────────────── */
/* Flex rather than grid: a grid leaves the last row hanging on the left when
   the game count does not divide the column count, and this list is centred. */
.games {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

.game {
  --g1: var(--a1);
  --g2: var(--a2);
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 288px;
  max-width: 380px;
  padding: 20px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, box-shadow .25s ease;
}

/* The accent wash is per game: the card borrows the colours of its own art. */
.game::before {
  content: "";
  position: absolute;
  inset: -60% 30% 60% -30%;
  background: radial-gradient(closest-side, var(--g1), transparent 70%);
  opacity: .16;
  pointer-events: none;
  transition: opacity .25s ease;
}

.game:hover {
  transform: translateY(-4px);
  border-color: var(--line-2);
  box-shadow: 0 22px 44px -20px rgba(0, 0, 0, .9);
}

.game:hover::before { opacity: .3; }

.game-top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 66px;
}

.game-icon {
  width: 66px;
  height: 66px;
  border-radius: 16px;
  border: 1px solid var(--line-2);
  box-shadow: 0 10px 26px -12px var(--g2);
}

.game-id { min-width: 0; }

.game-id h3 {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-tags {
  margin-top: 12px;
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  list-style: none;
  overflow: hidden;
}

.game-tags li {
  flex: 0 1 auto;
  min-width: 0;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--g1);
  background: color-mix(in srgb, var(--g1) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--g1) 26%, transparent);
}

.game-desc {
  position: relative;
  margin: 12px 0 18px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.5;
  height: calc(4 * 1.5 * 14.5px);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: none;
}

.game-actions { position: relative; display: flex; gap: 8px; }

.game-actions .btn-primary {
  background: linear-gradient(100deg, var(--g1), var(--g2));
  box-shadow: 0 10px 26px -14px var(--g2);
  flex: 1;
  justify-content: center;
}

/* ──────────────────────────────── apps ───────────────────────────── */
.apps-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.app-card {
  display: flex;
  gap: 18px;
  min-height: 208px;
  padding: 22px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.app-icon {
  width: 86px;
  height: 86px;
  border-radius: 20px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .04);
  object-fit: contain;
  flex: none;
}

/* The body owns the free space so the actions can be pinned to the bottom:
   the CTA row then sits at the same height whatever the blurb is worth. */
.app-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }

.app-body h3 { font-size: 20px; font-weight: 800; letter-spacing: -.3px; }

.app-body p { margin: 8px 0 16px; color: var(--muted); font-size: 14.5px; }

.app-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: auto;
}

/* ─────────────────────────────── studio ──────────────────────────── */
.studio-grid {
  display: grid;
  gap: clamp(24px, 5vw, 54px);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}

.studio-lead { font-size: clamp(16px, 2.4vw, 20px); color: var(--muted); }

.studio-points { list-style: none; display: grid; gap: 16px; }

.studio-points li {
  padding-left: 16px;
  border-left: 2px solid;
  border-image: linear-gradient(180deg, var(--a1), var(--a2)) 1;
}

.studio-points b { display: block; font-size: 15px; font-weight: 800; }

.studio-points span { color: var(--muted); font-size: 14.5px; }

/* ─────────────────────────────── contact ─────────────────────────── */
.contact { text-align: center; }

.contact h2 {
  font-size: clamp(24px, 4.2vw, 36px);
  font-weight: 850;
  letter-spacing: -.9px;
}

.contact .btn { margin-top: 24px; }

/* ──────────────────────────────── legal ──────────────────────────── */
.legal { padding-top: 0; }

.terms {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-2);
}

.terms + .terms { margin-top: 12px; }

/* Landing on a panel from a footer link should be obvious. */
.terms:target,
.terms[open] { border-color: var(--line-2); }

.terms > summary {
  padding: 18px 22px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.terms > summary::-webkit-details-marker { display: none; }

.terms > summary::after {
  content: "+";
  margin-left: auto;
  font-size: 20px;
  line-height: 1;
  color: var(--dim);
}

.terms[open] > summary::after { content: "−"; }

.terms[open] > summary { color: var(--text); }

.terms > summary:hover { color: var(--text); }

.terms-body { padding: 0 22px 24px; max-width: 780px; }

.terms-body h3 {
  margin-top: 20px;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

.terms-body p,
.terms-body li { color: var(--muted); font-size: 14.5px; }

.terms-body ul { margin: 8px 0 0 20px; }

.legal-links {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 14.5px;
  color: var(--muted);
}

.legal-links a { border-bottom: 1px solid var(--line-2); }

.legal-links a:hover { color: var(--a1); border-color: var(--a1); }

/* ──────────────────────────────── doc ────────────────────────────── */
/* A standing legal page — privacy.html today. One column of prose under the
   nav, no hero: the URL is meant to be pasted into a store listing, so it has
   to open on the text. */
.doc { padding-top: calc(var(--nav-h) + clamp(32px, 6vw, 64px)); }

.doc h1 {
  margin-top: 10px;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.15;
}

.doc-meta { margin-top: 10px; color: var(--dim); font-size: 14px; }

.doc-body {
  max-width: 760px;
  margin-top: clamp(26px, 4vw, 38px);
  padding: var(--pad);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-2);
}

.doc-lead { color: var(--text); font-size: clamp(15px, 2vw, 17px); }

.doc-body h2 {
  margin-top: 30px;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.doc-body p,
.doc-body li { margin-top: 10px; color: var(--muted); font-size: 14.5px; }

.doc-body ul { margin: 8px 0 0 20px; }

.doc-back { margin-top: 28px; }

/* ─────────────────────────────── footer ──────────────────────────── */
.foot {
  border-top: 1px solid var(--line);
  background: var(--ink-2);
  padding: 40px 0 24px;
}

.foot-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.foot-brand { display: flex; align-items: center; gap: 12px; }

.foot-brand img { border-radius: 8px; }

.foot-brand div { display: flex; flex-direction: column; line-height: 1.35; }

.foot-brand span { color: var(--dim); font-size: 13px; }

.foot-links {
  margin-left: auto;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.foot-links a {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
}

.foot-links a:hover { color: var(--text); background: rgba(255, 255, 255, .06); }

.foot-bottom {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--dim);
  font-size: 13px;
}

/* ─────────────────────────────── modals ──────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal[hidden] { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 4, 9, .84);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fade .2s ease;
}

@keyframes fade { from { opacity: 0; } }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--muted);
  border: 1px solid transparent;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.icon-btn:hover { color: var(--text); background: rgba(255, 255, 255, .08); border-color: var(--line); }

.icon-btn svg { width: 18px; height: 18px; }

/* Player: the games are authored portrait (720x1280), so the stage is 9:16
   and never wider than the viewport allows. */
.player-box {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(440px, 100%);
  max-height: 100%;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  overflow: hidden;
  animation: rise .22s ease;
}

.player-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 18px;
  border-bottom: 1px solid var(--line);
}

.player-bar h3 { font-size: 16px; font-weight: 800; }

.player-tools { margin-left: auto; display: flex; gap: 4px; }

.player-stage {
  position: relative;
  aspect-ratio: 9 / 16;
  max-height: calc(100vh - 140px);
  background: #000;
}

.player-stage iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Lightbox */
.shots-box {
  position: relative;
  display: grid;
  place-items: center;
  width: min(1000px, 100%);
  animation: rise .22s ease;
}

#shotsImg {
  max-height: min(78vh, 900px);
  width: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-2);
  background: #000;
}

.shots-close { position: absolute; top: -46px; right: 0; }

.shots-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(10, 13, 24, .8);
  border: 1px solid var(--line-2);
  color: var(--text);
  font-size: 18px;
  line-height: 1;
}

.shots-nav:hover { border-color: var(--a1); color: var(--a1); }

.shots-nav.prev { left: -8px; }
.shots-nav.next { right: -8px; }

.shots-count {
  position: absolute;
  bottom: -34px;
  color: var(--dim);
  font-size: 13px;
  letter-spacing: 1px;
}

/* ────────────────────────────── responsive ───────────────────────── */
@media (max-width: 900px) {
  .studio-grid { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  .burger { display: block; }

  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 auto;
    margin: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 14px var(--pad) 22px;
    background: rgba(6, 8, 18, .92);
    backdrop-filter: blur(18px) saturate(1.6);
    -webkit-backdrop-filter: blur(18px) saturate(1.6);
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
  }

  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }

  .nav-links a { padding: 14px 12px; font-size: 17px; }

  /* .nav-links leaves the flow on mobile, so the actions take over the push. */
  .nav-actions { margin-left: auto; }

  .app-card { flex-direction: column; }

  .app-icon { width: 72px; height: 72px; }

  .foot-links { margin-left: 0; width: 100%; }
}

@media (max-width: 620px) {
  .modal { padding: 0; }

  .player-box {
    width: 100%;
    height: 100%;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  .player-stage {
    flex: 1;
    aspect-ratio: auto;
    max-height: none;
  }

  .shots-close { top: 10px; right: 10px; z-index: 2; }
  .shots-nav.prev { left: 4px; }
  .shots-nav.next { right: 4px; }
  .shots-count { bottom: 12px; }
  #shotsImg { max-height: 78vh; }

  .hero-stats { gap: 8px; }
  .hero-stats li { padding: 12px 6px; }
  .hero-stats span { font-size: 10.5px; letter-spacing: .4px; }
}

/* Motion is decoration here: strip it when the visitor asked for that. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
