/* «Рой»: тема. Описание решений в DESIGN.md */
:root {
  color-scheme: dark;
  --bg: oklch(0.17 0.025 150);
  --surface: oklch(0.21 0.03 150);
  --surface-2: oklch(0.25 0.035 150);
  --ink: oklch(0.95 0.02 130);
  --ink-soft: oklch(0.76 0.03 140);
  --line: oklch(0.32 0.03 150);
  --lime: oklch(0.87 0.17 128);
  --lime-ink: oklch(0.2 0.05 140);
  --amber: oklch(0.8 0.13 75);

  --accent: var(--lime);
  --accent-ink: var(--lime-ink);
  --focus: var(--amber);

  --offer-bg: oklch(0.95 0.015 130);
  --offer-ink: oklch(0.2 0.03 150);
  --offer-line: oklch(0.82 0.02 140);

  --radius-s: 4px;
  --radius-m: 6px;
  --radius-l: 999px;

  --font-display: "Unbounded", "Onest", system-ui, sans-serif;
  --font-body: "Onest", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}
body { line-height: 1.65; }
h1, h2 { font-weight: 700; letter-spacing: -0.01em; }

/* ---------- Шапка ---------- */
.site-header { position: sticky; top: 0; z-index: var(--z-header); background: color-mix(in oklch, var(--bg) 88%, transparent); backdrop-filter: saturate(1.2) blur(10px); border-bottom: 1px solid transparent; transition: border-color var(--dur) var(--ease-out); }
.site-header.is-stuck { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; letter-spacing: 0.02em; }
.brand svg { width: 30px; height: 30px; }
.nav { display: flex; gap: 1.5rem; align-items: center; font-size: 0.9375rem; }
.nav a:not(.btn-pill) { text-decoration: none; color: var(--ink-soft); transition: color var(--dur-fast) var(--ease-out); }
.nav a:not(.btn-pill):hover { color: var(--ink); }
@media (max-width: 720px) { .nav a:not(.btn-pill) { display: none; } }

/* ---------- Кнопки ---------- */
.btn-pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 50px; padding: 0 1.5rem; border-radius: var(--radius-l);
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease-out), background-color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.btn-pill:hover { border-color: var(--ink-soft); background: var(--surface); }
.btn-pill:active { transform: scale(0.98); }
.btn-pill--primary { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }
.btn-pill--primary:hover { background: color-mix(in oklch, var(--lime) 88%, white); border-color: transparent; }
.btn-pill--small { min-height: 40px; padding: 0 1.1rem; font-size: 0.9375rem; }
.btn-pill[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }
.btn-pill svg { width: 18px; height: 18px; transition: transform var(--dur) var(--ease-out); }
.btn-pill--primary:hover svg { transform: translateY(2px); }
.btn-meta { font-weight: 400; font-size: 0.8125rem; opacity: 0.75; font-family: var(--font-mono); }

/* ---------- Герой ---------- */
.hero { position: relative; isolation: isolate; overflow: clip; padding-block: clamp(2rem, 6vw, 5rem) clamp(3rem, 8vw, 6rem); }
.hero .wrap { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 960px) { .hero .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: min(640px, 78dvh); } }
.hero-canvas { width: 100%; aspect-ratio: 1 / 1; max-height: 620px; }
@media (max-width: 959px) { .hero-canvas { order: -1; aspect-ratio: 16 / 10; } }
.hero h1 { font-size: clamp(2rem, 4.2vw, 3.6rem); line-height: 1.06; }
.hero h1 span { color: var(--lime); }
.hero .lead { margin-top: 1.4rem; font-size: clamp(1.0625rem, 1.5vw, 1.25rem); color: var(--ink-soft); max-width: 46ch; }
.hero .cta { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero .fineprint { margin-top: 1.1rem; font-size: 0.875rem; color: var(--ink-soft); max-width: 52ch; }
.kicker { display: inline-flex; align-items: center; gap: 0.55rem; font-size: 0.8125rem; color: var(--ink-soft); margin-bottom: 1.4rem; }
.kicker i { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); animation: pulse 2.4s var(--ease-out) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--lime) 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 10px transparent; } }

/* Карта кусочков */
.piece-map { margin-top: 2rem; display: grid; grid-template-columns: repeat(40, 1fr); gap: 2px; max-width: 520px; }
.piece-map i { aspect-ratio: 1; background: var(--line); border-radius: 1px; transition: background-color 300ms var(--ease-out), transform 300ms var(--ease-out); }
.piece-map i.got { background: var(--lime); }
.piece-map i.wip { background: var(--amber); transform: scale(0.8); }
.piece-legend { margin-top: 0.6rem; display: flex; justify-content: space-between; max-width: 520px; font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-soft); }

/* ---------- Секции ---------- */
.section { padding-block: clamp(4rem, 10vw, 8rem); }
.section h2 { font-size: clamp(1.625rem, 3vw, 2.5rem); line-height: 1.12; max-width: 26ch; }
.section-lead { margin-top: 1rem; color: var(--ink-soft); max-width: 58ch; font-size: 1.0625rem; }
.rule { height: 6px; background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 8px); }

/* Окно клиента */
.client { margin-top: 2.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; }
.client__bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); font-size: 0.8125rem; color: var(--ink-soft); }
.client__bar b { color: var(--ink); font-weight: 600; }
.client__total { font-family: var(--font-mono); }
.client table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.client th { text-align: left; font-weight: 500; color: var(--ink-soft); font-size: 0.75rem; padding: 0.6rem 1rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.client td { padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.client tr:last-child td { border-bottom: 0; }
.client tbody tr { transition: background-color var(--dur-fast) var(--ease-out); }
.client tbody tr:hover { background: var(--surface-2); }
.client .num { font-family: var(--font-mono); text-align: right; white-space: nowrap; }
.client .name strong { display: block; font-weight: 500; }
.client .name small { color: var(--ink-soft); font-size: 0.75rem; }
.progress { position: relative; height: 6px; min-width: 110px; background: var(--line); border-radius: 3px; overflow: hidden; }
.progress span { position: absolute; inset: 0; background: var(--lime); transform-origin: left; transform: scaleX(0); transition: transform 1.2s var(--ease-out); }
.progress span.is-wip { background: var(--amber); }
.client-wrap { overflow-x: auto; }
@media (max-width: 640px) { .client .hide-sm { display: none; } }

/* Как это работает: шаги на линии */
.flow { margin: 3rem 0 0; padding: 0; position: relative; display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) { .flow { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem; } }
.flow::before { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 2px; background: var(--line); }
.flow::after { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 2px; background: var(--lime); transform: scaleX(0); transform-origin: left; transition: transform 1.6s var(--ease-out) 0.2s; }
.flow.is-in::after { transform: scaleX(1); }
@media (max-width: 859px) { .flow::before, .flow::after { display: none; } }
.flow li { list-style: none; position: relative; padding-top: 2.6rem; }
.flow li::before { content: ""; position: absolute; top: 4px; left: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line); transition: background-color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out); transition-delay: calc(var(--i) * 500ms + 300ms); }
.flow.is-in li::before { background: var(--lime); border-color: var(--lime); }
.flow h3 { font-family: var(--font-body); font-size: 1.1875rem; font-weight: 600; }
.flow p { margin-top: 0.5rem; color: var(--ink-soft); font-size: 0.9375rem; max-width: 36ch; }

/* Тарифы: таблица сравнения */
.plans-wrap { margin-top: 2.5rem; overflow-x: auto; }
.plans { width: 100%; min-width: 620px; border-collapse: collapse; }
.plans th, .plans td { padding: 1rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.plans thead th { vertical-align: bottom; }
.plans thead th:not(:first-child) { width: 22%; }
.plans .plan-name { font-family: var(--font-display); font-size: 1.125rem; font-weight: 700; display: block; }
.plans .plan-price { display: block; margin-top: 0.3rem; font-family: var(--font-mono); font-size: 0.875rem; color: var(--ink-soft); font-weight: 400; }
.plans .is-featured { background: color-mix(in oklch, var(--lime) 8%, transparent); }
.plans tbody th { font-weight: 400; color: var(--ink-soft); }
.plans .yes { color: var(--lime); font-weight: 600; }
.plans .no { color: var(--ink-soft); opacity: 0.6; }
.plans tfoot td { border-bottom: 0; }
.note { margin-top: 1.25rem; font-size: 0.875rem; color: var(--ink-soft); max-width: 72ch; }

/* Легальность */
.legal-band { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .legal-band { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.check-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 1.1rem; }
.check-list li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 0.9rem; }
.check-list svg { width: 22px; height: 22px; color: var(--lime); margin-top: 2px; }
.check-list .x svg { color: var(--amber); }
.check-list strong { display: block; font-weight: 600; }
.check-list span { color: var(--ink-soft); font-size: 0.9375rem; }

/* FAQ */
.faq { margin-top: 2rem; max-width: 820px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 1.15rem 2.5rem 1.15rem 0; position: relative; font-weight: 600; font-size: 1.0625rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.25rem; top: 50%; transform: translateY(-50%); font-family: var(--font-mono); font-size: 1.25rem; color: var(--lime); transition: transform var(--dur) var(--ease-out); }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq .answer { padding: 0 0 1.25rem; color: var(--ink-soft); max-width: 68ch; }

/* Подвал */
.site-footer { border-top: 1px solid var(--line); padding-block: 2.5rem 3rem; font-size: 0.875rem; }
.site-footer .wrap { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .site-footer .wrap { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } }
.site-footer nav { display: flex; flex-direction: column; gap: 0.4rem; }
.site-footer nav a { color: var(--ink-soft); }

/* Загрузка */
.dl-panel { margin-top: 2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 0 1rem; }
.dl-panel .file-facts { margin: 0; border-top: 0; }
.dl-panel .file-facts > :nth-last-child(-n + 2) { border-bottom: 0; }
.cookie button[data-cookie="accept"] { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }

@media (max-width: 480px) {
  .hero .cta > *, .dl-actions > [data-download-main] { width: 100%; }
  .btn-pill { white-space: normal; text-align: center; padding-block: 0.6rem; }
}

.num, .price { font-variant-numeric: tabular-nums; }
