/* ==========================================
   IT-IMPULSE — Elevated Classic design system
   Outfit (display) + Manrope (body) + JetBrains Mono (technical)
   Dark base #0a0a0f · accent #e63946 · status #4ade80
   DJANGO: static/css/style.css
   ========================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Canvas — осветлённая премиальная база */
  --bg-primary: #15151f;
  --bg-card: #1c1c28;
  --bg-card-2: #181822;
  --bg-elevated: #232333;

  /* Lines — увеличены, чтобы оставаться видимыми на новом фоне */
  --border: #2a2a3a;
  --border-strong: #3a3a4f;
  --grid-line: #1f1f2c;

  /* Accent (red) */
  --accent: #e63946;
  --accent-hover: #ff4d5a;
  --accent-dim: #c1121f;
  --accent-ink: #1a0b0f;              /* accent-tinted dark fill */
  --accent-glow: rgba(230, 57, 70, 0.15);
  --accent-glow-strong: rgba(230, 57, 70, 0.35);

  /* Text */
  --text-primary: #f0f0f0;
  --text-secondary: #a0a0b0;
  --text-muted: #606070;

  /* Semantic */
  --success: #4ade80;
  --success-glow: rgba(74, 222, 128, 0.4);

  /* Spacing (8px base) */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
  --space-8: 64px;
  --space-10: 80px;
  --space-12: 96px;
  --space-16: 128px;

  /* Type */
  --font-display: 'Outfit', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --fs-xs: 12px;
  --fs-sm: 14px;
  --fs-base: 16px;
  --fs-md: 18px;
  --fs-lg: 20px;
  --fs-xl: 24px;
  --fs-2xl: 32px;
  --fs-3xl: 44px;
  --fs-4xl: 56px;
  --fs-5xl: 76px;

  /* Layout */
  --container-max: 1280px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  /* Motion */
  --t-fast: 150ms ease;
  --t-base: 250ms cubic-bezier(.2,.7,.3,1);
  --t-slow: 420ms cubic-bezier(.2,.7,.3,1);
}

/* ==========================================
   LIGHT THEME OVERRIDES
   Активируется через <html data-theme="light">.
   Цветовая семантика сохраняется — меняются только сами цвета.
   ========================================== */
[data-theme="light"] {
  --bg-primary: #f7f7f9;
  --bg-card: #ffffff;
  --bg-card-2: #f1f1f5;
  --bg-elevated: #ffffff;

  --border: #e4e4eb;
  --border-strong: #c8c8d2;
  --grid-line: #e8e8ee;

  --accent-ink: #fff4f5;
  --accent-glow: rgba(230, 57, 70, 0.10);
  --accent-glow-strong: rgba(230, 57, 70, 0.22);

  --text-primary: #0a0a0f;
  --text-secondary: #4a4a55;
  --text-muted: #8a8a95;

  /* Тени (видны только на светлом) */
  --shadow-sm: 0 1px 2px rgba(10, 10, 15, 0.04);
  --shadow-md: 0 4px 20px rgba(10, 10, 15, 0.06);
  --shadow-lg: 0 12px 40px rgba(10, 10, 15, 0.10);

  color-scheme: light;
}

:root { color-scheme: dark; --shadow-sm: none; --shadow-md: none; --shadow-lg: none; }

/* Плавный переход при смене темы */
html,
body,
.card,
.header,
.footer,
.btn,
.nav-links a,
.support-pkg {
  transition: background-color var(--t-base), border-color var(--t-base), color var(--t-base);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  font-feature-settings: "ss01", "cv01";
}
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-2);
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}
p { margin: 0 0 var(--space-2); color: var(--text-secondary); }
a { color: inherit; text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
::selection { background: var(--accent); color: #fff; }

/* ---------- Type scale ---------- */
h1 { font-size: var(--fs-5xl); letter-spacing: -0.035em; font-weight: 800; }
h2 { font-size: var(--fs-3xl); letter-spacing: -0.03em; font-weight: 800; }
h3 { font-size: var(--fs-xl); letter-spacing: -0.02em; font-weight: 700; }
h4 { font-size: var(--fs-md); letter-spacing: -0.015em; font-weight: 700; }
h5 { font-size: var(--fs-base); font-weight: 700; letter-spacing: -0.01em; }
@media (max-width: 1023px) { h1 { font-size: var(--fs-4xl); }}
@media (max-width: 767px) {
  h1 { font-size: var(--fs-2xl); letter-spacing: -0.025em; }
  h2 { font-size: var(--fs-xl); }
  h3 { font-size: var(--fs-lg); }}

/* ---------- Layout ---------- */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--space-4); }
.section { padding: var(--space-12) 0; position: relative; }
.section--tight { padding: var(--space-8) 0; }
@media (max-width: 767px) {
  .container { padding: 0 var(--space-3); }
  .section { padding: var(--space-8) 0; }}

/* ---------- Eyebrow (mono pill) ---------- */
.section-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(230, 57, 70, 0.06);
  border: 1px solid rgba(230, 57, 70, 0.35);
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-3);
}
.section-eyebrow::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

/* ---------- Section title ---------- */
.section-title { text-align: center; margin-bottom: var(--space-8); }
.section-title p {
  max-width: 640px;
  margin: var(--space-2) auto 0;
  color: var(--text-secondary);
  font-size: var(--fs-md);
}

/* ---------- Buttons (pill, Manrope) ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-base);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--t-base);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: #fff;
  padding: 15px 30px;
  border: none;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
}
.btn-primary::after { content: " →"; }
.btn-primary:hover { background: var(--accent-hover, #ff4d5a); transform: translateY(-1px); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: var(--text-primary);
  padding: 15px 24px;
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  text-decoration: none;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(230,57,70,0.05);
}
.btn-sm { padding: 11px 20px; font-size: var(--fs-sm); }
.btn-lg { padding: 18px 32px; font-size: var(--fs-md); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn .ph { font-size: 18px; }

/* ---------- Cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  transition: border-color var(--t-base), transform var(--t-base), box-shadow var(--t-base);
}
.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}
a.card:hover { color: inherit; }

/* Контент поверх фона. Поднимаем ТОЛЬКО смысловой контент (main, footer),
   а не «все подряд» — иначе position:relative форсился на fixed-оверлеях и
   фонах (cyber-grid-floor, scroll-progress, mobile-menu, neon-ribbons,
   chapter-nav, page-transition), ломая их fixed-позицию: декоративный
   3D-«пол» уходил в поток и тянул документ далеко под футер («пустота»).
   header не трогаем — у него собственный z-index:100 (для дропдауна «Услуги»). */
body > main, body > footer { position: relative; z-index: 1; }

/* Декоративные absolute-элементы (hero::before, глоу-пятна) не должны
   создавать горизонтальный скролл на узких экранах.

   clip, а не hidden: hidden по одной оси заставляет вторую вычислиться в auto,
   body становится скролл-контейнером, который сам никуда не прокручивается,
   и любой position:sticky внутри страницы перестаёт прилипать. clip режет
   так же, но контейнер не создаёт. */
html, body { overflow-x: clip; }

/* ==========================================
   HEADER / NAVIGATION
   ========================================== */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 18px 0;
  background: transparent;
  transition: background var(--t-base), backdrop-filter var(--t-base), border-color var(--t-base), padding var(--t-base);
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  background: rgba(10, 10, 15, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
  padding: 12px 0;
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700;
  font-size: var(--fs-md);
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.nav-logo:hover { color: var(--text-primary); }
.nav-logo img { height: 36px; width: auto; }
.nav-links {
  display: flex; gap: 32px;
  list-style: none; margin: 0; padding: 0;
}
.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: var(--fs-sm);
  position: relative;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base);
}
.nav-links a:hover::after { transform: scaleX(1); }

/* ==========================================
   NAV DROPDOWN — МИНИМАЛЬНЫЙ, click-to-open, вертикальный список.
   Никакого hover, никаких сложных переходов.
   Клик по "Услуги" → открывает. Клик вне / клик по пункту → закрывает.
   ========================================== */
.nav-dropdown-wrap {
  position: relative;
  list-style: none;
}

.nav-dropdown-trigger {
  cursor: pointer;
  user-select: none;
}
.nav-dropdown-trigger::after,
.nav-links a.nav-dropdown-trigger::after {
  content: none !important;
  display: none !important;
}

.nav-dropdown-chevron {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 4px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 200ms ease;
  vertical-align: middle;
}
.nav-dropdown-wrap.open .nav-dropdown-chevron {
  transform: rotate(225deg) translateY(-2px);
}

/* Сам dropdown — display:none когда закрыт, display:block когда открыт.
   Никаких opacity/visibility/pointer-events трюков. */
.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  /* padding-top создаёт «мост» между триггером и списком —
     закрывает 12px-зазор, чтобы указатель не попадал в пустоту
     между «Услуги» и меню (защита от «document click → close»). */
  padding: 12px 0 0 0;
  min-width: 280px;
  /* z-index выше всего: перекрывает секции, hero, панели */
  z-index: 9999;
}
/* Сам wrap — тоже выносим в верхний слой когда открыт, чтобы
   dropdown не перекрывался никакими transform-stacking-context'ами
   соседних элементов. */
.nav-dropdown-wrap.open {
  z-index: 9999;
}
.nav-dropdown-wrap.open .nav-dropdown {
  display: block;
}

/* Inner-wrapper несёт визуал (фон/бордер/тень) и раскладку списка.
   Визуал вынесен сюда — чтобы верхний padding на .nav-dropdown создавал
   «мост» над зазором без видимых границ. */
.nav-dropdown-inner {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(10, 10, 15, 0.35);
  padding: 8px;
}

/* Элементы dropdown — full-width, flex row (icon + body) */
.nav-dropdown-item {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 12px;
  width: 100% !important;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--text-primary) !important;
  text-decoration: none !important;
  box-sizing: border-box;
  transition: background 150ms ease;
}
.nav-dropdown-item::after,
.nav-links a.nav-dropdown-item::after {
  content: none !important;
  display: none !important;
}
.nav-dropdown-item:hover {
  background: rgba(230, 57, 70, 0.12);
  color: var(--text-primary) !important;
}

.nav-dropdown-item-icon {
  flex-shrink: 0 !important;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: rgba(230, 57, 70, 0.12);
  color: var(--accent);
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}

.nav-dropdown-item-body {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px;
  min-width: 0;
}
.nav-dropdown-item-title {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  line-height: 1.2;
}
.nav-dropdown-item-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* Светлая тема — мягкая тень */
[data-theme="light"] .nav-dropdown-inner {
  box-shadow: 0 20px 50px rgba(10, 10, 15, 0.12);
}

.nav-cta {
  display: flex; gap: 20px; align-items: center;
}
.nav-phone {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
}
.burger {
  display: none;
  background: none; border: 1px solid var(--border-strong);
  width: 42px; height: 42px;
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 20px;
  align-items: center; justify-content: center;
  padding: 0;
}
@media (max-width: 1023px) {
  .nav-links { display: none; }
  .nav-phone { display: none; }
  .burger { display: inline-flex; }
  .nav-cta .btn { padding: 10px 16px; font-size: var(--fs-sm); }}
/* Узкие экраны: CTA прячем (он продублирован в мобильном меню),
   иначе логотип + кнопка + тумблер + бургер шире вьюпорта */
@media (max-width: 640px) {
  .nav-cta { gap: 12px; }
  .nav-cta .btn { display: none; }
  .nav-logo img { height: 30px; }
}
@media (max-width: 540px) {
  .nav-cta .btn { display: none; }}

/* Mobile menu overlay */
.mobile-menu {
  position: fixed; inset: 0;
  background: var(--bg-primary);
  z-index: 200;
  display: none;
  flex-direction: column;
  padding: var(--space-3) var(--space-3) var(--space-4);
  overflow-y: auto;
}
.mobile-menu.open {
  display: flex;
  animation: mm-in 280ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes mm-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.mobile-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
}
.mobile-menu-brand {
  font-weight: 800;
  font-size: var(--fs-md);
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.mobile-menu-close {
  background: none; border: 1px solid var(--border-strong);
  width: 44px; height: 44px; border-radius: 12px;
  color: var(--text-primary); font-size: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  flex: none;
}
.mobile-menu-nav { flex: 1; padding: var(--space-3) 0 var(--space-2); }
.mobile-menu-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: var(--space-2) 0 6px;
}
.mobile-menu ul { list-style: none; padding: 0; margin: 0 0 var(--space-2); }
.mobile-menu li { border-bottom: 1px solid var(--border); }
.mobile-menu li:last-child { border-bottom: none; }
.mobile-menu li a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 4px;
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text-primary);
}
.mobile-menu li a i {
  color: var(--accent);
  font-size: 19px;
  flex: none;
}
.mobile-menu li a:active { color: var(--accent); }
/* Стаггер пунктов при открытии */
.mobile-menu.open li {
  animation: mm-item 360ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.mobile-menu.open li:nth-child(1) { animation-delay: 60ms; }
.mobile-menu.open li:nth-child(2) { animation-delay: 95ms; }
.mobile-menu.open li:nth-child(3) { animation-delay: 130ms; }
.mobile-menu.open li:nth-child(4) { animation-delay: 165ms; }
.mobile-menu.open li:nth-child(5) { animation-delay: 200ms; }
@keyframes mm-item {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}
.mobile-menu-foot {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--border);
}
.mobile-menu-phone {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}
.mobile-menu-phone i { color: var(--accent); font-size: 18px; }
.mobile-menu .btn { justify-content: center; }
.mobile-menu a:focus-visible, .mobile-menu-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  .mobile-menu.open, .mobile-menu.open li { animation: none; }}


/* ==========================================
   PANEL — macOS-like chrome (traffic lights + live indicator)
   Used by hero infra panel AND throughout the site.
   ========================================== */
.panel {
  background: linear-gradient(180deg, var(--bg-card), var(--bg-card-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5), 0 0 1px rgba(230,57,70,0.3);
}
.panel-header {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card-2);
}
.panel-dots { display: flex; gap: 6px; }
.panel-dot {
  width: 10px; height: 10px; border-radius: 50%; display: inline-block;
}
.panel-dot--r { background: #ff5f56; }
.panel-dot--y { background: #ffbd2e; }
.panel-dot--g { background: #27c93f; }
.panel-title {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
}
.panel-meta {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--success);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success-glow);
  animation: livePulse 1.6s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--success-glow); }
  50%      { opacity: 0.6; box-shadow: 0 0 16px var(--success-glow); }
}
.panel-body { padding: 20px 18px; }

/* Hero infra panel — stat strip */
.topo-mini { padding: 20px 18px; }
.topo-mini svg { width: 100%; height: auto; display: block; }
.stat-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
}
.stat-cell {
  padding: 14px 16px;
  border-right: 1px solid var(--border);
}
.stat-cell:last-child { border-right: none; }
.stat-key {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.stat-val {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 8px;
}
.stat-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.stat-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
}
@media (max-width: 540px) {
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-cell:nth-child(2) { border-right: none; }}

/* ==========================================
   SERVICES — легаси-блок консолидирован.
   Актуальные стили услуг (.flagship bento) — ниже, в секции "SERVICES — spec §3.4".
   ========================================== */

/* ==========================================
   TOPOLOGY (full, on index)
   ========================================== */
.topology {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  background: var(--bg-card-2);
  position: relative;
  overflow: hidden;
}
.topology-svg { width: 100%; height: auto; max-height: 520px; display: block; }
.topology-svg .node  { fill: var(--bg-elevated); stroke: var(--border-strong); stroke-width: 1.5; }
.topology-svg .node-fw { stroke: var(--accent); stroke-width: 1.5; fill: var(--accent-ink); }
.topology-svg .label { font: 600 14px 'JetBrains Mono', monospace; fill: var(--text-primary); text-anchor: middle; }
.topology-svg .sublabel { font: 500 11px 'JetBrains Mono', monospace; fill: var(--text-secondary); text-anchor: middle; }
.topology-svg .edge { stroke: var(--accent); stroke-width: 1.5; fill: none; opacity: 0.6; stroke-dasharray: 5 5; }
.topology-svg .lan-bar { fill: var(--border-strong); }
.topology-svg .lan-label { font: 500 11px 'JetBrains Mono', monospace; fill: var(--text-muted); text-anchor: middle; letter-spacing: 0.1em; text-transform: uppercase; }
@keyframes dashFlow { to { stroke-dashoffset: -20; } }
.topology-svg .edge { animation: dashFlow 1.5s linear infinite; }
@media (max-width: 767px) { .topology { padding: var(--space-3); }}

/* ==========================================
   STEPS (3 process cards)
   ========================================== */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  counter-reset: step;
}
.step {
  padding: var(--space-4);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
  transition: all var(--t-base);
}
.step:hover { border-color: var(--accent); transform: translateY(-3px); }
.step-number {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
  display: inline-flex; align-items: center; gap: 8px;
}
.step-number::before {
  content: '';
  width: 28px; height: 1px;
  background: var(--accent);
}
.step h4 { margin-bottom: 10px; font-size: var(--fs-lg); }
.step p { color: var(--text-secondary); }
@media (max-width: 767px) { .steps { grid-template-columns: 1fr; }}

/* Анимация «применено» после blur */
.support-packages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.support-pkg {
  padding: var(--space-3);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--t-fast);
}
.support-pkg:hover { border-color: var(--border-strong); }
.support-pkg.selected {
  border-color: var(--accent);
  background: rgba(230,57,70,0.05);
  box-shadow: 0 0 30px rgba(230,57,70,0.1);
}
.support-pkg h5 { margin-bottom: var(--space-1); font-size: var(--fs-base); }
.support-pkg-price {
  font-family: var(--font-mono);
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--accent);
  margin: var(--space-1) 0;
  letter-spacing: -0.01em;
}
.support-pkg small {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  margin-top: 4px;
} /* красный — complex */

/* ==========================================
   ARTICLE — animated explainer illustrations
   Библиотека CSS-анимаций для inline SVG в статьях.
   Используются через классы: .expl-*, .pulse-*, .flow-*
   ========================================== */

/* Иллюстрация во всю ширину статьи, с карточным фоном и нижней подписью */
.expl {
  margin: var(--space-5) 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.expl-body {
  padding: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
}
.expl-body svg { width: 100%; height: auto; max-height: 360px; display: block; }
.expl-caption {
  padding: 12px var(--space-3);
  border-top: 1px solid var(--border);
  background: var(--bg-card-2);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  text-align: center;
}

/* ==========================================
   LICENSE NOTE — блок про лицензии
   Визуально отличается от обычного sidebar — нейтральный серо-голубой.
   ========================================== */
.license-note {
  margin: var(--space-6) 0;
  padding: var(--space-4) var(--space-5);
  clear: both;
  background: linear-gradient(180deg, rgba(67,97,238,0.06), rgba(67,97,238,0.02));
  border: 1px solid rgba(67,97,238,0.35);
  border-left: 3px solid #4361ee;
  border-radius: var(--radius-md);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-3);
  align-items: start;
}
.license-note-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(67,97,238,0.15);
  color: #4361ee;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.license-note-body h4 {
  color: #4361ee;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 2px 0 var(--space-1);
}
.license-note-body p {
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 var(--space-2);
}
.license-note-body p:last-child { margin-bottom: 0; }
.license-note-body ul {
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 var(--space-2);
  padding-left: var(--space-3);
}
.license-note-body li { margin-bottom: 4px; }
.license-note-body strong { color: var(--text-primary); }
[data-theme="light"] .license-note {
  background: linear-gradient(180deg, rgba(67,97,238,0.05), #ffffff);
  box-shadow: var(--shadow-sm);
}
@media (max-width: 600px) {
  .license-note { grid-template-columns: 1fr; }}

/* ==========================================
   FORMS
   ========================================== */
.form-input {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: inherit;
  font-size: var(--fs-base);
  transition: border-color var(--t-fast);
  width: 100%;
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus {
  outline: none;
  border-color: var(--accent);
}

/* ==========================================
   ARTICLES PREVIEW (index)
   ========================================== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
@media (max-width: 1023px) { .articles-grid { grid-template-columns: repeat(2, 1fr); }}
@media (max-width: 767px) { .articles-grid { grid-template-columns: 1fr; }}
.article-card-preview {
  display: flex; flex-direction: column;
  padding: var(--space-4);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--t-base);
  position: relative;
  overflow: hidden;
}
.article-card-preview:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  color: inherit;
}
.article-card-preview h4 {
  margin: 12px 0 8px;
  font-size: var(--fs-lg);
}
.article-card-preview p {
  flex: 1;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}
.article-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  background: rgba(230,57,70,0.08);
  border: 1px solid rgba(230,57,70,0.3);
  border-radius: var(--radius-pill);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  width: fit-content;
}

/* ==========================================
   LIGHT THEME — targeted overrides
   Фиксим блоки с захардкоженными тёмными цветами

/* ==========================================
   CONTACTS
   ========================================== */
.contacts-section {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: var(--space-4);
  align-items: stretch;
}
@media (max-width: 900px) { .contacts-section { grid-template-columns: 1fr; }}

.contacts-info {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.contact-item {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.contact-item:last-of-type { border-bottom: none; }
.contact-item-icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  background: rgba(230,57,70,0.08);
  border: 1px solid rgba(230,57,70,0.25);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.contact-item-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.contact-item-value {
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--text-primary);
}
.contact-item-value a { color: var(--text-primary); }
.contact-item-value a:hover { color: var(--accent); }

.contacts-map {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 420px;
  position: relative;
}
.contacts-map iframe {
  width: 100%; height: 100%;
  min-height: 420px;
  border: 0;
  display: block;
  filter: invert(0.9) hue-rotate(180deg) saturate(0.8);
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-8) 0 var(--space-4);
  margin-top: var(--space-12);
  background: var(--bg-card-2);
  /* полупрозрачный вариант — живой фон слегка просвечивает (fallback выше) */
  background: color-mix(in srgb, var(--bg-card-2) 82%, transparent);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-5);
}
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 12px; }
.footer-col a { color: var(--text-secondary); font-size: var(--fs-sm); }
.footer-col a:hover { color: var(--accent); }
.footer-about p { color: var(--text-secondary); font-size: var(--fs-sm); max-width: 340px; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: var(--space-3);
  text-align: center;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.footer-legal {
  display: flex; gap: 24px; justify-content: center; flex-wrap: wrap;
  margin-top: 10px;
}
.footer-legal a { color: var(--text-muted); }
.footer-legal a:hover { color: var(--text-secondary); }
@media (max-width: 767px) { .footer-grid { grid-template-columns: 1fr 1fr; }}

/* ==========================================
   ARTICLE PAGES
   ========================================== */
.article-hero {
  padding: calc(var(--space-16) + var(--space-4)) 0 var(--space-8);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.article-hero > .container {
  position: relative;
  z-index: 1;
  /* hero-контейнер выровнен с колонкой статьи (min(78%, 1000px)),
     добавлен небольшой запас по бокам для воздуха вокруг h1 */
  width: min(82%, 1080px);
  max-width: none;
  margin: 0 auto;
}
@media (max-width: 1280px) { .article-hero > .container { width: 86%; }}
@media (max-width: 960px)  { .article-hero > .container { width: 92%; }}
@media (max-width: 640px)  { .article-hero > .container { width: 100%; padding: 0 var(--space-3); }}

.article-hero h1 {
  max-width: 920px;
  font-size: var(--fs-4xl);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.article-hero .hero-lede {
  max-width: 780px;
  margin-top: var(--space-3);
  font-size: var(--fs-md);
  line-height: 1.55;
  color: var(--text-secondary);
}
@media (max-width: 767px) {
  .article-hero h1 { font-size: var(--fs-2xl); }
  .article-hero .hero-lede { font-size: var(--fs-base); }}

.article-breadcrumbs {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.article-breadcrumbs a { color: var(--text-secondary); }
.article-breadcrumbs a:hover { color: var(--accent); }

/* Статья — шире и более "дышащая".
   Общая идея: контент-колонка до 1000px, но текстовая ширина внутри
   остаётся читаемой (~70 символов на строку) за счёт typography-ritmа
   и умеренного font-size. Плавающие иллюстрации (терминал, SVG) и
   full-width элементы (stats, pullquote, cta-block) растягиваются
   на полную ширину контейнера. */
.article-content {
  width: min(78%, 1000px);
  margin: 0 auto;
  padding: var(--space-10) 0 var(--space-8);
  font-size: 17px;
  line-height: 1.75;
  box-sizing: border-box;
  /* Для плавающих дочерних элементов — контекст для float */
  overflow: visible;
}
.article-content::after { content: ''; display: block; clear: both; }
@media (max-width: 1280px) { .article-content { width: 82%; }}
@media (max-width: 960px)  { .article-content { width: 88%; padding: var(--space-8) 0 var(--space-6); }}
@media (max-width: 640px)  { .article-content { width: 100%; padding: var(--space-6) var(--space-3); font-size: 16px; }}

.article-content h2 {
  margin-top: var(--space-10);
  margin-bottom: var(--space-3);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  position: relative;
  padding-left: 22px;
  color: var(--text-primary);
  clear: both;
}
.article-content h2::before {
  content: '';
  position: absolute;
  left: 0; top: 10px; bottom: 10px;
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
}
/* Первый h2 после интро — поменьше верхний отступ */
.article-content .article-intro + h2,
.article-content > h2:first-child {
  margin-top: var(--space-6);
}
@media (max-width: 640px) {
  .article-content h2 { font-size: 26px; padding-left: 16px; margin-top: var(--space-8); }}

.article-content h3 {
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  line-height: 1.3;
}
.article-content h2 + h3 { margin-top: var(--space-3); }

.article-content p {
  color: var(--text-primary);
  margin: 0 0 var(--space-3);
}

.article-content ul,
.article-content ol {
  color: var(--text-primary);
  padding-left: var(--space-4);
  margin: 0 0 var(--space-4);
}
.article-content li {
  margin-bottom: 12px;
  padding-left: 6px;
}
.article-content li:last-child { margin-bottom: 0; }
.article-content ul li::marker  { color: var(--accent); }
.article-content ol li::marker  { color: var(--accent); font-weight: 700; font-family: var(--font-mono); }
.article-content a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.article-content a:hover { color: var(--accent-hover); }
/* Кнопки внутри article-content — не перекрашиваем текст в red.
   Без этого правила .article-content a (специфичность 0,2,0) выигрывает у
   .btn-primary (0,1,0) и делает текст красной кнопки красным = невидимым. */
.article-content a.btn-primary,
.article-content a.btn-primary:hover { color: #fff; }
.article-content a.btn-secondary,
.article-content a.btn-secondary:hover { color: var(--text-primary); }
.article-content strong { color: var(--text-primary); font-weight: 700; }

/* Lead paragraph — крупнее, воздушнее, с аккуратной разделительной линией */
.article-intro {
  font-size: 20px;
  line-height: 1.6;
  color: var(--text-primary);
  margin: 0 0 var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
  font-weight: 400;
  letter-spacing: -0.005em;
}
@media (max-width: 640px) { .article-intro { font-size: 17px; }}

/* Pull quote — широкая, выразительная карточка с маркером */
.article-pullquote {
  position: relative;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.42;
  font-weight: 600;
  color: var(--text-primary);
  margin: var(--space-8) 0;
  padding: var(--space-5) var(--space-6) var(--space-5) calc(var(--space-6) + 6px);
  background: var(--bg-card);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  letter-spacing: -0.015em;
  clear: both;
}
.article-pullquote::before {
  content: '// QUOTE';
  position: absolute;
  top: var(--space-2);
  right: var(--space-3);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.15em;
  font-weight: 500;
  font-style: normal;
  opacity: 0.8;
}
@media (max-width: 640px) {
  .article-pullquote { padding: var(--space-4); margin: var(--space-6) 0; }}

/* Info sidebar — больше воздуха, выравнивание по baseline заголовка */
.article-sidebar {
  margin: var(--space-5) 0;
  padding: var(--space-4) var(--space-4);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  clear: both;
}
.article-sidebar h4 {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 var(--space-2);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.article-sidebar p,
.article-sidebar ul {
  font-size: 15px;
  line-height: 1.65;
  margin: 0 0 var(--space-2);
}
.article-sidebar ul { padding-left: var(--space-3); }
.article-sidebar li { margin-bottom: 6px; }
.article-sidebar p:last-child,
.article-sidebar ul:last-child { margin-bottom: 0; }

/* Stats — широкая grid-карточка, расположена на всю ширину колонки */
.article-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0;
  margin: var(--space-6) 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card-2);
  clear: both;
}
.article-stat {
  padding: var(--space-4) var(--space-3);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.article-stat:last-child { border-right: none; }
/* Убираем border-bottom у последнего ряда при auto-fit wrap */
.article-stat-value {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 10px;
  letter-spacing: -0.03em;
}
.article-stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
@media (max-width: 640px) {
  .article-stat-value { font-size: 34px; }}

/* SVG illustration frame */
.article-illustration {
  margin: var(--space-6) 0;
  clear: both;
}
.article-illustration-frame {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  overflow: hidden;
}
.article-illustration svg { width: 100%; height: auto; display: block; }
.article-caption {
  margin-top: var(--space-2);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.02em;
}

/* Two-column comparison */
.article-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin: var(--space-5) 0;
  clear: both;
}
.article-two-col > div {
  padding: var(--space-4);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.article-two-col h4 {
  color: var(--accent);
  margin: 0 0 var(--space-2);
  font-size: var(--fs-base);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.article-two-col p,
.article-two-col ul {
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 var(--space-2);
}
.article-two-col p:last-child,
.article-two-col ul:last-child { margin-bottom: 0; }
.article-two-col ul { padding-left: var(--space-3); }
.article-two-col li { margin-bottom: 6px; }
@media (max-width: 767px) { .article-two-col { grid-template-columns: 1fr; }}

.article-tag-inline {
  display: inline-block;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  background: rgba(230,57,70,0.1);
  color: var(--accent);
  border: 1px solid rgba(230,57,70,0.3);
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
  vertical-align: middle;
}

/* CTA block — финальная карточка статьи, крупная и сбалансированная */
.article-cta-block {
  margin-top: var(--space-10);
  padding: var(--space-6) var(--space-5);
  background: linear-gradient(180deg, var(--bg-card), #14080d);
  border: 1px solid rgba(230, 57, 70, 0.25);
  border-radius: var(--radius-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
  clear: both;
}
.article-cta-block::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(230, 57, 70, 0.18), transparent 60%);
  pointer-events: none;
}
.article-cta-block > * { position: relative; }
.article-cta-block .section-eyebrow { margin-bottom: var(--space-2); }
.article-cta-block h3 {
  margin: 0 0 var(--space-2);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.article-cta-block p {
  color: var(--text-secondary);
  font-size: var(--fs-md);
  line-height: 1.6;
  max-width: 560px;
  margin: 0 auto var(--space-4);
}
.article-cta-block .btn { margin-top: var(--space-1); }

/* Accent inline link */
.link-accent {
  position: relative;
  display: inline-block;
  color: var(--accent);
  font-weight: 600;
}
.link-accent::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--t-base);
}
.link-accent:hover::after { transform: scaleX(1); }

/* ==========================================
   UTIL
   ========================================== */
.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.text-mono { font-family: var(--font-mono); }
.reveal { opacity: 0; transform: translateY(24px); }
.reveal.visible {
  opacity: 1; transform: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

/* Skip-to-content link */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-2);
  background: var(--accent);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  z-index: 9999;
  transition: top var(--t-fast);
}
.skip-link:focus {
  top: var(--space-2);
  color: #fff;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Scroll hint (hero) */
.scroll-hint {
  position: absolute; left: var(--space-4); bottom: var(--space-4);
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono);
  font-size: 10px; color: var(--text-muted); letter-spacing: 0.2em;
  text-transform: uppercase;
}
.scroll-hint::after {
  content: '';
  width: 60px; height: 1px;
  background: linear-gradient(90deg, var(--text-muted), transparent);
}
@media (max-width: 1023px) { .scroll-hint { display: none; }}

/* ==========================================
   THEME TOGGLE BUTTON
   Кнопка "солнце/луна" в шапке.
   Иконка отображает — "куда переключится при клике".
   ========================================== */
.theme-toggle {
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-fast);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.theme-toggle .ph {
  font-size: 18px;
  transition: transform var(--t-base), opacity var(--t-fast);
}

/* Default (dark theme): показываем "солнце" — клик переведёт в светлую */
.theme-toggle .theme-icon--sun { display: inline-block; }
.theme-toggle .theme-icon--moon { display: none; }

/* Light theme: показываем "луну" — клик вернёт в тёмную */
[data-theme="light"] .theme-toggle .theme-icon--sun { display: none; }
[data-theme="light"] .theme-toggle .theme-icon--moon { display: inline-block; }

/* Мобильный вариант — чуть меньше */
@media (max-width: 640px) {
  .theme-toggle { width: 36px; height: 36px; }
  .theme-toggle .ph { font-size: 16px; }
}

/* ==========================================
   LIGHT THEME — targeted overrides
   Фиксим блоки с захардкоженными тёмными цветами
   (эти цвета было невозможно выразить через переменные
   без потери "насыщенности" тёмной темы).
   ========================================== */

/* Header на скролле — прозрачный белый вместо тёмного */
[data-theme="light"] .header.scrolled {
  background: rgba(247, 247, 249, 0.82);
}

/* macOS-panel (hero infra panel) — убираем тяжёлую чёрную тень */
[data-theme="light"] .panel {
  box-shadow: 0 20px 50px rgba(10, 10, 15, 0.08), 0 0 1px rgba(230,57,70,0.2);
}

/* Разделитель trust-item в hero — тёмный на светлом фоне */
[data-theme="light"] .trust-divider {
  background: rgba(10, 10, 15, 0.12);
}

/* hero-trust border-top (rgba белого в исходнике — невидимый на светлом) */
[data-theme="light"] .hero-trust {
  border-top-color: var(--border);
}

/* Flagship service card и article CTA — заменяем тёмно-красный хардкод */
[data-theme="light"] .service-card--featured,
[data-theme="light"] .article-cta-block {
  background: linear-gradient(180deg, var(--bg-card), #fff1f2);
  border-color: rgba(230, 57, 70, 0.35);
  box-shadow: var(--shadow-md);
}

/* Все обычные карточки — добавляем мягкую тень на светлом фоне */
[data-theme="light"] .card,
[data-theme="light"] .support-pkg,
[data-theme="light"] .step,
[data-theme="light"] .article-sidebar,
[data-theme="light"] .article-stats,
[data-theme="light"] .contacts-info,
[data-theme="light"] .contacts-map,
[data-theme="light"] .topology {
  box-shadow: var(--shadow-sm);
}
[data-theme="light"] .card:hover,
[data-theme="light"] a.card:hover {
  box-shadow: var(--shadow-md);
}

/* Footer: цвет фона светлее; бордюр явный */
[data-theme="light"] .footer {
  background: var(--bg-card-2);
  background: color-mix(in srgb, var(--bg-card-2) 82%, transparent);
  border-top-color: var(--border);
}

/* Текст в служебных блоках иногда был через rgba или hardcoded white — принудим к переменной */
[data-theme="light"] .hero-lede,
[data-theme="light"] .hero-h1 .muted,
[data-theme="light"] .scroll-hint {
  color: var(--text-secondary);
}

/* Pull quote, sidebars — явный светлый фон (вместо просвечивающего) */
[data-theme="light"] .article-pullquote {
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}
[data-theme="light"] .form-input {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text-primary);
}
[data-theme="light"] .form-input::placeholder { color: var(--text-muted); }

/* Бургер-кнопка */
[data-theme="light"] .burger { color: var(--text-primary); }

/* Mobile menu overlay */
[data-theme="light"] .mobile-menu { background: var(--bg-primary); }

/* Selection */
[data-theme="light"] ::selection { background: var(--accent); color: #fff; }

/* Панели калькулятора и "выбрано"-состояние */
[data-theme="light"] .support-pkg.selected {
  background: #fff1f2;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.08), var(--shadow-sm);
}

/* Topology SVG. Ноды имеют hardcoded fill — переопределим фон */
[data-theme="light"] .topology-svg rect.node {
  fill: var(--bg-card-2);
  stroke: var(--border);
}
[data-theme="light"] .topology-svg text {
  fill: var(--text-primary);
}
[data-theme="light"] .topology-svg .sublabel {
  fill: var(--text-secondary);
}

/* SVG-иллюстрации в статьях: большинство используют hardcoded #12121a, #1a1a28 и т.д.
   Применяем CSS filter для инверсии цветов SVG, сохраняя красный акцент.
   Это работает т.к. иллюстрации используют только тёмные фоны + белый/серый текст. */
[data-theme="light"] .article-illustration-frame {
  background: var(--bg-card);
}

/* Яндекс-карта iframe — убираем потенциальный инвертирующий фильтр */
[data-theme="light"] .contacts-map iframe { filter: none; }

/* ==========================================
   LIGHT THEME — inline SVG color remapping
   В index.html / статьях SVG-иллюстрации имеют inline fill/stroke —
   CSS attribute selectors перекрывают их на светлой теме.
   Затрагиваемые SVG: .topo-mini (hero), .article-illustration, .topology-svg.
   ========================================== */
[data-theme="light"] .topo-mini rect[fill="#12121a"],
[data-theme="light"] .article-illustration rect[fill="#12121a"],
[data-theme="light"] .article-illustration [fill="#1a1a28"] {
  fill: #ffffff;
}
[data-theme="light"] .topo-mini rect[fill="#1a0b0f"],
[data-theme="light"] .article-illustration [fill="#1a0b0f"] {
  fill: #fff1f2;
}
[data-theme="light"] .topo-mini [stroke="#2a2a40"],
[data-theme="light"] .topo-mini rect[fill="#2a2a40"],
[data-theme="light"] .article-illustration [stroke="#2a2a40"],
[data-theme="light"] .article-illustration [fill="#2a2a40"],
[data-theme="light"] .article-illustration [stroke="#1e1e2e"],
[data-theme="light"] .article-illustration [fill="#1e1e2e"] {
  fill: #e4e4eb;
  stroke: #c8c8d2;
}
[data-theme="light"] .topo-mini text[fill="#f0f0f0"],
[data-theme="light"] .article-illustration [fill="#f0f0f0"],
[data-theme="light"] .article-illustration [fill="#fff"] {
  fill: #0a0a0f;
}
[data-theme="light"] .topo-mini text[fill="#a0a0b0"],
[data-theme="light"] .article-illustration [fill="#a0a0b0"] {
  fill: #4a4a55;
}
[data-theme="light"] .topo-mini text[fill="#606070"],
[data-theme="light"] .article-illustration [fill="#606070"] {
  fill: #8a8a95;
}

/* Стили внутри SVG через <style> (как в топологии index.html) — покрываем .topology-svg правилами */
[data-theme="light"] .topology-svg .label { fill: var(--text-primary); }
[data-theme="light"] .topology-svg .sublabel { fill: var(--text-secondary); }
[data-theme="light"] .topology-svg .lan-label { fill: var(--text-muted); }
[data-theme="light"] .topology-svg .lan-bar { fill: var(--border); }

/* ===========================================
   SCROLL REVEAL — used by new sections in index.html / articles
   =========================================== */
[data-reveal] { opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease, transform 0.5s ease; }
[data-reveal].is-revealed { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }}

/* ===========================================
   HERO — spec §3.1
   =========================================== */
.hero {
  position: relative;
  padding: 80px 56px 96px;
  /* инженерная dot-сетка (датацентр-вайб) поверх ПОЛУПРОЗРАЧНОГО градиента —
     живой фон (.ambient-bg) просвечивает и в hero */
  background:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.035) 1px, transparent 0) 0 0 / 34px 34px,
    linear-gradient(180deg, rgba(10,10,15,0.15) 0%, rgba(10,13,18,0.55) 100%);
  overflow: hidden;
}
.hero::before {
  content: "IT";
  position: absolute;
  top: -20px;
  right: 56px;
  font-family: "JetBrains Mono", monospace;
  font-size: 200px;
  font-weight: 800;
  color: rgba(230,57,70,0.04);
  line-height: 1;
  letter-spacing: -0.05em;
  pointer-events: none;
  z-index: 0;
}
.hero-body {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.hero-eyebrow::before {
  content: "";
  width: 36px;
  height: 2px;
  background: var(--accent);
}
.hero-eyebrow span {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.2em;
  font-weight: 600;
  text-transform: uppercase;
}
.hero-title {
  font-size: 42px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}
.hero-title strong { color: var(--text-primary); font-weight: 700; }
.hero-title .accent { color: var(--accent); font-weight: 700; }
.hero-sub {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0 0 36px;
  max-width: 520px;
}
.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 28px;
  padding: 8px 15px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card-2);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}
.hero-status .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 var(--success-glow);
  animation: pulse-green 2.4s ease-out infinite;
}
.hero-status .up { color: var(--success); font-weight: 600; }
.hero-status .sep { color: var(--text-muted); }
@keyframes pulse-green {
  0%   { box-shadow: 0 0 0 0 var(--success-glow); }
  70%  { box-shadow: 0 0 0 9px rgba(74,222,128,0); }
  100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}
@media (prefers-reduced-motion: reduce) { .hero-status .dot { animation: none; }}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 24px 0 0;
  border-top: 1px solid var(--border);
}
.hero-metrics .cell .num {
  font-family: "JetBrains Mono", monospace;
  font-size: 26px;
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.hero-metrics .cell .lbl {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 4px;
}
.hero-right { position: relative; }
.iso-scene {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 460px;
  margin-left: auto;
}
.iso-svg { width: 100%; height: 100%; overflow: visible; }
.iso-label {
  position: absolute;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--text-secondary);
  background: rgba(15,20,25,0.9);
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 2px;
  letter-spacing: 0.05em;
}
.iso-label.office { left: 4%; top: 20%; }
.iso-label.cloud { right: 4%; top: 20%; }
.iso-label .num { color: var(--accent); margin-right: 6px; }

[data-theme="light"] .iso-label { background: rgba(255,255,255,0.95); color: var(--text-secondary); }
/* iso-сцена (SVG нарисован тёмными плашками) остаётся тёмной карточкой и в светлой теме —
   так схема читается, а вокруг неё — светлый hero. */
[data-theme="light"] .iso-scene {
  background: #0f1419;
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow-lg);
}
/* Hero на светлой теме: полупрозрачный градиент, dot-сетка темнее */
[data-theme="light"] .hero {
  background:
    radial-gradient(circle at 1px 1px, rgba(10,10,15,0.05) 1px, transparent 0) 0 0 / 34px 34px,
    linear-gradient(180deg, rgba(247,247,250,0.30) 0%, rgba(237,237,243,0.60) 100%);
}
[data-theme="light"] .hero::before { color: rgba(230,57,70,0.05); }
[data-theme="light"] .hero-status { background: var(--bg-card); box-shadow: var(--shadow-sm); }

@keyframes dataflow { 0% { stroke-dashoffset: 40; } 100% { stroke-dashoffset: 0; } }
.flow-line { stroke-dasharray: 6 4; animation: dataflow 1s linear infinite; }
@keyframes iso-pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
.vm-pulse { animation: iso-pulse 2s ease-in-out infinite; }
.vm-pulse.d1 { animation-delay: 0.3s; }
.vm-pulse.d2 { animation-delay: 0.6s; }
.vm-pulse.d3 { animation-delay: 0.9s; }

@media (prefers-reduced-motion: reduce) {
  .flow-line, .vm-pulse { animation: none; }}

@media (max-width: 900px) {
  .hero { padding: 56px 24px; }
  .hero-body { grid-template-columns: 1fr; gap: 40px; }
  .hero-title { font-size: 32px; }
  .hero::before { font-size: 120px; right: 16px; }}

/* ===========================================
   TRUST BAR — spec §3.2
   =========================================== */
.trust-bar {
  padding: 40px 56px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  /* прозрачная полоса — живой фон виден и здесь */
  background: transparent;
}
.trust-body {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 56px;
  align-items: center;
}
.trust-kpis { display: flex; gap: 40px; }
.trust-kpis .cell .num {
  font-family: "JetBrains Mono", monospace;
  font-size: 22px;
  color: var(--text-primary);
  font-weight: 700;
}
.trust-kpis .cell .lbl {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.trust-logos {
  display: flex;
  gap: 32px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.trust-logo {
  display: inline-flex;
  align-items: center;
  color: var(--text-muted);
  opacity: 0.7;
  transition: opacity 0.2s, color 0.2s;
}
/* Wordmark-логотипы клиентов — инлайн-SVG, цвет наследуется через currentColor */
.trust-logo svg {
  display: block;
  height: 30px;
  width: auto;
  flex: none;
}
.trust-logo:hover { opacity: 1; color: var(--text-primary); }
@media (max-width: 900px) {
  .trust-bar { padding: 32px 24px; }
  .trust-body { grid-template-columns: 1fr; gap: 24px; }
  .trust-logos { justify-content: flex-start; }
  .trust-kpis { flex-wrap: wrap; gap: 24px; }}

/* ===========================================
   CREDS BAND — гарантии и стандарты (Trust & Authority)
   =========================================== */
.creds-band {
  padding: 26px 56px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 60% 120% at 50% 0%, var(--accent-glow), transparent 70%),
    var(--bg-card-2);
  /* полупрозрачный вариант (fallback выше — для браузеров без color-mix) */
  background:
    radial-gradient(ellipse 60% 120% at 50% 0%, var(--accent-glow), transparent 70%),
    color-mix(in srgb, var(--bg-card-2) 55%, transparent);
}
.creds-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.cred {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 4px;
  position: relative;
}
.cred + .cred::before {
  content: "";
  position: absolute;
  left: -6px; top: 50%;
  transform: translateY(-50%);
  width: 1px; height: 26px;
  background: var(--border);
}
.cred i {
  font-size: 22px;
  color: var(--accent);
  flex: none;
}
.cred span {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  text-transform: uppercase;
}
@media (max-width: 1023px) {
  .creds-band { padding: 24px; }
  .creds-inner { grid-template-columns: repeat(3, 1fr); gap: 18px 12px; }
  .cred:nth-child(3n+1)::before { display: none; }}
@media (max-width: 560px) {
  .creds-inner { grid-template-columns: repeat(2, 1fr); }
  .cred:nth-child(3n+1)::before { display: block; }
  .cred:nth-child(2n+1)::before { display: none; }}

/* ===========================================
   COMPARE (Было/Стало) — spec §3.3
   =========================================== */
.section-wrap {
  padding: 80px 56px;
  max-width: 1280px;
  margin: 0 auto;
}
.section-head { margin-bottom: 40px; }
.sec-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.sec-eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--accent);
}
.sec-eyebrow span {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.2em;
  font-weight: 600;
  text-transform: uppercase;
}
.sec-title {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px;
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.section-desc {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
  max-width: 600px;
  margin: 0;
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 32px;
  align-items: stretch;
}
.compare-col {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
}
.compare-col.good { border-color: rgba(230,57,70,0.3); }
.compare-header {
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.compare-header.bad { background: rgba(148,163,184,0.05); }
.compare-header.good { background: rgba(230,57,70,0.05); border-bottom-color: rgba(230,57,70,0.2); }
.compare-header .label {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
}
.compare-header.good .label { color: var(--accent); }
.compare-header .status { font-size: 11px; color: var(--text-muted); }
.compare-header.good .status { color: #10b981; }
.compare-body { padding: 24px 26px; flex: 1; }
.compare-body ul { list-style: none; padding: 0; margin: 0; }
.compare-body li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}
.compare-body.bad li::before {
  content: "✕";
  color: var(--text-muted);
  font-weight: 700;
  flex-shrink: 0;
}
.compare-body.good li::before {
  content: "→";
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}
.compare-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 24px;
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  padding: 0 8px;
}
@media (max-width: 900px) {
  .section-wrap { padding: 56px 24px; }
  .compare-grid { grid-template-columns: 1fr; }
  .compare-arrow { transform: rotate(90deg); padding: 12px 0; }}

/* ===========================================
   SERVICES — spec §3.4
   =========================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: 16px;
}
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  position: relative;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.service-card:hover {
  border-color: rgba(230,57,70,0.4);
  transform: translateY(-2px);
}
/* Флагман — широкая bento-карточка во всю ширину ряда, внутри 2 колонки:
   описание слева + панель буллетов справа. Так нет ни внутренней пустоты,
   ни пустой ячейки в сетке. */
.service-card.flagship {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 32px;
  align-items: stretch;
  background: linear-gradient(120deg, #14080d 0%, var(--bg-card) 62%);
  border-color: rgba(230,57,70,0.25);
  padding: 36px;
}
[data-theme="light"] .service-card.flagship {
  background: linear-gradient(120deg, #fff1f2 0%, var(--bg-card) 62%);
}
.flagship-main { display: flex; flex-direction: column; min-width: 0; }
.service-card.flagship::after {
  content: "FLAGSHIP";
  position: absolute;
  top: 24px;
  right: 28px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.15em;
  font-weight: 700;
  background: rgba(230,57,70,0.1);
  border: 1px solid rgba(230,57,70,0.25);
  padding: 4px 10px;
  border-radius: 999px;
}
.service-num {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.2em;
  margin-bottom: 16px;
  text-transform: uppercase;
}
.service-icon {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background: rgba(230,57,70,0.1);
  border: 1px solid rgba(230,57,70,0.3);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 18px;
}
.service-card.flagship .service-icon { width: 56px; height: 56px; font-size: 28px; }
.service-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px;
  line-height: 1.25;
}
.service-card.flagship .service-title { font-size: 24px; letter-spacing: -0.01em; }
.service-benefit {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.55;
  margin: 0 0 16px;
  flex: 1;
}
.service-card.flagship .service-benefit { font-size: 15px; flex: 0 1 auto; margin-bottom: 22px; }
.service-card.flagship .flagship-main .service-foot { margin-top: auto; }
/* Панель буллетов — правая колонка bento, по высоте равна левой */
.service-card.flagship .flagship-bullets {
  list-style: none;
  margin: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  background: rgba(230,57,70,0.045);
  border: 1px solid rgba(230,57,70,0.16);
  border-radius: 12px;
}
[data-theme="light"] .service-card.flagship .flagship-bullets {
  background: rgba(230,57,70,0.05);
}
.service-card.flagship .flagship-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 9px 0;
  color: var(--text-primary);
  font-size: 13.5px;
  line-height: 1.45;
  border-bottom: 1px solid var(--border);
}
.service-card.flagship .flagship-bullets li:last-child { border-bottom: none; }
.service-card.flagship .flagship-bullets li::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  margin-top: 6px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(230,57,70,0.5);
}
.service-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.service-price {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 600;
}
.service-price .currency { color: var(--accent); }
.service-link {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}
.service-link::after { content: " →"; color: var(--accent); }

@media (max-width: 1023px) {
  .service-card.flagship { grid-template-columns: 1fr; gap: 24px; padding: 28px; }
  .service-card.flagship .flagship-bullets { justify-content: flex-start; }}
@media (max-width: 640px) {
  .services-grid { grid-template-columns: 1fr; }
  .service-card.flagship { padding: 24px; }}

/* ===========================================
   REASSURE (Переход проще) — spec §3.5
   =========================================== */
.reassure-wrap { position: relative; overflow: hidden; }
.reassure-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  position: relative;
}
.r-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 28px 24px;
  position: relative;
  transition: border-color 0.2s;
}
.r-card:hover { border-color: rgba(230,57,70,0.3); }
.r-num {
  position: absolute;
  top: 18px;
  right: 22px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.2em;
}
.r-icon {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background: rgba(230,57,70,0.1);
  border: 1px solid rgba(230,57,70,0.3);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 18px;
}
.r-title {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 10px;
  line-height: 1.3;
}
.r-body {
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.6;
  margin: 0;
}
.r-body strong { color: var(--text-primary); font-weight: 600; }
.reassure-bottom {
  margin-top: 32px;
  padding: 20px 24px;
  background: rgba(230,57,70,0.04);
  border: 1px solid rgba(230,57,70,0.15);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.reassure-bottom .mark {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.15em;
  font-weight: 700;
  flex-shrink: 0;
}
.reassure-bottom .txt {
  color: var(--text-primary);
  font-size: 14.5px;
  line-height: 1.55;
}
.reassure-bottom .txt strong { color: var(--text-primary); font-weight: 700; }
.sec-title .highlight { color: var(--accent); font-weight: 700; }
@media (max-width: 900px) {
  .reassure-grid { grid-template-columns: 1fr; }
  .reassure-wrap::before { display: none; }
  .reassure-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }}

/* ===========================================
   SAVINGS — spec §3.6
   =========================================== */
.savings-panel {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}
.savings-left .big-num {
  font-family: "JetBrains Mono", monospace;
  font-size: 72px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 12px;
}
.savings-left .big-num .currency { color: var(--accent); }
.savings-left .big-num .mo { font-size: 24px; color: var(--text-muted); font-weight: 500; }
.savings-left .caption {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 28px;
  max-width: 520px;
}
.savings-left .caption strong { color: var(--text-primary); }
.savings-chart {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 24px;
}
.chart-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  margin-bottom: 18px;
  text-transform: uppercase;
}
.bar-row { margin-bottom: 18px; }
.bar-row:last-child { margin-bottom: 0; }
.bar-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.bar-top .name { font-size: 13px; color: var(--text-primary); }
.bar-top .val { font-family: "JetBrains Mono", monospace; font-size: 13px; font-weight: 600; }
.bar-track {
  height: 8px;
  background: var(--bg-elevated, #1a1d22);
  border-radius: 1px;
  overflow: hidden;
}
.bar-fill { height: 100%; border-radius: 1px; }
.bar-fill.bad { width: 100%; background: #4b5563; }
.bar-fill.good { width: 25%; background: var(--accent); }
.bar-row.bad .val { color: var(--text-secondary); }
.bar-row.good .val { color: var(--accent); }
@media (max-width: 900px) {
  .savings-panel { grid-template-columns: 1fr; gap: 32px; }
  .savings-left .big-num { font-size: 56px; }}
/* Неразрывное «от 45 000 ₽» в mono-шрифте не должно распирать вьюпорт */
@media (max-width: 600px) {
  .savings-left .big-num { font-size: clamp(30px, 10.5vw, 44px); }
  .savings-left .big-num .mo { font-size: 15px; }
}

/* ===========================================
   FAQ — частые вопросы (лендинг), нативные details/summary
   =========================================== */
.faq-list {
  max-width: 860px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s;
}
.faq-item[open],
.faq-item:hover { border-color: rgba(230,57,70,0.3); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
}
.faq-q {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}
.faq-icon {
  color: var(--accent);
  font-size: 18px;
  flex: none;
  transition: transform 0.25s ease;
}
.faq-item[open] .faq-icon { transform: rotate(45deg); }
.faq-a { padding: 0 22px 20px; }
.faq-a p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.65;
  max-width: 72ch;
}

/* Ссылка внутри текста секции */
.link-inline {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(230,57,70,0.4);
  transition: border-color 0.2s;
}
.link-inline:hover { border-bottom-color: var(--accent); }

/* Подтверждение отправки демо-формы (заменяет форму) */
.form-done {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 22px;
  margin: var(--space-3, 24px) auto 0;
  max-width: 640px;
  background: rgba(74,222,128,0.06);
  border: 1px solid rgba(74,222,128,0.3);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.5;
}
.form-done i { color: var(--success, #4ade80); font-size: 20px; flex: none; }
.form-consent a { color: var(--text-secondary); text-decoration: underline; text-underline-offset: 2px; }
.form-consent a:hover { color: var(--text-primary); }

/* ===========================================
   CONTACT FORM — spec §3.8
   =========================================== */
.form-panel {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
}
.form-fields { display: flex; flex-direction: column; gap: 14px; }
.form-fields label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
  font-weight: 600;
}
.form-fields .inp {
  display: block;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 12px 14px;
  color: var(--text-primary);
  font-size: 14px;
  border-radius: 2px;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.form-fields .inp:focus { outline: none; border-color: var(--accent); }
.form-fields textarea.inp { min-height: 96px; resize: vertical; }
.form-submit {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.form-consent { font-size: 12px; color: var(--text-muted); max-width: 280px; }
.contact-side {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.contact-item .label {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.contact-item .val { color: var(--text-primary); font-size: 15px; line-height: 1.5; }
.contact-item .val a { color: var(--text-primary); border-bottom: 1px solid var(--accent); text-decoration: none; }
.contact-item.phone .val { font-family: "JetBrains Mono", monospace; font-size: 17px; }
@media (max-width: 900px) {
  .form-panel { grid-template-columns: 1fr; }}

/* ===========================================
   CONTACT MAP — Яндекс-карта с меткой на офисе.
   Полная ширина колонки контента, «tap-to-activate» вуаль (JS) — чтобы
   на мобильных скролл страницы пальцем не залипал в панорамировании.
   =========================================== */
.contact-map {
  margin-top: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
}
.contact-map__bar {
  display: flex;
  align-items: center;
  gap: 12px 20px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card-2);
}
.contact-map__pin {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  display: inline-flex; align-items: center; gap: 7px;
}
.contact-map__addr { font-size: 14px; color: var(--text-secondary); margin-right: auto; }
.contact-map__open {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;
  transition: color var(--t-fast);
}
.contact-map__open:hover { color: var(--accent); }
.contact-map__frame {
  position: relative;
  width: 100%;
  height: 380px;
  background: var(--bg-card-2);
}
.contact-map__iframe { display: block; width: 100%; height: 100%; border: 0; }
.contact-map__veil {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  border: 0; cursor: pointer;
  background: linear-gradient(180deg, rgba(10,10,15,0.05), rgba(10,10,15,0.12));
  transition: opacity var(--t-base), visibility var(--t-base);
}
[data-theme="light"] .contact-map__veil {
  background: linear-gradient(180deg, rgba(15,23,42,0.02), rgba(15,23,42,0.06));
}
.contact-map__veil-inner {
  display: inline-flex; align-items: center; gap: 9px;
  max-width: 90%;
  padding: 11px 18px;
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  box-shadow: 0 10px 30px -12px rgba(0,0,0,0.5);
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--text-primary);
}
.contact-map__veil-inner i { color: var(--accent); font-size: 16px; flex: none; }
.contact-map.is-active .contact-map__veil { opacity: 0; visibility: hidden; pointer-events: none; }
@media (max-width: 900px) {
  .contact-map__frame { height: 300px; }}
@media (max-width: 600px) {
  .contact-map { margin-top: var(--space-3); }
  .contact-map__bar { padding: 12px 14px; gap: 8px 14px; }
  .contact-map__addr { width: 100%; order: 3; font-size: 13px; margin-right: 0; }
  .contact-map__open { font-size: 11px; }
  .contact-map__frame { height: 260px; }
  .contact-map__veil-inner { font-size: 11.5px; padding: 10px 14px; text-align: center; }}
@media (prefers-reduced-motion: reduce) { .contact-map__veil { transition: none; }}

/* ===========================================
   ARTICLE TEMPLATE v2 — spec §4
   =========================================== */
.art-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 64px 48px 80px;
}
.breadcrumb {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  margin-bottom: 20px;
  text-transform: uppercase;
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--text-secondary); }
.breadcrumb .active { color: var(--accent); }

.art-hero {
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
}
.art-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.art-eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--accent);
}
.art-eyebrow span {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.2em;
  font-weight: 600;
  text-transform: uppercase;
}
.art-title {
  font-size: 36px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.art-meta {
  display: flex;
  gap: 24px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  flex-wrap: wrap;
}
.art-meta .read-time { color: var(--accent); }

.tldr {
  background: linear-gradient(180deg, #11161e 0%, var(--bg-card) 100%);
  border: 1px solid rgba(230,57,70,0.25);
  border-left: 3px solid var(--accent);
  padding: 24px 28px;
  border-radius: 4px;
  margin-bottom: 40px;
}
.tldr-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.25em;
  margin-bottom: 14px;
  font-weight: 700;
  text-transform: uppercase;
}
.tldr ul { list-style: none; padding: 0; margin: 0; }
.tldr li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.5;
}
.tldr li::before {
  content: "■";
  color: var(--accent);
  font-size: 11px;
  line-height: 1.8;
  flex-shrink: 0;
}
.tldr li strong { color: var(--text-primary); font-weight: 700; }

.art-scheme {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 32px;
  margin: 0 0 40px;
}
.scheme-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 8px;
}
.scheme-head h3 { color: var(--text-primary); font-size: 17px; font-weight: 600; margin: 0; }
.scheme-head .cap {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.scheme-stages {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 12px;
  align-items: stretch;
}
.stage-box {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 18px 16px;
  text-align: center;
}
.stage-num {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.2em;
  margin-bottom: 10px;
  font-weight: 700;
}
.stage-icon { font-size: 22px; color: var(--accent); margin-bottom: 8px; }
.stage-title { color: var(--text-primary); font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.stage-sub { color: var(--text-secondary); font-size: 11px; line-height: 1.4; }
.stage-arrow { display: flex; align-items: center; color: var(--accent); font-size: 18px; padding: 0 4px; }

.q-block { margin: 0 0 40px; }
.q-head {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  align-items: baseline;
}
.q-head .num {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.2em;
  font-weight: 700;
  min-width: 40px;
}
.q-head h2,
.q-head h3 {
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
}
.q-body {
  padding-left: 56px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.65;
}
.q-body p { margin: 0 0 10px; }
.q-body strong { color: var(--text-primary); font-weight: 600; }

.inline-case {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: 4px;
  margin: 24px 0 40px 56px;
}
.inline-case .ic-logo {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}
.inline-case .ic-text { color: var(--text-primary); font-size: 14px; line-height: 1.5; }
.inline-case .ic-metric {
  font-family: "JetBrains Mono", monospace;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  text-align: right;
}

.art-cta {
  background: linear-gradient(90deg, #11161e 0%, var(--bg-card) 100%);
  border: 1px solid rgba(230,57,70,0.25);
  border-radius: 6px;
  padding: 32px 36px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  margin-top: 48px;
}
.art-cta .cta-text h2 {
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.art-cta .cta-text p { color: var(--text-secondary); font-size: 14px; margin: 0; }
.art-cta .cta-btns { display: flex; gap: 12px; flex-wrap: wrap; }

@media (max-width: 700px) {
  .art-wrap { padding: 48px 24px; }
  .art-title { font-size: 28px; }
  .scheme-stages { grid-template-columns: 1fr; }
  .stage-arrow { transform: rotate(90deg); padding: 8px 0; }
  .q-body, .inline-case { padding-left: 0; margin-left: 0; }
  .art-cta { grid-template-columns: 1fr; }}

/* ===========================================
   LIGHT THEME OVERRIDES — redesigned sections
   Выравнивает тёмные градиенты и фоны под светлую тему.
   =========================================== */

/* Hero — субтильный светлый градиент вместо чёрного */
[data-theme="light"] .hero {
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-card-2, #f1f1f5) 100%);
}
[data-theme="light"] .hero::before { color: rgba(230,57,70,0.06); }
[data-theme="light"] .reassure-wrap::before { color: rgba(230,57,70,0.08); }

/* Flagship-карточка — светлый градиент */
[data-theme="light"] .service-card.flagship {
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-card-2, #f1f1f5) 100%);
}

/* TL;DR и CTA-блоки в статьях — нежно-красный градиент вместо тёмного */
[data-theme="light"] .tldr {
  background: linear-gradient(180deg, #fff6f7 0%, var(--bg-card) 100%);
}
[data-theme="light"] .tldr li { color: var(--text-primary); }
[data-theme="light"] .art-cta {
  background: linear-gradient(90deg, #fff6f7 0%, var(--bg-card) 100%);
}

/* SVG-иллюстрации Было/Стало — дать тёмный контейнер, иначе серые стойки не видны */
[data-theme="light"] .compare-visual {
  background: #0f1419;
  border-radius: 6px;
  margin: 8px;
  min-height: 0;
}

/* Заголовки колонок сравнения — мягкая подсветка под светлую тему */
[data-theme="light"] .compare-header.bad { background: rgba(107,114,128,0.06); }
[data-theme="light"] .compare-header.good { background: rgba(230,57,70,0.06); }

/* Bar chart — светлая дорожка вместо чёрной */
[data-theme="light"] .bar-track { background: #e4e4eb; }
[data-theme="light"] .bar-fill.bad { background: #9ca3af; }

/* Нижняя полоса-акцент в секции ПРОСТО */
[data-theme="light"] .reassure-bottom {
  background: rgba(230,57,70,0.06);
  border-color: rgba(230,57,70,0.2);
}

/* Логотипы в trust bar — чуть темнее для читаемости */
[data-theme="light"] .trust-logo { opacity: 0.65; color: var(--text-secondary); }
[data-theme="light"] .trust-logo:hover { opacity: 1; color: var(--text-primary); }

/* Scheme-stages — убедиться, что иконки видны */
[data-theme="light"] .stage-box { background: var(--bg-card); }

/* Contact side panel — светлый фон правильно */
[data-theme="light"] .contact-side { box-shadow: var(--shadow-sm); }