/* ==========================================================================
   Chevening Alumni — design system
   Plain CSS, no build step. Tokens first, then base, then components.
   Fonts are system stacks on purpose: no third-party font request means no
   third-party sees a visitor's IP, which matters for a site whose pitch is
   "your data stays private".
   ========================================================================== */

/* --- Tokens: light -------------------------------------------------------- */
:root {
  /* Brand */
  --ink:            #0b1f3a;
  --ink-deep:       #061224;
  --ink-soft:       #17324f;
  --brass:          #b8912f;
  --brass-bright:   #d9ae43;
  --brass-wash:     #f6ecd2;

  /* Surfaces */
  --paper:          #fbfaf7;
  --surface:        #ffffff;
  --surface-alt:    #f4f2ec;
  --surface-sunken: #eeebe3;
  --border:         #e5e1d8;
  --border-strong:  #d3cec1;

  /* Text */
  --text:           #14202e;
  --text-muted:     #57657a;
  --text-faint:     #8b95a3;
  --on-dark:        #f2f5fa;
  --on-dark-muted:  #a9b8cd;

  /* Feedback */
  --ok:             #1c6b39;
  --ok-bg:          #e5f3e9;
  --warn:           #8a6300;
  --warn-bg:        #fdf3da;
  --bad:            #9c2a2a;
  --bad-bg:         #fbe8e8;

  /* Shape */
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  16px;
  --r-xl:  24px;
  --r-pill: 999px;

  /* Elevation — soft and cool, never grey mush */
  --shadow-sm: 0 1px 2px rgba(11, 31, 58, .06), 0 1px 3px rgba(11, 31, 58, .04);
  --shadow-md: 0 2px 4px rgba(11, 31, 58, .05), 0 8px 20px -6px rgba(11, 31, 58, .10);
  --shadow-lg: 0 4px 8px rgba(11, 31, 58, .05), 0 24px 48px -12px rgba(11, 31, 58, .18);

  /* Type */
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, ui-serif, serif;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --step--1: clamp(.82rem, .8rem + .1vw, .875rem);
  --step-0:  clamp(1rem, .97rem + .15vw, 1.06rem);
  --step-1:  clamp(1.15rem, 1.1rem + .3vw, 1.3rem);
  --step-2:  clamp(1.4rem, 1.3rem + .6vw, 1.75rem);
  --step-3:  clamp(1.75rem, 1.5rem + 1.2vw, 2.4rem);
  --step-4:  clamp(2.1rem, 1.6rem + 2.4vw, 3.4rem);

  /* Layout */
  --container: 1140px;
  --container-narrow: 760px;
  --gutter: clamp(1.25rem, 4vw, 2.25rem);
  --section-y: clamp(3.5rem, 8vw, 6.5rem);

  /* Legacy aliases — admin.css and older markup still reference these */
  --color-bg: var(--paper);
  --color-text: var(--text);
  --color-muted: var(--text-muted);
  --color-navy: var(--ink);
  --color-navy-dark: var(--ink-deep);
  --color-gold: var(--brass);
  --color-border: var(--border);
  --color-surface: var(--surface-alt);
  --radius: var(--r-md);
  --max-width: var(--container);
  --font: var(--font-sans);

  color-scheme: light;
}

/* --- Tokens: dark --------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink:            #0a1526;
    --ink-deep:       #060e1b;
    --ink-soft:       #12233c;
    --brass:          #d9ae43;
    --brass-bright:   #efc75e;
    --brass-wash:     #2a2313;

    --paper:          #0a1220;
    --surface:        #101b2c;
    --surface-alt:    #142235;
    --surface-sunken: #0c1524;
    --border:         #223349;
    --border-strong:  #31465f;

    --text:           #e9eef6;
    --text-muted:     #9dadc2;
    --text-faint:     #74849a;
    --on-dark:        #f2f5fa;
    --on-dark-muted:  #a9b8cd;

    --ok:             #6ee7a0;
    --ok-bg:          #10301f;
    --warn:           #f0c45a;
    --warn-bg:        #33280d;
    --bad:            #f9a8a8;
    --bad-bg:         #3a1618;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, .3), 0 8px 20px -6px rgba(0, 0, 0, .5);
    --shadow-lg: 0 4px 8px rgba(0, 0, 0, .3), 0 24px 48px -12px rgba(0, 0, 0, .6);

    color-scheme: dark;
  }
}

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

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

/* The header is sticky, so anchored targets must clear it rather than hide
   underneath it. */
[id] { scroll-margin-top: 6rem; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 .6em;
  text-wrap: balance;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) h1,
  :root:not([data-theme="light"]) h2,
  :root:not([data-theme="light"]) h3,
  :root:not([data-theme="light"]) h4 { color: var(--text); }
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
h4 { font-size: var(--step-0); font-family: var(--font-sans); font-weight: 650; letter-spacing: 0; }

p { margin: 0 0 1.1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--ink-soft);
  text-decoration-color: color-mix(in srgb, var(--brass) 60%, transparent);
  text-underline-offset: .18em;
  text-decoration-thickness: from-font;
  transition: color .15s ease;
}
a:hover { color: var(--brass); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) a { color: #a8c6e8; }
}

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

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

::selection {
  background: color-mix(in srgb, var(--brass) 35%, transparent);
  color: var(--text);
}

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

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

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

.section { padding-block: var(--section-y); }
.section-sm { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section-alt { background: var(--surface-alt); }
.section-line { border-top: 1px solid var(--border); }

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -110%);
  z-index: 100;
  background: var(--ink);
  color: var(--on-dark);
  padding: .6rem 1.2rem;
  border-radius: 0 0 var(--r-md) var(--r-md);
  font-size: var(--step--1);
  font-weight: 600;
  text-decoration: none;
  transition: transform .18s ease;
}
.skip-link:focus { transform: translate(-50%, 0); color: var(--on-dark); }

/* --- Eyebrow / section headings ------------------------------------------ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-sans);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 1rem;
}
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: currentColor;
  opacity: .7;
}
.eyebrow-center { justify-content: center; }

.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head p {
  font-size: var(--step-1);
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

.lead {
  font-size: var(--step-1);
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 68ch;
}

/* --- Buttons ------------------------------------------------------------- */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--on-dark);
  --btn-bd: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .8rem 1.5rem;
  border: 1px solid var(--btn-bd);
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-sans);
  font-size: var(--step--1);
  font-weight: 650;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, color .16s ease;
  white-space: nowrap;
}
.btn:hover {
  color: var(--btn-fg);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn:active { transform: translateY(0); box-shadow: var(--shadow-sm); }
.btn[disabled], .btn[aria-disabled="true"] {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary {
  --btn-bg: var(--brass);
  --btn-fg: #22190a;
  --btn-bd: color-mix(in srgb, var(--brass) 80%, #000);
}
.btn-primary:hover { --btn-bg: var(--brass-bright); }

.btn-secondary {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-bd: var(--border-strong);
}
.btn-secondary:hover { --btn-bg: var(--surface); }

.btn-on-dark {
  --btn-bg: rgba(255, 255, 255, .07);
  --btn-fg: var(--on-dark);
  --btn-bd: rgba(255, 255, 255, .28);
}
.btn-on-dark:hover { --btn-bg: rgba(255, 255, 255, .14); }

.btn-lg { padding: .95rem 1.9rem; font-size: var(--step-0); }
.btn-block { width: 100%; }

.btn .icon { width: 1.05em; height: 1.05em; flex: none; }
.btn-arrow .icon { transition: transform .18s ease; }
.btn-arrow:hover .icon { transform: translateX(3px); }

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  align-items: center;
}
.btn-group.center { justify-content: center; }

/* Loading spinner state for the join form */
.btn.is-loading { position: relative; color: transparent !important; }
.btn.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1.1em;
  height: 1.1em;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  color: var(--btn-fg);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Header -------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 85%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
@supports (backdrop-filter: blur(1px)) {
  .site-header { backdrop-filter: blur(14px) saturate(1.4); }
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  flex: none;
}
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 2.1rem;
  height: 2.1rem;
  flex: none;
  color: var(--brass);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text small {
  font-family: var(--font-sans);
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-faint);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand,
  :root:not([data-theme="light"]) .brand:hover { color: var(--text); }
}

.site-nav { display: flex; align-items: center; gap: .35rem; }
.site-nav a:not(.btn) {
  padding: .5rem .85rem;
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-size: var(--step--1);
  font-weight: 550;
  text-decoration: none;
  transition: color .15s ease, background .15s ease;
}
.site-nav a:not(.btn):hover { color: var(--ink); background: var(--surface-alt); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 650; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site-nav a:not(.btn):hover,
  :root:not([data-theme="light"]) .site-nav a[aria-current="page"] { color: var(--text); }
}
.site-nav .btn { margin-left: .5rem; }

.nav-toggle {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle svg { margin: auto; width: 1.15rem; height: 1.15rem; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    inset: 100% 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: .25rem;
    padding: .75rem var(--gutter) 1.25rem;
    background: var(--paper);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .site-nav[hidden] { display: none; }
  .site-nav a:not(.btn) { padding: .7rem .5rem; font-size: var(--step-0); }
  .site-nav .btn { margin: .5rem 0 0; }
}

/* --- Hero ---------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(165deg, var(--ink-soft) 0%, var(--ink) 45%, var(--ink-deep) 100%);
  color: var(--on-dark);
  padding-block: clamp(4rem, 11vw, 8.5rem);
}
.hero h1 { color: var(--on-dark); max-width: 22ch; }
.hero .eyebrow { color: var(--brass-bright); }
.hero-lead {
  font-size: var(--step-1);
  color: var(--on-dark-muted);
  max-width: 54ch;
  margin-bottom: 2.25rem;
}
.hero-inner { position: relative; z-index: 2; max-width: 42rem; }

/* Decorative globe: pure SVG, sits behind the copy, never blocks a click */
.hero-figure {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: -8%;
  transform: translateY(-50%);
  width: min(46rem, 60%);
  color: #ffffff;
  opacity: .13;
  pointer-events: none;
}
@media (max-width: 900px) {
  .hero-figure { right: -30%; width: 34rem; opacity: .08; }
}

/* Faint warm glow top-left so the navy isn't flat */
.hero::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: -30%;
  left: -10%;
  width: 45rem;
  height: 45rem;
  background: radial-gradient(circle, color-mix(in srgb, var(--brass) 30%, transparent) 0%, transparent 62%);
  pointer-events: none;
}

.hero-note {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-top: 2.25rem;
  padding: .6rem 1rem .6rem .8rem;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .05);
  font-size: var(--step--1);
  color: var(--on-dark-muted);
}
.hero-note svg { width: 1.05rem; height: 1.05rem; color: var(--brass-bright); flex: none; }

/* --- Stats --------------------------------------------------------------- */
.stats-band {
  position: relative;
  z-index: 3;
  margin-top: calc(var(--section-y) * -0.5);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.stat-tile {
  background: var(--surface);
  padding: clamp(1.75rem, 3.5vw, 2.5rem) 1.5rem;
  text-align: center;
}
.stat-tile .value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .stat-tile .value { color: var(--brass); }
}
.stat-tile .label {
  display: block;
  margin-top: .6rem;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.stat-tile .sub {
  display: block;
  margin-top: .35rem;
  font-size: .8rem;
  color: var(--text-faint);
}

/* --- Cards --------------------------------------------------------------- */
.grid { display: grid; gap: clamp(1.25rem, 2.5vw, 1.75rem); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr)); }

.card {
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 3vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--text-muted); margin: 0; }

.card-icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1.25rem;
  border-radius: var(--r-md);
  background: var(--brass-wash);
  color: color-mix(in srgb, var(--brass) 85%, #000);
}
.card-icon svg { width: 1.4rem; height: 1.4rem; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .card-icon { color: var(--brass-bright); }
}

/* --- Steps --------------------------------------------------------------- */
.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: clamp(1.25rem, 2.5vw, 1.75rem);
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
  margin: 0;
  padding: 0;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-top: 3.5rem;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--on-dark);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
}
/* connecting rule between steps, desktop only */
.steps li::after {
  content: "";
  position: absolute;
  top: 1.3rem;
  left: 3.2rem;
  right: -1.25rem;
  height: 1px;
  background: linear-gradient(90deg, var(--border-strong), transparent);
}
.steps li:last-child::after { display: none; }
@media (max-width: 700px) { .steps li::after { display: none; } }
.steps h3 { margin-bottom: .4rem; }
.steps p { color: var(--text-muted); margin: 0; font-size: var(--step--1); }

/* --- Split feature (image/text side by side) ------------------------------ */
.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
}

.panel {
  padding: clamp(1.75rem, 4vw, 2.75rem);
  background: var(--ink);
  color: var(--on-dark);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
}
.panel h3 { color: var(--on-dark); }
.panel p { color: var(--on-dark-muted); }

/* Checklist */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.checklist li {
  display: grid;
  grid-template-columns: 1.4rem 1fr;
  gap: .75rem;
  align-items: start;
  font-size: var(--step--1);
  line-height: 1.55;
}
.checklist svg { width: 1.15rem; height: 1.15rem; margin-top: .18rem; color: var(--brass); }
.checklist strong { display: block; font-weight: 650; }
.checklist .panel-muted, .panel .checklist li { color: var(--on-dark-muted); }
.panel .checklist strong { color: var(--on-dark); }

/* --- FAQ (native details/summary) ---------------------------------------- */
.faq { display: grid; gap: .75rem; max-width: 52rem; margin-inline: auto; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.faq details[open] { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.35rem;
  font-family: var(--font-sans);
  font-size: var(--step-0);
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: .6rem;
  height: .6rem;
  border-right: 2px solid var(--text-faint);
  border-bottom: 2px solid var(--text-faint);
  rotate: 45deg;
  transition: rotate .2s ease;
}
.faq details[open] summary::after { rotate: -135deg; }
.faq .faq-body { padding: 0 1.35rem 1.35rem; color: var(--text-muted); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .faq summary { color: var(--text); }
}

/* --- CTA band ------------------------------------------------------------ */
.cta {
  position: relative;
  overflow: hidden;
  background: linear-gradient(140deg, var(--ink-soft), var(--ink-deep));
  color: var(--on-dark);
  text-align: center;
  padding-block: clamp(3.5rem, 8vw, 6rem);
}
.cta h2 { color: var(--on-dark); max-width: 28ch; margin-inline: auto; }
.cta p {
  color: var(--on-dark-muted);
  font-size: var(--step-1);
  max-width: 48ch;
  margin: 0 auto 2rem;
}
.cta::after {
  content: "";
  position: absolute;
  inset: auto -10% -60% -10%;
  height: 30rem;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--brass) 22%, transparent), transparent 65%);
  pointer-events: none;
}
.cta > .container { position: relative; z-index: 1; }

/* --- Prose (privacy notice, long-form) ----------------------------------- */
.prose { max-width: 68ch; }
.prose h2 { font-size: var(--step-2); margin-top: 2.5rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.75rem; }
.prose ul, .prose ol { padding-left: 1.35rem; margin: 0 0 1.1em; }
.prose li { margin-bottom: .5rem; }
.prose > :last-child { margin-bottom: 0; }

.doc-layout {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: 1fr;
}
@media (min-width: 940px) {
  .doc-layout { grid-template-columns: 15rem 1fr; }
  .doc-toc { position: sticky; top: 6.5rem; align-self: start; }
}
.doc-toc h2 {
  font-family: var(--font-sans);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: .9rem;
}
.doc-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.doc-toc a {
  display: block;
  padding: .45rem .7rem;
  border-left: 2px solid var(--border);
  color: var(--text-muted);
  font-size: var(--step--1);
  text-decoration: none;
}
.doc-toc a:hover { border-left-color: var(--brass); color: var(--ink); background: var(--surface-alt); }

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  font-size: var(--step--1);
  color: var(--text-faint);
}

.callout {
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
  background: var(--surface-alt);
  border-left: 3px solid var(--brass);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: var(--step--1);
}
.callout strong { color: var(--ink); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .callout strong { color: var(--text); }
}

/* --- Forms --------------------------------------------------------------- */
.form-layout {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: start;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .form-layout { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .form-aside { position: sticky; top: 6.5rem; }
}

.form-card {
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
}

.fieldset { border: 0; margin: 0 0 2rem; padding: 0; }
.fieldset:last-of-type { margin-bottom: 1.5rem; }
.fieldset legend {
  padding: 0;
  margin-bottom: 1.25rem;
  font-family: var(--font-sans);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.field { margin-bottom: 1.25rem; }
.field:last-child { margin-bottom: 0; }
.field-row {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr));
}

.field label {
  display: block;
  margin-bottom: .4rem;
  font-size: var(--step--1);
  font-weight: 650;
  color: var(--text);
}
.field .opt {
  font-weight: 450;
  color: var(--text-faint);
  text-transform: none;
  letter-spacing: 0;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="number"],
.field select,
.field textarea {
  width: 100%;
  padding: .7rem .9rem;
  font-family: inherit;
  font-size: var(--step-0);
  color: var(--text);
  background: var(--paper);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%2357657a' stroke-width='1.6' stroke-linecap='round' d='M3 4.5 6 7.5 9 4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .8rem center;
  background-size: .8rem;
  padding-right: 2.4rem;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--text-faint); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--brass);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brass) 22%, transparent);
}
.field input::placeholder { color: var(--text-faint); }

.field .hint {
  margin: .45rem 0 0;
  font-size: .82rem;
  color: var(--text-faint);
  line-height: 1.5;
}

/* per-field validation */
.field-error {
  display: none;
  margin: .45rem 0 0;
  font-size: .82rem;
  font-weight: 550;
  color: var(--bad);
}
.field.has-error .field-error { display: flex; gap: .35rem; align-items: center; }
.field.has-error input,
.field.has-error select,
.field.has-error .file-drop {
  border-color: var(--bad);
  background: color-mix(in srgb, var(--bad-bg) 60%, var(--paper));
}
.field.has-error input:focus,
.field.has-error select:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 20%, transparent);
}

/* file upload */
.file-drop {
  position: relative;
  display: grid;
  place-items: center;
  gap: .5rem;
  padding: 1.75rem 1.25rem;
  text-align: center;
  background: var(--paper);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
/* an author display value beats the UA [hidden] rule, so restate it */
.file-drop[hidden] { display: none; }

/* Shown when a capability is temporarily switched off server-side */
.upload-notice {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  margin: 0;
  padding: .95rem 1.1rem;
  background: var(--warn-bg);
  border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent);
  border-radius: var(--r-md);
  font-size: var(--step--1);
  line-height: 1.55;
  color: color-mix(in srgb, var(--warn) 85%, var(--text));
}
.upload-notice[hidden] { display: none; }
.upload-notice svg { width: 1.15rem; height: 1.15rem; flex: none; margin-top: .15rem; color: var(--warn); }
.upload-notice strong { display: block; }
.file-drop:hover, .file-drop.is-dragover {
  border-color: var(--brass);
  background: color-mix(in srgb, var(--brass-wash) 55%, var(--paper));
}
.file-drop input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.file-drop svg { width: 1.6rem; height: 1.6rem; color: var(--text-faint); }
.file-drop .file-prompt { font-size: var(--step--1); font-weight: 600; color: var(--text); }
.file-drop .file-types { font-size: .8rem; color: var(--text-faint); }

.file-chosen {
  display: none;
  align-items: center;
  gap: .75rem;
  margin-top: .75rem;
  padding: .7rem .9rem;
  background: var(--ok-bg);
  border-radius: var(--r-sm);
  font-size: var(--step--1);
}
.file-chosen.is-shown { display: flex; }
.file-chosen svg { width: 1.1rem; height: 1.1rem; flex: none; color: var(--ok); }
.file-chosen .name { font-weight: 600; overflow-wrap: anywhere; }
.file-chosen .size { color: var(--text-muted); flex: none; }
.file-chosen button {
  margin-left: auto;
  flex: none;
  border: 0;
  background: none;
  color: var(--text-muted);
  font-size: .8rem;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

/* consent */
.field-checkbox {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .8rem;
  align-items: start;
  padding: 1.1rem 1.25rem;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.field-checkbox input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  margin: .15rem 0 0;
  accent-color: var(--brass);
  cursor: pointer;
}
.field-checkbox label {
  margin: 0;
  font-size: var(--step--1);
  font-weight: 450;
  line-height: 1.55;
  color: var(--text-muted);
  cursor: pointer;
}
.field-checkbox.has-error { border-color: var(--bad); background: color-mix(in srgb, var(--bad-bg) 55%, var(--surface-alt)); }
.field-checkbox .field-error { grid-column: 2; }

/* honeypot — must stay reachable to bots but invisible to people */
.field-hidden {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* messages */
.form-message {
  display: none;
  gap: .6rem;
  align-items: flex-start;
  margin-top: 1.25rem;
  padding: .9rem 1.1rem;
  border-radius: var(--r-sm);
  font-size: var(--step--1);
  font-weight: 550;
}
.form-message.success { display: flex; background: var(--ok-bg); color: var(--ok); }
.form-message.error   { display: flex; background: var(--bad-bg); color: var(--bad); }

.form-footnote {
  margin-top: 1.25rem;
  font-size: .82rem;
  color: var(--text-faint);
  text-align: center;
}

/* success takeover shown after a successful submission */
.form-success {
  display: none;
  text-align: center;
  padding: clamp(2rem, 5vw, 3.25rem) clamp(1.25rem, 3vw, 2rem);
}
.form-success.is-shown { display: block; }
.form-success .tick {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: var(--ok-bg);
  color: var(--ok);
}
.form-success .tick svg { width: 1.75rem; height: 1.75rem; }
.form-success p { color: var(--text-muted); max-width: 42ch; margin-inline: auto; }

/* aside cards on the join page */
.aside-card {
  padding: clamp(1.35rem, 3vw, 1.85rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.aside-card + .aside-card { margin-top: 1.25rem; }
.aside-card h3 {
  font-family: var(--font-sans);
  font-size: var(--step-0);
  font-weight: 650;
  letter-spacing: 0;
  margin-bottom: 1rem;
}
.aside-card p, .aside-card li { font-size: var(--step--1); color: var(--text-muted); }
.mini-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.mini-steps li { display: grid; grid-template-columns: 1.6rem 1fr; gap: .8rem; }
.mini-steps .n {
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  font-size: .75rem;
  font-weight: 700;
  color: var(--text-muted);
}
.mini-steps strong { display: block; color: var(--text); font-size: var(--step--1); }

/* --- Footer -------------------------------------------------------------- */
.site-footer {
  background: var(--ink-deep);
  color: var(--on-dark-muted);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
  font-size: var(--step--1);
}
.footer-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.footer-brand { max-width: 30ch; }
.footer-brand .brand, .footer-brand .brand:hover { color: var(--on-dark); }
.footer-brand p { margin-top: 1rem; color: var(--on-dark-muted); }
.site-footer h4 {
  color: var(--on-dark);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.site-footer a { color: var(--on-dark-muted); text-decoration: none; }
.site-footer a:hover { color: var(--brass-bright); text-decoration: underline; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.75rem;
  color: var(--text-faint);
  font-size: .82rem;
}
.footer-disclaimer {
  margin-top: 1.25rem;
  max-width: 70ch;
  color: #7c8ba1;
  font-size: .78rem;
  line-height: 1.6;
}

/* --- Scroll reveal ------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s cubic-bezier(.22, 1, .36, 1), transform .6s cubic-bezier(.22, 1, .36, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* --- 404 ----------------------------------------------------------------- */
.center-page {
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 60vh;
  padding-block: var(--section-y);
}
.center-page .code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 14vw, 7rem);
  line-height: 1;
  color: var(--brass);
  margin-bottom: 1rem;
}

/* --- Utilities ----------------------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
