/* Digital Navigation Systems — landing styles
   Самодостатній CSS: без зовнішніх шрифтів, CDN та мережевих запитів. */

:root {
  --bg:        #070b12;
  --bg-alt:    #0b111c;
  --panel:     #0e1626;
  --line:      #1d2a3f;
  --line-soft: #16202f;

  --text:      #e6edf7;
  --muted:     #93a3bd;
  --dim:       #6b7c96;

  --accent:    #38d3ff;
  --accent-2:  #6ee7a8;
  --warn:      #f2b544;
  --bad:       #ff6b6b;

  --radius:    14px;
  --radius-sm: 10px;
  --wrap:      1180px;

  --mono: ui-monospace, "JetBrains Mono", "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }

.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;
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--accent); color: #04121a; padding: 10px 16px;
  border-radius: 0 0 8px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ───────────────────────────── Header ───────────────────────────── */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 68px;
}

/* min-width:0 дозволяє бренду стискатися: без нього flex тримає повну
   ширину назви й хедер вилазить за екран на вузьких пристроях. */
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); min-width: 0; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; color: var(--accent); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text b { font-size: 15px; font-weight: 650; letter-spacing: .2px; }
.brand-text i {
  font-style: normal; font-family: var(--mono);
  font-size: 10.5px; color: var(--dim); letter-spacing: .06em; text-transform: uppercase;
}

.nav { display: flex; align-items: center; gap: 26px; }
.nav a { color: var(--muted); font-size: 14.5px; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav-cta { margin-left: 4px; }

/* Перемикач мови лишається у шапці й на мобільних — на відміну від меню,
   яке ховається під бургер. */
.lang {
  display: flex; gap: 2px; flex: none;
  padding: 3px; border: 1px solid var(--line); border-radius: 9px;
}
.lang-opt {
  font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .04em;
  padding: 5px 9px; border-radius: 6px; color: var(--dim); line-height: 1;
  transition: color .16s ease, background-color .16s ease;
}
.lang-opt:hover { color: var(--text); text-decoration: none; }
.lang-opt.is-active { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.lang-opt.is-active:hover { color: var(--accent); }

.nav-toggle {
  display: none; width: 42px; height: 42px; padding: 10px; flex: none;
  background: transparent; border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer; flex-direction: column; justify-content: space-between;
}
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; }

.mobile-nav { display: none; flex-direction: column; padding: 8px 20px 18px; border-top: 1px solid var(--line-soft); }
.mobile-nav a { color: var(--muted); padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.mobile-nav a:last-child { border-bottom: 0; }

@media (max-width: 940px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .mobile-nav:not([hidden]) { display: flex; }
}

/* Вузькі екрани: у шапці лишаються бренд, перемикач мови та бургер —
   підпис бренду прибираємо, назву дозволяємо переносити. */
@media (max-width: 560px) {
  .header-inner { gap: 12px; }
  .brand { gap: 10px; }
  .brand-mark { width: 30px; height: 30px; }
  .brand-text i { display: none; }
  .brand-text b { font-size: 13.5px; overflow-wrap: anywhere; }
  .lang-opt { padding: 5px 7px; font-size: 11.5px; }
}

/* ───────────────────────────── Buttons ──────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; border: 1px solid transparent;
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: transform .12s ease, background-color .16s ease, border-color .16s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--accent); color: #04121a; }
.btn-primary:hover { background: #5fdfff; }

.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ────────────────────────────── Hero ────────────────────────────── */

.hero { position: relative; overflow: hidden; padding: 96px 0 72px; }

.hero-grid {
  position: absolute; inset: -40% -10% auto -10%; height: 140%;
  background-image:
    linear-gradient(to right, rgba(56,211,255,.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(56,211,255,.07) 1px, transparent 1px);
  background-size: 56px 56px;
  transform: perspective(700px) rotateX(58deg);
  mask-image: radial-gradient(ellipse 70% 55% at 50% 35%, #000 10%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 35%, #000 10%, transparent 72%);
  pointer-events: none;
}

.hero-inner { position: relative; max-width: 860px; }

.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 20px;
}

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(34px, 5.6vw, 60px);
  line-height: 1.08;
  letter-spacing: -.02em;
  font-weight: 700;
}
.accent {
  background: linear-gradient(96deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.lede { margin: 0 0 32px; font-size: clamp(16px, 1.9vw, 18.5px); color: var(--muted); max-width: 68ch; }

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

.hero-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr));
  gap: 20px; margin: 64px 0 0; padding: 28px 0 0; border-top: 1px solid var(--line-soft);
}
.hero-stats div { margin: 0; }
.hero-stats dt {
  font-family: var(--mono); font-size: 32px; font-weight: 600;
  color: var(--text); line-height: 1.1;
}
.hero-stats dd { margin: 8px 0 0; font-size: 13.5px; color: var(--dim); }

/* ───────────────────────────── Sections ─────────────────────────── */

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

.section-tag {
  font-family: var(--mono); font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 14px;
}
.section-title {
  margin: 0 0 18px;
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.2; letter-spacing: -.015em; font-weight: 700;
  max-width: 22ch;
}
.section-lede { margin: 0 0 40px; color: var(--muted); max-width: 64ch; font-size: 16.5px; }

.footnote { margin: 24px 0 0; font-size: 13.5px; color: var(--dim); max-width: 70ch; }

/* ───────────────────────────── Cards ────────────────────────────── */

.cards {
  display: grid; gap: 20px; margin-top: 44px;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
  transition: border-color .18s ease, transform .18s ease;
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-2px); }

.card-icon {
  width: 44px; height: 44px; border-radius: 11px; margin-bottom: 18px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}
.card-icon svg { width: 24px; height: 24px; stroke-linecap: round; stroke-linejoin: round; }

.card h3 { margin: 0 0 12px; font-size: 19px; font-weight: 650; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card b { color: var(--text); font-weight: 600; }

.card-list { margin: 18px 0 0; padding: 18px 0 0; list-style: none; border-top: 1px solid var(--line-soft); }
.card-list li { position: relative; padding-left: 20px; font-size: 14px; color: var(--dim); margin-bottom: 8px; }
.card-list li:last-child { margin-bottom: 0; }
.card-list li::before {
  content: ""; position: absolute; left: 2px; top: 9px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); opacity: .8;
}

/* ───────────────────────── Constellations ───────────────────────── */

/* min(…, 100%) обов'язковий: інакше на вузьких екранах трек ширший за
   контейнер і сторінка отримує горизонтальний скрол. */
.gnss { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr)); }

.gnss-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); padding: 24px;
  transition: border-color .18s ease;
}
.gnss-card:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }

/* Galileo та GLONASS CDMA — ключові сузір'я: окремий ряд із двох ширших
   карток над рештою сітки, акцентна рамка й підсвітка. */
.gnss-lead { grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); margin-bottom: 18px; }

.gnss-card.featured {
  padding: 28px;
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 6%, transparent), transparent 55%),
    var(--panel);
}
.gnss-card.featured p { font-size: 15px; }

/* LEO-PNT — окремий шар, а не ще одне ГНСС-сузір'я: ширша картка,
   що заразом добирає порожню клітинку в кінці сітки. */
.gnss-card.wide {
  grid-column: span 2;
  border-color: color-mix(in srgb, var(--accent-2) 30%, var(--line));
}
.gnss-card.wide .gnss-region { color: var(--accent-2); opacity: .85; }
.gnss-card.wide .sigs li {
  color: var(--accent-2);
  background: color-mix(in srgb, var(--accent-2) 10%, transparent);
  border-color: color-mix(in srgb, var(--accent-2) 22%, transparent);
}
@media (max-width: 700px) { .gnss-card.wide { grid-column: auto; } }

.gnss-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.gnss-head h3 { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -.01em; }
.featured .gnss-head h3 { font-size: 21px; }
.gnss-region { font-family: var(--mono); font-size: 11px; color: var(--dim); letter-spacing: .04em; }

.gnss-badge {
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px;
  color: #04121a; background: var(--accent); font-weight: 700;
}

.gnss-extra {
  margin-top: 14px !important; padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  font-size: 13.5px; color: var(--dim);
}

.sigs { display: flex; flex-wrap: wrap; gap: 7px; list-style: none; margin: 16px 0; padding: 0; }
.sigs li {
  font-family: var(--mono); font-size: 12px; line-height: 1;
  padding: 6px 10px; border-radius: 6px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}

.gnss-card p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ─────────────────────────── Technology ─────────────────────────── */

.tech-layout { display: grid; gap: 48px; grid-template-columns: 1.15fr .85fr; align-items: start; }
@media (max-width: 940px) { .tech-layout { grid-template-columns: 1fr; gap: 40px; } }

.pipeline { list-style: none; margin: 8px 0 0; padding: 0; counter-reset: step; }
.pipeline li { display: flex; gap: 18px; padding: 20px 0; border-top: 1px solid var(--line-soft); }
.pipeline li:first-child { border-top: 0; padding-top: 0; }
.pipeline-step {
  font-family: var(--mono); font-size: 13px; color: var(--accent);
  padding-top: 3px; flex: none; opacity: .85;
}
.pipeline h4 { margin: 0 0 6px; font-size: 16.5px; font-weight: 620; }
.pipeline p { margin: 0; color: var(--muted); font-size: 14.5px; }

.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
  position: sticky; top: 90px;
}
@media (max-width: 940px) { .panel { position: static; } }

.panel-title { margin: 0 0 22px; font-size: 17px; font-weight: 650; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 14px; padding-bottom: 20px; position: relative; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::after {
  content: ""; position: absolute; left: 5px; top: 16px; bottom: 4px;
  width: 1px; background: var(--line);
}
.timeline li:last-child::after { display: none; }

.dot { width: 11px; height: 11px; border-radius: 50%; flex: none; margin-top: 5px; z-index: 1; }
.dot.ok   { background: var(--accent-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 18%, transparent); }
.dot.warn { background: var(--warn);     box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 18%, transparent); }
.dot.bad  { background: var(--bad);      box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 18%, transparent); }

.timeline b { display: block; font-family: var(--mono); font-size: 12.5px; color: var(--text); margin-bottom: 3px; }
.timeline p { margin: 0; font-size: 14px; color: var(--muted); }

.panel-note { margin: 22px 0 0; padding-top: 16px; border-top: 1px solid var(--line-soft); font-size: 12.5px; color: var(--dim); }

/* ───────────────────────────── Specs ────────────────────────────── */

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }

.specs { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
.specs tr { border-bottom: 1px solid var(--line-soft); }
.specs tr:last-child { border-bottom: 0; }
.specs tr:nth-child(odd) { background: color-mix(in srgb, var(--panel) 55%, transparent); }
.specs th {
  text-align: left; font-weight: 600; color: var(--muted);
  padding: 15px 22px; width: 38%; vertical-align: top;
}
.specs td { padding: 15px 22px; color: var(--text); }

/* ────────────────────────── Applications ────────────────────────── */

.apps { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.app {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 24px; background: color-mix(in srgb, var(--panel) 60%, transparent);
  transition: border-color .18s ease;
}
.app:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.app h3 { margin: 0 0 10px; font-size: 17px; font-weight: 620; }
.app p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ─────────────────────────── Documents ──────────────────────────── */

.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }

.doc-item {
  display: flex; align-items: center; gap: 18px;
  padding: 20px 24px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .18s ease, transform .18s ease;
}
.doc-item:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-1px); }

.doc-icon {
  width: 42px; height: 42px; flex: none; border-radius: 10px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--bad) 12%, transparent);
  color: #ff8f8f;
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .04em;
}

.doc-body { flex: 1 1 auto; min-width: 0; }
.doc-title { margin: 0; font-size: 16.5px; font-weight: 620; color: var(--text); }
.doc-desc  { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.doc-meta  { margin: 8px 0 0; font-family: var(--mono); font-size: 12px; color: var(--dim); display: flex; flex-wrap: wrap; gap: 14px; }

.doc-action {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 9px;
  border: 1px solid var(--line); color: var(--text);
  font-size: 14px; font-weight: 600;
  transition: border-color .16s ease, background-color .16s ease, color .16s ease;
}
.doc-action:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.doc-action svg { width: 16px; height: 16px; stroke-linecap: round; stroke-linejoin: round; }
.doc-action[aria-busy="true"] { opacity: .6; pointer-events: none; }

.doc-empty, .doc-error {
  padding: 26px 24px; border: 1px dashed var(--line); border-radius: var(--radius);
  color: var(--dim); font-size: 15px; text-align: center;
}
.doc-error { color: #ffb0b0; border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }

@media (max-width: 640px) {
  .doc-item { flex-wrap: wrap; }
  .doc-action { width: 100%; justify-content: center; }
}

/* ──────────────────────────── Contact ───────────────────────────── */

.contact-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .contact-inner { grid-template-columns: 1fr; gap: 32px; } }

.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
  padding: 16px 0; border-bottom: 1px solid var(--line-soft);
}
.contact-list li:last-child { border-bottom: 0; }
.contact-list span { color: var(--dim); font-size: 13.5px; font-family: var(--mono); }
.contact-list a { font-size: 15.5px; }

/* ───────────────────────────── Footer ───────────────────────────── */

.site-footer { border-top: 1px solid var(--line-soft); padding: 32px 0; background: var(--bg); }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.site-footer p { margin: 0; color: var(--dim); font-size: 13.5px; }
.footer-note { font-family: var(--mono); font-size: 12px; letter-spacing: .05em; }
