:root {
  --signal: #1C7AFE;
  --signal-dark: #0F5BC9;
  --indigo: #1E1A4E;
  --ink: #111E45;
  --ink-2: #384366;
  --ink-3: #525D7E;
  --ink-4: #6C7694;
  --line: #E5E8EF;
  --paper-warm: #F2F4F9;
  --matrix: #1FB879;
  --matrix-deep: #0E7A4C;
  --caution: #E5A33A;
  --caution-deep: #8A5D08;
  --adverse: #DC3E3E;
  --adverse-deep: #B12626;
  --font: 'Onest', system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.2, .7, .15, 1);
  --shadow-card: 0 1px 2px rgba(17,30,69,.05), 0 28px 64px -16px rgba(17,30,69,.20);
  --shadow-chip: 0 1px 2px rgba(17,30,69,.05), 0 10px 26px -10px rgba(17,30,69,.22);
}

* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); background: #fff; color: var(--ink); }

/* ── hero shell — light signal wash + blue grain, fading to white ─────── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 32px 0;
  background:
    radial-gradient(1000px 600px at 16% 0%, rgba(28,122,254,.18), transparent 60%),
    radial-gradient(820px 520px at 92% 6%, rgba(28,122,254,.12), transparent 62%),
    linear-gradient(175deg, #E7F0FE 0%, #F5F8FF 56%, #FFFFFF 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .7;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .11 0 0 0 0 .48 0 0 0 0 1 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: 1160px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: 56px; align-items: center;
}

/* ── copy column ───────────────────────────────────────────────────────── */
.copy { padding-bottom: 72px; }
.hero-eyebrow {
  font-family: var(--font-label, var(--font)); text-transform: uppercase;
  font-size: 12px; font-weight: 600; letter-spacing: .13em; color: var(--signal);
  margin: 0 0 16px;
}
.hero-headline {
  font-size: clamp(38px, 4.3vw, 58px);
  line-height: 1.06; letter-spacing: -.022em; font-weight: 700;
  color: var(--ink); text-wrap: balance; margin: 0 0 18px;
}
.hero-headline em { color: var(--signal); font-weight: 300; font-style: normal; }
.hero-sub { font-size: 17px; line-height: 1.55; color: var(--ink-2); max-width: 470px; margin: 0 0 30px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-weight: 600; font-size: 15px;
  padding: 12px 22px; border-radius: 10px; text-decoration: none;
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease;
}
.hero-btn-primary { background: var(--ink); color: #fff; }
.hero-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(17,30,69,.22); }
.hero-btn-secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.hero-btn-secondary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(17,30,69,.10); }
.hero-btn .lucide { width: 14px; height: 14px; stroke-width: 2; }

/* ── stage — card, thread, satellites, tile all positioned off one box ── */
.stage { position: relative; height: 540px; }
/* no tweening until the first layout lands — otherwise everything flies in from the corner */
.stage:not(.is-ready) * { transition: none !important; }

.card {
  position: absolute; left: 6%; top: 64px; width: 74%; height: 330px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-card); z-index: 1;
}
.card-grid {
  position: absolute; left: 16px; right: 16px; top: 46px; bottom: 16px;
  background-image: radial-gradient(circle, rgba(17,30,69,.20) 1px, transparent 1.3px);
  background-size: 22px 22px; background-position: center;
}
.card-head {
  position: absolute; top: 0; left: 0; right: 0; height: 46px;
  display: flex; align-items: center; gap: 9px; padding: 0 16px;
  font-size: 13.5px; font-weight: 600; color: var(--ink);
}
.card-head-ico { position: relative; width: 22px; height: 22px; flex: none; }
.card-head-ico .lucide {
  position: absolute; inset: 0; margin: auto; width: 15px; height: 15px;
  stroke-width: 1.75; color: var(--ink-3); opacity: 0; transition: opacity .35s ease;
}
.card-head-ico .lucide.is-active { opacity: 1; }
.card-title { transition: opacity .35s ease, transform .35s var(--ease); }
.card-title.is-out { opacity: 0; transform: translateY(-4px); }
.card-live {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-label, var(--font)); text-transform: uppercase;
  font-size: 10px; font-weight: 600; letter-spacing: .1em; color: var(--ink-4);
}
.card-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--matrix); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(31,184,121,.45); } 60% { box-shadow: 0 0 0 5px rgba(31,184,121,0); } }

/* the thread — solid Signal line through the card, dotted elbow below it */
.thread {
  position: absolute; left: var(--tx, 43%); top: 0; width: 1.5px; height: var(--te, 452px);
  background: linear-gradient(180deg, rgba(28,122,254,0) 0%, var(--signal) 14%, var(--signal) 100%);
  z-index: 2; pointer-events: none;
}
.thread::after {
  content: ""; position: absolute; left: 50%; top: 14%; width: 7px; height: 7px;
  border-radius: 50%; background: var(--signal); transform: translate(-50%, -50%);
  box-shadow: 0 0 0 4px rgba(28,122,254,.18);
  animation: travel 3.6s var(--ease) infinite;
}
@keyframes travel { 0% { top: 14%; opacity: 0; } 8% { opacity: 1; } 78% { top: 100%; opacity: 1; } 84%, 100% { top: 100%; opacity: 0; } }
.thread-elbow {
  position: absolute; left: calc(var(--tx, 43%) - 112px); top: var(--te, 452px);
  width: 112px; height: calc(100% - var(--te, 452px));
  border-top: 1.5px dotted rgba(17,30,69,.35); border-left: 1.5px dotted rgba(17,30,69,.35);
  border-top-left-radius: 18px; z-index: 0; pointer-events: none;
}

/* steps live in a clipped overlay the size of the card so they enter/exit inside it */
.scenes {
  position: absolute; left: 6%; top: 64px; width: 74%; height: 330px;
  border-radius: 16px; overflow: hidden; z-index: 3; pointer-events: none;
  /* steps dissolve before they reach the header */
  -webkit-mask-image: linear-gradient(180deg, transparent 38px, #000 96px);
  mask-image: linear-gradient(180deg, transparent 38px, #000 96px);
}
.step {
  position: absolute; left: 50%; top: 0;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  opacity: 0; transform: translate(-50%, 240px);
  transition: transform .8s var(--ease), opacity .55s ease;
  will-change: transform, opacity;
}
.step-pill {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  background: #fff; border: 1px solid var(--line); border-radius: 100px;
  padding: 7px 13px 7px 9px; font-size: 12.5px; font-weight: 500; color: var(--ink);
  box-shadow: var(--shadow-chip);
}
.step-pill .lucide { width: 13px; height: 13px; stroke-width: 1.9; color: var(--ink-4); flex: none; }
.step-pill.t-ok .lucide { color: var(--matrix-deep); }
.step-pill.t-warn .lucide { color: var(--caution-deep); }
.step-pill.t-bad .lucide { color: var(--adverse-deep); }
.step-pill.t-signal { border-color: rgba(28,122,254,.35); background: #EEF5FF; color: var(--signal-dark); }
.step-pill.t-signal .lucide { color: var(--signal); }
.step-pill.t-muted { color: var(--ink-3); }
/* focus — the owner, then the address, get a beat of their own */
.card-focus {
  font-size: 11px; font-weight: 600; color: var(--signal-dark);
  background: #EEF5FF; border: 1px solid rgba(28,122,254,.3); border-radius: 100px; padding: 2px 9px;
}
.card-focus:empty { display: none; }
.step-focus {
  width: 300px; max-width: 92vw; text-align: left;
  background: #fff; border: 1px solid rgba(28,122,254,.45); border-radius: 12px;
  padding: 11px 13px 10px;
  box-shadow: 0 1px 2px rgba(17,30,69,.05), 0 18px 36px -14px rgba(28,122,254,.45);
}
.focus-kicker {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-label, var(--font)); text-transform: uppercase;
  font-size: 9.5px; font-weight: 600; letter-spacing: .1em; color: var(--signal);
}
.focus-kicker .lucide { width: 12px; height: 12px; stroke-width: 2; }
.focus-title { font-size: 14px; font-weight: 700; color: var(--ink); margin: 3px 0 8px; letter-spacing: -.01em; }
.focus-rows { list-style: none; margin: 0; padding: 7px 0 0; border-top: 1px solid var(--line); display: grid; gap: 5px; }
.focus-row {
  display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--ink-2);
  opacity: 0; transform: translateY(5px); transition: opacity .5s ease, transform .6s var(--ease);
}
.focus-row.is-in { opacity: 1; transform: none; }
.focus-row .lucide { width: 13px; height: 13px; stroke-width: 2; color: var(--matrix-deep); flex: none; }
.focus-row.t-muted .lucide { color: var(--ink-4); }
.focus-text { flex: 1; }
.focus-src {
  font-family: var(--font-label, var(--font)); text-transform: uppercase;
  font-size: 9px; font-weight: 600; letter-spacing: .08em; color: var(--ink-3);
  background: var(--paper-warm); border: 1px solid var(--line); border-radius: 5px; padding: 2px 6px;
}

/* merge — several records with no shared key converge into one business */
.step-merge { position: relative; }
.step-merge .step-pill {
  position: absolute; left: 50%; top: 0;
  transition: transform 1s var(--ease), opacity .7s ease;
}
.step-merge .cand { color: var(--ink-2); border-style: dashed; }
.step-merge .cand .lucide { color: var(--ink-4); }
.step-merge .merged { font-weight: 600; }
.step-sub {
  font-family: var(--font-label, var(--font)); text-transform: uppercase;
  font-size: 9.5px; font-weight: 600; letter-spacing: .08em; color: var(--ink-4);
  background: #EFF1F6; padding: 3px 9px; border-radius: 6px; white-space: nowrap; /* solid, so the thread passes behind it */
}
.step-card {
  width: 292px; max-width: 92vw; text-align: left;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 13px 12px; box-shadow: var(--shadow-chip);
}
.step-card-row { display: flex; align-items: center; gap: 8px; }
.step-card-row .lucide { width: 14px; height: 14px; stroke-width: 1.9; flex: none; color: var(--ink-3); }
.step-card.t-warn .step-card-row .lucide { color: var(--caution-deep); }
.step-card.t-bad .step-card-row .lucide { color: var(--adverse-deep); }
.step-card.t-ok .step-card-row .lucide { color: var(--matrix-deep); }
.step-card-title { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.step-card-sub { margin: 4px 0 0 22px; font-size: 11.5px; line-height: 1.4; color: var(--ink-3); }
.step-tags { display: flex; gap: 6px; margin: 9px 0 0 22px; flex-wrap: wrap; }
.step-tag {
  font-family: var(--font-label, var(--font)); text-transform: uppercase;
  font-size: 9.5px; font-weight: 600; letter-spacing: .08em; color: var(--ink-2);
  background: var(--paper-warm); border: 1px solid var(--line); border-radius: 5px; padding: 3px 7px;
}

/* satellites — the other stages, orbiting the card; the active one docks into the header */
.sat {
  position: absolute; left: 0; top: 0; z-index: 4;
  display: inline-flex; align-items: center; gap: 9px; white-space: nowrap;
  background: #fff; border: 1px solid var(--line); border-radius: 11px;
  padding: 8px 15px 8px 9px; font-size: 13px; font-weight: 600; color: var(--ink);
  box-shadow: var(--shadow-chip);
  transition: transform .85s var(--ease), opacity .4s ease .1s;
}
.sat.is-docked { opacity: 0; transition: transform .85s var(--ease), opacity .3s ease .45s; }
.sat-ico {
  width: 24px; height: 24px; border-radius: 50%; background: var(--paper-warm);
  display: grid; place-items: center; flex: none;
}
.sat-ico .lucide { width: 13px; height: 13px; stroke-width: 1.75; color: var(--ink-2); }

/* the mark — a floating tile that drifts to a new corner each stage */
.tile {
  position: absolute; left: 0; top: 0; z-index: 5;
  width: 84px; height: 84px; border-radius: 22px; background: #fff;
  box-shadow: 0 2px 4px rgba(17,30,69,.06), 0 22px 44px -12px rgba(17,30,69,.30);
  display: grid; place-items: center;
  transition: transform .95s var(--ease);
}
.tile img { width: 40px; height: 40px; animation: bob 6s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* ── responsive ───────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .hero { padding-top: 48px; }
  .hero-inner { grid-template-columns: 1fr; gap: 8px; }
  .copy { padding-bottom: 24px; text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-ctas { justify-content: center; }
  .stage { height: 520px; width: 100%; max-width: 560px; margin: 0 auto; }
  .card, .scenes { left: 4%; width: 78%; }
}
@media (max-width: 520px) {
  .hero { padding-left: 16px; padding-right: 16px; }
  /* the kicker splits into two clean lines on phones */
  .hero-eyebrow-sep { display: none; }
  .hero-eyebrow-line { display: block; margin-top: 6px; }
  .stage { height: 500px; }
  .card, .scenes { left: 0; width: 84%; height: 320px; }
  .tile { width: 64px; height: 64px; border-radius: 18px; }
  .tile img { width: 30px; height: 30px; }
  .sat { font-size: 12px; padding: 7px 12px 7px 8px; }
  .step-card { width: 250px; }
  .step-focus { width: 262px; }
}
@media (prefers-reduced-motion: reduce) {
  .step, .sat, .tile, .card-title, .card-head-ico .lucide { transition: none; }
  .thread::after, .tile img, .card-live i { animation: none; }
}
