:root {
  color-scheme: dark;
  --bg: #05070b;
  --panel: rgba(10, 18, 26, 0.72);
  --panel-strong: rgba(10, 18, 26, 0.9);
  --line: rgba(134, 255, 230, 0.22);
  --text: #f3fbff;
  --muted: #9db1b8;
  --cyan: #29f3ff;
  --green: #9dff45;
  --red: #ff4f6d;
  --amber: #ffbf5f;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 14%, rgba(41, 243, 255, 0.16), transparent 34rem),
    radial-gradient(circle at 88% 12%, rgba(157, 255, 69, 0.1), transparent 28rem),
    linear-gradient(135deg, #05070b 0%, #07111a 46%, #07090d 100%);
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
select,
textarea {
  font: inherit;
}

#signal-field {
  position: fixed;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
}

.scanline {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 20;
  opacity: 0.12;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.05) 0,
    rgba(255, 255, 255, 0.05) 1px,
    transparent 2px,
    transparent 5px
  );
  mix-blend-mode: screen;
}

[data-glass] {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px);
}

.site-header {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 30;
  display: flex;
  width: min(1180px, calc(100% - 28px));
  min-height: 68px;
  transform: translateX(-50%);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 14px 10px 10px;
  border-radius: var(--radius);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(41, 243, 255, 0.6);
  color: var(--green);
  background: linear-gradient(135deg, rgba(41, 243, 255, 0.16), rgba(157, 255, 69, 0.1));
  box-shadow: 0 0 24px rgba(41, 243, 255, 0.2);
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1rem;
  line-height: 1.1;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  padding: 10px 12px;
  border: 1px solid transparent;
  color: #cce6ea;
  font-size: 0.9rem;
}

.nav-links a:hover {
  border-color: rgba(41, 243, 255, 0.35);
  color: white;
  background: rgba(41, 243, 255, 0.08);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  color: white;
  background: rgba(255, 255, 255, 0.04);
}

.nav-toggle span {
  display: block;
  width: 19px;
  height: 2px;
  margin: 5px auto;
  background: var(--cyan);
}

.hero {
  position: relative;
  display: grid;
  min-height: 92vh;
  align-items: end;
  padding: 132px max(22px, calc((100vw - 1180px) / 2)) 64px;
  isolation: isolate;
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media {
  z-index: -3;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(5, 7, 11, 0.95) 0%, rgba(5, 7, 11, 0.74) 36%, rgba(5, 7, 11, 0.23) 70%),
    linear-gradient(0deg, var(--bg) 0%, transparent 25%, transparent 82%, rgba(5, 7, 11, 0.64) 100%);
}

.hero-content {
  width: min(760px, 100%);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  padding: 9px 12px;
  border: 1px solid rgba(157, 255, 69, 0.42);
  color: #eaffd8;
  background: rgba(157, 255, 69, 0.08);
  font-size: 0.86rem;
}

.pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 16px var(--green);
  animation: pulse 1.5s infinite;
}

.hero h1 {
  max-width: 900px;
  margin: 22px 0 20px;
  overflow-wrap: break-word;
  font-size: clamp(2.9rem, 7vw, 6.4rem);
  line-height: 0.92;
  letter-spacing: 0;
  text-transform: uppercase;
  text-wrap: balance;
}

.hero p {
  max-width: 680px;
  margin: 0;
  color: #d2e1e5;
  font-size: clamp(1.06rem, 2vw, 1.32rem);
  line-height: 1.55;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid rgba(41, 243, 255, 0.35);
  background: rgba(255, 255, 255, 0.04);
  color: white;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  cursor: pointer;
}

.button.primary {
  border-color: rgba(157, 255, 69, 0.76);
  color: #06100c;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  box-shadow: 0 0 28px rgba(41, 243, 255, 0.24);
}

.button.ghost:hover,
.button.primary:hover {
  transform: translateY(-1px);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(760px, 100%);
  gap: 10px;
  margin: 38px 0 0;
}

.hero-metrics div {
  min-width: 0;
  padding: 15px;
  border: 1px solid rgba(41, 243, 255, 0.22);
  background: rgba(5, 7, 11, 0.56);
}

.hero-metrics dt {
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 900;
}

.hero-metrics dd {
  margin: 6px 0 0;
  color: #e9f7fa;
  font-size: 0.92rem;
}

.ticker {
  overflow: hidden;
  border-block: 1px solid rgba(41, 243, 255, 0.2);
  background: rgba(5, 7, 11, 0.86);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 28s linear infinite;
}

.ticker span {
  padding: 14px 24px;
  color: var(--cyan);
  font-weight: 900;
  text-transform: uppercase;
}

.section,
.service-board,
.site-footer {
  width: min(1180px, calc(100% - 36px));
  margin-inline: auto;
}

.section {
  padding: 96px 0 0;
}

.intro-grid,
.systems,
.classes,
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 24px;
  align-items: stretch;
}

.section-copy h2,
.class-panel h2,
.contact-copy h2 {
  margin: 0;
  font-size: clamp(2.1rem, 4.8vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-copy p:not(.eyebrow),
.class-panel p,
.contact-copy p,
.radar-panel p {
  color: var(--muted);
  line-height: 1.7;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.radar-panel,
.class-panel,
.lab-feed,
.contact-console,
.system-display {
  padding: 22px;
  border-radius: var(--radius);
}

.radar-panel {
  display: grid;
  grid-template-columns: 138px 1fr;
  gap: 18px;
  align-items: center;
}

.radar {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid rgba(41, 243, 255, 0.38);
  background:
    radial-gradient(circle, transparent 0 28%, rgba(41, 243, 255, 0.08) 29% 30%, transparent 31%),
    conic-gradient(from 0deg, rgba(157, 255, 69, 0), rgba(157, 255, 69, 0.6), rgba(157, 255, 69, 0));
  overflow: hidden;
}

.radar::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 50%;
  height: 2px;
  transform-origin: left center;
  background: var(--green);
  box-shadow: 0 0 16px var(--green);
  animation: sweep 4s linear infinite;
}

.radar span {
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--cyan);
  box-shadow: 0 0 14px var(--cyan);
}

.radar span:nth-child(1) {
  top: 28%;
  left: 60%;
}

.radar span:nth-child(2) {
  top: 64%;
  left: 31%;
}

.radar span:nth-child(3) {
  top: 45%;
  left: 78%;
}

.service-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding-top: 36px;
}

.service-card {
  position: relative;
  min-height: 360px;
  padding: 22px;
  border: 1px solid rgba(41, 243, 255, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(15, 28, 39, 0.88), rgba(7, 12, 18, 0.9)),
    linear-gradient(135deg, rgba(41, 243, 255, 0.08), rgba(157, 255, 69, 0.04));
  overflow: hidden;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.service-card::before {
  content: attr(data-service);
  position: absolute;
  right: -14px;
  bottom: -12px;
  color: rgba(255, 255, 255, 0.035);
  font-size: 5.4rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.service-card:hover,
.service-card.active {
  border-color: rgba(157, 255, 69, 0.62);
  transform: translateY(-4px);
  box-shadow: 0 22px 80px rgba(41, 243, 255, 0.12);
}

.service-card.hot {
  border-color: rgba(157, 255, 69, 0.42);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(41, 243, 255, 0.42);
  color: var(--cyan);
  font-weight: 900;
}

.chip {
  padding: 6px 9px;
  border: 1px solid rgba(157, 255, 69, 0.35);
  color: #dfffbe;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.service-card h3 {
  margin: 24px 0 12px;
  font-size: 1.48rem;
  line-height: 1.08;
}

.service-card p,
.service-card li {
  color: var(--muted);
  line-height: 1.6;
}

.service-card ul {
  position: relative;
  z-index: 1;
  padding-left: 18px;
}

.mode-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 8px;
  align-self: end;
}

.mode {
  min-height: 44px;
  border: 1px solid transparent;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.mode.active,
.mode:hover {
  border-color: rgba(41, 243, 255, 0.45);
  color: white;
  background: rgba(41, 243, 255, 0.1);
}

.system-display {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 18px;
}

.terminal-window {
  min-width: 0;
  border: 1px solid rgba(41, 243, 255, 0.22);
  background: rgba(0, 0, 0, 0.38);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(41, 243, 255, 0.18);
  color: var(--muted);
  font-size: 0.82rem;
}

.window-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
}

.window-bar span:nth-child(2) {
  background: var(--amber);
}

.window-bar span:nth-child(3) {
  background: var(--green);
}

#mode-output {
  min-height: 260px;
  margin: 0;
  overflow: auto;
  padding: 18px;
  color: #c9fff5;
  font: 0.94rem/1.58 "Cascadia Code", "Consolas", monospace;
  white-space: pre-wrap;
}

.workflow {
  display: grid;
  gap: 12px;
}

.workflow div {
  display: grid;
  align-content: center;
  min-height: 96px;
  padding: 18px;
  border: 1px solid rgba(157, 255, 69, 0.2);
  background: rgba(157, 255, 69, 0.05);
}

.workflow span {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.workflow strong {
  margin-top: 5px;
  font-size: 1.15rem;
}

.classes {
  align-items: start;
}

.class-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.class-grid span,
.lab-feed li {
  border: 1px solid rgba(41, 243, 255, 0.16);
  background: rgba(255, 255, 255, 0.035);
}

.class-grid span {
  padding: 13px;
}

.lab-feed {
  position: sticky;
  top: 110px;
}

.lab-feed h3 {
  margin-top: 0;
}

.lab-feed ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lab-feed li {
  padding: 13px;
  color: var(--muted);
}

.lab-feed span {
  margin-right: 8px;
  color: var(--green);
  font-weight: 900;
}

.contact {
  padding-bottom: 84px;
}

.contact-console {
  display: grid;
  gap: 16px;
}

.contact-console label {
  display: grid;
  gap: 7px;
  color: #dff7fb;
  font-weight: 800;
}

.contact-console select,
.contact-console input,
.contact-console textarea {
  width: 100%;
  border: 1px solid rgba(41, 243, 255, 0.2);
  border-radius: 0;
  color: white;
  background: rgba(0, 0, 0, 0.35);
  outline: none;
}

.contact-console select {
  min-height: 44px;
  padding: 0 10px;
}

.contact-console input {
  min-height: 44px;
  padding: 0 12px;
}

.contact-console textarea {
  resize: vertical;
  padding: 12px;
}

.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.form-status.success {
  color: var(--green);
}

.form-status.error {
  color: var(--red);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 0 42px;
  border-top: 1px solid rgba(41, 243, 255, 0.2);
  color: var(--muted);
}

.site-footer strong {
  color: white;
}

@keyframes pulse {
  50% {
    opacity: 0.45;
    transform: scale(1.7);
  }
}

@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

@keyframes sweep {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  .site-header {
    left: 14px;
    right: 14px;
    width: auto;
    transform: none;
  }

  .nav-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    display: block;
    transform: translateY(-50%);
  }

  .nav-links {
    position: fixed;
    inset: 78px 14px auto;
    display: none;
    padding: 10px;
    border: 1px solid var(--line);
    background: rgba(5, 7, 11, 0.96);
  }

  body.menu-open .nav-links {
    display: grid;
  }

  .nav-links a {
    min-height: 46px;
  }

  .hero {
    min-height: 880px;
  }

  .hero-overlay {
    background:
      linear-gradient(90deg, rgba(5, 7, 11, 0.98) 0%, rgba(5, 7, 11, 0.8) 58%, rgba(5, 7, 11, 0.52) 100%),
      linear-gradient(0deg, var(--bg) 0%, transparent 30%, transparent 80%, rgba(5, 7, 11, 0.72) 100%);
  }

  .intro-grid,
  .systems,
  .classes,
  .contact,
  .system-display,
  .service-board {
    grid-template-columns: 1fr;
  }

  .mode-selector,
  .hero-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .lab-feed {
    position: static;
  }
}

@media (max-width: 560px) {
  .site-header {
    top: 10px;
    width: calc(100% - 20px);
  }

  .hero {
    min-height: 850px;
    padding-top: 112px;
  }

  .hero h1 {
    font-size: clamp(2.35rem, 11.2vw, 3.35rem);
    line-height: 0.96;
  }

  .hero-metrics,
  .mode-selector,
  .class-grid,
  .radar-panel {
    grid-template-columns: 1fr;
  }

  .radar {
    width: 138px;
  }

  .service-card {
    min-height: auto;
  }

  .site-footer {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
