:root {
  color-scheme: dark;
  --bg: #05060a;
  --bg-elevated: rgba(17, 24, 39, 0.74);
  --bg-elevated-strong: rgba(8, 12, 20, 0.92);
  --line: rgba(148, 163, 184, 0.2);
  --line-strong: rgba(148, 163, 184, 0.34);
  --text: #e5eef9;
  --muted: #94a3b8;
  --blue: #2563eb;
  --cyan: #22d3ee;
  --amber: #f59e0b;
  --red: #ef4444;
  --green: #10b981;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --max: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.2), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(34, 211, 238, 0.14), transparent 30%),
    linear-gradient(180deg, #04050a 0%, #06070d 50%, #030409 100%);
  color: var(--text);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 92%);
  pointer-events: none;
  opacity: 0.55;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.02) 50%, transparent 100%);
  background-size: 100% 6px;
  pointer-events: none;
  opacity: 0.2;
}

.page-shell {
  position: relative;
  overflow: hidden;
}

.ambient {
  position: fixed;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(55px);
  opacity: 0.18;
  pointer-events: none;
}

.ambient-one {
  top: -180px;
  left: -120px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.8), transparent 68%);
}

.ambient-two {
  right: -180px;
  top: 18vh;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.65), transparent 68%);
}

.grid-overlay,
.scanline {
  pointer-events: none;
  position: fixed;
  inset: 0;
}

.scanline {
  background: linear-gradient(180deg, transparent, rgba(34, 211, 238, 0.08), transparent);
  opacity: 0.35;
  animation: drift 12s linear infinite;
}

.topbar,
.section-frame {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 0 16px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.88), rgba(8, 12, 20, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.18), 0 16px 30px rgba(0, 0, 0, 0.45);
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 700;
}

.brand-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(8, 12, 20, 0.78);
  color: var(--text);
  font-size: 0.84rem;
  letter-spacing: 0.12em;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.9);
}

.hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  padding: 22px 0 26px;
}

.hero-copy,
.hero-dashboard,
.modules-section,
.architecture-section,
.dashboard-section,
.metrics-section {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-copy {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-copy h1,
.section-heading h2 {
  font-family: "IBM Plex Sans", sans-serif;
  margin: 14px 0 0;
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero-copy h1 {
  font-size: clamp(3.2rem, 5vw, 5.9rem);
  max-width: 11ch;
}

.hero-text,
.section-heading p,
.module-card p,
.pipeline-step p,
.metric-card p,
.output-list li span,
.decision-row span,
.alert-list li,
.brand-subtitle {
  color: var(--muted);
}

.hero-text {
  margin: 22px 0 0;
  max-width: 62ch;
  font-size: 1.02rem;
  line-height: 1.7;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: #dff8ff;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.95), rgba(17, 24, 39, 0.96));
  border: 1px solid rgba(34, 211, 238, 0.28);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.12), 0 16px 30px rgba(0, 0, 0, 0.4);
}

.button-secondary {
  color: var(--text);
  background: rgba(8, 12, 20, 0.68);
  border: 1px solid var(--line-strong);
}

.hero-trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 30px;
}

.hero-trust > div,
.metric-card,
.module-card,
.pipeline-step,
.dashboard-panel,
.live-panel {
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(8, 12, 20, 0.74);
}

.hero-trust > div {
  padding: 16px;
}

.trust-value {
  display: block;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
}

.trust-label {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.86rem;
}

.hero-dashboard {
  padding: 18px;
  display: grid;
  grid-template-columns: 1.45fr 0.85fr;
  gap: 16px;
}

.dashboard-panel {
  padding: 18px;
  min-height: 100%;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: #dbe6f8;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.panel-badge,
.status {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  border: 1px solid transparent;
}

.panel-badge.live,
.status.active,
.status.success {
  background: rgba(16, 185, 129, 0.14);
  color: #86efac;
  border-color: rgba(16, 185, 129, 0.25);
}

.panel-badge.critical,
.status.critical {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.24);
}

.panel-badge.amber,
.status.processing {
  background: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.24);
}

.signal-map {
  position: relative;
  min-height: 360px;
  margin-top: 16px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background:
    radial-gradient(circle at 25% 20%, rgba(34, 211, 238, 0.12), transparent 18%),
    radial-gradient(circle at 80% 30%, rgba(37, 99, 235, 0.18), transparent 20%),
    linear-gradient(180deg, rgba(5, 6, 10, 0.8), rgba(11, 16, 28, 0.94));
}

.map-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
  background-size: 42px 42px;
}

.map-node,
.connection {
  position: absolute;
}

.map-node {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #d8f8ff;
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.8);
  background: #22d3ee;
}

.node-a { top: 72px; left: 62px; }
.node-b { top: 118px; right: 84px; background: #2563eb; }
.node-c { bottom: 98px; left: 120px; background: #f59e0b; }
.node-d { bottom: 52px; right: 92px; background: #ef4444; }

.connection {
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.85), transparent);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.6);
}

.line-a {
  top: 80px;
  left: 76px;
  width: 45%;
  transform: rotate(11deg);
  transform-origin: left center;
}

.line-b {
  top: 142px;
  right: 88px;
  width: 52%;
  transform: rotate(-19deg);
  transform-origin: right center;
}

.line-c {
  bottom: 108px;
  left: 132px;
  width: 48%;
  transform: rotate(-8deg);
  transform-origin: left center;
}

.mini-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.mini-metrics div {
  padding: 14px;
  border-radius: 16px;
  background: rgba(8, 12, 20, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.mini-metrics strong,
.metric-card strong,
.decision-row strong,
.output-list strong {
  display: block;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 1.1rem;
}

.mini-metrics span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.84rem;
}

.dashboard-stack {
  display: grid;
  gap: 16px;
}

.bar-chart {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  align-items: end;
  min-height: 250px;
  padding: 10px 0 0;
}

.bar-chart span {
  display: block;
  height: var(--bar);
  min-height: 24px;
  border-radius: 16px 16px 6px 6px;
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.95), rgba(37, 99, 235, 0.45));
  box-shadow: 0 0 22px rgba(34, 211, 238, 0.15);
}

.output-list,
.alert-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
}

.output-list li,
.alert-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  align-items: center;
}

.output-list li:first-child,
.alert-list li:first-child {
  border-top: 0;
}

.modules-section,
.architecture-section,
.dashboard-section,
.metrics-section {
  margin-top: 22px;
  padding: 32px;
}

.section-heading {
  max-width: 760px;
}

.section-heading h2 {
  font-size: clamp(2rem, 3vw, 3.5rem);
}

.section-heading p {
  margin: 14px 0 0;
  line-height: 1.7;
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.module-card {
  padding: 22px;
  min-height: 208px;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.module-card:hover,
.pipeline-step:hover,
.live-panel:hover,
.metric-card:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, 0.26);
  background: rgba(8, 12, 20, 0.84);
}

.module-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
}

.module-card h3,
.pipeline-step h3,
.live-panel h3 {
  margin: 18px 0 0;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.module-card p,
.pipeline-step p,
.metric-card p {
  margin: 12px 0 0;
  line-height: 1.7;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
  align-items: stretch;
}

.pipeline-step {
  padding: 20px;
}

.step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 28px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.12);
  color: #a5f3fc;
  border: 1px solid rgba(34, 211, 238, 0.22);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
}

.pipeline-connector {
  align-self: center;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.15), rgba(34, 211, 238, 0.85), rgba(37, 99, 235, 0.15));
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.24);
}

.live-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
  margin-top: 28px;
}

.live-panel {
  padding: 20px;
}

.live-panel-wide {
  grid-column: span 2;
}

.wave-grid {
  margin-top: 18px;
  height: 190px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background:
    linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(5, 6, 10, 0.74), rgba(15, 23, 42, 0.95));
  background-size: 26px 26px, 26px 26px, 100% 100%;
  position: relative;
  overflow: hidden;
}

.wave-grid::before,
.wave-grid::after {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 16px;
  border: 1px solid rgba(34, 211, 238, 0.12);
}

.wave-grid::after {
  inset: 44px;
}

.wave-grid span {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.8), transparent);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.38);
}

.wave-grid span:nth-child(1) { top: 36px; }
.wave-grid span:nth-child(2) { top: 68px; opacity: 0.7; }
.wave-grid span:nth-child(3) { top: 104px; opacity: 0.45; }
.wave-grid span:nth-child(4) { top: 138px; opacity: 0.75; }
.wave-grid span:nth-child(5) { top: 166px; opacity: 0.4; }

.heat-map {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.heat-map span {
  aspect-ratio: 1;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(11, 16, 28, 0.94);
}

.heat-map span:nth-child(3n + 1) {
  background: rgba(239, 68, 68, 0.5);
}

.heat-map span:nth-child(3n + 2) {
  background: rgba(245, 158, 11, 0.42);
}

.heat-map span:nth-child(3n) {
  background: rgba(34, 211, 238, 0.28);
}

.alert-list li {
  justify-content: flex-start;
  align-items: flex-start;
}

.alert-level {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 6px;
  flex: 0 0 auto;
  box-shadow: 0 0 14px currentColor;
}

.alert-level.critical { color: var(--red); background: var(--red); }
.alert-level.amber { color: var(--amber); background: var(--amber); }
.alert-level.blue { color: var(--cyan); background: var(--cyan); }

.decision-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.decision-row div {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(5, 6, 10, 0.7);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.metric-card {
  padding: 24px;
}

.metric-label {
  display: block;
  color: #a5b4c9;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.metric-card strong {
  margin-top: 14px;
  font-size: clamp(2rem, 4vw, 3.3rem);
}

@keyframes drift {
  from {
    transform: translateY(-12%);
  }
  to {
    transform: translateY(12%);
  }
}

@media (max-width: 1120px) {
  .hero,
  .hero-dashboard,
  .live-grid,
  .metrics-grid,
  .modules-grid,
  .pipeline,
  .decision-row {
    grid-template-columns: 1fr 1fr;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    max-width: 13ch;
  }

  .live-panel-wide {
    grid-column: span 2;
  }

  .pipeline {
    grid-template-columns: 1fr;
  }

  .pipeline-connector {
    width: 2px;
    height: 36px;
    justify-self: center;
  }
}

@media (max-width: 760px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .hero-copy,
  .modules-section,
  .architecture-section,
  .dashboard-section,
  .metrics-section,
  .hero-dashboard {
    padding: 20px;
  }

  .hero-copy h1 {
    font-size: clamp(2.5rem, 11vw, 4rem);
  }

  .hero-trust,
  .mini-metrics,
  .modules-grid,
  .live-grid,
  .metrics-grid,
  .decision-row {
    grid-template-columns: 1fr;
  }

  .live-panel-wide {
    grid-column: auto;
  }

  .hero-dashboard {
    grid-template-columns: 1fr;
  }

  .bar-chart {
    min-height: 180px;
  }

  .decision-row li,
  .output-list li,
  .alert-list li {
    flex-direction: column;
    align-items: flex-start;
  }
}
