/* Постай — лендинг. Токены из BRAND_GUIDE.md (палитра «Кобальт + коралл», Unbounded + Manrope).
   Тёмный-first премиум. Не вводить цвета/шрифты мимо токенов. */

:root {
  /* Brand */
  --cobalt: #244BE0;
  --cobalt-700: #1C3BB0;
  --cobalt-300: #8DA2F0;
  --cobalt-lift: #244BE0;      /* адаптивный кобальт-акцент (светлая=база, тёмная=светлее) */
  --coral: #FF5A4D;
  --coral-lift: #FF5A4D;       /* адаптивный коралл-акцент */
  --coral-700: #D8341F;

  /* Adaptive surface — СВЕТЛАЯ схема по умолчанию (основная); тёмная = html[data-theme="dark"] */
  --bg: #EFEBE1;
  --bg-2: #F7F4ED;
  --surface-dark: #FFFFFF;
  --surface-dark-2: #FBFAF6;
  --line-dark: #E4E0D6;
  --line-dark-2: #ECE8DE;
  --ink-invert: #15182B;
  --ink-invert-2: #5A5E70;     /* вторичный (контраст ≥4.5 на светлом bg) */

  /* Light surface (paper-секции, тарифы) */
  --paper: #F7F4ED;
  --surface: #FFFFFF;
  --ink: #15182B;
  --ink-700: #2C3047;
  --muted: #5A5E70;
  --line: #E4E0D6;

  /* Semantic / важность */
  --importance-high: #FF5A4D;
  --importance-mid: #E8A33D;
  --success: #1F9D55;

  --font-display: 'Unbounded', system-ui, -apple-system, sans-serif;
  --font-body: 'Manrope', system-ui, -apple-system, sans-serif;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(8,12,30,.20), 0 1px 3px rgba(8,12,30,.28);
  --shadow-md: 0 8px 30px rgba(8,12,30,.35);
  --shadow-lg: 0 24px 70px rgba(8,12,30,.50);
  --glow-cobalt: 0 0 0 1px rgba(85,112,240,.30), 0 20px 60px -20px rgba(36,75,224,.55);

  --s-1:4px; --s-2:8px; --s-3:12px; --s-4:16px; --s-6:24px; --s-8:32px; --s-12:48px; --s-16:64px;

  --maxw: 1160px;
  --ease-out-expo: cubic-bezier(.16,1,.3,1);

  /* z-scale */
  --z-nav: 100;
  --z-menu: 200;
}

/* ─── ТЁМНАЯ СХЕМА (полночь + коралл) — по тумблеру ─────────────────────── */
html[data-theme="dark"] {
  --bg: #0B1330;
  --bg-2: #0E1733;
  --surface-dark: #141D3E;
  --surface-dark-2: #182248;
  --line-dark: rgba(255,255,255,.10);
  --line-dark-2: rgba(255,255,255,.06);
  --ink-invert: #EAF0FF;
  --ink-invert-2: #AEB7D4;
  --cobalt-lift: #5570F0;
  --coral-lift: #FF6452;
}

/* ─── base ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font: 400 clamp(15px,1vw + 12px,17px)/1.65 var(--font-body);
  color: var(--ink-invert);
  background: var(--bg-2);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Атмосфера полночи: два мягких сияния — кобальт слева-сверху, коралл-искра справа */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vw 50vh at 12% -8%, rgba(36,75,224,.09), transparent 60%),
    radial-gradient(40vw 40vh at 100% 0%, rgba(255,90,77,.05), transparent 55%),
    var(--bg-2);
}
html[data-theme="dark"] body::before {
  background:
    radial-gradient(60vw 50vh at 12% -8%, rgba(36,75,224,.28), transparent 60%),
    radial-gradient(40vw 40vh at 100% 0%, rgba(255,90,77,.10), transparent 55%),
    var(--bg-2);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.06; letter-spacing: -.02em; text-wrap: balance; }
p { text-wrap: pretty; }

:focus-visible { outline: 2px solid var(--coral-lift); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(20px, 5vw, 40px); }

.eyebrow { /* используется ОДИН раз как брендовый приём, не над каждой секцией */
  display: inline-flex; align-items: center; gap: 8px;
  font: 700 12px/1 var(--font-body); letter-spacing: .04em;
  color: var(--ink-invert-2);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--coral-lift); box-shadow: 0 0 12px var(--coral-lift); }

/* ─── logo wordmark ────────────────────────────────────────────────────── */
.wordmark { display: inline-flex; align-items: flex-start; font: 800 24px/1 var(--font-display); letter-spacing: -.03em; }
.wm-post { color: var(--ink-invert); }
.wm-ai { position: relative; color: #56618c; }
.wm-ai::after { content: ""; position: absolute; left: -3%; right: -3%; top: 54%; height: .11em; border-radius: 3px; background: var(--coral-lift); transform: rotate(-8deg); }
.wm-ay { font: 800 .42em/1 var(--font-display); color: var(--coral-lift); margin-left: .16em; margin-top: -.04em; }

/* ─── buttons ──────────────────────────────────────────────────────────── */
.btn {
  --_bg: var(--cobalt); --_fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 48px; padding: 13px 22px;
  font: 700 15px var(--font-body);
  background: var(--_bg); color: var(--_fg);
  border: 0; border-radius: var(--radius-md);
  transition: transform .25s var(--ease-out-expo), background .2s, box-shadow .3s var(--ease-out-expo);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--cobalt); box-shadow: var(--glow-cobalt); }
.btn-primary:hover { background: var(--cobalt-700); }
.btn-accent { background: var(--coral); box-shadow: 0 16px 44px -16px rgba(255,90,77,.7); }
.btn-accent:hover { background: var(--coral-700); }
.btn-ghost { background: transparent; color: var(--ink-invert); border: 1px solid var(--line-dark); box-shadow: none; }
.btn-ghost:hover { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.22); }
.btn svg { width: 18px; height: 18px; }
.btn-lg { min-height: 54px; padding: 16px 28px; font-size: 16px; }

/* ─── nav ──────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: var(--z-nav);
  backdrop-filter: saturate(140%) blur(14px);
  background: color-mix(in srgb, var(--bg-2) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.scrolled { border-bottom-color: var(--line-dark-2); background: color-mix(in srgb, var(--bg) 88%, transparent); }
.nav-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a { font: 600 14px var(--font-body); color: var(--ink-invert-2); transition: color .2s; }
.nav-links a:hover { color: var(--ink-invert); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; }
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta .btn-ghost { display: none; }
}

/* ─── hero ─────────────────────────────────────────────────────────────── */
.hero { position: relative; padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 9vw, 110px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; gap: 44px; } }

.hero h1 { font-size: clamp(40px, 6.2vw, 74px); font-weight: 800; margin-bottom: 22px; }
.hero h1 .accent { color: var(--coral-lift); }
.hero-lead { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.55; color: var(--ink-invert-2); max-width: 34ch; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 26px; }
.hero-note { display: flex; align-items: center; gap: 10px; font: 500 14px var(--font-body); color: var(--ink-invert-2); }
.hero-note svg { width: 17px; height: 17px; color: var(--success); flex: none; }

/* ── hero mockup: лента новостей → готовый пост (реальные компоненты продукта) ── */
.mockup { position: relative;
  /* мокап Telegram-бота ВСЕГДА тёмный (это «устройство»), независимо от темы страницы */
  --surface-dark: #141D3E; --surface-dark-2: #182248;
  --line-dark: rgba(255,255,255,.10); --line-dark-2: rgba(255,255,255,.06);
  --ink-invert: #EAF0FF; --ink-invert-2: #AEB7D4; --cobalt-lift: #5570F0;
}
.mockup-glow { position: absolute; inset: -6% -4% -10% -4%; background: radial-gradient(50% 45% at 60% 30%, rgba(85,112,240,.35), transparent 70%); filter: blur(20px); z-index: 0; }
.mock-panel {
  position: relative; z-index: 1;
  background: linear-gradient(180deg, var(--surface-dark) 0%, var(--surface-dark-2) 100%);
  border: 1px solid var(--line-dark); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 18px;
}
.mock-head { display: flex; align-items: center; gap: 9px; padding: 4px 6px 14px; }
.mock-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-dark); }
.mock-dot:nth-child(1){ background:#FF6452; } .mock-dot:nth-child(2){ background:#E8A33D; } .mock-dot:nth-child(3){ background:#1F9D55; }
.mock-title { margin-left: 8px; font: 700 12px var(--font-body); color: var(--ink-invert-2); letter-spacing: .02em; }

.feed { display: grid; gap: 8px; }
.feed-item {
  display: grid; grid-template-columns: auto 1fr; gap: 11px; align-items: center;
  background: rgba(255,255,255,.03); border: 1px solid var(--line-dark-2);
  border-radius: var(--radius-md); padding: 10px 12px;
}
.feed-item.dim { opacity: .5; }
.feed-item .txt { font: 600 13px/1.35 var(--font-body); color: var(--ink-invert); }
.feed-item .src { font: 500 11px var(--font-body); color: var(--ink-invert-2); }

.imp {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 6px;
  font: 800 15px var(--font-body); border-radius: 12px;
}
.imp-high { color: #fff; background: linear-gradient(180deg,#FF6452,#E23F30); box-shadow: 0 6px 16px -6px rgba(255,90,77,.8); }
.imp-mid { color: #3a2c10; background: linear-gradient(180deg,#F0B860,#E8A33D); }
.imp-low { color: var(--ink-invert-2); background: rgba(255,255,255,.06); }

.mock-arrow { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 0 10px; color: var(--ink-invert-2); font: 700 11px var(--font-body); letter-spacing: .08em; text-transform: uppercase; }
.mock-arrow .rule { height: 1px; flex: 1; background: linear-gradient(90deg, transparent, var(--line-dark)); }
.mock-arrow .rule.r2 { background: linear-gradient(270deg, transparent, var(--line-dark)); }
.mock-arrow .cog { width: 22px; height: 22px; color: var(--cobalt-lift); }

/* готовый пост */
.post-card {
  background: var(--surface); color: var(--ink);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  padding: 16px 16px 14px;
}
.post-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font: 800 12px var(--font-body); padding: 5px 11px; border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--importance-high) 13%, transparent); color: var(--coral-700);
  margin-bottom: 11px;
}
.post-badge .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); }
.post-card .body { font: 500 13.5px/1.5 var(--font-body); color: var(--ink-700); }
.post-card .body b { color: var(--ink); font-weight: 800; }
.post-src { display: flex; align-items: center; gap: 6px; margin-top: 12px; font: 500 12px var(--font-body); color: var(--muted); }
.post-src a { color: var(--cobalt); }
.post-actions { display: flex; gap: 8px; margin-top: 14px; }
.pa { flex: 1; text-align: center; min-height: 40px; display: flex; align-items: center; justify-content: center; font: 700 13px var(--font-body); border-radius: var(--radius-md); }
.pa-pub { background: var(--cobalt); color: #fff; }
.pa-skip { background: transparent; color: var(--muted); border: 1px solid var(--line); }

/* ─── logos / trust strip ──────────────────────────────────────────────── */
.strip { border-block: 1px solid var(--line-dark-2); padding: 20px 0; }
.strip-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 30px; text-align: center; }
.strip-inner span { font: 600 13px var(--font-body); color: var(--ink-invert-2); display: inline-flex; align-items: center; gap: 9px; }
.strip-inner svg { width: 17px; height: 17px; color: var(--cobalt-lift); }

/* ─── section shell ────────────────────────────────────────────────────── */
.section { padding: clamp(64px, 9vw, 118px) 0; }
.section-head { max-width: 640px; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 44px); margin-bottom: 16px; }
.section-head p { font-size: clamp(16px,1.2vw,18px); color: var(--ink-invert-2); }

/* paper-секция (инверсия на светлом) */
.section-paper { background: #EEF1FC; color: var(--ink); border-radius: clamp(24px, 4vw, 40px); }
html[data-theme="dark"] .section-paper { background: var(--paper); }
.section-paper .section-head h2 { color: var(--ink); }
.section-paper .section-head p { color: var(--muted); }

/* ─── pillars ──────────────────────────────────────────────────────────── */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2.4vw, 30px); }
@media (max-width: 820px) { .pillars { grid-template-columns: 1fr; } }
.pillar { padding: 4px; }
.pillar .ico {
  width: 56px; height: 56px; border-radius: var(--radius-lg);
  display: grid; place-items: center; margin-bottom: 20px;
  background: var(--surface-dark); border: 1px solid var(--line-dark);
}
.pillar .ico svg { width: 27px; height: 27px; }
.pillar:nth-child(1) .ico { box-shadow: inset 0 0 0 1px rgba(85,112,240,.35); color: var(--cobalt-lift); }
.pillar:nth-child(2) .ico { box-shadow: inset 0 0 0 1px rgba(232,163,61,.40); color: var(--importance-mid); }
.pillar:nth-child(3) .ico { box-shadow: inset 0 0 0 1px rgba(255,90,77,.40); color: var(--coral-lift); }
.pillar h3 { font-size: 21px; margin-bottom: 10px; color: var(--ink-invert); }
.pillar p { font-size: 15.5px; line-height: 1.6; color: var(--ink-invert-2); }

/* ─── steps (реальная последовательность → нумерация оправдана) ─────────── */
.steps { display: grid; gap: clamp(14px, 2vw, 22px); grid-template-columns: repeat(3,1fr); counter-reset: step; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.step {
  position: relative; background: var(--surface); border-radius: var(--radius-lg);
  border: 1px solid var(--line); padding: 28px 24px 26px; box-shadow: var(--shadow-sm);
}
.step .n {
  counter-increment: step; font: 800 14px var(--font-display);
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--ink); color: #fff; margin-bottom: 18px;
}
.step .n::before { content: counter(step); }
.step h3 { font-size: 19px; color: var(--ink); margin-bottom: 8px; }
.step p { font-size: 15px; line-height: 1.55; color: var(--muted); }

/* ─── tariffs ──────────────────────────────────────────────────────────── */
.tariffs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: stretch; }
@media (max-width: 980px) { .tariffs { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 540px) { .tariffs { grid-template-columns: 1fr; } }
.plan {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px 22px; position: relative;
}
.plan.featured { border-color: transparent; box-shadow: 0 0 0 2px var(--cobalt), 0 38px 84px -30px rgba(36,75,224,.80); transform: translateY(-22px) scale(1.035); transform-origin: center bottom; z-index: 2; background: linear-gradient(180deg, #fbfcff 0%, var(--surface) 42%); overflow: visible; }
.plan.featured::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; background: linear-gradient(90deg, var(--cobalt), var(--coral)); }
@media (max-width: 980px) { .plan.featured { transform: none; } }
.plan-badge {
  position: absolute; top: -12px; left: 22px;
  font: 800 11px var(--font-body); letter-spacing: .04em; text-transform: uppercase;
  background: var(--coral); color: #fff; padding: 5px 11px; border-radius: var(--radius-pill);
}
.plan .name { font: 800 15px var(--font-body); color: var(--ink); text-transform: uppercase; letter-spacing: .05em; }
.plan .aud { font: 500 13px var(--font-body); color: var(--muted); margin-top: 4px; min-height: 34px; }
.plan .price { font: 800 34px/1 var(--font-display); color: var(--ink); margin: 14px 0 2px; letter-spacing: -.02em; }
.plan .price .per { font: 600 14px var(--font-body); color: var(--muted); }
.plan .credits { font: 700 13px var(--font-body); color: var(--cobalt); margin-bottom: 18px; }
.plan ul { list-style: none; padding: 0; display: grid; gap: 10px; margin-bottom: 22px; flex: 1; }
.plan li { display: grid; grid-template-columns: auto 1fr; gap: 9px; font: 500 14px/1.4 var(--font-body); color: var(--ink-700); }
.plan li svg { width: 17px; height: 17px; color: var(--success); margin-top: 2px; }
.plan .btn { width: 100%; }
.plan.featured .btn { background: var(--cobalt); }
.plan .btn-outline { background: transparent; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.plan .btn-outline:hover { background: var(--paper); border-color: var(--ink); }

.packs { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 20px 24px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius-lg); }
.packs .lbl { font: 700 14px var(--font-body); color: var(--ink); margin-right: 4px; }
.pack { font: 600 13.5px var(--font-body); color: var(--ink-700); background: var(--paper); border: 1px solid var(--line); padding: 8px 14px; border-radius: var(--radius-pill); }
.pack b { color: var(--cobalt); }
.pricing-note { margin-top: 18px; font: 500 13.5px var(--font-body); color: var(--muted); text-align: center; }

/* ─── faq ──────────────────────────────────────────────────────────────── */
.faq { max-width: 760px; margin-inline: auto; display: grid; gap: 12px; }
.faq details {
  background: var(--surface-dark); border: 1px solid var(--line-dark); border-radius: var(--radius-md);
  overflow: hidden;
}
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font: 700 16px var(--font-body); color: var(--ink-invert);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chev { width: 20px; height: 20px; color: var(--ink-invert-2); transition: transform .3s var(--ease-out-expo); flex: none; }
.faq details[open] summary .chev { transform: rotate(45deg); }
.faq .ans { padding: 0 22px 20px; font: 500 15px/1.6 var(--font-body); color: var(--ink-invert-2); }

/* ─── final CTA ────────────────────────────────────────────────────────── */
.finale { text-align: center; padding: clamp(56px,8vw,100px) 0; }
.finale-card {
  background: linear-gradient(135deg, var(--cobalt) 0%, #3a2fc0 55%, #5a2fb0 100%);
  border-radius: var(--radius-xl); padding: clamp(40px,6vw,72px) clamp(24px,5vw,64px);
  box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.finale-card::after { content:""; position:absolute; right:-10%; top:-40%; width:50%; height:180%; background: radial-gradient(circle, rgba(255,90,77,.35), transparent 60%); }
.finale h2 { font-size: clamp(28px,4vw,46px); color: #fff; margin-bottom: 16px; position: relative; }
.finale p { color: rgba(255,255,255,.85); font-size: 17px; max-width: 44ch; margin: 0 auto 30px; position: relative; }
.finale .btn { position: relative; }

/* ─── footer / requisites ──────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--line-dark-2); padding: clamp(48px,6vw,72px) 0 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr; gap: 30px; } }
.footer-brand .wordmark { font-size: 22px; margin-bottom: 16px; }
.footer-brand p { font-size: 14px; color: var(--ink-invert-2); max-width: 40ch; }
.footer-col h4 { font: 800 12px var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-invert-2); margin-bottom: 16px; }
.footer-col a, .footer-col p { display: block; font: 500 14px/1.5 var(--font-body); color: var(--ink-invert); margin-bottom: 10px; }
.footer-col a:hover { color: var(--cobalt-lift); }
.requisites {
  border-top: 1px solid var(--line-dark-2); padding-top: 24px;
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  font: 500 13px/1.5 var(--font-body); color: var(--ink-invert-2);
}
.requisites b { color: var(--ink-invert); font-weight: 700; }
.disclaimer { margin-top: 16px; font: 500 12.5px/1.55 var(--font-body); color: var(--ink-invert-2); opacity: .85; max-width: 82ch; }
.copyright { margin-top: 22px; font: 500 12.5px var(--font-body); color: var(--ink-invert-2); }

/* ─── reveal motion (контент виден по умолчанию; прячем только при JS) ──── */
.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease-out-expo), transform .7s var(--ease-out-expo); }
.js [data-reveal].in { opacity: 1; transform: none; }
.js [data-reveal][data-delay="1"] { transition-delay: .08s; }
.js [data-reveal][data-delay="2"] { transition-delay: .16s; }
.js [data-reveal][data-delay="3"] { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .btn:hover { transform: none; }
  .post-badge .pulse, .hero-spark { animation: none !important; }
}

/* тонкий пульс сигнала важности */
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,90,77,.5);} 50% { box-shadow: 0 0 0 6px rgba(255,90,77,0);} }
.js .post-badge .pulse { animation: pulse 2.6s var(--ease-out-expo) infinite; }

/* doc pages (оферта/политика) */
.doc { padding: clamp(40px,6vw,72px) 0 80px; }
.doc-inner { max-width: 820px; margin-inline: auto; background: var(--surface-dark); border: 1px solid var(--line-dark); border-radius: var(--radius-lg); padding: clamp(28px,5vw,56px); }
.doc .back { display: inline-flex; align-items: center; gap: 7px; font: 600 14px var(--font-body); color: var(--ink-invert-2); margin-bottom: 26px; }
.doc .back:hover { color: var(--ink-invert); }
.prose { color: var(--ink-invert-2); font-size: 15.5px; line-height: 1.7; }
.prose h1 { font-size: clamp(26px,3.4vw,38px); color: var(--ink-invert); margin-bottom: 8px; }
.prose h2 { font-size: 21px; color: var(--ink-invert); margin: 34px 0 12px; }
.prose h3 { font-size: 16px; color: var(--ink-invert); margin: 22px 0 8px; }
.prose p, .prose li { margin-bottom: 12px; }
.prose ul, .prose ol { padding-left: 22px; margin-bottom: 14px; }
.prose a { color: var(--cobalt-lift); text-decoration: underline; text-underline-offset: 2px; }
.prose .lead { color: var(--ink-invert); font-size: 16px; }
.prose table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.prose th, .prose td { text-align: left; padding: 9px 12px; border: 1px solid var(--line-dark); }
.prose th { background: rgba(255,255,255,.04); color: var(--ink-invert); font-weight: 700; }
.prose .note { display: block; padding: 14px 16px; background: rgba(255,90,77,.08); border: 1px solid rgba(255,90,77,.25); border-radius: var(--radius-md); color: var(--ink-invert); font-size: 14px; margin: 16px 0; }
.prose .updated { font-size: 13px; color: var(--ink-invert-2); margin-bottom: 24px; }

/* ═══ ENHANCEMENTS — bolder + delight pass (палитра неизменна) ════════════ */

/* тонкая плёнка зерна над полночью (премиум-текстура, НЕ glassmorphism) */
.grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.nav, main, .footer { position: relative; z-index: 1; }

/* медленный дрейф сияния — фон дышит, но не отвлекает */
@keyframes aurora { 0%,100% { transform: translate3d(0,0,0); } 50% { transform: translate3d(2.5%, 2%, 0); } }
@media (prefers-reduced-motion: no-preference) { body::before { animation: aurora 24s ease-in-out infinite; } }

/* кнопка: тонкий блик пробегает по наведению */
.btn { position: relative; overflow: hidden; }
.btn::after {
  content: ""; position: absolute; top: 0; left: -70%; width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.30), transparent);
  transform: skewX(-18deg); transition: left .6s var(--ease-out-expo);
}
.btn:hover::after { left: 130%; }

/* мягкие подъёмы по наведению */
.feed-item { transition: transform .3s var(--ease-out-expo), border-color .3s; }
.mock-panel:hover .feed-item:not(.dim) { border-color: rgba(85,112,240,.42); }
.plan { transition: transform .35s var(--ease-out-expo), box-shadow .35s var(--ease-out-expo), border-color .3s; }
.plan:not(.featured):hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--cobalt-300); }
.pillar .ico { transition: transform .45s var(--ease-out-expo); }
.pillar:hover .ico { transform: translateY(-4px) rotate(-5deg); }
.step { transition: transform .35s var(--ease-out-expo), box-shadow .35s; }
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

/* герой-мокап: премиальный 3D-наклон, распрямляется по наведению (только desktop) */
@media (min-width: 941px) and (prefers-reduced-motion: no-preference) {
  .mock-panel { transform: perspective(1600px) rotateY(-6deg) rotateX(2.5deg); transform-origin: left center; transition: transform .7s var(--ease-out-expo); }
  .mockup:hover .mock-panel { transform: perspective(1600px) rotateY(0) rotateX(0); }
}

/* ── СИГНАТУРНЫЙ МОМЕНТ: машина за работой (один раз на загрузке) ── */
@media (prefers-reduced-motion: no-preference) {
  .js .machine .feed-item,
  .js .machine .mock-arrow,
  .js .machine .post-card { opacity: 0; }
  .js .machine.play .feed-item { animation: cascadeIn .6s var(--ease-out-expo) forwards; }
  .js .machine.play .feed-item.dim { animation-name: cascadeInDim; }
  .js .machine.play .feed-item:nth-child(1) { animation-delay: .15s; }
  .js .machine.play .feed-item:nth-child(2) { animation-delay: .34s; }
  .js .machine.play .feed-item:nth-child(3) { animation-delay: .53s; }
  .js .machine.play .mock-arrow { animation: fadeIn .5s var(--ease-out-expo) .78s forwards; }
  .js .machine.play .cog { animation: spin 2.2s var(--ease-out-expo) 1s; }
  .js .machine.play .post-card { animation: bloom .75s var(--ease-out-expo) 1.1s forwards; }
}
@keyframes cascadeIn { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes cascadeInDim { from { opacity: 0; transform: translateY(-14px); } to { opacity: .5; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes bloom { 0% { opacity: 0; transform: translateY(22px) scale(.965); } 100% { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .grain { display: none; }
  .btn::after { display: none; }
  .machine .feed-item, .machine .mock-arrow, .machine .post-card { opacity: 1 !important; }
}

/* кнопки поста в мокапе — кликабельны, ведут на бота (item 4) */
.post-actions a.pa { text-decoration: none; transition: transform .25s var(--ease-out-expo), filter .2s, background .2s; }
.post-actions a.pa:hover { transform: translateY(-2px); }
.post-actions a.pa-pub:hover { filter: brightness(1.08); }
.post-actions a.pa-skip:hover { background: var(--paper); }

/* тумблер светлой/тёмной темы */
.theme-toggle {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center;
  border-radius: var(--radius-md); background: transparent; border: 1px solid var(--line-dark);
  color: var(--ink-invert); cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s var(--ease-out-expo);
}
.theme-toggle:hover { background: color-mix(in srgb, var(--ink-invert) 7%, transparent); transform: translateY(-1px); }
.theme-toggle svg { width: 19px; height: 19px; }
.theme-toggle .ic-sun { display: none; }
html[data-theme="dark"] .theme-toggle .ic-sun { display: block; }
html[data-theme="dark"] .theme-toggle .ic-moon { display: none; }

html[data-theme="dark"] .grain { opacity: .055; }
