/* ============================================
   MaxCPM — основной лист стилей
   Темная тема, моноширинные акценты, тонкие границы
   ============================================ */

:root {
  /* База */
  --bg-primary: #08090D;
  --bg-secondary: #0F1115;
  --bg-elevated: #14171D;

  /* Текст */
  --text-primary: #EDEEF0;
  --text-secondary: #A0A4AD;
  --text-tertiary: #6B6F78;
  --text-disabled: #3D4048;

  /* Акцент */
  --accent-primary: #6366F1;
  --accent-hover: #818CF8;
  --accent-glow: #4F46E5;

  /* Семантика */
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;

  /* Бордеры */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.16);

  /* Glass */
  --glass-bg: rgba(20, 22, 28, 0.55);
  --glass-border: rgba(255, 255, 255, 0.08);

  /* Радиусы */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;

  /* Тайминги */
  --ease-out-quart: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Шрифты */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  /* Пятна подсветки (для body::before) */
  --glow-1: rgba(99, 102, 241, 0.08);
  --glow-2: rgba(99, 102, 241, 0.04);
  --noise-opacity: 0.03;
  --noise-blend: screen;

  /* Цвета, зависящие от темы, для inline-использования */
  --particle-color: 237, 238, 240;     /* rgb точек в canvas */
  --grid-line-color: 255, 255, 255;    /* линии сетки в hero */
  --scatter-line: rgba(255, 255, 255, 1); /* соединяющие линии в hero scatter */
  --dot-border-color: 255, 255, 255;   /* обводка точек scatter */
  --mask-color: 8, 9, 13;              /* цвет fade-маски marquee */
  --hover-bg: rgba(255, 255, 255, 0.03);
}

/* =========== Светлая тема =========== */
:root[data-theme="light"] {
  --bg-primary: #FAFAFB;
  --bg-secondary: #FFFFFF;
  --bg-elevated: #FFFFFF;

  --text-primary: #0A0B0F;
  --text-secondary: #4B4F5A;
  --text-tertiary: #6B6F78;
  --text-disabled: #C4C7CE;

  --accent-primary: #4F46E5;
  --accent-hover: #6366F1;
  --accent-glow: #818CF8;

  --success: #059669;
  --warning: #D97706;
  --danger: #DC2626;

  --border-subtle: rgba(10, 11, 15, 0.06);
  --border-default: rgba(10, 11, 15, 0.10);
  --border-strong: rgba(10, 11, 15, 0.18);

  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(10, 11, 15, 0.08);

  --glow-1: rgba(99, 102, 241, 0.10);
  --glow-2: rgba(236, 72, 153, 0.06);
  --noise-opacity: 0.015;
  --noise-blend: multiply;

  --particle-color: 10, 11, 15;
  --grid-line-color: 10, 11, 15;
  --scatter-line: rgba(10, 11, 15, 1);
  --dot-border-color: 255, 255, 255;
  --mask-color: 250, 250, 251;
  --hover-bg: rgba(10, 11, 15, 0.04);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Фоновый шум + виньетка для премиального ощущения */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  background:
    radial-gradient(ellipse at 20% 0%, var(--glow-1), transparent 50%),
    radial-gradient(ellipse at 80% 100%, var(--glow-2), transparent 60%);
  mix-blend-mode: var(--noise-blend);
  transition: background 0.6s ease;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 101;
  opacity: var(--noise-opacity);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  transition: opacity 0.4s ease;
}

body {
  transition: background-color 0.5s ease, color 0.5s ease;
}

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

.mono {
  font-family: var(--font-mono);
  font-feature-settings: 'tnum' 1, 'ss01' 1;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.display-xl {
  font-size: clamp(40px, 6.2vw, 88px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.hero-title {
  margin-top: 28px;
}
.hero-line {
  display: block;
  white-space: nowrap;
}
.hero-word--accent {
  position: relative;
  display: inline-block;
  padding: 0 0.16em;
  margin: 0 0.02em;
  color: var(--bg-primary);
  background: var(--text-primary);
  border-radius: 12px;
  transform: skewX(-4deg);
  letter-spacing: -0.02em;
}

.display-l {
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.heading-xl {
  font-size: clamp(28px, 3vw, 48px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.heading-l { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; }
.heading-m { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.heading-s { font-size: 16px; font-weight: 600; }

.body-l { font-size: 18px; font-weight: 400; line-height: 1.6; color: var(--text-secondary); }
.body-m { font-size: 15px; font-weight: 400; line-height: 1.5; color: var(--text-secondary); }
.body-s { font-size: 13px; font-weight: 400; line-height: 1.5; color: var(--text-tertiary); }

/* ============ Layout ============ */

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 80px 0;
  position: relative;
}

@media (max-width: 1023px) {
  section { padding: 64px 0; }
}

@media (max-width: 767px) {
  section { padding: 48px 0; }
  .container { padding: 0 16px; }
}

/* ============ Navigation ============ */

.nav-shell {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  width: calc(100% - 32px);
  max-width: 960px;
  transition: all 0.4s var(--ease-out-quart);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 12px 0 24px;
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  transition: all 0.4s var(--ease-out-quart);
}

.nav-shell.scrolled .nav-inner {
  height: 56px;
  background: var(--glass-bg);
  border-color: var(--border-default);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  text-decoration: none;
  padding: 8px 4px;
  transition: transform 0.3s var(--ease-spring);
}

.nav-logo:hover {
  transform: scale(1.05);
}

.nav-menu {
  display: flex;
  gap: 4px;
}

@media (max-width: 767px) {
  .nav-menu { display: none; }
}

.nav-link {
  position: relative;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color 0.2s var(--ease-out-quart);
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 14px;
  right: 14px;
  height: 1px;
  background: var(--text-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out-quart);
}

.nav-link:hover::after {
  transform: scaleX(1);
}

/* Прогресс чтения */
.nav-progress {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: var(--accent-primary);
  box-shadow: 0 0 8px var(--accent-primary);
  border-radius: 999px;
  transition: width 0.15s linear;
}

/* Theme toggle */
.theme-toggle {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.3s var(--ease-spring);
}

.theme-toggle:hover {
  color: var(--text-primary);
  border-color: var(--border-default);
  background: var(--hover-bg);
  transform: rotate(12deg);
}

/* SVG внутри toggle не должен перехватывать клики */
.theme-toggle svg,
.theme-toggle svg * {
  pointer-events: none;
}

/* ============ Buttons ============ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s var(--ease-spring);
  white-space: nowrap;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  position: relative;
  background: var(--accent-primary);
  color: #fff;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 8px 24px -8px rgba(99, 102, 241, 0.5);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: scale(1.02);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 12px 32px -8px rgba(99, 102, 241, 0.7);
}

/* Sheen — постоянный пробег блика */
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  animation: sheen 5s ease-in-out infinite;
}

.btn-primary:hover::before { animation-duration: 1.2s; }

@keyframes sheen {
  0%   { left: -100%; }
  50%  { left: 140%; }
  100% { left: 140%; }
}

/* btn-primary sheen — длительнее и с паузой */
.btn-primary::before {
  animation-duration: 7s !important;
}
.btn-primary:hover::before {
  animation-duration: 1.8s !important;
}

.btn-primary .arrow {
  transition: transform 0.2s var(--ease-spring);
}

.btn-primary:hover .arrow {
  transform: translateX(3px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}

.btn-ghost:hover {
  border-color: var(--border-strong);
  background: var(--hover-bg);
  transform: scale(1.02);
}

.btn-sm { padding: 8px 14px; font-size: 13px; }

/* ============ Nav CTA — более выразительная кнопка в шапке ============ */
.btn-nav {
  padding: 9px 8px 9px 16px;
  font-size: 13.5px;
  font-weight: 550;
  letter-spacing: -0.005em;
  border-radius: 999px;
  background: linear-gradient(135deg, #7B7DFF 0%, var(--accent-primary) 48%, #4F52E3 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.28) inset,
    0 -1px 0 rgba(0, 0, 0, 0.18) inset,
    0 4px 14px -3px rgba(99, 102, 241, 0.55),
    0 1px 2px rgba(10, 11, 15, 0.3);
}

.btn-nav:hover {
  background: linear-gradient(135deg, #8A8CFF 0%, var(--accent-hover) 48%, #5A5DE8 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 -1px 0 rgba(0, 0, 0, 0.18) inset,
    0 8px 20px -4px rgba(99, 102, 241, 0.75),
    0 2px 4px rgba(10, 11, 15, 0.35);
}

/* "Живая" точка слева — намёк на активность, запуск */
.btn-nav__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.18),
    0 0 8px rgba(255, 255, 255, 0.6);
  position: relative;
  animation: nav-dot-pulse 4.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  flex-shrink: 0;
}

@keyframes nav-dot-pulse {
  0%   { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15), 0 0 6px rgba(255, 255, 255, 0.5); }
  50%  { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.0),  0 0 16px rgba(255, 255, 255, 0.85); }
  100% { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15), 0 0 6px rgba(255, 255, 255, 0.5); }
}

/* Капсула со стрелкой справа — tiny chip внутри кнопки */
.btn-nav .arrow {
  width: 26px;
  height: 26px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset;
  transition: transform 0.25s var(--ease-spring), background 0.2s ease;
  box-sizing: border-box;
}

.btn-nav:hover .arrow {
  transform: translateX(2px);
  background: rgba(255, 255, 255, 0.26);
}

/* ============ Badges ============ */

.badge-mono {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 8px var(--accent-primary);
}

/* Пульсирующая точка */
.pulse-dot {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
}

.pulse-dot::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--success);
  animation: pulse-ring 1.8s ease-out infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* ============ Cards ============ */

.card {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all 0.3s var(--ease-out-quart);
  overflow: hidden;
}

.card:hover {
  border-color: var(--border-default);
  transform: translateY(-2px);
}

/* Тонкая «инверсная» подсветка сверху */
.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

/* ============ Section header utility ============ */

.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.section-eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--text-tertiary);
}

/* ============ Анимации на скролле ============ */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* ============ Reduced motion ============ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============ Scrollbar ============ */

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* Селекция текста */
::selection {
  background: rgba(99, 102, 241, 0.3);
  color: var(--text-primary);
}
</content>
</invoke>/* ============================================
   MaxCPM — секционные стили (дополнение к styles.css)
   ============================================ */

/* -------- HERO -------- */
/* Default: 2 columns side by side, visual next to title */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: 64px;
  align-items: start;
  padding-top: 40px;
}

/* Tablet range: 2 columns but tighter + smaller visual */
@media (max-width: 1100px) and (min-width: 768px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.75fr);
    gap: 40px;
  }
  .hero-visual { max-width: 440px; }
  .display-xl { font-size: clamp(42px, 5.5vw, 76px) !important; }
}

/* Mobile: 1 column, visual below */
@media (max-width: 767px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 0;
    align-items: stretch;
  }
}

.hero-badge {
  margin-bottom: 32px;
}

.hero-title .hero-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  animation: word-in 0.8s var(--ease-out-expo) both;
}

@keyframes word-in {
  to { opacity: 1; transform: none; }
}

.hero-sub {
  opacity: 0;
  animation: word-in 0.6s var(--ease-out-expo) 0.7s both;
}

.hero-cta-row {
  display: flex;
  gap: 12px;
  margin-top: 40px;
  flex-wrap: wrap;
  opacity: 0;
  animation: word-in 0.5s var(--ease-out-expo) 0.9s both;
}

.hero-stats {
  display: flex;
  gap: 12px;
  margin-top: 48px;
  flex-wrap: wrap;
  align-items: baseline;
}

.hero-stats-sep {
  color: var(--text-disabled);
}

.hero-visual-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

@media (max-width: 1023px) {
  .hero-visual-wrap {
    min-height: 360px;
  }
}

/* -------- Ticker animation keyframes -------- */
@keyframes ticker-in {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* -------- Marquee -------- */
@keyframes marquee-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes marquee-right {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

.marquee-gradient {
  position: absolute;
  top: 0; bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}

.marquee-gradient-left {
  left: 0;
  background: linear-gradient(90deg, var(--bg-primary) 20%, transparent);
}

.marquee-gradient-right {
  right: 0;
  background: linear-gradient(270deg, var(--bg-primary) 20%, transparent);
}/* -------- Process -------- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}

.process-line {
  position: absolute;
  top: 20px;
  left: 40px;
  right: 40px;
  height: 1px;
  background: linear-gradient(90deg, var(--border-default), var(--border-subtle), var(--border-default));
  z-index: 0;
}

@media (max-width: 1023px) {
  .process-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .process-line { display: none; }
}

.process-step {
  position: relative;
  padding: 32px 24px 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all 0.3s var(--ease-out-quart);
}

.process-step:hover {
  transform: translateY(-4px);
  border-color: var(--border-default);
  box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.5);
}

.process-dot {
  position: absolute;
  top: -6px;
  left: 24px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 0 4px var(--bg-primary), 0 0 12px var(--accent-primary);
}

/* -------- Topic pills (filter buttons) -------- */
.topic-pill {
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-sans);
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s var(--ease-out-quart);
}

.topic-pill:hover {
  color: var(--text-primary);
  border-color: var(--border-default);
  background: var(--hover-bg);
}

.topic-pill[data-active="true"] {
  color: var(--text-primary);
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.4);
}

/* -------- Channel cards -------- */
.channel-card {
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease !important;
}

.channel-card:hover {
  border-color: var(--card-accent, var(--border-default)) !important;
  box-shadow: 0 0 0 1px var(--card-accent, transparent), 0 12px 32px -16px var(--card-accent, rgba(0,0,0,0.5));
}

/* -------- Metrics insights -------- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.metric-card {
  padding: 40px 32px;
  border-left: 1px solid var(--border-subtle);
}

.metric-card:first-child {
  border-left: none;
}

@media (max-width: 1023px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .metric-card {
    padding: 32px 24px;
  }
  .metric-card:nth-child(3) {
    border-left: none;
    border-top: 1px solid var(--border-subtle);
  }
  .metric-card:nth-child(4) {
    border-top: 1px solid var(--border-subtle);
  }
}

@media (max-width: 600px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  .metric-card {
    border-left: none !important;
    border-top: 1px solid var(--border-subtle);
  }
  .metric-card:first-child {
    border-top: none;
  }
}

/* -------- Calculator -------- */
.calc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}

@media (max-width: 900px) {
  .calc-grid {
    grid-template-columns: 1fr;
  }
}

.calc-panel {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.calc-forecast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  overflow: hidden;
}

.calc-forecast::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
  opacity: 0.4;
}

.calc-field {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calc-budget-row {
  display: flex;
  align-items: center;
  gap: 20px;
}

.calc-value {
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-width: 160px;
  justify-content: flex-end;
}

.calc-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Slider */
.calc-slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 4px;
  background: var(--border-subtle);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  background-image: linear-gradient(var(--accent-primary), var(--accent-primary));
  background-repeat: no-repeat;
}

.calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--text-primary);
  border: 2px solid var(--accent-primary);
  border-radius: 50%;
  cursor: grab;
  box-shadow: 0 0 12px var(--accent-glow);
  transition: transform 0.2s var(--ease-spring);
}

.calc-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.calc-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--text-primary);
  border: 2px solid var(--accent-primary);
  border-radius: 50%;
  cursor: grab;
  box-shadow: 0 0 12px var(--accent-glow);
}

/* -------- Pricing -------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

.pricing-card {
  position: relative;
  border-radius: var(--radius-lg);
  transition: all 0.3s var(--ease-out-quart);
  height: 100%;
}

.pricing-card-inner {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  transition: all 0.3s var(--ease-out-quart);
}

.pricing-card.popular .pricing-card-inner {
  border-color: rgba(99, 102, 241, 0.3);
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.04), var(--bg-secondary));
}

.pricing-card:hover .pricing-card-inner {
  transform: translateY(-4px);
  border-color: var(--border-default);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.6);
}

.pricing-card.popular:hover .pricing-card-inner {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 20px 40px -20px rgba(99, 102, 241, 0.3);
}

.pricing-popular-border {
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  background: conic-gradient(from 0deg, transparent, var(--accent-primary), transparent, transparent, var(--accent-primary), transparent);
  opacity: 0.5;
  animation: pricing-rotate 6s linear infinite;
  z-index: 0;
}

@keyframes pricing-rotate {
  from { filter: hue-rotate(0deg); transform: rotate(0deg); }
  to { filter: hue-rotate(360deg); transform: rotate(360deg); }
}

/* -------- Cases -------- */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 900px) {
  .cases-grid {
    grid-template-columns: 1fr;
  }
}

.case-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 32px;
  transition: all 0.3s var(--ease-out-quart);
}

.case-card:hover {
  border-color: var(--border-default);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -16px rgba(0, 0, 0, 0.5);
}

.case-results {
  padding-top: 20px;
  border-top: 1px dashed var(--border-default);
}

.case-results-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 600px) {
  .case-results-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* -------- FAQ -------- */
.faq-list {
  max-width: 860px;
  border-top: 1px solid var(--border-subtle);
}

.faq-item {
  border-bottom: 1px solid var(--border-subtle);
  /* Видны всегда — не зависит от IntersectionObserver */
  opacity: 1;
}

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 24px 0;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: color 0.2s ease;
}

.faq-q:hover {
  color: var(--text-primary);
  opacity: 0.8;
}

.faq-item:hover .faq-q {
  color: var(--text-primary);
}

/* Плавная анимация аккордеона — max-height + opacity + transform */
.faq-a-wrap {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition:
    max-height 0.55s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease;
}

.faq-item.open .faq-a-wrap {
  /* Ближе к реальному размеру ответа — плавнее easing */
  max-height: 500px;
  opacity: 1;
  transition:
    max-height 0.55s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.35s ease 0.1s;
}

.faq-a {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.65;
  padding-right: 48px;
  padding-left: 36px;
  padding-top: 0;
  padding-bottom: 0;
  transform: translateY(-6px);
  transition:
    padding-bottom 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.open .faq-a {
  padding-bottom: 24px;
  transform: translateY(0);
}

/* Плавный поворот стрелки */
.faq-chevron {
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Плавный hover заголовка вопроса */
.faq-q {
  transition: color 0.25s ease, opacity 0.25s ease;
}

/* На мобильных уменьшаем padding */
@media (max-width: 767px) {
  .faq-a {
    padding-left: 24px;
    padding-right: 16px;
  }
  .faq-q {
    font-size: 15px;
    gap: 8px;
  }
}

/* -------- Footer -------- */
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border-subtle);
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}

.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-list a {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-list a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

/* -------- Focus states -------- */
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
/* ============================================
   MaxCPM Pro — WP-специфичные дополнения к прототипу
   ============================================ */

/* Skip link для доступности */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
}
.skip-link:focus {
    left: 16px;
    top: 16px;
    z-index: 9999;
    background: var(--bg-elevated);
    color: var(--text-primary);
    padding: 10px 18px;
    border-radius: var(--radius-sm);
}
.screen-reader-text { position: absolute; left: -9999px; top: auto; }

/* Nav-actions wrapper */
.nav-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Theme toggle: show proper icon based on theme */
.theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }

/* Hero section */
.hero-section {
    padding-top: 128px;
    padding-bottom: 56px;
}
@media (max-width: 767px) {
    .hero-section { padding-top: 120px; }
}

/* Hero stats */
.hero-stat {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
}
.hero-stat-num {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}
.hero-stat[data-inverted="true"] .hero-stat-num {
    color: var(--success);
}
.hero-stat-label {
    font-size: 14px;
    color: var(--text-tertiary);
}

/* Hero visual */
.hero-visual {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 560px;
    background: radial-gradient(ellipse at center, rgba(99,102,241,0.08), transparent 70%);
}
@media (max-width: 1023px) {
    .hero-visual { max-width: 420px; min-height: 340px; }
}

/* Live Metrics Bar */
.live-metrics-bar {
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
    margin-top: 40px;
}
.lmb-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}
.lmb-item {
    padding: 24px;
    border-left: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.lmb-item:first-child { border-left: none; }
.lmb-value {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 28px;
    font-weight: 500;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}
.lmb-unit {
    font-size: 13px;
    color: var(--text-tertiary);
}
.lmb-delta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--success);
}
.lmb-pulse {
    display: flex;
    align-items: center;
    gap: 8px;
}
@media (max-width: 767px) {
    .lmb-grid { grid-template-columns: repeat(2, 1fr); }
    .lmb-item:nth-child(3) { border-left: none; border-top: 1px solid var(--border-subtle); }
    .lmb-item:nth-child(4) { border-top: 1px solid var(--border-subtle); }
    .lmb-value { font-size: 22px; }
}

/* Logos Marquee section */
.logos-marquee {
    padding: 48px 0;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    overflow: hidden;
}
.marquee-caption {
    text-align: center;
    margin-bottom: 32px;
}
.marquee-wrap {
    position: relative;
}
.marquee-row {
    display: flex;
    gap: 64px;
    width: max-content;
}
.marquee-row--left {
    animation: marquee-left 42s linear infinite;
}
.marquee-row--right {
    animation: marquee-right 48s linear infinite;
    margin-top: 32px;
}
.marquee-logo {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    white-space: nowrap;
    transition: color 0.3s ease;
}
.marquee-logo:hover {
    color: var(--text-primary);
}

/* Section intro */
.section-intro {
    max-width: 640px;
    margin-bottom: 40px;
}
.section-eyebrow.center {
    justify-content: center;
}

/* Process list */
.process-step-meta {
    font-size: 11px;
    color: var(--text-tertiary);
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}
.process-step-title {
    margin-bottom: 16px;
}
.process-step-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.process-step-list li {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    gap: 10px;
    align-items: flex-start;
    line-height: 1.5;
}
.li-dash {
    width: 14px;
    height: 1px;
    background: var(--border-strong);
    margin-top: 10px;
    flex-shrink: 0;
}

/* Metrics */
.metric-value {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 12px;
}
.metric-num {
    font-size: 56px;
    font-weight: 500;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.metric-unit {
    font-size: 20px;
    color: var(--text-tertiary);
    font-weight: 500;
}
.metric-label {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}
.metric-comp {
    font-size: 11px;
    color: var(--text-tertiary);
    letter-spacing: 0.04em;
}
@media (max-width: 767px) {
    .metric-num { font-size: 40px; }
}

/* Channels */
.topic-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}
.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}
.channels-more {
    margin-top: 40px;
    text-align: center;
}
.channel-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.channel-avatar {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}
.channel-info { min-width: 0; flex: 1; }
.channel-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.channel-handle {
    font-size: 11px;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
}
.channel-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}
.channel-stat-label {
    font-size: 10px;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 2px;
}
.channel-stat-value {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}
.channel-spark {
    margin-bottom: 16px;
}
.channel-spark-label {
    font-size: 10px;
    color: var(--text-tertiary);
    margin-bottom: 6px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.channel-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.channel-tag {
    padding: 4px 10px;
    font-size: 11px;
    font-family: var(--font-mono);
    letter-spacing: 0.04em;
    border-radius: 999px;
}

/* Calculator extras */
.calc-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-subtle);
}
.calc-row--big { padding: 16px 0; }
.calc-row-label {
    font-size: 13px;
    color: var(--text-secondary);
}
.calc-row-value {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}
.calc-row--big .calc-row-value { font-size: 28px; }
.calc-forecast-title { margin-bottom: 20px; }
.calc-cta { width: 100%; justify-content: center; margin-top: 24px; }
.calc-note { margin-top: 12px; text-align: center; }
.calc-budget-num {
    font-size: 24px;
    font-weight: 500;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    font-family: var(--font-mono);
}
.calc-budget-unit {
    font-size: 14px;
    color: var(--text-tertiary);
}
.calc-range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    font-size: 10px;
    color: var(--text-tertiary);
}

/* Pricing extras */
.pricing-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.pricing-popular-tag {
    padding: 3px 8px;
    font-size: 10px;
    letter-spacing: 0.08em;
    color: var(--accent-hover);
    background: rgba(99,102,241,0.15);
    border: 1px solid rgba(99,102,241,0.3);
    border-radius: 999px;
    text-transform: uppercase;
}
.pricing-price {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}
.pricing-subtitle { margin-bottom: 28px; }
.pricing-list {
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}
.pricing-list li {
    display: flex;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}
.pricing-check {
    color: var(--text-tertiary);
    flex-shrink: 0;
    margin-top: 2px;
}
.pricing-card.popular .pricing-check { color: var(--accent-hover); }
.pricing-cta { width: 100%; justify-content: center; margin-top: auto; }

/* Cases */
.section-cases {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}
.case-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}
.case-avatar {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(99,102,241,0.3), rgba(99,102,241,0.08));
    border: 1px solid var(--border-default);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}
.case-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}
.case-role { margin: 0; }
.case-quote {
    font-size: 17px;
    line-height: 1.55;
    color: var(--text-primary);
    margin: 0 0 24px 0;
    letter-spacing: -0.01em;
}
.case-results-title { margin-bottom: 16px; }
.case-result-label {
    font-size: 10px;
    color: var(--text-tertiary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.case-result-value {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
}
.case-result-value--accent { color: var(--success); }

/* FAQ */
.faq-num {
    font-size: 11px;
    color: var(--text-tertiary);
    letter-spacing: 0.08em;
    margin-right: 16px;
}
.faq-q-text {
    flex: 1;
    text-align: left;
}
.faq-chevron {
    transition: transform 0.35s var(--ease-out-quart);
    flex-shrink: 0;
}
.faq-item.open .faq-chevron { transform: rotate(180deg); }

/* Final CTA */
.section-cta {
    position: relative;
    overflow: hidden;
    padding: 96px 0;
}
.cta-particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: auto;
}
.cta-content {
    position: relative;
    z-index: 2;
    text-align: center;
}
.display-l.center { text-align: center; }
.cta-title {
    margin-bottom: 24px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}
.body-l.center {
    text-align: center;
    max-width: 560px;
    margin: 0 auto 40px;
}
.cta-divider {
    color: var(--text-tertiary);
    font-size: 14px;
}

/* CTA form */
.cta-form {
    max-width: 640px;
    margin: 0 auto;
    text-align: left;
    position: relative;
}
.cta-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}
@media (max-width: 767px) {
    .cta-form-grid { grid-template-columns: 1fr; }
}
.cta-input,
.cta-textarea {
    width: 100%;
    padding: 12px 14px;
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s ease, background 0.2s ease;
}
.cta-input::placeholder,
.cta-textarea::placeholder {
    color: var(--text-tertiary);
}
.cta-input:focus,
.cta-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-elevated);
}
.cta-textarea {
    resize: vertical;
    min-height: 80px;
    margin-bottom: 20px;
}
.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}
.cta-form-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}
.cta-submit {
    padding: 14px 24px;
    font-size: 15px;
}
.cta-form-status {
    margin-top: 16px;
    text-align: center;
    font-size: 14px;
    min-height: 20px;
}
.cta-form-status.success { color: var(--success); }
.cta-form-status.error { color: var(--danger); }

/* Page wrap */
.page-wrap {
    padding-top: 160px;
    padding-bottom: 80px;
}
@media (max-width: 767px) {
    .page-wrap { padding-top: 120px; }
}

/* Archive */
.archive-header { margin-bottom: 48px; }
.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}
.archive-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s var(--ease-out-quart);
}
.archive-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-default);
    box-shadow: 0 12px 32px -16px rgba(0,0,0,0.5);
}
.archive-card-img {
    aspect-ratio: 1200 / 630;
    overflow: hidden;
    background: var(--bg-elevated);
}
.archive-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.archive-card-body {
    padding: 20px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}
.archive-card-date {
    font-size: 11px;
    color: var(--text-tertiary);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.archive-card-title {
    color: var(--text-primary);
    margin: 0;
}
.archive-card-excerpt {
    color: var(--text-secondary);
    flex: 1;
    margin: 0;
}
.archive-card-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--accent-hover);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.pagination {
    margin-top: 48px;
    text-align: center;
}
.pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 2px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.2s ease;
}
.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    color: var(--text-primary);
    border-color: var(--border-default);
    background: var(--hover-bg);
}

/* Single post */
.single-wrap {
    max-width: 800px;
    margin: 0 auto;
}
.single-header { margin-bottom: 32px; }
.single-title { margin: 16px 0; }
.single-meta {
    margin-top: 16px;
    color: var(--text-tertiary);
}
.single-thumbnail {
    margin: 0 0 32px 0;
    border-radius: var(--radius-md);
    overflow: hidden;
}
.single-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}
.single-content h2,
.single-content h3 {
    margin-top: 40px;
    margin-bottom: 16px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}
.single-content h2 { font-size: 28px; font-weight: 600; }
.single-content h3 { font-size: 22px; font-weight: 600; }
.single-content p {
    margin-bottom: 20px;
    color: var(--text-secondary);
    line-height: 1.7;
}
.single-content a {
    color: var(--accent-hover);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.single-content a:hover { color: var(--accent-primary); }
.single-content ul,
.single-content ol {
    margin-bottom: 20px;
    padding-left: 24px;
    color: var(--text-secondary);
    line-height: 1.7;
}
.single-content li { margin-bottom: 8px; }
.single-content blockquote {
    margin: 32px 0;
    padding: 16px 24px;
    border-left: 3px solid var(--accent-primary);
    background: var(--bg-secondary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-primary);
}
.single-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 24px 0;
}
.single-content figure { margin: 24px 0; }
.single-nav {
    margin-top: 64px;
    text-align: center;
}

/* 404 */
.error-wrap {
    text-align: center;
    padding-top: 200px;
}
.error-code {
    font-size: 96px;
    font-weight: 500;
    letter-spacing: -0.04em;
    color: var(--text-tertiary);
    line-height: 1;
    margin-bottom: 16px;
    font-variant-numeric: tabular-nums;
}
.error-title { margin-bottom: 16px; }

/* Footer */
.site-footer {
    border-top: 1px solid var(--border-subtle);
    padding: 64px 0 32px;
    position: relative;
    z-index: 2;
    margin-top: 64px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--border-subtle);
}
@media (max-width: 900px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}
@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
}
.footer-logo {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-primary);
    margin-bottom: 16px;
}
.footer-desc {
    font-size: 13px;
    color: var(--text-secondary);
    max-width: 260px;
    line-height: 1.5;
}
.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.footer-list a {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-list a:hover { color: var(--text-primary); }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    padding-top: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.mono-small {
    font-size: 11px;
    color: var(--text-tertiary);
    letter-spacing: 0.04em;
}

/* Responsive for mobile nav */
@media (max-width: 767px) {
    .nav-menu { display: none; }
    .nav-inner { padding: 0 12px 0 16px; }
    .btn-nav { padding: 8px 6px 8px 12px; font-size: 12.5px; }
    .btn-nav .arrow { width: 22px; height: 22px; padding: 5px; }
    .hero-cta-row { flex-direction: column; align-items: stretch; }
    .hero-cta-row .btn { width: 100%; justify-content: center; }
    .cta-form-actions .btn { width: 100%; justify-content: center; }
    .cta-divider { display: none; }
}

/* Nav progress */
.nav-progress {
    width: 0;
    max-width: 100%;
}

/* Hero sub text — constrain width */
.hero-sub {
    max-width: 480px;
    margin-top: 32px;
    margin-bottom: 40px;
}

/* Tablet: smaller visual */

/* Hero visual — clearer lines on light theme */
[data-theme="light"] .hero-visual line {
    stroke: rgba(10, 11, 15, 1) !important;
}
@media (max-width: 600px) {
    .hero-visual { min-height: 320px; }
}

/* ============ MOBILE OVERRIDES (<=767px) ============ */

/* Hamburger button — hidden on desktop */
.m-nav-hamburger {
    display: none;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border-default);
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.m-nav-hamburger:hover {
    background: var(--hover-bg);
    border-color: var(--border-strong);
}

/* Mobile menu sheet */
.m-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0);
    pointer-events: none;
    transition: background 0.25s ease;
    display: none;
}
.m-sheet-backdrop.open {
    background: rgba(0, 0, 0, 0.45);
    pointer-events: auto;
}
.m-sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-secondary);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    padding: 8px 16px 28px;
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    border-top: 1px solid var(--border-subtle);
}
.m-sheet-backdrop.open .m-sheet {
    transform: translateY(0);
}
.m-sheet-handle {
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: var(--border-strong);
    margin: 8px auto 18px;
}
.m-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px 12px;
    margin-bottom: 8px;
}
.m-sheet-title {
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    text-transform: uppercase;
}
.m-sheet-close {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border-default);
    color: var(--text-primary);
    cursor: pointer;
}
.m-sheet-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 4px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.01em;
    border-bottom: 1px solid var(--border-subtle);
}
.m-sheet-link:last-of-type {
    border-bottom: none;
}
.m-sheet-link svg {
    color: var(--text-tertiary);
}
.m-sheet-cta {
    margin-top: 20px;
    width: 100%;
    justify-content: center;
    padding: 14px 20px !important;
    font-size: 14px !important;
}

/* Sticky bottom CTA */
.m-sticky-cta {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 90;
    pointer-events: none;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: none;
}
.m-sticky-cta.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.m-sticky-cta-btn {
    width: 100%;
    justify-content: center;
    padding: 14px 20px !important;
    font-size: 14px !important;
    box-shadow:
        0 1px 0 rgba(255,255,255,0.28) inset,
        0 -1px 0 rgba(0,0,0,0.18) inset,
        0 10px 28px -6px rgba(99,102,241,0.6),
        0 4px 10px rgba(10,11,15,0.35) !important;
}

/* Mobile-specific adjustments */
@media (max-width: 767px) {
    .nav-menu { display: none !important; }
    .nav-cta-desktop { display: none !important; }
    .m-nav-hamburger { display: inline-flex; }
    .m-sheet-backdrop { display: block; }
    .m-sticky-cta { display: block; }

    .nav-shell {
        top: 0;
        width: 100%;
        max-width: 100%;
    }
    .nav-inner {
        height: 56px;
        padding: 0 16px;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: none;
    }
    .nav-shell.scrolled .nav-inner {
        height: 56px;
    }
    .nav-progress { display: none; }

    .hero-section {
        padding-top: 72px !important;
        padding-bottom: 48px !important;
    }
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .hero-badge {
        margin-bottom: 20px !important;
    }
    .display-xl {
        font-size: clamp(38px, 11vw, 52px) !important;
        line-height: 0.98 !important;
    }
    .hero-sub {
        font-size: 16px;
        margin-top: 20px !important;
        margin-bottom: 24px !important;
    }
    .hero-cta-row {
        flex-direction: column;
        gap: 10px;
        margin-top: 24px !important;
    }
    .hero-cta-row .btn {
        width: 100%;
        justify-content: center;
        padding: 12px 18px;
    }
    .hero-stats {
        margin-top: 28px !important;
        padding: 16px 0;
        border-top: 1px solid var(--border-subtle);
        border-bottom: 1px solid var(--border-subtle);
        gap: 8px !important;
        flex-wrap: wrap;
    }
    .hero-stats-sep { display: none; }
    .hero-stat {
        flex: 1 0 auto;
        min-width: 0;
        font-size: 13px;
    }
    .hero-stat-num {
        font-size: 15px;
    }
    .hero-stat-label {
        font-size: 11px;
    }
    .hero-visual {
        max-width: 100%;
        aspect-ratio: 4/3;
        min-height: auto;
    }

    .logos-marquee {
        padding: 32px 0;
    }
    .marquee-caption {
        margin-bottom: 20px;
    }
    .marquee-logo {
        font-size: 14px;
    }
    .marquee-row { gap: 40px; }

    .live-metrics-bar {
        margin-top: 24px;
    }
    .lmb-item {
        padding: 16px;
        gap: 6px;
    }
    .lmb-value {
        font-size: 18px;
    }
    .lmb-unit {
        font-size: 11px;
    }
    .lmb-delta {
        font-size: 10px;
    }

    section {
        padding: 44px 0 !important;
    }
    .section-cta {
        padding: 64px 0 !important;
    }
    .section-intro {
        margin-bottom: 32px;
        font-size: 15px;
    }

    .display-l {
        font-size: clamp(28px, 8vw, 40px) !important;
        line-height: 1.1 !important;
    }

    .process-grid {
        gap: 16px;
    }
    .process-step {
        padding: 24px 20px;
    }

    /* Channels: horizontal carousel */
    .channels-grid {
        display: flex !important;
        grid-template-columns: none !important;
        gap: 12px !important;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        margin: 0 -16px;
        padding: 4px 16px 20px;
        scrollbar-width: none;
    }
    .channels-grid::-webkit-scrollbar { display: none; }
    .channel-card {
        flex: 0 0 280px !important;
        scroll-snap-align: start;
    }
    .channels-more {
        margin-top: 8px !important;
    }
    .channels-more::before {
        content: "\2190  \0441\0432\0430\0439\043F  \2192";
        display: block;
        text-align: center;
        font-family: var(--font-mono);
        font-size: 11px;
        color: var(--text-tertiary);
        letter-spacing: 0.08em;
        margin-bottom: 16px;
    }

    .topic-filter {
        flex-wrap: nowrap;
        overflow-x: auto;
        margin: 0 -16px;
        padding: 0 16px 8px;
        scrollbar-width: none;
    }
    .topic-filter::-webkit-scrollbar { display: none; }
    .topic-pill {
        flex-shrink: 0;
    }

    .metric-num {
        font-size: 36px !important;
    }
    .metric-unit {
        font-size: 16px !important;
    }
    .metric-card {
        padding: 24px 20px !important;
    }

    .calc-grid {
        gap: 16px;
    }
    .calc-panel,
    .calc-forecast {
        padding: 20px !important;
    }
    .calc-budget-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .calc-value {
        min-width: 0;
        justify-content: flex-start;
    }
    .calc-row--big .calc-row-value {
        font-size: 22px;
    }
    .calc-row-value {
        font-size: 14px;
    }

    .pricing-grid {
        gap: 16px;
    }
    .pricing-price {
        font-size: 24px;
    }

    .cases-grid {
        gap: 12px;
    }
    .case-card {
        padding: 24px 20px;
    }
    .case-quote {
        font-size: 15px;
    }
    .case-results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .faq-q {
        font-size: 15px !important;
        padding: 18px 0 !important;
        gap: 8px;
    }
    .faq-num {
        font-size: 10px !important;
        margin-right: 8px !important;
    }
    .faq-a {
        padding-left: 24px !important;
        padding-right: 8px !important;
        font-size: 14px;
    }

    .cta-content {
        text-align: left;
    }
    .display-l.center {
        text-align: left;
    }
    .body-l.center {
        text-align: left;
    }
    .cta-form-actions {
        flex-direction: column;
    }
    .cta-form-actions .btn {
        width: 100%;
        justify-content: center;
    }
    .cta-divider { display: none; }
    .cta-submit {
        padding: 12px 18px !important;
    }

    main {
        padding-bottom: 80px;
    }

    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 24px;
    }
    .site-footer {
        padding: 48px 0 32px;
    }
    .footer-desc {
        max-width: none;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .m-sheet { transition: none; }
    .m-sheet-backdrop { transition: none; }
    .m-sticky-cta { transition: none; }
}

body.m-sheet-open {
    overflow: hidden;
}

/* Safe area for iPhone home indicator */
@supports (padding: env(safe-area-inset-bottom)) {
    .m-sticky-cta {
        bottom: calc(16px + env(safe-area-inset-bottom));
    }
    main {
        padding-bottom: calc(80px + env(safe-area-inset-bottom));
    }
}

/* === FORCE HERO 2-COL ===
   Высокоспецифичные правила чтобы гарантировать layout
   на любом экране 768px+ */
@media (min-width: 768px) {
    .hero-section .container .hero-grid {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr) !important;
        gap: 48px !important;
        align-items: start !important;
    }
    .hero-section .container .hero-grid > .hero-content {
        grid-column: 1 !important;
        min-width: 0;
    }
    .hero-section .container .hero-grid > .hero-visual-wrap {
        grid-column: 2 !important;
        min-width: 0;
        display: flex;
        align-items: flex-start;
        justify-content: center;
        padding-top: 60px;
    }
    .hero-section .container .hero-grid > .hero-visual-wrap .hero-visual {
        width: 100%;
        max-width: 520px;
        aspect-ratio: 1 / 1;
    }
}

/* Tablet: tighter columns */
@media (min-width: 768px) and (max-width: 1100px) {
    .hero-section .container .hero-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 0.75fr) !important;
        gap: 32px !important;
    }
    .hero-section .container .hero-grid > .hero-visual-wrap .hero-visual {
        max-width: 380px;
    }
    .hero-section .container .display-xl {
        font-size: clamp(40px, 5.5vw, 72px) !important;
    }
}

/* Mobile < 768: single column */
@media (max-width: 767px) {
    .hero-section .container .hero-grid {
        display: block !important;
    }
    .hero-section .container .hero-grid > .hero-visual-wrap {
        padding-top: 24px !important;
    }
    .hero-section .container .hero-grid > .hero-visual-wrap .hero-visual {
        max-width: 100% !important;
    }
}
/* === END FORCE === */

/* === STICKY CTA — alwaysShow on mobile, hide only near bottom === */
@media (max-width: 767px) {
    .m-sticky-cta {
        display: block !important;
        opacity: 1 !important;
        transform: translateY(0) !important;
        pointer-events: auto !important;
    }
    .m-sticky-cta.hidden-near-footer {
        opacity: 0 !important;
        transform: translateY(20px) !important;
        pointer-events: none !important;
    }
}

/* === FIX HORIZONTAL DRAG ON MOBILE ===
   iOS Safari allows touch-drag to shift the whole page
   when swiping inside a scrollable child. We clip it at
   the root and contain overscroll on scrollable children. */
html {
    overflow-x: hidden;
    width: 100%;
}

html, body {
    max-width: 100vw;
    overscroll-behavior-x: none;
    -webkit-overflow-scrolling: touch;
}

/* Horizontal scroll containers: contain their own overscroll,
   do not let iOS propagate to ancestors */
.channels-grid,
.topic-filter,
.calc-pills,
.marquee-row,
.cases-grid {
    overscroll-behavior-x: contain;
}

/* Safety net: any stray wide element inside main must be clipped */
main {
    max-width: 100vw;
    overflow-x: clip;
}
@supports not (overflow-x: clip) {
    main { overflow-x: hidden; }
}
/* === END FIX === */

/* === LOCK PAGE TO VERTICAL-ONLY PAN ===
   Запрещает горизонтальные touch-жесты на уровне страницы.
   Отдельные скроллы внутри (карусели, pills) явно разрешают pan-x. */
html {
    touch-action: pan-y;
    overscroll-behavior-x: none;
    overflow-x: clip;
}
body {
    touch-action: pan-y;
    overscroll-behavior-x: none;
    position: relative;
    width: 100%;
    max-width: 100%;
}
@supports not (overflow-x: clip) {
    html { overflow-x: hidden; }
}

/* Разрешаем горизонтальный pan ТОЛЬКО внутри этих скроллов */
.channels-grid,
.topic-filter,
.calc-pills,
.marquee-row {
    touch-action: pan-x pan-y;
    overscroll-behavior-x: contain;
}
/* === END LOCK === */

/* === HIDE STICKY CTA completely === */
.m-sticky-cta {
    display: none !important;
}
/* Restore normal bottom padding on main (we added extra for sticky CTA) */
@media (max-width: 767px) {
    main {
        padding-bottom: 32px !important;
    }
}
@supports (padding: env(safe-area-inset-bottom)) {
    main {
        padding-bottom: calc(32px + env(safe-area-inset-bottom)) !important;
    }
}
/* === END HIDE STICKY CTA === */

