/* Keyvalv. Everything on this page is served from its own origin. */
:root {
  --paper: #F3EEE4;
  --frame: #1A1A1C;
  --ink: #151517;
  --ink-soft: #5C5A55;
  --chalk: #F4F1EA;
  --chalk-soft: #A9A7A1;
  --edge: #3A3A3E;
  --yellow: #E6F14A;
  --orange: #F47B2A;
  --bad: #FF7A55;
  --alarm: #E23A1E;
  --sans: "Avenir Next", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  box-sizing: border-box;
}
*, *::before, *::after { box-sizing: inherit; }
html { background: var(--frame); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--frame); color: var(--chalk); font-family: var(--sans); font-size: 1.0625rem; line-height: 1.55; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999rem; top: 0; background: var(--frame); color: var(--chalk); padding: .5rem 1rem; z-index: 20; }
.skip:focus { left: 1rem; top: 1rem; }
.wrap { width: 100%; max-width: 88rem; margin-inline: auto; padding-inline: max(1.25rem, env(safe-area-inset-left, 0px)) max(1.25rem, env(safe-area-inset-right, 0px)); }
@media (min-width: 62rem) { .wrap { padding-inline: 4rem; } }

/* Hero: full bleed, full height */
.hero {
  min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column;
  color: var(--ink);
  background:
    radial-gradient(60rem 40rem at 78% 55%, #FFFFFF 0%, rgba(255, 255, 255, 0) 65%),
    linear-gradient(180deg, #F8F6F1 0%, var(--paper) 100%);
  padding-top: env(safe-area-inset-top, 0px);
}
.bar { display: flex; align-items: center; gap: 1.5rem; padding-block: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; }
/* The mark: an archway (valv) with two chain links hanging from its crown, the first threaded through
   the arch itself and the second through the first: a signed history inside a vault */
.mark-arch { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linejoin: round; }
.mark-ring { fill: none; stroke: var(--orange); stroke-width: 2.2; stroke-linecap: butt; }
.mark-sill { fill: none; stroke: var(--yellow); stroke-width: 2.4; }
.wordmark { font-size: 1.375rem; font-weight: 600; letter-spacing: .01em; }
.nav { display: none; border: 1.5px solid var(--ink); border-radius: 99rem; padding: .375rem .5rem; }
.nav a { text-decoration: none; font-size: .9375rem; padding: .25rem .875rem; border-radius: 99rem; }
.nav a:hover { background: var(--ink); color: var(--paper); }
@media (min-width: 62rem) { .nav { display: flex; } }
.bar-end { margin-left: auto; display: flex; align-items: center; gap: .625rem; }
.pill { display: inline-flex; align-items: center; gap: .5rem; border: 1.5px solid var(--ink); border-radius: 99rem; padding: .4375rem 1rem; font-size: .9375rem; text-decoration: none; white-space: nowrap; }
.pill-status { display: none; border-color: transparent; color: var(--ink-soft); }
@media (min-width: 40rem) { .pill-status { display: inline-flex; } }
.dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--orange); }
.pill-cta { background: var(--ink); color: var(--chalk); padding-left: .4375rem; }
.pill-cta:hover { background: var(--orange); border-color: var(--orange); color: var(--ink); }
.chev { flex: none; }
.chev-disc { fill: var(--chalk); }
.chev-arrow { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.hero-body { flex: 1; display: grid; gap: 1rem; align-items: center; padding-block: 1.5rem 3rem; }
@media (min-width: 62rem) { .hero-body { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 2rem; padding-block: 2rem 5rem; } }
h1 { font-weight: 500; font-size: clamp(2.375rem, 1rem + 5vw, 5.5rem); line-height: 1.03; letter-spacing: -.035em; }
.h1-line { display: block; white-space: nowrap; }
.h1-icon { display: inline-block; width: .95em; height: .95em; vertical-align: -.14em; margin-right: .14em; }
.ico-fill { fill: #FBFAF7; }
.ico-arch { fill: none; stroke: var(--ink); stroke-width: 4.4; stroke-linejoin: round; }
.ico-ring { fill: none; stroke: var(--orange); stroke-width: 4.2; }
.ico-sill { fill: none; stroke: var(--yellow); stroke-width: 4.4; }
/* Sign-up: posts to /api/subscribe on the same origin. Works without JavaScript too; the
   function then redirects to #subscribed or #subscribe-failed and :target shows the note. */
.notify { margin-top: 2.5rem; max-width: 28rem; scroll-margin-top: 6rem; }
.notify-label { display: block; font-weight: 500; margin-bottom: .75rem; }
.notify-row { display: flex; flex-wrap: wrap; gap: .5rem; padding-bottom: .875rem; border-bottom: 1.5px solid var(--ink); }
.notify-input { flex: 1 1 12rem; min-width: 0; padding: .625rem .875rem; font: inherit; font-size: 1rem; color: var(--ink); background: #FFFFFF; border: 1.5px solid var(--ink); border-radius: 99rem; }
.notify-input::placeholder { color: var(--chalk-soft); }
.notify-send { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem 1.125rem .5rem .5rem; font: inherit; font-size: 1rem; font-weight: 500; color: var(--chalk); background: var(--ink); border: 1.5px solid var(--ink); border-radius: 99rem; cursor: pointer; white-space: nowrap; }
.notify-send:hover { background: var(--orange); border-color: var(--orange); color: var(--ink); }
.notify-send[disabled] { opacity: .6; cursor: progress; }
.notify-trap { position: absolute; left: -999rem; top: auto; width: 1px; height: 1px; overflow: hidden; }
.notify-note { display: none; margin-top: .75rem; font-size: .9375rem; color: var(--ink-soft); }
.notify-note.is-shown, .notify-note:target { display: block; }
.notify-note.is-ok { color: #2E6B1F; }
.notify-note.is-bad { color: #B3421E; }
.notify.is-done .notify-row { display: none; }
.lead { margin-top: 1rem; max-width: 28rem; color: var(--ink-soft); font-size: 1rem; }

.stage-hero { display: flex; align-items: center; justify-content: center; height: 22rem; }
@media (min-width: 62rem) { .stage-hero { height: min(70vh, 44rem); } }

/* The Chrono-Ribbon: four translucent record facets climbing a diagonal, threaded by a glowing hash
   conduit, with an outlined ghost facet for the next release. It is inline SVG, so it renders without
   JavaScript and scales with the stage. stack.js lifts it onto a fixed layer so it can glide from the
   hero into the proof section, drives the springs, and re-threads the conduit between moved facets. */
.stack {
  --rb-ink: var(--ink); --rb-muted: var(--ink-soft);
  --rb-top: rgba(255, 255, 255, .62); --rb-side: #D9D2C4; --rb-edge: var(--ink);
  --rb-laser: var(--orange); --rb-core: #FFF6D6; --rb-glow: .9;
  --rb-sheen: #FFFFFF; --rb-sheen-a: .7;
  --rb-seal: var(--orange); --rb-bad: var(--alarm); --rb-shadow: .18;
  position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
}
.tilt { width: 100%; height: 100%; transform-style: preserve-3d; will-change: transform; }
.stack-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.stack.is-floating { position: fixed; left: 0; top: 0; transform-origin: 0 0; z-index: 5; pointer-events: none; will-change: transform; }
.stack.is-hidden { visibility: hidden; }
.stack.is-docked {
  --rb-ink: var(--chalk); --rb-muted: var(--chalk-soft);
  --rb-top: rgba(244, 241, 234, .09); --rb-side: rgba(244, 241, 234, .16); --rb-edge: rgba(244, 241, 234, .75);
  --rb-core: #FFFBEA; --rb-glow: 1; --rb-sheen: var(--chalk); --rb-sheen-a: .14;
  --rb-bad: var(--bad); --rb-shadow: 0;
}

.rb-shadow { fill: var(--ink); opacity: var(--rb-shadow); transition: opacity .5s; }
.rb-cap { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; fill: var(--rb-ink); }
.rb-cap-muted { fill: var(--rb-muted); }
.rb-none { fill: none; stroke: var(--rb-muted); stroke-width: 1.5; stroke-dasharray: 5 5; stroke-linejoin: round; }
.rb-none-word { font-family: var(--sans); font-size: 15px; font-style: italic; fill: var(--rb-muted); }

/* facets: slim hexagonal prisms of frosted glass, lit by a sheen that follows the pointer */
.facet { transform-box: view-box; }
.fc-side { fill: var(--rb-side); stroke: var(--rb-edge); stroke-width: 1.4; stroke-linejoin: round; }
.fc-top { fill: var(--rb-top); stroke: var(--rb-edge); stroke-width: 1.6; stroke-linejoin: round; transition: stroke .3s, stroke-width .2s; }
.fc-sheen { fill: url(#rb-sheen); pointer-events: none; }
.sheen-a { stop-color: var(--rb-sheen); stop-opacity: var(--rb-sheen-a); }
.sheen-b { stop-color: var(--rb-sheen); stop-opacity: 0; }
.fc-label { font-family: var(--mono); font-size: 8.5px; letter-spacing: .1em; fill: var(--rb-muted); pointer-events: none; }
.fc-name { fill: var(--rb-ink); }
.node { fill: none; stroke: var(--rb-seal); stroke-width: 3.2; transform-box: fill-box; transform-origin: center; transition: stroke .3s, stroke-width .3s; }
.stack.is-floating .facet:not(.facet-ghost) { pointer-events: auto; cursor: grab; touch-action: none; }
.stack.is-floating .facet.is-dragging { cursor: grabbing; }
.facet:focus { outline: none; }
.facet:focus-visible .fc-top { stroke: var(--orange); stroke-width: 3; }

/* the hash conduit: a laser threaded through every node, one segment per record after the first */
.conduit line { stroke-linecap: round; pointer-events: none; }
.cd-glow { stroke: var(--rb-laser); stroke-width: 7; opacity: var(--rb-glow); filter: url(#rb-glow); transition: opacity .3s; }
.cd-core { stroke: var(--rb-core); stroke-width: 1.6; transition: stroke .3s, stroke-width .3s; }
.conduit-ghost .cd-glow { display: none; }
.conduit-ghost .cd-core { stroke: var(--rb-muted); stroke-width: 1.5; stroke-dasharray: 4 5; }

/* one facet pulled out of line, and the fractured conduit after it */
.facet.is-broken .node { stroke: var(--rb-bad); stroke-width: 2.2; stroke-dasharray: 4 3; }
.facet.is-broken .fc-top, .facet.is-broken .fc-side { stroke: var(--rb-bad); }
.facet.is-pulled .fc-name { fill: var(--rb-bad); }
@keyframes cd-crawl { to { stroke-dashoffset: -24; } }
.conduit.is-cut .cd-glow { opacity: 0; }
.conduit.is-cut .cd-core { stroke: var(--rb-bad); stroke-width: 2.2; stroke-dasharray: 5 7; animation: cd-crawl .9s linear infinite; }

/* the unsigned future release: outlined only */
.facet-ghost .fc-top, .facet-ghost .fc-side { fill: none; stroke: var(--rb-muted); stroke-dasharray: 4 4; }
.facet-ghost .fc-sheen { display: none; }
.facet-ghost .fc-label, .facet-ghost .fc-name { fill: var(--rb-muted); }
.facet-ghost .node { stroke: var(--rb-muted); stroke-width: 1.6; stroke-dasharray: 3 3; }

/* seals lock in one at a time on load, and again when the lab re-verifies a record */
@keyframes seal-in { from { transform: scale(0); opacity: 0; } 60% { transform: scale(1.4); opacity: 1; } to { transform: scale(1); opacity: 1; } }
@keyframes link-in { from { stroke-dashoffset: 220; } to { stroke-dashoffset: 0; } }
@keyframes seal-check { 0% { transform: scale(1); } 40% { transform: scale(1.5); } 100% { transform: scale(1); } }
.stack.is-live .facet:not(.facet-ghost) .node { animation: seal-in .55s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(.3s + var(--i) * .24s); }
.stack.is-live .conduit:not(.conduit-ghost) line { stroke-dasharray: 220; animation: link-in .5s ease-out both; animation-delay: calc(.1s + var(--i) * .24s); }
.stack.is-live .conduit.is-cut .cd-core { stroke-dasharray: 5 7; animation: cd-crawl .9s linear infinite; }
.stack.is-live .conduit.is-cut .cd-glow { animation: none; }
.facet.is-checked .node { animation: seal-check .5s ease-out; }
.stack[data-step="1"] .facet:not(.is-broken):not(.facet-ghost) .node { animation: seal-check 1.6s ease-in-out infinite; }
.stack[data-step="2"] .conduit:not(.is-cut):not(.conduit-ghost) .cd-core { stroke-width: 3; }
.stack[data-step="2"] .conduit:not(.is-cut):not(.conduit-ghost) .cd-glow { stroke-width: 12; }
.stack.is-small .fc-label, .stack.is-small .rb-none-word { display: none; }
.stack.is-small .rb-cap { font-size: 13px; }
@media (prefers-reduced-motion: reduce) {
  .tilt { transform: none !important; }
  .fc-top, .node, .cd-glow, .cd-core, .rb-shadow { transition: none; }
  .stack.is-live .facet:not(.facet-ghost) .node, .facet.is-checked .node,
  .stack[data-step="1"] .facet:not(.is-broken):not(.facet-ghost) .node { animation: none; }
  .stack.is-live .conduit:not(.conduit-ghost) line { stroke-dasharray: none; animation: none; }
  .conduit.is-cut .cd-core, .stack.is-live .conduit.is-cut .cd-core { stroke-dasharray: 5 7; animation: none; }
}

/* Proof: the model stays in view on one side while the explanation scrolls past */
h2 { font-weight: 500; font-size: clamp(1.875rem, 1.3rem + 2.2vw, 3.25rem); line-height: 1.08; letter-spacing: -.025em; text-wrap: balance; }
.muted { color: var(--chalk-soft); }
.proof-grid { display: grid; }
.stage-proof { position: sticky; top: 0; z-index: 3; height: 40vh; height: 40svh; background: linear-gradient(180deg, var(--frame) 94%, rgba(26, 26, 28, 0)); }
.proof-copy { padding-block: 2rem 4rem; }
@media (min-width: 62rem) {
  .proof-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 4rem; align-items: start; }
  .stage-proof { height: 100vh; background: none; }
  .proof-copy { padding-block: 9rem 8rem; }
}
.proof-copy > .muted { margin-top: 1.25rem; max-width: 34rem; }
.steps { list-style: none; counter-reset: step; margin: 2.5rem 0 0; padding: 0; border-top: 1px solid var(--edge); }
.steps li { counter-increment: step; position: relative; padding: 1.75rem 0 1.75rem 3.5rem; border-bottom: 1px solid var(--edge); transition: opacity .3s; }
.steps li::before { content: "/0" counter(step); position: absolute; left: 0; top: 1.8125rem; font-size: .9375rem; color: var(--chalk-soft); transition: color .3s; }
.steps.is-tracking li { opacity: .5; }
.steps.is-tracking li.is-active { opacity: 1; }
.steps li.is-active::before { color: var(--yellow); }
.steps h3 { font-size: 1.25rem; font-weight: 500; }
.steps p { margin-top: .375rem; color: var(--chalk-soft); max-width: 32rem; font-size: 1rem; }
@media (prefers-reduced-motion: reduce) { .steps li, .steps li::before { transition: none; } }

.lab { margin-top: 4rem; border: 1.5px solid var(--edge); border-radius: 1.75rem; padding: 1.5rem; background: rgba(26, 26, 28, .6); }
@media (min-width: 40rem) { .lab { padding: 2.25rem; } }
.lab > h3 { font-size: 1.5rem; font-weight: 500; letter-spacing: -.01em; }
.lab > .muted { margin-top: .625rem; font-size: 1rem; }
.chain { list-style: none; margin: 1.75rem 0 0; padding: 0; }
.rec { position: relative; padding: 0 0 1.375rem 2.25rem; }
.rec:last-child { padding-bottom: 0; }
.rec::before { content: ""; position: absolute; left: .5rem; top: 1.375rem; bottom: -.125rem; border-left: 2px solid var(--edge); }
.rec:last-child::before { display: none; }
.rec::after { content: ""; position: absolute; left: 0; top: .25rem; width: 1.125rem; height: 1.125rem; border-radius: 50%; border: 2px solid var(--edge); background: var(--frame); }
.rec.is-ok::after { border-color: var(--yellow); background: var(--yellow); box-shadow: inset 0 0 0 3px var(--frame); }
.rec.is-bad::after { border-color: var(--bad); }
.rec.is-bad::before { border-left: 2px dashed var(--bad); }
.rec.is-pending::after { border: 2px dashed var(--chalk-soft); }
.rec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .125rem 1rem; }
.rec-what { font-weight: 600; }
.rec-state { font-size: .875rem; color: var(--chalk-soft); }
.rec.is-ok .rec-state { color: var(--yellow); }
.rec.is-bad .rec-what, .rec.is-bad .rec-state { color: var(--bad); }
.rec-was { margin-top: .125rem; font-size: .9375rem; color: var(--chalk-soft); text-decoration: line-through; }
.rec-print { margin-top: .25rem; font-family: var(--mono); font-size: .8125rem; color: var(--chalk-soft); overflow-wrap: anywhere; }
.rec-print b { font-weight: 400; color: var(--chalk); }
.rec.is-bad .rec-print b { color: var(--bad); }
.tamper { margin-top: .625rem; padding: .3125rem .875rem; font: inherit; font-size: .875rem; color: var(--chalk); background: transparent; border: 1.5px solid var(--edge); border-radius: 99rem; cursor: pointer; }
.tamper:hover { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.tamper[disabled] { display: none; }
.verdict { margin-top: 1.75rem; padding: 1rem 1.125rem; border-radius: 1rem; background: #242427; font-size: 1rem; }
.verdict.is-ok { color: var(--yellow); }
.verdict.is-bad { background: var(--yellow); color: var(--ink); }
.verdict strong { display: block; font-size: 1.1875rem; font-weight: 600; margin-bottom: .25rem; }
.undo { margin-top: 1rem; padding: .5rem 1.125rem; font: inherit; font-size: .9375rem; color: var(--chalk); background: transparent; border: 1.5px solid var(--chalk); border-radius: 99rem; cursor: pointer; }
.undo:hover { background: var(--chalk); color: var(--ink); }

/* Why */
.why { position: relative; z-index: 6; background: var(--frame); padding-block: 4rem 5rem; border-top: 1px solid var(--edge); }
@media (min-width: 62rem) { .why { padding-block: 7rem 8rem; } }
.cards { display: grid; gap: 1rem; margin-top: 2.5rem; }
@media (min-width: 52rem) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { border: 1.5px solid var(--edge); border-radius: 1.25rem; padding: 1.5rem 1.5rem 1.75rem; transition: background-color .25s, color .25s, border-color .25s; }
.card svg { width: 3rem; height: 3rem; margin-bottom: 2.5rem; }
.ln { fill: none; stroke: var(--yellow); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; transition: stroke .25s; }
.card h3 { font-size: 1.3125rem; font-weight: 500; letter-spacing: -.01em; }
.card p { margin-top: .625rem; color: var(--chalk-soft); font-size: 1rem; transition: color .25s; }
.card:hover { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.card:hover p { color: #2E2F16; }
.card:hover .ln { stroke: var(--ink); }
@media (prefers-reduced-motion: reduce) { .card, .card p, .ln { transition: none; } }

/* Footer */
.foot { position: relative; z-index: 6; background: var(--frame); border-top: 1px solid var(--edge); color: var(--chalk-soft); font-size: .9375rem; padding-bottom: env(safe-area-inset-bottom, 0px); }
.foot-row { display: grid; gap: .25rem; padding-block: 1.5rem; }
@media (min-width: 52rem) { .foot-row { grid-template-columns: 1fr auto auto; gap: 2.5rem; } }
.noscript { color: var(--chalk-soft); text-align: center; padding: 0 1.5rem 2rem; }
