:root {
  --bg: #0b0d12;
  --bg-soft: #12151d;
  --panel: #161a24;
  --line: #242a38;
  --text: #f2f4f8;
  --muted: #9aa3b5;
  --accent: #6d5efc;
  --accent-2: #22c7a9;
  --radius: 18px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 10% -10%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 60%),
    radial-gradient(700px 500px at 100% 0%, color-mix(in srgb, var(--accent-2) 18%, transparent), transparent 55%),
    var(--bg);
  color: var(--text);
  font: 16px/1.55 "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.locked { overflow: hidden; }

a { color: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 16px clamp(18px, 4vw, 56px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  font-size: 1.1rem;
}

.logo { width: 30px; height: 30px; }
.logo rect { fill: var(--accent); }
.logo .logo-play { fill: #fff; }

.nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav a { text-decoration: none; }
.nav a:hover { color: var(--text); }

.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 20px;
  font: inherit;
  font-weight: 600;
  color: #08090d;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

main { padding: 0 clamp(18px, 4vw, 56px); }

.hero { padding: clamp(48px, 8vw, 104px) 0 48px; max-width: 760px; }

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(2.1rem, 5.2vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.lede { margin: 0 0 28px; color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.15rem); max-width: 58ch; }

.cta { display: flex; flex-wrap: wrap; gap: 12px; }

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  margin: 44px 0 0;
}

.stats div { display: flex; flex-direction: column-reverse; gap: 2px; }
.stats dt { color: var(--muted); font-size: 0.85rem; }
.stats dd { margin: 0; font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }

.section { padding: 32px 0 48px; border-top: 1px solid var(--line); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section h2 { margin: 0 0 14px; font-size: clamp(1.35rem, 2.4vw, 1.9rem); letter-spacing: -0.02em; }
.section-head h2 { margin: 0; }

.link { color: var(--accent-2); text-decoration: none; font-size: 0.95rem; }
.link:hover { text-decoration: underline; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.card h3 { margin: 14px 16px 4px; font-size: 1rem; }
.card p { margin: 0 16px 16px; color: var(--muted); font-size: 0.86rem; }

.thumb {
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(120% 120% at 20% 10%, hsl(var(--h, 250) 80% 62% / 0.85), transparent 60%),
    radial-gradient(120% 120% at 90% 90%, hsl(calc(var(--h, 250) + 55) 75% 52% / 0.75), transparent 55%),
    #10131b;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 10px;
}

.thumb span {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 4px 8px;
  border-radius: 6px;
  background: #e5484d;
  color: #fff;
}

.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.split p { color: var(--muted); }

.checks { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.checks li { padding-left: 26px; position: relative; }
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 14px;
  height: 8px;
  border-left: 2px solid var(--accent-2);
  border-bottom: 2px solid var(--accent-2);
  transform: rotate(-45deg);
}

.panel {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.panel-row { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; color: var(--muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #21c07a; box-shadow: 0 0 0 4px rgb(33 192 122 / 0.15); }

.panel-grid {
  margin: 16px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.panel-grid span {
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  background:
    radial-gradient(100% 100% at 30% 20%, color-mix(in srgb, var(--accent) 60%, #1a1e29), #1a1e29);
  border: 1px solid var(--line);
}

.panel-grid span:nth-child(2) { background: radial-gradient(100% 100% at 70% 30%, color-mix(in srgb, var(--accent-2) 50%, #1a1e29), #1a1e29); }
.panel-grid span:nth-child(3) { background: radial-gradient(100% 100% at 30% 70%, color-mix(in srgb, var(--accent) 35%, #1a1e29), #1a1e29); }
.panel-grid span:nth-child(4) { background: radial-gradient(100% 100% at 70% 70%, color-mix(in srgb, var(--accent-2) 35%, #1a1e29), #1a1e29); }

.panel-foot { color: var(--muted); font-size: 0.85rem; }

.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }

.plan {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.plan h3 { margin: 0 0 10px; font-size: 1rem; color: var(--muted); font-weight: 600; }
.plan .price { margin: 0 0 12px; font-size: 1.9rem; font-weight: 800; letter-spacing: -0.03em; }
.plan .price span { font-size: 0.85rem; color: var(--muted); font-weight: 500; }
.plan p:last-child { margin: 0; color: var(--muted); font-size: 0.9rem; }

.plan-featured {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 12%, var(--panel)), var(--panel));
}

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 26px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.footer nav { display: flex; gap: 18px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--text); }

.modal[hidden] { display: none; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(4 6 10 / 0.72);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  width: min(420px, 100%);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 30px 80px rgb(0 0 0 / 0.55);
  animation: pop 0.18s ease-out;
}

@keyframes pop {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.modal-card h2 { margin: 0 0 10px; font-size: 1.35rem; }
.modal-text { margin: 0 0 22px; color: var(--muted); }
.modal-card .btn { width: 100%; }

.modal-x {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.modal-x:hover { color: var(--text); }

/* Варианты оформления: один выбирается случайно при каждой установке */
body.layout-classic .nav a { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.82rem; }

body.layout-split .topbar { padding-top: 12px; padding-bottom: 12px; }
body.layout-split .nav { gap: 8px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; }
body.layout-split .nav a { padding: 5px 12px; border-radius: 999px; }
body.layout-split .nav a:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }
body.layout-split .hero { max-width: 980px; }
body.layout-split .lede { max-width: 48ch; }
body.layout-split .cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
body.layout-split .thumb { aspect-ratio: 21 / 9; }

body.layout-spotlight .topbar { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 14%, var(--bg)), var(--bg) 65%); }
body.layout-spotlight .nav a { padding: 6px 10px; border-radius: 8px; }
body.layout-spotlight .nav a:hover { background: color-mix(in srgb, var(--accent-2) 16%, transparent); color: var(--text); }
body.layout-spotlight .hero { max-width: 900px; margin: 0 auto; text-align: center; }
body.layout-spotlight .hero .cta,
body.layout-spotlight .stats { justify-content: center; }
body.layout-spotlight .thumb { aspect-ratio: 4 / 3; }
body.layout-spotlight .plan-featured { background: linear-gradient(180deg, color-mix(in srgb, var(--accent-2) 14%, var(--panel)), var(--panel)); }

@media (max-width: 760px) {
  .nav { display: none; }
  .split { grid-template-columns: 1fr; gap: 24px; }
  .stats { gap: 24px; }
  .topbar { gap: 14px; }
  body.layout-split .nav { border: 0; padding: 0; }
  body.layout-spotlight .hero { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
