:root {
  --bg: #0b0b0c;
  --surface-1: #151517;
  --border: #2a2a2d;
  --white: #f7f7f5;
  --muted: #9a9ca3;
  --red: #e4172a;
  --green: #3dd68c;

  --font-display: "Space Grotesk", "Arial Black", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

a {
  color: inherit;
}

/* ---------- atmosphere layers ---------- */

.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(247, 247, 245, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(247, 247, 245, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, black 40%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, black 40%, transparent 90%);
}

.grain {
  position: fixed;
  inset: -10%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.glow {
  position: absolute;
  top: -160px;
  left: 50%;
  width: 900px;
  height: 560px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(228, 23, 42, 0.20), transparent 70%);
  filter: blur(10px);
  z-index: 0;
  pointer-events: none;
}

/* ---------- topbar ---------- */

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px clamp(20px, 5vw, 64px) 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  display: block;
  height: 24px;
  width: auto;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px 7px 12px;
  background: rgba(255, 255, 255, 0.02);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(61, 214, 140, 0.5);
  animation: pulse 2.4s ease-out infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(61, 214, 140, 0.45);
  }

  70% {
    box-shadow: 0 0 0 7px rgba(61, 214, 140, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(61, 214, 140, 0);
  }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(64px, 14vh, 140px) clamp(20px, 5vw, 64px) 40px;
  text-align: center;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 20px;
  opacity: 0;
  animation: rise 0.7s ease forwards;
}

h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 6.4vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 26px;
  opacity: 0;
  animation: rise 0.7s ease 0.1s forwards;
}

.lede {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.65;
  color: var(--muted);
  max-width: 610px;
  margin: 0 auto 64px;
  opacity: 0;
  animation: rise 0.7s ease 0.2s forwards;
}

.cycle {
  color: var(--white);
  font-weight: 600;
  display: inline-block;
  text-align: left;
  min-width: 120px;
  text-align: center;
}

.lede .cycle {
  transition: opacity 0.25s ease;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- stages ---------- */

.stages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  opacity: 0;
  animation: rise 0.7s ease 0.3s forwards;
}

.stage {
  background: var(--surface-1);
  padding: 30px 24px 32px;
  text-align: left;
}

.idx {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--red);
  margin-bottom: 14px;
}

.stage h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.stage p {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}

/* ---------- footer ---------- */

footer {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: 48px clamp(20px, 5vw, 64px) 56px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

footer p {
  margin: 0 0 6px;
}

footer a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

footer a:hover,
footer a:focus-visible {
  color: var(--white);
}

.note {
  opacity: 0.65;
}

/* ---------- focus ---------- */

a:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- responsive ---------- */

@media (max-width: 720px) {
  .stages {
    grid-template-columns: 1fr;
  }

  .lede {
    margin-bottom: 48px;
  }
}

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

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {

  .eyebrow,
  h1,
  .lede,
  .stages {
    animation: none;
    opacity: 1;
  }

  .dot {
    animation: none;
  }

  .lede .cycle {
    transition: none;
  }
}
