/* ==========================================================================
   Veyra — landing page
   ========================================================================== */

:root {
  --bg: #0B0F14;
  --bg-2: #0E131A;
  --fg: #F1F5F9;
  --fg-2: rgba(241, 245, 249, 0.70);
  --fg-3: rgba(241, 245, 249, 0.46);
  --line: rgba(241, 245, 249, 0.12);
  --line-2: rgba(241, 245, 249, 0.24);
  --ice: #A7D8FF;
  --ice-dim: rgba(167, 216, 255, 0.34);
  --coral: #FF604D;

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1200px;
  --pad: clamp(20px, 4vw, 40px);
  --nav-h: 68px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
svg { display: block; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--pad) * 2);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: 3px;
  border-radius: 2px;
}
section[tabindex="-1"]:focus { outline: none; }

.skip {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--fg);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 13px;
  text-decoration: none;
}
.skip:focus { top: 12px; }

.mono, .kicker, .tag, .eyebrow, .status-pill, .specs, .frame__label,
.panel__head, .req, .legend, .check__state, .conn__label, .node__sub,
.chip, .badge, .result, .step__num, .step__status, .hood__hint, .hood__table,
.flow__foot, .card__num, .ctrl, .seg__btn {
  font-family: var(--mono);
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 15, 20, 0.82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.nav__inner {
  display: flex;
  align-items: center;
  gap: 22px;
  height: var(--nav-h);
  border-bottom: 1px solid var(--line-2);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}
.brand__mark { width: 36px; height: 20px; }
.brand__name {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.04em;
}
.nav__sep { width: 1px; height: 26px; background: var(--line-2); }
.nav__links { display: flex; gap: 26px; }
.nav__links a {
  font-size: 15px;
  color: var(--fg-2);
  text-decoration: none;
  transition: color .2s;
}
.nav__links a:hover { color: var(--fg); }

.status-pill {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: 1px solid var(--line-2);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-2);
  white-space: nowrap;
}
.status-pill__dot, .eyebrow__dot, .tag__dot {
  width: 7px; height: 7px;
  background: var(--coral);
  flex: none;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 15px 22px;
  border: 1px solid var(--fg);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: background .2s, color .2s;
}
.btn:hover { background: var(--fg); color: var(--bg); }
.btn__arrow { font-family: var(--mono); transition: transform .25s var(--ease); }
.btn:hover .btn__arrow { transform: translateY(3px); }

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

.hero { padding: clamp(48px, 9vw, 112px) 0 0; }
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.cursor {
  width: 8px; height: 15px;
  background: var(--fg-2);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero__title {
  font-size: clamp(40px, 5.3vw, 80px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  font-weight: 700;
  max-width: 9.5em;
}
.nowrap { white-space: nowrap; }
.hero__body {
  margin-top: 28px;
  max-width: 34em;
  font-size: clamp(17px, 1.5vw, 19px);
  color: var(--fg-2);
}
.hero__copy .btn { margin-top: 36px; }

/* Frame with crop marks */
.hero__art { display: flex; justify-content: center; }
.frame {
  position: relative;
  width: min(100%, 460px);
  aspect-ratio: 1;
  margin: 28px;
}
.frame::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
}
.frame__corner {
  position: absolute;
  width: 20px; height: 20px;
  border: 0 solid var(--fg);
}
.frame__corner--tl { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.frame__corner--tr { top: -1px; right: -1px; border-top-width: 2px; border-right-width: 2px; }
.frame__corner--bl { bottom: -1px; left: -1px; border-bottom-width: 2px; border-left-width: 2px; }
.frame__corner--br { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }
.frame__tick { position: absolute; background: var(--line-2); }
.frame__tick--t, .frame__tick--b { left: 50%; width: 1px; height: 28px; }
.frame__tick--t { top: -14px; }
.frame__tick--b { bottom: -14px; }
.frame__tick--l, .frame__tick--r { top: 50%; height: 1px; width: 28px; }
.frame__tick--l { left: -14px; }
.frame__tick--r { right: -14px; }
.frame__label {
  position: absolute;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--fg-3);
}
.frame__label--tl { top: -26px; left: 0; }
.frame__label--br { bottom: -26px; right: 0; }

.pixel-v {
  position: absolute;
  inset: 18% 12%;
  width: 76%;
  height: 64%;
}
.px { fill: var(--fg); }
.px--coral { fill: var(--coral); }
.px-flash {
  fill: none;
  stroke: var(--coral);
  stroke-width: 0.06;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

/* Hero entrance (JS-enabled, motion allowed) */
@media (prefers-reduced-motion: no-preference) {
  .js .in-seq {
    opacity: 0;
    transform: translateY(14px);
    animation: fadeUp .8s var(--ease) forwards;
    animation-delay: calc(0.1s + var(--d, 0) * 0.11s);
  }
  .js .px {
    opacity: 0;
    transform: translateY(-0.7px);
    animation: pxIn .55s var(--ease) forwards;
    animation-delay: calc(0.45s + var(--i) * 0.065s);
  }
  .js .px--coral {
    transform: translateY(-3.2px);
    animation: snap .7s cubic-bezier(.35, 1.5, .5, 1) forwards;
    animation-delay: 1.75s;
  }
  .js .px-flash { animation: flash .9s ease-out forwards; animation-delay: 2.25s; }
}
@keyframes fadeUp { to { opacity: 1; transform: none; } }
@keyframes pxIn { to { opacity: 1; transform: none; } }
@keyframes snap {
  0% { opacity: 0; transform: translateY(-3.2px); }
  20% { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
@keyframes flash {
  0% { opacity: 0.9; transform: scale(1); }
  100% { opacity: 0; transform: scale(2.6); }
}

.specs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(56px, 8vw, 104px);
  border-top: 1px solid var(--line-2);
}
.specs > div { padding: 18px 20px 22px 0; }
.specs > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.specs dt {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.specs dd { margin-top: 6px; font-size: 14px; color: var(--fg); }

/* ---------- Sections ---------- */

.section {
  padding: clamp(80px, 11vw, 150px) 0;
  border-top: 1px solid var(--line-2);
}
.hero + .section { border-top: 0; }
.hero + .section .wrap { border-top: 1px solid var(--line-2); padding-top: clamp(80px, 11vw, 150px); }
.hero + .section { padding-top: 0; }

.section__head { margin-bottom: clamp(44px, 6vw, 72px); }
.section__head--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.kicker {
  margin-bottom: 18px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-3);
}
h2 {
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 700;
  max-width: 16ch;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border: 1px solid var(--line-2);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-2);
}

/* Reveal on scroll */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .8s var(--ease), transform .8s var(--ease);
    transition-delay: calc(var(--d, 0) * 0.1s);
  }
  .js [data-reveal].in { opacity: 1; transform: none; }
}

/* ---------- Technology ---------- */

.tech__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.card { padding: 32px 32px 40px 0; }
.card + .card { padding-left: 32px; border-left: 1px solid var(--line); }
.card__fig { width: 100%; max-width: 180px; height: auto; color: var(--fg); margin-bottom: 28px; }
.fig-label { font-family: var(--mono); font-size: 10px; fill: var(--fg-3); }
.card__num { font-size: 12px; color: var(--fg-3); letter-spacing: 0.08em; margin-bottom: 10px; }
.card h3 {
  font-size: clamp(21px, 1.9vw, 25px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin-bottom: 14px;
}
.card p:not(.card__num) { color: var(--fg-2); font-size: 16px; }

.hood {
  margin-top: 16px;
  border-top: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
}
.hood__summary {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 0;
  cursor: pointer;
  list-style: none;
}
.hood__summary::-webkit-details-marker, .qa summary::-webkit-details-marker { display: none; }
.hood__label { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.hood__hint { font-size: 12px; letter-spacing: 0.06em; color: var(--fg-3); text-transform: uppercase; }
.hood__icon, .qa__icon {
  position: relative;
  margin-left: auto;
  width: 14px; height: 14px;
  flex: none;
}
.hood__icon::before, .hood__icon::after, .qa__icon::before, .qa__icon::after {
  content: "";
  position: absolute;
  left: 0; top: 6px;
  width: 14px; height: 2px;
  background: var(--fg);
  transition: transform .3s var(--ease);
}
.hood__icon::after, .qa__icon::after { transform: rotate(90deg); }
details[open] > summary .hood__icon::after,
details[open] > summary .qa__icon::after { transform: rotate(0deg); }

.hood__body {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  padding: 8px 0 40px;
}
.hood__text p { color: var(--fg-2); max-width: 62ch; }
.hood__text p + p { margin-top: 16px; }
.hood__text strong { color: var(--fg); font-weight: 600; }
.hood__text em { font-family: var(--mono); font-style: normal; color: var(--ice); font-size: 0.94em; }
.hood__table { align-self: start; border-top: 1px solid var(--line); font-size: 13px; }
.hood__table > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.hood__table dt { color: var(--fg-3); }
.hood__table dd { color: var(--fg); }

@media (prefers-reduced-motion: no-preference) {
  .hood[open] .hood__body { animation: fadeUp .5s var(--ease); }
}

/* ---------- Explainer ---------- */

.flow__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.seg { display: inline-flex; border: 1px solid var(--line-2); }
.seg__btn {
  padding: 10px 16px;
  background: transparent;
  border: 0;
  font-size: 13px;
  color: var(--fg-2);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.seg__btn + .seg__btn { border-left: 1px solid var(--line-2); }
.seg__btn[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.seg__btn:hover:not([aria-pressed="true"]) { color: var(--fg); }

.flow__ctrl { display: flex; gap: 8px; }
.ctrl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid var(--line-2);
  font-size: 13px;
  cursor: pointer;
  transition: border-color .2s;
}
.ctrl:hover { border-color: var(--fg); }
.ctrl__icon { font-size: 11px; width: 12px; text-align: center; }

/* Steps rail */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.step {
  position: relative;
  padding: 18px 22px 22px 0;
}
.step + .step { padding-left: 22px; border-left: 1px solid var(--line); }
.step::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: -1px;
  height: 2px;
  background: transparent;
  transition: background .3s;
}
.step + .step::before { left: -1px; }
.step__btn {
  display: flex;
  align-items: baseline;
  gap: 12px;
  width: 100%;
  padding: 0;
  margin-bottom: 8px;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
}
.step__num { font-size: 12px; color: var(--fg-3); }
.step__title { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.step__status { margin-left: auto; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-3); }
.step__cap { font-size: 14.5px; line-height: 1.55; color: var(--fg-2); }
.step__btn:hover .step__title { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

.step[data-state="active"]::before { background: var(--ice); }
.step[data-state="active"] .step__num { color: var(--ice); }
.step[data-state="active"] .step__status::before { content: "running"; color: var(--ice); }
.step[data-state="done"]::before { background: var(--fg); }
.step[data-state="done"] .step__status::before { content: "done"; }
.step[data-state="failed"]::before { background: var(--coral); }
.step[data-state="failed"] .step__num, .step[data-state="failed"] .step__status::before { color: var(--coral); }
.step[data-state="failed"] .step__status::before { content: "failed"; }
.step[data-state="skipped"] .step__title, .step[data-state="skipped"] .step__cap { opacity: .45; }
.step[data-state="skipped"] .step__status::before { content: "not reached"; }

/* Stage */
.stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(60px, 0.9fr) minmax(0, 1fr) minmax(60px, 0.9fr) minmax(0, 1fr);
  align-items: start;
  margin-top: 8px;
  padding: 44px 28px 36px;
  border: 1px solid var(--line);
  background:
    linear-gradient(var(--bg-2), var(--bg-2)) padding-box;
}
.stage::before {
  /* faint dotted terminal grid */
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(241, 245, 249, 0.07) 1px, transparent 1px);
  background-size: 18px 18px;
  pointer-events: none;
}

.node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 18px 10px 16px;
  border: 1px solid transparent;
  transition: border-color .4s, background .4s;
}
.node__icon { width: 100%; max-width: 128px; height: auto; overflow: visible; }
.ln { fill: none; stroke: var(--fg); stroke-width: 2.4; stroke-linejoin: miter; }
.key { fill: var(--fg); }
.ic-label { font-family: var(--mono); font-size: 7.5px; letter-spacing: 0.08em; fill: var(--fg-3); }
.node__meta { margin-top: 14px; }
.node__title { font-size: 16px; font-weight: 600; }
.node__sub { margin-top: 2px; font-size: 11.5px; color: var(--fg-3); letter-spacing: 0.02em; }

.chips { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; width: 100%; max-width: 190px; }
.chip {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  font-size: 11.5px;
  transition: border-color .4s, color .4s;
}
.chip span { color: var(--fg-3); }
.chip b { font-weight: 500; }

.badge {
  position: absolute;
  top: -14px;
  left: 50%;
  translate: -50% 0;
  padding: 4px 9px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.badge--ok { background: var(--ice); color: var(--bg); }
.badge--bad { background: var(--coral); color: var(--bg); }

.addr-new { display: none; }

/* Connectors */
.conn { position: relative; height: 100%; min-height: 120px; }
.conn__line {
  position: absolute;
  left: 0; right: 0;
  top: 62px;
  height: 1px;
  background: var(--ice-dim);
}
.conn__label {
  position: absolute;
  left: 50%;
  top: 36px;
  transform: translateX(-50%);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--fg-3);
  white-space: nowrap;
}
.pulse, .packet {
  position: absolute;
  top: 62px;
  left: 0;
  opacity: 0;
}
.pulse {
  width: 10px; height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--ice);
  box-shadow: 0 0 0 4px rgba(167, 216, 255, 0.14), 0 0 18px 3px rgba(167, 216, 255, 0.55);
}
.pulse::after {
  content: "";
  position: absolute;
  right: 50%;
  top: 4.5px;
  width: 54px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ice));
}
.packet {
  width: 13px; height: 13px;
  margin: -6.5px 0 0 -6.5px;
  background: var(--coral);
}

.sigsq { fill: var(--coral); opacity: 0; transform-box: fill-box; transform-origin: center; }

/* Bench */
.bench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1fr);
  border: 1px solid var(--line);
  border-top: 0;
}
.panel { padding: 22px 24px 26px; transition: background .4s; }
.panel + .panel { border-left: 1px solid var(--line); }
.panel__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.panel__head h3 { font-size: 12px; font-weight: 500; color: var(--fg); letter-spacing: 0.1em; }

.req { font-size: 13.5px; border-top: 1px solid var(--line); }
.req__row {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  opacity: 0.32;
  transition: opacity .45s var(--ease);
  transition-delay: calc(var(--r) * 0.16s);
}
.req dt { color: var(--fg-3); }
.req dd { color: var(--fg); }
.v-new { display: none; padding: 1px 5px; background: var(--coral); color: var(--bg); }
.nonce-used { color: var(--fg-3); display: none; }

.req__note { position: relative; min-height: 22px; margin-top: 16px; font-size: 12px; color: var(--fg-2); }
.note { display: none; align-items: center; gap: 8px; font-family: var(--mono); }
.note--idle { display: inline-flex; color: var(--fg-3); }
.sq { width: 10px; height: 10px; background: var(--coral); flex: none; }
.sq--hollow { background: transparent; border: 1.5px solid var(--coral); }

.lattice { width: 100%; height: auto; overflow: visible; }
.lat-dots circle { fill: rgba(241, 245, 249, 0.34); }
.lat-hit { fill: var(--fg); opacity: 0; transition: opacity .4s; }
.sol__line {
  stroke: var(--fg);
  stroke-width: 2;
  stroke-linecap: square;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset .8s var(--ease), opacity .4s;
}
.sol { transition: opacity .5s; }
.tgt { transform: translate(147px, 86px); transition: transform 1s cubic-bezier(.6, 0, .25, 1); }
.tgt__in { opacity: 0; transform: scale(0.3); transition: opacity .4s, transform .55s cubic-bezier(.35, 1.5, .5, 1); }
.tgt__sq { fill: var(--coral); }
.tgt__cross { stroke: var(--coral); stroke-width: 1.4; }
.tgt__bound {
  fill: none;
  stroke: var(--ice);
  stroke-width: 1;
  stroke-dasharray: 2 3;
  opacity: 0;
  transition: opacity .4s, stroke-width .3s;
}
.lat-note { font-family: var(--mono); font-size: 9.5px; fill: var(--coral); opacity: 0; transition: opacity .4s; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 11px; color: var(--fg-3); }
.legend li { display: inline-flex; align-items: center; gap: 7px; }
.lg { display: inline-block; flex: none; }
.lg--target { width: 8px; height: 8px; background: var(--coral); }
.lg--sol { width: 14px; height: 2px; background: var(--fg); }
.lg--bound { width: 10px; height: 10px; border: 1px dashed var(--ice); border-radius: 50%; }

.checks { border-top: 1px solid var(--line); }
.check {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  transition: opacity .3s;
}
.check__icon {
  position: relative;
  width: 18px; height: 18px;
  margin-top: 2px;
  border: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 16px;
  text-align: center;
}
.check__label { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; font-weight: 500; }
.check__state { font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-3); font-weight: 400; padding-top: 3px; }
.check__note { margin-top: 3px; font-size: 13px; line-height: 1.5; color: var(--fg-2); }

.check[data-state="checking"] .check__icon { border-color: var(--ice); }
.check[data-state="checking"] .check__icon::before {
  content: "";
  position: absolute;
  inset: 4px;
  background: var(--ice);
  animation: blink .5s steps(1) infinite;
}
.check[data-state="checking"] .check__state { color: var(--ice); }
.check[data-state="passed"] .check__icon { background: var(--ice); border-color: var(--ice); color: var(--bg); }
.check[data-state="passed"] .check__icon::before { content: "✓"; }
.check[data-state="failed"] .check__icon { background: var(--coral); border-color: var(--coral); color: var(--bg); }
.check[data-state="failed"] .check__icon::before { content: "✕"; }
.check[data-state="failed"] .check__state { color: var(--coral); }
.check[data-state="not-run"] { opacity: .45; }
.check[data-state="not-run"] .check__icon::before { content: "–"; color: var(--fg-3); }

.result { margin-top: 16px; font-size: 12px; letter-spacing: 0.04em; }
.result > span { display: none; }
.result__idle { display: inline !important; color: var(--fg-3); }
.result__ok { color: var(--ice); }
.result__bad { color: var(--coral); }

.flow__foot { margin-top: 16px; font-size: 12px; color: var(--fg-3); }

/* ---------- Explainer states ---------- */

/* Active nodes / panels per step */
.flow[data-step="1"] .node--device,
.flow[data-step="1"] .node--vault,
.flow[data-step="2"] .node--device,
.flow[data-step="3"] .node--vault,
.flow[data-step="4"] .node--vault,
.flow[data-step="4"] .node--recipient { border-color: var(--line-2); background: rgba(11, 15, 20, 0.6); }
.flow[data-step="2"] .panel--req,
.flow[data-step="2"] .panel--grid,
.flow[data-step="3"] .panel--checks,
.flow[data-step="3"] .panel--grid { background: rgba(241, 245, 249, 0.025); }

/* 1 Deposit */
.s-deposit-run .conn--a .pulse { animation: travel 1.2s cubic-bezier(.6, 0, .3, 1) forwards; }
.s-deposited .chip--bal { border-color: var(--ice-dim); }
.s-deposited .chip--bal b { color: var(--ice); }
.s-pk .chip--pk { border-color: var(--ice); }
.s-pk .chip--pk b { color: var(--ice); }

/* 2 Sign */
.s-request .req__row { opacity: 1; }
.s-request .note--idle { display: none; }
.s-request:not(.s-signed) .note--draft { display: inline-flex; }
.s-target .tgt__in { opacity: 1; transform: none; }
.s-solution .sol__line { stroke-dashoffset: 0; }
.s-solution .lat-hit { opacity: 1; }
.s-solution .tgt__bound { opacity: .7; }
.s-signed .sigsq { opacity: 1; animation: sigSnap .55s cubic-bezier(.35, 1.5, .5, 1); }
.s-signed:not(.s-tamper) .note--signed { display: inline-flex; }
@keyframes sigSnap { from { transform: translateY(-14px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Changed recipient */
.s-tamper .note--tamper { display: inline-flex; color: var(--coral); }
.s-tamper .v-orig { text-decoration: line-through; color: var(--fg-3); }
.s-tamper .v-new { display: inline; }
.s-tamper .addr-orig { display: none; }
.s-tamper .addr-new { display: inline; color: var(--coral); }
.s-tamper .tgt { transform: translate(80px, 116px); }
.s-tamper .sol { opacity: .6; }

/* 3 Verify */
.s-travel .sigsq, .s-arrived .sigsq { opacity: 0; animation: none; }
.s-travel .packet { opacity: 1; animation: packetGo 1.1s cubic-bezier(.6, 0, .3, 1) forwards; }
.s-arrived .packet { opacity: 1; left: 100%; }
.s-c2-ok .tgt__bound { stroke-width: 1.6; opacity: 1; }
.s-approved .badge--approved { opacity: 1; transform: none; }
.s-approved .result__idle, .s-invalid .result__idle { display: none !important; }
.s-approved .result__ok { display: inline; }

.s-invalid .packet { background: transparent; border: 1.5px solid var(--coral); }
.s-invalid .badge--bad { opacity: 1; transform: none; }
.s-invalid .result__bad { display: inline; }
.s-invalid .lat-note { opacity: 1; }
.s-invalid .node--vault { border-color: rgba(255, 96, 77, 0.5); }

/* 4 Release */
.s-release-run .badge--approved, .s-released .badge--approved { opacity: 0; }
.s-release-run .packet, .s-released .packet { opacity: 0; transition: opacity .3s; }
.s-release-run .conn--b .pulse { animation: travel 1.2s cubic-bezier(.6, 0, .3, 1) forwards; }
.s-released .badge--released { opacity: 1; transform: none; }
.s-released .chip--recv { border-color: var(--ice); }
.s-released .chip--recv b { color: var(--ice); }
.s-released .nonce-used { display: inline; }

@keyframes travel {
  0% { left: 0; opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}
@keyframes packetGo { from { left: 0; } to { left: 100%; } }

/* Paused / instant seek */
.flow.is-paused *, .flow.is-paused *::before, .flow.is-paused *::after { animation-play-state: paused !important; }
.flow.instant *, .flow.instant *::before, .flow.instant *::after { transition: none !important; animation: none !important; }

/* ---------- FAQ ---------- */

.faq__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.faq .section__head { margin-bottom: 0; }
.faq__list { border-top: 1px solid var(--line-2); }
.qa { border-bottom: 1px solid var(--line-2); }
.qa summary {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 0;
  font-size: clamp(18px, 1.8vw, 22px);
  font-weight: 600;
  letter-spacing: -0.015em;
  cursor: pointer;
  list-style: none;
}
.qa p { padding: 0 40px 26px 0; color: var(--fg-2); max-width: 60ch; }
@media (prefers-reduced-motion: no-preference) {
  .qa[open] p { animation: fadeUp .45s var(--ease); }
}

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

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 32px;
  padding-bottom: 48px;
  border-top: 1px solid var(--line-2);
}
.footer__note { max-width: 56ch; font-size: 13px; color: var(--fg-3); font-family: var(--mono); }

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

@media (max-width: 1020px) {
  .bench { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .panel--checks { grid-column: 1 / -1; border-left: 0 !important; border-top: 1px solid var(--line); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step:nth-child(3) { padding-left: 0; border-left: 0; }
  .step:nth-child(3)::before { left: 0; }
  .step:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stage { padding-left: 12px; padding-right: 12px; }
  .conn__label { font-size: 9.5px; }
  .conn--a .conn__label { white-space: normal; text-align: center; width: 100%; }
}

@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__art { order: -1; justify-content: flex-start; }
  .frame { width: min(46vw, 210px); margin: 22px 14px 28px; }
  .tech__grid { grid-template-columns: 1fr; }
  .card, .card + .card { padding: 30px 0 34px; border-left: 0; }
  .card + .card { border-top: 1px solid var(--line); }
  .hood__body { grid-template-columns: 1fr; }
  .faq__inner { grid-template-columns: 1fr; }
  .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .specs > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .specs > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav__sep { display: none; }

  .steps { grid-template-columns: 1fr; }
  .step, .step + .step { padding: 14px 0 16px; border-left: 0; }
  .step + .step { border-top: 1px solid var(--line); }
  .step::before, .step + .step::before { left: 0; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .step { padding-left: 16px !important; }

  /* Vertical flow */
  .stage {
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
  }
  .node {
    display: grid;
    grid-template-columns: 96px 1fr;
    column-gap: 16px;
    align-items: center;
    text-align: left;
    padding: 12px;
  }
  .node__icon { grid-row: span 2; max-width: 96px; }
  .node__meta { margin-top: 0; }
  .chips { margin-top: 8px; max-width: none; }
  .badge { top: -11px; left: auto; right: 10px; translate: none; }
  .node { margin-top: 6px; }

  .conn { height: 74px; min-height: 0; }
  .conn__line { left: 60px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; }
  .conn__label, .conn--a .conn__label { left: 78px; top: 50%; transform: translateY(-50%); width: auto; text-align: left; white-space: nowrap; font-size: 10.5px; }
  .pulse, .packet { left: 60px; top: 0; }
  .pulse::after { right: auto; left: 4.5px; top: auto; bottom: 50%; width: 1px; height: 46px; background: linear-gradient(180deg, transparent, var(--ice)); }
  .s-deposit-run .conn--a .pulse, .s-release-run .conn--b .pulse { animation-name: travelY; }
  .s-travel .packet { animation-name: packetGoY; }
  .s-arrived .packet { left: 60px; top: 100%; }

  .bench { grid-template-columns: 1fr; }
  .panel + .panel { border-left: 0; border-top: 1px solid var(--line); }
  .panel { padding: 20px 16px 22px; }

  .flow__bar { flex-direction: column; align-items: stretch; }
  .seg__btn { flex: 1; padding: 10px 8px; }
  .flow__ctrl .ctrl { flex: 1; justify-content: center; }

  .footer__inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .hide-sm { display: none; }
}

@keyframes travelY {
  0% { top: 0; opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}
@keyframes packetGoY { from { top: 0; } to { top: 100%; } }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }
  .cursor { animation: none; }
  .px-flash { display: none; }
}

/* ---------- Token address (CA) ---------- */
.ca {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 28px;
  font-family: var(--mono);
  font-size: 13px;
}
.ca__label {
  padding: 3px 7px;
  background: var(--coral);
  color: var(--bg);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.ca__value {
  font-family: var(--mono);
  color: var(--fg-2);
  word-break: break-all;
}
.ca.is-set .ca__value { color: var(--fg); }
.ca__btn {
  padding: 5px 10px;
  background: transparent;
  border: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg);
  text-decoration: none;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.ca__btn:hover { border-color: var(--fg); }
.ca__btn.is-copied { border-color: var(--ice); color: var(--ice); }
.ca__btn[hidden] { display: none; }
.footer .ca { margin-top: 0; }
@media (max-width: 760px) { .footer .ca { margin-top: 4px; } }
