/* =========================================================
   VELONICS TECH SOLUTIONS — Deep-space HUD design system
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@300;400;500;600&display=swap');

:root {
  --bg:        #05070d;
  --bg-panel:  #0a0e17;
  --bg-elev:   #0d1320;
  --line:      rgba(34, 211, 238, 0.14);
  --line-2:    rgba(34, 211, 238, 0.28);
  --line-soft: rgba(255, 255, 255, 0.06);
  --grid:      rgba(34, 211, 238, 0.05);

  --cyan:      #22d3ee;
  --cyan-dim:  #0891a8;
  --cyan-glow: rgba(34, 211, 238, 0.45);
  --amber:     #f59e0b;
  --green:     #10b981;
  --red:       #ef4444;

  --fg:        #e2e8f0;
  --fg-2:      #94a3b8;
  --fg-mute:   #64748b;
  --fg-dim:    #475569;

  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sans: 'Space Grotesk', system-ui, -apple-system, sans-serif;

  --maxw: 1320px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--fg); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body {
  font-size: 15px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse at 50% -10%, rgba(34, 211, 238, 0.08), transparent 50%),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: auto, 64px 64px, 64px 64px;
  background-position: 0 0, 0 0, 0 0;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, svg { display: block; max-width: 100%; }

::selection { background: var(--cyan); color: #000; }

/* ===== Typography ===== */
.mono { font-family: var(--mono); }
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan-glow);
  display: inline-block;
}
.h-display {
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.98;
  font-weight: 500;
  letter-spacing: -0.03em;
}
.h-section {
  font-size: clamp(32px, 4.2vw, 56px);
  line-height: 1.04;
  font-weight: 500;
  letter-spacing: -0.025em;
}
.h-card {
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.lead {
  font-size: clamp(16px, 1.2vw, 19px);
  color: var(--fg-2);
  max-width: 62ch;
  line-height: 1.55;
}
.label-mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-mute);
}
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ===== Layout ===== */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px) { .wrap { padding: 0 20px; } }

section { padding: 120px 0; position: relative; }
@media (max-width: 720px) { section { padding: 72px 0; } }

.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
  margin-bottom: 64px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.section-head .meta { font-family: var(--mono); font-size: 11px; color: var(--fg-mute); letter-spacing: 0.12em; text-transform: uppercase; }
@media (max-width: 720px) { .section-head { grid-template-columns: 1fr; gap: 16px; } }

/* ===== Top nav ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(5, 7, 13, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.18em;
  font-weight: 500;
}
.brand .mark {
  width: 28px; height: 28px;
  border: 1px solid var(--cyan);
  display: grid; place-items: center;
  position: relative;
}
.brand .mark::before, .brand .mark::after {
  content: ""; position: absolute; background: var(--cyan);
}
.brand .mark::before { width: 10px; height: 1px; }
.brand .mark::after  { width: 1px; height: 10px; }
.brand small { color: var(--fg-mute); letter-spacing: 0.18em; }
.nav-links {
  display: flex; gap: 28px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin-left: auto;
}
.nav-links a { padding: 6px 0; border-bottom: 1px solid transparent; transition: border-color 0.2s, color 0.2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--cyan); border-bottom-color: var(--cyan); }
.nav-cta {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 10px 18px;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.06);
  transition: background 0.2s;
}
.nav-cta:hover { background: rgba(34, 211, 238, 0.16); }
@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-inner { padding: 12px 20px; }
}

body { padding-top: 60px; }

/* ===== HUD chrome ===== */
.panel {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--line);
}
.panel.glow { box-shadow: inset 0 0 60px rgba(34, 211, 238, 0.04); }
.corners::before, .corners::after,
.corners > .c-tl, .corners > .c-tr, .corners > .c-bl, .corners > .c-br {
  content: ""; position: absolute; width: 14px; height: 14px;
  border-color: var(--cyan); border-style: solid; border-width: 0;
  pointer-events: none;
}
.corners > .c-tl { top: -1px; left: -1px;  border-top-width: 1px; border-left-width: 1px; }
.corners > .c-tr { top: -1px; right: -1px; border-top-width: 1px; border-right-width: 1px; }
.corners > .c-bl { bottom: -1px; left: -1px;  border-bottom-width: 1px; border-left-width: 1px; }
.corners > .c-br { bottom: -1px; right: -1px; border-bottom-width: 1px; border-right-width: 1px; }

.tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--fg-2);
  padding: 5px 10px;
  border: 1px solid var(--line-2);
}
.tag .dot { width: 6px; height: 6px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan-glow); }
.tag.active { color: var(--cyan); }
.tag.muted { color: var(--fg-mute); }
.tag.muted .dot { background: var(--fg-mute); box-shadow: none; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em;
  text-transform: uppercase; font-weight: 500;
  padding: 14px 22px;
  border: 1px solid var(--cyan);
  color: #000;
  background: var(--cyan);
  transition: transform 0.15s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px var(--cyan-glow); }
.btn .arrow { font-family: var(--mono); }
.btn.ghost {
  background: transparent; color: var(--cyan);
}
.btn.ghost:hover { background: rgba(34, 211, 238, 0.08); box-shadow: none; transform: none; }

/* ===== Schematic placeholder ===== */
.schematic {
  position: relative;
  background:
    repeating-linear-gradient(45deg, transparent 0, transparent 14px, rgba(34, 211, 238, 0.06) 14px, rgba(34, 211, 238, 0.06) 15px),
    var(--bg-elev);
  border: 1px dashed var(--line-2);
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-mute);
  overflow: hidden;
}
.schematic .crosshair {
  position: absolute; inset: 16px;
  border: 1px solid var(--line);
  pointer-events: none;
}
.schematic .crosshair::before,
.schematic .crosshair::after {
  content: ""; position: absolute; background: var(--cyan); opacity: 0.4;
}
.schematic .crosshair::before { top: 50%; left: 0; right: 0; height: 1px; }
.schematic .crosshair::after  { left: 50%; top: 0; bottom: 0; width: 1px; }
.schematic .label {
  position: relative;
  padding: 8px 14px;
  background: var(--bg);
  border: 1px solid var(--line-2);
}

/* ===== Status pills ===== */
.status { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; }
.status .pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); }
.status .pulse::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid var(--cyan); animation: ping 2s infinite;
}
.status.ok .pulse { background: var(--green); } .status.ok .pulse::after { border-color: var(--green); }
.status.warn .pulse { background: var(--amber); } .status.warn .pulse::after { border-color: var(--amber); }
.status.off .pulse { background: var(--fg-mute); } .status.off .pulse::after { display: none; }
@keyframes ping {
  0%   { transform: scale(1);   opacity: 1; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-panel);
  padding: 72px 0 32px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-mute);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}
.footer h4 {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  font-weight: 500;
  margin-bottom: 18px;
}
.footer ul { list-style: none; display: grid; gap: 10px; }
.footer ul a { color: var(--fg-2); }
.footer ul a:hover { color: var(--cyan); }
.footer-meta {
  display: flex; justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-meta { flex-direction: column; gap: 12px; }
}

/* ===== Coordinate gutter (left rail) ===== */
.coord-rail {
  position: fixed;
  left: 16px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em;
  color: var(--fg-dim);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  z-index: 10;
  pointer-events: none;
}
@media (max-width: 1100px) { .coord-rail { display: none; } }

/* ===== Generic utility ===== */
.hud-line {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--fg-mute);
}
.hud-line .bar { flex: 1; height: 1px; background: var(--line); }
.divider { height: 1px; background: var(--line); margin: 48px 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 920px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.spec-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.spec-row .k {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--fg-mute);
}
.spec-row .v { font-size: 15px; color: var(--fg); }
.spec-row .v small { font-family: var(--mono); font-size: 11px; color: var(--fg-mute); letter-spacing: 0.1em; }

/* ===== Animations ===== */
@keyframes scan {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}
@keyframes wave {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes blink {
  0%, 60%   { opacity: 1; }
  60.1%, 100% { opacity: 0.2; }
}
.blink { animation: blink 2s infinite steps(2); }

/* tick numbers */
.ticker { display: inline-block; min-width: 4ch; text-align: right; }
