/* ===== Тоннель VPN — лендинг ===== */

:root {
  --bg: #0E1311;
  --bg-alt: #121815;
  --surface: #151C19;
  --surface-accent: #1A2419;
  --terminal: #0A0E0C;
  --line: #26312C;
  --line-strong: #34413B;
  --line-soft: #1F2925;
  --text: #E6ECE8;
  --text-soft: #CFD8D3;
  --muted: #B5C0BA;
  --faint: #8E9A94;
  --accent: #C8F169;       /* альтернативы: #7FD6F2, #F2B35E */
  --accent-hover: #E2FFA3;
  --on-accent: #0E1311;

  --font-display: "Unbounded", "Arial Black", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --container: 1200px;
  --gutter: clamp(20px, 5vw, 120px);
  --section-y: clamp(56px, 8vw, 112px);
  --radius: clamp(18px, 1.6vw, 20px);
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

/* При переходе по якорю «съедаем» большой верхний отступ секции,
   чтобы заголовок вставал сразу под шапкой, а не на 100+ px ниже */
.section[id] { scroll-margin-top: calc(24px - var(--section-y)); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol { margin: 0; }
img, svg { max-width: 100%; }

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ===== Кнопки ===== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 16px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 17px;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn-sm { min-height: 44px; padding: 11px 20px; font-size: 16px; border-radius: 10px; }

.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }

.btn-ghost { color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { color: var(--text); border-color: var(--faint); }

.btn-dark { background: var(--bg); color: var(--text); white-space: nowrap; }
.btn-dark:hover { background: #1c2522; color: var(--text); }
.cta .btn-dark:focus-visible { outline-color: var(--bg); }

/* ===== Шапка ===== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(14, 19, 17, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}
.logo svg { color: var(--accent); }
.logo span { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -.02em; }
.logo:hover { color: var(--text); }

.nav { display: flex; align-items: center; gap: 36px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 16px; }
.nav a:hover { color: var(--text); }
.nav .nav-login { color: var(--text); }

.menu-toggle { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.menu-button { display: none; }

/* ===== Первый экран ===== */

.hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px;
  align-items: center;
  padding-block: clamp(48px, 4vw, 112px) clamp(56px, 8vw, 120px);
}

.hero-text { display: flex; flex-direction: column; gap: 32px; }

.kicker {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(38px, 5.2vw, 68px);
  line-height: 1.05;
  letter-spacing: -.03em;
}

.lead { font-size: clamp(17px, 1.5vw, 21px); color: var(--muted); max-width: 540px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; }

/* Переключатель протоколов */
.switcher {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(16px, 2vw, 28px);
}
.switcher > input { position: absolute; opacity: 0; pointer-events: none; }

.switcher-tabs {
  display: flex;
  gap: 6px;
  padding: 6px;
  background: var(--bg);
  border-radius: 12px;
  margin-bottom: 24px;
}
.switcher-tabs label {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 8px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  color: var(--muted);
  cursor: pointer;
  text-align: center;
  transition: background-color .15s, color .15s;
}
.switcher-tabs label:hover { color: var(--text); }

#p-awg:checked  ~ .switcher-tabs label[for="p-awg"],
#p-oc:checked   ~ .switcher-tabs label[for="p-oc"],
#p-ovpn:checked ~ .switcher-tabs label[for="p-ovpn"] {
  background: var(--accent);
  color: var(--on-accent);
}

#p-awg:focus-visible  ~ .switcher-tabs label[for="p-awg"],
#p-oc:focus-visible   ~ .switcher-tabs label[for="p-oc"],
#p-ovpn:focus-visible ~ .switcher-tabs label[for="p-ovpn"] {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.panel { display: none; }
#p-awg:checked  ~ .panel-awg,
#p-oc:checked   ~ .panel-oc,
#p-ovpn:checked ~ .panel-ovpn { display: block; }

.panel-title { font-family: var(--font-display); font-weight: 500; font-size: clamp(21px, 2vw, 26px); margin-bottom: 10px; }
.panel-desc { color: var(--muted); font-size: clamp(15px, 1.3vw, 17px); margin-bottom: 24px; }

.terminal {
  margin: 0 0 24px;
  padding: 20px 22px;
  background: var(--terminal);
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: clamp(13px, 1.1vw, 15px);
  line-height: 1.9;
  color: var(--text-soft);
  white-space: pre-wrap;
  overflow-x: auto;
}
.terminal span { color: var(--accent); }

.panel-best { font-size: 15px; color: var(--muted); }

/* ===== Секции ===== */

.section { padding-block: var(--section-y); }
.section-bordered { border-top: 1px solid var(--line-soft); }
.section-alt { background: var(--bg-alt); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 48px;
  margin-bottom: 56px;
}
.section-head h2,
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1.12;
  letter-spacing: -.02em;
}
.section-head h2 { max-width: 720px; }
.section-head p { color: var(--muted); font-size: 18px; max-width: 420px; }
.section-head-stack { flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 48px; }
.section-title { margin-bottom: 48px; }

/* Карточки протоколов */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: clamp(24px, 2.6vw, 36px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card-featured { background: var(--surface-accent); border-color: var(--accent); }
.card-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 28px; }
.card-tag { font-family: var(--font-mono); font-size: 14px; color: var(--faint); }
.card h3 { font-family: var(--font-display); font-weight: 500; font-size: clamp(24px, 2.2vw, 30px); }
.card p { color: var(--muted); font-size: clamp(15px, 1.2vw, 17px); line-height: 1.6; }

.badge {
  font-size: 13px;
  font-weight: 600;
  background: var(--accent);
  color: var(--on-accent);
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.pluses { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 16px; }
.pluses li { display: flex; gap: 10px; }
.pluses li::before { content: "+"; color: var(--accent); font-family: var(--font-mono); }

/* Таблица сравнения */
.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.compare { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 16px; }
.compare th, .compare td { padding: 22px 28px; text-align: left; vertical-align: top; }
.compare thead th {
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text);
}
.compare thead th.is-accent { color: var(--accent); }
.compare tbody tr { border-top: 1px solid var(--line); }
.compare tbody th { color: var(--faint); font-weight: 500; }

/* Шаги */
.steps {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.step {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 24px;
  border-top: 2px solid var(--line-strong);
}
.step.is-active { border-top-color: var(--accent); }
.step-num { font-family: var(--font-display); font-size: 40px; line-height: 1; color: var(--faint); }
.step.is-active .step-num { color: var(--accent); }
.step h3 { font-size: 22px; font-weight: 600; margin-bottom: 8px; }
.step p { color: var(--muted); }

/* Тарифы */
.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.plan {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: clamp(24px, 2.6vw, 36px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.plan-featured { background: var(--surface-accent); border-color: var(--accent); }
.plan-head { display: flex; justify-content: space-between; align-items: center; min-height: 30px; }
.plan-head h3 { font-size: 20px; font-weight: 600; }
.plan-price { font-family: var(--font-display); font-weight: 500; font-size: clamp(32px, 3vw, 40px); line-height: 1.1; }
.plan ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; color: var(--text-soft); font-size: 16px; }
.plan .btn { margin-top: auto; width: 100%; }

/* FAQ */
.faq {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 64px;
}
.faq .section-title { margin-bottom: 0; }
.faq-list { grid-column: span 2; border-bottom: 1px solid var(--line); }
.faq-list details { border-top: 1px solid var(--line); }
.faq-list summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 28px 0;
  font-size: clamp(17px, 1.5vw, 21px);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 22px;
  color: var(--accent);
  flex-shrink: 0;
}
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { color: var(--muted); padding-bottom: 28px; max-width: 68ch; }

/* CTA */
.cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 48px;
  margin-top: var(--section-y);
  padding: clamp(32px, 5vw, 72px);
  background: var(--accent);
  color: var(--on-accent);
  border-radius: clamp(22px, 2vw, 28px);
}
.cta h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 3.1vw, 44px);
  line-height: 1.12;
  letter-spacing: -.02em;
  max-width: 760px;
}

/* Подвал */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-block: 56px;
  font-size: 15px;
  color: var(--faint);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 32px; }
.site-footer a { color: var(--faint); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* ===== Планшет ===== */

@media (max-width: 1080px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .hero-text { max-width: 640px; }
  .cards, .plans { grid-template-columns: minmax(0, 1fr); max-width: 640px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .faq { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .faq-list { grid-column: auto; }
}

/* ===== Мобильный ===== */

@media (max-width: 820px) {
  :root { --header-h: 64px; }
  .header-inner { gap: 8px; }
  .logo span { font-size: 18px; }

  .menu-button {
    display: flex;
    align-items: center;
    justify-content: center;
    order: 3;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    color: var(--text);
    cursor: pointer;
  }
  .menu-toggle:focus-visible + .menu-button { outline: 2px solid var(--accent); outline-offset: 3px; }
  .header-cta { order: 2; }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line-soft);
  }
  .nav a { padding: 14px 0; font-size: 17px; border-bottom: 1px solid var(--line-soft); }
  .nav a:last-child { border-bottom: 0; }
  .menu-toggle:checked ~ .nav { display: flex; }

  .kicker { font-size: 12px; letter-spacing: .06em; }
  .hero-text { gap: 24px; }
  .hero-actions { flex-direction: column; gap: 12px; }
  .hero-actions .btn { width: 100%; }

  .switcher-tabs { gap: 4px; padding: 4px; }
  .switcher-tabs label { font-size: 13px; min-height: 44px; padding: 0 4px; }
  .terminal { padding: 14px 16px; }

  .section-head, .section-title { margin-bottom: 24px; }
  .section-head p { font-size: 16px; }

  /* Таблица превращается в карточки */
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; }
  .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .compare { font-size: 14px; }
  .compare tbody tr { padding: 18px 20px; background: var(--surface); border-top: 0; border-bottom: 1px solid var(--line); }
  .compare tbody tr:last-child { border-bottom: 0; }
  .compare tbody th { padding: 0 0 10px; font-size: 14px; font-weight: 600; }
  .compare td {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    padding: 4px 0;
    line-height: 1.45;
  }
  .compare td::before {
    content: attr(data-label);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-soft);
    padding-top: 2px;
  }
  .compare td:first-of-type::before { color: var(--accent); }

  .steps { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .step { flex-direction: row; gap: 16px; padding-top: 16px; }
  .step-num { font-size: 28px; width: 28px; flex-shrink: 0; }
  .step h3 { font-size: 18px; margin-bottom: 6px; }
  .step p { font-size: 15px; }

  .faq-list summary { padding: 20px 0; }
  .faq-list details p { padding-bottom: 20px; font-size: 15px; }

  .cta { flex-direction: column; align-items: stretch; gap: 24px; }
  .cta .btn { width: 100%; }

  .site-footer { flex-direction: column-reverse; align-items: flex-start; padding-block: 36px 44px; font-size: 14px; }
  .site-footer nav { gap: 20px; }
}

@media (max-width: 380px) {
  .header-cta { display: none; }
}
