/* Reef — guarded claw-to-claw communication.
   Deep-sea instrument aesthetic: abyssal dark, bioluminescent accents,
   Fraunces display over IBM Plex Mono readouts. Committed dark by design. */

:root {
  color-scheme: dark;

  --abyss: #04161b;
  --trench: #071c22;
  --surface: #0a2a32;
  --surface-2: #0d353f;
  --shelf: #113d48;

  --coral: #ff6f4d;
  --coral-soft: #ff9573;
  --amber: #ffb25e;
  --foam: #7fd8c4;
  --foam-dim: #4e9b8c;

  --paper: #ecf6f2;
  --muted: #93b3ad;
  --faint: #5f827c;

  --line: rgba(127, 216, 196, 0.14);
  --line-strong: rgba(127, 216, 196, 0.26);
  --wash: rgba(127, 216, 196, 0.05);

  --page: min(1320px, calc(100% - 56px));
  --display: "Fraunces", Georgia, serif;
  --sans: "Hanken Grotesk", "Avenir Next", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  /* clip, not hidden: hidden makes body a scroll container, which would pin
     the view() reveal timelines at progress 0 */
  overflow-x: clip;
  background: var(--abyss);
  color: var(--paper);
  font: 400 16px/1.62 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Atmosphere: light from the surface fading into the trench, plus a grain veil. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(120% 70% at 76% -12%, rgba(255, 111, 77, 0.14), transparent 46%),
    radial-gradient(90% 55% at 8% -8%, rgba(127, 216, 196, 0.12), transparent 50%),
    radial-gradient(140% 100% at 50% 120%, rgba(4, 12, 15, 0.9), transparent 60%),
    linear-gradient(180deg, #061f26 0%, var(--abyss) 44%, #030f13 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

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

svg {
  display: block;
  max-width: 100%;
}

::selection {
  background: rgba(255, 111, 77, 0.28);
  color: #fff;
}

.skip {
  position: fixed;
  z-index: 40;
  top: 14px;
  left: 14px;
  padding: 10px 14px;
  background: var(--coral);
  color: #0a1113;
  font: 600 13px var(--sans);
  border-radius: 3px;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}
.skip:focus {
  transform: none;
}

.mono {
  font: 500 11px/1.4 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ---------- Header ---------- */

header {
  width: var(--page);
  height: 88px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 6;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font: 500 30px/1 var(--display);
  font-optical-sizing: auto;
  letter-spacing: -0.01em;
  color: var(--paper);
}
.brand svg {
  width: 36px;
  fill: none;
  stroke: var(--foam);
  stroke-width: 3.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 10px rgba(127, 216, 196, 0.35));
}
.brand svg .claw {
  stroke: var(--coral);
}
.brand svg .dot {
  fill: var(--amber);
  stroke: none;
}

header nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
}
header nav a {
  color: var(--muted);
  font: 500 13.5px var(--sans);
  transition: color 0.2s;
}
header nav a:hover {
  color: var(--paper);
}
header nav .git {
  padding: 9px 18px;
  color: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  transition: 0.2s var(--ease);
}
header nav .git:hover {
  border-color: var(--coral);
  color: #fff;
  box-shadow: 0 0 24px rgba(255, 111, 77, 0.24);
}

/* ---------- Buttons ---------- */

.button {
  min-height: 52px;
  padding: 0 26px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font: 600 14px var(--sans);
  letter-spacing: 0.01em;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  color: var(--paper);
  background: rgba(255, 255, 255, 0.015);
  transition: 0.22s var(--ease);
}
.button span {
  transition: transform 0.22s var(--ease);
}
.button:hover {
  border-color: var(--foam);
  background: rgba(127, 216, 196, 0.07);
}
.button:hover span {
  transform: translateX(4px);
}
.button.primary {
  color: #120a08;
  border-color: transparent;
  background: linear-gradient(180deg, var(--coral-soft), var(--coral));
  box-shadow:
    0 12px 34px -12px rgba(255, 111, 77, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
}
.button.primary:hover {
  background: linear-gradient(180deg, #ffa583, var(--coral-soft));
  box-shadow:
    0 16px 40px -12px rgba(255, 111, 77, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* ---------- Section scaffold ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--foam);
  font: 500 11px var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, var(--coral), transparent);
}

.section {
  width: var(--page);
  margin: auto;
  padding: clamp(84px, 9.5vw, 132px) 0;
  position: relative;
}
.section + .section {
  border-top: 1px solid var(--line);
}

.label {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 0 0 34px;
  color: var(--muted);
  font: 500 11px var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.label b {
  color: var(--coral);
  font-weight: 500;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-optical-sizing: auto;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
  text-wrap: balance;
  margin: 0;
}
h2 {
  font-size: clamp(38px, 4.6vw, 64px);
}
em {
  font-style: italic;
  color: var(--coral-soft);
}

.lead {
  color: var(--paper);
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.55;
}
p {
  color: var(--muted);
}

/* ---------- Hero ---------- */

.hero {
  width: var(--page);
  margin: auto;
  min-height: calc(100svh - 88px);
  padding: clamp(40px, 6vw, 76px) 0 40px;
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(340px, 0.68fr);
  grid-template-rows: 1fr auto;
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
  position: relative;
}

.hero-copy {
  position: relative;
  z-index: 2;
  animation: rise 0.9s var(--ease) both;
}
.hero h1 {
  margin: 26px 0 0;
  font-size: clamp(46px, 6vw, 94px);
  line-height: 0.96;
  letter-spacing: -0.03em;
  max-width: 12ch;
}
.hero .deck {
  max-width: 46ch;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.6;
}
.hero .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 40px;
}

.hero-foot {
  grid-column: 1 / -1;
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font: 500 10.5px var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.hero-foot span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.hero-foot span::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--foam-dim);
}
.hero-foot span:first-child::before {
  background: var(--coral);
}

/* ---------- Channel monitor (hero centerpiece) ---------- */

.monitor {
  position: relative;
  z-index: 2;
  justify-self: end;
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(17, 61, 72, 0.6), rgba(6, 26, 32, 0.55));
  box-shadow:
    0 40px 90px -40px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(127, 216, 196, 0.12);
  backdrop-filter: blur(2px);
  overflow: hidden;
  animation: rise 0.9s var(--ease) 0.14s both;
}
.monitor::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 60% at 50% -10%, rgba(255, 111, 77, 0.1), transparent 60%);
}

.monitor-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.monitor-top .mono {
  color: var(--foam);
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 500 10px var(--mono);
  letter-spacing: 0.14em;
  color: var(--paper);
}
.status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 0 rgba(255, 111, 77, 0.6);
  animation: beacon 2.6s ease-out infinite;
}

.pipeline {
  list-style: none;
  margin: 0;
  padding: 22px 20px 18px;
  position: relative;
}
/* vertical rail */
.pipeline::before {
  content: "";
  position: absolute;
  left: 33px;
  top: 34px;
  bottom: 30px;
  width: 1px;
  background: linear-gradient(180deg, var(--line-strong), var(--line), var(--line-strong));
}
/* descending packet */
.pipeline::after {
  content: "";
  position: absolute;
  left: 30px;
  top: 30px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 14px 3px rgba(255, 111, 77, 0.7);
  animation: descend 7s linear infinite;
}

.stage {
  position: relative;
  display: grid;
  grid-template-columns: 27px 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 46px;
}
.stage .node {
  width: 13px;
  height: 13px;
  margin-left: 1px;
  border: 1.5px solid var(--foam-dim);
  border-radius: 3px;
  background: var(--trench);
  position: relative;
  z-index: 1;
}
.stage.claw .node {
  border-radius: 50%;
  border-color: var(--coral);
  background: radial-gradient(circle, var(--coral-soft), var(--coral));
  box-shadow: 0 0 10px rgba(255, 111, 77, 0.5);
}
.stage.seal .node {
  transform: rotate(45deg);
  border-color: var(--amber);
  background: rgba(255, 178, 94, 0.28);
}
.stage.relay .node {
  border-style: dashed;
  background: transparent;
}
.stage b {
  display: block;
  font: 500 11.5px var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--paper);
}
.stage em {
  font: 400 10px var(--mono);
  font-style: normal;
  letter-spacing: 0.04em;
  color: var(--faint);
}
.verdict {
  align-self: start;
  margin-top: 3px;
  font: 500 10px var(--mono);
  letter-spacing: 0.08em;
  color: var(--muted);
}
.verdict.ok {
  color: var(--foam);
}
.verdict.lock {
  color: var(--amber);
}

.monitor-foot {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.monitor-foot > div {
  padding: 13px 16px;
}
.monitor-foot > div + div {
  border-left: 1px solid var(--line);
}
.monitor-foot dt {
  margin: 0;
  color: var(--faint);
  font: 500 8.5px var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.monitor-foot dd {
  margin: 4px 0 0;
  color: var(--paper);
  font: 400 10.5px var(--mono);
  white-space: nowrap;
}

/* ---------- 01 Problem ---------- */

.problem .split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(40px, 7vw, 110px);
  align-items: start;
}
.problem .split > div {
  padding-top: clamp(6px, 1.4vw, 22px);
}
.problem h2 {
  max-width: 12ch;
}
.problem .lead {
  color: var(--paper);
}
.problem .split p:last-child {
  margin-top: 20px;
}

/* ---------- 02 Guarded flow ---------- */

.flow-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 44px;
  flex-wrap: wrap;
}
.flow-head h2 {
  max-width: 15ch;
}
.flow-head p {
  max-width: 34ch;
  margin: 0 0 6px;
}
.flow {
  margin-top: 66px;
  overflow-x: auto;
  scrollbar-width: none;
}
.flow::-webkit-scrollbar {
  display: none;
}
.flow-track {
  min-width: 900px;
  display: grid;
  /* 5 nodes + 4 connectors = 9 columns */
  grid-template-columns:
    minmax(0, 1fr) clamp(26px, 3vw, 54px) minmax(0, 1fr) clamp(26px, 3vw, 54px)
    minmax(0, 1.06fr) clamp(26px, 3vw, 54px) minmax(0, 1fr) clamp(26px, 3vw, 54px)
    minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  position: relative;
}
.flow-node {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 26px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(160deg, var(--wash), transparent 70%);
  text-align: center;
}
.flow-node .glyph {
  width: 46px;
  height: 46px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  color: var(--foam);
}
.flow-node.claw .glyph {
  border-color: rgba(255, 111, 77, 0.4);
  color: var(--coral);
  box-shadow: inset 0 0 20px rgba(255, 111, 77, 0.12);
}
.flow-node.seal .glyph {
  border-color: rgba(255, 178, 94, 0.4);
  color: var(--amber);
}
.flow-node b {
  display: block;
  font: 500 11px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper);
}
.flow-node small {
  display: block;
  margin-top: 6px;
  color: var(--faint);
  font: 400 10px var(--mono);
  letter-spacing: 0.04em;
}
.flow-link {
  align-self: center;
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--foam-dim) 0 5px, transparent 5px 11px);
  position: relative;
}
.flow-link::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-top: 1px solid var(--foam-dim);
  border-right: 1px solid var(--foam-dim);
  transform: translateY(-50%) rotate(45deg);
}
.flow-relay {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 30px;
  text-align: center;
  color: var(--foam);
  font: 500 10px var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.flow-relay::before,
.flow-relay::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong));
}
.flow-relay::after {
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

/* ---------- 03 Mechanics ---------- */

.mechanics h2 {
  max-width: 16ch;
}
.features {
  margin-top: 60px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.features article {
  position: relative;
  padding: clamp(30px, 4vw, 52px);
  background: var(--abyss);
  transition: background 0.3s var(--ease);
}
.features article:hover {
  background: var(--trench);
}
.features article > b {
  position: absolute;
  top: 22px;
  right: 24px;
  color: var(--coral);
  font: 500 11px var(--mono);
}
.features h3 {
  margin: 0 0 16px;
  font-size: 30px;
  letter-spacing: -0.01em;
}
.features p {
  min-height: 84px;
  font-size: 15px;
}
.features code {
  color: var(--foam);
  font: 400 10.5px var(--mono);
  letter-spacing: 0.02em;
}

/* ---------- 04 Safety ---------- */

.safety {
  position: relative;
}
.safety::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 calc(50% - 50vw);
  background:
    radial-gradient(60% 90% at 82% 30%, rgba(255, 111, 77, 0.07), transparent 60%),
    var(--trench);
}
.safety-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(360px, 1.15fr);
  gap: clamp(44px, 8vw, 120px);
}
.safety h2 {
  max-width: 12ch;
}
.safety-grid > div .lead {
  margin-top: 22px;
  color: var(--muted);
  font-size: 17px;
}
.safety ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.safety li {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 18px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.safety li:last-child {
  border-bottom: 1px solid var(--line);
}
.safety li > span {
  color: var(--coral);
  font: 500 11px var(--mono);
}
.safety strong {
  font: 600 15.5px var(--sans);
  color: var(--paper);
}
.safety li p {
  margin: 7px 0 0;
  font-size: 13.5px;
}

/* ---------- 05 Autonomy ---------- */

.autonomy .flow-head {
  margin-bottom: 56px;
}
.tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.tiers article {
  position: relative;
  padding: 30px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--wash), transparent);
}
.tiers article.recommended {
  border-color: rgba(255, 111, 77, 0.4);
  background: linear-gradient(180deg, rgba(255, 111, 77, 0.08), transparent);
  box-shadow: 0 30px 60px -30px rgba(255, 111, 77, 0.3);
}
.tiers article > b {
  position: absolute;
  right: 24px;
  top: 24px;
  color: var(--coral);
  font: 500 9px var(--mono);
  letter-spacing: 0.14em;
}
.tiers h3 {
  margin: 0 0 4px;
  font-size: 26px;
}
.tiers h3 span {
  margin-right: 11px;
  color: var(--coral);
  font: 500 10px var(--mono);
}
.tiers p {
  flex: 1;
  font-size: 13.5px;
}
.meter {
  display: flex;
  gap: 5px;
  margin-top: 30px;
}
.meter i {
  width: 20px;
  height: 3px;
  border-radius: 2px;
  background: var(--foam-dim);
}
.recommended .meter i {
  background: var(--coral);
}

/* ---------- 06 Self-host ---------- */

.host-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 7vw, 96px);
  padding: clamp(34px, 5vw, 60px);
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(17, 61, 72, 0.5), rgba(6, 26, 32, 0.4));
}
.host-card h2 {
  font-size: clamp(36px, 4.4vw, 58px);
}
.host-card a {
  display: inline-block;
  margin-top: 26px;
  color: var(--coral);
  font: 600 13.5px var(--sans);
}
.host-card a:hover {
  color: var(--coral-soft);
}
.host-card pre {
  margin: 0;
  padding: 26px;
  overflow: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(2, 12, 15, 0.7);
  color: var(--foam);
  font: 400 12px/1.9 var(--mono);
}
.host-card pre b {
  color: var(--coral);
  font-weight: 400;
}
.host-card pre i {
  color: var(--faint);
  font-style: normal;
}

/* ---------- 07 Signup ---------- */

.signup-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(400px, 1.1fr);
  gap: clamp(44px, 8vw, 110px);
  align-items: center;
}
.signup-grid h2 {
  max-width: 12ch;
}
.signup-grid .lead {
  max-width: 40ch;
  margin-top: 22px;
  color: var(--muted);
  font-size: 17px;
}
.signup-form {
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(127, 216, 196, 0.06), transparent 60%);
}
.signup-form label {
  display: block;
  margin-bottom: 13px;
  color: var(--foam);
  font: 500 10px var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.signup-control {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}
.signup-control input {
  min-width: 0;
  height: 56px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: 0;
  background: rgba(2, 12, 15, 0.5);
  color: var(--paper);
  font: 400 15px var(--sans);
  transition: 0.2s var(--ease);
}
.signup-control input::placeholder {
  color: var(--faint);
}
.signup-control input:focus {
  border-color: var(--foam);
  box-shadow: 0 0 0 3px rgba(127, 216, 196, 0.12);
}
.signup-control button {
  min-width: 150px;
  padding: 0 22px;
  border: 0;
  border-radius: 10px;
  color: #120a08;
  background: linear-gradient(180deg, var(--coral-soft), var(--coral));
  font: 600 14px var(--sans);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: 0.2s var(--ease);
}
.signup-control button:hover {
  background: linear-gradient(180deg, #ffa583, var(--coral-soft));
}
.signup-control button:disabled {
  cursor: wait;
  opacity: 0.65;
}
.form-note,
.form-status {
  margin: 15px 0 0;
  color: var(--faint);
  font-size: 12px;
}
.form-status.error {
  color: var(--coral-soft);
}
.signup-sent {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.signup-sent > span,
.verified-mark {
  display: grid;
  place-items: center;
  flex: 0 0 46px;
  height: 46px;
  border: 1px solid var(--coral);
  border-radius: 50%;
  color: var(--coral);
  font: 400 20px var(--mono);
  box-shadow: 0 0 24px rgba(255, 111, 77, 0.25);
}
.signup-sent h3 {
  margin: 0 0 6px;
  font-size: 26px;
}
.signup-sent p {
  margin: 0;
  font-size: 13px;
}
.signup-sent strong {
  color: var(--paper);
}

/* ---------- Closing ---------- */

.closing {
  width: var(--page);
  margin: auto;
  padding: clamp(100px, 13vw, 200px) 0;
  text-align: center;
  border-top: 1px solid var(--line);
}
.closing .eyebrow {
  justify-content: center;
}
.closing h2 {
  max-width: 20ch;
  margin: 28px auto 0;
  font-size: clamp(40px, 5.2vw, 78px);
}
.closing .actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 40px;
  flex-wrap: wrap;
}

/* ---------- Footer ---------- */

footer {
  width: var(--page);
  margin: auto;
  padding: 40px 0 60px;
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 30px;
  align-items: center;
  border-top: 1px solid var(--line);
}
footer .brand {
  font-size: 24px;
}
footer p {
  margin: 0;
  text-align: center;
  color: var(--faint);
  font-size: 11.5px;
}
footer nav {
  display: flex;
  gap: 24px;
  justify-self: end;
}
footer nav a {
  color: var(--muted);
  font: 500 12.5px var(--sans);
  transition: color 0.2s;
}
footer nav a:hover {
  color: var(--paper);
}

/* ---------- Scroll reveal ---------- */

/* Scroll reveal: a translate-only settle driven by CSS scroll-driven
   animations. Content is never hidden — no opacity, no JS observer — so no
   scroll speed, crawler, screenshot, or unsupported browser can ever see a
   blank section; the worst case is content resting 16px lower. */
@supports (animation-timeline: view()) {
  [data-reveal] {
    animation: reveal-rise 1ms linear both;
    animation-timeline: view();
    animation-range: entry 5% entry 45%;
  }
  /* The flow section additionally scrubs --flow-x so the sealed envelope
     crosses the diagram as the section crosses the viewport. */
  .flow-section[data-reveal] {
    animation: reveal-rise 1ms linear both, flow-cross 1ms linear both;
    animation-timeline: view(), view();
    animation-range: entry 5% entry 45%, cover 20% cover 85%;
  }
  .flow-track .flow-packet {
    opacity: 1;
  }
}

/* ---------- Instrument details ---------- */

/* Monitor choreography: each stage's node and verdict flash as the packet
   passes. The descend packet covers the 228px rail over 0-90% of a 7s cycle;
   stages sit 46px apart, so stage i lights at i * (46/228 * 0.9 * 7)s. */
.pipeline .stage:nth-child(1) { --ping: 0s; }
.pipeline .stage:nth-child(2) { --ping: 1.27s; }
.pipeline .stage:nth-child(3) { --ping: 2.53s; }
.pipeline .stage:nth-child(4) { --ping: 3.8s; }
.pipeline .stage:nth-child(5) { --ping: 5.07s; }
.pipeline .stage:nth-child(6) { --ping: 6.33s; }
.stage .node {
  animation: node-ping 7s linear var(--ping, 0s) infinite;
}
.stage .verdict {
  animation: verdict-ping 7s linear var(--ping, 0s) infinite;
}
/* brightness flashes keep each variant's own color */
@keyframes node-ping {
  0%,
  13%,
  100% {
    filter: brightness(1);
  }
  3% {
    filter: brightness(2) drop-shadow(0 0 7px rgba(255, 149, 115, 0.9));
  }
}
@keyframes verdict-ping {
  0%,
  16%,
  100% {
    filter: brightness(1);
    text-shadow: none;
  }
  4% {
    filter: brightness(1.7);
    text-shadow: 0 0 12px rgba(236, 246, 242, 0.35);
  }
}

/* Scroll-scrubbed envelope crossing the guarded flow */
@property --flow-x {
  syntax: "<percentage>";
  inherits: true;
  initial-value: -6%;
}
@keyframes flow-cross {
  from {
    --flow-x: -1%;
  }
  to {
    --flow-x: 99%;
  }
}
.flow-packet {
  opacity: 0;
  position: absolute;
  left: var(--flow-x, -6%);
  top: 45px; /* glyph row: 26px node padding + half of 46px glyph, minus half of self */
  width: 9px;
  height: 9px;
  margin-left: -5px;
  border-radius: 2px;
  transform: rotate(45deg);
  background: var(--amber);
  box-shadow: 0 0 16px 3px rgba(255, 178, 94, 0.55);
  pointer-events: none;
  z-index: 2;
}

/* Depth gauge: a fixed instrument readout fed by site.js */
.depth {
  position: fixed;
  left: 24px;
  bottom: 22px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--faint);
  font: 500 9.5px var(--mono);
  letter-spacing: 0.16em;
  pointer-events: none;
  user-select: none;
}
.depth::before {
  content: "";
  width: 30px;
  height: 1px;
  background: linear-gradient(90deg, var(--coral), transparent);
}
@media (max-width: 900px), (max-height: 480px) {
  .depth {
    display: none;
  }
}

/* Hero footline dots breathe, staggered */
.hero-foot span::before {
  animation: dot-breathe 4.4s ease-in-out calc(var(--i, 0) * 0.55s) infinite;
}
.hero-foot span:nth-child(1) { --i: 0; }
.hero-foot span:nth-child(2) { --i: 1; }
.hero-foot span:nth-child(3) { --i: 2; }
.hero-foot span:nth-child(4) { --i: 3; }
@keyframes dot-breathe {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 8px 1px currentColor;
  }
}
@keyframes reveal-rise {
  from {
    transform: translateY(16px);
  }
  to {
    transform: none;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes beacon {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 111, 77, 0.55);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(255, 111, 77, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 111, 77, 0);
  }
}
@keyframes descend {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  5% {
    opacity: 1;
  }
  90% {
    transform: translateY(228px);
    opacity: 1;
  }
  100% {
    transform: translateY(228px);
    opacity: 0;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 1040px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .monitor {
    justify-self: start;
    max-width: 460px;
  }
  .problem .split,
  .safety-grid,
  .signup-grid,
  .host-card {
    grid-template-columns: 1fr;
  }
  .safety ul {
    max-width: 640px;
  }
  footer {
    grid-template-columns: 1fr auto;
  }
  footer p {
    order: 3;
    grid-column: 1 / -1;
    text-align: left;
  }
}

@media (max-width: 720px) {
  :root {
    --page: min(100% - 32px, 1320px);
  }
  header {
    height: 74px;
  }
  header nav a:not(.git) {
    display: none;
  }
  .hero {
    min-height: calc(100svh - 74px);
  }
  .features,
  .tiers {
    grid-template-columns: 1fr;
  }
  .features p {
    min-height: auto;
  }
  .flow-head,
  .signup-grid {
    align-items: start;
  }
  footer {
    grid-template-columns: 1fr;
  }
  footer nav {
    justify-self: start;
  }
}

@media (max-width: 460px) {
  .hero .actions,
  .closing .actions {
    flex-direction: column;
  }
  .button {
    width: 100%;
    justify-content: space-between;
  }
  .signup-control {
    grid-template-columns: 1fr;
  }
  .monitor-foot {
    grid-template-columns: 1fr;
  }
  .monitor-foot > div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] {
    animation: none;
  }
}

/* ---------- Welcome + generated docs (shared shell) ---------- */

.welcome-main {
  width: var(--page);
  min-height: calc(100svh - 200px);
  margin: auto;
  padding: clamp(60px, 8vw, 130px) 0;
}
.welcome-card {
  max-width: 1020px;
  margin: auto;
  padding: clamp(32px, 6vw, 72px);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(17, 61, 72, 0.55), rgba(6, 26, 32, 0.4));
  box-shadow: 0 40px 90px -50px rgba(0, 0, 0, 0.9);
  animation: rise 0.6s var(--ease) both;
}
.welcome-card[hidden] {
  display: none;
}
.welcome-card h1 {
  font-size: clamp(48px, 6.4vw, 84px);
  line-height: 0.98;
}
.welcome-card .deck {
  max-width: 60ch;
  margin-top: 22px;
  color: var(--muted);
  font-size: 18px;
}
.welcome-card .lead {
  color: var(--muted);
}
.verified-mark {
  margin-bottom: 26px;
}
.setup-session {
  margin: 46px 0 58px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(2, 12, 15, 0.55);
  overflow: hidden;
}
.setup-session > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font: 500 9px var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.setup-session button {
  border: 0;
  background: transparent;
  color: var(--coral);
  font: 500 10px var(--mono);
  cursor: pointer;
}
.setup-session > code {
  display: block;
  padding: 22px;
  overflow-wrap: anywhere;
  color: var(--foam);
  font: 400 13px/1.6 var(--mono);
}
.setup-session > p {
  margin: 0;
  padding: 0 22px 20px;
  color: var(--faint);
  font-size: 11.5px;
}
.onboarding {
  margin: 0 0 46px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.onboarding li {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 22px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.onboarding li > span {
  color: var(--coral);
  font: 500 11px var(--mono);
}
.onboarding h2 {
  font-size: 27px;
}
.onboarding p {
  margin: 10px 0 0;
  font-size: 14px;
}
.onboarding pre {
  margin: 14px 0 0;
  padding: 15px 18px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(2, 12, 15, 0.6);
  color: var(--foam);
  font: 400 12px var(--mono);
}
.onboarding p code,
.onboarding code {
  color: var(--foam);
  font: 400 12px var(--mono);
}
.retry-card {
  max-width: 820px;
}
.retry-card .button {
  margin-top: 34px;
}

.docs-main {
  width: var(--page);
  margin: auto;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(44px, 7vw, 100px);
  padding: clamp(56px, 7vw, 110px) 0 clamp(80px, 10vw, 140px);
}
.docs-nav {
  position: sticky;
  top: 34px;
  align-self: start;
  border-top: 1px solid var(--line);
}
.docs-nav p {
  margin: 20px 0 12px;
  color: var(--coral);
  font: 500 9px var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.docs-nav a {
  display: block;
  padding: 9px 0;
  color: var(--muted);
  font-size: 12.5px;
  transition: color 0.2s;
}
.docs-nav a:hover,
.docs-nav a[aria-current="page"] {
  color: var(--paper);
}
.docs-article {
  width: min(100%, 72ch);
  min-width: 0;
}
.docs-article > h1:first-child {
  margin: 0 0 40px;
  font-size: clamp(48px, 6.4vw, 82px);
}
.docs-article h2 {
  margin: 62px 0 20px;
  font-size: 36px;
  line-height: 1.05;
}
.docs-article h3 {
  margin: 38px 0 14px;
  font-size: 24px;
}
.docs-article p,
.docs-article li {
  color: var(--muted);
  line-height: 1.7;
}
.docs-article strong {
  color: var(--paper);
}
.docs-article a {
  color: var(--coral);
  text-decoration: underline;
  text-decoration-color: rgba(255, 111, 77, 0.4);
  text-underline-offset: 3px;
}
.docs-article a:hover {
  text-decoration-color: var(--coral);
}
.docs-article ul,
.docs-article ol {
  padding-left: 22px;
}
.docs-article li + li {
  margin-top: 8px;
}
.docs-article pre {
  max-width: 100%;
  margin: 25px 0;
  padding: 20px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(2, 12, 15, 0.65);
  color: var(--foam);
  font: 400 12px/1.7 var(--mono);
}
.docs-article :not(pre) > code {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--wash);
  color: var(--foam);
  font: 400 12px var(--mono);
}
.docs-article blockquote {
  margin: 30px 0;
  padding: 4px 0 4px 24px;
  border-left: 2px solid var(--coral);
}
.docs-article hr {
  margin: 55px 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.docs-article table {
  display: block;
  max-width: 100%;
  overflow: auto;
  border-collapse: collapse;
}
.docs-article th,
.docs-article td {
  padding: 10px 14px;
  border: 1px solid var(--line);
  text-align: left;
  font-size: 12.5px;
}

@media (max-width: 900px) {
  .docs-main {
    grid-template-columns: 1fr;
  }
  .docs-nav {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
  }
  .docs-nav p {
    flex-basis: 100%;
    margin-bottom: 0;
  }
  .docs-nav a {
    padding: 4px 0;
  }
}
@media (max-width: 600px) {
  .signup-control input {
    height: 54px;
  }
  .onboarding li {
    grid-template-columns: 30px 1fr;
    gap: 14px;
  }
}
