/* ==========================================================================
   Fierce Guppy Game Demos — shared design system
   Built on the Fierce Guppy brand guidelines (see README → Brand):
     primary  #00B2F3  (logo blue — highlights, buttons, titles)
     dark     #060C18  (black alternative — backgrounds, text on light)
     light    #DCE7EC  (white alternative — text on dark)
     secondary #CA0BF1 (logo magenta)   tertiary #0DD895 (logo green)
     logo gradient #0DD895 → #0E91BD → #234288
     type: Ubuntu — Bold for titles, Regular for subtitles/links/UI, Light for body copy
   ========================================================================== */

:root {
  /* brand palette */
  --fg-blue: #00b2f3;
  --fg-blue-2: #5ed0ff;      /* tint of the primary for gradients / hover */
  --fg-dark: #060c18;
  --fg-light: #dce7ec;
  --fg-magenta: #ca0bf1;
  --fg-magenta-2: #e35cff;
  --fg-green: #0dd895;
  --fg-grad: linear-gradient(135deg, #0dd895 0%, #0e91bd 55%, #234288 100%);

  /* surfaces — the brand dark, lifted with a touch of the primary blue */
  --bg: var(--fg-dark);
  --bg-2: #0a1222;
  --surface: #0f1a2c;
  --surface-2: #14223a;
  --surface-3: #1b2d48;
  --line: rgba(220, 231, 236, 0.08);
  --line-2: rgba(220, 231, 236, 0.16);
  --text: var(--fg-light);
  --text-2: #a3b4c2;
  --text-3: #6b7f92;

  --accent: var(--fg-blue);
  --accent-2: var(--fg-green);
  --on-accent: var(--fg-dark);

  /* type */
  --font-display: "Ubuntu", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Ubuntu", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "Ubuntu Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --w-light: 300;
  --w-regular: 400;
  --w-medium: 500;
  --w-bold: 700;

  /* shape */
  --radius: 20px;
  --radius-sm: 12px;
  --radius-xs: 8px;

  /* motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 220ms;

  --container: 1180px;
  --header-h: 72px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: var(--w-regular);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Ambient background: soft brand glows + a faint dot grid */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 600px at 12% -10%, rgba(0, 178, 243, 0.22), transparent 60%),
    radial-gradient(800px 600px at 100% 10%, rgba(13, 216, 149, 0.12), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, rgba(202, 11, 241, 0.12), transparent 60%),
    var(--bg);
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(220, 231, 236, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 70%);
  pointer-events: none;
}

img, svg, video, iframe { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: var(--w-bold); line-height: 1.1; letter-spacing: -0.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

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

::selection { background: rgba(0, 178, 243, 0.4); color: #fff; }

.container {
  width: min(var(--container), calc(100% - 40px));
  margin-inline: auto;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.mono { font-family: var(--font-mono); font-size: 0.9em; letter-spacing: 0.02em; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}
.eyebrow::before {
  content: "";
  width: 18px; height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--fg-green), var(--fg-blue));
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  background: rgba(6, 12, 24, 0.6);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
/* The combination logo (mascot + wordmark) — the brand's full logo, used for headers/branding */
.brand-logo {
  height: 44px;
  width: auto;
  flex: none;
  filter: drop-shadow(0 6px 16px rgba(0, 178, 243, 0.28));
  transition: transform var(--dur) var(--ease), filter var(--dur) var(--ease);
}
.brand:hover .brand-logo { transform: translateY(-1px) scale(1.02); filter: drop-shadow(0 8px 20px rgba(0, 178, 243, 0.45)); }
.brand-tag {
  margin-left: 2px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(220, 231, 236, 0.04);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  white-space: nowrap;
}
.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: var(--w-regular);
  color: var(--text-2);
  white-space: nowrap;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.nav a:hover { color: var(--text); background: rgba(220, 231, 236, 0.06); }
.nav a.nav-cta {
  color: var(--on-accent);
  background: var(--fg-blue);
  font-weight: var(--w-medium);
}
.nav a.nav-cta:hover { background: var(--fg-blue-2); }
@media (max-width: 640px) {
  .brand-tag { display: none; }
  .brand-logo { height: 38px; }
  .nav a:not(.nav-cta) { display: none; }
}

/* --------------------------------------------------------------------------
   Buttons & chips
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: var(--w-medium);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              background var(--dur) var(--ease), border-color var(--dur) var(--ease), filter var(--dur) var(--ease);
  user-select: none;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn[hidden] { display: none; }
.btn-primary {
  color: var(--on-accent);
  background: var(--fg-blue);
  box-shadow: 0 10px 30px -10px rgba(0, 178, 243, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-primary:hover { background: var(--fg-blue-2); box-shadow: 0 16px 36px -10px rgba(0, 178, 243, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.35); transform: translateY(-1px); }
.btn-ghost {
  color: var(--text);
  background: rgba(220, 231, 236, 0.05);
  border-color: var(--line-2);
}
.btn-ghost:hover { background: rgba(220, 231, 236, 0.09); border-color: rgba(220, 231, 236, 0.24); }
.btn-lg { padding: 16px 28px; font-size: 17px; }
.btn svg { width: 1.05em; height: 1.05em; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(220, 231, 236, 0.03);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: var(--w-regular);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.chip:hover { color: var(--text); border-color: rgba(220, 231, 236, 0.28); }
.chip.is-active {
  color: var(--on-accent);
  background: var(--fg-blue);
  border-color: var(--fg-blue);
  font-weight: var(--w-medium);
}
.chip .count {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(6, 12, 24, 0.35);
}
.chip.is-active .count { background: rgba(6, 12, 24, 0.18); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(6, 12, 24, 0.74);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(220, 231, 236, 0.14);
  color: var(--text);
}
.badge-dot::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--badge-color, var(--fg-blue));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--badge-color, var(--fg-blue)) 25%, transparent);
}
/* engine = primary blue, web = logo green, status (prototype / in-progress) = logo magenta */
.badge-unity { --badge-color: var(--fg-blue); }
.badge-web { --badge-color: var(--fg-green); }
.badge-status { --badge-color: var(--fg-magenta-2); }

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(220, 231, 236, 0.045);
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: var(--w-regular);
  white-space: nowrap;
}
.meta-pill svg { width: 14px; height: 14px; opacity: 0.8; }

/* --------------------------------------------------------------------------
   Hero (landing)
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding: clamp(56px, 9vw, 116px) 0 clamp(40px, 6vw, 72px);
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr);
  gap: 48px;
  align-items: center;
}
.hero-title {
  margin: 18px 0 20px;
  font-size: clamp(40px, 6.2vw, 76px);
  font-weight: var(--w-bold);
  line-height: 1.02;
  letter-spacing: -0.025em;
  max-width: 12ch;
}
.hero-title .accent {
  background: linear-gradient(92deg, var(--fg-green) 0%, var(--fg-blue) 55%, var(--fg-magenta-2) 115%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  font-size: clamp(16px, 1.4vw, 19px);
  font-weight: var(--w-light);
  color: var(--text-2);
  max-width: 52ch;
  line-height: 1.65;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 38px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-num {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: var(--w-bold);
  letter-spacing: -0.02em;
  color: var(--fg-blue);
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* Hero visual: a floating phone-shaped "screen" showing the featured cover */
.hero-visual {
  position: relative;
  justify-self: end;
  width: min(100%, 330px);
  aspect-ratio: 9 / 16;
  max-height: 560px;
}
.hero-visual .phone {
  position: absolute;
  inset: 0;
  border-radius: 34px;
  padding: 10px;
  background: linear-gradient(160deg, #1f3352, #0c1526);
  box-shadow:
    0 40px 80px -30px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(220, 231, 236, 0.1),
    inset 0 1px 0 rgba(220, 231, 236, 0.14);
  transform: rotate(-4deg);
  animation: float 7s ease-in-out infinite;
}
.hero-visual .screen {
  position: relative;
  height: 100%;
  border-radius: 26px;
  overflow: hidden;
  background: var(--surface);
}
.hero-visual .screen img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-visual .screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), transparent 30%, transparent 70%, rgba(0,0,0,0.35));
  pointer-events: none;
}
.hero-visual .glow {
  position: absolute;
  inset: 10% -20% -10% -20%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(0, 178, 243, 0.38), transparent 70%);
  filter: blur(20px);
}
.hero-visual .play-hint {
  position: absolute;
  left: 50%; bottom: 9%;
  transform: translateX(-50%);
  z-index: 2;
}
@keyframes float {
  0%, 100% { transform: rotate(-4deg) translateY(0); }
  50% { transform: rotate(-4deg) translateY(-10px); }
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section { padding: clamp(36px, 5vw, 64px) 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.section-title {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: var(--w-bold);
  margin-top: 12px;
}
.section-sub { color: var(--text-2); font-weight: var(--w-light); margin-top: 8px; max-width: 60ch; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }

/* --------------------------------------------------------------------------
   Game cards
   -------------------------------------------------------------------------- */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}
.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.8);
}
.game-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--card-accent, var(--fg-blue)) 55%, transparent);
  box-shadow:
    0 30px 60px -28px rgba(0, 0, 0, 0.9),
    0 0 0 1px color-mix(in srgb, var(--card-accent, var(--fg-blue)) 30%, transparent),
    0 0 60px -20px color-mix(in srgb, var(--card-accent, var(--fg-blue)) 55%, transparent);
}
.game-card.is-hidden { display: none; }
.card-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-3);
}
.card-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease);
}
.game-card:hover .card-cover img { transform: scale(1.04); }
.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(6, 12, 24, 0.7));
  pointer-events: none;
}
.card-badges {
  position: absolute;
  top: 14px; left: 14px; right: 14px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  z-index: 2;
}
.card-badges > div { display: flex; gap: 8px; flex-wrap: wrap; }
.card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px 20px;
  flex: 1;
}
.card-title {
  font-size: 22px;
  font-weight: var(--w-bold);
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-title .arrow {
  margin-left: auto;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(220, 231, 236, 0.06);
  border: 1px solid var(--line-2);
  color: var(--text-2);
  transition: all var(--dur) var(--ease);
  flex: none;
}
.card-title .arrow svg { width: 14px; height: 14px; }
.game-card:hover .card-title .arrow {
  background: var(--card-accent, var(--fg-blue));
  border-color: transparent;
  color: var(--on-accent);
  transform: translate(2px, -2px);
}
.card-tagline { color: var(--text-2); font-weight: var(--w-light); font-size: 14.5px; line-height: 1.55; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.card-cta { display: none; }
.card-featured-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--card-accent, var(--fg-blue));
}

/* Featured (wide) card */
@media (min-width: 760px) {
  .game-card.is-featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  }
  .game-card.is-featured .card-cover {
    aspect-ratio: auto;
    min-height: 360px;
    height: 100%;
  }
  .game-card.is-featured .card-cover::after {
    background: linear-gradient(90deg, rgba(0,0,0,0) 60%, rgba(15, 26, 44, 0.9));
  }
  .game-card.is-featured .card-body {
    padding: 34px 36px;
    justify-content: center;
    gap: 14px;
  }
  .game-card.is-featured .card-title { font-size: clamp(28px, 3vw, 40px); }
  .game-card.is-featured .card-tagline { font-size: 16px; max-width: 44ch; }
  .game-card.is-featured .card-meta { margin-top: 4px; }
  .game-card.is-featured .card-cta { display: inline-flex; align-self: flex-start; margin-top: 10px; }
}

/* "Coming soon" tile */
.coming-soon {
  border-radius: var(--radius);
  border: 1px dashed var(--line-2);
  min-height: 260px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 28px;
  color: var(--text-3);
  background:
    repeating-linear-gradient(135deg, rgba(220, 231, 236, 0.015) 0 10px, transparent 10px 20px);
}
.coming-soon strong { display: block; color: var(--text-2); font-family: var(--font-display); font-weight: var(--w-bold); font-size: 18px; margin-bottom: 4px; }
.coming-soon .mascot {
  width: 64px; height: 64px;
  margin: 0 auto 12px;
  opacity: 0.85;
  filter: drop-shadow(0 8px 18px rgba(0, 178, 243, 0.3));
}
.coming-soon small { display: block; font-size: 13px; font-weight: var(--w-light); }

/* --------------------------------------------------------------------------
   About strip
   -------------------------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.about-card {
  padding: 24px;
  border-radius: var(--radius);
  background: rgba(220, 231, 236, 0.03);
  border: 1px solid var(--line);
}
.about-card h3 { font-size: 18px; margin: 14px 0 8px; }
.about-card p { color: var(--text-2); font-weight: var(--w-light); font-size: 14.5px; }
.about-icon {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(0, 178, 243, 0.1);
  border: 1px solid rgba(0, 178, 243, 0.25);
  color: var(--fg-blue);
}
.about-icon svg { width: 20px; height: 20px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: clamp(48px, 8vw, 96px);
  padding: 34px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: 13.5px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.footer-inner a { color: var(--text-2); }
.footer-inner a:hover { color: var(--text); }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; }
.footer-brand img { width: 28px; height: 28px; }

/* --------------------------------------------------------------------------
   Game page
   -------------------------------------------------------------------------- */
.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: var(--w-regular);
  transition: color var(--dur) var(--ease);
}
.breadcrumb:hover { color: var(--text); }
.breadcrumb svg { width: 16px; height: 16px; transition: transform var(--dur) var(--ease); }
.breadcrumb:hover svg { transform: translateX(-3px); }

.game-hero { padding: 26px 0 30px; }
.game-title {
  font-size: clamp(36px, 5.5vw, 64px);
  font-weight: var(--w-bold);
  letter-spacing: -0.025em;
  margin: 12px 0 12px;
}
.game-tagline { color: var(--text-2); font-weight: var(--w-light); font-size: clamp(16px, 1.5vw, 19px); max-width: 60ch; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
@media (max-width: 880px) {
  .game-layout { grid-template-columns: 1fr; }
}

/* The stage: a 9:16 portrait frame for portrait games; set data-aspect="16/9" for landscape */
.stage { position: sticky; top: calc(var(--header-h) + 20px); }
@media (max-width: 880px) { .stage { position: static; } }
.stage-frame {
  position: relative;
  aspect-ratio: 9 / 16;
  width: 100%;
  max-height: min(82vh, 840px);
  margin-inline: auto;
  border-radius: 26px;
  overflow: hidden;
  background: var(--fg-dark);
  border: 1px solid var(--line-2);
  box-shadow:
    0 40px 80px -36px rgba(0, 0, 0, 0.9),
    0 0 0 6px rgba(220, 231, 236, 0.025),
    inset 0 1px 0 rgba(220, 231, 236, 0.08);
}
.stage-frame[data-aspect="16/9"] { aspect-ratio: 16 / 9; max-height: none; border-radius: 18px; }
.stage-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  border: 0;
  background: var(--fg-dark);
}
.stage-poster {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 28px;
  background-size: cover;
  background-position: center;
  text-align: center;
}
.stage-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6,12,24,0.1) 30%, rgba(6,12,24,0.9) 100%);
}
.stage-poster > * { position: relative; }
.stage-note {
  font-size: 13px;
  color: var(--text-2);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.stage.is-playing .stage-poster { display: none; }
.stage-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}
.stage-actions .btn { padding: 10px 16px; font-size: 14px; }

.info { display: flex; flex-direction: column; gap: 18px; }
.info-card {
  padding: 26px 28px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(220,231,236,0.035), rgba(220,231,236,0.015));
  border: 1px solid var(--line);
}
.info-card h2 {
  font-size: 20px;
  font-weight: var(--w-bold);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 10px;
}
.info-card h2 .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent);
}
.prose { color: var(--text-2); font-weight: var(--w-light); font-size: 15.5px; line-height: 1.7; }
.prose p + p { margin-top: 12px; }
.prose strong { color: var(--text); font-weight: var(--w-medium); }
.prose ul { margin-top: 8px; display: grid; gap: 8px; }
.prose li { position: relative; padding-left: 22px; }
.prose li::before {
  content: "";
  position: absolute; left: 0; top: 0.62em;
  width: 10px; height: 2px; border-radius: 2px;
  background: var(--accent);
}
.controls-list { display: grid; gap: 10px; }
.controls-list li { display: flex; align-items: center; gap: 14px; color: var(--text-2); font-weight: var(--w-light); font-size: 14.5px; }
.key {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; padding: 5px 10px;
  border-radius: 8px;
  background: var(--surface-3);
  border: 1px solid var(--line-2);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.35);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
}
.spec-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 22px;
  margin: 0;
  font-size: 14.5px;
}
.spec-list dt { color: var(--text-3); font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em; padding-top: 2px; }
.spec-list dd { margin: 0; color: var(--text); font-weight: var(--w-regular); }
.spec-list dd .muted { color: var(--text-3); font-weight: var(--w-light); }
.pill-ok, .pill-dev {
  display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: var(--w-medium);
}
.pill-dev { background: rgba(202, 11, 241, 0.16); color: var(--fg-magenta-2); }
.pill-ok { background: rgba(13, 216, 149, 0.14); color: var(--fg-green); }

/* "Heads-up" notice — secondary (magenta) marks experimental / in-progress things across the site */
.notice {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(202, 11, 241, 0.08);
  border: 1px solid rgba(202, 11, 241, 0.28);
  color: var(--text-2);
  font-weight: var(--w-light);
  font-size: 14px;
}
.notice strong { color: var(--fg-magenta-2); font-weight: var(--w-medium); }
.notice svg { width: 18px; height: 18px; flex: none; color: var(--fg-magenta-2); margin-top: 2px; }

/* Inline text link (links are the primary blue per the brand guide) */
.text-link {
  color: var(--fg-blue);
  text-decoration: underline;
  text-decoration-color: rgba(0, 178, 243, 0.4);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--dur) var(--ease);
}
.text-link:hover { text-decoration-color: currentColor; }

/* --------------------------------------------------------------------------
   Policy pages (e.g. /games/resurface/privacy/): long-form text with a contents list.
   Tables become one card per row on phones, labelled from each cell's data-label.
   -------------------------------------------------------------------------- */
.doc-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
@media (max-width: 960px) {
  .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}

.doc-toc {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  max-height: calc(100vh - var(--header-h) - 40px);
  overflow-y: auto;
  padding: 20px 14px 16px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(220,231,236,0.035), rgba(220,231,236,0.015));
  border: 1px solid var(--line);
}
@media (max-width: 960px) { .doc-toc { position: static; max-height: none; } }
.doc-toc h2 {
  padding: 0 10px 10px;
  font-family: var(--font-mono);
  font-weight: var(--w-regular);
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.doc-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.doc-toc a {
  display: block;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.4;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.doc-toc a:hover { color: var(--text); background: rgba(220, 231, 236, 0.06); }

.doc {
  max-width: 780px;
  color: var(--text-2);
  font-weight: var(--w-light);
  font-size: 16px;
  line-height: 1.7;
}
.doc section, .doc [id] { scroll-margin-top: calc(var(--header-h) + 18px); }
.doc section + section { margin-top: 44px; padding-top: 40px; border-top: 1px solid var(--line); }
.doc section > * + * { margin-top: 16px; }
.doc h2 {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: clamp(22px, 2.4vw, 28px);
  color: var(--text);
}
.doc h2::before {
  content: "";
  flex: none;
  margin-top: 0.32em;  /* centre on the first line when the heading wraps */
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent);
}
.doc strong { color: var(--text); font-weight: var(--w-medium); }
.doc a { color: var(--fg-blue); text-decoration: underline; text-decoration-color: rgba(0, 178, 243, 0.4); text-underline-offset: 3px; overflow-wrap: anywhere; }
.doc a:hover { text-decoration-color: currentColor; }
.doc ul { display: grid; gap: 10px; }
.doc li { position: relative; padding-left: 24px; }
.doc li::before {
  content: "";
  position: absolute; left: 0; top: 0.8em;
  width: 11px; height: 2px; border-radius: 2px;
  background: var(--accent);
}
.doc address { font-style: normal; color: var(--text); font-weight: var(--w-regular); }

/* "The short version" sits in a card so it reads as the summary */
.doc-summary {
  padding: 28px 30px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 7%, transparent), rgba(220,231,236,0.015));
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}
.doc .doc-summary + section { border-top: 0; padding-top: 0; }
@media (max-width: 560px) { .doc-summary { padding: 22px 20px; } }

/* An in-game button or setting name, e.g. SHARE PLAY STATS */
.ui-term {
  font-family: var(--font-mono);
  font-size: 0.9em;
  font-weight: var(--w-regular);
  letter-spacing: 0.04em;
  color: var(--text);
  white-space: nowrap;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--surface-3);
  border: 1px solid var(--line-2);
}

.table-wrap { overflow-x: auto; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.55; }
.doc-table th {
  text-align: left;
  vertical-align: bottom;
  padding: 0 16px 10px 0;
  border-bottom: 1px solid var(--line-2);
  font-family: var(--font-mono);
  font-weight: var(--w-regular);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.doc-table td { vertical-align: top; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); }
.doc-table th:last-child, .doc-table td:last-child { padding-right: 0; }
.doc-table td:first-child { color: var(--text); font-weight: var(--w-medium); }
@media (max-width: 720px) {
  .doc-table, .doc-table tbody, .doc-table tr, .doc-table td { display: block; width: 100%; }
  .doc-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .doc-table tr {
    padding: 16px 18px;
    border-radius: var(--radius-sm);
    background: rgba(220, 231, 236, 0.03);
    border: 1px solid var(--line);
  }
  .doc-table tr + tr { margin-top: 10px; }
  .doc-table td { padding: 0; border: 0; }
  .doc-table td + td { margin-top: 10px; }
  .doc-table td:first-child { font-size: 16px; }
  .doc-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3);
  }
}

/* --------------------------------------------------------------------------
   Error page
   -------------------------------------------------------------------------- */
.error-page {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px 20px;
}
.error-mascot {
  width: clamp(120px, 18vw, 180px);
  height: auto;
  margin: 0 auto -10px;
  filter: drop-shadow(0 18px 40px rgba(0, 178, 243, 0.35));
  animation: float-mascot 6s ease-in-out infinite;
}
@keyframes float-mascot {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
}
.error-code {
  font-family: var(--font-display);
  font-size: clamp(96px, 20vw, 200px);
  font-weight: var(--w-bold);
  line-height: 0.9;
  letter-spacing: -0.04em;
  background: linear-gradient(92deg, var(--fg-green), var(--fg-blue), var(--fg-magenta-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.error-page h1 { font-size: clamp(22px, 3vw, 32px); margin: 14px 0 10px; }
.error-page p { color: var(--text-2); font-weight: var(--w-light); max-width: 46ch; margin-inline: auto; }
.error-page .hero-actions { justify-content: center; }

/* --------------------------------------------------------------------------
   Reveal animation
   -------------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(14px); animation: reveal 700ms var(--ease) forwards; }
.reveal[data-delay="1"] { animation-delay: 80ms; }
.reveal[data-delay="2"] { animation-delay: 160ms; }
.reveal[data-delay="3"] { animation-delay: 240ms; }
.reveal[data-delay="4"] { animation-delay: 320ms; }
@keyframes reveal { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
