:root {
  --bg: #0a0b0d;
  --bg-1: #101115;
  --bg-2: #16181d;
  --line: rgba(255,255,255,0.06);
  --line-strong: rgba(255,255,255,0.12);
  --text: #f4f5f7;
  --text-muted: #8b909b;
  --text-dim: #5a5f6a;
  --accent: #10b981;
  --accent-hover: #14c690;
  --accent-soft: rgba(16,185,129,0.10);
  --accent-line: rgba(16,185,129,0.28);
  --radius: 14px;
  --radius-sm: 10px;
  --container: 1140px;
  --section-pad: 72px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01","cv11";
  /* overflow-x: hidden removed: breaks sticky on iOS */
  overflow-x: clip;
}
html { overflow-x: clip; }

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

a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-hover); }

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
  margin: 0 0 14px;
}
h1 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); letter-spacing: -0.025em; }
h3 { font-size: 1.08rem; font-weight: 600; }
h4 { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.08em; }
.h1-sub {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 14px 0 0;
}
p { color: var(--text-muted); margin: 0 0 12px; }
.lede {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 620px;
  line-height: 1.6;
}
.subtitle {
  color: var(--text-muted);
  max-width: 580px;
  margin: 8px 0 0;
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(10,11,13,0.78);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}
.brand {
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--accent);
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 3px;
  background: var(--bg);
}
.main-nav { display: flex; gap: 28px; align-items: center; }
.main-nav a {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] { color: var(--text); }
.menu-toggle {
  display: none;
  background: none; border: 0; color: var(--text); cursor: pointer; padding: 6px;
}

/* Hero */
.hero {
  padding: 40px 0 28px;
  text-align: center;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 35% at 50% 0%, rgba(16,185,129,0.10), transparent 60%);
  z-index: -1;
}
.hero .container { max-width: 800px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 8px;
  margin-bottom: 18px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
}
.hero-badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(16,185,129,0.8);
}
.hero .lede {
  margin: 24px auto 0;
  max-width: 600px;
}
.hero-actions {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 36px;
}

/* Buttons — minimal monochrome accent */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.16s ease;
  white-space: nowrap;
  letter-spacing: -0.005em;
}
.btn-primary {
  background: var(--accent);
  color: #052e22;
  box-shadow: 0 1px 0 rgba(255,255,255,0.15) inset, 0 4px 14px -4px rgba(16,185,129,0.5);
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #042418;
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset, 0 6px 18px -4px rgba(16,185,129,0.65);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  border-color: var(--accent-line);
  color: var(--accent);
  background: var(--accent-soft);
}
.btn-arrow::after {
  content: "→";
  display: inline-block;
  margin-left: 2px;
  transition: transform 0.16s;
}
.btn-arrow:hover::after { transform: translateX(3px); }

/* Sections */
.section { padding: var(--section-pad) 0; }
.section-head {
  margin-bottom: 56px;
  max-width: 640px;
}
.section-head.center {
  margin-left: auto; margin-right: auto;
  text-align: center;
}
.section-head .eyebrow {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 12px;
  display: block;
}

/* Metrics row */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.metric {
  padding: 32px 24px;
  text-align: left;
  border-right: 1px solid var(--line);
}
.metric:last-child { border-right: 0; }
.metric .num {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text);
  line-height: 1;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.hero .metrics {
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
}
.metric .num small { font-weight: 600; font-size: 0.6em; color: var(--text-muted); margin-left: 4px; }
.metric .label {
  font-size: 0.85rem;
  color: var(--text-muted);
}
@media (max-width: 720px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric { border-right: 0; border-top: 1px solid var(--line); }
  .metric:nth-child(odd) { border-right: 1px solid var(--line); }
  .metric:nth-child(-n+2) { border-top: 0; }
}

/* Feature grid (3) */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.feature h3 { font-size: 1.1rem; margin-bottom: 8px; }
.feature p { color: var(--text-muted); font-size: 0.96rem; }
.feature .icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  display: inline-flex;
  align-items: center; justify-content: center;
  color: var(--accent);
  margin-bottom: 18px;
}
@media (max-width: 760px) { .features { grid-template-columns: 1fr; gap: 28px; } }

/* Server table */
.servers {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.server-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  background: var(--bg-1);
  padding: 18px 24px;
  align-items: center;
  font-size: 0.94rem;
}
.server-row.head {
  background: var(--bg-2);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 14px 24px;
}
.server-row .flag {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--text);
}
.server-row .flag span {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 30px; height: 22px;
  border-radius: 4px;
  background: var(--bg-2);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
}
.server-row .ping { color: var(--text); font-variant-numeric: tabular-nums; }
.server-row .speed { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.server-row .sla { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .server-row { grid-template-columns: 1fr 1fr; gap: 8px 16px; }
  .server-row.head { display: none; }
  .server-row .flag { grid-column: 1 / -1; }
}

/* Tariffs */
.tariffs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.tariff {
  padding: 32px 28px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
}
.tariff.featured {
  border-color: var(--accent-line);
  background:
    linear-gradient(180deg, rgba(16,185,129,0.06), transparent 50%),
    var(--bg-1);
  position: relative;
}
.tariff.featured::before {
  content: "Популярный";
  position: absolute;
  top: -10px; left: 24px;
  padding: 4px 10px;
  background: var(--accent);
  color: #052e22;
  font-size: 0.74rem;
  font-weight: 700;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.tariff h3 { font-size: 0.86rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin: 0 0 12px; font-weight: 600; }
.tariff-price {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}
.tariff-price small {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted);
  letter-spacing: 0;
  margin-left: 6px;
}
.tariff-meta {
  color: var(--text-muted);
  font-size: 0.86rem;
  margin: 0 0 22px;
}
.tariff ul {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.tariff li {
  padding: 6px 0 6px 22px;
  font-size: 0.93rem;
  color: var(--text-muted);
  position: relative;
}
.tariff li::before {
  content: "";
  position: absolute;
  left: 0; top: 12px;
  width: 12px; height: 6px;
  border-left: 1.6px solid var(--accent);
  border-bottom: 1.6px solid var(--accent);
  transform: rotate(-45deg);
}
.tariff .btn { margin-top: auto; }
@media (max-width: 880px) { .tariffs { grid-template-columns: 1fr; } }

/* FAQ */
.faq {
  display: grid;
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.faq-item {
  background: var(--bg);
  padding: 28px 0;
}
.faq-item h3 {
  font-size: 1.08rem;
  margin: 0 0 8px;
  color: var(--text);
}
.faq-item p {
  color: var(--text-muted);
  margin: 0;
  max-width: 720px;
}

/* Steps (used on /nastroika/, /poluchit-klyuch/) */
.steps {
  display: grid;
  gap: 14px;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 22px 24px 22px 70px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 20px; top: 22px;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  display: inline-flex;
  align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
}
.step h3 { margin: 0 0 4px; font-size: 1rem; }
.step p { margin: 0; font-size: 0.93rem; }

/* Footer */
.site-footer {
  margin-top: 80px;
  padding: 56px 0 32px;
  border-top: 1px solid var(--line);
}
.site-footer .container {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
}
.site-footer h4 { margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer li { padding: 4px 0; }
.site-footer li a { color: var(--text-muted); font-size: 0.9rem; }
.site-footer li a:hover { color: var(--text); }
.site-footer .copy {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding-top: 20px;
  color: var(--text-dim);
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.site-footer p { color: var(--text-muted); font-size: 0.92rem; max-width: 320px; }


@media (max-width: 880px) {
  /* Header stays pinned on iOS Safari */
  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
  }
  body { padding-top: 64px; }
  .hero { padding-top: 24px; padding-bottom: 36px; }
  .section { padding: 64px 0; }
  .site-footer .container { grid-template-columns: 1fr 1fr; }

  /* Burger button */
  .menu-toggle { display: inline-flex; }

  /* Compact dropdown menu below the header */
  .main-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: #0a0b0d;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 8px 0;
    gap: 0;
    z-index: 49;
    box-shadow: 0 10px 28px rgba(0,0,0,.5);
  }
  .main-nav.is-open { display: flex; }
  .main-nav a {
    padding: 14px 24px;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
  }
  .main-nav a:last-child { border-bottom: none; }
  .main-nav a:hover,
  .main-nav a[aria-current="page"] {
    background: var(--accent-soft);
    color: var(--accent);
  }
}
