/* ==========================================================================
   Qlavis · Messenger — Landing
   Institutional / defense register
   Obsidian-dominant with inverted document sections
   ========================================================================== */

/* ---------- 01. Tokens ---------- */

:root {
  /* Obsidian (default) */
  --bg-obsidian:        #0A0B0F;
  --bg-deepblack:       #020203;
  --bg-lift:            #15171C;
  --bg-card:            rgba(255, 255, 255, 0.025);
  --border:             rgba(255, 255, 255, 0.08);
  --border-strong:      rgba(255, 255, 255, 0.16);
  --text-primary:       #E8ECF5;
  --text-medium:        rgba(232, 236, 245, 0.62);
  --text-light:         rgba(232, 236, 245, 0.38);
  --text-inverse:       #0A0B0F;

  /* Document (inverted) */
  --doc-bg:             #FFFFFF;
  --doc-bg-alt:         #F4F5F7;
  --doc-border:         #E5E5E5;
  --doc-border-strong:  #C9CCD1;
  --doc-text:           #1E2124;
  --doc-text-medium:    #636363;
  --doc-text-light:     #9A9A9A;

  /* Semantic (diagrams + form states only, never chrome) */
  /* No status colours. Pure monochrome. Indication = glyph + weight only. */
  --status-ok:          var(--text-primary);
  --status-err:         var(--text-primary);
  --status-dim:         var(--text-light);

  /* Type */
  --font-body: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto,
               Helvetica, Arial, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Menlo", "Monaco",
               "Consolas", "Courier New", monospace;

  --fs-hero:      clamp(2.5rem, 5vw, 3.75rem);
  --fs-h2:        clamp(2rem,   4vw,   3.5rem);
  --fs-h3:        clamp(1.15rem, 1.5vw, 1.5rem);
  --fs-lede:      clamp(1.05rem, 1.4vw, 1.375rem);
  --fs-body:      1.0625rem;
  --fs-small:     0.875rem;
  --fs-mono:      0.75rem;
  --fs-micro:     0.6875rem;

  /* Spacing (8pt) */
  --s-1:  0.5rem;
  --s-2:  1rem;
  --s-3:  1.5rem;
  --s-4:  2rem;
  --s-5:  3rem;
  --s-6:  4rem;
  --s-7:  6rem;
  --s-8:  8rem;
  --section-pad: clamp(4rem, 10vw, 8rem);

  /* Layout */
  --container:        1480px;
  --container-narrow: 720px;
  --gutter:           clamp(1.5rem, 5vw, 3rem);

  /* Motion */
  --ease:       cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 150ms var(--ease);
}

/* ---------- 02. Reset ---------- */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body {
  background: var(--bg-obsidian);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

input,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--text-primary);
  color: var(--bg-obsidian);
}

/* ---------- 03. Containers ---------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: var(--container-narrow);
}

/* ---------- 04. Sections & register ---------- */

.section {
  padding-block: var(--section-pad);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.section--obsidian {
  background: var(--bg-obsidian);
}

.section--deep {
  background: var(--bg-deepblack);
}

.section--doc {
  /* Remap core tokens so all descendant components invert automatically. */
  --bg-obsidian:    var(--doc-bg);
  --bg-deepblack:   var(--doc-bg);
  --bg-lift:        var(--doc-bg-alt);
  --bg-card:        var(--doc-bg-alt);
  --border:         var(--doc-border);
  --border-strong:  var(--doc-border-strong);
  --text-primary:   var(--doc-text);
  --text-medium:    var(--doc-text-medium);
  --text-light:     var(--doc-text-light);
  --text-inverse:   var(--doc-bg);
  background: var(--doc-bg);
  color: var(--doc-text);
}

.section-header {
  margin-bottom: var(--s-5);
}

/* ---------- 05. Typography ---------- */

h1, h2, h3 {
  color: var(--text-primary);
  font-weight: 700;
}

.hero-title {
  font-size: var(--fs-hero);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 700;
  max-width: 18ch;
}

.h2 {
  font-size: var(--fs-h2);
  line-height: 1.08;
  letter-spacing: -0.018em;
  font-weight: 700;
  max-width: 24ch;
}

.h3 {
  font-size: var(--fs-h3);
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-weight: 500;
  margin-bottom: var(--s-2);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-medium);
  margin-bottom: var(--s-3);
}

.lede {
  font-size: var(--fs-lede);
  line-height: 1.5;
  color: var(--text-primary);
  max-width: 56ch;
  margin-top: var(--s-3);
}

.body {
  font-size: var(--fs-body);
  color: var(--text-medium);
  max-width: 62ch;
  margin-top: var(--s-3);
}

.mono {
  font-family: var(--font-mono);
  font-feature-settings: "zero" 1, "ss01" 1;
}

.tm {
  font-size: 0.45em;
  vertical-align: super;
  font-weight: 400;
  color: var(--text-medium);
  margin-left: 0.1em;
}

/* ---------- 06. Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 11, 15, 0.85);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--text-primary);
}

.nav__brand-dim {
  color: var(--text-medium);
  font-weight: 400;
}

.nav__brand .nav__logo {
  width: 38px;
  height: 38px;
  mix-blend-mode: screen;
}

.nav__brand svg {
  width: 28px;
  height: 28px;
}

.nav__cluster {
  display: inline-flex;
  align-items: center;
  gap: var(--s-4);
}

.nav__links {
  display: none;
  gap: var(--s-4);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  letter-spacing: 0;
  text-transform: none;
}

.nav__link {
  color: var(--text-medium);
  transition: color var(--transition);
}

.nav__link:hover,
.nav__link:focus-visible {
  color: var(--text-primary);
}

.nav__lang {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding-left: var(--s-3);
  border-left: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav__lang-link {
  color: var(--text-medium);
  opacity: 0.5;
  transition: color var(--transition), opacity var(--transition);
}

.nav__lang-link.is-active {
  color: var(--text-primary);
  opacity: 1;
}

.nav__lang-link:hover,
.nav__lang-link:focus-visible {
  color: var(--text-primary);
  opacity: 1;
}

.nav__lang-sep {
  color: var(--text-medium);
  opacity: 0.3;
  user-select: none;
}

@media (min-width: 720px) {
  .nav__links { display: inline-flex; }
}

/* ---------- 07. Hero ---------- */

.hero {
  padding-block: clamp(2.5rem, 5vw, 4.5rem);
  display: flex;
  align-items: center;
  background: var(--bg-deepblack);
  border-bottom: 1px solid var(--border);
}

.hero__grid {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-6);
  align-items: center;
}

@media (min-width: 980px) {
  .hero__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--s-7);
  }
}

.hero__copy > * + * {
  margin-top: var(--s-3);
}

.hero-title {
  max-width: 24ch;
}

.hero-title__dim {
  color: var(--text-medium);
}

.hero__ctas {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  gap: var(--s-2);
  margin-top: var(--s-4);
}

/* -------- Blueprint diagram (hero visual) -------- */

.hero__visual {
  width: 100%;
  max-width: 640px;
  justify-self: end;
}

@media (max-width: 979px) {
  /* Hero blueprint is a decorative aside (aria-hidden="true"). On phones
     it pushed ahead of the text, which is the wrong reading order — text
     must be first. The full 9-layer architectural ontology lives in
     section #02 (#architecture) and remains visible on mobile. */
  .hero__visual { display: none; }
}

.blueprint {
  width: 100%;
  height: auto;
  display: block;
}

.blueprint .bp-frame-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  fill: rgba(232,236,245,0.36);
}

.blueprint .bp-spine,
.blueprint .bp-flow {
  stroke: rgba(232,236,245,0.38);
  stroke-width: 1;
  fill: none;
  stroke-dasharray: 660;
  stroke-dashoffset: 660;
  animation: bp-draw 1.4s cubic-bezier(0.65,0,0.35,1) forwards;
}

.blueprint .bp-flow {
  stroke-dasharray: 660;
  stroke-dashoffset: 660;
  animation-delay: 0.3s;
}

.blueprint .bp-rung,
.blueprint .bp-rung-long {
  stroke: rgba(232,236,245,0.32);
  stroke-width: 1;
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: bp-draw 0.4s ease-out forwards;
  animation-delay: calc(0.5s + var(--i, 0) * 90ms);
}

.blueprint .bp-rung-long { stroke-dasharray: 200; stroke-dashoffset: 200; animation-delay: 1.4s; }

.blueprint .bp-dot {
  fill: rgba(232,236,245,0.9);
  opacity: 0;
  animation: bp-fade 0.35s ease-out forwards;
  animation-delay: calc(0.4s + var(--i, 0) * 90ms);
}

.blueprint .bp-box {
  fill: rgba(232,236,245,0.01);
  stroke: rgba(232,236,245,0.28);
  stroke-width: 1;
  stroke-dasharray: 880;
  stroke-dashoffset: 880;
  animation: bp-draw 0.7s ease-out forwards;
  animation-delay: calc(0.55s + var(--i, 0) * 90ms);
}

.blueprint .bp-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  fill: rgba(232,236,245,0.55);
  opacity: 0;
  animation: bp-fade 0.35s ease-out forwards;
  animation-delay: calc(0.75s + var(--i, 0) * 90ms);
}

.blueprint .bp-algo {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: #E8ECF5;
  opacity: 0;
  animation: bp-fade 0.35s ease-out forwards;
  animation-delay: calc(0.85s + var(--i, 0) * 90ms);
}

.blueprint .bp-output-box {
  fill: rgba(232,236,245,0.02);
  stroke: rgba(232,236,245,0.5);
  stroke-width: 1;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: bp-draw 0.8s ease-out forwards;
  animation-delay: 1.5s;
}

.blueprint .bp-output-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  fill: rgba(232,236,245,0.65);
  opacity: 0;
  animation: bp-fade 0.4s ease-out forwards;
  animation-delay: 1.7s;
}

.blueprint .bp-output-hex {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: #E8ECF5;
  opacity: 0;
  animation: bp-fade 0.4s ease-out forwards;
  animation-delay: 1.85s;
}

.blueprint .bp-output-hex:last-of-type { animation-delay: 2s; }

@media (prefers-reduced-motion: no-preference) {
  .blueprint .bp-scan {
    opacity: 0;
    animation: bp-scan 5s cubic-bezier(0.45, 0, 0.55, 1) infinite;
    animation-delay: 2.5s;
  }
}

@keyframes bp-scan {
  0%   { transform: translateX(0);    opacity: 0; }
  10%  { opacity: 1; }
  85%  { opacity: 1; }
  95%  { transform: translateX(330px); opacity: 0; }
  100% { transform: translateX(330px); opacity: 0; }
}

@keyframes bp-draw {
  to { stroke-dashoffset: 0; }
}
@keyframes bp-fade {
  to { opacity: 1; }
}

/* -------- Pulse on dots (subtle, infinite) -------- */
@media (prefers-reduced-motion: no-preference) {
  .blueprint .bp-dot {
    animation:
      bp-fade 0.35s ease-out forwards calc(0.4s + var(--i, 0) * 90ms),
      bp-pulse 3s ease-in-out infinite calc(2.5s + var(--i, 0) * 180ms);
  }
}

@keyframes bp-pulse {
  0%, 100% { opacity: 1; transform: scale(1); transform-origin: center; transform-box: fill-box; }
  50% { opacity: 0.45; }
}

/* -------- Scroll reveal — richer stagger -------- */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal--stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}

.reveal--stagger.is-visible > * {
  opacity: 1;
  transform: none;
}

.reveal--stagger.is-visible > *:nth-child(1) { transition-delay: 0ms; }
.reveal--stagger.is-visible > *:nth-child(2) { transition-delay: 80ms; }
.reveal--stagger.is-visible > *:nth-child(3) { transition-delay: 160ms; }
.reveal--stagger.is-visible > *:nth-child(4) { transition-delay: 240ms; }
.reveal--stagger.is-visible > *:nth-child(5) { transition-delay: 320ms; }
.reveal--stagger.is-visible > *:nth-child(6) { transition-delay: 400ms; }

/* -------- Scroll-triggered stroke draw & fade (opt-in only) -------- */

/* Elements inside ontology diagram — use data-flow-specific selectors */
.o-anim-draw {
  stroke-dasharray: var(--l, 1200);
  stroke-dashoffset: var(--l, 1200);
  transition: stroke-dashoffset 900ms var(--ease);
  transition-delay: var(--d, 0ms);
}
.diagram.is-visible .o-anim-draw,
.diagram.is-visible.reveal.is-visible .o-anim-draw {
  stroke-dashoffset: 0;
}

.o-anim-fade {
  opacity: 0;
  transition: opacity 500ms var(--ease);
  transition-delay: var(--d, 0ms);
}
.diagram.is-visible .o-anim-fade {
  opacity: 1;
}

/* Reveal-triggered draw for PQXDH / Triple Ratchet / Call Flow */
.diagram--draw svg .h-box,
.diagram--draw svg .h-arrow,
.diagram--draw svg .h-result,
.diagram--draw svg .r-box,
.diagram--draw svg .r-arrow,
.diagram--draw svg .r-result,
.diagram--draw svg .c-box,
.diagram--draw svg .c-arrow {
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  transition: stroke-dashoffset 1300ms var(--ease);
}
.diagram--draw.is-visible svg .h-box,
.diagram--draw.is-visible svg .h-arrow,
.diagram--draw.is-visible svg .h-result,
.diagram--draw.is-visible svg .r-box,
.diagram--draw.is-visible svg .r-arrow,
.diagram--draw.is-visible svg .r-result,
.diagram--draw.is-visible svg .c-box,
.diagram--draw.is-visible svg .c-arrow {
  stroke-dashoffset: 0;
}

/* Text elements fade in after strokes draw */
.diagram--draw svg text {
  opacity: 0;
  transition: opacity 500ms var(--ease) 700ms;
}
.diagram--draw.is-visible svg text {
  opacity: 1;
}

/* Ontology: larger canvas, better background */
.diagram--ontology {
  padding: 0;
  background: var(--bg-deepblack);
  border-color: var(--border-strong);
}
.section--doc .diagram--ontology {
  background: var(--doc-bg-alt);
}
.ontology-svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Ontology hex scan — horizontal sweep across ciphertext row */
@media (prefers-reduced-motion: no-preference) {
  .ontology-svg .o-hex-scan {
    animation: o-scan 4.5s ease-in-out infinite;
    animation-delay: 2s;
  }
}

@keyframes o-scan {
  0%   { transform: translateX(0);   opacity: 0; }
  8%   { opacity: 1; }
  85%  { opacity: 1; }
  95%  { transform: translateX(520px); opacity: 0; }
  100% { transform: translateX(520px); opacity: 0; }
}

/* ---------- 08. Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 15px 26px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-transform: none;
  border: 1px solid transparent;
  border-radius: 10px;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: var(--text-primary);
  color: var(--text-inverse);
  border-color: var(--text-primary);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: transparent;
  color: var(--text-primary);
}

.btn--secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn--secondary:hover,
.btn--secondary:focus-visible {
  border-color: var(--text-primary);
}

.btn__arrow {
  display: inline-block;
  transition: transform var(--transition);
}

.btn:hover .btn__arrow {
  transform: translateY(2px);
}

/* ---------- 09. Arrow list (↳) ---------- */

.arrow-list {
  list-style: none;
  padding: 0;
  margin-block: var(--s-3);
}

.arrow-list > li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: var(--s-2);
  font-size: var(--fs-body);
  color: var(--text-primary);
  line-height: 1.5;
}

.arrow-list > li::before {
  content: "↳";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--text-medium);
  font-family: var(--font-mono);
  font-weight: 500;
}

/* ---------- 10. Grids ---------- */

.grid { display: grid; gap: var(--s-4); }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }

@media (min-width: 640px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 720px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- 11. Cards ---------- */

.card {
  padding: var(--s-4);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.card > .eyebrow {
  margin-bottom: var(--s-2);
}

.card__title {
  font-size: var(--fs-h3);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: var(--s-2);
  color: var(--text-primary);
}

.card__body {
  color: var(--text-medium);
  font-size: var(--fs-body);
}

/* ---------- 11b. Contact card ---------- */

.contact-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: var(--s-4);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  transition: border-color var(--transition), background var(--transition);
  text-decoration: none;
}

.contact-card:hover,
.contact-card:focus-visible {
  border-color: var(--text-primary);
  background: var(--bg-lift);
}

.contact-card .eyebrow {
  margin-bottom: 0;
}

.contact-card__email {
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  font-weight: 500;
  color: var(--text-primary);
  word-break: break-all;
}

.contact-card__desc {
  font-size: var(--fs-small);
  color: var(--text-medium);
  line-height: 1.5;
  flex-grow: 1;
}

.contact-card__arrow {
  font-family: var(--font-mono);
  color: var(--text-medium);
  align-self: flex-start;
  transition: transform var(--transition), color var(--transition);
}

.contact-card:hover .contact-card__arrow,
.contact-card:focus-visible .contact-card__arrow {
  color: var(--text-primary);
  transform: translateX(4px);
}

/* ---------- 11c. Trust group ---------- */

.trust-group {
  margin-bottom: var(--s-5);
}
.trust-group:last-child { margin-bottom: 0; }

.trust-group__label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-medium);
  margin-bottom: var(--s-2);
  padding-bottom: var(--s-1);
  border-bottom: 1px solid var(--border);
}

/* ---------- 11d. Card with nested arrow-list ---------- */

.card .arrow-list {
  margin-block: var(--s-2);
}
.card .arrow-list > li {
  font-size: var(--fs-small);
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.45;
}
.card .arrow-list > li:last-child {
  margin-bottom: 0;
}

/* ---------- 11e. Atom logo (shared symbol) ---------- */

.atom-logo {
  color: var(--text-primary);
  fill: currentColor;
  display: block;
  object-fit: contain;
}

img.atom-logo {
  /* Render the emerald/blue brand PNG as monochrome arctic-white on obsidian. */
  filter: grayscale(1) brightness(0) invert(0.92) contrast(1.05);
  transition: filter var(--transition);
}

img.atom-logo--hero {
  width: clamp(220px, 32vw, 360px);
  height: auto;
  aspect-ratio: 1;
  filter: grayscale(1) brightness(0) invert(0.92) contrast(1.05) drop-shadow(0 0 60px rgba(232, 236, 245, 0.04));
}

.section--doc img.atom-logo {
  filter: grayscale(1) brightness(0) contrast(1);
}

/* ---------- 11f. Section number (Palantir-style 01 / 02 / 03) ---------- */

.section__number {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: var(--s-3);
  display: inline-block;
  padding-right: var(--s-2);
  border-right: 1px solid var(--border);
  padding-left: 0;
}

.section__number + .eyebrow {
  padding-left: var(--s-2);
  margin-left: -0.5rem;
}

.section-header--split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
  margin-bottom: var(--s-6);
}

@media (min-width: 840px) {
  .section-header--split {
    grid-template-columns: 1fr 1.4fr;
    gap: var(--s-7);
    align-items: start;
  }
}

.section-header--split .section__number-block,
.sovereign__copy .section__number-block,
.feature__copy .section__number-block {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-medium);
}

.section-header--split .section__number-block .num,
.sovereign__copy .section__number-block .num,
.feature__copy .section__number-block .num {
  display: block;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: var(--s-1);
  font-family: var(--font-body);
}

/* ---------- 11g. Hero stats strip ---------- */

.stats {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-deepblack);
}

.stats__grid {
  max-width: var(--container);
  margin-inline: auto;
  padding: var(--s-5) var(--gutter);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

@media (min-width: 720px) {
  .stats__grid { grid-template-columns: repeat(4, 1fr); }
}

/* 6-cell numbers variant — Palantir-style prominent figures */
.stats__grid--6 {
  grid-template-columns: 1fr 1fr;
  padding-block: var(--s-6);
}

@media (min-width: 640px) {
  .stats__grid--6 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1000px) {
  .stats__grid--6 { grid-template-columns: repeat(6, 1fr); }
}

.stats--numbers .stats__cell {
  padding: var(--s-4) var(--s-3);
}

.stats--numbers .stats__value {
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.025em;
  margin-bottom: var(--s-2);
}

.stats--numbers .stats__label {
  font-size: var(--fs-mono);
  letter-spacing: 0.14em;
  line-height: 1.5;
}

/* Reset bottom/right borders for 6-cell grid across breakpoints */
.stats__grid--6 > .stats__cell {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* 2-col: reset right on even, bottom on last 2 */
@media (max-width: 639.98px) {
  .stats__grid--6 > .stats__cell:nth-child(2n) { border-right: 0; }
  .stats__grid--6 > .stats__cell:nth-last-child(-n+2) { border-bottom: 0; }
}

/* 3-col */
@media (min-width: 640px) and (max-width: 999.98px) {
  .stats__grid--6 > .stats__cell { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .stats__grid--6 > .stats__cell:nth-child(3n) { border-right: 0; }
  .stats__grid--6 > .stats__cell:nth-last-child(-n+3) { border-bottom: 0; }
}

/* 6-col */
@media (min-width: 1000px) {
  .stats__grid--6 > .stats__cell { border-bottom: 0; border-right: 1px solid var(--border); }
  .stats__grid--6 > .stats__cell:last-child { border-right: 0; }
}

.stats__cell {
  padding: var(--s-3) var(--s-3);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats__cell:nth-child(2n) { border-right: 0; }
.stats__cell:nth-last-child(-n+2) { border-bottom: 0; }

@media (min-width: 720px) {
  .stats__cell { border-bottom: 0; border-right: 1px solid var(--border); }
  .stats__cell:last-child { border-right: 0; }
}

.stats__value {
  display: block;
  font-family: var(--font-body);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: var(--s-1);
}

.stats__label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-medium);
}

/* ---------- 11h. Enhanced card hover (Palantir restraint) ---------- */

.card {
  position: relative;
  transition: border-color 200ms var(--ease),
              background 200ms var(--ease),
              transform 200ms var(--ease);
}

.card::after {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 28px; height: 1px;
  background: var(--text-primary);
  opacity: 0;
  transition: opacity 200ms var(--ease), width 200ms var(--ease);
}

.card:hover {
  border-color: var(--text-primary);
  background: var(--bg-lift);
  transform: translateY(-2px);
}

.card:hover::after {
  opacity: 1;
  width: 44px;
}

@media (prefers-reduced-motion: reduce) {
  .card:hover { transform: none; }
}

/* ---------- 11i. Section dividers with mono tag ---------- */

.section::before {
  content: "";
  display: block;
}

.tagline {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-medium);
  margin-bottom: var(--s-5);
}

.tagline__rule {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ---------- 11j. Key-value list (architecture spec style) ---------- */

.kv {
  margin-top: var(--s-4);
  border-top: 1px solid var(--border);
}

.kv__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-1);
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 640px) {
  .kv__row { grid-template-columns: 220px 1fr; gap: var(--s-3); }
}

.kv__key {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-medium);
}

.kv__value {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--text-primary);
  line-height: 1.6;
}

/* ---------- 11k. Citation row (footer of matrix) ---------- */

.cite-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
  margin-top: var(--s-4);
  padding-top: var(--s-3);
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.08em;
  color: var(--text-light);
}

/* ---------- 12. Pull quote ---------- */

.pull-quote {
  border-left: 2px solid var(--text-primary);
  padding: var(--s-3) var(--s-4);
  margin-block: var(--s-5);
  background: var(--bg-lift);
  font-size: var(--fs-lede);
  line-height: 1.45;
  color: var(--text-primary);
  font-style: normal;
  max-width: 64ch;
}

.pull-quote cite {
  display: block;
  margin-top: var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-medium);
  font-style: normal;
}

/* ---------- 13. Code chip ---------- */

code,
.code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  padding: 0.15em 0.45em;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.section--doc code,
.section--doc .code {
  background: var(--doc-bg-alt);
  border-color: var(--doc-border);
  color: var(--doc-text);
}

/* ---------- 14. Diagram container ---------- */

.diagram {
  margin-block: var(--s-5);
  padding: var(--s-4);
  border: 1px solid var(--border);
  background: var(--bg-deepblack);
}

.section--doc .diagram {
  background: var(--doc-bg-alt);
  border-color: var(--doc-border);
}

.diagram svg { width: 100%; height: auto; }

.diagram__caption {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-top: var(--s-2);
}

/* ---------- 15. Compare matrix ---------- */

.matrix-wrap {
  margin-top: var(--s-5);
  border: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.matrix {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  font-size: var(--fs-small);
  color: var(--text-primary);
  table-layout: auto;
}

.matrix th,
.matrix td {
  padding: 0.875rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  vertical-align: middle;
  white-space: nowrap;
}

/* Allow soft wrap only on the messenger-name column (first th) — long names like "Threema Ibex" can wrap there if narrow */
.matrix tbody th {
  white-space: normal;
}

.matrix th:last-child,
.matrix td:last-child { border-right: 0; }
.matrix tr:last-child td { border-bottom: 0; }

.matrix thead th {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-medium);
  background: var(--bg-lift);
  position: sticky;
  top: 0;
  z-index: 1;
}

.matrix tbody th {
  font-weight: 500;
  color: var(--text-primary);
}

.matrix tr.is-qlavis td,
.matrix tr.is-qlavis th {
  background: rgba(232, 236, 245, 0.05);
}

.section--doc .matrix tr.is-qlavis td,
.section--doc .matrix tr.is-qlavis th {
  background: var(--doc-bg-alt);
}

.matrix .yes,
.matrix .no,
.matrix .part { font-family: var(--font-mono); color: var(--text-primary); }
.matrix .no   { color: var(--text-light); }
.matrix .part { color: var(--text-medium); }

/* ---------- 16. Two-column facts (sees / never sees) ---------- */

.facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: var(--s-5);
  border: 1px solid var(--border);
}

@media (min-width: 720px) {
  .facts { grid-template-columns: 1fr 1fr; }
}

.facts__col {
  padding: var(--s-4);
}

.facts__col + .facts__col {
  border-top: 1px solid var(--border);
}

@media (min-width: 720px) {
  .facts__col + .facts__col {
    border-top: 0;
    border-left: 1px solid var(--border);
  }
}

.facts__label {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-medium);
  margin-bottom: var(--s-3);
}

.facts__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.facts__list li {
  padding: 0.5rem 0;
  color: var(--text-primary);
  font-size: var(--fs-body);
  line-height: 1.5;
  border-bottom: 1px solid var(--border);
}

.facts__list li:last-child { border-bottom: 0; }

/* ---------- 17. Waitlist form ---------- */

.waitlist {
  max-width: 560px;
  margin-top: var(--s-5);
}

.waitlist__row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 560px) {
  .waitlist__row {
    flex-direction: row;
    align-items: stretch;
  }
}

.waitlist__input {
  flex: 1;
  padding: 16px 20px;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  font-size: var(--fs-body);
  transition: border-color var(--transition);
  outline: none;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}

.waitlist__input:focus-visible {
  border-color: var(--text-primary);
}

.waitlist__input::placeholder {
  color: var(--text-light);
}

.waitlist__btn {
  flex-shrink: 0;
  justify-content: center;
}

.waitlist__btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.waitlist__status {
  margin-top: var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  letter-spacing: 0.04em;
  min-height: 1.25rem;
  color: var(--text-medium);
  opacity: 0;
  transition: opacity 200ms var(--ease);
}

.waitlist__status.is-visible { opacity: 1; }

/* ---------- 18. Footer ---------- */

.footer {
  padding-block: var(--s-5);
  background: var(--bg-deepblack);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-light);
}

.footer__inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-top: var(--s-4);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

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

.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-medium);
}

.footer__brand img,
.footer__brand svg {
  width: 22px;
  height: 22px;
  opacity: 0.72;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
}

.footer__link {
  color: var(--text-light);
  transition: color var(--transition);
}

.footer__link:hover,
.footer__link:focus-visible {
  color: var(--text-primary);
}

/* ---------- Closing — centered "Coming soon" with the neon mark ---------- */
.closing__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.closing__logo-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: var(--s-4);
  isolation: isolate;
}

.closing__logo-wrap::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 58%;
  transform: translate(-50%, -50%);
  width: 170%;
  height: 170%;
  background: radial-gradient(closest-side, rgba(232, 236, 245, 0.32), rgba(232, 236, 245, 0.08) 46%, transparent 72%);
  filter: blur(28px);
  z-index: -1;
  pointer-events: none;
}

.closing__logo {
  width: clamp(150px, 16vw, 210px);
  height: auto;
  mix-blend-mode: screen;
  display: block;
}

.closing__title {
  max-width: none;
}

.closing__cta {
  margin-top: var(--s-4);
}

.closing__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-1);
  margin-top: var(--s-4);
  color: var(--text-medium);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  letter-spacing: 0;
  text-transform: none;
}

.closing__links a { text-transform: none; font-family: var(--font-body); }

/* ---------- 19. Scroll reveal (subtle) ---------- */

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 500ms var(--ease), transform 500ms var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 20. Utility ---------- */

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

.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--text-primary);
  color: var(--text-inverse);
  padding: 0.75rem 1.25rem;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  z-index: 100;
  transition: top var(--transition);
}

.skip-link:focus-visible {
  top: 0;
}

/* ---------- 21. Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 22-0. Funding gates + also-strip ---------- */

.gates {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
  margin-top: var(--s-5);
  border-top: 1px solid var(--border);
  padding-top: var(--s-4);
}

@media (min-width: 840px) {
  .gates { grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
}

.gate__label {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: var(--s-2);
  padding-bottom: var(--s-1);
  border-bottom: 1px solid var(--border-strong);
}

.gate .arrow-list {
  margin-block: 0;
}

.gate .arrow-list > li {
  font-size: var(--fs-small);
  padding-left: 1.5rem;
  margin-bottom: 0.625rem;
  line-height: 1.5;
}

/* "Also in the stack" mono paragraph — under differentiator cards */
.also {
  margin-top: var(--s-5);
  padding-top: var(--s-3);
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--text-medium);
  line-height: 1.75;
  letter-spacing: 0.02em;
}

.also strong {
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: var(--fs-mono);
  margin-right: 0.5rem;
}

/* ---------- 22a. Structural firsts wall (legacy — unused, kept for safety) ---------- */

.firsts {
  display: grid;
  gap: var(--s-5);
  margin-top: var(--s-4);
}

.firsts__group {
  border-top: 1px solid var(--border-strong);
  padding-top: var(--s-3);
}

.firsts__label {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: var(--s-3);
}

.firsts__list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 1000px) {
  .firsts__list {
    grid-template-columns: repeat(2, 1fr);
    column-gap: var(--s-5);
  }
}

.firsts__list > li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: var(--s-2);
  padding: var(--s-3) 0;
  border-top: 1px solid var(--border);
  align-items: start;
}

.firsts__list > li:first-child,
.firsts__list > li:nth-child(2):not(:only-child) {
  /* Keep borders consistent across two-col layout */
  border-top-color: var(--border);
}

.firsts__n {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--text-light);
  letter-spacing: 0.1em;
  padding-top: 2px;
}

.firsts__claim {
  display: block;
  font-size: var(--fs-body);
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.35;
  letter-spacing: -0.005em;
  margin-bottom: 0.5rem;
}

.firsts__proof {
  display: block;
  font-size: var(--fs-small);
  color: var(--text-medium);
  line-height: 1.55;
}

.firsts__proof code {
  font-size: 0.82em;
  padding: 0.1em 0.35em;
}

/* ---------- 22b. Personas (Built for) ---------- */

.personas {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: var(--s-4);
  border-top: 1px solid var(--border);
}

@media (min-width: 720px) {
  .personas { grid-template-columns: repeat(2, 1fr); }
}

.persona {
  padding: var(--s-4);
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  transition: background var(--transition);
}

.persona:hover { background: var(--bg-lift); }

.persona:last-child { border-right: 0; }

@media (min-width: 720px) {
  .persona { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .persona:nth-child(2n) { border-right: 0; }
  .persona:nth-last-child(-n+2) { border-bottom: 0; }
}

.persona__label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-medium);
  margin-bottom: var(--s-2);
}

.persona__title {
  font-size: var(--fs-h3);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: var(--s-2);
}

.persona__body {
  font-size: var(--fs-small);
  line-height: 1.55;
  color: var(--text-medium);
}

.personas-also {
  margin-top: var(--s-5);
  padding-top: var(--s-3);
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--text-medium);
  line-height: 1.7;
  letter-spacing: 0.02em;
}

.personas-also strong {
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: var(--fs-mono);
  margin-right: 0.5rem;
}

/* ---------- 22c-bis. Team (three co-founders) ---------- */

.team {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: var(--s-4);
  border-top: 1px solid var(--border);
}

@media (min-width: 1000px) {
  .team { grid-template-columns: repeat(3, 1fr); }
}

.team-card {
  padding: var(--s-4);
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  transition: background var(--transition);
}

.team-card:hover { background: var(--bg-lift); }

.team-card:last-child { border-right: 0; border-bottom: 0; }

@media (min-width: 1000px) {
  .team-card:nth-child(3n) { border-right: 0; }
  .team-card:nth-last-child(-n+3) { border-bottom: 0; }
}

.team-card__monogram {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #FFFFFF;
  background: #0A0B0F;
  width: 4rem;
  height: 4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--s-2);
  flex-shrink: 0;
}

.team-card__name {
  font-size: var(--fs-h3);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.team-card__role {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-medium);
}

.team-card__location {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
}

.team-card__bio {
  font-size: var(--fs-small);
  line-height: 1.55;
  color: var(--text-medium);
  flex-grow: 1;
  margin: 0;
}

.team-card__linkedin {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-top: var(--s-2);
}

.team-card__tbd {
  color: var(--text-light);
  opacity: 0.7;
}

/* ---------- 22d-1. Stack table (cryptographic primitives grid) ---------- */

.stack__heading {
  font-family: var(--font-body);
  font-size: var(--fs-h3);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-top: var(--s-5);
  margin-bottom: var(--s-2);
}

.stack {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

@media (min-width: 720px) {
  .stack { grid-template-columns: repeat(2, 1fr); }
}

.stack__row {
  padding: var(--s-3);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}

.stack__label {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light);
}

.stack__value {
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0;
  line-height: 1.4;
}

.stack__note {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  line-height: 1.55;
  color: var(--text-light);
  letter-spacing: 0.02em;
}

/* ---------- 22d-2. Perf cells (4-up performance metrics) ---------- */

.perf {
  margin-top: var(--s-4);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

@media (min-width: 720px) {
  .perf { grid-template-columns: repeat(4, 1fr); }
}

.perf__cell {
  padding: var(--s-3);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}

.perf__label {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light);
}

.perf__value {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.perf__desc {
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--text-medium);
}

/* ---------- 22d-3. Positions (Position section — manifesto-class) ---------- */

.positions {
  display: flex;
  flex-direction: column;
  margin-top: var(--s-4);
}

.position {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--s-4);
  padding: var(--s-4) 0;
  border-top: 1px solid var(--border);
  align-items: start;
}

.position:last-child {
  border-bottom: 1px solid var(--border);
}

@media (max-width: 720px) {
  .position {
    grid-template-columns: 1fr;
    gap: var(--s-1);
  }
}

.position__num {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-light);
  padding-top: 0.4rem;
}

.position__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--fs-h3);
  line-height: 1.15;
  letter-spacing: -0.012em;
  color: var(--text-primary);
  margin-bottom: var(--s-2);
}

.position__body {
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text-medium);
  max-width: 62ch;
}

/* ---------- 22d-4. Footnote (small caveat block) ---------- */

.footnote {
  margin-top: var(--s-4);
  padding-left: var(--s-3);
  border-left: 1px solid var(--border);
  font-size: var(--fs-small);
  line-height: 1.6;
  color: var(--text-medium);
  max-width: 62ch;
}

/* ---------- 22d-5. Gate "shipping now" highlight modifier ---------- */

.gate--now {
  border-top: 2px solid var(--text-primary) !important;
}

.gate--now .gate__label {
  color: var(--text-primary);
}

/* ---------- 22e. Hero regulatory clock ---------- */

.hero__clock {
  margin-top: var(--s-4);
  margin-bottom: var(--s-4);
  padding: var(--s-3) 0;
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.04em;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-2);
}

.hero__clock-row {
  display: grid;
  grid-template-columns: 12ch 1fr;
  gap: var(--s-2);
  align-items: baseline;
  margin: 0;
}

.hero__clock-event {
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--text-primary);
  margin: 0;
}

.hero__clock-date {
  color: var(--text-medium);
  letter-spacing: 0.02em;
  margin: 0;
}

@media (max-width: 480px) {
  .hero__clock-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* ---------- 22e. Founder manifesto block ---------- */

.manifesto {
  margin-top: var(--s-4);
  max-width: 720px;
  border-left: 2px solid var(--border-strong);
  padding-left: var(--s-4);
}

.manifesto__p {
  font-size: var(--fs-lede);
  line-height: 1.55;
  color: var(--text-primary);
  margin-bottom: var(--s-4);
}

.manifesto__p:last-of-type {
  margin-bottom: var(--s-3);
}

.manifesto__signature {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-medium);
  margin: 0;
  padding-top: var(--s-3);
  border-top: 1px solid var(--border);
}

/* ---------- 22c. Founder section block (legacy stats + gates) ---------- */

.founder > * + * { margin-top: var(--s-4); }

.founder__stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

@media (min-width: 720px) {
  .founder__stats { grid-template-columns: repeat(3, 1fr); }
}

.founder__stat {
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--border);
}

.founder__stat:last-child { border-bottom: 0; }

@media (min-width: 720px) {
  .founder__stat {
    padding: var(--s-3);
    border-bottom: 0;
    border-right: 1px solid var(--border);
  }
  .founder__stat:first-child { padding-left: 0; }
  .founder__stat:last-child { padding-right: 0; border-right: 0; }
}

.founder__stat-label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-medium);
  margin-bottom: var(--s-1);
}

.founder__stat-value {
  display: block;
  font-family: var(--font-body);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
}

.founder__stat-meta {
  display: block;
  font-size: var(--fs-small);
  color: var(--text-medium);
  line-height: 1.5;
}

/* ---------- 22d. Inline link (for cross-refs within body text) ---------- */

.inline-link {
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-strong);
  transition: border-color var(--transition);
}

.inline-link:hover,
.inline-link:focus-visible {
  border-color: var(--text-primary);
}

/* ---------- 22c-bis. Ledger rows (capabilities + threat model) ---------- */
/* Replaces .card pattern in capabilities + threats sections.
   Institutional / spec-sheet register: hairline rows, mono labels,
   tech-tag right-aligned. No card chrome, no shadows, no rounded corners. */

.ledger {
  margin-top: var(--s-5);
  border-top: 1px solid var(--border-strong);
}

.ledger__row {
  display: block;
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--border);
  transition: background 200ms var(--ease);
}

.ledger__row:hover {
  background: rgba(255, 255, 255, 0.015);
}

.section--doc .ledger {
  border-top-color: var(--doc-border-strong);
}
.section--doc .ledger__row {
  border-bottom-color: var(--doc-border);
}
.section--doc .ledger__row:hover {
  background: rgba(0, 0, 0, 0.02);
}

@media (min-width: 720px) {
  .ledger__row {
    padding: var(--s-5) 0;
  }
}

.ledger__main {
  display: block;
}

.ledger__head {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  margin-bottom: var(--s-2);
}

@media (min-width: 640px) {
  .ledger__head {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--s-3);
  }
}

.ledger__cat {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-medium);
}

.ledger__tag {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-light);
}

@media (min-width: 640px) {
  .ledger__tag {
    text-align: right;
  }
}

.ledger__title {
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: var(--s-2);
  max-width: 44ch;
}

.ledger__body {
  font-size: var(--fs-small);
  line-height: 1.6;
  color: var(--text-medium);
  max-width: 64ch;
}

/* ---------- 22d-bis. Source citations (comparison table footer) ---------- */

.sources a {
  color: var(--text-medium);
  border-bottom: 1px solid var(--border-strong);
  transition: color var(--transition), border-color var(--transition);
}

.sources a:hover,
.sources a:focus-visible {
  color: var(--text-primary);
  border-color: var(--text-primary);
}

/* ---------- 22e. Contacts grid — five inboxes ---------- */

.contacts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
  margin-top: var(--s-4);
}

@media (min-width: 640px) {
  .contacts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .contacts-grid { grid-template-columns: repeat(3, 1fr); gap: var(--s-3); }
}

@media (min-width: 1200px) {
  .contacts-grid { grid-template-columns: repeat(5, 1fr); gap: var(--s-2); }
}

.contacts-grid .contact-card {
  padding: var(--s-3);
  gap: var(--s-1);
}

.contacts-grid .contact-card__email {
  font-size: var(--fs-small);
  overflow-wrap: anywhere;
}

.contacts-grid .contact-card__desc {
  font-size: var(--fs-small);
  line-height: 1.45;
  flex-grow: 1;
}

/* ---------- 22f. Layout polish — section header + grids responsive ---------- */

/* Section header --split — collapse to single column earlier so num-block
   does not crowd the H2 on tablet widths. */
@media (max-width: 880px) {
  .section-header--split {
    grid-template-columns: 1fr;
    gap: var(--s-3);
  }
}

/* Hero clock — tighter on narrow viewports */
@media (max-width: 720px) {
  .hero__clock { padding-block: var(--s-2); }
}

/* Compare matrix — ensure proper horizontal scroll on narrow screens
   without breaking the table layout. */
.matrix-wrap {
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 720px) {
  .matrix { min-width: 720px; }
}

/* Stack heading — visual hierarchy between architecture diagram and
   primitives table. */
.stack__heading {
  border-top: 1px solid var(--border);
  padding-top: var(--s-4);
}

/* Persona body — improve readability max-width on 2-col grid. */
.persona__body {
  max-width: 52ch;
}

/* Gate column visual rhythm — equal height arrow-list items. */
.gate .arrow-list li {
  border-bottom: 1px solid var(--border);
}
.gate .arrow-list li:last-child {
  border-bottom: 0;
}

/* Section padding tighten on small viewports to avoid wasted vertical. */
@media (max-width: 720px) {
  .section { padding-block: clamp(3rem, 8vw, 5rem); }
  .stack__row, .perf__cell, .stack { padding-inline: var(--s-2); }
}

/* ---------- 22. Focus ---------- */

*:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* ---------- 23. Print ---------- */

@media print {
  .nav, .footer, .waitlist, .btn { display: none; }
  .section { page-break-inside: avoid; }
  body { background: #fff; color: #000; }
}

/* ==========================================================================
   24. Minimal homepage — additive components
   Hero lattice, centered sections, statement, proof, built-for tags,
   stack teaser, contact line. No rule above this point is modified, so
   architecture.html keeps rendering exactly as before.
   ========================================================================== */

/* ---------- 24a. Hero — quiet secondary link ---------- */

.hero__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 14px 4px;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-medium);
  transition: color var(--transition);
}

.hero__link:hover,
.hero__link:focus-visible { color: var(--text-primary); }

.hero__link span { transition: transform var(--transition); }
.hero__link:hover span { transform: translateX(3px); }

/* ---------- 24b. Hero lattice — 3-D crystal, rendered on <canvas> ---------- */

.hero__lattice {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 280px;
}

/* Crystal recedes to an ambient glow behind the product shot. */
.lattice-canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, 92%);
  aspect-ratio: 1 / 1;
  opacity: 0.45;
  z-index: 0;
  pointer-events: none;
}

.hero__phone {
  position: relative;
  z-index: 1;
  display: block;
  width: auto;
  height: clamp(440px, 58vh, 640px);
  max-width: 100%;
  filter: drop-shadow(0 26px 70px rgba(0, 0, 0, 0.6));
}

/* ---------- Sovereign — phones (wallet | words) LEFT, text RIGHT ---------- */
.sovereign {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
  align-items: center;
}

@media (min-width: 920px) {
  .sovereign { grid-template-columns: 1fr 1fr; gap: var(--s-7); }
}

.sovereign__copy > * + * { margin-top: var(--s-3); }

/* ---------- Device screenshots ---------- */
.device {
  display: block;
  width: auto;
  filter: drop-shadow(0 28px 72px rgba(0, 0, 0, 0.6));
}

/* Two-phone row — side by side, no overlap (hero + sovereign) */
.hero__shots,
.sovereign__shots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  width: 100%;
}

.hero__shots .device      { height: clamp(400px, 60vh, 620px); max-width: 47%; }
.sovereign__shots .device { height: clamp(390px, 58vh, 600px); max-width: 47%; }

.hero__shots .device:last-child,
.sovereign__shots .device:last-child { transform: translateY(6%); }

/* Hero — tilted, overlapping phone pair with an ambient glow (desktop) */
@media (min-width: 721px) {
  .hero__shots {
    position: relative;
    isolation: isolate;
    gap: 0;
  }
  .hero__shots::before {
    content: "";
    position: absolute;
    inset: -10% -6%;
    z-index: -1;
    background: radial-gradient(52% 52% at 50% 46%, rgba(232, 236, 245, 0.10), transparent 72%);
    pointer-events: none;
  }
  .hero__shots .device {
    max-width: 52%;
    filter: drop-shadow(0 34px 80px rgba(0, 0, 0, 0.75));
  }
  .hero__shots .device:first-child {
    transform: rotate(-12deg) translateX(13%);
    z-index: 1;
  }
  .hero__shots .device:last-child {
    transform: rotate(12deg) translate(-13%, 4%);
    z-index: 2;
  }
}

@media (max-width: 720px) {
  .hero__shots,
  .sovereign__shots { flex-direction: column; gap: var(--s-4); }
  .hero__shots .device,
  .sovereign__shots .device { max-width: 84%; height: auto; }
  .hero__shots .device:last-child,
  .sovereign__shots .device:last-child { transform: none; }
  .sovereign__copy { order: -1; }
}

/* ---------- Feature (single phone + text) ---------- */
.feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
  align-items: center;
}

@media (min-width: 920px) {
  .feature { grid-template-columns: 1fr 1fr; gap: var(--s-7); }
}

.feature__copy > * + * { margin-top: var(--s-3); }

.feature__shot { display: flex; align-items: center; justify-content: center; }
.feature__shot .device { height: clamp(440px, 64vh, 700px); width: auto; }

@media (max-width: 720px) {
  .feature__shot .device { height: auto; max-width: 78%; }
}

/* phones sit beside the text inside the .sovereign / .feature grids */

/* ---------- 24c. Numbered-block content spacing ---------- */

.section-header--split .btn,
.section-header--split .contact-line {
  margin-top: var(--s-4);
}

/* ---------- 24d. Compact inner-page header (architecture.html) ---------- */

/* Inner-page header (architecture) — a compact page header, not a landing
   hero: tighter band, smaller title, no visual. */
.hero--compact {
  min-height: 0;
  padding-block: clamp(2.25rem, 4vw, 3.5rem);
}

.hero--compact .hero__grid {
  grid-template-columns: 1fr;
}

.hero--compact .hero__visual {
  display: none;
}

.hero--compact .hero-title {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  max-width: 22ch;
}

/* ---------- 24e. Proof points (3-up) ---------- */

.proof {
  display: grid;
  grid-template-columns: 1fr;
}

.proof__item {
  padding: var(--s-4) 0;
  border-top: 1px solid var(--border);
}

.proof__item:last-child { border-bottom: 1px solid var(--border); }

@media (min-width: 760px) {
  .proof { grid-template-columns: repeat(3, 1fr); }
  .proof__item {
    padding: var(--s-3) var(--s-4);
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }
  .proof__item:first-child { padding-left: 0; }
  .proof__item:last-child { border-right: 0; padding-right: 0; }
}

.proof__title {
  font-size: var(--fs-h3);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: var(--s-2);
}

.proof__text {
  font-size: var(--fs-small);
  line-height: 1.6;
  color: var(--text-medium);
}

/* ---------- 24f. Built for — sector tags ---------- */

.builtfor__tags {
  margin-top: var(--s-4);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 2;
  color: var(--text-medium);
  max-width: 62ch;
}

/* ---------- 24g. Contact line (placeholder) ---------- */

.contact-line {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  letter-spacing: 0.02em;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 0.3rem;
  transition: border-color var(--transition);
}

.contact-line:hover,
.contact-line:focus-visible { border-color: var(--text-primary); }

/* ==========================================================================
   25. Bento grid — shared component for homepage + architecture
   Modular card tiles, hairline-separated. One system across both pages.
   ========================================================================== */

.bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  margin-top: var(--s-5);
  background: var(--border);
  border: 1px solid var(--border);
}

@media (min-width: 560px) {
  .bento--cols3 { grid-template-columns: repeat(2, 1fr); }
  .bento--cols4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .bento--cols3 { grid-template-columns: repeat(3, 1fr); }
  .bento--cols4 { grid-template-columns: repeat(4, 1fr); }
}

.bento__cell {
  background: var(--bg-obsidian);
  padding: var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  min-height: 196px;
  position: relative;
  transition: background var(--transition);
}

.bento__cell:hover { background: var(--bg-lift); }

/* Accent corner-line on hover — Palantir restraint */
.bento__cell::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 1px;
  background: var(--text-primary);
  transition: width var(--transition);
}
.bento__cell:hover::after { width: 32px; }

.bento__cell--mark {
  background: var(--bg-lift);
}
.bento__cell--mark::after { width: 32px; }

.bento__cell--cta { justify-content: space-between; }

.cell__kicker {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-medium);
}

.cell__title {
  font-size: var(--fs-h3);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.cell__title.mono {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0;
}

.cell__text {
  font-size: var(--fs-small);
  line-height: 1.6;
  color: var(--text-medium);
}

/* Comparison rows inside a bento cell */
.cell__rows {
  list-style: none;
  margin: var(--s-1) 0 0;
  padding: 0;
}

.cell__rows li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-3);
  padding: 0.6rem 0;
  border-top: 1px solid var(--border);
  font-size: var(--fs-small);
  color: var(--text-medium);
}

.cell__rows li:first-child { border-top: 0; }

.mk {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.mk--yes  { color: var(--text-primary); }
.mk--part { color: var(--text-medium); }
.mk--no   { color: var(--text-light); }

.bento__cell--cta .btn { margin-top: var(--s-3); }

/* ---------- 25b. Comparison matrix — fits, no horizontal scroll ---------- */

.matrix.matrix--compact {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
}

.matrix--compact th,
.matrix--compact td {
  white-space: normal;
  overflow-wrap: anywhere;
}

.matrix--compact tbody th { width: 26%; }

.matrix--compact tbody td {
  text-align: center;
  font-size: var(--fs-body);
}

/* Column headers sit centred above their glyph data; the first
   header (messenger name) stays left, above the left-aligned row names. */
.matrix--compact thead th { text-align: center; }
.matrix--compact thead th:first-child { text-align: left; }

@media (max-width: 600px) {
  /* Messenger names get a wide column; the five glyph columns stay tight.
     Words then wrap at spaces instead of breaking mid-word. */
  .matrix--compact thead th:first-child { width: 26%; }
  .matrix--compact thead th + th { width: 14.8%; }

  .matrix--compact th,
  .matrix--compact td { padding: 0.5rem 0.2rem; }

  .matrix--compact tbody th {
    overflow-wrap: break-word;
    word-break: normal;
  }

  .matrix--compact thead th {
    overflow-wrap: break-word;
    word-break: normal;
    line-height: 1.3;
  }
  .matrix--compact thead th:first-child {
    font-size: var(--fs-micro);
    letter-spacing: 0.02em;
  }
  .matrix--compact thead th + th {
    font-size: 0.4375rem;
    letter-spacing: 0;
  }
}

.matrix-legend {
  margin-top: var(--s-3);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.04em;
  color: var(--text-light);
}

/* ---------- 25c. Button after a ledger / stack list ---------- */

.ledger + .btn,
.stack + .btn {
  margin-top: var(--s-5);
}

/* Lead row of the stack grid — spans the full width */
.stack__row--lead {
  grid-column: 1 / -1;
}

/* ---------- 25d. Standalone section button — wrap on phones ---------- */

/* "See all nine layers in the architecture" is a long label; on phones it
   must wrap inside the viewport rather than force horizontal page scroll. */
@media (max-width: 600px) {
  .ledger + .btn,
  .stack + .btn,
  .standards + .btn {
    white-space: normal;
    max-width: 100%;
    padding-inline: 18px;
  }
}

/* ---------- 26. Threat timeline — homepage §01 ---------- */

.timeline {
  margin-top: var(--s-6);
}

.timeline__track {
  --tl-year-h: 1.75rem;
  --tl-dot-h: 1.5rem;
  --tl-dot-y: calc(var(--tl-year-h) + var(--tl-dot-h) / 2);
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

/* The axis — a hairline through the centre of the dot row */
.timeline__track::before {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: var(--tl-dot-y);
  height: 1px;
  background: var(--border-strong);
  transform: translateY(-50%);
}

.tl-node {
  display: grid;
  grid-template-areas: "year" "dot" "text";
  grid-template-rows: var(--tl-year-h) var(--tl-dot-h) 1fr;
  justify-items: center;
  text-align: center;
  padding-inline: var(--s-2);
}

.tl-node__year {
  grid-area: year;
  align-self: center;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-medium);
}

.tl-node__dot {
  grid-area: dot;
  align-self: center;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg-obsidian);
  border: 1px solid var(--border-strong);
  position: relative;
  z-index: 1;
}

.tl-node__text {
  grid-area: text;
  margin-top: var(--s-2);
  max-width: 21ch;
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--text-medium);
}

/* Qlavis — the node that is "now", and already protected */
.tl-node--qlavis .tl-node__year,
.tl-node--qlavis .tl-node__text { color: var(--text-primary); }

.tl-node--qlavis .tl-node__dot {
  background: var(--text-primary);
  border-color: var(--text-primary);
  box-shadow: 0 0 0 5px rgba(232, 236, 245, 0.09);
}

/* Q-Day — the open question */
.tl-node--qday .tl-node__dot { border-style: dashed; }

.timeline__note {
  display: flex;
  gap: var(--s-2);
  margin-top: var(--s-6);
  max-width: 68ch;
  font-size: var(--fs-small);
  line-height: 1.65;
  color: var(--text-medium);
}

.timeline__note-mark {
  flex-shrink: 0;
  color: var(--text-light);
}

/* Mobile — flip the timeline to a vertical axis */
@media (max-width: 720px) {
  .timeline__track {
    grid-template-columns: 1fr;
    row-gap: var(--s-4);
  }
  .timeline__track::before {
    left: 6px;
    right: auto;
    top: 6px;
    bottom: 6px;
    width: 1px;
    height: auto;
    transform: none;
  }
  .tl-node {
    grid-template-areas:
      "dot year"
      ".   text";
    grid-template-columns: 13px 1fr;
    grid-template-rows: auto auto;
    column-gap: var(--s-3);
    justify-items: start;
    text-align: left;
    padding-inline: 0;
  }
  .tl-node__dot { justify-self: center; }
  .tl-node__text { margin-top: var(--s-1); max-width: none; }
}

/* ---------- 27. Standards grid — homepage §03 ---------- */

.standards {
  list-style: none;
  margin-top: var(--s-5);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
}

.standard {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  padding: var(--s-4);
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.standard:last-child { border-right: 0; }

.standard__name {
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  letter-spacing: -0.01em;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.standard__role {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-light);
}

.standards + .btn {
  margin-top: var(--s-5);
}

@media (max-width: 720px) {
  .standards { grid-template-columns: 1fr; }
  .standard { border-right: 0; }
  .standard:last-child { border-bottom: 0; }
}

/* ---------- 28. Statement band — homepage, under the hero ---------- */

.lede-band {
  max-width: var(--container);
  margin-inline: auto;
  padding: var(--s-6) var(--gutter);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}

@media (min-width: 760px) {
  .lede-band {
    grid-template-columns: auto 1fr;
    gap: 0;
    align-items: center;
  }
  .lede-band__lead { padding-right: var(--s-6); }
  .lede-band__sub {
    padding-left: var(--s-6);
    border-left: 1px solid var(--border);
  }
}

.lede-band__lead {
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.lede-band__sub {
  font-size: var(--fs-lede);
  line-height: 1.55;
  color: var(--text-medium);
  max-width: 46ch;
}
