/* George B. Page Foundation
   Self-hosted Cormorant Garamond and Inter (SIL Open Font License).
   font-display: swap. Weights stay inside the shipped variable ranges (300–500). */

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url("/assets/fonts/cormorant-garamond.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 300 400;
  font-display: swap;
  src: url("/assets/fonts/cormorant-garamond-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url("/assets/fonts/inter.woff2") format("woff2");
}

:root {
  --bg: #efebe3;
  --card: #fffcf7;
  --ink: #1c1915;
  --muted: #4a453e;
  --line: #e3dccf;
  --gold: #e0b020;
  --gold-deep: #6e4e09;
  --gold-soft: #f8e7b5;
  --ink-btn: #1c1404;
  --danger: #8c2f1b;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 72rem;
  --header: 4.75rem;
  color-scheme: light;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.6;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  display: block;
  height: 6px;
  background: var(--gold);
}

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0 0 0.6rem;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.35rem, 2vw, 1.7rem); }

p { margin: 0 0 1rem; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--gold-deep);
  text-underline-offset: 0.16em;
}

.prose a,
.card a,
.person a,
.site-footer a { text-decoration-thickness: 1px; }

:focus { outline: none; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.site-footer :focus-visible { outline-color: var(--gold-soft); }

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 80;
  background: var(--ink);
  color: var(--card);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 500;
}

.skip-link:not(:focus):not(:focus-visible) {
  position: absolute;
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  white-space: nowrap;
}

.wrap {
  width: min(var(--wrap), calc(100% - 2.5rem));
  margin-inline: auto;
}

.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }

.lede {
  font-size: 1.15rem;
  max-width: 42rem;
  color: var(--ink);
}

.fine, .source, .hint {
  color: var(--muted);
  font-size: 0.95rem;
}

.draft-flag {
  display: inline-block;
  margin: 0 0 0.6rem;
  padding: 0.12rem 0.55rem;
  border: 1px solid var(--gold-deep);
  border-radius: 999px;
  color: var(--gold-deep);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.placeholder-block {
  border: 1px dashed var(--gold-deep);
  background: #fbf6e8;
  border-radius: 14px;
  padding: 1rem 1.1rem;
}

.bio-placeholder {
  display: block;
  margin: 0.65rem 0;
  border: 1px dashed var(--gold-deep);
  background: #fbf6e8;
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header);
  padding-block: 0.6rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.logo-slot {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 4.6rem;
  height: 3.1rem;
  padding: 0.25rem;
  border: 1px dashed var(--gold-deep);
  border-radius: 10px;
  background: #fbf6e8;
  color: var(--gold-deep);
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.15;
  text-align: center;
}

.wordmark {
  color: var(--ink);
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 48px;
  min-height: 48px;
  padding: 0 0.85rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

.menu-bars,
.menu-bars::before,
.menu-bars::after {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: var(--ink);
  position: relative;
}

.menu-bars::before,
.menu-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-bars::before { top: -6px; }
.menu-bars::after { top: 6px; }

.nav-links,
.footer-nav,
.stat-grid,
.card-grid,
.logo-row,
.choice-row {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: center;
}

.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.4rem 0.1rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav-links a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.28em;
}

.noscript-nav {
  padding: 0.5rem 0 1rem;
  border-top: 1px solid var(--line);
}

/* Buttons */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
}

.btn-gold {
  background: var(--gold);
  color: var(--ink-btn);
  border-color: var(--gold);
}

.btn-gold:hover { background: #c99612; border-color: #c99612; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn-ghost:hover { background: var(--ink); color: var(--card); }

button.btn:disabled { opacity: 0.7; cursor: wait; }

/* Hero and cards */
.hero-grid,
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(16rem, 0.8fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: stretch;
}

.mission-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 6px solid var(--gold);
  border-radius: 18px;
  padding: 1.25rem 1.35rem 1.25rem 1.15rem;
  margin: 1.25rem 0;
  box-shadow: 0 1px 2px rgba(28, 25, 21, 0.04);
}

.mission-card p,
blockquote p {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  line-height: 1.35;
  color: var(--ink);
}

blockquote {
  margin: 0;
}

.kicker {
  margin: 0 0 0.35rem;
  color: var(--gold-deep);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card,
.stat-grid li,
.logo-card,
.person,
.notice {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.2rem 1.25rem;
  box-shadow: 0 1px 2px rgba(28, 25, 21, 0.04);
}

.stat-grid,
.card-grid,
.logo-row,
.people {
  display: grid;
  gap: 1rem;
}

.stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.logo-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.people { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.stat-value {
  font-family: var(--serif);
  font-size: clamp(2rem, 3vw, 2.7rem);
  line-height: 1;
  margin: 0.2rem 0 0.45rem;
}

.stat-label { font-weight: 500; margin-bottom: 0.35rem; }

.card h3 { margin-top: 0.2rem; }

.photo-slot,
.logo-card,
.portrait {
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 12rem;
  padding: 1.25rem;
  border-radius: 18px;
  border: 1px solid #d9d0c2;
  background: repeating-linear-gradient(
    -45deg,
    #e7e1d6,
    #e7e1d6 10px,
    #efebe3 10px,
    #efebe3 20px
  );
  color: var(--ink);
}

.logo-card { min-height: 8.5rem; background: #f4f0e8; }
.portrait { min-height: 9rem; margin-bottom: 0.9rem; }

.role { color: var(--gold-deep); font-weight: 500; margin-bottom: 0.75rem; }

.gap-list { margin: 0.5rem 0 0; padding-left: 1.15rem; }
.gap-list li { margin: 0.25rem 0; }

/* Chart and tables */
.chart-host { margin: 1rem 0 1.25rem; }
.chart-host svg { display: block; width: 100%; height: auto; }
.chart-frame {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.75rem 0.5rem 0.25rem;
}

.table-scroll {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.75rem 1rem 1rem;
}

table { width: 100%; border-collapse: collapse; min-width: 36rem; }
caption {
  text-align: left;
  font-weight: 500;
  margin-bottom: 0.6rem;
}
th, td {
  text-align: left;
  padding: 0.65rem 0.7rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th { font-weight: 500; }
tbody tr:last-child th,
tbody tr:last-child td { border-bottom: 0; }

/* Forms */
.form-card { max-width: 40rem; }

form { margin-top: 0.5rem; }

.field { margin-bottom: 1.35rem; }

.field label,
.field legend {
  display: block;
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.req {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.9em;
}

.hint { margin: 0 0 0.4rem; }

fieldset {
  border: 0;
  margin: 0 0 1.35rem;
  padding: 0;
}

.choice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 48px;
}

.choice input {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--gold-deep);
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  font: inherit;
  font-size: max(1rem, 1em);
  color: var(--ink);
  background: #fff;
  border: 2px solid #5c564c;
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  min-height: 48px;
}

.field textarea { min-height: 9rem; resize: vertical; }

.field input:focus-visible,
.field textarea:focus-visible,
.choice input:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
  border-color: var(--ink);
}

.field input:user-invalid,
.field textarea:user-invalid {
  border-color: var(--danger);
}

.form-error,
.form-success {
  border-radius: 14px;
  padding: 0.9rem 1rem;
  margin: 0 0 1rem;
}

.form-error {
  border: 2px solid var(--danger);
  background: #fdf4f1;
}

.form-success {
  border: 2px solid var(--gold-deep);
  background: #fbf6e8;
}

.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.turnstile-note { margin-top: 0.35rem; }

/* Footer */
.site-footer {
  background: var(--ink);
  color: #f4efe6;
  padding: 2.5rem 0 2rem;
  margin-top: 1rem;
}

.site-footer a { color: var(--gold-soft); }

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  flex-wrap: wrap;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(244, 239, 230, 0.2);
}

.footer-name {
  font-family: var(--serif);
  font-size: 1.7rem;
  line-height: 1.15;
  margin: 0 0 0.3rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
}

.footer-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-weight: 500;
}

.footer-bottom {
  padding-top: 1rem;
  color: #e4ddd2;
  font-size: 0.95rem;
}

/* Menu open */
@media (max-width: 1120px) {
  .menu-btn { display: inline-flex; }
  .nav { display: none; }
  .menu-open .nav {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 30;
    background: var(--card);
    padding: calc(var(--header) + 1.25rem) 1.5rem 2rem;
    overflow: auto;
  }
  .menu-open .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  .menu-open .nav-links a {
    font-size: 1.35rem;
    min-height: 48px;
  }
  .menu-open .menu-bars { background: transparent; }
  .menu-open .menu-bars::before { transform: translateY(6px) rotate(45deg); }
  .menu-open .menu-bars::after { transform: translateY(-6px) rotate(-45deg); }
}

@media (max-width: 900px) {
  .hero-grid,
  .split,
  .stat-grid,
  .card-grid,
  .people { grid-template-columns: 1fr 1fr; }
  .logo-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .wrap { width: min(var(--wrap), calc(100% - 1.5rem)); }
  .hero-grid,
  .split,
  .stat-grid,
  .card-grid,
  .people,
  .logo-row { grid-template-columns: 1fr; }
  .logo-slot { width: 3.6rem; height: 3.1rem; }
  .header-bar { min-height: 4.25rem; }
}

@media (pointer: coarse) {
  .field input,
  .field textarea,
  .btn,
  .menu-btn { min-height: 48px; }
}

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

@media (forced-colors: active) {
  .btn,
  .photo-slot,
  .logo-slot,
  .card,
  .field input,
  .field textarea {
    border: 1px solid ButtonText;
  }
  body::before { background: ButtonText; }
}

@media print {
  body::before,
  .menu-btn,
  .skip-link { display: none !important; }
  .nav { display: block !important; position: static !important; }
  .site-header { position: static; }
  .site-footer { background: #fff; color: #000; }
  .site-footer a { color: #000; }
  a { text-decoration: underline; }
  .card, .stat-grid li, .person { break-inside: avoid; }
}
