
:root {
  color-scheme: dark;
  --void: #02040a;
  --night: #050914;
  --night-2: #08101f;
  --surface: rgba(8, 16, 31, .76);
  --surface-solid: #08101f;
  --surface-2: rgba(12, 25, 46, .78);
  --surface-3: #0c192e;
  --line: rgba(125, 185, 255, .13);
  --line-strong: rgba(100, 195, 255, .30);
  --blue: #2d7dff;
  --blue-2: #56c7ff;
  --cyan: #7ae8ff;
  --violet: #7b82ff;
  --mint: #3ce1b4;
  --amber: #ffad55;
  --danger: #ff7083;
  --white: #f6faff;
  --text: #dce8f7;
  --muted: #8192aa;
  --muted-2: #53647d;
  --shadow: 0 28px 90px rgba(0, 0, 0, .48);
  --glow-blue: 0 0 40px rgba(45, 125, 255, .28);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 34px;
  --max: 1240px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--void); }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -10%, rgba(45, 125, 255, .15), transparent 35%),
    radial-gradient(circle at 92% 36%, rgba(86, 199, 255, .07), transparent 26%),
    linear-gradient(180deg, #02040a 0%, #040814 48%, #02040a 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -4;
  pointer-events: none;
  opacity: .19;
  background-image:
    linear-gradient(rgba(101, 174, 255, .16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(101, 174, 255, .16) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.65), transparent 80%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: .04;
  background-image: url("data:image/png,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

::selection { background: rgba(86, 199, 255, .28); color: #fff; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
img { max-width: 100%; display: block; }

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 10000;
  padding: 10px 16px;
  border-radius: 10px;
  background: #fff;
  color: #06101c;
  transition: top .2s ease;
}
.skip-link:focus { top: 16px; }

.container { width: min(var(--max), calc(100% - 48px)); margin-inline: auto; }
.section { position: relative; padding: 112px 0; }
.section-tight { padding: 78px 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  font: 600 .72rem/1 JetBrains Mono, monospace;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--blue-2);
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue-2));
  box-shadow: 0 0 12px var(--blue-2);
}

.display {
  margin: 0;
  max-width: 980px;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(3.2rem, 8.4vw, 7.6rem);
  font-weight: 600;
  letter-spacing: -.065em;
  line-height: .93;
  color: var(--white);
}

.h1 {
  margin: 0;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(2.7rem, 6.2vw, 5.8rem);
  font-weight: 600;
  letter-spacing: -.055em;
  line-height: .98;
  color: var(--white);
}

.h2 {
  margin: 0;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(2.1rem, 4.4vw, 4.3rem);
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: 1.02;
  color: var(--white);
}

.h3 {
  margin: 0;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(1.35rem, 2vw, 2rem);
  font-weight: 600;
  letter-spacing: -.025em;
  color: var(--white);
}

.gradient-text {
  color: transparent;
  background: linear-gradient(100deg, #fff 0%, #a9e9ff 30%, #58baff 58%, #8388ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.lead {
  margin: 22px 0 0;
  max-width: 680px;
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  line-height: 1.75;
  color: var(--muted);
}

.mono { font-family: JetBrains Mono, ui-monospace, SFMono-Regular, Consolas, monospace; }

.btn {
  --btn-border: rgba(93, 184, 255, .25);
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 21px;
  border: 1px solid var(--btn-border);
  border-radius: 999px;
  background: rgba(10, 22, 40, .58);
  color: var(--white);
  font-weight: 650;
  font-size: .9rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform .28s var(--ease), border-color .28s ease, background .28s ease, box-shadow .28s ease;
  backdrop-filter: blur(16px);
}
.btn:hover { transform: translateY(-2px); border-color: rgba(120, 222, 255, .58); background: rgba(17, 36, 64, .78); }
.btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.btn-primary {
  border-color: rgba(101, 197, 255, .55);
  background: linear-gradient(135deg, #226cf5 0%, #2f9cff 62%, #65d9ff 130%);
  box-shadow: 0 12px 36px rgba(28, 111, 255, .26), inset 0 1px rgba(255,255,255,.24);
}
.btn-primary:hover { background: linear-gradient(135deg, #337eff, #36acff); box-shadow: 0 16px 44px rgba(38, 132, 255, .40); }
.btn-quiet { background: transparent; border-color: transparent; color: var(--muted); }
.btn-quiet:hover { color: var(--white); background: rgba(255,255,255,.04); }
.btn-sm { min-height: 38px; padding-inline: 16px; font-size: .78rem; }
.btn-block { width: 100%; }

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(8, 16, 31, .65);
  cursor: pointer;
  transition: .25s ease;
}
.icon-button:hover { border-color: var(--line-strong); background: rgba(16, 31, 54, .9); }

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
}
.site-header.scrolled {
  background: rgba(2, 5, 12, .76);
  border-color: var(--line);
  backdrop-filter: blur(22px) saturate(130%);
}
.nav {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  text-decoration: none;
}
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  filter: drop-shadow(0 0 18px rgba(70, 170, 255, .45));
}
.brand-copy { display: grid; gap: 1px; }
.brand-name { font: 600 .9rem/1 "Space Grotesk", sans-serif; letter-spacing: .19em; }
.brand-sub { font: 500 .55rem/1.2 JetBrains Mono, monospace; letter-spacing: .16em; color: var(--blue-2); }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-size: .84rem;
  font-weight: 550;
  transition: color .2s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -8px;
  height: 1px;
  background: var(--blue-2);
  transition: right .3s var(--ease);
}
.nav-links a:hover { color: var(--white); }
.nav-links a:hover::after { right: 0; }
.nav-actions { display: flex; align-items: center; gap: 9px; }
.nav-toggle { display: none; }

.glass-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(13, 25, 46, .78), rgba(5, 12, 24, .62));
  box-shadow: var(--shadow), inset 0 1px rgba(255,255,255,.045);
  backdrop-filter: blur(22px) saturate(120%);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 29px;
  padding: 0 11px;
  border: 1px solid rgba(60, 225, 180, .24);
  border-radius: 999px;
  background: rgba(60, 225, 180, .07);
  color: var(--mint);
  font: 600 .65rem/1 JetBrains Mono, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
  animation: pulse-dot 1.8s ease-in-out infinite;
}
.status-pill.warning { color: var(--amber); border-color: rgba(255, 173, 85, .28); background: rgba(255, 173, 85, .08); }
.status-pill.locked { color: #90a0b7; border-color: rgba(144, 160, 183, .22); background: rgba(144, 160, 183, .06); }

@keyframes pulse-dot { 50% { opacity: .35; transform: scale(1.55); } }

.field { display: grid; gap: 8px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.label {
  color: #a7b7ca;
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.input-shell { position: relative; }
.input,
.textarea,
.select {
  width: 100%;
  min-height: 49px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  background: rgba(2, 8, 18, .74);
  color: var(--white);
  padding: 0 15px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.input.with-icon { padding-left: 44px; }
.textarea { min-height: 112px; padding-block: 14px; resize: vertical; line-height: 1.55; }
.input::placeholder, .textarea::placeholder { color: #44556d; }
.input:focus, .textarea:focus, .select:focus {
  border-color: rgba(89, 205, 255, .58);
  background: rgba(4, 13, 28, .93);
  box-shadow: 0 0 0 4px rgba(45, 125, 255, .10), 0 0 24px rgba(45, 125, 255, .08);
}
.input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-2);
  pointer-events: none;
}
.input-action {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  padding: 7px;
  cursor: pointer;
}
.input-action:hover { color: var(--white); background: rgba(255,255,255,.05); }

.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 8, 18, .62);
}
.segmented button {
  min-height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 650;
  cursor: pointer;
  transition: .24s ease;
}
.segmented button.active { color: #fff; background: linear-gradient(135deg, rgba(45, 125, 255, .94), rgba(86, 199, 255, .86)); box-shadow: 0 6px 20px rgba(45, 125, 255, .22); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(12, 24, 43, .52);
  color: #a9bad0;
  font-size: .72rem;
}

.kpi {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(7, 15, 29, .66);
}
.kpi-label { color: var(--muted); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.kpi-value { margin-top: 9px; font: 600 1.8rem/1 "Space Grotesk", sans-serif; color: var(--white); }
.kpi-note { margin-top: 8px; color: var(--muted-2); font-size: .74rem; }

.progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.055);
}
.progress > span {
  display: block;
  height: 100%;
  width: var(--progress, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--blue-2), var(--cyan));
  box-shadow: 0 0 18px rgba(86, 199, 255, .55);
  transition: width .8s var(--ease);
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(45, 125, 255, .09);
  border: 1px solid rgba(86, 199, 255, .18);
  color: #8cdfff;
  font: 600 .62rem/1 JetBrains Mono, monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.tag.falcon { color: #ffc084; border-color: rgba(255, 173, 85, .22); background: rgba(255, 173, 85, .08); }
.tag.khameleon { color: #76f0cf; border-color: rgba(60, 225, 180, .22); background: rgba(60, 225, 180, .08); }

.telemetry {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(1, 6, 14, .88);
  box-shadow: inset 0 1px rgba(255,255,255,.03);
}
.telemetry-head {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 18, 34, .76);
}
.telemetry-dots { display: flex; gap: 6px; }
.telemetry-dots span { width: 8px; height: 8px; border-radius: 50%; background: #ff6a78; }
.telemetry-dots span:nth-child(2) { background: #ffb24d; }
.telemetry-dots span:nth-child(3) { background: #48d8a7; }
.telemetry-title { font: 500 .68rem/1 JetBrains Mono, monospace; color: var(--muted); letter-spacing: .07em; }
.telemetry-body {
  min-height: 170px;
  max-height: 280px;
  overflow: auto;
  padding: 15px;
  font: 400 .7rem/1.75 JetBrains Mono, monospace;
  color: #72849c;
  scrollbar-width: thin;
  scrollbar-color: rgba(86,199,255,.26) transparent;
}
.log-line { animation: log-in .35s var(--ease) both; }
.log-time { color: #3e5069; }
.log-core { color: #67cfff; }
.log-falcon { color: #ffb971; }
.log-khameleon { color: #62e9c2; }
.log-success { color: #57ddb0; }
.log-warning { color: #ffc36c; }
@keyframes log-in { from { opacity: 0; transform: translateY(7px); } }

.modal {
  width: min(780px, calc(100% - 30px));
  max-height: calc(100vh - 40px);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background: #07101e;
  color: var(--text);
  box-shadow: 0 40px 120px rgba(0,0,0,.8), 0 0 60px rgba(45,125,255,.16);
  overflow: hidden;
}
.modal::backdrop { background: rgba(0, 3, 9, .82); backdrop-filter: blur(13px); }
.modal-inner { position: relative; padding: 34px; overflow: auto; max-height: calc(100vh - 40px); }
.modal-close { position: absolute; top: 18px; right: 18px; z-index: 3; }

.site-footer {
  position: relative;
  border-top: 1px solid var(--line);
  background: rgba(1, 5, 12, .72);
}
.footer-main { padding: 62px 0 40px; display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 46px; }
.footer-brand-copy { margin-top: 18px; max-width: 390px; color: var(--muted); line-height: 1.7; font-size: .86rem; }
.footer-col h4 { margin: 0 0 16px; color: #c8d6e6; font-size: .78rem; letter-spacing: .09em; text-transform: uppercase; }
.footer-col a { display: block; margin: 10px 0; color: var(--muted); text-decoration: none; font-size: .82rem; }
.footer-col a:hover { color: var(--blue-2); }
.footer-bottom { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: .75rem; }

.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 5000; display: grid; gap: 10px; width: min(360px, calc(100% - 40px)); }
.toast {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 11px;
  align-items: start;
  padding: 15px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(7, 16, 30, .94);
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
  backdrop-filter: blur(18px);
  animation: toast-in .38s var(--ease) both;
}
.toast-icon { color: var(--blue-2); }
.toast-title { color: var(--white); font-size: .82rem; font-weight: 650; }
.toast-text { margin-top: 4px; color: var(--muted); font-size: .75rem; line-height: 1.45; }
.toast-close { border: 0; background: none; color: var(--muted); cursor: pointer; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }

.pointer-aura {
  position: fixed;
  width: 260px;
  height: 260px;
  left: -130px;
  top: -130px;
  z-index: -2;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 156, 255, .12), transparent 68%);
  transform: translate3d(var(--mouse-x, 50vw), var(--mouse-y, 50vh), 0);
  transition: opacity .2s ease;
}

.swarm-canvas { position: fixed; inset: 0; z-index: -3; width: 100%; height: 100%; pointer-events: none; opacity: .6; }

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

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .nav-links { display: none; position: fixed; top: 76px; left: 16px; right: 16px; padding: 18px; flex-direction: column; align-items: stretch; gap: 5px; border: 1px solid var(--line); border-radius: 18px; background: rgba(3, 8, 17, .96); backdrop-filter: blur(20px); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 12px; }
  .nav-toggle { display: grid; }
  .nav-actions .btn-quiet { display: none; }
  .footer-main { grid-template-columns: 1.5fr 1fr 1fr; }
  .footer-main .footer-col:last-child { grid-column: 2 / -1; }
}

@media (max-width: 720px) {
  .container { width: min(100% - 30px, var(--max)); }
  .section { padding: 82px 0; }
  .site-header .btn-primary { display: none; }
  .nav { height: 68px; }
  .brand-mark { width: 35px; height: 35px; }
  .brand-name { font-size: .78rem; }
  .brand-sub { font-size: .48rem; }
  .nav-links { top: 68px; }
  .field-row { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .footer-main > :first-child { grid-column: 1 / -1; }
  .footer-main .footer-col:last-child { grid-column: auto; }
  .footer-bottom { align-items: flex-start; flex-direction: column; justify-content: center; padding: 22px 0; }
  .modal-inner { padding: 26px 20px; }
}

@media (hover: none) {
  .pointer-aura { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .swarm-canvas, .pointer-aura { display: none; }
}

section[id], footer[id] { scroll-margin-top: 96px; }
