/* ============================================================
   ИИ КОНТЕНТ ЗАВОД — Вариант Б «Типографический завод» (light)
   Микс референсов: структура exportarts (видео в hero, счётчики),
   характер smalltribe (гигантский гротеск, курсивные вставки),
   дисциплина gcv. Токены — DESIGN.md, секция Variant B.
   ============================================================ */

:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --ink: #101013;
  --ink-muted: #6f6f76;
  --accent: #1400ff;
  --accent-soft: rgba(20, 0, 255, 0.08);
  --border: rgba(16, 16, 19, 0.14);

  --font-display: "Inter Tight", "Inter", sans-serif;
  --font-body: "Inter", -apple-system, sans-serif;
  --font-accent: "Spectral", serif;

  --size-display: clamp(48px, 10vw, 128px);
  --size-h1: clamp(34px, 5.5vw, 72px);
  --size-h2: clamp(24px, 3vw, 38px);
  --size-stat: clamp(56px, 8vw, 120px);
  --size-lead: 21px;
  --size-body: 17px;
  --size-caption: 13px;

  --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 160px;

  --r-card: 20px;
  --r-pill: 999px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--size-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 var(--s-5); }

section { padding: var(--s-9) 0; }
@media (min-width: 1024px) { section { padding: var(--s-10) 0; } }

/* ---------- Типографика ---------- */

.display {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--size-display);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

h1, .h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--size-h1);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

h2, .h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--size-h2);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.accent-italic {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
}

.stat-number {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--size-stat);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--accent);
}

.lead { font-size: var(--size-lead); line-height: 1.5; color: var(--ink-muted); }

.caption, .eyebrow {
  font-size: var(--size-caption);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow { color: var(--ink-muted); display: block; margin-bottom: var(--s-5); }

.section-head { max-width: 860px; margin-bottom: var(--s-8); }
.section-head .lead { margin-top: var(--s-5); }

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-4) var(--s-6);
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: var(--size-body);
  border: none;
  cursor: pointer;
  transition: transform 200ms ease, background 200ms ease;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost { background: transparent; border: 1.5px solid var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.01em;
  font-size: var(--size-caption);
  text-transform: uppercase;
  white-space: nowrap;
}

@media (min-width: 768px) { .nav-logo { font-size: 17px; } }

.nav-links { display: none; gap: var(--s-6); list-style: none; }
.nav-links a { font-size: var(--size-caption); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); }
.nav-links a:hover { color: var(--ink); }
.nav .btn { padding: var(--s-3) var(--s-5); font-size: var(--size-caption); }
@media (min-width: 768px) { .nav-links { display: flex; } }

/* ---------- Hero: видео сразу, exportarts-структура ---------- */

.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(72px + var(--s-7)) 0 var(--s-7);
}

.hero-inner { display: grid; gap: var(--s-7); align-items: center; width: 100%; }

.hero-copy .lead { margin-top: var(--s-5); max-width: 540px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--s-4); margin-top: var(--s-7); }

.hero-media {
  justify-self: center;
  width: min(340px, 75vw);
  aspect-ratio: 9 / 16;
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(16, 16, 19, 0.18);
  position: relative;
}

.hero-media video { width: 100%; height: 100%; object-fit: cover; }

@media (min-width: 1024px) {
  .hero-inner { grid-template-columns: 1.35fr 1fr; }
}

/* ---------- Лента счётчиков ---------- */

.counters {
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  padding: var(--s-7) 0;
}

.counters-grid { display: grid; gap: var(--s-7); }
@media (min-width: 768px) { .counters-grid { grid-template-columns: repeat(3, 1fr); } }

.counter .caption { color: var(--ink-muted); display: block; margin-top: var(--s-3); max-width: 260px; }

/* ---------- Услуга + пруф-видео (чередование) ---------- */

.duo {
  display: grid;
  gap: var(--s-7);
  align-items: center;
  padding: var(--s-8) 0;
  border-bottom: 1px solid var(--border);
}

.duo:last-child { border-bottom: none; }

@media (min-width: 900px) {
  .duo { grid-template-columns: 1.2fr 1fr; }
  .duo.flip .duo-media { order: -1; }
}

.duo-media {
  justify-self: center;
  width: min(300px, 70vw);
  aspect-ratio: 9 / 16;
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: 0 16px 56px rgba(16, 16, 19, 0.14);
  position: relative;
  cursor: pointer;
}

.duo-media video { width: 100%; height: 100%; object-fit: cover; }

.duo-media .clip-label {
  position: absolute;
  left: var(--s-3); right: var(--s-3); bottom: var(--s-3);
  padding: var(--s-2) var(--s-3);
  border-radius: 12px;
  background: rgba(246, 245, 241, 0.9);
  font-size: var(--size-caption);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
}

.duo-copy .h1 { margin-bottom: var(--s-4); }
.duo-copy p { color: var(--ink-muted); max-width: 480px; margin-bottom: var(--s-5); }

/* Блок бит-рилсов: текст сверху, три полноразмерных видео в ряд.
   На мобильном — горизонтальная лента со свайпом (scroll-snap). */
.beat-block {
  display: block;
}

.beat-block .duo-copy {
  max-width: 720px;
  margin-bottom: var(--s-7);
}

.beat-row {
  display: flex;
  gap: var(--s-5);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--s-3);
}

.beat-row .duo-media {
  flex: 0 0 auto;
  scroll-snap-align: center;
  justify-self: unset;
}

@media (min-width: 1024px) {
  .beat-row {
    justify-content: center;
    overflow-x: visible;
  }
}

/* Кнопка звука (общая для всех видео-карточек) */
.sound-toggle {
  position: absolute;
  top: var(--s-3);
  right: var(--s-3);
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: rgba(246, 245, 241, 0.9);
  color: var(--ink);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 200ms ease;
}

.sound-toggle:hover { background: var(--accent); color: #fff; }

.duo-price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--size-h2);
}

.duo-price small {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--size-caption);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: var(--s-2);
}

.duo-extra { display: flex; gap: var(--s-4); flex-wrap: wrap; margin-top: var(--s-4); }

.chip {
  padding: var(--s-2) var(--s-4);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-size: var(--size-caption);
  font-weight: 600;
  color: var(--ink-muted);
}

/* ---------- Пруф-метрики ---------- */

.proof { background: var(--surface); border-radius: var(--r-card); padding: var(--s-8) var(--s-6); }

.proof-grid { display: grid; gap: var(--s-6); }
@media (min-width: 768px) { .proof-grid { grid-template-columns: 1.4fr 1fr; } }

.proof-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-5); }
.proof-handle { font-family: var(--font-display); font-weight: 700; font-size: var(--size-lead); }
.proof-head .caption { color: var(--ink-muted); }

.proof-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); }
.proof-thumbs figure { position: relative; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; }
.proof-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.proof-thumbs figcaption {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end;
  padding: var(--s-3);
  background: linear-gradient(180deg, transparent 55%, rgba(16,16,19,0.75) 100%);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
}

.proof-numbers { display: grid; gap: var(--s-5); }
.proof-numbers .stat-number { font-size: clamp(40px, 5vw, 72px); }
.proof-numbers .caption { display: block; color: var(--ink-muted); margin-top: var(--s-1, 4px); }

/* ---------- Цены ---------- */

.setup-card {
  border: 2px solid var(--accent);
  border-radius: var(--r-card);
  background: var(--accent-soft);
  padding: var(--s-7);
  display: grid;
  gap: var(--s-5);
}

@media (min-width: 768px) { .setup-card { grid-template-columns: auto 1fr auto; align-items: center; } }

.setup-card .price { font-family: var(--font-display); font-weight: 800; font-size: var(--size-stat); line-height: 1; white-space: nowrap; }
.setup-card ul { list-style: none; color: var(--ink-muted); display: grid; gap: var(--s-2); }
.setup-card li::before { content: "— "; color: var(--accent); }

.tier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); margin-top: var(--s-5); }
.tier { border: 1px solid var(--border); border-radius: var(--r-card); background: var(--surface); padding: var(--s-5); text-align: center; }
.tier-best { border-color: var(--accent); background: var(--accent-soft); }
.tier-volume { display: block; font-size: var(--size-caption); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: var(--s-3); }
.tier-price { display: block; font-family: var(--font-display); font-weight: 800; font-size: var(--size-h2); margin-bottom: 4px; }
.tier .caption { color: var(--ink-muted); }

.note-line { margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid var(--border); color: var(--ink-muted); max-width: 760px; }
.note-small { font-size: var(--size-caption); border-top: none; padding-top: 0; margin-top: var(--s-4); }

/* ---------- FAQ ---------- */

.faq-list { max-width: 820px; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary {
  padding: var(--s-5) 0;
  font-weight: 700;
  font-family: var(--font-display);
  font-size: var(--size-lead);
  letter-spacing: -0.01em;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: var(--s-4);
}
.faq-item summary::after { content: "+"; color: var(--accent); font-weight: 800; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { color: var(--ink-muted); padding-bottom: var(--s-5); max-width: 660px; }

/* ---------- Финал ---------- */

.final { background: var(--ink); color: var(--bg); border-radius: var(--r-card); text-align: center; padding: var(--s-9) var(--s-6); }
.final .lead { color: rgba(246, 245, 241, 0.6); max-width: 560px; margin: var(--s-5) auto var(--s-7); }

/* ---------- Footer ---------- */

.footer { padding: var(--s-6) 0; }
.footer-inner { display: flex; flex-wrap: wrap; gap: var(--s-4); justify-content: space-between; color: var(--ink-muted); font-size: var(--size-caption); }

/* ---------- Motion / a11y ---------- */

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

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
