/* Geometry Intelligence — Design System
   Palette per build-prompt R1 resolution set (2026-07-19).
   No IP-sensitive terminology in class names, IDs, or comments. */

:root {
  --background-primary: #0b0c0d;
  --background-secondary: #111315;
  --background-elevated: #17191b;
  --text-primary: #eee9df;
  --text-secondary: #aaa69e;
  --text-muted: #77746e;
  --accent-primary: #b59a62;
  --accent-soft: #8d7a52;
  --rule: rgba(238, 233, 223, 0.14);
  --rule-strong: rgba(181, 154, 98, 0.38);
  --success: #81927c;
  --warning: #b79461;

  --font-serif: "Cormorant Garamond", "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", "Manrope", "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --measure-prose: 46rem;      /* ~736px */
  --measure-wide: 72rem;       /* ~1152px */
}

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

html {
  background: var(--background-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

@media (max-width: 640px) {
  html { font-size: 17px; }
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* Typography ------------------------------------------------------------ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.005em;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.6rem, 6vw, 5rem); font-weight: 500; }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
h3 { font-size: clamp(1.4rem, 2.4vw, 2rem); }
h4 { font-size: 1.25rem; }

p, li {
  color: var(--text-primary);
  font-size: 1.125rem;
  line-height: 1.7;
}

.lede {
  font-size: 1.35rem;
  line-height: 1.55;
  color: var(--text-primary);
  font-family: var(--font-serif);
  font-weight: 400;
  max-width: var(--measure-prose);
}

.secondary { color: var(--text-secondary); }
.muted { color: var(--text-muted); }

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-primary);
  font-weight: 500;
  display: inline-block;
  margin-bottom: 1rem;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 220ms ease, border-color 220ms ease;
  border-bottom: 1px solid transparent;
}
a:hover,
a:focus-visible {
  color: var(--text-primary);
  border-bottom-color: var(--accent-primary);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

/* Layout ---------------------------------------------------------------- */
.container {
  max-width: var(--measure-wide);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.prose {
  max-width: var(--measure-prose);
}
.section {
  padding: 5rem 0;
  border-top: 1px solid var(--rule);
}
.section:first-of-type {
  border-top: none;
}

/* Header ---------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 12, 13, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.site-nav {
  max-width: var(--measure-wide);
  margin: 0 auto;
  /* padding reduced 20%: 1.25rem -> 1rem, 1.5rem -> 1.2rem */
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* gap reduced 20%: 2rem -> 1.6rem */
  gap: 1.6rem;
}
.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  color: var(--text-primary);
  border-bottom: none;
  font-family: var(--font-sans);
}
.brand-name {
  /* font-size reduced 20%: 0.9rem -> 0.72rem */
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
}
.brand-marker {
  /* font-size reduced 20%: 0.65rem -> 0.52rem */
  font-size: 0.52rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.15rem;
}
.brand:hover .brand-name { color: var(--accent-primary); }

.nav-links {
  list-style: none;
  display: flex;
  /* gap reduced 20%: 2rem -> 1.6rem */
  gap: 1.6rem;
  /* Anchored to .brand-marker (0.52rem) — nav sits at marker tier, brand-name (0.72rem) dominates */
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav-links a {
  color: var(--text-secondary);
  border-bottom: none;
}
.nav-links a:hover { color: var(--accent-primary); }

.nav-cta {
  /* font-size reduced 20%: 0.72rem -> 0.576rem */
  font-size: 0.576rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  /* padding reduced 20%: 0.6rem -> 0.48rem, 1.1rem -> 0.88rem */
  padding: 0.48rem 0.88rem;
  border: 1px solid var(--accent-primary);
  color: var(--accent-primary);
  border-radius: 0;
}
.nav-cta:hover {
  background: var(--accent-primary);
  color: var(--background-primary);
  border-bottom-color: var(--accent-primary);
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--text-primary);
  /* padding reduced 20%: 0.55rem -> 0.44rem, 0.85rem -> 0.68rem */
  padding: 0.44rem 0.68rem;
  /* font-size reduced 20%: 0.75rem -> 0.6rem */
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .mobile-toggle { display: inline-flex; }
}

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--background-primary);
  z-index: 60;
  padding: 5rem 1.5rem 3rem;
  transform: translateY(-100%);
  transition: transform 320ms ease;
  overflow-y: auto;
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: var(--measure-prose);
  margin: 2rem auto 0;
}
.mobile-menu a {
  font-family: var(--font-serif);
  font-size: 1.9rem;
  color: var(--text-primary);
  border-bottom: none;
  display: block;
}
.mobile-menu a small {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.35rem;
}
.mobile-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--text-primary);
  padding: 0.55rem 0.85rem;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--accent-primary);
  color: var(--background-primary);
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  z-index: 100;
  border-bottom: none;
}
.skip-link:focus {
  top: 1rem;
}

/* Hero ------------------------------------------------------------------ */
.hero {
  padding: clamp(4rem, 10vw, 8rem) 0 clamp(3rem, 6vw, 5rem);
  position: relative;
  overflow: hidden;
}
.hero-inner {
  max-width: var(--measure-wide);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}
.hero h1 {
  max-width: 20ch;
  margin-bottom: 2rem;
}
.hero p.lede {
  margin-bottom: 2.75rem;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}
.hero-attribution {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.6rem;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid var(--accent-primary);
  color: var(--accent-primary);
  background: transparent;
  cursor: pointer;
  transition: all 260ms ease;
  font-family: var(--font-sans);
  font-weight: 500;
  border-radius: 0;
}
.btn:hover,
.btn:focus-visible {
  background: var(--accent-primary);
  color: var(--background-primary);
  border-bottom-color: var(--accent-primary);
}
.btn-primary {
  background: var(--accent-primary);
  color: var(--background-primary);
}
.btn-primary:hover,
.btn-primary:focus-visible {
  background: transparent;
  color: var(--accent-primary);
}
.btn-ghost {
  border-color: var(--rule);
  color: var(--text-primary);
}
.btn-ghost:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: transparent;
}

/* Principle grid -------------------------------------------------------- */
.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 3rem;
}
.principle {
  border-top: 1px solid var(--rule-strong);
  padding-top: 1.5rem;
}
.principle .number {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--accent-primary);
  letter-spacing: 0.2em;
  margin-bottom: 0.75rem;
  display: block;
}
.principle h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}
.principle p {
  color: var(--text-secondary);
  font-size: 1rem;
}
@media (max-width: 800px) {
  .principles { grid-template-columns: 1fr; gap: 2rem; }
}

/* Diagram --------------------------------------------------------------- */
.diagram {
  margin: 2.5rem 0 1rem;
  padding: 2.5rem 2rem;
  background: var(--background-secondary);
  border: 1px solid var(--rule);
  font-family: var(--font-serif);
  font-size: 1.4rem;
  text-align: center;
  color: var(--text-primary);
  line-height: 2;
  letter-spacing: 0.02em;
}
.diagram .step {
  display: inline-block;
  padding: 0.25rem 0.5rem;
}
.diagram .arrow {
  color: var(--accent-primary);
  margin: 0 0.5rem;
}
.diagram-caption {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 1rem;
  text-align: center;
}

.diagram-vertical {
  padding: 2.5rem 1.5rem;
  background: var(--background-secondary);
  border: 1px solid var(--rule);
  margin: 2.5rem 0 1rem;
}
.diagram-vertical ol {
  list-style: none;
  padding: 0;
  max-width: 40ch;
  margin: 0 auto;
  text-align: center;
}
.diagram-vertical li {
  padding: 0.75rem 0;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.diagram-vertical li:last-child { border-bottom: none; }
.diagram-vertical li::before {
  content: "↓";
  display: block;
  color: var(--accent-primary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-sans);
}
.diagram-vertical li:first-child::before { content: ""; margin-bottom: 0; }

/* Domain table ---------------------------------------------------------- */
.domain-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2.5rem 0;
  font-size: 1rem;
}
.domain-table th,
.domain-table td {
  padding: 1.25rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
}
.domain-table th {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-primary);
  font-weight: 500;
  border-bottom-color: var(--rule-strong);
}
.domain-table td:first-child {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--text-primary);
  min-width: 12rem;
}
.domain-table td { color: var(--text-secondary); }

@media (max-width: 700px) {
  .domain-table thead { display: none; }
  .domain-table tr {
    display: block;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--rule);
  }
  .domain-table td {
    display: block;
    padding: 0.35rem 0;
    border: none;
  }
  .domain-table td:first-child {
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
  }
}

/* Timeline / evidence ledger ------------------------------------------- */
.ledger {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
}
.ledger li {
  padding: 1.75rem 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: 2rem;
  align-items: baseline;
}
.ledger li:last-child { border-bottom: 1px solid var(--rule); }
.ledger .ledger-date {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-primary);
}
.ledger .ledger-headline {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.ledger .ledger-body {
  color: var(--text-secondary);
  font-size: 1rem;
}
.ledger .ledger-source {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-style: italic;
}
@media (max-width: 800px) {
  .ledger li { grid-template-columns: 1fr; gap: 0.5rem; }
}

/* Cards ---------------------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0;
}
.card {
  padding: 2rem 1.75rem;
  border: 1px solid var(--rule);
  background: var(--background-secondary);
  transition: border-color 260ms ease;
}
.card:hover { border-color: var(--rule-strong); }
.card-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
  display: block;
}
.card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}
.card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}
.card .independence-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  border-top: 1px solid var(--rule);
  padding-top: 0.75rem;
  margin-top: 1rem;
}

/* Glossary ------------------------------------------------------------- */
.glossary {
  margin: 3rem 0;
}
.glossary-term {
  padding: 2rem 0;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 5rem;
}
.glossary-term:last-child { border-bottom: 1px solid var(--rule); }
.glossary-term h3 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}
.glossary-term .canonical {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--text-primary);
  font-style: italic;
  margin-bottom: 1rem;
  border-left: 2px solid var(--accent-primary);
  padding-left: 1rem;
}
.glossary-term .plain {
  color: var(--text-secondary);
  font-size: 1rem;
}
.glossary-term .term-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  letter-spacing: 0.05em;
}

/* Forms --------------------------------------------------------------- */
.form,
.briefing-form {
  max-width: var(--measure-prose);
  margin: 2.5rem 0 0 0;
  display: grid;
  gap: 1.75rem;
}

/* Each row: label stacked above its input (never side-by-side).
   The old 2-column grid was wrong for label+input pairs and caused
   labels to stack in col 1 with inputs jammed in col 2. */
.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form label,
.briefing-form label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 500;
}
.form label[aria-hidden],
.briefing-form label[aria-hidden] { display: none; }

.form input,
.form textarea,
.form select,
.briefing-form input,
.briefing-form textarea,
.briefing-form select {
  width: 100%;
  background: var(--background-secondary);
  border: 1px solid var(--rule);
  color: var(--text-primary);
  padding: 0.85rem 1rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  border-radius: 0;
  min-height: 44px;
  transition: border-color 180ms ease;
}
.briefing-form select {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-secondary) 50%),
                    linear-gradient(135deg, var(--text-secondary) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.5rem;
}
.form textarea,
.briefing-form textarea {
  min-height: 10rem;
  resize: vertical;
  line-height: 1.65;
}
.form input:focus,
.form textarea:focus,
.form select:focus,
.briefing-form input:focus,
.briefing-form textarea:focus,
.briefing-form select:focus {
  border-color: var(--accent-primary);
  outline: 2px solid var(--accent-primary);
  outline-offset: -1px;
}
.form input::placeholder,
.briefing-form input::placeholder,
.briefing-form textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.8;
}

.form-hint,
.briefing-form .form-hint {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
}

/* Consent / checkbox row */
.consent,
.briefing-form .checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
  line-height: 1.55;
  cursor: pointer;
}
.consent input[type=checkbox],
.briefing-form .checkbox input[type=checkbox] {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.2rem;
  accent-color: var(--accent-primary);
  flex-shrink: 0;
  min-height: 0;
  padding: 0;
}

/* Honeypot: visually hidden but not display:none (bots need to see the input) */
.briefing-form .honeypot {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* Actions row: submit + cancel */
.form-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.form-status {
  padding: 1rem 1.25rem;
  border: 1px solid var(--rule);
  font-size: 0.95rem;
  line-height: 1.55;
}
.form-status.success { border-color: var(--success); color: var(--success); }
.form-status.error { border-color: var(--warning); color: var(--warning); }
.form-status[hidden] { display: none; }

/* visually-hidden utility (used for "required" screen-reader hints) */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Boundary note ------------------------------------------------------- */
.boundary-note {
  margin: 2.5rem 0;
  padding: 1.75rem 1.75rem 1.75rem 2rem;
  border-left: 2px solid var(--accent-primary);
  background: var(--background-secondary);
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
}
.boundary-note strong { color: var(--text-primary); }

/* Footer -------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--background-primary);
  padding: 4rem 0 3rem;
  margin-top: 6rem;
}
.footer-inner {
  max-width: var(--measure-wide);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.footer-brand {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}
.footer-tagline {
  color: var(--text-secondary);
  max-width: 40rem;
  margin-bottom: 2rem;
  font-size: 1rem;
}
.footer-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 3rem;
  line-height: 1.75;
}
.footer-meta a { color: var(--accent-primary); border-bottom: none; }
.footer-meta a:hover { color: var(--text-primary); }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  /* reduced from gap: 1.5rem to fit all 13 links on one line at desktop widths */
  gap: 1.1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  /* reduced from 0.72rem so all 13 links fit on a single line at ~1024-1152px */
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.footer-nav a {
  color: var(--text-secondary);
  border-bottom: none;
  /* keep individual link text on one line — wrapping happens between links only */
  white-space: nowrap;
}
.footer-nav a:hover { color: var(--accent-primary); }
.footer-legal {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.6;
}

/* Motion / a11y ------------------------------------------------------- */
@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;
  }
}

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

/* Utilities ----------------------------------------------------------- */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.text-center { text-align: center; }

/* Hero image (full-bleed BAND with H1 overlaid — Layout A + Treatment 1) --- */
/*
 * The hero image is a fixed-height band. The following <section> is pulled UP
 * by negative margin so its eyebrow + H1 sit visually on top of the image,
 * while the lede/CTAs flow below onto solid charcoal.
 *
 * Left-anchored scrim provides text contrast without darkening the sculptural
 * subject (which sits centre/right in every composition).
 *
 * Primary tier: 60vh, deeper scrim.
 * Authority tier: 40vh, softer scrim.
 */

:root {
  --hero-height-primary: 60vh;
  --hero-height-authority: 40vh;
  --hero-h1-overlay-lift: clamp(6rem, 14vw, 12rem); /* how far the H1 pulls up into the image */
  --hero-h1-overlay-lift-authority: clamp(4rem, 9vw, 8rem);
}

.hero-image {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  background: var(--background-primary);
  overflow: hidden;
  position: relative;
  /* Fixed viewport height — reserves layout, prevents CLS */
  height: var(--hero-height-primary);
  min-height: 22rem;
  max-height: 720px;
}

.hero-image picture,
.hero-image img {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-image img {
  object-fit: cover;
  object-position: center;
  /* Bottom fade so the band merges into charcoal where the lede/CTAs sit */
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 78%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 0%, #000 78%, transparent 100%);
  filter: grayscale(100%) contrast(1.02);
}

/* Treatment 1: left-anchored scrim gradient for text contrast.
   Sits ABOVE the image, BELOW the H1 (H1 is in a sibling section on z-index:2). */
.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(11, 12, 13, 0.78) 0%,
    rgba(11, 12, 13, 0.55) 30%,
    rgba(11, 12, 13, 0.20) 60%,
    rgba(11, 12, 13, 0.00) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* Authority tier — quieter, shorter band, softer scrim, softer image */
.hero-image--authority {
  height: var(--hero-height-authority);
  min-height: 16rem;
  max-height: 440px;
  opacity: 0.96;
}
.hero-image--authority img {
  filter: grayscale(100%) contrast(0.98) brightness(0.96);
}
.hero-image--authority::after {
  background: linear-gradient(
    90deg,
    rgba(11, 12, 13, 0.62) 0%,
    rgba(11, 12, 13, 0.40) 35%,
    rgba(11, 12, 13, 0.15) 70%,
    rgba(11, 12, 13, 0.00) 100%
  );
}

/* --- Overlay: pull the following section's H1 up into the hero band ---- */

/* Following section becomes a positioning context above the image scrim */
.hero-image + .hero,
.hero-image + .section {
  position: relative;
  z-index: 2;
  /* Pull upward so the eyebrow + H1 land inside the image band */
  margin-top: calc(var(--hero-h1-overlay-lift) * -1);
  padding-top: 0;
}

/* On the compact hero pages the negative pull is smaller (authority tier only) */
.hero-image--authority + .hero,
.hero-image--authority + .section {
  margin-top: calc(var(--hero-h1-overlay-lift-authority) * -1);
}

/* The section retains its border-top rule, which we don't want cutting across
   the overlaid title. Suppress it when it follows a hero image. */
.hero-image + .section {
  border-top: none;
}

/* Overlaid H1 + eyebrow read as ivory over the sculptural image.
   Colour is already ivory (--text-primary) site-wide, but we lock it and
   add a whisper-thin shadow for extra contrast on lighter image regions. */
.hero-image + .hero .hero-inner,
.hero-image + .section > .container {
  color: var(--text-primary);
}
.hero-image + .hero .hero-inner > .eyebrow,
.hero-image + .section > .container > .eyebrow,
.hero-image + .hero .hero-inner > h1,
.hero-image + .section > .container > h1 {
  text-shadow: 0 1px 2px rgba(11, 12, 13, 0.55);
}

/* The lede, CTAs, attribution should sit BELOW the image on solid charcoal.
   Give them a soft top margin so they clear the image band. The H1 is
   pushed into the image by the section's negative margin-top; everything
   after the H1 naturally flows down onto the charcoal ground below. */
.hero-image + .hero .hero-inner > p.lede,
.hero-image + .hero .hero-inner > .hero-ctas,
.hero-image + .hero .hero-inner > .hero-attribution,
.hero-image + .hero .hero-inner > .hero-lede,
.hero-image + .section > .container > p.lede,
.hero-image + .section > .container > .hero-lede {
  margin-top: 1.75rem;
}

/* First lede after H1 gets a slightly larger gap for editorial breathing room */
.hero-image + .hero .hero-inner > h1 + p.lede,
.hero-image + .hero .hero-inner > h1 + .hero-lede,
.hero-image + .section > .container > h1 + p.lede,
.hero-image + .section > .container > h1 + .hero-lede {
  margin-top: 2.25rem;
}

/* --- Responsive: mobile drops height + eases the overlap ---------------- */
@media (max-width: 720px) {
  :root {
    --hero-height-primary: 44vh;
    --hero-height-authority: 32vh;
    --hero-h1-overlay-lift: clamp(4rem, 22vw, 7rem);
    --hero-h1-overlay-lift-authority: clamp(3rem, 16vw, 5rem);
  }
  .hero-image { min-height: 16rem; }
  .hero-image--authority { min-height: 12rem; }

  /* On narrow screens the scrim covers more of the width for legibility */
  .hero-image::after {
    background: linear-gradient(
      180deg,
      rgba(11, 12, 13, 0.40) 0%,
      rgba(11, 12, 13, 0.65) 55%,
      rgba(11, 12, 13, 0.85) 100%
    );
  }
  .hero-image--authority::after {
    background: linear-gradient(
      180deg,
      rgba(11, 12, 13, 0.30) 0%,
      rgba(11, 12, 13, 0.50) 55%,
      rgba(11, 12, 13, 0.72) 100%
    );
  }
}

/* Respect user motion preference */
@media (prefers-reduced-motion: reduce) {
  .hero-image img { transition: none; }
}

/* Print — hide heavy hero imagery, reset the section pull-up */
@media print {
  .hero-image { display: none; }
  .hero-image + .hero,
  .hero-image + .section {
    margin-top: 0;
  }
}

/* Field Notes list ------------------------------------------------------ */
/*
 * Numbered ordered list of draft notes. Each item has a meta row
 * (status pill + date), a serif italic title, and a summary paragraph.
 * Native <ol> numbering is preserved but sits in a dedicated gutter
 * so it never collides with the meta or title.
 */

.notes-list {
  list-style: none;   /* we render our own numbering in a gutter */
  counter-reset: notes-counter;
  padding: 0;
  margin: 2.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 3rem;          /* generous breathing room between notes */
}

.notes-item {
  counter-increment: notes-counter;
  position: relative;
  padding-left: 3.25rem;   /* room for the counter in a left gutter */
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--rule);
}

.notes-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.notes-item::before {
  content: counter(notes-counter, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.15rem;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--accent-primary);
}

.notes-meta {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;             /* explicit separation between status + date */
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.notes-status {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border: 1px solid var(--rule);
  border-radius: 0;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
}

.notes-status-draft {
  border-color: rgba(181, 154, 98, 0.4);
  color: var(--accent-primary);
}

.notes-status-in-review {
  border-color: rgba(238, 233, 223, 0.28);
  color: var(--text-primary);
}

.notes-status-published {
  border-color: rgba(129, 146, 124, 0.5);
  color: var(--success);
}

.notes-date {
  color: var(--text-muted);
}

/* The date is preceded visually by a separator "·" for extra clarity */
.notes-date::before {
  content: "·";
  margin-right: 0.9rem;
  color: var(--text-muted);
  opacity: 0.65;
}

.notes-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  line-height: 1.28;
  color: var(--text-primary);
  margin: 0 0 1rem;
  max-width: 40ch;
}

.notes-summary {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
  max-width: var(--measure-prose);
}

/* Mobile ------- */
@media (max-width: 720px) {
  .notes-list { gap: 2.25rem; }
  .notes-item {
    padding-left: 2.5rem;
    padding-bottom: 2.25rem;
  }
  .notes-item::before {
    font-size: 0.65rem;
  }
  .notes-meta {
    flex-wrap: wrap;
    gap: 0.7rem;
    font-size: 0.65rem;
  }
  .notes-date::before {
    margin-right: 0.7rem;
  }
  .notes-title {
    font-size: 1.2rem;
    line-height: 1.3;
  }
  .notes-summary {
    font-size: 0.95rem;
    line-height: 1.65;
  }
}

/* Section variants ----------------------------------------------------- */
/* .section-alt: subtle contrast band, used to visually anchor the Notes list */
.section-alt {
  background: var(--background-secondary);
}

/* Research Context — text spacing fixes ------------------------------- */
/* Diagnosed 2026-07-20: hero-lede without image, prose h2+p tight,
   .adjacency and .adjacency-dl had zero rules — six-field grid read as
   one wall of text. Rules #2, #3 are site-wide improvements; #4-10 are
   namespaced to .adjacency* (research-context only). */

/* #1 Standalone hero lede (no hero image above it) */
.hero-compact .hero-lede {
  margin-top: 1.5rem;
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: var(--measure-prose);
}

/* #2, #3 Prose paragraph rhythm — site-wide */
.prose h2 + p,
.prose h2 + .lede,
.prose h3 + p {
  margin-top: 1.5rem;
}
.prose p + p {
  margin-top: 1.25rem;
}
.prose h2 + ul,
.prose h2 + ol,
.prose p + ul,
.prose p + ol {
  margin-top: 1.25rem;
}
.prose ul + p,
.prose ol + p {
  margin-top: 1.25rem;
}
.prose li + li {
  margin-top: 0.55rem;
}

/* #4-10 Adjacency grid — research-context only */
.adjacency {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--rule);
}
.adjacency:first-of-type {
  margin-top: 2.5rem;
}
.adjacency h3 {
  margin: 0 0 1.25rem 0;
  color: var(--accent-primary);
  font-weight: 500;
}
.adjacency-dl {
  margin: 0;
}
.adjacency-dl dt {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}
.adjacency-dl dd {
  margin: 0.4rem 0 0 0;
  color: var(--text-primary);
  line-height: 1.7;
}
.adjacency-dl dd + dt {
  margin-top: 1.3rem;
}
