:root {
  color-scheme: dark;
  --bg: #090a0d;
  --panel: #13141a;
  --panel-strong: #1d1d27;
  --text: #f4f2ea;
  --muted: #a7a3b4;
  --line: rgba(244, 242, 234, 0.12);
  --green: #96d65b;
  --green-strong: #7bc943;
  --purple: #8f62d7;
  --cyan: #65d7c5;
  --purple-dark: #302049;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 82% 14%, rgba(143, 98, 215, 0.2), transparent 28rem),
    radial-gradient(circle at 8% 84%, rgba(101, 215, 197, 0.1), transparent 24rem),
    linear-gradient(180deg, #090a0d 0%, #101115 100%);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.page-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  position: relative;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  gap: 24px;
}

.brand,
.nav-link {
  display: inline-flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-weight: 760;
  font-size: 1.03rem;
}

.brand img {
  width: 40px;
  height: 40px;
}

.nav-link {
  color: var(--muted);
  font-size: 0.94rem;
  transition:
    color 160ms ease,
    transform 160ms ease;
}

.nav-link:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.hero {
  min-height: min(820px, calc(100vh - 82px));
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(340px, 0.78fr);
  align-items: center;
  gap: 58px;
  padding: 24px 0 58px;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 22px;
  font-size: clamp(3rem, 7.2vw, 6.6rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.lede {
  max-width: 660px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 1.18rem;
  line-height: 1.62;
}

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

.button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 720;
  font: inherit;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.button.primary {
  background: var(--green);
  border-color: var(--green);
  color: #11160e;
  cursor: wait;
  opacity: 1;
}

.button.primary:disabled {
  box-shadow: 0 0 32px rgba(150, 214, 91, 0.18);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
}

.button.secondary:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(244, 242, 234, 0.24);
  transform: translateY(-1px);
}

.trace-stage {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.flow-rail {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 58px;
}

.flow-rail::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(180deg, var(--green), var(--purple), rgba(244, 242, 234, 0.18));
  opacity: 0.8;
}

.rail-node {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(244, 242, 234, 0.24);
  border-radius: 50%;
  background: var(--bg);
  z-index: 1;
}

.rail-node.done {
  border-color: var(--green);
  background: var(--green);
}

.rail-node.active {
  border-color: #ff6b6b;
  background: #ff6b6b;
  box-shadow: 0 0 0 10px rgba(255, 107, 107, 0.12);
  animation: pulse 1600ms ease-in-out infinite;
}

.trace-panel {
  background:
    linear-gradient(145deg, rgba(150, 214, 91, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 22px;
  transform: rotate(1deg);
  animation: floatPanel 5200ms ease-in-out infinite;
  backdrop-filter: blur(16px);
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.86rem;
}

.flow-steps {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.flow-step {
  display: grid;
  grid-template-columns: 34px minmax(84px, 0.48fr) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.flow-step span {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
}

.flow-step strong {
  font-size: 0.92rem;
}

.flow-step small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.flow-step.complete {
  border-color: rgba(150, 214, 91, 0.28);
}

.flow-step.complete span,
.flow-step.complete strong {
  color: var(--green);
}

.flow-step.active {
  border-color: rgba(255, 107, 107, 0.42);
  background: rgba(255, 107, 107, 0.08);
}

.flow-step.active span,
.flow-step.active strong {
  color: #ff9a9a;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff6b6b;
  box-shadow: 0 0 0 6px rgba(255, 107, 107, 0.14);
}

.failure-block,
.metric-grid > div {
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  transition:
    transform 160ms ease,
    border-color 160ms ease;
}

.failure-block {
  margin: 14px 0;
}

.label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 720;
  letter-spacing: 0;
  text-transform: uppercase;
}

strong {
  font-size: 0.98rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.log-lines {
  display: grid;
  gap: 9px;
  margin-top: 18px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
}

.log-lines span {
  padding: 11px 12px;
  background: rgba(143, 98, 215, 0.11);
  border-left: 3px solid var(--purple);
}

.section {
  padding: 56px 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  max-width: 620px;
  margin-bottom: 28px;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.steps article {
  min-height: 206px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.steps article:hover {
  transform: translateY(-4px);
  border-color: rgba(150, 214, 91, 0.34);
  background:
    linear-gradient(180deg, rgba(150, 214, 91, 0.07), rgba(255, 255, 255, 0.012)),
    var(--panel);
}

.steps span {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.steps h3 {
  margin-bottom: 10px;
  font-size: 1.14rem;
}

.steps p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.62;
}

.privacy-band {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(340px, 1fr);
  gap: 64px;
  align-items: center;
  margin: 26px 0 54px;
  padding: 34px 38px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.privacy-band h2 {
  max-width: 560px;
  font-size: clamp(2rem, 3.8vw, 4.1rem);
  line-height: 1;
}

.privacy-band p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.72;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 8px rgba(255, 107, 107, 0.1);
  }

  50% {
    box-shadow: 0 0 0 14px rgba(255, 107, 107, 0.03);
  }
}

@keyframes floatPanel {
  0%,
  100% {
    transform: translateY(0) rotate(1deg);
  }

  50% {
    transform: translateY(-10px) rotate(0deg);
  }
}

@media (max-width: 900px) {
  .hero,
  .privacy-band {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 36px;
    padding-top: 20px;
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .page-shell {
    width: min(100% - 28px, 1120px);
  }

  .nav {
    min-height: 72px;
  }

  .nav-link {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-bottom: 70px;
  }

  h1 {
    font-size: 3rem;
  }

  .lede {
    font-size: 1.02rem;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .metric-grid,
  .steps {
    grid-template-columns: 1fr;
  }

  .flow-step {
    grid-template-columns: 30px 1fr;
  }

  .flow-step small {
    grid-column: 2;
  }

  .trace-stage {
    grid-template-columns: 1fr;
  }

  .flow-rail {
    display: none;
  }

  .trace-panel {
    transform: none;
    animation: none;
  }
}
