/* =================================================================
   VITALITY PENS — Clinical White / Quiet Spec Sheet
   Vanilla CSS. Mobile-first. Hairlines only, no shadows.
   ================================================================= */

/* ---------- Self-hosted fonts (latin subset, no third-party CDN) ----
   Inter ships as one variable woff2 covering 400–600; IBM Plex Mono is
   two static weights. Self-hosting removes the render-blocking Google
   Fonts request and the cross-border CDN data transfer. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/inter.woff2) format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/ibm-plex-mono-400.woff2) format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/ibm-plex-mono-500.woff2) format("woff2");
}

/* ---------- Design tokens ---------- */
:root {
  /* Palette */
  --bg: #FBFCFC;
  --surface: #FFFFFF;
  --text: #0B0F12;
  --text-muted: #5B6770;
  --accent: #0E7C86;
  --accent-hover: #0A6068;
  --accent-tint: #F1F7F7;
  --border: #E2E6E8;
  /* Field boundary: darker than --border so inputs clear WCAG 1.4.11 (≥3:1
     against the white form panel). #767F86 ≈ 4.0:1 on #FFFFFF. */
  --field-border: #767F86;
  --error: #B3261E;

  /* Typography — Inter for both body and headings (single family). */
  --font-heading: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Fluid type scale (1.250 major third, tightened large) */
  --step--1: clamp(0.78rem, 0.76rem + 0.10vw, 0.84rem);
  --step-0:  clamp(0.95rem, 0.92rem + 0.18vw, 1.05rem);
  --step-1:  clamp(1.10rem, 1.02rem + 0.40vw, 1.35rem);
  --step-2:  clamp(1.45rem, 1.25rem + 0.95vw, 2.10rem);
  --step-3:  clamp(2.00rem, 1.55rem + 2.00vw, 3.15rem);
  --step-hero: clamp(2.30rem, 1.70rem + 3.00vw, 4.00rem);
  --mono-label: clamp(0.70rem, 0.68rem + 0.10vw, 0.78rem);
  --wordmark-size: clamp(0.95rem, 0.90rem + 0.20vw, 1.05rem);

  /* Spacing scale */
  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4rem;

  /* Layout */
  --shell-max: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --col-gap: clamp(16px, 3vw, 32px);
  --section-pad: clamp(64px, 10vh, 128px);

  --ease: 200ms ease;
}

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

html {
  font-size: clamp(16px, 0.96rem + 0.18vw, 18px);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { margin: 0; font-family: var(--font-heading); }
p { margin: 0; }
ul, ol, dl { margin: 0; padding: 0; }
li { list-style: none; }

img, svg, canvas { display: block; max-width: 100%; }
.svg-defs { position: absolute; width: 0; height: 0; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- Shell / grid ---------- */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-pad); }

/* Full-width hairline separators between sections */
.section + .section,
.site-footer {
  border-top: 1px solid var(--border);
}
.site-header { border-bottom: 1px solid transparent; }

/* Faint vertical hairline frame on wide screens ("spec-sheet margins"). */
@media (min-width: 1024px) {
  .section > .shell { position: relative; }
  .section > .shell::before,
  .section > .shell::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--border);
    opacity: 0.7;
    pointer-events: none;
  }
  .section > .shell::before { left: calc(var(--gutter) - clamp(10px, 2.5vw, 32px)); }
  .section > .shell::after  { right: calc(var(--gutter) - clamp(10px, 2.5vw, 32px)); }
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--surface);
  color: var(--accent);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: var(--mono-label);
  text-decoration: none;
}
.skip-link:focus {
  left: var(--gutter);
  top: var(--space-2);
}

/* ---------- Mono utility labels ---------- */
.index-label,
.cell-kicker,
.response-tag,
.header-microlabel,
.footer-copy,
.footer-origin {
  font-family: var(--font-mono);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--text-muted);
}

.index-label {
  font-size: var(--mono-label);
  margin-bottom: var(--space-5);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
/* small accent tick before each section index label */
.index-label::before {
  content: "";
  width: 1.6em;
  height: 2px;
  background: var(--accent);
  flex: none;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  transition: border-color 180ms ease;
}
.site-header.is-scrolled { border-bottom-color: var(--border); }

.header-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  text-decoration: none;
  color: var(--text);
}
.wordmark-mark { color: var(--accent); flex: none; }
.wordmark-mark path { stroke-width: 2.2; }

.wordmark-text {
  font-family: var(--font-heading);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--wordmark-size);
  line-height: 1;
}
.wordmark-tag {
  font-family: var(--font-heading);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.55em;
  letter-spacing: 0.10em;
  margin-left: 0.25em;
  color: var(--accent);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.header-microlabel {
  font-size: var(--mono-label);
  display: none;
}
@media (min-width: 640px) {
  .header-microlabel { display: inline; }
}
.header-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.4em;
  margin: 0 -0.4em;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--mono-label);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--ease);
}
.header-link:hover,
.header-link:focus-visible { color: var(--accent); }

/* ---------- Animated underline links ---------- */
.link,
.email-link {
  color: var(--accent);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size var(--ease);
  padding-bottom: 1px;
}
.link:hover, .link:focus-visible,
.email-link:hover, .email-link:focus-visible {
  background-size: 100% 1px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--step-0);
  line-height: 1;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.9em 1.5em;
  text-decoration: none;
  cursor: pointer;
  border-radius: 2px;
  transition: background-color var(--ease);
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn:active { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn-submit { width: 100%; margin-top: var(--space-2); }

/* ---------- Typography roles ---------- */
.lead {
  font-size: var(--step-1);
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 52ch;
}

.section-title {
  font-size: var(--step-2);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.12;
  max-width: 24ch;
}

.section-head { margin-bottom: var(--space-6); }
.section-head .index-label { margin-bottom: var(--space-4); }
.section-intro {
  margin-top: var(--space-3);
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 62ch;
}

/* ============================================================
   01 — HERO (static research still + spec strip)
   ============================================================
   Mobile-first: copy, then a framed lab still, then the spec strip.
   Desktop (>=1024px): two columns (copy | still) with the spec strip
   spanning full width below. No sticky stage, no canvas, no scrub.
   ============================================================ */
.hero { padding-block: var(--space-6) var(--section-pad); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-6);
  align-items: center;
}
/* minmax(0,1fr) + min-width:0 stop the image's intrinsic width (and the wide
   max-width copy) from blowing the column past a narrow viewport. */
.hero-copy, .hero-figure { min-width: 0; }

.hero-title {
  font-size: var(--step-hero);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.025em;
  max-width: 18ch;
}
.hero-subhead { margin-top: var(--space-4); max-width: 54ch; }
.hero-cta-wrap {
  margin-top: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: flex-start;
}
.cta-note {
  font-size: var(--step--1);
  line-height: 1.45;
  color: var(--text-muted);
  max-width: 44ch;
}
.research-note {
  margin-top: var(--space-4);
  font-size: var(--step--1);
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 54ch;
}

/* Framed research still */
.hero-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.hero-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 2px;
  background:
    radial-gradient(120% 90% at 70% 30%, #ffffff 0%, var(--accent-tint) 70%, #e7eeef 100%);
}
.hero-figcaption {
  font-family: var(--font-mono);
  font-size: var(--mono-label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Spec strip */
.hero-specs {
  margin-top: var(--space-6);
  border: 1px solid var(--border);
  border-radius: 2px;
  display: grid;
  grid-template-columns: 1fr;
}
.spec-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--mono-label);
  letter-spacing: 0.06em;
}
.spec-row + .spec-row { border-top: 1px solid var(--border); }
.spec-row dt { color: var(--text-muted); text-transform: uppercase; margin: 0; }
.spec-row dd { color: var(--text); font-weight: 500; margin: 0; text-align: right; }

@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr); gap: var(--col-gap); }
  .hero-specs { grid-template-columns: repeat(5, 1fr); }
  .spec-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35em;
    padding: var(--space-3) var(--space-4);
  }
  .spec-row + .spec-row { border-top: 0; border-left: 1px solid var(--border); }
  .spec-row dt { font-size: calc(var(--mono-label) * 0.9); }
  .spec-row dd { text-align: left; }
}

/* ============================================================
   02 — PROCESS (synthesis -> QC -> documentation)
   ============================================================ */
.qc-flow {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--border);
}
.qc-step {
  position: relative;
  padding: clamp(20px, 3vw, 28px);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.qc-step:first-child { border-top: 0; }
.qc-num {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--step-2);
  line-height: 1;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.qc-label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--step-0);
  line-height: 1.3;
  color: var(--text);
}
.qc-detail {
  font-size: var(--step--1);
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 38ch;
}
@media (min-width: 600px) {
  .qc-flow { grid-template-columns: repeat(2, 1fr); }
  .qc-step { border-top: 1px solid var(--border); }
  .qc-step:nth-child(-n+2) { border-top: 0; }
  .qc-step:nth-child(2n) { border-left: 1px solid var(--border); }
}
@media (min-width: 900px) {
  .qc-flow { grid-template-columns: repeat(4, 1fr); }
  .qc-step { border-top: 0; border-left: 1px solid var(--border); }
  .qc-step:first-child,
  .qc-step:nth-child(2),
  .qc-step:nth-child(3),
  .qc-step:nth-child(4) { border-top: 0; }
  .qc-step:nth-child(4n+1) { border-left: 0; }
}

/* ============================================================
   03 — QUALITY (ruled spec table of badges)
   ============================================================ */
.spec-table {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--border);
}
.spec-cell {
  position: relative;
  padding: clamp(20px, 3vw, 28px);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-height: 168px;
}
.spec-cell:first-child { border-top: 0; }

.spec-cell::before {
  content: "";
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  opacity: 0;
  transition: opacity var(--ease);
}
.spec-cell:hover::before,
.spec-cell:focus-within::before { opacity: 1; }

.cell-kicker { font-size: var(--mono-label); }
.cell-label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--step-0);
  line-height: 1.3;
  color: var(--text);
}
.cell-detail {
  font-size: var(--step--1);
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 40ch;
}

@media (min-width: 560px) {
  .spec-table { grid-template-columns: repeat(2, 1fr); }
  .spec-cell { border-top: 1px solid var(--border); }
  .spec-cell:nth-child(-n+2) { border-top: 0; }
  .spec-cell:nth-child(2n) { border-left: 1px solid var(--border); }
}
@media (min-width: 900px) {
  .spec-table { grid-template-columns: repeat(3, 1fr); }
  .spec-cell { border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
  .spec-cell:nth-child(-n+3) { border-top: 0; }
  .spec-cell:nth-child(3n+1) { border-left: 0; }
}

.quality-cta {
  margin-top: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: flex-start;
}
.quality-cta-note {
  font-size: var(--step--1);
  color: var(--text-muted);
}

/* ============================================================
   04 — DOCUMENTATION (what a COA includes)
   ============================================================ */
.coa-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }

.coa-fields {
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--surface);
}
.coa-field {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border);
}
.coa-field:first-child { border-top: 0; }
.coa-field dt {
  font-size: var(--step--1);
  color: var(--text);
  font-weight: 500;
}
.coa-field dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--mono-label);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-align: right;
}
.coa-specimen {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.coa-specimen img {
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--surface);
}
.coa-specimen figcaption {
  font-size: var(--step--1);
  line-height: 1.5;
  color: var(--text-muted);
}
@media (min-width: 860px) {
  .coa-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
    column-gap: var(--space-7);
    align-items: start;
  }
}

/* ============================================================
   05 — CONTACT
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-7); }

.contact-intro .section-title { max-width: 18ch; }
.contact-intro .lead { margin-top: var(--space-4); max-width: 48ch; }

.email-line { margin-top: var(--space-6); }
.email-link {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--step-2);
  line-height: 1.15;
  overflow-wrap: anywhere;
  background-size: 100% 1px;
}
.email-link:hover, .email-link:focus-visible { color: var(--accent-hover); }

.email-status {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--mono-label);
  color: var(--accent);
  margin-left: 0.6em;
  opacity: 0;
  transition: opacity var(--ease);
}
.email-status.is-visible { opacity: 1; }

.copy-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--mono-label);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  padding: 0.75em 1em;
  cursor: pointer;
  border-radius: 2px;
  transition: color var(--ease), border-color var(--ease);
}
.copy-btn:hover, .copy-btn:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}

.response-tag {
  margin-top: var(--space-5);
  font-size: var(--mono-label);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
  display: inline-block;
}

/* Form panel */
.contact-form-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: clamp(24px, 4vw, 40px);
}

.field { margin-bottom: var(--space-4); }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--mono-label);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
  transition: color 120ms ease;
}
.field .req { color: var(--accent); margin-left: 0.15em; }
.field .optional { text-transform: none; letter-spacing: 0; }

.form-legend {
  margin-bottom: var(--space-4);
  font-size: var(--step--1);
  color: var(--text-muted);
}
.form-legend span { color: var(--accent); }

.form-hint {
  margin-top: var(--space-1);
  font-size: var(--step--1);
  line-height: 1.5;
  color: var(--text-muted);
}

.form-note {
  margin-top: var(--space-3);
  font-size: var(--step--1);
  line-height: 1.5;
  color: var(--text-muted);
}
.form-note-legal { margin-top: var(--space-2); opacity: 0.92; }

.field input,
.field textarea,
.field select {
  width: 100%;
  font-family: var(--font-body);
  font-size: max(16px, var(--step-0));
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--field-border);
  border-radius: 2px;
  padding: 0.6em 0.7em;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.field textarea { resize: vertical; min-height: 5.5em; }
.field input::placeholder,
.field textarea::placeholder { color: var(--text-muted); opacity: 1; }

/* Native select styled to match the inputs */
.field select {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  padding-right: 1.8em;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
    linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position:
    calc(100% - 13px) calc(50% - 2px),
    calc(100% - 8px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.field:focus-within label { color: var(--accent); }

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"],
.field select[aria-invalid="true"] {
  border-color: var(--error);
}

/* Research-use acknowledgement checkbox */
.field-check { margin-top: var(--space-5); }
.check-label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--font-body);
  font-size: var(--step--1);
  line-height: 1.45;
  color: var(--text);
  cursor: pointer;
}
.check-label input {
  flex: none;
  width: 1.15em;
  height: 1.15em;
  margin-top: 0.15em;
  accent-color: var(--accent);
}
.field-check:focus-within .check-label { color: var(--text); }

.field-error {
  margin-top: var(--space-1);
  font-size: var(--step--1);
  color: var(--error);
}

/* Honeypot */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-confirm {
  margin-top: var(--space-3);
  font-size: var(--step--1);
  font-weight: 500;
}
.form-confirm.is-success { color: var(--accent); }
.form-confirm.is-pending { color: var(--text); }
.form-helper {
  margin-top: var(--space-3);
  font-size: var(--step--1);
  color: var(--text-muted);
}

@media (min-width: 860px) {
  .contact-grid {
    grid-template-columns: repeat(12, 1fr);
    column-gap: var(--col-gap);
    align-items: start;
  }
  .contact-intro { grid-column: 1 / 6; }
  .contact-form-wrap { grid-column: 7 / 13; }
}

/* ============================================================
   LEGAL PAGES (imprint / privacy) — simple prose column
   ============================================================ */
.legal { padding-block: var(--section-pad); }
.legal-doc { max-width: 70ch; }
.legal-doc h2 {
  font-size: var(--step-1);
  font-weight: 600;
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
}
.legal-doc h2:first-of-type { margin-top: var(--space-5); }
.legal-doc p, .legal-doc li {
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--text-muted);
}
.legal-doc p { margin-bottom: var(--space-3); }
.legal-doc ul { margin: 0 0 var(--space-3) 1.1em; }
.legal-doc li { list-style: disc; margin-bottom: var(--space-1); }
.legal-doc dt { font-weight: 600; color: var(--text); margin-top: var(--space-3); }
.legal-doc dd { margin: 0; color: var(--text-muted); }
.legal-meta {
  margin-top: var(--space-5);
  font-family: var(--font-mono);
  font-size: var(--mono-label);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.legal-placeholder {
  border: 1px dashed var(--field-border);
  border-radius: 2px;
  padding: 0.1em 0.4em;
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--text);
}

/* 404 */
.notfound {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-4);
  padding-block: var(--section-pad);
}
.notfound .index-label { margin-bottom: 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { padding-block: clamp(40px, 6vw, 72px); }
.footer-inner { display: flex; flex-direction: column; gap: var(--space-5); }

.footer-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.wordmark-sm .wordmark-text { font-size: var(--mono-label); letter-spacing: 0.08em; }

.footer-copy,
.footer-origin { font-size: var(--mono-label); }

.footer-compliance-block {
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--accent-tint);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.footer-compliance {
  font-size: var(--step--1);
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 90ch;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--step--1);
  color: var(--text-muted);
}
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.25em;
  margin: 0 -0.25em;
}

@media (min-width: 768px) {
  .footer-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* ============================================================
   MOTION — staggered reveal; fully gated
   ============================================================
   Hidden only when JS is present (html.js); no-JS users see content
   immediately. Above-the-fold hero copy is never reveal-gated. */
.js .reveal {
  opacity: 0;
  transform: translateY(12px);
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 420ms cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0ms),
              transform 420ms cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0ms);
}

/* Higher-contrast preference */
@media (prefers-contrast: more) {
  :root { --border: #9aa4ab; --text-muted: #3d474e; --field-border: #4d575e; }
}

/* Reduced motion: no reveal travel, no smooth scroll. */
@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;
  }
  .js .reveal { opacity: 1; transform: none; }
}
