/* GamerPlus — сайт активации пополнений. Цвета из брендбука: тёмно-коричневый
   фон, оранжевый акцент с градиентом, белый текст. */
:root {
  --bg: #1a0d05;
  --bg-2: #26140a;
  --panel: rgba(38, 20, 10, 0.78);
  --panel-border: rgba(255, 255, 255, 0.08);
  --field: rgba(12, 6, 2, 0.55);
  --field-border: rgba(255, 255, 255, 0.12);
  --text: #ffffff;
  --muted: rgba(255, 240, 225, 0.62);
  --orange: #ff8a00;
  --orange-2: #ffae3d;
  --orange-soft: rgba(255, 138, 0, 0.14);
  --ok: #52d68a;
  --ok-soft: rgba(82, 214, 138, 0.07);
  --err: #ff6b5b;
  --err-soft: rgba(255, 107, 91, 0.07);
  --radius: 22px;
  --radius-sm: 14px;
  --head: 'Montserrat Alternates', 'Montserrat', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--orange-2); }
code {
  font: 600 0.92em/1 ui-monospace, 'SFMono-Regular', Consolas, monospace;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 6px;
  white-space: nowrap;
}
.accent {
  color: var(--orange);
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ─── Фон: кадр из баннера бренда, затемнение и оранжевые «волны» ───────── */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.bg__hero {
  position: absolute; inset: 0 0 auto 0; height: 78vh; min-height: 520px;
  background: url('/assets/hero.jpg') center 30% / cover no-repeat;
  opacity: 0.5;
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.75) 45%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.75) 45%, transparent 100%);
}
.bg::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(900px 520px at 50% 18%, rgba(26, 13, 5, 0.05), rgba(26, 13, 5, 0.8) 72%),
    linear-gradient(180deg, rgba(26, 13, 5, 0.35) 0%, var(--bg) 78%);
}
.bg__ribbons { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; }
.bg__stars {
  position: absolute; inset: 0; z-index: 1; opacity: 0.35;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 14%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 64% 62%, #ffd9ad 50%, transparent 51%),
    radial-gradient(1px 1px at 30% 78%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 90% 84%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 46% 36%, #ffd9ad 50%, transparent 51%);
}

/* ─── Шапка ─────────────────────────────────────────────────────────────── */
.topbar {
  max-width: 1120px; margin: 0 auto; padding: 22px 16px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand__icon { display: block; }
.brand__name { font: 800 22px/1 var(--body); letter-spacing: 0.01em; }
.brand__name span { color: var(--orange); }
.topbar__link {
  color: var(--muted); text-decoration: none; font-weight: 500; font-size: 15px;
  padding: 8px 14px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 999px;
  transition: color 0.2s, border-color 0.2s;
}
.topbar__link:hover { color: var(--text); border-color: var(--orange); }

/* ─── Первый экран ───────────────────────────────────────────────────────── */
.page { max-width: 1120px; margin: 0 auto; padding: 0 16px 48px; }
.hero { text-align: center; padding: 48px 0 28px; }
.hero__title {
  margin: 0; font: 800 clamp(32px, 5.2vw, 54px)/1.08 var(--head); text-transform: uppercase;
  letter-spacing: 0.01em;
}
.hero__lead {
  max-width: 620px; margin: 18px auto 0; color: rgba(255, 245, 235, 0.86);
  font-size: clamp(15px, 1.8vw, 17px); font-weight: 400;
}

/* ─── Карточки GamerPlus по бокам формы ─────────────────────────────────── */
.stage { position: relative; }
.float-card {
  position: absolute; top: 40px; width: 210px; height: auto; pointer-events: none; user-select: none;
  border-radius: 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  opacity: 0.92; animation: float 7s ease-in-out infinite;
}
.float-card--left { right: calc(50% + 350px); --tilt: -9deg; }
.float-card--right { left: calc(50% + 350px); --tilt: 8deg; top: 90px; animation-delay: -3.5s; }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(var(--tilt)); }
  50% { transform: translateY(-12px) rotate(var(--tilt)); }
}
.float-star {
  position: absolute; top: 150px; right: calc(50% + 380px); width: 150px; height: 150px;
  opacity: 0.55; pointer-events: none; filter: drop-shadow(0 10px 30px rgba(255, 138, 0, 0.25));
  animation: float 8s ease-in-out infinite; --tilt: -6deg;
}
@media (max-width: 1180px) { .float-card, .float-star { display: none; } }

/* ─── Карточка формы ─────────────────────────────────────────────────────── */
.card {
  position: relative; max-width: 640px; margin: 0 auto; padding: 30px;
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.form { display: grid; gap: 22px; }
.field { display: grid; gap: 10px; }
.field__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.field__label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.field__hint { color: var(--muted); font-size: 13px; }
.field__hint--link { color: var(--orange-2); text-decoration: none; font-weight: 600; }
.field__hint--link:hover { text-decoration: underline; }
.field__note { margin: -2px 0 0; color: var(--muted); font-size: 13px; }
.step {
  display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 5px;
  background: var(--orange-soft); color: var(--orange); border-radius: 6px;
  font: 600 12px/1 var(--body);
}

textarea, input[type='text'] {
  width: 100%; padding: 12px 14px; color: var(--text);
  background: var(--field); border: 1px solid var(--field-border); border-radius: 10px;
  font: 500 15px/1.45 var(--body); outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
textarea {
  resize: vertical; min-height: 64px;
  font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; letter-spacing: 0.06em; text-transform: uppercase;
}
textarea::placeholder, input::placeholder { color: rgba(255, 255, 255, 0.3); text-transform: none; letter-spacing: 0.02em; }
textarea:focus, input[type='text']:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 138, 0, 0.12); }

/* Что нашлось по введённым кодам */
.codes { display: grid; gap: 8px; }
.codes:empty { display: none; }
.code-chip {
  display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center;
  padding: 10px 12px; border-radius: 10px; border: 1px solid transparent; font-size: 14px;
}
.code-chip__icon {
  grid-row: span 2; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 12px;
}
.code-chip__title { font-weight: 600; font-size: 14.5px; overflow-wrap: anywhere; }
.code-chip__meta { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.code-chip--ok { background: var(--ok-soft); border-color: rgba(82, 214, 138, 0.2); }
.code-chip--ok .code-chip__icon { background: var(--ok); color: #0b2415; }
.code-chip--bad { background: var(--err-soft); border-color: rgba(255, 107, 91, 0.2); }
.code-chip--bad .code-chip__icon { background: var(--err); color: #2a0905; }
.code-chip--wait { background: var(--orange-soft); border-color: rgba(255, 138, 0, 0.3); }
.code-chip--wait .code-chip__icon { background: var(--orange); color: #fff; }

/* Галочка подтверждения */
.agree { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; cursor: pointer; color: rgba(255, 245, 235, 0.86); font-size: 14.5px; }
.agree input { position: absolute; opacity: 0; pointer-events: none; }
.agree__box {
  width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid rgba(255, 255, 255, 0.3);
  background: var(--field); display: grid; place-items: center; transition: 0.2s; margin-top: 1px;
}
.agree__box::after {
  content: ''; width: 11px; height: 6px; border: 2.5px solid #fff; border-top: 0; border-right: 0;
  transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform 0.15s;
}
.agree input:checked + .agree__box { background: var(--orange); border-color: var(--orange); }
.agree input:checked + .agree__box::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.agree input:focus-visible + .agree__box { box-shadow: 0 0 0 4px rgba(255, 138, 0, 0.25); }

/* Кнопка */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 46px; padding: 0 20px; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--orange); color: #fff;
  font: 600 16px/1 var(--body);
  transition: background 0.15s, opacity 0.2s;
}
.btn:hover:not(:disabled) { background: #f07f00; }
.btn:disabled { cursor: not-allowed; background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.35); }
.btn__spinner {
  display: none; width: 20px; height: 20px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; animation: spin 0.8s linear infinite;
}
.btn.is-loading .btn__spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Итог заявки */
.result[hidden] { display: none; }
.result { padding: 16px 18px; border-radius: 14px; font-size: 15px; display: grid; gap: 8px; }
.result--wait { background: var(--orange-soft); border: 1px solid rgba(255, 138, 0, 0.35); }
.result--ok { background: var(--ok-soft); border: 1px solid rgba(82, 214, 138, 0.35); }
.result--err { background: var(--err-soft); border: 1px solid rgba(255, 107, 91, 0.35); }
.result__title { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; }
.result__title .btn__spinner { display: inline-block; width: 18px; height: 18px; border-width: 2.5px; border-color: rgba(255, 138, 0, 0.3); border-top-color: var(--orange); }
.result__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.result__list li { display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; color: rgba(255, 245, 235, 0.9); }
.result__list code { font-size: 12.5px; }
.result__hint { color: var(--muted); font-size: 13.5px; margin: 0; }

/* ─── Шаги ───────────────────────────────────────────────────────────────── */
.section-title { margin: 0 0 22px; font: 800 clamp(22px, 3vw, 30px)/1.15 var(--head); text-transform: uppercase; text-align: center; }
.steps { margin-top: 72px; }
.steps__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps__item {
  display: grid; gap: 14px; align-content: start; padding: 22px; border-radius: 18px;
  background: rgba(38, 20, 10, 0.6); border: 1px solid var(--panel-border); color: rgba(255, 245, 235, 0.8);
}
.steps__item b { color: #fff; display: block; margin-bottom: 4px; font-size: 15.5px; }
.steps__num {
  display: inline-grid; place-items: center; width: 34px; height: 28px; border-radius: 7px;
  background: var(--orange-soft); color: var(--orange); font: 600 14px/1 var(--body);
}

/* ─── Вопросы ────────────────────────────────────────────────────────────── */
.faq { margin: 72px auto 0; max-width: 820px; scroll-margin-top: 24px; }
.faq__list { display: grid; gap: 10px; }
.faq__item { border-radius: 16px; background: rgba(38, 20, 10, 0.6); border: 1px solid var(--panel-border); overflow: hidden; }
.faq__item summary {
  cursor: pointer; list-style: none; padding: 16px 52px 16px 18px; font-weight: 600; font-size: 15.5px; position: relative;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: '+'; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center;
  background: transparent; color: var(--muted); font: 500 20px/1 var(--body); transition: transform 0.2s;
}
.faq__item[open] summary::after { content: '−'; }
.faq__item p { margin: 0; padding: 0 20px 18px; color: rgba(255, 245, 235, 0.78); }

.footer {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  padding: 28px 16px 36px; color: var(--muted); font-size: 13.5px; border-top: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 760px) {
  .hero { padding: 36px 0 22px; }
  .card { padding: 20px 16px; border-radius: 18px; }
  .steps__list { grid-template-columns: 1fr; }
  .steps, .faq { margin-top: 52px; }
  .brand__name { font-size: 19px; }
  .topbar__link { font-size: 13px; padding: 7px 11px; }
  .btn { min-height: 46px; font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
