/*
 * GAPi Design System — gapi-ds.css
 * Source of truth: brand/gapi-design-system.md (Skippy-ratified 2026-06-19)
 * Proof-of-concept: website/demos/meridian-marine/index.html
 * Builder: GAPI — F0 (foundation layer, prerequisite for all brand pages)
 *
 * FONT LOADING APPROACH
 * ─────────────────────
 * ALL fonts are self-hosted woff2 — no Google Fonts dependency.
 * Consuming pages must add a <link rel="preload"> for Fraunces in <head>
 * (before the DS stylesheet) to prevent FOUT on display headlines.
 *
 * Fraunces → self-hosted woff2 (css/fonts/fraunces-latin.woff2)
 * Geist    → self-hosted woff2 (css/fonts/geist-latin.woff2) — metric-matched fallback: Inter
 * JetBrains Mono → self-hosted woff2 (css/fonts/jetbrains-mono-latin.woff2)
 * Inter    → self-hosted woff2 (css/fonts/inter-latin.woff2) — Geist fallback only
 *
 * NOTE: geist-latin.woff2 is self-hosted at css/fonts/geist-latin.woff2
 * (Geist[wght].woff2 variable font, v1.7.2, OFL — placed 2026-06-19).
 * No Google Fonts request is made in either case — self-host or fallback only.
 */

/* ─────────────────────────────────────────────────
   SELF-HOSTED FONTS
   ───────────────────────────────────────────────── */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('../css/fonts/jetbrains-mono-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('../css/fonts/fraunces-latin.woff2') format('woff2');
}
/* Geist: self-hosted when the woff2 is on disk; falls to Inter (same metrics) */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../css/fonts/geist-latin.woff2') format('woff2'),
       url('../css/fonts/inter-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../css/fonts/inter-latin.woff2') format('woff2');
}

/* ─────────────────────────────────────────────────
   §1 — COLOR TOKENS (locked 3-role palette)
   Byte-exact to spec §1 — never rename, never add decorative aliases
   ───────────────────────────────────────────────── */
:root {
  /* 3 roles */
  --navy:          #0B2447;   /* dominant ground — 70%+ of every screen */
  --navy-2:        #0E2C57;   /* raised surface / layered depth */
  --navy-deep:     #081A36;   /* deepest atmospheric layer */
  --strike:        #E8A33D;   /* amber — THE brand accent, once per screen */
  --strike-hi:     #F2C173;   /* amber hover/lift only */
  --edge:          #C8311F;   /* oxblood — structural sharp accent (1px rules, focus rings, press) */

  /* warm-paper light sections */
  --paper:         #F4F0E7;   /* warm morning haze — light-section ground, NEVER #FFFFFF */
  --paper-2:       #EBE5D7;   /* raised on paper */

  /* ink */
  --ink:           #F6FAFB;   /* primary text on navy */
  --ink-dim:       #C7D6DB;   /* secondary text on navy */
  --ink-paper:     #16222E;   /* text on warm-paper sections */
  --ink-paper-dim: #41535E;   /* secondary text on paper */

  /* hairlines / atmosphere */
  --rule:          rgba(232,163,61,.22);   /* amber-dim hairline */
  --rule-edge:     rgba(200,49,31,.30);    /* oxblood-dim hairline, rare */
  --warmth-leak:   rgba(232,163,61,.06);   /* 6% amber warmth bleed in bg */

  /* ─────────────────────────────────────────────
     §2 — TYPE SCALE TOKENS
     ───────────────────────────────────────────── */
  --t-mega:   clamp(3.4rem, 9vw, 7rem);        /* the ONE oversized moment — Fraunces 900 */
  --t-h1:     clamp(2.6rem, 6vw, 4.4rem);      /* hero/page headline — gap-close lives here */
  --t-h2:     clamp(1.9rem, 3.4vw, 2.8rem);    /* section headline */
  --t-h3:     1.4rem;                           /* sub-section */
  --t-lead:   clamp(1.1rem, 1.7vw, 1.32rem);   /* lead paragraph / hero sub — Geist 300 */
  --t-body:   1.0625rem;                        /* 17px body — Geist 300 */
  --t-label:  0.72rem;                          /* mono labels, section tags */

  /* ─────────────────────────────────────────────
     §3 — SPACE SCALE (8px derived, use unevenly — editorial pacing)
     ───────────────────────────────────────────── */
  --s1:  8px;
  --s2:  16px;
  --s3:  26px;
  --s4:  42px;
  --s5:  68px;
  --s6:  110px;
  --s7:  160px;
  --maxw: 1200px;

  /* ─────────────────────────────────────────────
     §3 — RADIUS (SHARP — editorial luxury; AI default is big soft radii)
     ───────────────────────────────────────────── */
  --r-sharp: 2px;   /* buttons, most surfaces */
  --r-soft:  6px;   /* rare softened card — used to VARY, not as default */

  /* ─────────────────────────────────────────────
     §3 — MOTION TOKENS (varied easing vocabulary — anti-AI #21)
     ───────────────────────────────────────────── */
  --e-btn:  cubic-bezier(.16, 1, .3, 1);     /* sharp snap — buttons, gap-close seal */
  --e-soft: cubic-bezier(.22, .61, .36, 1);  /* soft ease — layout reveals, scroll */
  --t-fast: .18s;
  --t-mid:  .42s;
  --t-slow: .75s;
}

/* ─────────────────────────────────────────────────
   RESET + BASE
   ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Geist', 'Inter', system-ui, sans-serif;
  font-weight: 300;
  background: var(--navy);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { cursor: pointer; }

/* ─────────────────────────────────────────────────
   §4 — ATMOSPHERIC BACKGROUND DEPTH
   A) 3-layer radial + warmth-leak (applied via .atmos utility)
   B) CSS SVG grain (body::before — baseFrequency 0.65, 5% opacity)
   ───────────────────────────────────────────────── */

/* B) Grain — CSS SVG feTurbulence (NOT a raster PNG)
      baseFrequency: 0.65 (Wren's spec), numOctaves: 3, opacity: 5%
      On warm-paper sections, reduce to 3.5% via .atmos-paper override */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* A) Atmospheric depth — apply .atmos to any section needing navy depth layers */
.atmos { isolation: isolate; position: relative; }
.atmos::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 20% 8%,  var(--navy-2) 0%, transparent 45%),
    radial-gradient(100% 70% at 85% 0%,  var(--warmth-leak) 0%, transparent 40%),
    radial-gradient(140% 90% at 50% 100%, var(--navy-deep) 0%, transparent 55%);
}

/* Warm-paper grain reduction: sections on --paper drop grain to ~3.5% */
.section-paper::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.section-paper { position: relative; }

/* ─────────────────────────────────────────────────
   §2 — TYPE SYSTEM
   Display: Fraunces (weights 300 + 900 — extremes only)
   Body: Geist 300/700
   Numerics: JetBrains Mono tabular
   ───────────────────────────────────────────────── */
h1, h2, h3, h4, .display {
  font-family: 'Fraunces', 'Georgia', serif;
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.02;
}
body, .body-text {
  font-family: 'Geist', 'Inter', system-ui, sans-serif;
  font-weight: 300;
  line-height: 1.6;
}
.mono, [data-num] {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}

/* Weight-extreme utility classes (anti-AI #3 — weight extremes) */
.f-light  { font-weight: 300; }
.f-black  { font-weight: 900; }
.f-italic { font-style: italic; }

/* Type scale utilities */
.t-mega  { font-size: var(--t-mega);  font-family: 'Fraunces', 'Georgia', serif; font-weight: 900; letter-spacing: -.03em; line-height: .9; }
.t-h1    { font-size: var(--t-h1);   font-family: 'Fraunces', 'Georgia', serif; font-weight: 900; letter-spacing: -.025em; line-height: 1.0; }
.t-h2    { font-size: var(--t-h2);   font-family: 'Fraunces', 'Georgia', serif; letter-spacing: -.02em; line-height: 1.06; }
.t-h3    { font-size: var(--t-h3);   font-family: 'Fraunces', 'Georgia', serif; letter-spacing: -.01em; }
.t-lead  { font-size: var(--t-lead); font-weight: 300; line-height: 1.56; }
.t-body  { font-size: var(--t-body); font-weight: 300; }
.t-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: var(--t-label);
  letter-spacing: .22em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

/* Strike (amber) text utility — use ONCE per screen */
.text-strike { color: var(--strike); }
/* --strike-hi is AA-contrast approved for micro-text labels on navy (#0B2447):
   #F2C173 on #0B2447 = 7.3:1 — use this for .brand-tag, footer small, decorative mono labels */
.text-strike-hi { color: var(--strike-hi); }
.text-edge   { color: var(--edge); }
.text-ink    { color: var(--ink); }
.text-ink-dim { color: var(--ink-dim); }

/* ─────────────────────────────────────────────────
   PROOF / INDEX VALUE UTILITIES
   Promoted from repeated inline styles
   ───────────────────────────────────────────────── */
/* Italic light value text — proof col values, index descriptors */
.val-italic {
  font-size: var(--t-body);
  font-weight: 300;
  font-style: italic;
  color: var(--ink-dim);
  line-height: 1.5;
  max-width: 28ch;
}
/* On paper sections override */
.section-paper .val-italic { color: var(--ink-paper-dim); }

/* Index value overrides — 3-col reframe step values */
.index-value-desc {
  font-size: 1.1rem;
  font-weight: 300;
  font-style: italic;
  color: var(--ink-paper-dim);
}

/* ─────────────────────────────────────────────────
   LAYOUT UTILITIES
   ───────────────────────────────────────────────── */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--s3);
  position: relative;
  z-index: 2;
}
.wrap-narrow { max-width: 720px; margin: 0 auto; padding: 0 var(--s3); }

/* Section rhythm helpers — dense vs airy (spec §10: vary, never uniform) */
.section-dense  { padding: var(--s5) 0; }
.section-airy   { padding: var(--s7) 0; }
.section-mid    { padding: var(--s6) 0; }

/* ─────────────────────────────────────────────────
   §4 — NAV (sticky, frosted glass)
   ───────────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11,36,71,.70);
  backdrop-filter: saturate(150%) blur(16px);
  -webkit-backdrop-filter: saturate(150%) blur(16px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

/* Brand wordmark — Fraunces + JetBrains Mono micro-tag in --strike */
.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-family: 'Fraunces', 'Georgia', serif;
  font-weight: 900;
  font-size: 21px;
  letter-spacing: -.015em;
  line-height: 1;
}
.nav-brand .brand-tag {
  display: block;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 400;
  font-size: 9px;
  letter-spacing: .24em;
  /* --strike-hi (#F2C173) achieves AA contrast at 9px on navy — #E8A33D fails AA at this size */
  color: var(--strike-hi);
  margin-top: 3px;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

/* Nav links — Geist, --strike wipe underline on hover */
.nav-links {
  display: flex;
  gap: var(--s4);
  font-size: 14px;
  color: var(--ink-dim);
}
.nav-links a {
  position: relative;
  padding: 4px 0;
  transition: color var(--t-fast) var(--e-btn);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1.5px;
  background: var(--strike);
  transition: width var(--t-mid) var(--e-btn);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }
.nav-links a:focus-visible { outline: 2px solid var(--edge); outline-offset: 3px; border-radius: 2px; }

@media (max-width: 780px) { .nav-links { display: none; } }

/* ─────────────────────────────────────────────────
   §6a — BUTTONS (all 6 microstates — spec §5)
   ───────────────────────────────────────────────── */
.btn {
  font-family: 'Geist', 'Inter', system-ui, sans-serif;
  font-weight: 700;
  font-size: 15px;
  border: none;
  border-radius: var(--r-sharp);
  padding: 13px 26px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  transition:
    transform var(--t-fast) var(--e-btn),
    box-shadow var(--t-mid),
    background var(--t-fast),
    opacity var(--t-fast);
  position: relative;
}

/* Strike (amber) button — the PRIMARY CTA, the ONE amber moment */
.btn-strike {
  background: var(--strike);
  color: #1b1305;
  box-shadow: 0 8px 26px -10px rgba(232,163,61,.70);
}
/* 1. default — above */
/* 2. hover */
.btn-strike:hover {
  background: var(--strike-hi);
  transform: translateY(-2px);
  box-shadow: 0 14px 34px -10px rgba(232,163,61,.90);
  color: #1b1305;
}
/* 3. focus */
.btn-strike:focus-visible {
  outline: 2px solid var(--edge);
  outline-offset: 3px;
}
/* 4. active / press depth */
.btn-strike:active {
  transform: translateY(1px) scale(.985);
  box-shadow: 0 3px 12px -8px rgba(200,49,31,.90);
  background: var(--strike);
}
/* 5. disabled */
.btn-strike:disabled,
.btn-strike[aria-disabled="true"] {
  opacity: .4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  pointer-events: none;
}
/* 6. loading — JS adds .btn--loading; label handled by consuming HTML */
.btn--loading {
  pointer-events: none;
  opacity: .82;
}
.btn--loading .btn-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(27,19,5,.3);
  border-top-color: #1b1305;
  border-radius: 50%;
  animation: btn-spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* Ghost button */
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
}
.btn-ghost:hover {
  border-color: rgba(232,163,61,.45);
  color: var(--ink);
  transform: translateY(-1px);
}
.btn-ghost:focus-visible { outline: 2px solid var(--edge); outline-offset: 3px; }
.btn-ghost:active { transform: translateY(1px); border-color: var(--edge); }
.btn-ghost:disabled,
.btn-ghost[aria-disabled="true"] { opacity: .4; cursor: not-allowed; pointer-events: none; }

/* Nav-scale button (smaller) */
.btn-nav { padding: 10px 18px; font-size: 14px; }

/* ─────────────────────────────────────────────────
   §8 — THE CLOSING GAP (signature #1)
   Two halves seal on load ≤700ms. Accessible: aria-label on the H1.
   prefers-reduced-motion: shows sealed headline immediately, zero motion.
   ───────────────────────────────────────────────── */
.gapclose {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: nowrap;
}
.gapclose .h-l,
.gapclose .h-r {
  display: inline-block;
}
/* Animated state — transforms drive the seal */
.gapclose .h-l {
  transform: translateX(-.5em);
  opacity: 0;
  animation: gapclose-seal-l .62s var(--e-btn) .15s forwards;
}
.gapclose .h-r {
  transform: translateX(.5em);
  opacity: 0;
  animation: gapclose-seal-r .62s var(--e-btn) .15s forwards;
}
/* The seam — --strike hairline that flashes at the join moment then fades */
.gapclose .seam {
  display: inline-block;
  width: 0;
  height: .06em;
  background: var(--strike);
  align-self: center;
  flex-shrink: 0;
  animation: gapclose-seam .3s var(--e-btn) .62s forwards;
}

@keyframes gapclose-seal-l { to { transform: none; opacity: 1; } }
@keyframes gapclose-seal-r { to { transform: none; opacity: 1; } }
@keyframes gapclose-seam {
  0%   { width: 0;    opacity: 1; }
  60%  { width: .4em; opacity: 1; }
  100% { width: 0;    opacity: 0; }
}

/* Reduced-motion: show closed headline immediately, no animation */
@media (prefers-reduced-motion: reduce) {
  .gapclose .h-l,
  .gapclose .h-r {
    animation: none;
    transform: none;
    opacity: 1;
  }
  .gapclose .seam {
    animation: none;
    width: 0;
  }
}

/* ─────────────────────────────────────────────────
   §8b — THE CLOSE-SEAM (the site spine — CS-1)
   ONE shared close-seam primitive: an amber hairline that strikes
   THROUGH the join of a close-headline payoff word on scroll-into-view.
   Every page's CLOSE headline exhales the SAME seam the homepage hero
   inhales — one device, not six reimplementations.

   Usage: wrap the payoff word in <span class="close-seam">word</span>,
   inside an element carrying .reveal (the existing scroll observer adds .in).
   Fires ONCE (the observer unobserves after .in). Reduced-motion: static-struck.
   ───────────────────────────────────────────────── */
.close-seam {
  position: relative;
  color: var(--strike);              /* the payoff word is the amber moment */
  white-space: nowrap;
}
.close-seam::after {
  content: "";
  position: absolute;
  left: -.04em;
  right: auto;
  top: 50%;
  width: 0;                          /* unstruck — collapses to the join */
  height: .06em;
  background: var(--strike);
  transform: translateY(-50%);
  transform-origin: left center;
  pointer-events: none;
}
/* Struck on scroll-into-view — the seam draws across the word, sharp latch */
.js .reveal.in .close-seam::after {
  animation: close-seam-strike .42s var(--e-btn) .12s forwards;
}
@keyframes close-seam-strike {
  0%   { width: 0;                  opacity: 1; }
  70%  { width: calc(100% + .08em); opacity: 1; }   /* over-travels the join */
  100% { width: calc(100% + .08em); opacity: .9; }  /* latches struck, stays */
}
/* No-JS: show the seam STATIC-STRUCK (it closed; it stays closed) */
.no-js .close-seam::after {
  width: calc(100% + .08em);
  opacity: .9;
}
/* Reduced-motion: static-struck, no animation */
@media (prefers-reduced-motion: reduce) {
  .close-seam::after {
    width: calc(100% + .08em);
    opacity: .9;
    animation: none;
  }
}

/* ─────────────────────────────────────────────────
   §9 — THE BRACKET DEVICE (signature #2)
   Drawn CSS square corners — two OPPOSITE corners (viewfinder crop)
   Applied to ONE element per page — the magnetic element
   ───────────────────────────────────────────────── */
.bracket {
  position: relative;
  display: inline-block;
  padding: 18px 22px;
}
/* Top-left + bottom-right corners only (diagonal viewfinder, not a full box) */
.bracket::before,
.bracket::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--strike);
}
.bracket::before {
  top: 0;
  left: 0;
  border-right: 0;
  border-bottom: 0;
}
.bracket::after {
  bottom: 0;
  right: 0;
  border-left: 0;
  border-top: 0;
}
/* Rare tension variant — oxblood instead of amber (consign/closer pages only) */
.bracket-edge::before,
.bracket-edge::after {
  border-color: var(--edge);
}

/* ─────────────────────────────────────────────────
   §9b — FOUNDER PHOTOGRAPHY TREATMENT (About page)
   DS §10: real, aggressively-cropped photography — cut shoulders,
   face-forward, no distortion (object-fit:cover + object-position).
   On-brand grade: subtle warm push so a real phone photo sits in the
   warm-paper / navy / amber world (anti-AI #24 — real is the point,
   NOT over-filtered). Grain overlay matches the page's body grain.
   ───────────────────────────────────────────────── */

/* The cropped figure — fixed aspect, shoulders cut, face-forward.
   object-fit:cover never distorts; object-position pulls the face up. */
.founder-figure {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--r-sharp);
  isolation: isolate;
  background: var(--navy-2); /* fills any letterbox during decode */
  line-height: 0;
}
.founder-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* face-forward, shoulders cropped low — pull the frame up to the eyes */
  object-position: 50% 22%;
  /* Subtle warm grade — pulls the real photo toward warm-paper/amber world.
     Restrained: NOT a heavy filter (real is the point). */
  filter: saturate(.92) contrast(1.04) sepia(.10) brightness(1.01);
}

/* Warm tone bloom + the DS grain, layered over the photo so it lives
   in the same atmosphere as the page (amber leak top-left, navy settle). */
.founder-figure::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(80% 70% at 18% 8%, rgba(232,163,61,.12) 0%, transparent 55%),
    radial-gradient(90% 80% at 90% 100%, rgba(11,36,71,.22) 0%, transparent 60%);
  mix-blend-mode: multiply;
}
.founder-figure::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='nf'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23nf)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

/* PRIMARY — hero founder figure (the disarming human face).
   This is the hero's ONE magnetic element: bracketed (the screen's
   one amber moment). Square crop, sized to sit beside the pull-quote. */
.founder-figure-hero {
  aspect-ratio: 1 / 1;
  width: clamp(150px, 22vw, 230px);
}

/* The bracket wrap for the hero photo — the magnetic element.
   Inline-block so the amber corners hug the figure. */
.founder-hero-bracket {
  display: inline-block;
}

/* Hero layout: photo + pull-quote on one editorial row.
   Asymmetric (DS §10) — photo offset, quote dominant. Photo first on
   the row but visually anchored low-left of the quote. */
.hero-about-figrow {
  display: flex;
  align-items: flex-end;
  gap: var(--s4);
  flex-wrap: wrap;
}
.hero-about-figrow .hero-about-textcol { flex: 1 1 420px; min-width: 0; }
@media (max-width: 680px) {
  .hero-about-figrow { gap: var(--s3); }
  .founder-figure-hero { width: clamp(120px, 38vw, 170px); }
}

/* ORIGIN BEAT — USMC portrait (smaller, in the operator-story / wound
   section). Where the discipline came from. NOT bracketed (the ghost
   stat is that screen's weird thing; no second amber here) — framed with
   a restrained hairline + mono caption, archival treatment.
   Native source is low-res (206px) → rendered small so it stays crisp. */
.founder-figure-origin {
  aspect-ratio: 4 / 5;
  width: clamp(118px, 16vw, 150px);
  border: 1px solid var(--rule);
  border-radius: var(--r-sharp);
}
.founder-figure-origin img {
  /* dress-blues portrait — center the face, crop tight */
  object-position: 50% 30%;
  filter: saturate(.88) contrast(1.05) sepia(.12) brightness(1.0);
}
.founder-origin-wrap {
  display: flex;
  align-items: flex-end;
  gap: var(--s3);
  margin-top: var(--s4);
}
.founder-origin-cap {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: var(--t-label);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  max-width: 18ch;
}
.founder-origin-cap strong {
  display: block;
  color: var(--ink);
  letter-spacing: .12em;
  margin-bottom: 4px;
}
@media (max-width: 760px) {
  .founder-origin-wrap { margin-top: var(--s3); }
}

/* ─────────────────────────────────────────────────
   SIGNATURE MOTIF — the rule-line divider
   (section-level motif: hairline + strike tick + mono label)
   Matches Meridian's .meridian pattern, bound to GAPi tokens
   ───────────────────────────────────────────────── */
.motif {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink-dim);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.motif::before {
  content: "";
  height: 1px;
  width: 54px;
  background: var(--strike);
  flex-shrink: 0;
}
.motif::after {
  content: "";
  width: 6px;
  height: 6px;
  border: 1px solid var(--strike);
  transform: rotate(45deg);
  margin-left: -8px;
  flex-shrink: 0;
}
/* On warm-paper sections, motif uses --ink-paper-dim + darker strike tone */
.section-paper .motif { color: var(--ink-paper-dim); }
.section-paper .motif::before,
.section-paper .motif::after { background: rgba(184,130,49,1); border-color: rgba(184,130,49,1); }

/* ─────────────────────────────────────────────────
   §6b — UN-CARD-LIKE CARDS (vary, don't template)
   Rule: a card group must vary at least two of
   {radius, border-weight, background-tint, shadow-depth, padding}
   Most cards: no box — prefer hairline-top + whitespace.
   When boxing: one member gets --r-soft while siblings get --r-sharp.
   ───────────────────────────────────────────────── */

/* Base card — hairline-top only (editorial, anti-box default) */
.card-row {
  padding-top: var(--s3);
  border-top: 1px solid var(--rule);
}

/* Boxed card variant — navy surface */
.card-box {
  background: var(--navy-2);
  border: 1px solid var(--rule);
  border-radius: var(--r-sharp);
  overflow: hidden;
  transition:
    transform var(--t-mid) var(--e-soft),
    box-shadow var(--t-mid),
    border-color var(--t-mid);
}
.card-box:hover {
  transform: translateY(-4px);
  border-color: rgba(232,163,61,.50);
  box-shadow: 0 30px 60px -28px rgba(0,0,0,.70);
}

/* Soft-radius variant — for the ONE card in a group that gets --r-soft */
.card-box-soft { border-radius: var(--r-soft); }

/* Paper-surface card (used on .section-paper sections) */
.card-paper {
  background: var(--paper-2);
  border: 1px solid rgba(22,34,46,.12);
  border-radius: var(--r-sharp);
}
/* Strike top-edge accent variant */
.card-strike-top { border-top: 2px solid var(--strike); }

/* Card body padding variants (vary to break stamped look) */
.card-body-sm { padding: var(--s3) var(--s3); }
.card-body-md { padding: var(--s3) var(--s4) var(--s4); }
.card-body-lg { padding: var(--s4) var(--s4) var(--s5); }

/* ─────────────────────────────────────────────────
   §6c — ARCHIVAL / INDEX ROWS (data-dense sections)
   Layout: mono label · Fraunces value · mono number (right-aligned)
   Thin --rule rules between rows. Anti-AI #18 "looks authored."
   ───────────────────────────────────────────────── */
.index-table {
  width: 100%;
  border-collapse: collapse;
}
.index-row {
  display: grid;
  grid-template-columns: 1fr 1.6fr auto;
  align-items: baseline;
  gap: var(--s3);
  padding: var(--s2) 0;
  border-bottom: 1px solid var(--rule);
}
.index-row:first-child { border-top: 1px solid var(--rule); }
.index-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: var(--t-label);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}
.index-value {
  font-family: 'Fraunces', 'Georgia', serif;
  font-weight: 900;
  font-size: var(--t-h3);
  color: var(--ink);
  letter-spacing: -.01em;
}
/* On paper sections, override ink colors */
.section-paper .index-label { color: var(--ink-paper-dim); }
.section-paper .index-value { color: var(--ink-paper); }
.index-num {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: var(--t-body);
  color: var(--ink-dim);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ─────────────────────────────────────────────────
   §6d — SECTION RHYTHM HELPERS
   One weird thing per screen (§11 — one element defies the expected)
   ───────────────────────────────────────────────── */

/* Warm-paper section */
.section-paper {
  background: var(--paper);
  color: var(--ink-paper);
}
.section-paper h1,
.section-paper h2,
.section-paper h3,
.section-paper h4 { color: var(--ink-paper); }
.section-paper .t-body,
.section-paper p { color: var(--ink-paper-dim); }

/* Navy deep section */
.section-deep { background: var(--navy-deep); }

/* Hairline section dividers (amber-dim) */
.rule-top    { border-top: 1px solid var(--rule); }
.rule-bottom { border-bottom: 1px solid var(--rule); }

/* The oversized typographic moment — ONE per page, grid-break candidate */
.t-mega-wrap {
  font-family: 'Fraunces', 'Georgia', serif;
  font-weight: 900;
  font-size: var(--t-mega);
  line-height: .9;
  letter-spacing: -.04em;
  color: var(--strike-hi);
  overflow: visible;           /* allow intentional grid-break overflow */
}
.t-mega-wrap em {
  font-style: italic;
  font-weight: 300;
  color: var(--ink);
}

/* ─────────────────────────────────────────────────
   STAGGERED ARRIVAL — hero orchestration
   ONE arrival per page, then mostly static
   .rise applies to hero children (opacity+translateY stagger)
   ───────────────────────────────────────────────── */
.rise {
  opacity: 0;
  transform: translateY(22px);
  animation: ds-rise .9s var(--e-soft) forwards;
}
@keyframes ds-rise { to { opacity: 1; transform: none; } }

/* Scroll-reveal (JS-gated: .js .reveal → .in) */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity var(--t-slow) var(--e-soft),
    transform var(--t-slow) var(--e-soft);
}
.js .reveal.in { opacity: 1; transform: none; }

/* Stagger delays for card groups */
.js .reveal:nth-child(2) { transition-delay: .09s; }
.js .reveal:nth-child(3) { transition-delay: .18s; }
.js .reveal:nth-child(4) { transition-delay: .27s; }

/* ─────────────────────────────────────────────────
   FORM FIELDS (6 microstates applied consistently)
   ───────────────────────────────────────────────── */
.field { margin-bottom: var(--s2); }
.field label {
  display: block;
  font-family: 'Geist', 'Inter', system-ui, sans-serif;
  font-size: 12.5px;
  color: var(--ink-dim);
  margin-bottom: 6px;
  font-weight: 500;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--navy-deep);
  border: 1px solid var(--rule);
  border-radius: var(--r-sharp);
  padding: 12px 14px;
  color: var(--ink);
  font-family: 'Geist', 'Inter', system-ui, sans-serif;
  font-size: var(--t-body);
  font-weight: 300;
  transition: border-color var(--t-fast);
  outline: none;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--ink-dim); opacity: .5; }
/* focus */
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: rgba(232,163,61,.55); }
/* focus-visible (keyboard) */
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { outline: 2px solid var(--edge); outline-offset: 2px; border-color: transparent; }
/* disabled */
.field input:disabled,
.field select:disabled,
.field textarea:disabled { opacity: .4; cursor: not-allowed; }
/* error state */
.field.is-error input,
.field.is-error select,
.field.is-error textarea { border-color: var(--edge); }
.field .field-error {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--edge);
  letter-spacing: .05em;
  margin-top: 4px;
}

/* Field row (2-up) */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; } }

/* Honeypot field */
.hp { position: absolute; left: -9999px; }

/* ─────────────────────────────────────────────────
   GLOBAL FOCUS RING (accessibility — always oxblood edge)
   Never remove outline; never rely on hover alone.
   ───────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--edge);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ─────────────────────────────────────────────────
   "ONE WEIRD THING PER SCREEN" — documented convention
   (Not enforced by CSS — enforced by the builder.
    Each viewport: exactly ONE element defies the expected.
    Zero = generated-looking. Two = noise.)
   Candidates: .t-mega-wrap overflow, .f-italic .f-light Fraunces line,
   .bracket device, .text-strike single word, .card-box-soft amid sharp siblings.
   ───────────────────────────────────────────────── */

/* ─────────────────────────────────────────────────
   ACCESSIBILITY + MOTION RESET
   ───────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  /* Ensure revealed elements are visible without animation */
  .rise { opacity: 1; transform: none; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
}
