/* ==========================================================================
   QALVE — design tokens
   ========================================================================== */

:root {
  --void:       #08070A;
  --void-soft:  #0E0D10;
  --paper:      #F1EEE2;
  --parchment:  #C9C4B2;
  --graphite:   #8A8677;
  --graphite-2: #5C594E;
  --hairline:   rgba(241, 238, 226, 0.12);
  --hairline-2: rgba(241, 238, 226, 0.22);
  --seal:       #9C2B1F;
  --seal-dim:   rgba(156, 43, 31, 0.45);

  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body:    "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --container: 1360px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-pad: clamp(4rem, 10vw, 8rem);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================================
   Reset
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body, h1, h2, h3, p, dl, dd, ol, ul, table, th, td, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
table { border-collapse: collapse; width: 100%; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

html {
  scroll-behavior: smooth;
  background: var(--void);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--void);
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--paper);
  color: var(--void);
}

:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--paper);
  color: var(--void);
  padding: 0.75rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  z-index: 200;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.wrap {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: 860px; }

/* ==========================================================================
   Type utilities
   ========================================================================== */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--graphite);
  margin-bottom: 1.25rem;
}

/* ==========================================================================
   Reveal-on-scroll (progressive enhancement — visible by default)
   ========================================================================== */

.motion .reveal {
  opacity: 0;
  transform: translateY(22px);
}
.motion .reveal.in-view {
  opacity: 1;
  transform: none;
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.motion .hero__title .line {
  opacity: 0;
  transform: translateY(0.4em);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.motion .hero__title .line:nth-child(1) { transition-delay: 0.05s; }
.motion .hero__title .line:nth-child(2) { transition-delay: 0.18s; }
.motion .hero__title .line:nth-child(3) { transition-delay: 0.31s; }
.motion .hero__title.in-view .line {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Top bar
   ========================================================================== */

.topbar {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.topbar.is-scrolled {
  background: var(--void);
  border-bottom-color: var(--hairline);
}

.topbar__inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--paper);
  display: inline-flex;
  align-items: baseline;
  gap: 0.3em;
}
.wordmark__mark {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.85em;
  color: var(--seal);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2rem);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.nav a {
  color: var(--parchment);
  position: relative;
  padding-block: 0.3rem;
}
.nav a:not(.nav__cta)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--seal);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease);
}
.nav a:not(.nav__cta):hover::after,
.nav a:not(.nav__cta):focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav__cta {
  border: 1px solid var(--hairline-2);
  padding: 0.55rem 1rem;
  border-radius: 999px;
  color: var(--paper);
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.nav__cta:hover, .nav__cta:focus-visible {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--void);
}

.navtoggle {
  display: none;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper);
}
.navtoggle__icon {
  width: 18px;
  height: 12px;
  position: relative;
}
.navtoggle__icon::before,
.navtoggle__icon::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: currentColor;
  transition: transform 0.3s var(--ease);
}
.navtoggle__icon::before { top: 0; }
.navtoggle__icon::after { bottom: 0; }
.navtoggle[aria-expanded="true"] .navtoggle__icon::before {
  transform: translateY(5.5px) rotate(45deg);
}
.navtoggle[aria-expanded="true"] .navtoggle__icon::after {
  transform: translateY(-5.5px) rotate(-45deg);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.9rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.btn span { transition: transform 0.25s var(--ease); }
.btn:hover span, .btn:focus-visible span { transform: translateX(3px); }

.btn--primary {
  background: var(--paper);
  color: var(--void);
}
.btn--primary:hover, .btn--primary:focus-visible {
  transform: translateY(-2px);
}

.btn--ghost {
  border-color: var(--hairline-2);
  color: var(--paper);
}
.btn--ghost:hover, .btn--ghost:focus-visible {
  border-color: var(--paper);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding-top: clamp(8.5rem, 18vw, 12rem);
  padding-bottom: clamp(4rem, 9vw, 7rem);
  border-bottom: 1px solid var(--hairline);
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(2.6rem, 8.4vw, 7.2rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  color: var(--paper);
  max-width: 16ch;
}
.hero__title .line { display: block; }

.hero__foot {
  margin-top: clamp(2rem, 5vw, 3.25rem);
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
  border-bottom: 1px solid var(--hairline);
}

.hero__lede {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.6;
  max-width: 42ch;
  color: var(--parchment);
}

.hero__actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.meta-grid {
  margin-top: clamp(2rem, 5vw, 3rem);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem 2rem;
}
.meta-grid dt {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--graphite);
  margin-bottom: 0.5rem;
}
.meta-grid dd {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--paper);
  line-height: 1.5;
}

.meta-grid--card {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 1.5rem;
  gap: 1.25rem 1.5rem;
}
.meta-grid--card dd { color: var(--parchment); font-size: 0.8rem; }

/* ==========================================================================
   Articles (shared)
   ========================================================================== */

.article {
  padding-block: var(--section-pad);
  border-bottom: 1px solid var(--hairline);
}
.article--dark { background: var(--void-soft); }

.article__head {
  max-width: 56ch;
  margin-bottom: clamp(3rem, 7vw, 5rem);
}
.article__title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(2.2rem, 5.2vw, 4rem);
  line-height: 1;
  color: var(--paper);
  margin-bottom: 1.1rem;
}
.article__intro {
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  line-height: 1.65;
  color: var(--parchment);
}
.article__foot {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-top: clamp(2rem, 4vw, 2.75rem);
  border-top: 1px solid var(--hairline);
  font-size: 1.05rem;
  color: var(--parchment);
}
.article__foot a {
  color: var(--paper);
  font-weight: 500;
  border-bottom: 1px solid var(--seal-dim);
  transition: border-color 0.25s var(--ease);
}
.article__foot a:hover, .article__foot a:focus-visible { border-color: var(--seal); }

/* ==========================================================================
   Practice clauses
   ========================================================================== */

.clauses {
  display: flex;
  flex-direction: column;
}
.clause {
  display: grid;
  grid-template-columns: minmax(3.5rem, 6rem) 1fr;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding-block: clamp(2rem, 5vw, 3rem);
  border-top: 1px solid var(--hairline);
}
.clause:last-child { border-bottom: 1px solid var(--hairline); }

.clause__num {
  font-family: var(--font-mono);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-weight: 500;
  color: var(--graphite-2);
}

.clause__body h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  color: var(--paper);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}
.clause__body p {
  max-width: 62ch;
  color: var(--parchment);
  line-height: 1.65;
}
.clause__role {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--graphite);
  margin-bottom: 0.9rem;
}

/* ==========================================================================
   Pipeline (Platform)
   ========================================================================== */

.pipeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2rem);
}
.pipeline__stage {
  border-top: 1px solid var(--hairline-2);
  padding-top: 1.75rem;
}
.pipeline__num {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--graphite);
  letter-spacing: 0.1em;
  margin-bottom: 1.25rem;
}
.pipeline__stage h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  color: var(--paper);
  margin-bottom: 0.75rem;
}
.pipeline__stage p {
  color: var(--parchment);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}
.pipeline .meta-grid--card { grid-template-columns: 1fr; gap: 1rem; margin-top: 0; }

/* ==========================================================================
   Stats
   ========================================================================== */

.stats {
  margin-top: clamp(4rem, 9vw, 6rem);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--hairline-2);
}
.stat {
  padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1rem, 2vw, 1.5rem) 0 0;
  border-right: 1px solid var(--hairline);
}
.stat:last-child { border-right: none; }
.stat__value {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: var(--paper);
  letter-spacing: -0.01em;
}
.stat__label {
  display: block;
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--graphite);
  line-height: 1.5;
}

/* ==========================================================================
   Register / ledger
   ========================================================================== */

.ledger {
  position: relative;
  border: 1px solid var(--hairline-2);
  border-radius: 6px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  overflow: hidden;
}

.ledger__table th, .ledger__table td {
  text-align: left;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  vertical-align: top;
}
.ledger__table tr:last-child th,
.ledger__table tr:last-child td { border-bottom: none; }
.ledger__table th {
  color: var(--graphite);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.7rem;
  width: 40%;
  padding-right: 1.5rem;
}
.ledger__table td { color: var(--paper); }

.ledger__stamp {
  position: absolute;
  top: clamp(1rem, 3vw, 2rem);
  right: clamp(1rem, 3vw, 2rem);
  color: var(--seal);
  opacity: 0.9;
  transform: rotate(-8deg);
  pointer-events: none;
}

/* ==========================================================================
   Origin / prose
   ========================================================================== */

.prose {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.75;
  color: var(--parchment);
  max-width: 66ch;
}
.prose + .prose { margin-top: 1.25rem; }

/* ==========================================================================
   Contact
   ========================================================================== */

.contact {
  padding-block: var(--section-pad);
}
.contact__title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(2.4rem, 6.5vw, 5rem);
  line-height: 1.02;
  color: var(--paper);
  max-width: 16ch;
  margin-bottom: 1.25rem;
}
.contact__lede {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--parchment);
  max-width: 44ch;
}

.contact__layout {
  margin-top: clamp(3rem, 7vw, 4.5rem);
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  padding-top: clamp(2rem, 4vw, 2.75rem);
  border-top: 1px solid var(--hairline-2);
  align-items: start;
}

.contact__info {
  display: flex;
  flex-direction: column;
}
.contact__item {
  margin: 0;
  padding: clamp(1.25rem, 3vw, 1.75rem) 0;
  border-top: 1px solid var(--hairline);
}
.contact__info .contact__item:first-child {
  border-top: none;
  padding-top: 0;
}
.contact__item dt {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--graphite);
  margin-bottom: 0.75rem;
}
.contact__item dd {
  margin: 0;
  font-size: 1.05rem;
  color: var(--paper);
  line-height: 1.55;
}
.contact__item a {
  border-bottom: 1px solid var(--seal-dim);
  transition: border-color 0.25s var(--ease);
}
.contact__item a:hover, .contact__item a:focus-visible { border-color: var(--seal); }
.contact__item .pending {
  color: var(--graphite);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-style: normal;
}

/* ---- Contact form ---- */

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.field {
  display: flex;
  flex-direction: column;
}
.field label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--graphite);
  margin-bottom: 0.6rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--hairline-2);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  padding: 0.6rem 0;
  border-radius: 0;
  transition: border-color 0.25s var(--ease);
}
.field textarea {
  resize: vertical;
  min-height: 5.5rem;
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--graphite) 50%),
    linear-gradient(135deg, var(--graphite) 50%, transparent 50%);
  background-position: right 6px top 60%, right 0 top 60%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 1.1rem;
}
.field select:invalid { color: var(--graphite); }
.field select option { background: var(--void-soft); color: var(--paper); }

.field input::placeholder,
.field textarea::placeholder { color: var(--graphite); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--paper);
}

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea {
  border-bottom-color: var(--seal);
}

.field__error {
  display: none;
  align-items: flex-start;
  gap: 0.55rem;
  margin-top: 0.6rem;
  padding: 0.55rem 0.75rem;
  background: var(--void-soft);
  border: 1px solid var(--hairline-2);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--paper);
}
.field__error:not([hidden]) {
  display: flex;
}
.field__error::before {
  content: "!";
  flex: none;
  width: 15px;
  height: 15px;
  margin-top: 0.1rem;
  border-radius: 50%;
  background: var(--seal);
  color: var(--paper);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.68rem;
  line-height: 15px;
  text-align: center;
}

.contact__form-foot {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}
.contact__form-note {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--graphite);
}
.contact__form-note--error { color: var(--seal); }
.contact__form-note--standalone { font-size: 0.9rem; }

.contact__form-success {
  max-width: 44ch;
}
.contact__form-success p:last-child {
  font-size: 1.15rem;
  color: var(--paper);
  line-height: 1.6;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  border-top: 1px solid var(--hairline);
  padding-block: clamp(2.5rem, 6vw, 3.5rem);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
}
.wordmark--footer { font-size: 1.1rem; }

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--parchment);
  align-items: flex-start;
}
.footer__nav a:hover, .footer__nav a:focus-visible { color: var(--paper); }

.footer__legal {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--graphite);
  line-height: 1.7;
  text-align: right;
}

/* ==========================================================================
   Footer legal row
   ========================================================================== */

.footer__nav--legal {
  margin-top: 0.35rem;
}
.footer__cookie-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--parchment);
}
.footer__cookie-link:hover, .footer__cookie-link:focus-visible { color: var(--paper); }

/* ==========================================================================
   Cookie consent banner
   ========================================================================== */

.consent {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 300;
  max-width: 640px;
  margin-inline: auto;
  background: var(--void-soft);
  border: 1px solid var(--hairline-2);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  transform: translateY(12px);
  opacity: 0;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.consent.is-visible {
  opacity: 1;
  transform: none;
}
.consent[hidden] { display: none; }

.consent__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--seal);
  margin-bottom: 0.6rem;
}
.consent__text {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--parchment);
  margin-bottom: 1.1rem;
}
.consent__text a {
  color: var(--paper);
  border-bottom: 1px solid var(--seal-dim);
}
.consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.consent__actions .btn {
  padding: 0.65rem 1.2rem;
  font-size: 0.72rem;
}

/* ==========================================================================
   Doc pages (privacy / terms / disclaimer)
   ========================================================================== */

.docbar {
  border-bottom: 1px solid var(--hairline);
}
.docbar__inner {
  height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.docbar__back {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--parchment);
}
.docbar__back:hover, .docbar__back:focus-visible { color: var(--paper); }

.doc {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}
.doc__title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--paper);
  margin-bottom: 0.85rem;
  max-width: 20ch;
}
.doc__meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--graphite);
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
  padding-bottom: clamp(2rem, 5vw, 3rem);
  border-bottom: 1px solid var(--hairline);
  max-width: 66ch;
}
.doc__intro {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--parchment);
  max-width: 66ch;
  margin-bottom: clamp(2.5rem, 6vw, 3.5rem);
}

.doc-section {
  display: grid;
  grid-template-columns: minmax(3rem, 5rem) 1fr;
  gap: clamp(1rem, 3vw, 2rem);
  padding-block: clamp(1.75rem, 4vw, 2.5rem);
  border-top: 1px solid var(--hairline);
  max-width: 74ch;
}
.doc-section:last-of-type { border-bottom: 1px solid var(--hairline); }
.doc-section__num {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--graphite-2);
}
.doc-section h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--paper);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}
.doc-section p {
  color: var(--parchment);
  line-height: 1.7;
  max-width: 62ch;
}
.doc-section p + p { margin-top: 0.9rem; }
.doc-section ul {
  margin-top: 0.9rem;
  padding-left: 1.2rem;
  color: var(--parchment);
  line-height: 1.7;
}
.doc-section li { list-style: disc; margin-bottom: 0.4rem; }
.doc-section a {
  color: var(--paper);
  border-bottom: 1px solid var(--seal-dim);
}
.doc-section a:hover, .doc-section a:focus-visible { border-color: var(--seal); }

/* ==========================================================================
   404
   ========================================================================== */

.error-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding-block: clamp(4rem, 10vw, 7rem);
}
.error-page__title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(2.4rem, 7vw, 5rem);
  line-height: 1.02;
  color: var(--paper);
  max-width: 14ch;
  margin-bottom: 1.25rem;
}
.error-page__lede {
  font-size: 1.1rem;
  color: var(--parchment);
  max-width: 42ch;
  margin-bottom: 2.5rem;
  line-height: 1.65;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .nav {
    position: fixed;
    inset: 4.5rem 0 0 0;
    background: var(--void);
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem var(--gutter);
    gap: 1.75rem;
    font-size: 1.1rem;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  }
  .nav.is-open {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .nav__cta { margin-top: 0.5rem; }
  .navtoggle { display: inline-flex; }

  .meta-grid,
  .meta-grid--card,
  .pipeline,
  .stats,
  .contact__layout,
  .field-row {
    grid-template-columns: 1fr;
  }
  .stat {
    border-right: none;
    border-bottom: 1px solid var(--hairline);
    padding-bottom: 1.5rem;
  }
  .stat:last-child { border-bottom: none; }

  .clause {
    grid-template-columns: 1fr;
  }
  .clause__num { margin-bottom: -0.5rem; }

  .doc-section {
    grid-template-columns: 1fr;
  }
  .doc-section__num { margin-bottom: -0.5rem; }

  .consent {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    padding: 1.25rem;
  }

  .footer__inner { flex-direction: column; }
  .footer__legal { text-align: left; }
}
