:root {
  --paper: #f3efe6;
  --ink: #15171c;
  --card: #ffffff;
  --accent: #3d2bff;
  --lime: #d4ff3a;
  --muted: #5f6470;
  --soft: #e6e0d2;
  --t-playstation: #d9d4ff;
  --t-appstore: #ffdccb;
  --t-steam: #c8eeff;
  --r: 20px;
  --b: 2px solid var(--ink);
  --sh: 5px 5px 0 var(--ink);
  --display: 'Unbounded', system-ui, sans-serif;
  --body: 'Golos Text', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--display); line-height: 1.12; margin: 0; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: clamp(30px, 4.6vw, 54px); font-weight: 800; }
h2 { font-size: clamp(22px, 2.8vw, 32px); font-weight: 700; }
h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.section { padding-block: clamp(40px, 6vw, 72px); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-head p { color: var(--muted); max-width: 46ch; margin-top: 8px; }
.mark { background: var(--lime); padding: 0 0.18em; border-radius: 8px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.muted { color: var(--muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px; border: var(--b); border-radius: 14px;
  background: var(--card); box-shadow: 4px 4px 0 var(--ink);
  font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-sm { padding: 10px 16px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled] { background: var(--soft); color: var(--muted); box-shadow: none; transform: none; cursor: not-allowed; }

.card { background: var(--card); border: var(--b); border-radius: var(--r); box-shadow: var(--sh); }

/* Demo banner + header */
.demo { background: var(--ink); color: var(--paper); font-size: 14px; text-align: center; padding: 8px 16px; }
.demo b { color: var(--lime); font-weight: 600; }
.header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: var(--b); }
.bar { display: flex; align-items: center; gap: 24px; height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font: 800 19px var(--display); letter-spacing: -0.03em; text-decoration: none; }
.logo i { font-style: normal; color: var(--accent); }
.logo-mark { display: grid; place-items: center; width: 34px; height: 34px; background: var(--lime); border: var(--b); border-radius: 10px; box-shadow: 2px 2px 0 var(--ink); font-size: 18px; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { padding: 8px 12px; border-radius: 10px; font-weight: 500; font-size: 15px; text-decoration: none; }
.nav a:hover, .nav a[aria-current='page'] { background: var(--soft); }

/* Hero */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: center; padding-block: clamp(36px, 6vw, 72px); }
.hero p.lead { font-size: 19px; color: var(--muted); margin-top: 18px; max-width: 44ch; }
.perks { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 0; padding: 0; list-style: none; }
.perks li { padding: 7px 14px; border: var(--b); border-radius: 99px; background: var(--card); font-size: 14px; font-weight: 500; }
.widget { padding: clamp(18px, 2.4vw, 28px); }
.widget-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; padding-top: 20px; border-top: 2px dashed var(--ink); }
.widget-foot .sum { font: 700 24px var(--display); letter-spacing: -0.02em; }
.widget-foot small { display: block; font: 400 13px var(--body); color: var(--muted); letter-spacing: 0; }

/* Configurator */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; padding: 6px; border: var(--b); border-radius: 16px; background: var(--paper); }
.seg button { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 8px; border: 2px solid transparent; border-radius: 11px; background: none; font-weight: 600; font-size: 14px; white-space: nowrap; }
.seg button[aria-selected='true'] { background: var(--card); border-color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.mono { display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none; border: var(--b); border-radius: 8px; font: 700 11px var(--display); letter-spacing: -0.03em; }
.mono-playstation { background: var(--t-playstation); }
.mono-appstore { background: var(--t-appstore); }
.mono-steam { background: var(--t-steam); }
.cfg-block { border: 0; padding: 0; margin: 22px 0 0; min-width: 0; }
.custom { display: block; }
.custom-input { display: flex; align-items: center; gap: 10px; padding: 0 16px; border: var(--b); border-radius: 12px; background: var(--card); }
.custom-input:focus-within { box-shadow: 3px 3px 0 var(--ink); }
.custom-input input { flex: 1; min-width: 0; padding: 13px 0; border: 0; outline: 0; background: none; color: var(--ink); font: 700 17px var(--display); letter-spacing: -0.02em; }
.custom-input input::placeholder { font: 400 16px var(--body); letter-spacing: 0; color: var(--muted); }
.custom-input span { font: 700 14px var(--display); color: var(--muted); }
.custom-hint { display: block; margin-top: 8px; font-size: 14px; color: var(--muted); }
.custom-hint.is-error { color: #b3261e; }
.order-line small { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }
.cfg-block legend, .cfg-block .legend { display: block; padding: 0; margin-bottom: 10px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border: var(--b); border-radius: 12px; background: var(--card); font-weight: 500; }
.chip .code { padding: 2px 7px; border-radius: 6px; background: var(--ink); color: var(--paper); font: 600 11px var(--display); }
.chip[aria-pressed='true'], .nom[aria-pressed='true'] { background: var(--lime); box-shadow: 3px 3px 0 var(--ink); }
.noms { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 8px; }
.nom { display: grid; gap: 2px; padding: 10px 12px; border: var(--b); border-radius: 12px; background: var(--card); text-align: left; transition: transform 0.1s ease; }
.nom:hover { transform: translateY(-2px); }
.nom b { font: 700 15px var(--display); letter-spacing: -0.02em; word-spacing: 0.12em; white-space: nowrap; }
.nom span { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.nom[aria-pressed='true'] span { color: var(--ink); }

/* Ticker */
.ticker { overflow: hidden; border-block: var(--b); background: var(--ink); color: var(--paper); }
.ticker div { display: flex; gap: 40px; width: max-content; padding: 12px 0; font: 600 14px var(--display); letter-spacing: 0.04em; animation: slide 36s linear infinite; }
.ticker span::after { content: '✦'; margin-left: 40px; color: var(--lime); }
@keyframes slide { to { transform: translateX(-50%); } }

/* Service tiles */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tile { display: flex; flex-direction: column; gap: 12px; min-height: 230px; padding: 24px; text-decoration: none; transition: transform 0.14s ease, box-shadow 0.14s ease; }
.tile:hover, .ticket:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.tile-playstation { background: var(--t-playstation); }
.tile-appstore { background: var(--t-appstore); }
.tile-steam { background: var(--t-steam); }
.tile .mono { width: 48px; height: 48px; border-radius: 14px; font-size: 17px; background: var(--card); }
.tile h3 { font-size: 22px; font-weight: 700; }
.tile p { font-size: 15px; }
.tile .go { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.tile .go span:last-child { display: grid; place-items: center; width: 38px; height: 38px; border: var(--b); border-radius: 50%; background: var(--card); }

/* Tickets (products) */
.tickets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.ticket { position: relative; display: flex; flex-direction: column; overflow: hidden; text-decoration: none; transition: transform 0.14s ease, box-shadow 0.14s ease; }
.ticket-top { padding: 18px 18px 22px; }
.ticket-top .row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; }
.ticket-top .value { margin-top: 26px; font: 800 30px/1 var(--display); letter-spacing: -0.04em; }
.ticket-top .value small { font-size: 15px; font-weight: 600; letter-spacing: 0; }
.ticket-playstation .ticket-top { background: var(--t-playstation); }
.ticket-appstore .ticket-top { background: var(--t-appstore); }
.ticket-steam .ticket-top { background: var(--t-steam); }
.ticket-cut { position: relative; border-top: 2px dashed var(--ink); }
.ticket-cut::before, .ticket-cut::after { content: ''; position: absolute; top: -11px; width: 20px; height: 20px; border: var(--b); border-radius: 50%; background: var(--paper); }
.ticket-cut::before { left: -12px; }
.ticket-cut::after { right: -12px; }
.ticket-bottom { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; }
.ticket-bottom b { font-size: 18px; font-variant-numeric: tabular-nums; }
.ticket-bottom span { font-size: 13px; color: var(--muted); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; padding: 0; margin: 0; list-style: none; }
.steps li { counter-increment: step; padding: 22px; border: var(--b); border-radius: var(--r); background: var(--card); }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 16px; border: var(--b); border-radius: 12px; background: var(--lime); font: 700 16px var(--display); }
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--muted); font-size: 16px; }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 820px; }
.faq details { border: var(--b); border-radius: 16px; background: var(--card); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; display: grid; place-items: center; width: 30px; height: 30px; border: var(--b); border-radius: 50%; font: 600 18px/1 var(--body); transition: transform 0.2s ease, background 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); background: var(--lime); }
.faq details p { padding: 0 20px 20px; color: var(--muted); max-width: 68ch; }

/* Top-up page */
.page-head { padding-block: clamp(28px, 4vw, 48px) 24px; }
.page-head p { margin-top: 12px; color: var(--muted); max-width: 56ch; }
.topup { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 24px; align-items: start; }
.summary { position: sticky; top: 96px; padding: 24px; }
.summary h2 { font-size: 20px; }
.summary dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 18px 0; font-size: 16px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; text-align: right; font-weight: 600; }
.total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0; margin-bottom: 16px; border-top: 2px dashed var(--ink); }
.total b { font: 800 28px var(--display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.fine { margin-top: 14px; font-size: 13px; line-height: 1.45; color: var(--muted); }

/* Checkout dialog */
.dialog { width: min(480px, 100% - 24px); padding: 28px; border: var(--b); border-radius: 24px; background: var(--card); color: var(--ink); box-shadow: 8px 8px 0 var(--ink); }
.dialog::backdrop { background: rgb(21 23 28 / 0.55); }
.dialog h2 { font-size: 22px; padding-right: 40px; }
.dialog .x { position: absolute; top: 18px; right: 18px; width: 38px; height: 38px; border: var(--b); border-radius: 50%; background: var(--paper); font-size: 20px; line-height: 1; }
.order-line { display: flex; justify-content: space-between; gap: 16px; margin: 18px 0; padding: 14px 16px; border: var(--b); border-radius: 14px; background: var(--paper); }
.order-line b { white-space: nowrap; }
.field { display: grid; gap: 6px; margin-bottom: 14px; font-size: 14px; font-weight: 600; }
.field input { padding: 13px 14px; border: var(--b); border-radius: 12px; font: 400 17px var(--body); background: var(--card); color: var(--ink); }
.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 18px; font-size: 14px; color: var(--muted); }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.form-error { margin-top: 14px; font-size: 14px; color: #b3261e; }
.dialog [data-bot] p { margin: 16px 0 12px; }
.notice { margin: 16px 0; padding: 14px 16px; border: var(--b); border-radius: 14px; background: var(--lime); font-size: 15px; }

/* Docs */
.doc { max-width: 760px; padding-bottom: 72px; }
.doc h2 { margin: 40px 0 12px; }
.doc p, .doc li { color: var(--muted); margin-bottom: 10px; }

/* Footer + mobile tabbar */
.footer { margin-top: 40px; border-top: var(--b); background: var(--ink); color: var(--paper); }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; padding-block: 36px; }
.footer .logo-mark { color: var(--ink); }
.footer p { max-width: 42ch; margin-top: 12px; font-size: 14px; color: #b9bcc6; }
.footer nav { display: grid; gap: 8px; font-size: 15px; align-content: start; }
.footer nav a { text-decoration: none; }
.footer nav a:hover { text-decoration: underline; }
.tabbar { display: none; }

@media (max-width: 960px) {
  .hero, .topup { grid-template-columns: 1fr; }
  .tickets { grid-template-columns: repeat(2, 1fr); }
  .summary { position: static; }
}
@media (max-width: 720px) {
  body { font-size: 16px; padding-bottom: 72px; }
  .nav, .bar .btn { display: none; }
  .bar { height: 60px; }
  .tiles, .steps { grid-template-columns: 1fr; }
  .tile { min-height: 0; }
  .tickets { gap: 12px; }
  .ticket-top .value { font-size: 24px; }
  .seg button { flex-direction: column; gap: 4px; font-size: 13px; }
  .widget-foot { flex-direction: column; align-items: stretch; }
  .tabbar { position: fixed; inset: auto 0 0 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr); border-top: var(--b); background: var(--card); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { display: grid; justify-items: center; gap: 2px; padding: 9px 4px; font-size: 11px; font-weight: 600; text-decoration: none; }
  .tabbar a[aria-current='page'] .mono { background: var(--lime); }
}
.hero > *, .topup > * { min-width: 0; }
@media (max-width: 380px) {
  .widget { padding: 14px; }
  .seg { padding: 4px; gap: 2px; }
  .seg button { min-width: 0; padding: 8px 2px; font-size: 12px; }
  .noms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nom { padding: 9px 10px; }
  .nom b { font-size: 14px; }
  .dialog { padding: 20px; }
  .dialog h2 { font-size: 18px; }
  .order-line { flex-direction: column; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker div { animation: none; }
  * { transition: none !important; }
}
