/* ==========================================================================
   CODE GAMES — public stylesheet
   Colour variables are injected from the admin panel in the page <head>,
   so everything here reads from custom properties.
   ========================================================================== */

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

* { margin: 0; padding: 0; }

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

body {
  background: var(--bg);
  color: #fff;
  font-family: var(--font-body), system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
ul, ol { list-style: none; }

::selection { background: var(--primary); color: #fff; }

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

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--primary); color: #fff; padding: 12px 20px; border-radius: 0 0 10px 0;
}
.skip:focus { left: 0; }

/* ------------------------------------------------------------- layout --- */
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 22px; }
.section { padding: 96px 0; position: relative; }
.section--tight { padding: 64px 0; }

/* ----------------------------------------------------------- typography - */
h1, h2, h3, h4, .font-display {
  font-family: var(--font-heading), var(--font-body), sans-serif;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.12;
}

.kicker {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-heading), sans-serif;
  font-size: 11px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--highlight);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 7px 16px;
}
.kicker::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--highlight); box-shadow: 0 0 10px var(--highlight);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-head h2 { font-size: clamp(30px, 5vw, 46px); margin: 18px 0 14px; }
.section-head p { color: var(--muted); font-size: 17px; }

.gradient-text {
  background: linear-gradient(100deg, var(--primary), var(--highlight));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.muted { color: var(--muted); }

/* --------------------------------------------------------------- buttons - */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-heading), sans-serif;
  font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 15px 30px; border-radius: 12px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}
.btn--primary {
  background: linear-gradient(120deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 10px 30px -12px var(--primary);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 38px -12px var(--primary); }
.btn--ghost {
  border: 1px solid var(--line); color: #fff;
  background: rgba(255, 255, 255, 0.02);
}
.btn--ghost:hover { border-color: var(--highlight); color: var(--highlight); transform: translateY(-2px); }
.btn--store {
  background: #fff; color: #0B1020; gap: 12px; padding: 14px 26px;
}
.btn--store:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -14px rgba(255,255,255,.5); }
.btn--sm { padding: 11px 20px; font-size: 12px; }
.btn--block { width: 100%; }
.btn[disabled], .btn--disabled { opacity: .5; pointer-events: none; }

/* --------------------------------------------------------------- header -- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-stuck {
  background: rgba(8, 11, 18, 0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 20px; }

.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo__mark {
  width: 42px; height: 42px; border-radius: 12px; flex: 0 0 42px;
  background: linear-gradient(135deg, var(--primary), var(--highlight));
  display: grid; place-items: center;
  font-family: var(--font-heading), sans-serif; font-weight: 900; font-size: 15px; letter-spacing: 0.04em;
  box-shadow: 0 8px 24px -10px var(--primary);
}
.logo__mark img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.logo__text { display: flex; flex-direction: column; line-height: 1.1; }
.logo__name { font-family: var(--font-heading), sans-serif; font-weight: 800; font-size: 17px; letter-spacing: 0.06em; }
.logo__tag { font-size: 9px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 9px 15px; border-radius: 9px; font-size: 14px; font-weight: 500; color: #CBD3E4;
  transition: color .18s ease, background .18s ease;
}
.nav a:hover, .nav a.is-active { color: #fff; background: rgba(255,255,255,.06); }
.header-cta { display: flex; align-items: center; gap: 12px; }

.burger {
  display: none; width: 44px; height: 44px; border-radius: 11px;
  border: 1px solid var(--line); background: rgba(255,255,255,.03);
  place-items: center;
}
.burger span {
  display: block; width: 18px; height: 2px; background: #fff; border-radius: 2px;
  position: relative; transition: transform .25s ease, opacity .2s ease;
}
.burger span::before, .burger span::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: #fff; border-radius: 2px;
  transition: transform .25s ease;
}
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }
body.menu-open .burger span { background: transparent; }
body.menu-open .burger span::before { transform: translateY(6px) rotate(45deg); }
body.menu-open .burger span::after { transform: translateY(-6px) rotate(-45deg); }

.mobile-nav {
  display: none; position: fixed; inset: 76px 0 auto 0; z-index: 99;
  background: rgba(8, 11, 18, 0.97);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  padding: 16px 22px 26px;
}
body.menu-open .mobile-nav { display: block; }
.mobile-nav a {
  display: block; padding: 14px 4px; font-size: 16px; font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.mobile-nav .btn { margin-top: 18px; width: 100%; }

/* ----------------------------------------------------------- background -- */
#bg-canvas {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .55;
}
.page { position: relative; z-index: 1; }

.glow {
  position: absolute; border-radius: 50%; filter: blur(110px); pointer-events: none; z-index: 0;
}
.glow--a { width: 520px; height: 520px; background: rgba(124,58,237,.22); top: -160px; left: -140px; }
.glow--b { width: 460px; height: 460px; background: rgba(6,182,212,.16); top: 180px; right: -180px; }

/* ----------------------------------------------------------------- hero -- */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 130px 0 90px; position: relative; overflow: hidden;
}
.hero__inner { position: relative; z-index: 2; max-width: 980px; margin: 0 auto; }
.hero h1 {
  font-size: clamp(38px, 9vw, 94px);
  line-height: 0.98; letter-spacing: 0.005em; margin: 26px 0;
}
.hero h1 .line-2 { display: block; }
.hero__text { color: var(--muted); font-size: clamp(15px, 2vw, 18px); max-width: 640px; margin: 0 auto 38px; }
.hero__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.float {
  position: absolute; width: 58px; height: 58px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 24px; z-index: 1;
  animation: float 6s ease-in-out infinite;
}
.float--1 { top: 22%; left: 6%; animation-delay: 0s; }
.float--2 { top: 30%; right: 8%; animation-delay: 1.4s; }
.float--3 { bottom: 20%; left: 12%; animation-delay: 2.8s; }
.float--4 { bottom: 26%; right: 10%; animation-delay: 4.2s; }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50%      { transform: translateY(-18px) rotate(4deg); }
}
@media (max-width: 900px) { .float { display: none; } }

.scroll-cue {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  width: 24px; height: 40px; border: 2px solid var(--line); border-radius: 14px; z-index: 2;
}
.scroll-cue::after {
  content: ""; position: absolute; left: 50%; top: 8px; width: 3px; height: 7px; border-radius: 2px;
  background: var(--highlight); transform: translateX(-50%);
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue { 0%, 100% { opacity: 0; transform: translate(-50%, 0); } 50% { opacity: 1; transform: translate(-50%, 10px); } }

/* -------------------------------------------------------------- marquee -- */
.marquee {
  border-block: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(124,58,237,.1), rgba(6,182,212,.1));
  padding: 15px 0; overflow: hidden; position: relative;
}
.marquee__track { display: flex; width: max-content; animation: scroll-x 32s linear infinite; }
.marquee span {
  font-family: var(--font-heading), sans-serif; font-size: 12px; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase; color: #D6DCEC;
  padding: 0 28px; white-space: nowrap;
}
@keyframes scroll-x { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation-duration: 120s; }
  .float, .scroll-cue::after { animation: none; }
}

/* ---------------------------------------------------------- game cards -- */
.game-grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 256px), 1fr));
}
.game-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 26px; overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.game-card::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .25s ease;
  background: radial-gradient(420px circle at 50% -10%, var(--accent, var(--primary)), transparent 62%);
}
.game-card:hover { transform: translateY(-6px); border-color: var(--accent, var(--primary)); box-shadow: 0 24px 48px -26px var(--accent, var(--primary)); }
.game-card:hover::before { opacity: .16; }
.game-card > * { position: relative; z-index: 1; }

.game-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.game-card__icon {
  width: 64px; height: 64px; flex: 0 0 64px; border-radius: 17px;
  background: linear-gradient(140deg, var(--accent, var(--primary)), rgba(255,255,255,.06));
  display: grid; place-items: center; font-size: 30px; overflow: hidden;
}
.game-card__icon img { width: 100%; height: 100%; object-fit: cover; }
.badge {
  font-family: var(--font-heading), sans-serif; font-size: 9px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 99px; white-space: nowrap;
  background: rgba(16,185,129,.14); color: var(--green); border: 1px solid rgba(16,185,129,.3);
}
.badge--soon { background: rgba(245,158,11,.14); color: #FBBF24; border-color: rgba(245,158,11,.3); }
.badge--genre {
  background: rgba(255,255,255,.05); color: var(--muted); border-color: var(--line);
}

.game-card__meta { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
.game-card h3 { font-size: 22px; margin-bottom: 4px; }
.game-card__sub { color: var(--accent, var(--highlight)); font-size: 13px; font-weight: 600; margin-bottom: 13px; }
.game-card p { color: var(--muted); font-size: 14.5px; flex: 1; margin-bottom: 20px; }
.game-card__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-top: 1px solid var(--line); padding-top: 17px;
}
.game-card__platforms { font-size: 12px; color: var(--muted); }
.game-card__link {
  font-family: var(--font-heading), sans-serif; font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--accent, var(--highlight));
  display: inline-flex; align-items: center; gap: 7px;
}
.game-card__link span { transition: transform .2s ease; }
.game-card:hover .game-card__link span { transform: translateX(4px); }
.stretch { position: absolute; inset: 0; z-index: 2; }

/* --------------------------------------------------------- about + cards - */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about-grid h2 { font-size: clamp(28px, 4.4vw, 44px); margin: 18px 0 20px; }
.about-grid p { color: var(--muted); font-size: 16.5px; }

.value-cards { display: grid; gap: 18px; }
.value-card {
  display: flex; gap: 17px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px;
  transition: border-color .2s ease, transform .2s ease;
}
.value-card:hover { border-color: var(--primary); transform: translateX(5px); }
.value-card__icon {
  width: 46px; height: 46px; flex: 0 0 46px; border-radius: 13px; display: grid; place-items: center;
  font-size: 21px; background: rgba(124,58,237,.14); border: 1px solid rgba(124,58,237,.3);
}
.value-card h3 { font-size: 16px; margin-bottom: 5px; }
.value-card p { color: var(--muted); font-size: 14px; }

/* ---------------------------------------------------------------- stats -- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.stat {
  text-align: center; background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 30px 16px;
  transition: border-color .2s ease, transform .2s ease;
}
.stat:hover { border-color: var(--highlight); transform: translateY(-4px); }
.stat__value {
  font-family: var(--font-heading), sans-serif; font-weight: 900;
  font-size: clamp(26px, 4vw, 40px); line-height: 1;
  background: linear-gradient(120deg, var(--primary), var(--highlight));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.stat__label { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-top: 11px; }

/* ------------------------------------------------------------------ cta -- */
.cta {
  text-align: center; border-radius: 26px; padding: 64px 30px;
  background: linear-gradient(135deg, rgba(124,58,237,.16), rgba(6,182,212,.12));
  border: 1px solid var(--line); position: relative; overflow: hidden;
}
.cta h2 { font-size: clamp(26px, 4vw, 40px); margin-bottom: 14px; }
.cta p { color: var(--muted); max-width: 540px; margin: 0 auto 30px; }

/* -------------------------------------------------------------- contact -- */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 44px; align-items: start; }
.contact-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 30px; }
.contact-line { display: flex; gap: 14px; align-items: flex-start; padding: 15px 0; border-bottom: 1px solid var(--line); }
.contact-line:last-child { border-bottom: 0; }
.contact-line__icon {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 11px; display: grid; place-items: center;
  background: rgba(6,182,212,.12); border: 1px solid rgba(6,182,212,.28); font-size: 17px;
}
.contact-line__label { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.contact-line__value { font-weight: 600; word-break: break-word; }
.contact-line__value a:hover { color: var(--highlight); }

.socials { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.socials a {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  border: 1px solid var(--line); background: rgba(255,255,255,.03); font-size: 16px;
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.socials a:hover { border-color: var(--highlight); transform: translateY(-3px); background: rgba(6,182,212,.1); }

/* ----------------------------------------------------------------- form -- */
.field { margin-bottom: 18px; }
.field label {
  display: block; font-size: 12px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 8px;
}
.field input, .field textarea, .field select {
  width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; color: #fff; font: inherit; font-size: 15px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,58,237,.2);
}
.field input::placeholder, .field textarea::placeholder { color: #5C6784; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; }

.alert { border-radius: 13px; padding: 15px 18px; margin-bottom: 20px; border: 1px solid; font-size: 14.5px; }
.alert--ok  { background: rgba(16,185,129,.1);  border-color: rgba(16,185,129,.35);  color: #A7F3D0; }
.alert--bad { background: rgba(244,63,94,.1);   border-color: rgba(244,63,94,.35);   color: #FFC2CE; }
.alert ul { margin-left: 18px; list-style: disc; }

/* ------------------------------------------------------- game detail ---- */
.back-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; padding-top: 108px;
}
.back-link { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-size: 14px; }
.back-link:hover { color: var(--highlight); }
.path-chip {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11.5px; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px;
}

.game-hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 52px; align-items: center; padding: 48px 0 70px; }
.game-hero h1 { font-size: clamp(34px, 6.4vw, 68px); margin: 18px 0 10px; }
.game-hero__tag { color: var(--highlight); font-size: clamp(16px, 2.4vw, 21px); font-weight: 600; margin-bottom: 20px; }
.game-hero__text { color: var(--muted); font-size: 17px; margin-bottom: 30px; }
.game-hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

.device {
  background: var(--card); border: 1px solid var(--line); border-radius: 28px; padding: 38px 30px;
  text-align: center; position: relative; overflow: hidden;
}
.device::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(300px circle at 50% 0%, var(--accent, var(--primary)), transparent 65%);
  opacity: .18;
}
.device > * { position: relative; }
.device__icon {
  width: 120px; height: 120px; margin: 0 auto 22px; border-radius: 30px;
  background: linear-gradient(140deg, var(--accent, var(--primary)), rgba(255,255,255,.08));
  display: grid; place-items: center; font-size: 56px; overflow: hidden;
  box-shadow: 0 22px 44px -18px var(--accent, var(--primary));
}
.device__icon img { width: 100%; height: 100%; object-fit: cover; }
.device h2 { font-size: 22px; margin-bottom: 7px; }
.device__meta { color: var(--muted); font-size: 13.5px; }
.device__rating { margin-top: 16px; display: inline-flex; gap: 8px; align-items: center; font-size: 13px; color: #FBBF24; }

.detail-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 44px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 30px; }
.panel h2 { font-size: 21px; margin-bottom: 16px; }
.panel p { color: var(--muted); margin-bottom: 14px; }
.check-list { display: grid; gap: 11px; margin-top: 20px; }
.check-list li { display: flex; gap: 11px; align-items: flex-start; font-size: 14.5px; color: #D3DAEA; }
.check-list li::before {
  content: "✓"; flex: 0 0 21px; width: 21px; height: 21px; border-radius: 50%;
  background: rgba(16,185,129,.15); color: var(--green);
  display: grid; place-items: center; font-size: 11px; font-weight: 700; margin-top: 2px;
}

.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px;
  transition: border-color .2s ease, transform .2s ease;
}
.feature:hover { border-color: var(--accent, var(--primary)); transform: translateY(-3px); }
.feature__icon { font-size: 21px; margin-bottom: 9px; }
.feature h3 { font-size: 14.5px; margin-bottom: 5px; }
.feature p { font-size: 12.5px; color: var(--muted); margin: 0; }

.shots {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  max-width: 960px; margin: 0 auto;
}
.shot {
  aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden;
  background: var(--card); border: 1px solid var(--line);
  display: grid; place-items: center; text-align: center; padding: 16px;
  transition: transform .25s ease, border-color .25s ease;
}
.shot:hover { transform: translateY(-6px) scale(1.02); border-color: var(--accent, var(--primary)); }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot__ph { color: var(--muted); }
.shot__ph .emoji { font-size: 34px; display: block; margin-bottom: 10px; }
.shot__ph .cap { font-size: 12px; font-weight: 600; color: #B9C2D6; }

.legal-links { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 26px; }
@media (max-width: 560px) { .legal-links { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ prose ----- */
.prose { max-width: 760px; }
.prose h2 {
  font-size: 20px; margin: 34px 0 12px; color: #fff;
  padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 16.5px; margin: 24px 0 9px; }
.prose p { color: var(--muted); margin-bottom: 14px; }
.prose ul, .prose ol { margin: 0 0 18px 22px; color: var(--muted); }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 7px; }
.prose a { color: var(--highlight); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: #fff; }
.prose em { color: #9FB0CC; }
.prose table { width: 100%; border-collapse: collapse; margin-bottom: 18px; font-size: 14px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.prose th { background: var(--surface); }
.prose blockquote {
  border-left: 3px solid var(--primary); padding: 4px 0 4px 18px; margin: 0 0 18px; color: var(--muted);
}
.prose code {
  font-family: ui-monospace, Menlo, monospace; font-size: 13px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; color: var(--highlight);
}

.doc-head { padding-top: 116px; padding-bottom: 20px; }
.doc-head h1 { font-size: clamp(26px, 4.6vw, 40px); margin: 16px 0 10px; }
.doc-head .muted { font-size: 14.5px; }

/* --------------------------------------------------------------- footer -- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 62px 0 28px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand p { color: var(--muted); font-size: 14.5px; margin: 16px 0 18px; max-width: 320px; }
.footer-status { display: inline-flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--green); }
.footer-status::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 9px var(--green); animation: pulse 2.4s ease-in-out infinite;
}
.footer-col h4 {
  font-family: var(--font-heading), sans-serif; font-size: 11px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: #fff; margin-bottom: 18px;
}
.footer-col a { display: block; color: var(--muted); font-size: 14px; padding: 6px 0; transition: color .18s ease, padding-left .18s ease; }
.footer-col a:hover { color: var(--highlight); padding-left: 5px; }
.footer-bottom {
  margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.footer-bottom p { color: var(--muted); font-size: 13px; }

/* ------------------------------------------------------------ utilities -- */
/* Content is visible by default; the entrance animation is only armed once
   JS has confirmed it can run, so a script failure can never hide the page. */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

.error-page { min-height: 72vh; display: grid; place-items: center; text-align: center; padding: 140px 0 80px; }
.error-page .code {
  font-family: var(--font-heading), sans-serif; font-weight: 900; font-size: clamp(70px, 16vw, 150px); line-height: 1;
  background: linear-gradient(120deg, var(--primary), var(--highlight));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ---------------------------------------------------------- responsive -- */
@media (max-width: 1024px) {
  .about-grid, .contact-grid, .game-hero, .detail-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 34px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav, .header-cta .btn { display: none; }
  .burger { display: grid; }
  .section { padding: 72px 0; }
  .hero { padding: 116px 0 80px; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .feature-grid, .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .panel, .contact-card { padding: 22px; }
  .btn { padding: 14px 22px; font-size: 12px; }
  .game-card { padding: 22px; }
  .section { padding: 60px 0; }
}
