:root {
  --bg-light: #ffffff;
  --bg-light-subtle: #f8f9fc;
  --bg-dark: #121317;
  --bg-dark-deep: #090a0d;
  --ink-dark: #121317;
  --ink-muted: #45474d;
  --ink-subtle: #787d8a;
  --ink-light: #f8f9fc;
  --ink-light-muted: #a1a7b8;
  --border-light: rgba(18, 19, 23, 0.08);
  --border-dark: rgba(248, 249, 252, 0.09);
  --accent-blue: #3279f9;
  --accent-violet: #7c5cff;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #ec4899;
  --font-display: "Space Grotesk", "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg-light);
  color: var(--ink-dark);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg-light);
}

.mono {
  font-family: var(--font-mono);
}

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

/* TOP BAR */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 18px 24px;
  pointer-events: none;
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink-dark);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(18, 19, 23, 0.04);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.brand:hover {
  transform: translateY(-1px);
  border-color: rgba(50, 121, 249, 0.35);
}

.brand-mark {
  position: relative;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-core {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-dark);
}

.brand-orbit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px dashed var(--accent-blue);
  animation: spin-slow 12s linear infinite;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}

.brand-tld {
  color: var(--accent-blue);
}

.status-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(18, 19, 23, 0.04);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-blue);
  box-shadow: 0 0 0 0 rgba(50, 121, 249, 0.55);
  animation: pulse-ring 2.2s ease-out infinite;
}

.status-sep {
  opacity: 0.35;
}

/* HERO */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 112px 24px 80px;
  background: var(--bg-light);
  overflow: hidden;
  cursor: crosshair;
}

.gravity-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}

.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(
    circle at 50% 48%,
    rgba(255, 255, 255, 0.88) 0%,
    rgba(255, 255, 255, 0.55) 32%,
    rgba(255, 255, 255, 0) 68%
  );
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 960px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  background: rgba(248, 249, 252, 0.85);
  backdrop-filter: blur(10px);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  margin-bottom: 28px;
  animation: float-slow 6s ease-in-out infinite;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-violet));
}

.hero-title {
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 6.8vw, 5.5rem);
  line-height: 1.03;
  letter-spacing: -0.04em;
  color: var(--ink-dark);
  min-height: 2.15em;
}

.typed-line {
  display: block;
}

.typed-line-accent {
  background: linear-gradient(95deg, #121317 10%, #3279f9 55%, #7c5cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.typed-cursor {
  display: inline-block;
  width: 3px;
  height: 0.82em;
  margin-left: 6px;
  vertical-align: -0.08em;
  border-radius: 2px;
  background: var(--accent-blue);
  box-shadow: 0 0 12px rgba(50, 121, 249, 0.55);
  animation: blink-cursor 1s steps(1, end) infinite;
}

.hero-subtitle {
  margin: 0 0 44px;
  max-width: 560px;
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.65;
  color: var(--ink-muted);
  font-weight: 400;
}

/* TELEMETRY BAR */
.telemetry-bar {
  pointer-events: auto;
  width: 100%;
  max-width: 780px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--border-light);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 20px 50px rgba(18, 19, 23, 0.06),
    0 1px 2px rgba(18, 19, 23, 0.03);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.telemetry-cell {
  background: rgba(255, 255, 255, 0.86);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: background 0.25s ease;
}

.telemetry-cell:hover {
  background: rgba(248, 249, 252, 0.96);
}

.telemetry-key {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--ink-subtle);
}

.telemetry-val {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink-dark);
}

.telemetry-val.masked {
  letter-spacing: 0.08em;
  color: var(--accent-blue);
}

.telemetry-val.status-closed {
  color: var(--accent-violet);
}

.canvas-hint {
  margin: 24px 0 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  opacity: 0.75;
}

.scroll-cue {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  width: 28px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.scroll-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, rgba(18, 19, 23, 0), rgba(50, 121, 249, 0.7), rgba(18, 19, 23, 0));
  animation: scroll-drop 2.2s ease-in-out infinite;
}

/* OBSIDIAN HORIZON SECTION */
.horizon {
  position: relative;
  background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-dark-deep) 100%);
  color: var(--ink-light);
  padding: 120px 24px 104px;
  overflow: hidden;
}

.horizon-glow {
  position: absolute;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: 960px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(50, 121, 249, 0.24) 0%,
    rgba(124, 92, 255, 0.12) 40%,
    rgba(18, 19, 23, 0) 72%
  );
  pointer-events: none;
  filter: blur(28px);
}

.container {
  position: relative;
  z-index: 2;
  max-width: 1080px;
  margin: 0 auto;
}

.section-head {
  text-align: center;
  margin-bottom: 56px;
}

.section-kicker {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--accent-blue);
  margin-bottom: 16px;
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--ink-light);
}

/* RELAY MONITOR */
.relay-stage {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-dark);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.45);
  margin-bottom: 48px;
}

.relay-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-dark);
  background: rgba(255, 255, 255, 0.02);
  flex-wrap: wrap;
}

.relay-chrome-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chrome-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.7);
}

.chrome-title {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--ink-light-muted);
}

.pulse-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(50, 121, 249, 0.45);
  background: rgba(50, 121, 249, 0.12);
  color: #dbeafe;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.pulse-btn:hover {
  background: rgba(50, 121, 249, 0.24);
  border-color: rgba(50, 121, 249, 0.8);
  transform: translateY(-1px);
}

.pulse-btn:active {
  transform: translateY(0);
}

.pulse-btn-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-blue);
}

.relay-visual {
  display: grid;
  grid-template-columns: 1fr minmax(180px, 1.1fr) 1fr;
  align-items: center;
  gap: 20px;
  padding: 36px 28px;
  border-bottom: 1px solid var(--border-dark);
}

.node-box {
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-dark);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.node-tag {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--ink-light-muted);
}

.node-value {
  font-size: 0.88rem;
  color: var(--ink-light);
  word-break: break-all;
}

.node-shield .node-value {
  color: var(--accent-cyan);
}

.relay-bridge {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.bridge-track {
  position: relative;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(50, 121, 249, 0.15), rgba(50, 121, 249, 0.6), rgba(6, 182, 212, 0.15));
  overflow: hidden;
  border-radius: 2px;
}

.bridge-packet {
  position: absolute;
  top: -2px;
  left: -20%;
  width: 28%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #3279f9, #06b6d4);
  filter: blur(0.5px);
}

.bridge-packet.firing {
  animation: packet-fly 1.15s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.bridge-core {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-light);
  background: linear-gradient(135deg, rgba(50, 121, 249, 0.2), rgba(124, 92, 255, 0.2));
  border: 1px solid rgba(124, 92, 255, 0.45);
  box-shadow: 0 0 32px rgba(50, 121, 249, 0.25);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.relay-stage.pulse-active .bridge-core {
  transform: scale(1.08);
  box-shadow: 0 0 42px rgba(6, 182, 212, 0.5);
}

.bridge-label {
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  color: var(--ink-light-muted);
  text-align: center;
}

.relay-log {
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.76rem;
  min-height: 148px;
}

.log-row {
  display: grid;
  grid-template-columns: 74px minmax(160px, 1.2fr) 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--ink-light-muted);
  animation: row-in 0.35s ease;
}

.log-ts {
  color: #6b7280;
}

.log-alias {
  color: var(--ink-light);
}

.log-route {
  color: var(--ink-light-muted);
}

.log-badge {
  font-size: 0.66rem;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.06em;
}

.log-badge.pass {
  background: rgba(16, 185, 129, 0.14);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.log-badge.drop {
  background: rgba(236, 72, 153, 0.14);
  color: #f9a8d4;
  border: 1px solid rgba(236, 72, 153, 0.3);
}

/* AXIOMS */
.axioms-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.axiom-card {
  position: relative;
  padding: 30px 26px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-dark);
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.axiom-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    300px circle at var(--mx, 50%) var(--my, 50%),
    rgba(50, 121, 249, 0.14),
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.axiom-card:hover {
  transform: translateY(-4px);
  border-color: rgba(50, 121, 249, 0.35);
}

.axiom-card:hover::before {
  opacity: 1;
}

.axiom-index {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--accent-blue);
  margin-bottom: 18px;
}

.axiom-title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.32rem;
  letter-spacing: -0.02em;
  color: var(--ink-light);
}

.axiom-copy {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--ink-light-muted);
}

/* FOOTER */
.footer {
  background: var(--bg-dark-deep);
  border-top: 1px solid var(--border-dark);
  padding: 34px 24px;
  color: var(--ink-light-muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-brand .brand-name {
  color: var(--ink-light);
}

.footer-note,
.footer-meta {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* REVEAL */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1), transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ANIMATIONS */
@keyframes spin-slow {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(50, 121, 249, 0.55);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(50, 121, 249, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(50, 121, 249, 0);
  }
}

@keyframes blink-cursor {
  0%, 49% {
    opacity: 1;
  }
  50%, 100% {
    opacity: 0;
  }
}

@keyframes float-slow {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes scroll-drop {
  0% {
    transform: scaleY(0.2);
    opacity: 0;
  }
  45% {
    transform: scaleY(1);
    opacity: 1;
  }
  100% {
    transform: scaleY(0.2) translateY(10px);
    opacity: 0;
  }
}

@keyframes packet-fly {
  0% {
    left: -25%;
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    left: 105%;
    opacity: 0;
  }
}

@keyframes row-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* RESPONSIVE */
@media (max-width: 860px) {
  .telemetry-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .relay-visual {
    grid-template-columns: 1fr;
    text-align: center;
  }

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

  .log-row {
    grid-template-columns: 64px 1fr auto;
  }

  .log-route {
    display: none;
  }
}

@media (max-width: 540px) {
  .topbar {
    padding: 14px 16px;
  }

  .status-clock,
  .status-sep {
    display: none;
  }

  .hero {
    padding-top: 96px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .brand-orbit,
  .pulse-dot,
  .eyebrow,
  .scroll-line,
  .typed-cursor {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
