/* ==========================================================================
   Open Education Project — openeducationproject.org
   Design system & site styles
   Palette: deep forest · warm paper · aged gold
   ========================================================================== */

/* ---------- Fonts (self-hosted) ---------- */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/fraunces-v38-latin-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/fraunces-v38-latin-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/source-serif-4-v14-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/source-serif-4-v14-latin-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/source-serif-4-v14-latin-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter-v20-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/inter-v20-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/inter-v20-latin-600.woff2') format('woff2');
}

/* ---------- Tokens ---------- */
:root {
  /* dark surfaces */
  --forest: #10312A;        /* headings, dark base */
  --forest-deep: #0B231E;
  --forest-deeper: #071813;

  /* interactive / brand */
  --green: #1A5C4A;         /* links, primary buttons */
  --green-hover: #14493B;
  --sage: #7FA890;          /* soft accent on dark */

  /* gold accents */
  --gold: #97742F;          /* small-caps accents on light */
  --gold-strong: #B08D46;   /* borders, tags */
  --gold-soft: #D9BF80;     /* accent text on dark */
  --gold-bright: #D4B36A;   /* highlights on dark */

  /* text & neutrals */
  --ink: #201F1B;
  --body-soft: #4A4A42;
  --grey: #6F6A5E;
  --grey-light: #9FAAA0;

  /* surfaces */
  --paper: #FBF9F3;
  --light: #F3EFE5;
  --pale: #EEF2EC;
  --card: #FFFFFF;
  --rule: #DED7C6;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Serif 4', Georgia, serif;
  --font-ui: 'Inter', -apple-system, 'Segoe UI', system-ui, sans-serif;

  --max-w: 1160px;
  --max-w-prose: 46rem;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(16, 49, 42, 0.08);
  --shadow-md: 0 6px 24px rgba(16, 49, 42, 0.10);
  --shadow-lg: 0 18px 50px rgba(7, 24, 19, 0.20);
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--forest);
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.5rem); }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1.2em; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--green);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--forest); }

strong { font-weight: 600; }

ul, ol { padding-left: 1.3em; margin: 0 0 1.2em; }
li { margin-bottom: 0.45em; }

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

::selection { background: rgba(176, 141, 70, 0.25); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--forest);
  color: #fff;
  padding: 0.7rem 1.2rem;
  font-family: var(--font-ui);
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Layout helpers ---------- */
.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}
.container--narrow { max-width: calc(var(--max-w-prose) + 5rem); }

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--light { background: var(--light); }
.section--pale { background: var(--pale); }
.section--dark {
  background:
    radial-gradient(1100px 480px at 88% -12%, rgba(212, 179, 106, 0.10), transparent 60%),
    linear-gradient(168deg, var(--forest) 0%, var(--forest-deep) 65%, var(--forest-deeper) 100%);
  color: #EAE8DD;
}
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: #FCFAF3; }
.section--dark a { color: var(--gold-soft); }
.section--dark a:hover { color: #fff; }

.prose { max-width: var(--max-w-prose); }
.center { text-align: center; }
.center .prose, .prose--center { margin-inline: auto; }

.eyebrow {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.1rem;
}
.section--dark .eyebrow { color: var(--gold-soft); }

.lede {
  font-size: clamp(1.15rem, 2vw, 1.3rem);
  line-height: 1.65;
  color: var(--body-soft);
}
.section--dark .lede { color: #CCD3C8; }

hr.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: clamp(2rem, 5vw, 3.5rem) 0;
}

/* ---------- Header / navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 249, 243, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--rule); }

.site-header--dark {
  background: rgba(11, 35, 30, 0.72);
}
.site-header--dark.is-scrolled { border-bottom-color: rgba(217, 191, 128, 0.18); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--forest);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.site-header--dark .brand { color: #FCFAF3; }
.brand svg { flex: none; }
.brand-sub {
  display: block;
  font-weight: 400;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.site-header--dark .brand-sub { color: var(--gold-soft); }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(0.4rem, 1.4vw, 1.1rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
}
.nav-links a:hover { color: var(--green); background: var(--pale); }
.nav-links a[aria-current="page"] { color: var(--green); font-weight: 600; }
.site-header--dark .nav-links a { color: #E4E2D4; }
.site-header--dark .nav-links a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.site-header--dark .nav-links a[aria-current="page"] { color: var(--gold-soft); }

.nav-cta {
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff !important;
  background: var(--green);
  padding: 0.55rem 1.1rem !important;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}
.nav-cta:hover { background: var(--forest) !important; color: #fff !important; transform: translateY(-1px); }
.site-header--dark .nav-cta { background: var(--gold-bright); color: var(--forest-deeper) !important; }
.site-header--dark .nav-cta:hover { background: #fff !important; color: var(--forest) !important; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--forest);
}
.site-header--dark .nav-toggle { color: #FCFAF3; }
.nav-toggle svg { display: block; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 0.8rem clamp(1.25rem, 4vw, 2.5rem) 1.2rem;
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 0.7rem 0.6rem; font-size: 1rem; }
  .nav-cta { text-align: center; margin-top: 0.5rem; }
  .site-header--dark .nav-links { background: var(--forest-deep); border-bottom-color: rgba(217, 191, 128, 0.18); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.9rem 1.7rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--green); color: #fff; box-shadow: 0 4px 14px rgba(26, 92, 74, 0.28); }
.btn--primary:hover { background: var(--forest); color: #fff; box-shadow: 0 8px 22px rgba(16, 49, 42, 0.32); }

.btn--gold { background: var(--gold-bright); color: var(--forest-deeper); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25); }
.btn--gold:hover { background: #E5CE95; color: var(--forest-deeper); }

.btn--light { background: #fff; color: var(--forest); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); }
.btn--light:hover { background: var(--gold-soft); color: var(--forest-deeper); }

.btn--outline { border-color: var(--rule); color: var(--forest); background: transparent; }
.btn--outline:hover { border-color: var(--gold-strong); color: var(--gold); }

.btn--outline-light { border-color: rgba(252, 250, 243, 0.4); color: #FCFAF3; background: transparent; }
.btn--outline-light:hover { border-color: var(--gold-soft); color: var(--gold-soft); background: rgba(255, 255, 255, 0.06); }

.btn--sm { padding: 0.6rem 1.2rem; font-size: 0.88rem; }

/* buttons keep their own text colour inside dark sections */
.section--dark .btn--primary { color: #fff; }
.section--dark .btn--gold { color: var(--forest-deeper); }
.section--dark .btn--light { color: var(--forest); }
.section--dark .btn--outline-light { color: #FCFAF3; }
.section--dark .btn--outline-light:hover { color: var(--gold-soft); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(5rem, 12vw, 9.5rem) clamp(4rem, 9vw, 7rem);
}
.hero .container { position: relative; z-index: 2; }
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
  border: 1px solid rgba(217, 191, 128, 0.35);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  margin-bottom: 2rem;
}
.hero-kicker::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold-bright);
}
.hero h1 {
  max-width: 16ch;
  margin-bottom: 0.5em;
  font-weight: 700;
  font-size: clamp(2.7rem, 6.5vw, 4.8rem);
}
.hero h1 em {
  font-style: normal;
  color: var(--gold-bright);
  position: relative;
  white-space: nowrap;
}
.hero h1 em::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0.06em;
  height: 0.09em;
  background: var(--gold-strong);
  border-radius: 2px;
  opacity: 0.7;
}
.hero .lede { max-width: 38rem; margin-bottom: 2.4rem; }
.hero-meta {
  margin-top: 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2rem;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--grey-light);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 0.5rem; }
.hero-meta svg { color: var(--gold-bright); flex: none; }

/* library wall hero art */
.hero-library {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 46%;
  z-index: 1;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 46%);
  mask-image: linear-gradient(to right, transparent 0%, black 46%);
}
.hero-library svg { width: 100%; height: 100%; display: block; }
.hero-library .book {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transform-box: fill-box;
  pointer-events: auto;
}
.hero-library .book.is-in { opacity: 1; transform: none; }
.hero-library .shelf { will-change: transform; }
/* once the entrance is done, books respond to hover: a gentle pull off the shelf */
.hero-library.is-settled .book {
  transition: transform 0.3s cubic-bezier(0.34, 1.45, 0.64, 1), fill-opacity 0.3s ease;
}
.hero-library.is-settled .book:hover {
  transform: translateY(-14px);
  fill-opacity: 0.95;
}
@media (pointer: coarse) {
  .hero-library .book { pointer-events: none; }
}
@media (max-width: 1100px) {
  .hero-library { width: 54%; opacity: 0.6; }
}
@media (max-width: 900px) {
  .hero-library {
    width: 100%;
    opacity: 0.16;
    -webkit-mask-image: linear-gradient(to top, black 55%, transparent 100%);
    mask-image: linear-gradient(to top, black 55%, transparent 100%);
  }
}

/* ---------- Stat tiles ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.1rem;
}
.stat-tile {
  background: var(--card);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--gold-strong);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem 1.4rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.stat-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.stat-value {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.1rem, 3.6vw, 2.9rem);
  line-height: 1;
  color: var(--forest);
  margin-bottom: 0.55rem;
  font-variant-numeric: tabular-nums;
}
.stat-text {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--ink);
  margin: 0 0 0.7rem;
}
.stat-source {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--grey);
}
.section--dark .stat-tile {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  border-top-color: var(--gold-bright);
}
.section--dark .stat-value { color: #FCFAF3; }
.section--dark .stat-text { color: #D8DCCE; }
.section--dark .stat-source { color: var(--grey-light); }

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
}
.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 2rem 1.8rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--gold-strong); }
.card h3 { margin-bottom: 0.5em; font-size: 1.35rem; }
.card p { font-size: 0.98rem; color: var(--body-soft); }
.card-icon {
  width: 3rem; height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--pale);
  color: var(--green);
  margin-bottom: 1.2rem;
}
.card-link {
  margin-top: auto;
  padding-top: 1rem;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
}
.card-link::after { content: ' →'; }

/* learner cards */
.learner-card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 2.2rem 1.9rem;
  background: linear-gradient(160deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
  border: 1px solid rgba(217, 191, 128, 0.2);
}
.learner-card h3 { font-size: 1.3rem; color: #FCFAF3; }
.learner-card p { color: #CCD3C8; font-size: 0.98rem; }
.learner-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--gold-soft);
  display: inline-block;
  border: 1px solid rgba(217, 191, 128, 0.4);
  border-radius: 999px;
  padding: 0.15rem 0.75rem;
  margin-bottom: 1.1rem;
}

/* ---------- Callouts, quotes ---------- */
.callout {
  background: var(--pale);
  border-left: 4px solid var(--green);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.5rem 1.8rem;
  margin: 2rem 0;
}
.callout--rule {
  background: #F8F3E7;
  border-left-color: var(--gold-strong);
}
.callout p { margin-bottom: 0.6em; }
.callout .eyebrow { margin-bottom: 0.6rem; }
.callout--rule .eyebrow { color: var(--gold); }

.pull-quote {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 3.2vw, 2.2rem);
  line-height: 1.35;
  color: var(--forest);
  max-width: 26ch;
  margin-inline: auto;
  text-align: center;
}
.pull-quote em { font-style: normal; color: var(--gold); }
.section--dark .pull-quote { color: #FCFAF3; }
.section--dark .pull-quote em { color: var(--gold-soft); }
.pull-quote-attrib {
  display: block;
  margin-top: 1.4rem;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
  text-align: center;
}
.section--dark .pull-quote-attrib { color: var(--grey-light); }

/* ---------- Numbered editorial list ---------- */
.num-list { counter-reset: numlist; list-style: none; padding: 0; margin: 0; }
.num-list > li {
  counter-increment: numlist;
  position: relative;
  padding: 1.8rem 0 1.8rem 4.4rem;
  border-top: 1px solid var(--rule);
  margin: 0;
}
.num-list > li:last-child { border-bottom: 1px solid var(--rule); }
.num-list > li::before {
  content: counter(numlist, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--gold-strong);
  opacity: 0.9;
}
.num-list h3 { margin-bottom: 0.4em; font-size: 1.3rem; }
.num-list p { color: var(--body-soft); font-size: 1rem; }

/* ---------- Principles grid ---------- */
.principle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.1rem;
}
.principle {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.35rem;
}
.principle h4 {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 1rem;
  color: var(--forest);
  margin-bottom: 0.45em;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}
.principle h4 .p-num {
  font-family: var(--font-display);
  color: var(--gold-strong);
  font-size: 0.9rem;
  flex: none;
}
.principle p { font-size: 0.93rem; color: var(--body-soft); margin: 0; }

/* ---------- System layers ---------- */
.layer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.7rem; }
.layer-item {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1.2rem;
  align-items: start;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 0;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.layer-item:hover { border-color: var(--gold-strong); transform: translateX(4px); }
.layer-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--rule);
  line-height: 1.2;
}
.layer-item:hover .layer-num { color: var(--gold-strong); }
.layer-item h4 { font-family: var(--font-ui); font-size: 1.02rem; margin-bottom: 0.25em; }
.layer-item p { font-size: 0.93rem; color: var(--body-soft); margin: 0; }

/* ---------- Pipeline (governance) ---------- */
.pipeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  counter-reset: pipe;
  list-style: none;
  padding: 0;
  margin: 0;
}
.pipeline-step { margin: 0; }
.pipeline-step {
  counter-increment: pipe;
  position: relative;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.3rem 1.1rem 1.15rem;
  text-align: center;
}
.pipeline-step::before {
  content: counter(pipe);
  display: inline-grid;
  place-items: center;
  width: 2rem; height: 2rem;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}
.pipeline-step::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -0.55rem;
  width: 0.6rem;
  height: 2px;
  background: var(--rule);
}
.pipeline-step:last-child::after { display: none; }
.pipeline-step h4 { font-family: var(--font-ui); font-size: 0.92rem; margin-bottom: 0.3em; }
.pipeline-step p { font-size: 0.8rem; font-family: var(--font-ui); color: var(--grey); margin: 0; line-height: 1.45; }
@media (max-width: 900px) {
  .pipeline { grid-template-columns: 1fr; }
  .pipeline-step { text-align: left; display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1rem; align-items: center; }
  .pipeline-step::before { margin: 0; grid-row: span 2; }
  .pipeline-step::after { top: auto; bottom: -0.55rem; right: auto; left: 2.3rem; width: 2px; height: 0.6rem; }
}

/* ---------- Two-layer engine diagram ---------- */
.engine {
  display: grid;
  gap: 0;
  max-width: 780px;
  margin-inline: auto;
}
.engine-layer {
  border-radius: var(--radius-lg);
  padding: 1.8rem 2rem;
  position: relative;
}
.engine-layer--living {
  background: var(--paper);
  border: 1.5px dashed var(--gold-strong);
}
.section--dark .engine-layer--living h4 { color: var(--forest); }
.engine-layer--stable {
  background: var(--forest-deeper);
  border: 1px solid rgba(217, 191, 128, 0.3);
  color: #EAE8DD;
}
.engine-layer--stable h4 { color: #FCFAF3; }
.engine-layer h4 { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-ui); font-size: 1.05rem; }
.engine-layer p { font-size: 0.95rem; margin: 0; }
.engine-layer--living p { color: var(--body-soft); }
.engine-layer--stable p { color: #CCD3C8; }
.engine-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 0.9rem 0;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.engine-flow svg { color: var(--gold-soft); }
.engine-tag {
  position: absolute;
  top: -0.8rem;
  left: 1.5rem;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--green);
  color: #fff;
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
}
.engine-layer--stable .engine-tag { background: var(--gold-bright); color: var(--forest-deeper); }

/* ---------- Evidence ladder ---------- */
.ladder { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.55rem; }
.ladder li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: baseline;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 1.05rem 1.3rem;
  margin: 0;
  font-size: 0.97rem;
}
.ladder li:nth-child(1) { margin-inline-end: clamp(0rem, 16vw, 12rem); }
.ladder li:nth-child(2) { margin-inline-end: clamp(0rem, 12vw, 9rem); }
.ladder li:nth-child(3) { margin-inline-end: clamp(0rem, 8vw, 6rem); }
.ladder li:nth-child(4) { margin-inline-end: clamp(0rem, 4vw, 3rem); }
.ladder .ladder-step {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-soft);
  white-space: nowrap;
}
.ladder p { margin: 0; color: #D8DCCE; }

/* light variant */
.ladder--light li { background: var(--card); border-color: var(--rule); }
.ladder--light .ladder-step { color: var(--gold); }
.ladder--light p { color: var(--body-soft); }

/* ---------- Domains strip ---------- */
.domain-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.7rem;
}
.domain {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 1.2rem 1rem;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 500;
  color: #EAE8DD;
}
.domain svg { display: block; margin: 0 auto 0.7rem; color: var(--gold-soft); }

.domain--light {
  background: var(--card);
  border-color: var(--rule);
  color: var(--forest);
}
.domain--light svg { color: var(--green); }

/* ---------- Invitation band ---------- */
.invite-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.8rem; }
.invite-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.4rem;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(217, 191, 128, 0.18);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.8rem;
  margin: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.invite-item:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(217, 191, 128, 0.5); }
.invite-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--gold-soft);
}
.invite-item h3 { font-size: 1.15rem; margin-bottom: 0.2em; color: #FCFAF3; }
.invite-item p { font-size: 0.92rem; color: #C2CBBD; margin: 0; }
@media (max-width: 700px) {
  .invite-item { grid-template-columns: auto 1fr; }
  .invite-item .btn { grid-column: 2; justify-self: start; }
}

/* ---------- Forms ---------- */
.form-block {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 3.5vw, 2.5rem);
  box-shadow: var(--shadow-sm);
}
.form-grid { display: grid; gap: 1.1rem; }
@media (min-width: 640px) {
  .form-grid--2col { grid-template-columns: 1fr 1fr; }
  .form-grid--2col .form-field--full { grid-column: 1 / -1; }
}
.form-field label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--forest);
  margin-bottom: 0.4rem;
}
.form-field .hint {
  display: block;
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--grey);
  margin-top: 0.2rem;
}
.form-field input[type="text"],
.form-field input[type="email"],
.form-field select,
.form-field textarea {
  width: 100%;
  font-family: var(--font-ui);
  font-size: 0.98rem;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--rule);
  border-radius: 8px;
  padding: 0.75rem 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(26, 92, 74, 0.14);
}
.form-consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: start;
  font-family: var(--font-ui);
  font-size: 0.83rem;
  color: var(--grey);
  line-height: 1.55;
}
.form-consent input { margin-top: 0.25rem; width: 1.05rem; height: 1.05rem; accent-color: var(--green); }
.form-status {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  margin-top: 0.4rem;
}
.form-status--ok { background: var(--pale); color: var(--green); border: 1px solid rgba(26, 92, 74, 0.3); }
.form-status--err { background: #FBF0EF; color: #9C3328; border: 1px solid #E5C4C0; }
.form-status[hidden] { display: none; }

/* ---------- Audience blocks (get involved) ---------- */
.audience {
  scroll-margin-top: 6rem;
  padding-block: clamp(2.6rem, 6vw, 4.2rem);
  border-top: 1px solid var(--rule);
}
.audience:first-of-type { border-top: 0; }
.audience-grid {
  display: grid;
  gap: clamp(1.6rem, 4vw, 3.5rem);
}
@media (min-width: 920px) {
  .audience-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; }
}
.audience-tag {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  background: #F5EEDD;
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  margin-bottom: 1rem;
}

/* ---------- Whitepaper artefact ---------- */
.wp-hero {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 880px) { .wp-hero { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); } }
.wp-cover {
  background: linear-gradient(160deg, #FFFEFA, var(--light));
  border: 1px solid var(--rule);
  border-radius: 6px;
  aspect-ratio: 1 / 1.35;
  max-width: 380px;
  margin-inline: auto;
  padding: 2.4rem 2.2rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.wp-cover::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 6px;
  background: linear-gradient(var(--gold-strong), var(--forest));
}
.wp-cover .wp-brand {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: auto;
}
.wp-cover h3 {
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}
.wp-cover .wp-sub {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--grey);
  margin-bottom: 2rem;
}
.wp-cover .wp-foot {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: var(--grey);
  border-top: 1px solid var(--rule);
  padding-top: 0.9rem;
}
.wp-toc { columns: 2; gap: 2.2rem; font-size: 0.95rem; }
.wp-toc li { break-inside: avoid; color: var(--body-soft); }
@media (max-width: 640px) { .wp-toc { columns: 1; } }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--forest-deeper);
  color: #B7BFB2;
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  line-height: 1.65;
}
.footer-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 2.8rem;
}
.site-footer h4 {
  color: var(--gold-soft);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.9em;
}
.site-footer a { color: #D3D9CC; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.5em; }
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #FCFAF3;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 1rem;
}
.footer-note {
  border-top: 1px solid rgba(217, 191, 128, 0.15);
  padding-top: 1.6rem;
  font-size: 0.78rem;
  color: #8D998C;
  display: grid;
  gap: 0.8rem;
}
.footer-note p { margin: 0; }

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.reveal-d4 { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-library .book { opacity: 1; transform: none; transition: none; }
  .btn, .card, .stat-tile, .layer-item { transition: none; }
  *, *::before, *::after { animation-duration: 0.001s !important; }
}

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.small {
  font-family: var(--font-ui);
  font-size: 0.83rem;
  color: var(--grey);
}
.section--dark .small { color: var(--grey-light); }
.two-col {
  display: grid;
  gap: clamp(1.8rem, 4.5vw, 4rem);
}
@media (min-width: 880px) {
  .two-col { grid-template-columns: 1fr 1fr; align-items: start; }
}
.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 5vw, 3.2rem); }
.section-head--center { margin-inline: auto; text-align: center; }
