/* Design tokens — "route chart": cold chart paper, ink, one signal colour for routes. */
@font-face { font-family: "Unbounded"; src: url("fonts/unbounded-cyrillic-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; src: url("fonts/unbounded-latin-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2190-2199; }
@font-face { font-family: "Golos Text"; src: url("fonts/golos-text-cyrillic-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; src: url("fonts/golos-text-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2190-2199; }
@font-face { font-family: "Golos Text"; src: url("fonts/golos-text-cyrillic-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; src: url("fonts/golos-text-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2190-2199; }
@font-face { font-family: "Golos Text"; src: url("fonts/golos-text-cyrillic-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; src: url("fonts/golos-text-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2190-2199; }

:root {
  --bg: #e4ecef;
  --paper: #f7fafb;
  --ink: #0e2a33;
  --muted: #52707a;
  --line: #c3d2d8;
  --route: #ff5a1f;
  --route-ink: #b83a0c;
  --ok: #17855a;
  --warn: #a8700f;
  --bad: #c2412d;
  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --text: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.625rem;
  --step-3: clamp(2rem, 1.2rem + 3.4vw, 3.6rem);
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1f26;
    --paper: #132a33;
    --ink: #e3eef1;
    --muted: #94b0b9;
    --line: #2a4651;
    --route: #ff6a33;
    --route-ink: #ff8a5c;
    --ok: #3cc28a;
    --warn: #e0a33a;
    --bad: #ff7a66;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--step-0)/1.55 var(--text);
  font-feature-settings: "kern", "liga";
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.18em; }
a:hover { color: var(--route-ink); }
:focus-visible { outline: 3px solid var(--route); outline-offset: 3px; border-radius: 4px; }
.wrap { width: min(1160px, 100%); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 1.05rem/1 var(--display); letter-spacing: 0.01em; text-decoration: none; }
.brand-mark { width: 28px; height: 28px; }
.top nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 999px; border: 1.5px solid var(--ink);
  background: var(--ink); color: var(--paper); font: 600 var(--step-0)/1 var(--text);
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--route-ink); border-color: var(--route-ink); color: #fff; }
.btn.quiet { background: transparent; color: var(--ink); }
.btn.quiet:hover { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.btn.signal { background: var(--route); border-color: var(--route); color: #1b0b03; }
.btn.signal:hover { background: var(--route-ink); border-color: var(--route-ink); color: #fff; }
.btn.small { min-height: 36px; padding: 0 14px; font-size: var(--step--1); }
.btn.danger { background: transparent; color: var(--bad); border-color: var(--bad); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(28px, 5vw, 72px); align-items: start; padding-block: clamp(28px, 6vw, 80px) clamp(40px, 7vw, 96px); }
.hero h1 { font: 700 var(--step-3)/1.04 var(--display); letter-spacing: -0.01em; margin: 0 0 24px; max-width: 13ch; text-wrap: balance; }
.hero .lead { font-size: var(--step-1); line-height: 1.5; color: var(--muted); max-width: 34em; margin: 0 0 32px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* The one memorable element: a live route board with an orange route line feeding it */
.routes { position: relative; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 18px; padding: 22px 22px 10px; }
.routes-route { position: absolute; left: -64px; top: 46px; width: 72px; height: 40px; overflow: visible; }
.routes-route path { stroke: var(--route); stroke-width: 3; fill: none; stroke-dasharray: 6 7; }
.routes-route circle { fill: var(--route); }
.routes h2 { font: 600 var(--step-1)/1.2 var(--display); margin: 0 0 4px; }
.routes .note { color: var(--muted); font-size: var(--step--1); margin: 0 0 14px; }
.route-list { list-style: none; margin: 0; padding: 0; }
.route-list li { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.route-list .flag { font-size: 1.6rem; line-height: 1; }
.route-list .country { font-weight: 600; }
.route-list .via { color: var(--muted); font-size: var(--step--1); }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: var(--step--1); font-weight: 500; white-space: nowrap; }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.status.online::before { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); }
.status.degraded::before { background: var(--bad); }
.status.unverified::before { background: var(--warn); }
.route-empty { color: var(--muted); padding: 14px 0 12px; border-top: 1px solid var(--line); margin: 0; }

@media (prefers-reduced-motion: no-preference) {
  .routes-route path { animation: route 1.6s ease-out both; stroke-dashoffset: 120; }
  @keyframes route { to { stroke-dashoffset: 0; } }
}

/* Sections */
.section { padding-block: clamp(40px, 7vw, 88px); border-top: 1.5px solid var(--ink); }
.section h2 { font: 700 var(--step-2)/1.15 var(--display); margin: 0 0 28px; max-width: 22ch; }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--ink); font: 700 1rem/1 var(--display); margin-bottom: 16px; }
.steps li:last-child::before { background: var(--route); border-color: var(--route); color: #1b0b03; }
.steps h3 { font: 600 var(--step-1)/1.25 var(--text); margin: 0 0 8px; }
.steps p { margin: 0; color: var(--muted); max-width: 32ch; }

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); margin: 0; }
.facts dt { font-weight: 600; font-size: var(--step-1); margin-bottom: 6px; }
.facts dd { margin: 0; color: var(--muted); max-width: 34ch; }

.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.plan { background: var(--paper); border: 1.5px solid var(--line); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.plan.best { border-color: var(--ink); }
.plan h3 { margin: 0; font: 600 var(--step-1)/1.2 var(--text); }
.plan .price { font: 700 var(--step-2)/1.1 var(--display); margin: 8px 0 2px; }
.plan .per { color: var(--muted); font-size: var(--step--1); margin: 0 0 16px; }
.plan .btn { margin-top: auto; }
.fineprint { color: var(--muted); font-size: var(--step--1); margin: 18px 0 0; max-width: 60ch; }

.faq details { border-top: 1px solid var(--line); padding: 16px 0; max-width: 72ch; }
.faq summary { cursor: pointer; font-weight: 600; font-size: var(--step-1); list-style-position: outside; }
.faq details p { color: var(--muted); margin: 10px 0 0; }

.foot { border-top: 1.5px solid var(--ink); padding-block: 28px 40px; color: var(--muted); font-size: var(--step--1); display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }

/* Forms & panels shared by the cabinet and admin */
.panel { background: var(--paper); border: 1.5px solid var(--line); border-radius: 14px; padding: clamp(18px, 3vw, 28px); }
.panel.strong { border-color: var(--ink); }
.panel h2 { font: 700 var(--step-1)/1.2 var(--display); margin: 0 0 12px; }
.panel h3 { font: 600 var(--step-0)/1.3 var(--text); margin: 18px 0 8px; }
.stack { display: grid; gap: 16px; }
label { display: grid; gap: 6px; font-weight: 500; font-size: var(--step--1); }
input, select, textarea {
  font: 400 var(--step-0)/1.4 var(--text); color: var(--ink); background: var(--bg);
  border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 13px; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: none; }
textarea { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.85rem; min-height: 180px; }
.error { color: var(--bad); font-weight: 500; min-height: 1.4em; margin: 0; }
.ok-text { color: var(--ok); font-weight: 500; }
.muted { color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row > input { flex: 1 1 220px; width: auto; }
.tabs { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--bg); border: 1.5px solid var(--line); gap: 4px; flex-wrap: wrap; }
.tabs button { border: 0; background: transparent; color: var(--ink); font: 500 var(--step--1)/1 var(--text); padding: 10px 16px; border-radius: 999px; cursor: pointer; min-height: 38px; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .routes-route { display: none; }
  .steps, .facts, .plans { grid-template-columns: 1fr; }
}
