/* xByte — forensic software brand site */

/* Geist & Geist Mono (SIL OFL 1.1, see assets/fonts/OFL.txt), self-hosted: no requests to third parties */
@font-face {
  font-family: "Geist"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("../fonts/geist-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("../fonts/geist-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist Mono"; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url("../fonts/geist-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist Mono"; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url("../fonts/geist-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #07080d;
  --bg-2: #0b0d15;
  --panel: #0e111b;
  --line: rgba(150, 165, 255, .11);
  --line-strong: rgba(150, 165, 255, .22);
  --text: #e8ebf4;
  --muted: #8f97ad;
  --dim: #808aa0;
  --field-border: #4a5270;

  --cyan: #3fd6ff;
  --blue: #5b7cff;
  --violet: #9a2cff;
  --violet-text: #b98cff;
  --tape: #ffd23f;
  --ok: #5cf2a5;

  --grad: linear-gradient(100deg, var(--cyan), var(--blue) 50%, var(--violet));

  --f-sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--f-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* measurement-paper grid */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 70% at 70% 0%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 70% 0%, #000 0%, transparent 75%);
  opacity: .55;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.035em; line-height: 1.02; }
p { margin: 0; }
/* accent = "signature hit": the same yellow highlight the hex viewer uses for carved bytes */
em {
  font-style: normal;
  color: #14120a;
  background: var(--tape);
  display: inline-block;
  line-height: .86;
  padding: .04em .1em .1em;
  margin: 0 .02em;
}
.mono { font-family: var(--f-mono); }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 8px; font-weight: 600;
}
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

/* ---------- buttons ---------- */
.btn {
  --h: 52px;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: var(--h); padding: 0 22px;
  border: 0; border-radius: 3px;
  background: var(--tape); color: #14120a;
  font: 500 14px/1 var(--f-mono); letter-spacing: .04em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, box-shadow .2s;
}
.btn::after { content: "→"; transition: transform .25s var(--ease); }
.btn:hover { background: var(--text); color: var(--bg); }
.btn:hover::after { transform: translateX(4px); }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--field-border); }
.btn-ghost::after { content: "↓"; }
.btn-ghost:hover { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.btn-ghost:hover::after { transform: translateY(3px); }
.btn-small { --h: 40px; padding: 0 16px; font-size: 12.5px; }
.btn-small::after, .btn-block::after { display: none; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
}
.site-header.scrolled {
  background: rgba(7, 8, 13, .78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-color: var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.wordmark { font-weight: 700; font-size: 23px; letter-spacing: -.045em; }
.wordmark b {
  font-weight: 700; background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav { display: flex; align-items: center; gap: 30px; }
.nav a:not(.btn) {
  color: var(--muted); text-decoration: none; font-size: 15px; transition: color .2s;
}
.nav a:not(.btn):hover { color: var(--text); }
.nav-toggle { display: none; }

/* ---------- hero ---------- */
.hero { padding: 128px 0 72px; }
.meta-strip {
  display: flex; flex-wrap: wrap; gap: 8px 28px;
  font-size: 12px; letter-spacing: .08em; color: var(--dim);
  padding-bottom: 18px; margin-bottom: clamp(32px, 6vw, 64px);
  border-bottom: 1px dashed var(--line-strong);
}
.dot-live { color: var(--tape); display: inline-flex; align-items: center; gap: 8px; }
.dot-live::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--tape);
  box-shadow: 0 0 0 0 rgba(255, 210, 63, .6); animation: pulse 2s 4;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(255, 210, 63, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 210, 63, 0); } }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 32px clamp(32px, 4vw, 64px); align-items: end; }
.eyebrow { font-size: 13px; color: var(--cyan); letter-spacing: .04em; margin-bottom: 22px; }
.hero h1 { font-size: clamp(46px, 7vw, 112px); line-height: .96; white-space: nowrap; }
.hero-copy { padding-bottom: 10px; }
.lead { font-size: clamp(17px, 1.5vw, 20px); color: var(--muted); max-width: 30em; margin-bottom: 34px; }
.hero .viewer { grid-column: 1 / -1; margin-top: clamp(24px, 4vw, 48px); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* hex viewer */
.viewer {
  margin: 0; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(14, 17, 27, .92), rgba(9, 11, 18, .96));
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .9), 0 0 0 1px rgba(0, 0, 0, .4), 0 0 120px -50px rgba(91, 124, 255, .5);
  overflow: hidden; position: relative;
}
.viewer-bar {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 16px; font-size: 12px; color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.viewer-file { color: var(--text); }
.viewer-meta { color: var(--dim); }
.viewer-meta b { font-weight: 500; color: var(--ok); }
.viewer-hash { margin-left: auto; color: var(--dim); white-space: nowrap; }
.viewer-hash span { color: var(--ok); }
.viewer-pause {
  font: 500 11px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); background: transparent; border: 1px solid var(--field-border); border-radius: 3px;
  min-height: 30px; padding: 0 10px; cursor: pointer;
}
.viewer-pause:hover { color: var(--text); border-color: var(--text); }
.viewer-pause::before { content: "❚❚ "; }
.viewer-pause[aria-pressed="true"]::before { content: "▶ "; }
.motion-paused .tape-track, .motion-paused .dot-live::before { animation-play-state: paused; }
.viewer-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
.hex {
  font-size: 13px; line-height: 22px; padding: 12px 0 12px 20px;
  color: var(--dim); white-space: pre; position: relative; overflow: hidden;
  height: calc(22px * 13 + 24px);
}
.hex .row { display: flex; gap: 28px; padding-right: 20px; }
.hex .off { color: #6b7390; }
.hex .bytes b, .hex .ascii b { font-weight: 400; }
.hex .nz { color: #9aa3bd; }
.hex .sig { color: #14120a; background: var(--tape); }
.hex .sig-a { color: var(--tape); }
.hex .row.scan { background: linear-gradient(90deg, rgba(63, 214, 255, .14), rgba(63, 214, 255, 0) 90%); box-shadow: inset 2px 0 0 var(--cyan); }
.carved { border-left: 1px solid var(--line); padding: 14px 14px 10px; display: flex; flex-direction: column; min-width: 0; }
.carved-title { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; display: flex; justify-content: space-between; }
.carved-title span { color: var(--tape); }
.carved ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.carved li {
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: rgba(255, 255, 255, .015);
  animation: carve .5s var(--ease);
}
.carved li .t { display: flex; justify-content: space-between; gap: 6px; font-family: var(--f-mono); font-size: 10.5px; color: var(--dim); }
.carved li .t b { color: var(--tape); font-weight: 500; }
.carved li .n { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.carved li .d { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes carve { from { opacity: 0; transform: translateY(-6px); border-color: var(--tape); } }
.viewer figcaption { font-size: 11px; color: var(--dim); padding: 10px 16px; border-top: 1px solid var(--line); }

/* ---------- tape ---------- */
.tape {
  background: var(--tape); color: #15130a; overflow: hidden;
  transform: rotate(-1.2deg); margin: 24px -20px 0; position: relative; z-index: 2;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .7);
}
.tape-track { display: flex; width: max-content; gap: 48px; padding: 11px 0; font-size: 13px; font-weight: 500; letter-spacing: .14em; animation: tape 40s linear infinite; }
.tape-track span::after { content: "■"; margin-left: 48px; font-size: 9px; vertical-align: 2px; }
@keyframes tape { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { padding: clamp(72px, 8vw, 120px) 0; position: relative; }
.section-alt { background: linear-gradient(180deg, transparent, var(--bg-2) 12%, var(--bg-2) 88%, transparent); }
.section-head { max-width: 860px; margin-bottom: clamp(48px, 6vw, 80px); }
.offset { font-size: 13px; color: var(--cyan); margin-bottom: 20px; display: flex; align-items: center; gap: 12px; }
.offset::after { content: ""; width: 56px; height: 1px; background: currentColor; opacity: .6; }
.section h2 { font-size: clamp(38px, 5.2vw, 72px); }
.section-lead { color: var(--muted); font-size: clamp(17px, 1.4vw, 19px); max-width: 40em; margin-top: 26px; }

/* exhibits */
.exhibits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.exhibit {
  --notch: 22px;
  position: relative; padding: 0 28px 24px;
  background: linear-gradient(180deg, var(--panel), rgba(14, 17, 27, .4));
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, 0 100%);
  display: flex; flex-direction: column;
}
.exhibit::before { /* hairline border that respects the notch */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(var(--line-strong), var(--line-strong)) top left / calc(100% - var(--notch)) 1px no-repeat,
              linear-gradient(var(--line-strong), var(--line-strong)) bottom / 100% 1px no-repeat,
              linear-gradient(var(--line-strong), var(--line-strong)) left / 1px 100% no-repeat,
              linear-gradient(var(--line-strong), var(--line-strong)) right bottom / 1px calc(100% - var(--notch)) no-repeat,
              linear-gradient(45deg, transparent calc(50% - .5px), var(--line-strong) calc(50% - .5px), var(--line-strong) calc(50% + .5px), transparent calc(50% + .5px)) top right / var(--notch) var(--notch) no-repeat;
}
.exhibit-tag {
  display: flex; justify-content: space-between; gap: 10px;
  margin: 0 -28px 26px; padding: 12px 28px; padding-right: calc(28px + 10px);
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  border-bottom: 1px dashed var(--line-strong);
}
.exhibit-tag span:first-child { color: var(--tape); }
.exhibit-id { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.exhibit-id img { border-radius: 16px; box-shadow: 0 14px 30px -12px rgba(91, 124, 255, .7); }
.exhibit h3 { font-size: 28px; line-height: 1.05; }
.exhibit h3 small { display: block; font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--muted); margin-bottom: 4px; }
.exhibit > p { color: var(--muted); font-size: 16px; margin-bottom: 22px; }
.scope { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 9px; font-size: 15px; }
.scope li { display: flex; gap: 12px; }
.scope li::before { content: "→"; font-family: var(--f-mono); color: var(--cyan); }
.exhibit-foot {
  margin: auto -28px -24px; display: grid; grid-template-columns: 1.3fr .9fr 1fr;
  border-top: 1px dashed var(--line-strong); font-size: 11.5px;
}
.exhibit-foot div { padding: 12px 0 14px 28px; min-width: 0; }
.exhibit-foot div + div { border-left: 1px solid var(--line); padding-left: 14px; }
.exhibit-foot dt { color: var(--dim); letter-spacing: .12em; text-transform: uppercase; font-size: 10px; margin-bottom: 4px; }
.exhibit-foot dd { margin: 0; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status { display: inline-flex; align-items: center; gap: 8px; color: var(--tape) !important; text-transform: uppercase; }
.status::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-early { color: var(--violet-text) !important; }
.footnote { margin-top: 28px; font-size: 12px; color: var(--dim); }

/* chain */
.chain { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: relative; }
.chain::before {
  content: ""; position: absolute; left: 0; right: 0; top: 23px; height: 1px;
  background: linear-gradient(90deg, var(--line-strong), var(--cyan), var(--violet), var(--line-strong));
}
.chain li { padding-right: 28px; position: relative; }
.chain-n {
  display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--bg-2); border: 1px solid var(--line-strong); font-size: 13px; color: var(--text);
  margin-bottom: 26px; position: relative;
}
.chain h3 { font-size: 24px; margin-bottom: 10px; }
.chain p { color: var(--muted); font-size: 15.5px; }
.chain-tool {
  display: inline-block; margin-top: 16px; font-size: 11px; letter-spacing: .12em;
  padding: 5px 10px; border-radius: 6px; color: var(--cyan); background: rgba(63, 214, 255, .08); border: 1px solid rgba(63, 214, 255, .22);
}
.hashline {
  margin-top: 64px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  padding: 16px 20px; border: 1px dashed var(--line-strong); border-radius: 10px; font-size: 13px;
}
.hashline-label { color: var(--dim); letter-spacing: .1em; }
.hashline-value { color: var(--text); word-break: break-all; flex: 1 1 320px; }
.hashline-value .flip { color: var(--cyan); }
.hashline-ok { color: var(--ok); white-space: nowrap; }

/* principles */
.principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); }
.principle { padding: 44px 48px 52px 0; border-bottom: 1px solid var(--line-strong); display: grid; grid-template-columns: 64px 1fr; column-gap: 8px; }
.principle:nth-child(odd) { border-right: 1px solid var(--line-strong); }
.principle:nth-child(even) { padding-left: 48px; }
.principle-n { font-size: 13px; color: var(--violet-text); padding-top: 9px; grid-row: span 2; }
.principle h3 { font-size: clamp(28px, 3vw, 40px); margin-bottom: 16px; }
.principle p:last-child { color: var(--muted); max-width: 30em; }

/* audience */
.audience { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.audience li {
  display: grid; grid-template-columns: 64px minmax(0, 1.1fr) minmax(0, 1fr); align-items: baseline; gap: 16px;
  padding: 28px 0; border-bottom: 1px solid var(--line-strong);
  transition: padding .35s var(--ease), background .35s;
}
.audience li:hover { padding-left: 16px; background: linear-gradient(90deg, rgba(91, 124, 255, .07), transparent 70%); }
.audience span { color: var(--dim); font-size: 13px; }
.audience strong { font-size: clamp(24px, 2.8vw, 36px); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }
.audience p { color: var(--muted); }

/* access */
.access-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.access-copy { position: sticky; top: 120px; }
.access-alt { margin-top: 28px; color: var(--muted); }
.access-alt a { color: var(--text); text-decoration-color: var(--cyan); text-underline-offset: 4px; }

.form {
  display: grid; gap: 20px; padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--line-strong); border-radius: 18px;
  background: linear-gradient(180deg, var(--panel), rgba(14, 17, 27, .5));
}
.field { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field > label:not(.consent), .field legend { font: 500 12px/1.4 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 0; }
.field legend { margin-bottom: 8px; }
.field input, .field select {
  width: 100%; min-height: 50px; padding: 12px 16px;
  font: 400 16px var(--f-sans); color: var(--text);
  background: rgba(0, 0, 0, .35); border: 1px solid var(--field-border); border-radius: 4px;
  transition: border-color .2s, box-shadow .2s;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 22px) 22px, calc(100% - 17px) 22px; background-size: 5px 5px; background-repeat: no-repeat; }
.field select option { background: var(--panel); }
.field input::placeholder { color: var(--dim); }
.field input:focus, .field select:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(63, 214, 255, .12); }
.field input[aria-invalid="true"] { border-color: #ff6b81; }
.field-error { color: #ff8a9b; font-size: 14px; }
.field-error:empty { display: none; }
.form-note { font-size: 11.5px; color: var(--dim); margin-top: -6px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px;
  border: 1px solid var(--field-border); border-radius: 3px; font-size: 14px; color: var(--muted);
  transition: all .2s;
}
.chip span::before { content: "+"; font-family: var(--f-mono); }
.chip input:checked + span { color: var(--text); border-color: var(--cyan); background: rgba(63, 214, 255, .09); }
.chip input:checked + span::before { content: "✓"; color: var(--cyan); }
.chip input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 3px; }
.consent { display: grid; grid-template-columns: 22px 1fr; gap: 12px; font-size: 14px; color: var(--muted); cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--cyan); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-size: 15px; min-height: 1.6em; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: #ff8a9b; }

/* privacy note under the form */
.privacy-note { font-size: 13px; color: var(--muted); line-height: 1.55; }
.privacy-note a, .consent a { color: var(--text); text-decoration-color: var(--cyan); text-underline-offset: 3px; }
.field textarea {
  width: 100%; min-height: 96px; padding: 12px 16px; resize: vertical;
  font: 400 16px/1.5 var(--f-sans); color: var(--text);
  background: rgba(0, 0, 0, .35); border: 1px solid var(--field-border); border-radius: 4px;
}
.field textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(63, 214, 255, .12); }
.field textarea::placeholder { color: var(--dim); }
.field .hint { font-size: 13px; color: var(--dim); }

/* legal page */
.legal { max-width: 820px; padding-top: 140px; padding-bottom: 96px; }
.legal h1 { font-size: clamp(40px, 6vw, 72px); }
.legal-meta { font-size: 12px; color: var(--dim); margin: 18px 0 48px; }
.legal section { padding: 32px 0; border-top: 1px solid var(--line-strong); }
.legal h2 { font-size: 24px; letter-spacing: -.02em; margin-bottom: 16px; line-height: 1.2; }
.legal p, .legal li { color: var(--muted); }
.legal p + p, .legal ul + p, .legal p + ul { margin-top: 14px; }
.legal ul { padding-left: 20px; display: grid; gap: 8px; margin: 0; }
.legal strong { color: var(--text); font-weight: 600; }
.legal a:not(.btn) { color: var(--text); text-decoration-color: var(--cyan); text-underline-offset: 3px; }
.legal mark { background: rgba(255, 210, 63, .18); color: var(--tape); padding: 0 .2em; border-radius: 2px; }
.legal-back { margin-top: 48px; }
.legal-back .btn-ghost::after { content: "←"; order: -1; }
.legal-page .site-footer .footer-bottom { margin-top: 0; }
.legal-page .site-footer a { color: var(--muted); }

/* footer */
.site-footer { border-top: 1px solid var(--line-strong); padding: 56px 0 32px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 24px 48px; color: var(--muted); font-size: 15px; }
.footer-inner a:not(.brand) { color: var(--text); text-decoration-color: var(--cyan); text-underline-offset: 4px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; font-size: 12px; color: var(--dim); flex-wrap: wrap; }

/* reveal */
/* motion only where it carries meaning: the chain of custody is "built" step by step */
.js .chain.reveal li { opacity: 0; transform: translateX(-12px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .chain.reveal.in li { opacity: 1; transform: none; }
.js .chain.reveal.in li:nth-child(2) { transition-delay: .25s; }
.js .chain.reveal.in li:nth-child(3) { transition-delay: .5s; }
.js .chain.reveal.in li:nth-child(4) { transition-delay: .75s; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; }
  .viewer-body { grid-template-columns: 1fr; }
  .carved { border-left: 0; border-top: 1px solid var(--line); }
  .carved ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .exhibits { grid-template-columns: 1fr; max-width: 640px; }
  .chain { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; }
  .chain::before { display: none; }
}
@media (max-width: 860px) {
  .nav-toggle {
    display: inline-grid; place-items: center; width: 44px; height: 44px;
    background: transparent; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--text); cursor: pointer;
  }
  .bars, .bars::before, .bars::after { display: block; width: 18px; height: 1.5px; background: currentColor; position: relative; transition: transform .3s, background .3s; }
  .bars::before, .bars::after { content: ""; position: absolute; left: 0; }
  .bars::before { top: -6px; } .bars::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] .bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }
  .nav {
    position: fixed; inset: 72px 0 auto; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 24px; background: rgba(7, 8, 13, .97); border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: all .25s var(--ease);
  }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav a:not(.btn) { padding: 14px 0; font-size: 18px; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 18px; --h: 50px; font-size: 16px; }
  .site-header.menu-open { background: rgba(7, 8, 13, .97); }
  .principles { grid-template-columns: 1fr; }
  .principle, .principle:nth-child(even) { padding: 36px 0 40px; border-right: 0; }
  .principle:nth-child(odd) { border-right: 0; }
  .audience li { grid-template-columns: 40px 1fr; }
  .audience p { grid-column: 2; }
  .access-grid { grid-template-columns: 1fr; }
  .access-copy { position: static; }
}
/* must match the JS breakpoint in main.js (8 bytes per row) */
@media (max-width: 760px) {
  .hex { font-size: 11.5px; line-height: 20px; height: calc(20px * 12 + 24px); padding-left: 12px; }
  .hex .row { gap: 12px; }
  .viewer-meta { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding-top: 104px; }
  .carved li:nth-child(n+3) { display: none; }
  .viewer-hash, .viewer-meta { display: none; }
  .viewer-pause { margin-left: auto; }
  .chain { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .exhibit { padding: 0 20px 22px; }
  .exhibit-tag { margin: 0 -20px 22px; padding: 12px 20px; padding-right: 36px; }
  .tape-track { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .js .chain.reveal li { opacity: 1; transform: none; }
  .viewer-pause { display: none; }
}
