/* Sprat Run — spratns.online. Общие стили для index / privacy / terms.
   Палитра: фон #00151F, поверхности #0E232D, жёлтый #F0FF31 / #C2D301, Instrument Sans (+ Condensed). */
@font-face { font-family: "Instrument Sans"; src: url("fonts/instrument-sans.woff2") format("woff2"); font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; }

:root {
  --bg: #00151f;
  --bg-2: #041420;
  --bg-3: #0c1f2d;
  --surface: #0e232d;
  --surface-2: #132b36;
  --line: #142e3b;
  --line-2: #1d303c;
  --ink: #ffffff;
  --ink-2: #c1cade;
  --muted: #8b9aa3;
  --yellow: #f0ff31;
  --yellow-2: #c2d301;
  --yellow-soft: rgba(240, 255, 49, 0.1);
  --cta: linear-gradient(180deg, #e5eb5c 0%, #c2d301 100%);
  --teal: #155f6e;
  --kelp: #2fb873;
  --display: "Instrument Sans", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
  background:
    radial-gradient(1100px 620px at 78% -10%, rgba(240, 255, 49, 0.07), transparent 60%),
    radial-gradient(900px 600px at 0% 0%, rgba(21, 95, 110, 0.28), transparent 65%),
    var(--bg);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--yellow); }
a:hover { color: #fff; }
h1, h2, h3 { font-family: var(--display); font-stretch: 75%; font-weight: 700; line-height: 1.02; color: var(--ink); margin: 0; letter-spacing: 0; }
p { margin: 0; }
button { font: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 40;
  background: rgba(0, 21, 31, 0.82);
  backdrop-filter: saturate(1.3) blur(12px);
  -webkit-backdrop-filter: saturate(1.3) blur(12px);
  border-bottom: 1px solid var(--line);
}
.top .container { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--display); font-stretch: 75%; font-weight: 700; font-size: 25px; letter-spacing: 0.01em; text-transform: uppercase; }
.brand:hover { color: var(--ink); }
.brand svg { width: 34px; height: 34px; flex: none; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35)); }
.nav { display: flex; gap: 24px; margin-left: auto; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav a:hover { color: var(--yellow); }
.lang-switch { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line-2); }
.lang-switch button {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font-weight: 700; font-size: 13px; letter-spacing: 0.04em; padding: 5px 11px; border-radius: 7px;
}
.lang-switch button[aria-pressed="true"] { background: var(--yellow); color: var(--bg); }
.nav + .lang-switch { margin-left: 4px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px; border-radius: 12px; border: 0; cursor: pointer;
  font-family: var(--display); font-stretch: 75%; font-weight: 700; font-size: 20px; letter-spacing: 0.02em; text-transform: uppercase; text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.15s ease, filter 0.15s ease, background-color 0.15s ease;
}
.btn-primary { background: var(--cta); color: var(--bg); box-shadow: 0 10px 30px rgba(194, 211, 1, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.45); }
.btn-primary:hover { color: var(--bg); filter: brightness(1.08); box-shadow: 0 12px 34px rgba(240, 255, 49, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.btn-primary:active { transform: translateY(1px) scale(0.99); }
.btn-ghost { background: rgba(255, 255, 255, 0.04); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); }
.btn-ghost:hover { color: var(--ink); background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28); }
.btn-small { min-height: 42px; padding: 0 18px; font-size: 17px; border-radius: 10px; }

/* ---------- hero ---------- */
.hero { padding: 64px 0 80px; }
.hero .container { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px;
  padding: 6px 14px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line-2);
  color: var(--ink-2); font-weight: 600; font-size: 14px;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 4px rgba(240, 255, 49, 0.16), 0 0 12px rgba(240, 255, 49, 0.6); }
.hero h1 { font-size: clamp(46px, 5.6vw, 76px); text-transform: uppercase; text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--yellow); }
.hero .sub { margin-top: 22px; font-size: 19px; color: var(--ink-2); max-width: 32em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 28px 0 0; padding: 0; list-style: none; }
.chips li { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; color: var(--ink-2); }
.chips li::before {
  content: ""; width: 20px; height: 20px; border-radius: 50%; flex: none;
  background: var(--yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-6.5' fill='none' stroke='%2300151f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
}

/* ---------- game ---------- */
.game {
  position: relative; width: 100%; max-width: 460px; justify-self: center;
  aspect-ratio: 4 / 5; border-radius: 22px; overflow: hidden;
  background: linear-gradient(180deg, #1d6f80, #0b3d52 55%, #03182a);
  box-shadow: 0 0 0 1px var(--line-2), 0 0 0 7px var(--surface), 0 0 0 8px var(--line-2), 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 90px rgba(240, 255, 49, 0.08);
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
  outline: none;
}
.game:focus-visible { box-shadow: 0 0 0 1px var(--line-2), 0 0 0 7px var(--surface), 0 0 0 9px var(--yellow), 0 30px 80px rgba(0, 0, 0, 0.55); }
.game canvas { display: block; width: 100%; height: 100%; cursor: pointer; }
.g-layer { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; pointer-events: none; }
.g-layer.g-bottom { align-items: flex-end; padding-bottom: 10%; }
.g-panel {
  pointer-events: auto; text-align: center; width: min(300px, 100%);
  padding: 22px 22px 24px; border-radius: 18px;
  background: rgba(14, 35, 45, 0.94); border: 1px solid var(--line-2);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}
.g-panel h3 { font-size: 34px; text-transform: uppercase; }
.g-panel p { margin-top: 6px; color: var(--ink-2); font-size: 16px; line-height: 1.45; }
.g-panel .btn { margin-top: 18px; width: 100%; }
.g-hint { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; font-size: 14px; color: var(--muted); font-weight: 600; }
.g-hint b { color: var(--ink); }
.g-keys { display: inline-flex; align-items: center; gap: 8px; }
@media (pointer: coarse) { .g-keys { display: none; } }
.g-hint kbd { font-family: var(--body); font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--bg); color: var(--ink); border: 1px solid var(--line-2); }
.g-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.g-stat { padding: 10px 6px 8px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.g-stat b { display: block; font-family: var(--display); font-stretch: 75%; font-size: 38px; line-height: 1; color: var(--yellow); }
.g-stat span { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.g-badge { display: inline-block; margin-top: 10px; padding: 4px 12px; border-radius: 8px; background: var(--yellow); color: var(--bg); font-weight: 700; font-size: 14px; }

/* ---------- sections ---------- */
.section { padding: 88px 0; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(36px, 4.4vw, 54px); text-transform: uppercase; }
.section-head p { margin-top: 12px; font-size: 18px; color: var(--ink-2); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line-2); border-radius: 16px; padding: 26px 24px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: rgba(240, 255, 49, 0.35); }
.card h3 { font-size: 26px; margin-top: 20px; text-transform: uppercase; }
.card p { margin-top: 8px; color: var(--ink-2); font-size: 16px; }
.icon { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; background: var(--yellow-soft); color: var(--yellow); border: 1px solid rgba(240, 255, 49, 0.18); }
.icon svg { width: 28px; height: 28px; }
.step-num { font-family: var(--display); font-stretch: 75%; font-weight: 700; font-size: 22px; color: var(--yellow); letter-spacing: 0.04em; }
.step-row { display: flex; align-items: center; justify-content: space-between; }
.band { background: linear-gradient(180deg, var(--bg-3) 0%, var(--bg-2) 100%); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.faq { max-width: 760px; }
.faq details { background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; padding: 0 22px; }
.faq details[open] { border-color: rgba(240, 255, 49, 0.3); }
.faq details + details { margin-top: 10px; }
.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 0; font-family: var(--display); font-weight: 600; font-size: 18px; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 28px; height: 28px; flex: none; border-radius: 8px; background: var(--yellow-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cpath d='M14 9v10M9 14h10' stroke='%23f0ff31' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / 28px no-repeat;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 20px; color: var(--ink-2); }

/* ---------- footer ---------- */
.wave { display: block; width: 100%; height: 60px; margin-top: 40px; }
.wave-on-band { margin-top: 0; background: var(--bg-2); }
.footer { background: #010e15; color: #a0a4a7; padding: 8px 0 40px; font-size: 15px; }
.footer a { color: var(--ink-2); }
.footer a:hover { color: var(--yellow); }
.footer-grid { display: grid; grid-template-columns: 1.1fr 0.7fr 1.4fr; gap: 40px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.footer .brand { color: var(--ink); }
.footer h4 { margin: 0 0 12px; font-family: var(--display); font-stretch: 75%; font-weight: 700; font-size: 18px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li + li { margin-top: 8px; }
.footer li a, .footer li button { color: var(--ink-2); text-decoration: none; }
.footer li a:hover, .footer li button:hover { color: var(--yellow); }
.footer li button { background: none; border: 0; padding: 0; cursor: pointer; font-size: 15px; }
.footer-about { margin-top: 14px; max-width: 26em; }
.legal-entity { font-style: normal; line-height: 1.7; }
.legal-entity strong { color: var(--ink); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 22px; font-size: 14px; color: #829094; }

/* ---------- cookie banner ---------- */
.cookie {
  position: fixed; z-index: 60; left: 16px; right: 16px; bottom: 16px; margin: 0 auto; max-width: 620px;
  display: flex; align-items: center; gap: 18px; padding: 18px 20px;
  background: var(--surface); border-radius: 16px; border: 1px solid var(--line-2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  font-size: 15px; line-height: 1.5; color: var(--ink-2);
}
.cookie p { flex: 1; }
.cookie-actions { display: flex; gap: 10px; flex: none; }
.cookie-actions .btn { min-width: 108px; }

/* ---------- legal pages ---------- */
.legal { padding: 48px 0 24px; }
.legal .container { max-width: 820px; }
.legal h1 { font-size: clamp(42px, 6vw, 64px); text-transform: uppercase; }
.legal .updated { margin-top: 10px; color: var(--muted); font-weight: 600; font-size: 15px; }
.legal .lead { margin-top: 22px; font-size: 18px; color: var(--ink-2); }
.legal .note { margin-top: 18px; padding: 14px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); color: var(--ink-2); font-size: 15px; }
.legal h2 { font-size: 28px; margin: 44px 0 12px; text-transform: uppercase; }
.legal h3 { font-family: var(--body); font-stretch: 100%; font-size: 18px; line-height: 1.3; margin: 24px 0 8px; }
.legal p, .legal li { color: var(--ink-2); }
.legal p + p { margin-top: 12px; }
.legal strong { color: var(--ink); }
.legal ul, .legal ol { padding-left: 22px; margin: 10px 0 0; }
.legal li + li { margin-top: 6px; }
.legal li::marker { color: var(--yellow); }
.legal address { font-style: normal; margin-top: 12px; padding: 16px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); color: var(--ink-2); line-height: 1.7; }
.table-wrap { overflow-x: auto; margin-top: 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); }
.legal table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.legal th { font-family: var(--display); font-stretch: 75%; font-weight: 700; font-size: 16px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); background: var(--bg-3); }
.legal tr:last-child td { border-bottom: 0; }
.legal code { font-size: 14px; padding: 1px 6px; border-radius: 6px; background: var(--yellow-soft); color: var(--yellow); }
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 22px; font-weight: 700; text-decoration: none; font-size: 15px; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card, .faq summary::after { transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero .container { grid-template-columns: 1fr; gap: 40px; }
  .hero-copy { max-width: 640px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .container { padding: 0 16px; }
  .nav { display: none; }
  .lang-switch, .nav + .lang-switch { margin-left: auto; }
  .top .container { height: 60px; }
  .hero { padding: 36px 0 60px; }
  .hero .sub { font-size: 17px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .section { padding: 60px 0; }
  .section-head { margin-bottom: 28px; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; gap: 12px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .cookie { flex-direction: column; align-items: stretch; gap: 14px; left: 12px; right: 12px; bottom: 12px; padding: 16px; }
  .cookie-actions .btn { flex: 1; }
  .game { border-radius: 18px; }
}
