/* Сайт игры «Пингвиниум» — токены и приёмы основного сайта Пингвиниума (src/styles/tokens.css) */
@font-face {
  font-family: 'Onest Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/onest-cyrillic-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Onest Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/onest-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #ffffff;
  --surface: #f5f6f8;
  --surface-2: #eceef2;
  --border: #e6e8ec;
  --text: #0b0d12;
  --text-muted: #5f6673;
  --text-subtle: #9aa0ab;
  --accent: #2f54eb;
  --accent-hover: #2344d1;
  --accent-soft: #eef1fe;
  --on-accent-soft: #2f54eb;
  --on-accent: #ffffff;
  --glass: rgb(255 255 255 / 0.9);
  --gold: #e0a91f;
  --font-sans: 'Onest Variable', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --shadow: 0 1px 2px rgb(16 24 40 / 0.04), 0 12px 32px rgb(16 24 40 / 0.06);
  --container: 1120px;
  --gutter: 24px;
  --header-h: 72px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --duration: 200ms;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0e13;
    --surface: #161a21;
    --surface-2: #1f242d;
    --border: #262b35;
    --text: #f1f3f6;
    --text-muted: #a3a9b5;
    --text-subtle: #6f7682;
    --accent: #4f6ef7;
    --accent-hover: #6a84fa;
    --accent-soft: #1a2244;
    --on-accent-soft: #c3cffd;
    --glass: rgb(12 14 19 / 0.85);
    --gold: #f5c542;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 12px 32px rgb(0 0 0 / 0.45);
    color-scheme: dark;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 16px;
    --header-h: 60px;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
.pixel { image-rendering: pixelated; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
section[id] { scroll-margin-top: var(--header-h); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Шапка ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-mark {
  width: 40px;
  height: 40px;
  padding: 4px;
  border-radius: 10px;
  background: var(--accent-soft);
  image-rendering: pixelated;
  transition: transform var(--duration) var(--ease);
}
.logo:hover .logo-mark { transform: rotate(-8deg); }
.logo-word { font-size: 21px; font-weight: 600; letter-spacing: -0.03em; }
.nav { display: flex; gap: 32px; }
.nav a { font-size: 15px; font-weight: 500; color: var(--text-muted); transition: color var(--duration) var(--ease); }
.nav a:hover { color: var(--text); }
@media (max-width: 860px) { .nav { display: none; } }

/* ---------- Кнопки ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 20px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color var(--duration) var(--ease);
}
.button.sm { height: 40px; padding: 0 16px; font-size: 15px; }
.button.lg { height: 54px; padding: 0 26px; font-size: 17px; }
.primary { background: var(--accent); color: var(--on-accent); }
.primary:hover { background: var(--accent-hover); }
.secondary { background: var(--accent-soft); color: var(--on-accent-soft); }
.button img { width: 20px; height: 20px; image-rendering: pixelated; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--on-accent-soft);
  font-size: 14px;
  font-weight: 600;
}
.badge i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* ---------- Первый экран ---------- */
.hero { padding: 64px 0 96px; }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; max-width: 760px; }
.hero h1 { font-size: clamp(42px, 6.2vw, 76px); letter-spacing: -0.045em; line-height: 1; }
.hero h1 span { color: var(--accent); }
.hero p { max-width: 560px; font-size: 20px; color: var(--text-muted); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.device {
  position: relative;
  margin-top: 56px;
  padding: 14px;
  border-radius: 34px;
  background: #0b0d12;
  box-shadow: var(--shadow);
}
.device .screen { width: 100%; border-radius: 22px; image-rendering: pixelated; }
.float {
  position: absolute;
  width: 56px;
  height: 56px;
  image-rendering: pixelated;
  animation: bob 3s var(--ease) infinite;
}
.float.a { top: -28px; left: 8%; }
.float.b { top: -24px; right: 12%; animation-delay: -1s; width: 48px; height: 48px; }
.float.c { bottom: -28px; right: 4%; animation-delay: -2s; }
@keyframes bob { 50% { transform: translateY(-10px); } }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 56px; }
.stat { padding: 20px; border-radius: var(--radius-lg); background: var(--surface); }
.stat b { display: block; font-size: 36px; font-weight: 600; letter-spacing: -0.04em; line-height: 1.1; }
.stat span { color: var(--text-muted); font-size: 15px; }

/* ---------- Секции ---------- */
.section { padding: 96px 0; }
.section-head { display: flex; flex-direction: column; gap: 16px; max-width: 680px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(32px, 4.4vw, 52px); letter-spacing: -0.04em; }
.section-head p { font-size: 19px; color: var(--text-muted); }
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { display: flex; flex-direction: column; gap: 14px; padding: 28px; border-radius: var(--radius-lg); background: var(--surface); }
.feature .icon { width: 56px; height: 56px; padding: 10px; border-radius: var(--radius); background: var(--accent-soft); image-rendering: pixelated; }
.feature h3 { font-size: 22px; }
.feature p { color: var(--text-muted); font-size: 16px; }

.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.shot { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.shot img { width: 100%; border-radius: var(--radius-lg); border: 1px solid var(--border); image-rendering: pixelated; }
.shot figcaption { color: var(--text-muted); font-size: 15px; }
.shot figcaption b { color: var(--text); font-weight: 600; }

.beasts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.beast { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 16px; border-radius: var(--radius-lg); background: var(--surface); text-align: center; }
.beast .sprite { height: 72px; display: flex; align-items: flex-end; }
.beast .sprite img { max-height: 72px; width: auto; image-rendering: pixelated; }
.beast b { font-size: 17px; font-weight: 600; }
.beast span { color: var(--text-muted); font-size: 14px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card { padding: 32px; border-radius: var(--radius-lg); background: var(--surface); display: flex; flex-direction: column; gap: 14px; }
.card h3 { font-size: 26px; }
.card p, .card li { color: var(--text-muted); }
.card ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

.faq { display: grid; gap: 12px; max-width: 820px; }
.faq details { border-radius: var(--radius-lg); background: var(--surface); padding: 0 24px; }
.faq summary { cursor: pointer; list-style: none; padding: 20px 0; font-size: 18px; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent); font-size: 24px; line-height: 1; transition: transform var(--duration) var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 20px; color: var(--text-muted); }

.cta {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 48px;
  border-radius: var(--radius-lg);
  background: var(--accent);
  color: var(--on-accent);
}
.cta h2 { font-size: clamp(28px, 3.6vw, 44px); letter-spacing: -0.04em; }
.cta p { margin-top: 12px; opacity: 0.85; font-size: 18px; }
.cta .button { background: #fff; color: #2f54eb; }
.cta img { width: 96px; height: 96px; image-rendering: pixelated; }

/* ---------- Подвал ---------- */
.footer { padding: 48px 0 64px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 15px; }
.footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer a:hover { color: var(--text); }
.footer .legal { flex-basis: 100%; font-size: 14px; color: var(--text-subtle); }

/* ---------- Документы ---------- */
.doc { padding: 56px 0 96px; }
.doc .container { max-width: calc(820px + var(--gutter) * 2); }
.doc h1 { font-size: clamp(34px, 4.6vw, 52px); letter-spacing: -0.04em; margin-bottom: 12px; }
.doc .meta { color: var(--text-muted); margin-bottom: 40px; }
.doc h2 { font-size: 24px; margin: 40px 0 12px; }
.doc p, .doc li { color: var(--text); }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 22px; display: grid; gap: 8px; }
.doc a { color: var(--accent); }
.doc .note { padding: 20px 24px; border-radius: var(--radius-lg); background: var(--surface); color: var(--text-muted); }

.center { text-align: center; }
.page-center { min-height: 70vh; display: grid; place-items: center; padding: 64px 0; }
.page-center .card { max-width: 560px; align-items: center; text-align: center; }
.page-center img { width: 96px; height: 96px; image-rendering: pixelated; }

@media (max-width: 960px) {
  .features, .beasts { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .hero { padding: 32px 0 64px; }
  .hero p { font-size: 18px; }
  .section { padding: 64px 0; }
  .features, .shots, .split { grid-template-columns: 1fr; }
  .beasts { grid-template-columns: repeat(2, 1fr); }
  .device { padding: 8px; border-radius: 22px; margin-top: 40px; }
  .device .screen { border-radius: 14px; }
  .float { width: 40px; height: 40px; }
  .cta { grid-template-columns: 1fr; padding: 32px 24px; }
  .cta img { display: none; }
  .actions .button { flex: 1 1 100%; }
}
