/*
 * Bagate — лендинг для контент-заводов.
 * Опорная форма — вертикальный кадр 9:16: из него собраны первый экран и
 * блок «три роли». Остальное — спокойная типографика без украшений.
 * Шрифты свои (Unbounded — заголовки, Golos Text — текст): со сторонних
 * CDN ничего не грузим.
 */
@font-face { font-family: 'Unbounded'; font-weight: 600; font-display: swap; src: url('/fonts/unbounded-cyrillic-600-normal.woff2') format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Unbounded'; font-weight: 600; font-display: swap; src: url('/fonts/unbounded-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: 'Unbounded'; font-weight: 700; font-display: swap; src: url('/fonts/unbounded-cyrillic-700-normal.woff2') format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Unbounded'; font-weight: 700; font-display: swap; src: url('/fonts/unbounded-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: 'Golos Text'; font-weight: 400; font-display: swap; src: url('/fonts/golos-text-cyrillic-400-normal.woff2') format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Golos Text'; font-weight: 400; font-display: swap; src: url('/fonts/golos-text-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: 'Golos Text'; font-weight: 600; font-display: swap; src: url('/fonts/golos-text-cyrillic-600-normal.woff2') format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Golos Text'; font-weight: 600; font-display: swap; src: url('/fonts/golos-text-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2212; }

:root {
  --paper: #f3f2f8;
  --surface: #ffffff;
  --ink: #1b1525;
  --muted: #6c667a;
  --line: #e2dfeb;
  --magenta: #c8277a;
  --violet: #6a3de8;
  --orange: #f07a2b;
  --grow: #13906a;
  --fall: #c2410c;
  --brand: linear-gradient(135deg, #7b3fe4 0%, #c8277a 52%, #f07a2b 100%);
  --display: 'Unbounded', 'Golos Text', system-ui, sans-serif;
  --text: 'Golos Text', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.55 var(--text); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; z-index: 10; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(30px, 4.2vw, 52px); line-height: 1.08; }
h2 { font-size: clamp(26px, 3.4vw, 40px); line-height: 1.12; }
h3 { font-size: 19px; line-height: 1.25; font-weight: 600; }
p { margin: 0; }
.lead { font-size: clamp(18px, 1.6vw, 20px); color: #3b3448; max-width: 34em; }
.note { font-size: 14px; color: var(--muted); }

/* ── Кнопки ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: 14px; font: 600 16px/1 var(--text); text-decoration: none; border: 0; cursor: pointer; }
.btn-main { background: var(--ink); color: #fff; }
.btn-main:hover { background: #33294a; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }

/* ── Шапка ── */
.top { position: sticky; top: 0; z-index: 5; background: rgba(243, 242, 248, 0.86); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font: 700 20px/1 var(--display); text-decoration: none; }
.logo-mark { width: 36px; height: 36px; border-radius: 9px; background: url('/favicon.svg') center / contain no-repeat; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a:not(.btn) { text-decoration: none; color: #3b3448; font-weight: 600; font-size: 15px; }
.nav a:not(.btn):hover { color: var(--ink); }
.nav .btn { min-height: 40px; padding: 0 16px; font-size: 15px; }
@media (max-width: 760px) { .nav a:not(.btn) { display: none; } }

/* ── Первый экран ── */
.hero { padding: clamp(36px, 6vw, 72px) 0 clamp(48px, 7vw, 96px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { max-width: 14em; }
.hero .lead { margin-top: 22px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 28px; padding: 0; list-style: none; color: var(--muted); font-size: 15px; }
.hero-facts li { display: flex; align-items: center; gap: 8px; }
.hero-facts li::before { content: ''; width: 6px; height: 10px; border-radius: 2px; background: var(--brand); }
.hero .wrap > * { min-width: 0; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); } }

/* Лента вертикальных кадров: темы, которые растут */
.feed { display: flex; gap: 18px; align-items: flex-start; }
.frame { position: relative; flex: 0 1 230px; min-width: 0; aspect-ratio: 9 / 16; border-radius: 26px; background: var(--surface); padding: 16px;
  box-shadow: 0 1px 0 var(--line), 0 24px 48px -28px rgba(46, 18, 84, 0.45); display: flex; flex-direction: column; overflow: hidden; }
.frame::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 2px; background: var(--brand);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0.9; }
.feed .frame:nth-child(2) { margin-top: 64px; }
/* Третий кадр — только там, где влезает целиком */
.feed .frame:nth-child(3) { display: none; }
@media (min-width: 1240px) { .feed .frame { flex-basis: 210px; } }
@media (max-width: 900px) { .feed .frame:nth-child(3) { display: flex; } .feed { overflow-x: auto; padding-bottom: 12px; } .feed .frame { flex: 0 0 220px; } .feed .frame:nth-child(3) { margin-top: 24px; } }
@media (max-width: 560px) {
  .feed { scroll-snap-type: x mandatory; margin: 0 calc(var(--gutter) * -1); padding-left: var(--gutter); padding-right: var(--gutter); gap: 12px; }
  .feed .frame { flex: 0 0 200px; scroll-snap-align: start; }
  .feed .frame:nth-child(n) { margin-top: 0; }
}
.frame-top { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--muted); }
.pl { display: inline-flex; gap: 4px; }
.pl i { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; font: 700 9px/1 var(--text); font-style: normal; color: #fff; }
.pl-vk { background: #0077ff; } .pl-yt { background: #e62117; } .pl-rt { background: #100943; } .pl-tg { background: #2aabee; } .pl-tt { background: #111; } .pl-ig { background: #d62976; }
.frame-topic { margin-top: auto; font: 600 18px/1.2 var(--display); }
.frame-growth { margin-top: 8px; font: 700 34px/1 var(--display); color: var(--grow); }
.frame-growth small { display: block; margin-top: 6px; font: 400 13px/1.3 var(--text); color: var(--muted); }
.spark { margin-top: 14px; height: 64px; }
.frame-foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.hero-caption { margin-top: 14px; font-size: 13px; color: var(--muted); }

/* ── Площадки ── */
.platforms { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.platforms .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 34px; padding-top: 22px; padding-bottom: 22px; }
.platforms p { color: var(--muted); font-size: 15px; margin-right: 6px; }
.platforms ul { display: flex; flex-wrap: wrap; gap: 12px 26px; margin: 0; padding: 0; list-style: none; font: 600 17px/1 var(--display); }

/* ── Секции ── */
section.block { padding: clamp(64px, 9vw, 120px) 0; }
.block-head { max-width: 44em; margin-bottom: clamp(32px, 4vw, 52px); }
.block-head p { margin-top: 16px; color: #3b3448; font-size: 18px; }

/* Три роли — три телефона */
.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.role figure { margin: 0; }
.phone { aspect-ratio: 9 / 16; max-height: 560px; width: 100%; max-width: 300px; border-radius: 30px; background: var(--ink); padding: 10px; }
.screen { height: 100%; border-radius: 22px; background: var(--surface); padding: 18px 16px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; font-size: 13px; }
.screen-title { font: 600 15px/1.2 var(--display); margin-bottom: 2px; }
.screen-sub { color: var(--muted); font-size: 12px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px; border-radius: 12px; background: var(--paper); }
.row b { font-weight: 600; }
.chip { flex: none; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; }
.chip-idea { background: #ece7fb; color: var(--violet); }
.chip-shoot { background: #fdebdc; color: #b4520e; }
.chip-done { background: #dcf3ea; color: var(--grow); }
.chip-quiet { background: #fbe4e4; color: #b42318; }
.bar { height: 8px; border-radius: 4px; background: var(--paper); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 4px; background: var(--brand); }
.kpi { font: 700 26px/1 var(--display); }
.kpi-up { color: var(--grow); font-weight: 600; font-size: 13px; }
.role figcaption { margin-top: 20px; max-width: 300px; }
.role figcaption h3 { margin-bottom: 8px; }
.role figcaption p { color: #3b3448; font-size: 16px; }
@media (max-width: 900px) {
  .roles { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: var(--gutter); padding: 0 var(--gutter) 12px; margin: 0 calc(var(--gutter) * -1); }
  .role { flex: 0 0 min(78%, 300px); scroll-snap-align: start; }
}

/* Что получает контент-завод — четыре блока, последний (деньги) тёмный */
.values { background: var(--surface); }
.values-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2vw, 24px); }
.value { min-width: 0; padding: clamp(24px, 3vw, 36px); border-radius: 22px; background: var(--paper); }
.value-n { font: 700 14px/1 var(--display); color: var(--magenta); margin-bottom: 14px; }
.value h3 { font-size: clamp(19px, 2vw, 22px); margin-bottom: 16px; }
.value ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.value li { position: relative; padding-left: 22px; color: #3b3448; font-size: 16px; }
.value li::before { content: ''; position: absolute; left: 0; top: 0.62em; width: 10px; height: 2px; border-radius: 1px; background: var(--brand); }
.value-money { background: var(--ink); }
.value-money h3 { color: #fff; }
.value-money .value-n { color: #f3a6cc; }
.value-money li { color: #d9d4e4; }
@media (max-width: 760px) { .values-grid { grid-template-columns: 1fr; } }

/* Как это работает — последовательность */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; margin: 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; padding-top: 22px; border-top: 2px solid var(--ink); }
.steps li::before { content: counter(s); display: block; font: 700 15px/1 var(--display); color: var(--magenta); margin-bottom: 14px; }
.steps h3 { margin-bottom: 10px; }
.steps p { color: #3b3448; font-size: 16px; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* Вопросы */
.faq { max-width: 820px; }
.faq details { border-top: 1px solid var(--line); padding: 18px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font: 600 18px/1.35 var(--text); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 600 22px/1 var(--display); color: var(--magenta); }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin-top: 10px; color: #3b3448; max-width: 40em; }

/* Заявка */
.apply .wrap { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.apply-text p { margin-top: 16px; color: #3b3448; font-size: 18px; max-width: 26em; }
.apply-text ul { margin: 24px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; color: #3b3448; }
.apply-text li { display: flex; gap: 10px; }
.apply-text li::before { content: ''; flex: none; width: 6px; height: 10px; margin-top: 8px; border-radius: 2px; background: var(--brand); }
@media (max-width: 900px) { .apply .wrap { grid-template-columns: minmax(0, 1fr); } }

form.lead-form { background: var(--surface); border-radius: 24px; padding: clamp(20px, 3vw, 34px); display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.field { display: grid; gap: 6px; }
.field-wide { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 600; }
.field label span { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line);
  background: #fcfbfe; font: 400 16px/1.3 var(--text); color: var(--ink); }
.field textarea { min-height: 104px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--violet); background: #fff; }
.field input[aria-invalid='true'] { border-color: #b42318; }
.consent { grid-column: 1 / -1; display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: #3b3448; }
.consent input { flex: none; width: 20px; height: 20px; margin-top: 1px; accent-color: var(--magenta); }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.form-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.form-error { grid-column: 1 / -1; padding: 12px 14px; border-radius: 12px; background: #fdeceb; color: #9b1c1c; font-size: 15px; }
.form-done { background: var(--surface); border-radius: 24px; padding: clamp(24px, 3vw, 40px); }
.form-done h3 { font-size: 24px; }
.form-done p { margin-top: 12px; color: #3b3448; }
@media (max-width: 560px) { form.lead-form { grid-template-columns: 1fr; } }

/* Подвал */
footer { border-top: 1px solid var(--line); padding: 34px 0 44px; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
footer a { color: var(--ink); }

/* Текстовые страницы (политика, 404) */
.doc { max-width: 760px; padding: 48px var(--gutter) 80px; margin: 0 auto; }
.doc h1 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 24px; }
.doc h2 { font-size: 21px; margin: 32px 0 10px; }
.doc p, .doc li { color: #3b3448; }
.doc p + p { margin-top: 10px; }
.doc ul { padding-left: 20px; }

/* Один момент движения: кадры первого экрана выезжают при загрузке */
@media (prefers-reduced-motion: no-preference) {
  .feed .frame { animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .feed .frame:nth-child(2) { animation-delay: 0.12s; }
  .feed .frame:nth-child(3) { animation-delay: 0.24s; }
  @keyframes rise { from { opacity: 0; translate: 0 36px; } to { opacity: 1; translate: 0 0; } }
}
