:root {
  --ink: #0B0B0C;
  --ink-hover: #2A2A2D;
  --muted: #5E5E63;
  --muted-2: #8A8A8F;
  --line: #E4E4E0;
  --surface: #F4F4F2;
  --surface-hover: #ECECE8;
  --accent: #FF5A1F;
  --error: #C2261B;
  --radius-card: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #FFFFFF;
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { max-width: 1280px; margin: 0 auto; padding-inline: 32px; }
.u-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.dot { width: 8px; height: 8px; border-radius: 999px; background: var(--accent); flex-shrink: 0; }
.accent { color: var(--accent); }
.num { font-size: 14px; font-weight: 600; color: var(--muted-2); font-variant-numeric: tabular-nums; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 44px; padding: 0 20px; border: 0; border-radius: 999px;
  background: var(--ink); color: #FFFFFF; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: background .15s ease;
}
.btn:hover { background: var(--ink-hover); }
.btn--lg { height: 56px; padding: 0 28px; font-size: 16px; }
.btn--xl { height: 60px; font-size: 17px; width: 100%; }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn--ghost:hover { background: var(--surface); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 999px; border: 0; background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.icon-btn:hover { background: var(--surface-hover); }

/* Header */
/* Sticky header */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.86); -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s ease, box-shadow .2s ease; }
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 8px 24px -20px rgba(11,11,12,.35); }
.site-header .container { transition: padding .2s ease; }
.site-header.is-scrolled .container { padding-block: 12px; }
[id] { scroll-margin-top: 96px; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 20px; flex-wrap: wrap; }
.site-header--bordered { border-bottom-color: var(--line); }
.site-header--bordered .container { padding-block: 18px; }
.site-header--bordered.is-scrolled .container { padding-block: 12px; }
.logo { display: inline-flex; align-items: center; gap: 8px; }
.logo span { font-weight: 700; font-size: 22px; letter-spacing: -0.06em; }
.nav { display: flex; gap: 32px; font-size: 15px; font-weight: 500; flex-wrap: wrap; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-actions .text-link { height: 44px; padding: 0 14px; display: inline-flex; align-items: center; font-size: 15px; font-weight: 500; }
.back-link { height: 44px; display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; }

/* Hero */
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(520px, 100%), 1fr)); gap: 32px; align-items: center; padding-block: 48px 56px; }
.hero__text { display: flex; flex-direction: column; gap: 32px; }
.eyebrow { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--muted); }
.hero h1 { margin: 0; font-weight: 600; font-size: clamp(52px, 7.4vw, 108px); line-height: .94; letter-spacing: -0.065em; }
.hero__lead { margin: 0; font-size: 19px; line-height: 1.45; color: var(--muted); max-width: 440px; text-wrap: pretty; }
.hero__art { display: flex; justify-content: center; }
.hero__art img { width: 100%; max-width: 680px; height: auto; }
.search { display: flex; align-items: center; gap: 8px; max-width: 520px; height: 64px; padding: 0 8px 0 22px; border-radius: 999px; background: var(--surface); }
.search label { flex-grow: 1; display: flex; }
.search input { width: 100%; border: 0; background: transparent; font-size: 17px; outline: none; }
.search .btn { height: 48px; padding: 0 24px; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 14px; }
.quick__label { color: var(--muted); padding-right: 4px; }
.chip { height: 36px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid var(--line); font-weight: 500; transition: background .15s ease; }
.chip:hover { background: var(--surface); }

/* Steps */
.steps { list-style: none; margin: 0; padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 24px; }
.steps li { display: flex; gap: 16px; align-items: baseline; }
.steps strong { font-weight: 600; }
.steps .muted { color: var(--muted); }

/* Catalog */
.catalog { padding-block: 96px 0; display: flex; flex-direction: column; gap: 32px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.h2-xl { margin: 0; font-weight: 600; font-size: clamp(36px, 4.4vw, 60px); line-height: 1; letter-spacing: -0.055em; }
.segmented { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface); flex-wrap: wrap; }
.segmented button { height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; font-size: 14px; font-weight: 500; cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--ink); color: #FFFFFF; }
.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr)); gap: 12px; }
.game-card { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 260px; padding: 20px; border-radius: var(--radius-card); background: var(--surface); overflow: hidden; transition: background .2s ease; }
.game-card:hover { background: var(--surface-hover); }
.game-card__top { position: relative; z-index: 1; display: flex; justify-content: flex-start; align-items: center; gap: 10px; }
.logo-slot { width: 52px; height: 52px; border-radius: 14px; background: #FFFFFF; border: 1.5px dashed #C4C4BF; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 500; color: #6E6E73; overflow: hidden; }
.logo-slot img { width: 100%; height: 100%; object-fit: contain; }
.logo-slot.has-logo { border: 0; }
.badge { height: 26px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; background: #FFFFFF; font-size: 12px; font-weight: 600; }
.badge .dot { width: 6px; height: 6px; }
.game-card__art { position: absolute; right: 10px; top: 14px; width: 120px; height: auto; pointer-events: none; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.game-card:hover .game-card__art { transform: translateY(-6px) rotate(-6deg) scale(1.04); }
.game-card__info { position: relative; display: flex; flex-direction: column; gap: 2px; }
.game-card__name { font-weight: 600; font-size: 19px; letter-spacing: -0.03em; }
.game-card__cur { font-size: 14px; color: var(--muted); }
.game-card__price { font-size: 14px; font-weight: 500; padding-top: 14px; }
.empty { padding: 48px 0; color: var(--muted); }
.all-link { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; height: 44px; font-weight: 500; }

/* FAQ */
.faq { padding-block: 96px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 32px 64px; align-items: start; }
.faq__list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 68px; font-weight: 600; font-size: 18px; letter-spacing: -0.02em; }
.faq summary::-webkit-details-marker { display: none; }
.faq .plus { flex-shrink: 0; transition: transform .2s ease; }
.faq details[open] .plus { transform: rotate(45deg); }
.faq p { margin: 0; padding: 0 40px 24px 0; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .container { padding-block: 40px 48px; display: flex; flex-direction: column; gap: 32px; }
.site-footer .row { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.footer-nav { display: flex; gap: 28px; flex-wrap: wrap; font-size: 14px; font-weight: 500; }
.legal { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #6E6E73; }
.legal strong { color: var(--ink); font-weight: 600; }
.legal--right { align-items: flex-end; text-align: right; }

/* Checkout */
.checkout { padding-block: 48px 96px; display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.checkout__form { flex: 1 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 48px; }
.game-head { position: relative; display: flex; align-items: center; gap: 20px; padding-right: 140px; min-height: 120px; }
.game-head .logo-slot { width: 72px; height: 72px; border-radius: 20px; background: var(--surface); font-size: 12px; flex-shrink: 0; }
.game-head h1 { margin: 0; font-weight: 600; font-size: clamp(36px, 4.4vw, 56px); line-height: 1; letter-spacing: -0.055em; }
.game-head p { margin: 4px 0 0; color: var(--muted); }
.game-head__art { position: absolute; right: 0; top: 50%; transform: translateY(-50%) rotate(-8deg); width: 124px; height: auto; }
.step { display: flex; flex-direction: column; gap: 16px; }
.step h2 { margin: 0; display: flex; gap: 14px; align-items: baseline; font-size: 22px; font-weight: 600; letter-spacing: -0.03em; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field__label { font-size: 14px; font-weight: 500; color: var(--muted); }
.input { height: 56px; padding: 0 20px; border: 1px solid var(--line); border-radius: 16px; background: #FFFFFF; font-size: 17px; width: 100%; max-width: 440px; }
.input:focus { border-color: var(--ink); outline: none; }
.input[aria-invalid="true"] { border-color: var(--error); }
.field__error { font-size: 14px; color: var(--error); min-height: 0; }
.field__error:empty { display: none; }
.hint { align-self: flex-start; font-size: 14px; font-weight: 500; color: var(--muted); }
.note { margin: 0; font-size: 15px; color: var(--muted); }
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 10px; }
.pack { position: relative; text-align: left; min-height: 104px; padding: 18px; border-radius: 20px; background: var(--surface); border: 2px solid var(--surface); cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; transition: background .15s ease, border-color .15s ease; }
.pack:hover { border-color: #D3D3CE; }
.pack[aria-pressed="true"] { background: #FFFFFF; border-color: var(--ink); }
.pack__amount { font-weight: 600; font-size: 19px; padding-right: 8px; letter-spacing: -0.04em; }
.pack__price { font-size: 14px; color: var(--muted); }
.pack__best { position: absolute; bottom: 18px; right: 16px; display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.pack__best .dot { width: 6px; height: 6px; }
.methods { border: 0; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.method { display: flex; align-items: center; gap: 16px; min-height: 64px; border-bottom: 1px solid var(--line); cursor: pointer; }
.method input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }
.method__label { flex-grow: 1; font-weight: 500; }
.method__note { font-size: 14px; color: var(--muted); text-align: right; }
.summary { flex: 0 1 400px; min-width: 0; position: sticky; top: 104px; border-radius: 28px; background: var(--surface); padding: 28px; display: flex; flex-direction: column; gap: 20px; }
.summary h2 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.03em; }
.summary dl { margin: 0; display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.summary dl div { display: flex; justify-content: space-between; gap: 16px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.total { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-top: 20px; border-top: 1px solid #DCDCD7; }
.total span:first-child { font-weight: 600; }
.total__sum { font-weight: 600; font-size: 32px; letter-spacing: -0.05em; }
.agree { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--muted); cursor: pointer; }
.agree input { width: 18px; height: 18px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--ink); }
.agree a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.secure { margin: 0; display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.secure svg { flex-shrink: 0; margin-top: 1px; }

/* Failed */
.failed { max-width: 640px; margin: 0 auto; padding: 72px 32px 96px; display: flex; flex-direction: column; gap: 40px; }
.failed__head { display: flex; flex-direction: column; gap: 24px; }
.failed__art { width: 150px; height: auto; filter: grayscale(1) contrast(.9); opacity: .55; transform: rotate(-24deg); margin-left: -12px; }
.failed h1 { margin: 0; font-weight: 600; font-size: clamp(44px, 6vw, 72px); line-height: .96; letter-spacing: -0.065em; }
.failed__lead { margin: 0; font-size: 18px; color: var(--muted); text-wrap: pretty; }
.order { margin: 0; border-top: 1px solid var(--line); font-size: 15px; }
.order div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.order dt { color: var(--muted); }
.order dd { margin: 0; font-weight: 500; text-align: right; }
.reasons h2 { margin: 0 0 14px; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.reasons ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; color: var(--muted); }
.reasons li { display: flex; gap: 12px; }
.reasons .num { padding-top: 1px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }

@media (max-width: 720px) {
  .container { padding-inline: 20px; }
  .nav { display: none; }
  .header-actions .text-link { display: none; }
  .hero { padding-block: 24px 40px; }
  .catalog { padding-block: 64px 0; }
  .faq { padding-block: 64px; }
  .game-head { padding-right: 96px; }
  .game-head__art { width: 88px; }
  .summary { position: static; }
  .legal--right { align-items: flex-start; text-align: left; }
  .failed { padding: 48px 20px 72px; }
}

/* ---------- Анимации ---------- */
@keyframes ug-spin { to { transform: rotate(360deg); } }
@keyframes ug-fill { from { width: 0; } to { width: 100%; } }

@media (prefers-reduced-motion: no-preference) {
  @keyframes ug-fade { from { opacity: 0; } to { opacity: 1; } }
  @keyframes ug-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
  @keyframes ug-leave { to { opacity: 0; transform: translateY(-8px); } }
  @keyframes ug-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
  @keyframes ug-art-in { from { opacity: 0; transform: translateY(24px) scale(.96); } to { opacity: 1; transform: none; } }

  body { animation: ug-fade .35s ease both; }
  html.is-leaving body { animation: ug-leave .26s cubic-bezier(.4,0,1,1) forwards; pointer-events: none; }

  [data-reveal] { animation: ug-rise .7s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--d, 0) * 80ms + 80ms); }
  .hero__art { animation: ug-art-in .9s cubic-bezier(.2,.8,.2,1) .15s both; }
  .hero__art img { animation: ug-float 6s ease-in-out 1s infinite; }
  .game-card { animation: ug-rise .6s cubic-bezier(.2,.8,.2,1) both; }
  .game-head__art { animation: ug-art-in .8s cubic-bezier(.2,.8,.2,1) .2s both; }
  .failed__art { animation: ug-art-in .8s cubic-bezier(.2,.8,.2,1) .1s both; }
}

/* ---------- Обработка платежа ---------- */
.btn-spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #FFFFFF; animation: ug-spin .8s linear infinite; flex-shrink: 0; }
.pay-overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(255,255,255,.72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility 0s linear .25s; }
.pay-overlay.is-open { opacity: 1; visibility: visible; transition: opacity .25s ease; }
.pay-box { width: min(420px, 100%); background: #FFFFFF; border: 1px solid var(--line); border-radius: 28px; padding: 40px 32px 32px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; box-shadow: 0 40px 80px -40px rgba(11,11,12,.35); transform: translateY(12px) scale(.98); transition: transform .35s cubic-bezier(.2,.8,.2,1); outline: none; }
.pay-overlay.is-open .pay-box { transform: none; }
.pay-spinner { width: 64px; height: 64px; border-radius: 50%; border: 5px solid var(--surface); border-top-color: var(--ink); border-right-color: var(--accent); animation: ug-spin .9s linear infinite; margin-bottom: 8px; }
.pay-box h2 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -0.04em; }
.pay-box p { margin: 0; color: var(--muted); }
.pay-box__item { font-size: 14px; font-weight: 500; color: var(--ink) !important; }
.pay-progress { width: 100%; height: 4px; margin-top: 10px; border-radius: 999px; background: var(--surface); overflow: hidden; }
.pay-progress span { display: block; height: 100%; width: 0; background: var(--ink); border-radius: 999px; }
.pay-overlay.is-open .pay-progress span { animation: ug-fill 5s linear forwards; }
.pay-box small { font-size: 13px; color: var(--muted); }

/* ---------- Юридические страницы ---------- */
.legal-page { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 64px; padding-block: 56px 96px; align-items: start; }
.toc { position: sticky; top: 104px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; max-height: calc(100vh - 128px); overflow: auto; }
.toc__title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding-bottom: 10px; }
.toc a { color: var(--muted); padding: 6px 0; line-height: 1.35; transition: color .15s ease; }
.toc a:hover, .toc a.is-active { color: var(--ink); }
.doc { max-width: 760px; min-width: 0; }
.doc-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface); flex-wrap: wrap; margin-bottom: 40px; }
.doc-tabs a { height: 40px; padding: 0 18px; border-radius: 999px; display: inline-flex; align-items: center; font-size: 14px; font-weight: 500; transition: background .15s ease; }
.doc-tabs a:hover { background: var(--surface-hover); }
.doc-tabs a[aria-current="page"] { background: var(--ink); color: #FFFFFF; }
.doc h1 { margin: 0 0 16px; font-weight: 600; font-size: clamp(30px, 8.4vw, 64px); hyphens: auto; overflow-wrap: break-word; line-height: 1; letter-spacing: -0.055em; text-wrap: balance; }
.doc-meta { margin: 0 0 20px; font-size: 14px; color: var(--muted); }
.doc-lead { margin: 0 0 40px; font-size: 19px; line-height: 1.45; color: var(--muted); max-width: 620px; text-wrap: pretty; }
.doc section { padding-block: 32px; border-top: 1px solid var(--line); }
.doc h2 { margin: 0 0 16px; display: flex; gap: 14px; align-items: baseline; font-size: 22px; font-weight: 600; letter-spacing: -0.03em; }
.doc p, .doc li { color: #3A3A3F; }
.doc p { margin: 0 0 12px; }
.doc p:last-child { margin-bottom: 0; }
.doc ul, .doc ol { margin: 0 0 12px; padding-left: 22px; }
.doc li { margin-bottom: 8px; padding-left: 4px; }
.doc li::marker { color: var(--muted-2); }
.doc strong { color: var(--ink); font-weight: 600; }
.doc a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.doc .doc-tabs a { text-decoration: none; }
.requisites dl { margin: 0; border-top: 1px solid var(--line); }
.requisites dl div { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.requisites dt { color: var(--muted); }
.requisites dd { margin: 0; font-weight: 500; }

@media (max-width: 900px) {
  .legal-page { grid-template-columns: minmax(0, 1fr); gap: 0; padding-block: 32px 72px; }
  .toc { display: none; }
  .requisites dl div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
