:root {
  --bg: #f7f6f3;
  --paper: #ffffff;
  --ink: #17191e;
  --muted: #5d6470;
  --line: rgba(23, 25, 30, 0.1);
  --accent: #e2b15a;
  --accent-deep: #c4923d;
  --accent-ink: #1c1408;
  --danger: #b42318;
  --ok: #1f7a45;
  --radius: 22px;
  --max: 1120px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  color: var(--ink);
  font-family: Sora, Manrope, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  background:
    radial-gradient(880px 480px at 88% -8%, rgba(226, 177, 90, 0.22), transparent 58%),
    radial-gradient(640px 420px at -12% 8%, rgba(226, 177, 90, 0.08), transparent 60%),
    var(--bg);
}
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(23, 25, 30, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 25, 30, 0.045) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: radial-gradient(ellipse at 70% 0%, #000 10%, transparent 70%);
}
body > * { position: relative; z-index: 1; }
a { color: var(--accent-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; }
button, input, select { font: inherit; color: inherit; }
::selection { background: rgba(226, 177, 90, 0.35); }

.wrap { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(247, 246, 243, 0.92);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
}
.site-header .wrap { display: flex; align-items: center; gap: 22px; min-height: 76px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none; font-weight: 600;
  letter-spacing: 0.04em; white-space: nowrap; flex: none;
}
.brand img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; display: block; }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 14px; }
.nav a:hover { color: var(--ink); }
.nav a.lang {
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1;
  padding: 0 0 0 16px;
  margin-left: 2px;
  border-left: 1px solid var(--line);
}
.nav a.lang:hover { color: var(--ink); }

.stage { padding: 54px 0 18px; }
.hero { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 48px; align-items: center; }
.hero > *, .split > *, .deal > *, .grid > *, .stats > * { min-width: 0; }
.kicker {
  margin: 0 0 14px;
  color: var(--accent-deep);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.hero h1, .prose h1 {
  font-size: clamp(46px, 6.4vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 600;
  margin: 0 0 18px;
}
.lede { font-size: 18px; color: var(--muted); margin: 0 0 28px; max-width: 640px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 22px; border-radius: 999px;
  border: 1px solid transparent; background: var(--accent); color: var(--accent-ink);
  text-decoration: none; font-weight: 600; cursor: pointer;
}
.btn:hover { background: var(--accent-deep); color: var(--accent-ink); }
.btn.ghost { background: var(--paper); color: var(--ink); border-color: rgba(23, 25, 30, 0.14); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent-deep); background: var(--paper); }

.shield { position: relative; justify-self: end; width: min(340px, 100%); }
.shield::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: scale(1.32);
  background: radial-gradient(circle, rgba(226, 177, 90, 0.45), transparent 68%);
  filter: blur(6px);
}
.shield img {
  position: relative;
  width: 100%;
  border-radius: 36px;
  border: 1px solid rgba(226, 177, 90, 0.45);
  box-shadow: 0 24px 60px rgba(80, 36, 8, 0.12);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 42px 0 10px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(23, 25, 30, 0.04);
}
.stats div { padding: 22px 24px; }
.stats div + div { border-left: 1px solid var(--line); }
.stats strong { display: block; font-size: 34px; letter-spacing: -0.04em; font-weight: 600; }
.stats span { display: block; margin-top: 6px; color: var(--muted); font-size: 14px; }

.section { padding: 54px 0 8px; }
.section h2, .prose h2 { font-size: clamp(28px, 3vw, 40px); letter-spacing: -0.03em; margin: 0 0 12px; font-weight: 600; }
.sub { color: var(--muted); margin: 0 0 20px; }
.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 36px; align-items: center; }
.steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 14px; }
.steps li { display: grid; gap: 4px; padding-top: 14px; border-top: 1px solid var(--line); }
.steps strong { font-weight: 600; }
.steps span { color: var(--muted); }

.console {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 18px 20px 8px;
  box-shadow: 0 22px 50px rgba(23, 25, 30, 0.06);
}
.console header {
  display: flex; align-items: center; gap: 10px;
  color: var(--muted); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(226, 177, 90, 0.28); }
.console-tag { margin-left: auto; color: var(--accent-deep); }
.console-line { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0 0; }
.console-line span { color: var(--muted); }
.console-line b { font-weight: 600; text-align: right; min-width: 0; }
.meter { height: 6px; border-radius: 99px; background: rgba(23, 25, 30, 0.08); margin: 8px 0 4px; }
.meter i { display: block; width: 72%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-deep), var(--accent)); }

.deal { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: 18px; align-items: stretch; }
.calc {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 26px 26px 22px;
  box-shadow: 0 18px 50px rgba(80, 56, 16, 0.06);
}
.calc-top { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.calc-top label { font-size: 15px; font-weight: 600; }
.calc-top output { font-size: 42px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.calc input[type="range"],
.pack input[type="range"] {
  width: 100%; max-width: 100%; min-width: 0; height: 28px; margin: 8px 0 0; padding: 0;
  border: 0; background: transparent; appearance: none; -webkit-appearance: none;
}
.calc input[type="range"] { margin-top: 18px; }
.calc input[type="range"]::-webkit-slider-runnable-track,
.pack input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 99px; background: rgba(23, 25, 30, 0.1);
}
.calc input[type="range"]::-webkit-slider-thumb,
.pack input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px;
  border-radius: 50%; background: var(--accent); border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(80, 56, 16, 0.28);
}
.calc input[type="range"]::-moz-range-track,
.pack input[type="range"]::-moz-range-track {
  height: 6px; border: 0; border-radius: 99px; background: rgba(23, 25, 30, 0.1);
}
.calc input[type="range"]::-moz-range-thumb,
.pack input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; background: var(--accent); border: 3px solid #fff;
}
.calc-note { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.calc-result { margin: 14px 0 6px; font-size: 18px; }
.calc-save { margin: 0; color: var(--muted); }
.packs { display: grid; gap: 12px; }
.pack {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; align-items: center;
  background: var(--paper); border: 1px solid var(--line); border-radius: 22px;
  padding: 16px 18px 14px; box-shadow: 0 10px 28px rgba(23, 25, 30, 0.04);
}
.pack h3 { margin: 0; font-size: 22px; font-weight: 600; }
.pack .price { margin: 0; grid-column: 2; grid-row: 2 / span 2; font-size: 40px; align-self: center; }
.pack .unit, .pack .rub { margin: 0; }
.pack .got, .pack .rub, .qty { grid-column: 1 / -1; }
.pack .got { margin: 2px 0 0; min-height: 1.2em; font-size: 14px; font-weight: 600; }
.pack .rub { color: var(--muted); font-weight: 500; font-size: 14px; }
.pack-flag { margin: 0 0 6px; grid-column: 1 / -1; color: var(--accent-deep); font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.pack-best { border-color: rgba(196, 146, 61, 0.8); background: linear-gradient(180deg, #fffaf0, #fff); }
.pack.is-on { box-shadow: 0 12px 32px rgba(196, 146, 61, 0.18); }
.qty { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.qty input { grid-column: 1 / -1; }
.prose .deal { grid-template-columns: 1fr; }
.package-more { margin-top: 28px; }
.package-more .actions { margin-top: 18px; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 10px 30px rgba(23, 25, 30, 0.03);
}
.card h3 { margin: 0 0 8px; font-size: 18px; font-weight: 600; }
.card h3.free { color: var(--accent-deep); }
.card p, .card li { color: var(--muted); }
.pack-list { list-style: none; margin: 4px 0 12px; padding: 0; display: grid; gap: 8px; }
.pack-list li { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.pack-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.pack-list b { color: var(--ink); font-weight: 600; flex: none; }
.pack-list span { min-width: 0; text-align: right; }
.card .pack-list + p { margin: 0; }
.card.featured { border-color: rgba(196, 146, 61, 0.75); box-shadow: inset 0 0 0 1px rgba(226, 177, 90, 0.35); }
.price { font-size: 40px; font-weight: 600; letter-spacing: -0.04em; margin: 8px 0; color: var(--ink); }
.unit { color: var(--accent-deep); font-weight: 600; }
.rub { margin: 8px 0 0; font-weight: 600; color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.chips li {
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  background: var(--paper);
}

.prose { max-width: 760px; padding-top: 36px; padding-bottom: 12px; }
.prose h2 { margin-top: 34px; }
.note { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; color: var(--muted); }

.site-footer { margin-top: 72px; border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.site-footer p { margin: 0; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--accent-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.site-footer a:hover { color: var(--ink); }

.panel { display: none; }
.panel.on { display: block; }
.form { display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
input, select {
  width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 14px;
  padding: 0 12px; background: var(--paper); color: var(--ink);
}
.result, .history { margin-top: 16px; }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.muted { color: var(--muted); }
.error { color: var(--danger); font-weight: 600; }
.ok { color: var(--ok); font-weight: 600; }
.methods { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
#login { min-height: 48px; }

@media (hover: none) and (pointer: coarse) {
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(247, 246, 243, 0.96); }
}
@media (max-width: 860px) {
  html { scroll-padding-top: 72px; }
  .wrap { width: min(var(--max), calc(100% - 28px)); }
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(247, 246, 243, 0.96); }
  .site-header .wrap { min-height: 56px; flex-wrap: nowrap; gap: 10px; padding: 0; }
  .brand { gap: 8px; font-size: 14px; letter-spacing: 0.02em; }
  .brand img { width: 30px; height: 30px; }
  .nav { gap: 11px; width: auto; margin-left: auto; flex-wrap: nowrap; justify-content: flex-end; }
  .nav a { font-size: 13px; }
  .nav a.lang { font-size: 11px; padding-left: 10px; margin-left: 1px; }
  .hero, .grid, .split, .stats, .deal { grid-template-columns: 1fr; }
  .stats div + div { border-left: 0; border-top: 1px solid var(--line); }
  .shield { display: none; }
  .hero h1, .prose h1 { font-size: 44px; }
}
@media (max-width: 380px) {
  .wrap { width: min(var(--max), calc(100% - 20px)); }
  .site-header .wrap { gap: 8px; }
  .brand img { width: 26px; height: 26px; }
  .nav { gap: 8px; }
  .nav a { font-size: 12px; }
  .nav a.lang { padding-left: 8px; }
}
