/* ------------------------------------------------------------------ hero */
.hero {
  position: relative;
  border-bottom: 1px solid var(--border-strong);
  overflow: hidden;
}
/* A measured grid under the hero, like graph paper under an instrument. It
   fades out so it never competes with the text above it. */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 70% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 40%, #000 20%, transparent 75%);
  opacity: 0.55;
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 560px);
  gap: 56px;
  align-items: center;
  padding-top: 88px;
  padding-bottom: 88px;
}
.kicker { margin-bottom: 22px; }
.hero h1 {
  font-size: clamp(36px, 5.2vw, 60px);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -0.03em;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.lede {
  margin-top: 22px;
  max-width: 520px;
  font-size: 16px;
  color: var(--fg-muted);
}
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }

.facts {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  row-gap: 12px;
  margin-top: 40px;
  border-top: 1px solid var(--border);
}
.facts > div { padding: 12px 18px 0 0; margin-right: 18px; border-right: 1px solid var(--border); }
.facts > div:nth-child(3n), .facts > div:last-child { border-right: none; margin-right: 0; }
.facts dd { font-size: 12px; color: var(--fg); margin-top: 3px; white-space: nowrap; }

/* --------------------------------------------------------- the instrument */
.instrument {
  position: relative;
  background: var(--surface);
  box-shadow: 0 0 0 1px rgba(143, 184, 255, 0.04), 0 40px 120px -40px rgba(143, 184, 255, 0.16);
}
.instrument .ph.sub { border-top: 1px solid var(--border-strong); }
.pipe-h {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.pipe-h .v { font-size: 22px; transition: color var(--motion-base); }

.stages { display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; }
.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border-right: 1px solid var(--border);
  transition: background var(--motion-base);
}
.stage:last-child { border-right: none; }
.stage::after {
  content: '';
  position: absolute;
  right: -4px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-top: 1px solid var(--border-strong);
  border-right: 1px solid var(--border-strong);
  transform: translateY(-50%) rotate(45deg);
  background: var(--surface);
  z-index: 1;
}
.stage:last-child::after { display: none; }
.stage .mark { font-size: 12px; line-height: 1; color: var(--fg-subtle); }
.stage .nm { font-size: 13px; margin-top: 4px; color: var(--fg-subtle); transition: color var(--motion-base); }
.stage .det { font-size: 10px; color: var(--fg-subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage.done .mark { color: var(--live); }
.stage.done .nm { color: var(--fg-muted); }
.stage.now { background: rgba(255, 178, 36, 0.055); }
.stage.now .mark { color: var(--pending); animation: blink 1.2s ease-in-out infinite; }
.stage.now .nm { color: var(--pending); font-weight: 500; }
.stage.fail { background: rgba(255, 92, 92, 0.06); }
.stage.fail .mark, .stage.fail .nm { color: var(--failed); }
.stage.skip .nm { color: var(--fg-subtle); text-decoration: line-through; text-decoration-color: var(--border-strong); }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.gate {
  padding: 11px 16px;
  border-top: 1px solid var(--border-strong);
  background: rgba(143, 184, 255, 0.045);
  font-size: 12.5px;
  color: var(--fg-muted);
  min-height: 42px;
  transition: opacity var(--motion-base);
}

.serving .srow {
  display: grid;
  grid-template-columns: 38px 1fr 44px 118px;
  gap: 14px;
  align-items: center;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
}
.serving .srow:last-child { border-bottom: none; }
.srow .v { font-size: 17px; transition: color var(--motion-base); }
.share { height: 5px; background: var(--border-strong); position: relative; overflow: hidden; }
.share i {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--live);
  transition: width var(--motion-flip) var(--ease-enter), background var(--motion-base);
}
.pct { font-size: 12px; color: var(--fg-muted); text-align: right; }
.tag { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; }

.logs {
  height: 128px;
  overflow: hidden;
  padding: 8px 16px;
  font-size: 11px;
  line-height: 1.75;
  color: var(--fg-muted);
  mask-image: linear-gradient(to bottom, transparent 0, #000 28px);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 28px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.logs div { flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: line-in var(--motion-slow) var(--ease-enter); }
.logs .t { color: var(--fg-subtle); margin-right: 10px; }
@keyframes line-in { from { opacity: 0; transform: translateY(4px); } }

/* ---------------------------------------------------------------- legend */
.legend-strip { border-bottom: 1px solid var(--border); background: var(--surface); }
.legend { display: flex; flex-wrap: wrap; gap: 10px 28px; padding-top: 12px; padding-bottom: 12px; }
.legend > span:first-child { color: var(--fg-muted); }

/* --------------------------------------------------------------- sections */
.section { padding-top: 112px; }
.sec-head { max-width: 680px; margin-bottom: 40px; }
.sec-head h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.08; margin-top: 12px; font-weight: 500; letter-spacing: -0.025em; }
.sec-head .prose { margin-top: 16px; font-size: 15px; color: var(--fg-muted); }
.inline-big { font-size: 0.8em; padding: 0 8px; vertical-align: 0.08em; }

/* ------------------------------------------------------------- guarantees */
.guarantees { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.g-body { padding: 22px 22px 18px; }
.guarantee h3 { font-size: 21px; line-height: 1.2; font-weight: 500; letter-spacing: -0.015em; }
.guarantee .prose { margin-top: 10px; font-size: 14px; }
.timeline { width: 100%; height: auto; margin-top: 22px; display: block; }
.timeline .axis { stroke: var(--border-strong); stroke-width: 1; }
.timeline .flip { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 3 3; }
.timeline .lbl { fill: var(--fg-subtle); font-family: var(--font-mono); font-size: 10px; }
.timeline .fail-txt { fill: var(--failed); }
.timeline .live-fill { fill: var(--live); opacity: 0.85; }
.timeline .drain-fill { fill: var(--draining); }
.timeline .pend-fill { fill: var(--pending); opacity: 0.8; }
.timeline .fail-fill { fill: var(--failed); }
.timeline .req { stroke: var(--fg); stroke-width: 1.5; }
.timeline .req-dot { fill: var(--fg); }

/* ----------------------------------------------------------- capabilities */
.caps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border-strong);
  border-left: 1px solid var(--border-strong);
}
.cap {
  display: flex;
  flex-direction: column;
  padding: 24px 22px 20px;
  border-right: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
  background: var(--surface);
  transition: background var(--motion-base);
}
.cap:hover { background: var(--raised); }
.cap h3 { font-size: 19px; font-weight: 500; letter-spacing: -0.01em; margin-top: 10px; }
.cap .prose { margin-top: 10px; font-size: 13.5px; flex: 1; }
.cap .fact {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--fg-muted);
}

/* ------------------------------------------------------------- spec sheet */
.spec-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 56px; align-items: start; }
.spec-grid .sec-head { margin-bottom: 0; }
.spec dl { padding: 6px 16px 10px; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.kv:last-child { border-bottom: none; }
.kv dt { color: var(--fg-subtle); }
.kv dd { color: var(--fg); text-align: right; }

/* ---------------------------------------------------------------- install */
.steps { list-style: none; border-top: 1px solid var(--border-strong); }
.step {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}
.step-h { display: flex; align-items: baseline; gap: 14px; padding-top: 6px; }
.step-h .n { font-size: 34px; color: var(--accent); line-height: 1; }
.arm { margin-top: 16px; }

/* ---------------------------------------------------------------- preview */
.preview-body { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 40px; padding: 28px 24px; }
.preview h2 { font-size: 26px; line-height: 1.15; font-weight: 500; letter-spacing: -0.02em; }
.preview .prose { margin-top: 12px; font-size: 14px; }
.preview .btn { margin-top: 22px; }
.limits { list-style: none; font-size: 13.5px; color: var(--fg-muted); }
.limits li { padding: 12px 0 12px 22px; border-bottom: 1px solid var(--border); position: relative; }
.limits li:first-child { padding-top: 0; }
.limits li:first-child::before { top: 0; }
.limits li:last-child { border-bottom: none; padding-bottom: 0; }
.limits li::before { content: '—'; position: absolute; left: 0; top: 12px; color: var(--fg-subtle); font-family: var(--font-mono); }
.limits b { color: var(--fg); font-weight: 500; }

/* ---------------------------------------------------------------- closing */
.closing { text-align: left; }
.closing h2 { font-size: clamp(30px, 4.4vw, 52px); line-height: 1.05; font-weight: 500; letter-spacing: -0.03em; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; padding-top: 56px; padding-bottom: 64px; }
  .spec-grid { grid-template-columns: 1fr; gap: 32px; }
  .caps { grid-template-columns: repeat(2, 1fr); }
  .step { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}
@media (max-width: 720px) {
  .section { padding-top: 80px; }
  .facts { grid-template-columns: repeat(2, auto); }
  .facts > div:nth-child(3n) { border-right: 1px solid var(--border); margin-right: 18px; }
  .facts > div:nth-child(2n) { border-right: none; margin-right: 0; }
  .guarantees { grid-template-columns: 1fr; }
  .caps { grid-template-columns: 1fr; }
  .preview-body { grid-template-columns: 1fr; gap: 28px; padding: 22px 18px; }
  .stage { padding: 10px 8px; }
  .stage .det { display: none; }
  .stage .nm { font-size: 11.5px; }
  .serving .srow { grid-template-columns: 30px 1fr 38px 96px; gap: 10px; padding: 10px 12px; }
  .logs { padding: 8px 12px; }
}
