/* ============ Побег VPN — Landing ============ */

:root {
  /* Light theme */
  --bg: #F5F7EC;
  --surface: #E3EBCE;
  --surface-2: #EEF2DD;
  --text: #1C3B1A;
  --text-muted: #62755E;
  --border: rgba(28, 59, 26, 0.10);
  --border-strong: rgba(28, 59, 26, 0.18);
  --shadow-sm: 0 1px 2px rgba(28, 59, 26, 0.06), 0 2px 6px rgba(28, 59, 26, 0.04);
  --shadow-md: 0 4px 12px rgba(28, 59, 26, 0.08), 0 12px 32px rgba(28, 59, 26, 0.06);
  --shadow-lg: 0 16px 48px rgba(28, 59, 26, 0.14);

  /* Accents (constant across themes) */
  --accent: #8B5CF6;
  --accent-2: #A78BFA;
  --accent-soft: rgba(139, 92, 246, 0.12);
  --leaf: #2F8F3E;
  --leaf-deep: #1F6B2C;
  --success: #5DBE6E;
  --warning: #DE911D;
  --danger: #D64545;

  /* Sizing */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-pill: 999px;

  --maxw: 1200px;
  --gap-sm: 12px;
  --gap-md: 20px;
  --gap-lg: 32px;

  --density: 1;

  /* единый ритм отступов между секциями */
  --section-pad-y: clamp(48px, 6vw, 88px);
}

[data-theme="dark"] {
  --bg: #0A1210;
  --surface: #12211D;
  --surface-2: #16271F;
  --text: #E8F0ED;
  --text-muted: #A1B3AD;
  --border: rgba(232, 240, 237, 0.08);
  --border-strong: rgba(232, 240, 237, 0.16);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4), 0 2px 6px rgba(0,0,0,0.25);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 24px 60px rgba(0,0,0,0.5);
  --accent-soft: rgba(139, 92, 246, 0.18);
  --leaf: #5DBE6E;
  --leaf-deep: #3B9A4D;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { overflow-x: clip; }

body {
  font-family: 'Manrope', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .35s ease, color .35s ease;
  overflow-x: clip;
  max-width: 100vw;
}

h1, h2, h3, h4 {
  font-family: 'Unbounded', 'Manrope', sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(36px, 5.5vw, 68px); font-weight: 700; }
h2 { font-size: clamp(28px, 3.6vw, 44px); }
h3 { font-size: clamp(20px, 1.8vw, 24px); }

p { margin: 0; text-wrap: pretty; }

a { color: inherit; text-decoration: none; }

button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

img { max-width: 100%; display: block; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

section {
  padding: calc(var(--section-pad-y) * var(--density)) 0;
  position: relative;
}

/* Особый ритм: hero — без верхнего паддинга, infra — компактнее */
.hero { padding: 32px 0 calc(var(--section-pad-y) * var(--density) * 0.6); }
.infra { padding: calc(var(--section-pad-y) * var(--density) * 0.55) 0; }

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.section-tag .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--leaf);
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--leaf) 22%, transparent);
}

.eyebrow {
  font-family: 'Manrope', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.muted { color: var(--text-muted); }

/* Подзаголовки секций (eyebrow → h2 → описание) — единый размер по эталону блока «Задачи» */
#tasks > .container > div > p.muted,
#servers > .container > div > p.muted,
#platforms .platforms-head p.muted {
  font-size: 17px;
  margin-top: 14px;
  max-width: 60ch;
}

/* ============ Header ============ */
.header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklch, var(--bg) 78%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; gap: 28px;
  height: 72px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0;
}
.brand-logo {
  width: 40px; height: 40px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  position: relative;
}
.brand-logo img { width: 100%; height: 100%; object-fit: cover; }
.brand-name {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.brand-name .accent { color: var(--leaf); }

.nav {
  display: flex; align-items: center; gap: 4px;
  flex: 1;
}
.nav a {
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color .2s, background .2s;
}
.nav a:hover { color: var(--text); background: var(--surface); }

.header-actions {
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0;
}

/* Header CTA: разный текст для десктопа и мобайла.
   На десктопе — «Регистрация», на мобиле — «Войти». */
.header-cta .cta-mobile { display: none; }
.header-cta .cta-desktop { display: inline; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 14px;
  transition: transform .12s ease, background .2s, color .2s, box-shadow .2s;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-ghost { color: var(--text); border-color: var(--border-strong); background: transparent; }
.btn-ghost:hover { background: var(--surface); }
.btn-soft { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-soft:hover { background: var(--surface-2); }
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 6px 20px -6px rgba(139, 92, 246, 0.55);
}
.btn-primary:hover { background: #7d4ef0; }

/* Зелёная (для Стандартный, Максимальный, Суточный) */
.btn-success {
  background: #5DBE6E; color: #fff;
  box-shadow: 0 6px 20px -6px rgba(93, 190, 110, 0.55);
}
.btn-success:hover { background: #4FAC60; }

/* Фиолетовая акцентная (для Продвинутого) */
.btn-accent {
  background: #8B5CF6; color: #fff;
  box-shadow: 0 6px 20px -6px rgba(139, 92, 246, 0.55);
}
.btn-accent:hover { background: #7d4ef0; }

.btn-lg { padding: 16px 28px; font-size: 16px; border-radius: var(--r-pill); }
.btn-xl { padding: 20px 36px; font-size: 18px; border-radius: var(--r-pill); }

.theme-toggle {
  width: 40px; height: 40px;
  display: inline-grid; place-items: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: background .2s, transform .3s;
}
.theme-toggle:hover { background: var(--surface-2); }
.theme-toggle svg { width: 18px; height: 18px; }

/* ============ Hero ============ */
.hero { position: relative; overflow: hidden; }
.hero-grid {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  isolation: isolate;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.hero-image-wrap {
  position: relative;
  aspect-ratio: 16 / 8.6;
  width: 100%;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.05);
}
.hero-bg.dim { opacity: 0; transition: opacity .4s; }
[data-theme="dark"] .hero-bg.dim { opacity: 0.5; }
[data-theme="dark"] .hero-bg.bright { opacity: 0.85; }

.hero-image-wrap::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, color-mix(in oklch, var(--surface) 55%, transparent) 100%);
  pointer-events: none;
}

.hero-online {
  position: absolute;
  top: 22px; left: 22px;
  z-index: 3;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 10px;
  background: rgba(255,255,255,0.92);
  color: #1C3B1A;
  border-radius: var(--r-pill);
  font-size: 13px; font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  backdrop-filter: blur(8px);
}
.hero-online .pulse {
  width: 10px; height: 10px; border-radius: 50%; background: var(--success);
  position: relative;
}
.hero-online .pulse::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid var(--success);
  animation: pulse-ring 1.8s ease-out infinite;
}
.hero-online.is-offline { background: rgba(255, 240, 240, 0.95); color: #8b1f1f; }
.hero-online.is-offline .pulse { background: var(--danger); }
.hero-online.is-offline .pulse::after { border-color: var(--danger); }

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

.hero-wordmark {
  position: absolute;
  left: 50%; top: 38%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: clamp(220px, 32%, 420px);
  filter: drop-shadow(0 12px 30px rgba(0,0,0,0.35));
  animation: float-mark 6s ease-in-out infinite, fade-in 1s .15s ease both;
}
@keyframes float-mark {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  50%      { transform: translate(-50%, -50%) translateY(-10px); }
}
@keyframes fade-in {
  from { opacity: 0; transform: translate(-50%, -45%); }
  to   { opacity: 1; }
}

/* CTA-плашка снизу: glassmorphism, плавно перетекает в иллюстрацию */
.hero-cta-block {
  padding: 28px 36px 32px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  position: relative;
  z-index: 4;

  background: color-mix(in oklch, var(--surface) 62%, transparent);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-top: 1px solid color-mix(in oklch, var(--text) 8%, transparent);
}
[data-theme="dark"] .hero-cta-block {
  background: color-mix(in oklch, #0e1a17 70%, transparent);
  border-top-color: rgba(255,255,255,0.06);
}

.hero-tagline {
  font-family: 'Unbounded', sans-serif;
  /* Крупнее, чтобы не теряться на фоне иллюстрации */
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  max-width: 22ch;
  color: var(--text);
}
.hero-tagline em { color: var(--leaf); font-style: normal; }
.hero-tagline em.nowrap-block { display: inline-block; }

/* Стрелка-приглашение под hero-блоком: размер совпадает со scroll-top (44px) */
.hero-scroll-row {
  display: flex;
  justify-content: center;
  margin-top: 22px;
  /* поднята на 44px вверх — лежит ближе к hero-блоку */
  transform: translateY(-44px);
  margin-bottom: -44px;
}
.scroll-down-below {
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .25s ease;
  animation: bob 3s ease-in-out infinite;
}
.scroll-down-below img {
  width: 18px; height: 18px;
  opacity: 0.65;
  transition: opacity .25s ease;
}
[data-theme="dark"] .scroll-down-below img { filter: brightness(0) invert(1); }
.scroll-down-below:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}
.scroll-down-below:hover img { opacity: 1; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(3px); }
}

/* отключаем системный smooth — всё через JS easeOutCubic */
html { scroll-behavior: auto; }

/* Floating particles (светлячки) — мерцают и дрейфуют */
.particles {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
}
.particle {
  position: absolute;
  width: 6px; height: 6px; border-radius: 50%;
  background: radial-gradient(circle, #FFE89A 0%, rgba(255,232,154,0) 70%);
  animation:
    drift var(--dur, 9s) ease-in-out var(--delay, 0s) infinite,
    twinkle calc(var(--dur, 9s) * 0.45) ease-in-out var(--delay, 0s) infinite;
  opacity: 0.85;
}
@keyframes drift {
  0%, 100% { transform: translate(0,0); }
  50%      { transform: translate(var(--dx, 12px), var(--dy, -16px)); }
}
@keyframes twinkle {
  0%, 100% { opacity: 0.25; filter: blur(0.4px); }
  40%      { opacity: 1;    filter: blur(0); }
  60%      { opacity: 0.65; filter: blur(0.4px); }
}

/* ============ Pitch / Intro ============ */
.pitch {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  align-items: center;
}
.pitch-text h2 strong { color: var(--leaf-deep); font-weight: 600; }
[data-theme="dark"] .pitch-text h2 strong { color: var(--leaf); }

.pitch-text p {
  font-size: 18px;
  color: var(--text-muted);
  margin-top: 20px;
  max-width: 50ch;
}
.pitch-image { display: grid; place-items: center; }
.polaroid {
  width: min(420px, 100%);
  transform: rotate(-3deg);
  transition: transform .5s ease;
  filter: drop-shadow(0 30px 50px rgba(28,59,26,0.18));
}
.polaroid:hover { transform: rotate(-1deg) translateY(-4px); }
[data-theme="dark"] .polaroid { filter: drop-shadow(0 30px 50px rgba(0,0,0,0.55)); }

/* ============ Infrastructure strip ============ */
.infra-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 36px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  position: relative;
  overflow: hidden;
}
/* Все три блока выровнены строго по центру */
.infra-centered .infra-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.infra-item .num {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(40px, 4.4vw, 56px);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  display: flex; align-items: baseline; gap: 6px;
  justify-content: center;
}
.infra-item .num .unit {
  font-size: 0.5em; font-weight: 600; color: var(--text-muted);
}
.infra-item .label {
  color: var(--text-muted);
  font-size: 15px;
  margin-top: 8px;
  max-width: 32ch;
  line-height: 1.5;
}
.infra-divider {
  position: absolute; top: 28px; bottom: 28px; width: 1px;
  background: var(--border-strong);
}

/* ============ Tasks (advantages) ============ */
.tasks-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 36px;
}
.task-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px;
  transition: transform .25s, border-color .25s, box-shadow .25s;
  position: relative;
  overflow: hidden;
}
.task-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.task-icon {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: color-mix(in oklch, var(--leaf) 18%, var(--surface-2));
  color: var(--leaf-deep);
  margin-bottom: 16px;
}
[data-theme="dark"] .task-icon { color: var(--leaf); }
.task-card h3 { margin-bottom: 6px; font-size: 17px; font-family: 'Manrope'; font-weight: 700; }
.task-card p { color: var(--text-muted); font-size: 14px; }

/* Брендовый лист (leaf.svg) — перекрашен в фирменный зелёный через CSS-фильтр.
   Фильтр-матрица для #1F6B2C (--leaf-deep): инверсия + sepia + поворот тона. */
.task-icon .brand-leaf {
  width: 24px;
  height: 24px;
  display: block;
  /* Зелёный leaf-deep #1F6B2C */
  filter: invert(33%) sepia(70%) saturate(550%) hue-rotate(85deg) brightness(85%) contrast(95%);
}
[data-theme="dark"] .task-icon .brand-leaf {
  /* Светлее — leaf #5DBE6E в тёмной теме */
  filter: invert(70%) sepia(45%) saturate(420%) hue-rotate(85deg) brightness(95%) contrast(85%);
}

/* ============ Tariffs — компактно, fits 1080p ============ */
#tariffs {
  /* Сжато по вертикали, чтобы влезала в FullHD-вьюпорт */
  padding: clamp(24px, 3vw, 40px) 0 clamp(28px, 3vw, 44px);
}

/* Шапка: заголовок сверху */
.tariffs-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}
/* Под шапкой — ряд с табами слева */
.tariffs-tabs-row {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 22px;
}

.period-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(96px, 1fr));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 4px;
  gap: 2px;
}
.period-tabs button {
  padding: 8px 12px;
  border-radius: var(--r-pill);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color .2s, background .2s;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}
.period-tabs button.active {
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.period-tabs button .save-badge {
  font-size: 11px;
  color: var(--leaf);
  background: color-mix(in oklch, var(--leaf) 15%, transparent);
  padding: 2px 6px;
  border-radius: 999px;
}

.tariffs-main {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

/* Mini row — Trial + Daily, отделены отступом */
.tariffs-mini {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
}

/* Базовая карточка тарифа */
.plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform .25s, border-color .25s, box-shadow .25s;
  overflow: hidden;
}
.plan:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.plan.popular {
  border: 1.5px solid var(--accent);
  background: linear-gradient(180deg, color-mix(in oklch, var(--accent) 8%, var(--surface)) 0%, var(--surface) 50%);
}
.plan.trial {
  background: linear-gradient(135deg, color-mix(in oklch, var(--leaf) 14%, var(--surface)) 0%, var(--surface) 70%);
  border-color: color-mix(in oklch, var(--leaf) 30%, var(--border-strong));
}
.plan-badge {
  position: absolute;
  top: 14px; right: 14px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.plan-badge.free { background: var(--leaf); color: #fff; }
.plan-badge.pop { background: var(--accent); color: #fff; }

.plan-name {
  font-family: 'Unbounded', sans-serif;
  font-size: 16px; font-weight: 600;
  letter-spacing: -0.01em;
}
.plan-tagline {
  color: var(--text-muted);
  font-size: 12.5px;
  margin-top: 4px;
  min-height: 32px;
}
.plan-price {
  margin-top: 10px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.plan-price .amount {
  font-family: 'Unbounded', sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  display: inline-block;
  /* Анимация при пересоздании span (key меняется при смене периода) */
  animation: price-pop .35s cubic-bezier(.34, 1.56, .64, 1);
}
.plan-price .amount-num {
  display: inline-block;
}
@keyframes price-pop {
  0%   { opacity: 0; transform: translateY(8px) scale(0.92); }
  60%  { opacity: 1; transform: translateY(-1px) scale(1.04); }
  100% { opacity: 1; transform: none; }
}
.plan-price .per { color: var(--text-muted); font-size: 13px; }
.plan-savings {
  font-size: 11.5px; color: var(--leaf-deep); margin-top: 4px;
  font-weight: 600;
  min-height: 16px;
}
[data-theme="dark"] .plan-savings { color: var(--leaf); }

.plan-features {
  list-style: none; padding: 0;
  margin: 16px 0 40px;
  display: flex; flex-direction: column; gap: 8px;
}
.plan-features li {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 13px; color: var(--text);
}
.plan-features svg { flex-shrink: 0; margin-top: 2px; color: var(--leaf); width: 14px; height: 14px; }
.plan .btn { width: 100%; justify-content: center; padding: 10px 14px; font-size: 13.5px; margin-top: auto; }

/* Способы оплаты под тарифами */
.payments-row {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
}
.payments-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}
.payments-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.payments-strip {
  /* Картинка-полоса: SBP+MIR+VISA+MC. Адаптивно по высоте: на десктопе 36px, ниже — меньше */
  height: clamp(28px, 3.4vw, 38px);
  width: auto;
  max-width: 100%;
  display: block;
  object-fit: contain;
}
/* Theme switching: показываем нужную, прячем вторую */
.payments-strip.dark-only { display: none; }
[data-theme="dark"] .payments-strip.light-only { display: none; }
[data-theme="dark"] .payments-strip.dark-only { display: block; }

/* Mini-плашки */
.plan-mini {
  padding: 22px 24px !important;
  min-height: 132px;
  display: grid !important;
  grid-template-columns: 1.4fr 1fr auto;
  align-items: center;
  gap: 22px;
}
.plan-mini .plan-name { font-size: 18px; }
.plan-mini .plan-tagline { min-height: 0; margin-top: 4px; font-size: 13px; }
.plan-mini .plan-badge { top: 14px; right: 16px; font-size: 10.5px; padding: 3px 9px; }
.plan-mini .mini-mid {
  display: flex; flex-direction: column; gap: 6px;
}
.plan-mini .mini-feature {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-muted);
}
.plan-mini .mini-feature svg { width: 13px; height: 13px; color: var(--leaf); }
.plan-mini .mini-right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
}
.plan-mini .plan-price { margin: 0; }
.plan-mini .plan-price .amount { font-size: 26px; }
/* «Бесплатно» — точно такой же шрифт, что у заголовка тарифа «Триал»
   (.plan-mini .plan-name): Unbounded 18px / 600, letter-spacing -0.01em */
.plan-mini .plan-price .amount-free {
  font-family: 'Unbounded', sans-serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.12;
  color: var(--text);
}
.plan-mini .plan-price .per { font-size: 12px; }
.plan-mini .btn { padding: 10px 20px; font-size: 13.5px; width: auto; }

/* В Триале — «Бесплатно» и кнопка центрируются по горизонтали относительно
   друг друга, потому что mini-right у всех карточек = column align-items: end.
   В Триале хочется центр: */
.plan-mini.trial .mini-right {
  align-items: center;
}

/* ============ Servers ============ */
.servers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 32px;
}
.server-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color .2s, transform .2s;
  position: relative;
}
.server-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.server-flag {
  width: 44px; height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border-strong);
  /* «Выпуклые» круглые кнопки: внутренние блики и тени для объёма */
  box-shadow:
    inset 0 1.5px 2px rgba(255,255,255,0.65),
    inset 0 -2px 3px rgba(0,0,0,0.18),
    0 4px 10px -3px rgba(0,0,0,0.18),
    0 1px 2px rgba(0,0,0,0.08);
  transition: transform .25s, box-shadow .25s;
}
.server-card:hover .server-flag {
  transform: scale(1.05);
  box-shadow:
    inset 0 1.5px 2px rgba(255,255,255,0.65),
    inset 0 -2px 3px rgba(0,0,0,0.18),
    0 6px 14px -3px rgba(0,0,0,0.22),
    0 2px 4px rgba(0,0,0,0.1);
}
[data-theme="dark"] .server-flag {
  box-shadow:
    inset 0 1.5px 2px rgba(255,255,255,0.18),
    inset 0 -2px 3px rgba(0,0,0,0.5),
    0 4px 10px -3px rgba(0,0,0,0.4);
}
.server-flag svg { width: 100%; height: 100%; display: block; }
.server-info { flex: 1; min-width: 0; }
.server-name { font-weight: 600; font-size: 15px; }
.server-city {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.server-online-tag {
  position: absolute;
  top: 10px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px 3px 7px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--leaf-deep);
  background: color-mix(in oklch, var(--leaf) 14%, transparent);
  border: 1px solid color-mix(in oklch, var(--leaf) 30%, transparent);
  border-radius: var(--r-pill);
  line-height: 1;
}
[data-theme="dark"] .server-online-tag { color: var(--leaf); }
.server-online-tag .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--success);
  position: relative;
}
.server-online-tag .dot::after {
  content: ''; position: absolute; inset: -3px; border-radius: 50%;
  border: 1.5px solid var(--success);
  animation: pulse-ring 2s ease-out infinite;
}
.server-card.is-offline .server-online-tag {
  color: #8b1f1f;
  background: color-mix(in oklch, var(--danger) 14%, transparent);
  border-color: color-mix(in oklch, var(--danger) 35%, transparent);
}
[data-theme="dark"] .server-card.is-offline .server-online-tag { color: #ff8a8a; }
.server-card.is-offline .server-online-tag .dot { background: var(--danger); }
.server-card.is-offline .server-online-tag .dot::after { border-color: var(--danger); }

/* Coming Soon — восьмая карточка. Тусклая, чтобы не отвлекала от рабочих локаций. */
.server-card.server-soon {
  background: color-mix(in oklch, #8B5CF6 22%, var(--surface));
  border-color: color-mix(in oklch, #8B5CF6 30%, var(--border));
  color: var(--text-muted);
  opacity: 0.75;
  background-image: linear-gradient(
    115deg,
    color-mix(in oklch, #8B5CF6 22%, var(--surface)) 0%,
    color-mix(in oklch, #A78BFA 28%, var(--surface)) 50%,
    color-mix(in oklch, #8B5CF6 22%, var(--surface)) 100%
  );
  background-size: 220% 100%;
  animation: soon-shimmer 8s ease-in-out infinite;
  cursor: help;
  outline: none;
  transition: opacity .25s ease, border-color .25s ease;
}
.server-card.server-soon:hover {
  opacity: 1;
  background-position: 100% 0;
  border-color: color-mix(in oklch, #8B5CF6 50%, transparent);
}
@keyframes soon-shimmer {
  0%, 100% { background-position: 0% 0; }
  50%      { background-position: 100% 0; }
}
[data-theme="dark"] .server-card.server-soon {
  background-image: linear-gradient(
    115deg,
    color-mix(in oklch, #8B5CF6 28%, var(--surface)) 0%,
    color-mix(in oklch, #A78BFA 32%, var(--surface)) 50%,
    color-mix(in oklch, #8B5CF6 28%, var(--surface)) 100%
  );
  color: color-mix(in oklch, var(--text) 65%, transparent);
}

.server-card.server-soon .server-flag.soon-flag {
  background: color-mix(in oklch, var(--text) 8%, transparent);
  border: 1px solid color-mix(in oklch, var(--text) 12%, transparent);
  display: grid; place-items: center;
  color: var(--text-muted);
  box-shadow: none;
}
.soon-mark {
  font-family: 'Unbounded', sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  color: inherit;
  animation: soon-blink 3.6s ease-in-out infinite;
}
@keyframes soon-blink {
  0%, 92%, 100% { opacity: 1; transform: scale(1); }
  94%           { opacity: 0.25; transform: scale(0.94); }
  96%           { opacity: 1;    transform: scale(1.05); }
}

.server-card.server-soon .server-name {
  color: var(--text-muted);
  letter-spacing: 0.04em;
  font-weight: 600;
}
.server-card.server-soon .server-city { color: color-mix(in oklch, var(--text-muted) 75%, transparent); }
/* Бейдж «Скоро» — приглушённый фиолетовый */
.server-online-tag.soon-tag {
  background: color-mix(in oklch, #8B5CF6 20%, transparent);
  border-color: color-mix(in oklch, #8B5CF6 35%, transparent);
  color: color-mix(in oklch, #8B5CF6 80%, var(--text-muted));
  padding: 3px 9px;
  font-weight: 700;
}
[data-theme="dark"] .server-online-tag.soon-tag {
  color: color-mix(in oklch, #A78BFA 90%, #fff);
}

/* Hover-сообщение «Какую страну добавить следующей?» */
.server-soon-hover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  text-align: center;
  font-weight: 600;
  font-size: 13.5px;
  line-height: 1.35;
  color: #fff;
  background: color-mix(in oklch, #5B2FB8 88%, transparent);
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
  z-index: 2;
}
@media (hover: hover) and (pointer: fine) {
  .server-card.server-soon:hover .server-soon-hover {
    opacity: 1;
  }
}

/* ============ Platforms — аккуратная сетка карточек ============ */
.platforms-head { max-width: 720px; margin-bottom: 28px; }
.app-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px 3px 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-weight: 600; color: var(--text);
  vertical-align: middle;
  white-space: nowrap;
}
.app-chip img {
  width: 20px; height: 20px; border-radius: 5px; object-fit: cover;
}

.platforms-grid {
  display: grid;
  /* 7 платформ в одну линию — вертикальные карточки */
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}
.platform-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px 14px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  transition: transform .2s, border-color .2s, box-shadow .2s, background .2s;
  color: inherit;
  min-height: 178px;
  position: relative;
  overflow: hidden;
}
.platform-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 12px 28px -10px rgba(139, 92, 246, 0.3);
  background: color-mix(in oklch, var(--accent) 5%, var(--surface));
}
.platform-icon {
  width: 56px; height: 56px;
  flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: color-mix(in oklch, var(--accent) 10%, transparent);
  transition: background .2s, transform .25s;
}
.platform-icon img {
  width: 30px;
  height: 30px;
  display: block;
  filter: brightness(0) saturate(100%);
  opacity: 0.85;
  transition: filter .2s, opacity .2s;
}
[data-theme="dark"] .platform-icon img {
  filter: brightness(0) saturate(100%) invert(1);
  opacity: 0.92;
}
.platform-card:hover .platform-icon {
  background: color-mix(in oklch, var(--accent) 18%, transparent);
}
.platform-card:hover .platform-icon img {
  filter: invert(43%) sepia(72%) saturate(2710%) hue-rotate(241deg) brightness(99%) contrast(96%);
  opacity: 1;
}
.platform-meta {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
}
.platform-name { font-weight: 700; font-size: 14px; line-height: 1.2; }
.platform-store { font-size: 11.5px; color: var(--text-muted); }

/* «Скачать» появляется снизу карточки на hover (только на устройствах с настоящим hover) */
.platform-download {
  position: absolute;
  left: 0; right: 0;
  bottom: 0;
  padding: 9px 14px;
  background: color-mix(in oklch, var(--accent) 92%, transparent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transform: translateY(100%);
  transition: transform .25s ease;
  pointer-events: none;
}
.platform-download img {
  width: 16px; height: 16px;
  filter: brightness(0) invert(1);
}
@media (hover: hover) and (pointer: fine) {
  .platform-card:hover .platform-download {
    transform: translateY(0);
  }
}

.ios-warn {
  margin-top: 24px;
  background: color-mix(in oklch, #4A6CF7 8%, var(--surface));
  border: 1px solid color-mix(in oklch, #4A6CF7 25%, var(--border));
  border-radius: var(--r-lg);
  padding: 18px 22px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.ios-warn-icon { flex-shrink: 0; color: #4A6CF7; margin-top: 2px; }
.ios-warn-icon svg { width: 22px; height: 22px; }
.ios-warn-title { font-weight: 700; margin-bottom: 4px; }
.ios-warn p { color: var(--text-muted); font-size: 14px; }

/* ============ FAQ ============ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 28px;
  width: 100%;
  max-width: 100%;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color .2s;
  width: 100%;
}
.faq-item[open] { border-color: var(--border-strong); }
.faq-item summary {
  list-style: none;
  padding: 20px 24px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  font-weight: 600;
  font-size: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .chev { flex-shrink: 0; transition: transform .3s ease; }
.faq-item[open] .chev { transform: rotate(180deg); }

/* Плавное раскрытие через grid-template-rows: 0fr → 1fr.
   Это единственный способ анимировать высоту «auto» без JS.
   Браузеры схлопывают rows: 0fr → высота 0; rows: 1fr → высота auto (контент). */
.faq-answer-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .35s cubic-bezier(.22, .61, .36, 1);
}
.faq-item[open] .faq-answer-wrap {
  grid-template-rows: 1fr;
}
.faq-answer {
  overflow: hidden;
  min-height: 0;
}
.faq-answer-wrap > .faq-answer {
  padding: 0 24px 22px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

/* CTA-блок «Остались вопросы» — равной высоте/ширине с закрытым faq-item */
.faq-cta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  /* Тот же padding, что и у .faq-item summary */
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  /* Минимальная высота совпадает с закрытым faq-item-плашкой */
  min-height: 64px;
  transition: border-color .2s;
}
.faq-cta:hover { border-color: var(--border-strong); }
.faq-cta-text {
  font-weight: 600;
  font-size: 16px;
  flex: 1;
  min-width: 0;
}
.faq-cta .btn {
  flex-shrink: 0;
}

/* ============ Promo Banner («Начать сегодня») ============
 * Строго flex без position/transform/отрицательных margin для картинки. */
.promo-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  position: relative;
  overflow: hidden;
}
.promo-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(700px 280px at 100% 100%, color-mix(in oklch, var(--accent) 14%, transparent) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.promo-content {
  position: relative;
  z-index: 1;
  width: 60%;
  min-width: 0;
}
.promo-content h2 { font-size: clamp(28px, 3.2vw, 40px); }
.promo-content .checks {
  list-style: none; padding: 0; margin: 22px 0 0;
  display: grid; gap: 10px;
}
.promo-content .checks li {
  display: flex; gap: 10px; align-items: center;
  font-size: 14px; color: var(--text-muted);
}
.promo-content .actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.promo-image-wrapper {
  position: relative;
  z-index: 1;
  width: 40%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  /* Никаких absolute/transform — обычная flex-колонка */
}
.promo-image-wrapper img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  /* Спокойная фоновая анимация: лёгкое всплывание и обратно — «дышит» */
  animation: mascot-float 6s ease-in-out infinite;
  transform-origin: center bottom;
}
@keyframes mascot-float {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50%      { transform: translateY(-10px) rotate(1.5deg); }
}
@media (prefers-reduced-motion: reduce) {
  .promo-image-wrapper img { animation: none; }
}

/* ============ Footer ============ */
.footer {
  padding: 56px 0 40px;
  border-top: 1px solid var(--border);
  margin-top: 60px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  align-items: start;
}
.footer h4 {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.footer .links { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.footer .links a {
  font-size: 14px; color: var(--text);
  transition: color .2s;
  line-height: 1.4;
}
.footer .links a:hover { color: var(--accent); }

/* Иконка после текста, на одной линии */
.footer .link-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.footer .link-with-icon svg {
  color: var(--accent);
  flex-shrink: 0;
  width: 14px; height: 14px;
  /* выровнено по центру строки за счёт inline-flex/align-items */
}

.footer .copyright {
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  font-size: 13px; color: var(--text-muted);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.footer .footer-brand p { color: var(--text-muted); font-size: 14px; margin-top: 12px; max-width: 36ch; }

/* ============ Doc Page (отдельные страницы документов) ============ */
.doc-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.doc-main {
  padding: clamp(28px, 5vw, 56px) 0 clamp(48px, 6vw, 80px);
  flex: 1;
}
.doc-article {
  max-width: 760px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: clamp(24px, 4vw, 48px);
}
.doc-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 18px;
  transition: color .2s;
}
.doc-back:hover { color: var(--accent); }
.doc-title {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
}
.doc-content {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--text);
}
.doc-content h4 {
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin: 22px 0 8px;
}
.doc-content p {
  color: var(--text-muted);
  margin-bottom: 4px;
}

/* Кнопка «Наверх» — плавающая в правом нижнем углу */
.scroll-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: 1px solid color-mix(in oklch, var(--accent) 80%, #fff);
  box-shadow: 0 12px 28px -8px rgba(139, 92, 246, 0.55);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease, background .2s ease;
}
.scroll-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.scroll-top:hover { background: #7d4ef0; }
.scroll-top img {
  width: 18px; height: 18px;
  /* перекрашиваем в белый и переворачиваем (down → up) */
  filter: brightness(0) invert(1);
  transform: rotate(180deg);
}

/* ============ Modal ============ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(8, 14, 12, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: grid; place-items: center;
  padding: 24px;
  animation: modal-fade .22s ease;
}
[data-theme="dark"] .modal-overlay { background: rgba(0,0,0,0.7); }
.modal-window {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  max-height: calc(100vh - 48px);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: modal-pop .28s cubic-bezier(.22,.61,.36,1);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-head h3 {
  font-family: 'Unbounded', sans-serif;
  font-size: 18px; font-weight: 600;
  letter-spacing: -0.01em;
}
.modal-close {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  transition: background .2s, transform .15s;
}
.modal-close:hover { background: var(--surface-2); }
.modal-close:active { transform: scale(0.95); }
.modal-body {
  padding: 22px 24px 28px;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
}
.modal-body h4 {
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  font-weight: 700;
  margin: 18px 0 6px;
  color: var(--text);
}
.modal-body p { color: var(--text-muted); }
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

/* ============ DocPage — отдельные страницы /doc/* ============ */
.doc-page {
  padding: 40px 0 80px;
  min-height: calc(100vh - 200px);
}
.doc-container {
  max-width: 820px;
}
.doc-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 14px 8px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: background .2s, color .2s, border-color .2s;
  margin-bottom: 28px;
}
.doc-back:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border-strong);
}
.doc-title {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0 0 24px;
}
.doc-body {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text);
}
.doc-body h4 {
  font-family: 'Manrope', sans-serif;
  font-size: 17px;
  font-weight: 700;
  margin: 28px 0 8px;
  color: var(--text);
}
.doc-body h4:first-of-type { margin-top: 14px; }
.doc-body p {
  color: var(--text-muted);
  margin: 0 0 8px;
}

/* ============ Decorative leaves ============ */
.leaf-decor {
  position: absolute;
  pointer-events: none;
  opacity: 0.7;
  z-index: 0;
}
[data-theme="dark"] .leaf-decor { opacity: 0.35; }
.leaf-decor svg { width: 100%; height: 100%; display: block; color: var(--leaf); }

.section-content { position: relative; z-index: 1; }

/* Decor toggle */
[data-decor="off"] .leaf-decor,
[data-decor="off"] .particles { display: none; }

/* ============ Responsive ============ */
@media (max-width: 1180px) {
  .platforms-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 980px) {
  .nav { display: none; }
  .pitch { grid-template-columns: 1fr; gap: 32px; }
  .infra-card { grid-template-columns: 1fr; gap: 22px; padding: 28px; }
  .infra-divider { display: none; }
  .tasks-grid { grid-template-columns: repeat(2, 1fr); }
  .tariffs-mini { grid-template-columns: 1fr; }
  .tariffs-main { grid-template-columns: 1fr; }
  .plan-mini { grid-template-columns: 1fr; gap: 14px; min-height: 0; padding: 18px 20px !important; }
  /* Цена и кнопка в одной строке, выровнены по центру друг друга */
  .plan-mini .mini-right { align-items: center; flex-direction: row; justify-content: space-between; width: 100%; }
  .plan-mini.trial .mini-right { align-items: center; flex-direction: row; justify-content: space-between; }
  .servers-grid { grid-template-columns: repeat(2, 1fr); }
  .platforms-grid { grid-template-columns: repeat(3, 1fr); }

  /* Promo banner: одна колонка, картинка снизу */
  .promo-banner {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    padding: 32px 28px;
    gap: 22px;
  }
  .promo-content { width: 100%; }
  .promo-image-wrapper { width: 100%; justify-content: center; }
  .promo-image-wrapper img { max-width: 220px; }

  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .hero-cta-block { grid-template-columns: 1fr; gap: 16px; padding: 22px 22px 28px; }
  .hero-tagline { max-width: 100%; }
}
@media (max-width: 600px) {
  :root { --section-pad-y: 48px; }
  .container { padding: 0 16px; }

  /* Header
     Прижимаем header-actions (тема + регистрация) вправо.
     На мобиле <nav> скрыт (display:none), поэтому brand перестаёт быть
     "разделителем" — добавляем margin-left: auto самим header-actions. */
  .header-inner { height: 64px; gap: 8px; }
  .header-actions { margin-left: auto; }
  .header-actions .btn-ghost { display: none; }
  .header-actions .btn-primary { padding: 8px 14px; font-size: 13px; }
  .header-cta .cta-desktop { display: none; }
  .header-cta .cta-mobile { display: inline; }
  .brand-name { font-size: 16px; }
  .brand-logo { width: 36px; height: 36px; }

  /* Hero */
  .hero { padding: 16px 0 32px; }
  .hero-cta-block { padding: 18px 18px 22px; }
  .hero-tagline { font-size: 24px; max-width: 18ch; }

  /* Кнопка «Попробовать бесплатно» — текст по центру.
     На мобиле hero-cta-block переходит в одну колонку, кнопка
     растягивается; центрируем и сам контент. */
  .hero-cta-block .btn-xl {
    padding: 14px 22px;
    font-size: 15px;
    width: 100%;
    justify-content: center;
    text-align: center;
  }
  .scroll-down-below { width: 40px; height: 40px; }
  .scroll-down-below img { width: 16px; height: 16px; }

  /* Плашка «Все сервисы Онлайн» — компактная, у самого низа картинки слева */
  .hero-online {
    top: auto;
    bottom: 10px;
    left: 10px;
    padding: 4px 9px 4px 7px;
    font-size: 10.5px;
    gap: 5px;
    border-radius: var(--r-pill);
  }
  .hero-online .pulse { width: 6px; height: 6px; }
  .hero-online .pulse::after { inset: -2px; border-width: 1.5px; }

  /* Wordmark — в 1.5 раза больше прежнего мобильного размера */
  .hero-wordmark {
    width: clamp(165px, 45%, 240px);
    top: 28%;
  }

  /* Tasks / Servers / Platforms — одна колонка */
  .tasks-grid { grid-template-columns: 1fr; }
  .servers-grid { grid-template-columns: 1fr; }
  .platforms-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .platform-card { min-height: 152px; padding: 18px 10px 14px; }
  .platform-icon { width: 48px; height: 48px; }
  .platform-icon img { width: 26px; height: 26px; }
  .platform-name { font-size: 13.5px; }
  .platform-store { font-size: 11px; }

  /* Tariffs — компактнее на мобайле */
  #tariffs h2 { font-size: clamp(24px, 7vw, 30px); }
  .period-tabs { grid-template-columns: repeat(3, minmax(80px, 1fr)); }
  .period-tabs button { padding: 8px 8px; font-size: 12.5px; }
  .period-tabs button .save-badge { font-size: 10px; padding: 1px 5px; }
  .plan { padding: 18px; }
  .plan-name { font-size: 17px; }
  .plan-price .amount { font-size: 30px; }
  .plan-features li { font-size: 14px; }
  .plan-mini { padding: 16px !important; }
  .plan-mini .plan-name { font-size: 16px; }
  .plan-mini .plan-price .amount { font-size: 22px; }
  .plan-mini .mini-feature { font-size: 12.5px; }
  .payments-row { padding: 10px 4px; gap: 8px; }
  .payments-label { text-align: center; }
  .payments-strip { height: 26px; }

  /* Servers card */
  .server-card { padding: 16px 16px; }
  .server-flag { width: 38px; height: 38px; }
  .server-online-tag { font-size: 10px; padding: 3px 7px; }

  /* Infra */
  .infra-card { padding: 22px; }
  .infra-item .num { font-size: clamp(34px, 9vw, 44px); }

  /* iOS warn */
  .ios-warn { padding: 14px 16px; gap: 12px; }
  .ios-warn p { font-size: 13.5px; }

  /* FAQ */
  .faq-item summary { padding: 16px 18px; font-size: 15px; }
  .faq-answer-wrap > .faq-answer { padding: 0 18px 16px; font-size: 14px; }
  .faq-cta {
    padding: 18px;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 12px;
  }
  .faq-cta .btn { justify-content: center; }

  /* Promo banner mobile */
  .promo-banner { padding: 26px 20px; }
  .promo-content h2 { font-size: clamp(24px, 7vw, 30px); }
  .promo-image-wrapper img { max-width: 180px; }
  .promo-content .actions .btn { width: 100%; justify-content: center; }

  /* Footer */
  .footer { padding: 36px 0 26px; margin-top: 32px; }
  .footer-inner { gap: 28px; }
  .copyright { justify-content: center; text-align: center; }

  /* Modal */
  .modal-head { padding: 16px 18px; }
  .modal-head h3 { font-size: 16px; }
  .modal-body { padding: 18px 18px 22px; font-size: 14.5px; }
  .modal-overlay { padding: 8px; }

  /* Scroll-top — учитываем safe-area у iOS, чтобы не было горизонтального скролла */
  .scroll-top {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    width: 40px; height: 40px;
  }
  .scroll-top img { width: 16px; height: 16px; }

  /* Pitch */
  .pitch { gap: 22px; }
  .polaroid { width: min(320px, 80%); }
}

/* iOS Safari fixes */
/* Снижение анимаций для пользователей с reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .scroll-top, .platform-download, .server-soon-hover {
    transition: opacity .15s ease !important;
  }
}
