/* ---------- Fonts (self-hosted) ---------- */
@font-face {
  font-family: "Inter";
  src: url("../fonts/InterVariable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/Newsreader-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/Newsreader-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg:           #fbfaf6;
  --bg-alt:       #f3efe4;
  --bg-card:      #ffffff;
  --bg-dark:      #0d1730;
  --ink:          #0e1426;
  --ink-2:        #2a2f44;
  --ink-muted:    #56546a;
  --ink-subtle:   #8a8794;
  --rule:         #e3dfd1;
  --rule-strong:  #c9c3ad;

  /* primary — deep navy */
  --accent:       #1d2a4a;
  --accent-2:     #2a3b6a;
  --accent-soft:  #e5e8f0;

  /* secondary — warm brass/gold */
  --gold:         #9a7415;
  --gold-2:       #b58a26;
  --gold-soft:    #f4ead0;
  --gold-tint:    #fbf4dc;

  /* tertiary — muted teal, used very sparingly */
  --teal:         #2d6e6e;

  --warn-bg:      #fdf6e3;
  --warn-bd:      #b08900;
  --warn-ink:     #5a4514;

  --serif: "Newsreader", "Iowan Old Style", "Charter", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --max:    1100px;
  --measure: 720px;

  --radius: 4px;
  --radius-lg: 8px;

  --t-fast: 120ms;
  --t-med:  220ms;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  font-feature-settings: "ss01", "cv11", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent-2);
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--t-fast) ease, text-decoration-color var(--t-fast) ease;
}
a:hover { color: var(--accent); text-decoration-color: currentColor; }

p { margin: 0 0 1.1em; max-width: var(--measure); }

ul, ol { margin: 0 0 1.2em; padding-left: 1.4em; max-width: var(--measure); }
li { margin: 0.35em 0; }
li::marker { color: var(--ink-subtle); }

strong { font-weight: 600; color: var(--ink); }

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

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

/* ---------- Headings ---------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.012em;
  line-height: 1.15;
  margin: 2.4em 0 0.6em;
}
h1 { font-size: clamp(2.1rem, 4.5vw, 3.1rem); margin-top: 0; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 1.95rem); margin-top: 2.6em; }
h3 { font-size: 1.25rem; font-family: var(--sans); font-weight: 600; letter-spacing: -0.005em; margin-top: 2em; }
h4 { font-size: 1.02rem; font-family: var(--sans); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-muted); margin-top: 2em; }

/* eyebrow label above headlines */
.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin: 0 0 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--gold);
}

/* ---------- Layout ---------- */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

main.wrap { padding-top: 4.5rem; padding-bottom: 5.5rem; }

.section {
  padding: 5rem 0;
  border-top: 1px solid var(--rule);
}
.section--alt {
  background: var(--bg-alt);
}
.section--first {
  border-top: 0;
  padding-top: 4.5rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 64px;
}
.brand {
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--accent); }
.site-header nav {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.site-header nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius);
  transition: background var(--t-fast) ease, color var(--t-fast) ease;
}
.site-header nav a:hover { background: var(--accent-soft); color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  padding: 5rem 0 4rem;
  border-bottom: 1px solid var(--rule);
  position: relative;
  background:
    radial-gradient(1200px 480px at 95% -10%, rgba(154, 116, 21, 0.16), transparent 60%),
    radial-gradient(900px 380px at 5% 110%, rgba(29, 42, 74, 0.10), transparent 60%),
    linear-gradient(180deg, #fbf6e8 0%, var(--bg) 60%);
}
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--gold-2) 50%, var(--accent) 100%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 3rem;
  align-items: center;
}
.hero-text h1 { max-width: 18ch; }
.hero-text .lede {
  font-size: 1.18rem;
  color: var(--ink-2);
  line-height: 1.55;
  max-width: 52ch;
  margin: 1.1rem 0 2rem;
}
.hero-image {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 18px 50px -18px rgba(14, 20, 38, 0.32),
    0 4px 12px -4px rgba(14, 20, 38, 0.18);
  border: 1px solid var(--rule);
}
.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-image::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13, 23, 48, 0) 55%, rgba(13, 23, 48, 0.55) 100%);
  pointer-events: none;
  z-index: 1;
}
.hero-image .image-credit {
  position: absolute;
  bottom: 0.5rem;
  right: 0.85rem;
  margin: 0;
  z-index: 2;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  font-weight: 500;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

/* ---------- Feature band ---------- */
.feature-band {
  background: var(--bg-dark);
  color: #e8e6e0;
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}
.feature-band::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-2) 0%, var(--accent-2) 50%, var(--gold-2) 100%);
}
.feature-figure {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin: 0;
  align-items: center;
}
.feature-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid #2a3650;
  box-shadow: 0 12px 40px -12px rgba(0, 0, 0, 0.6);
}
.feature-figure figcaption { padding: 0; }
.feature-figure .eyebrow { color: var(--gold-2); }
.feature-figure .eyebrow::before { background: var(--gold-2); }
.feature-figure h2 {
  color: #f4f2ec;
  border: 0;
  margin: 0.6rem 0 1rem;
  font-size: clamp(1.6rem, 2.8vw, 2.1rem);
  max-width: 22ch;
}
.feature-figure p {
  color: #cfcdc4;
  max-width: 52ch;
  font-size: 1.02rem;
}
.feature-figure .image-credit {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.75rem;
  margin-top: 1.4rem;
  letter-spacing: 0.04em;
}

@media (max-width: 760px) {
  .hero-grid, .feature-figure { grid-template-columns: 1fr; gap: 2rem; }
  .hero-image, .feature-figure img { aspect-ratio: 16/10; }
}

/* ---------- Buttons ---------- */
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.7rem 1.15rem;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--t-fast) ease, border-color var(--t-fast) ease, color var(--t-fast) ease, transform var(--t-fast) ease;
}
.button--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.06);
}
.button--primary:hover { background: var(--accent-2); color: #fff; }
.button--ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.button--ghost:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.button .arrow {
  display: inline-block;
  transition: transform var(--t-fast) ease;
}
.button:hover .arrow { transform: translateX(2px); }

/* ---------- Badges (pill) ---------- */
.badges { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 1.6rem 0; }
.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.34rem 0.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
}
.badge:nth-child(odd) {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 18%, transparent);
}
.badge:nth-child(even) {
  color: var(--gold);
  background: var(--gold-soft);
  border-color: color-mix(in srgb, var(--gold) 24%, transparent);
}

/* ---------- Identifiers row ---------- */
.identifiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem 2rem;
  margin: 2rem 0 2.4rem;
  padding: 1.4rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-lg);
  max-width: 100%;
  box-shadow: 0 1px 2px rgba(14, 20, 38, 0.04);
}
.identifiers .id-item { font-size: 0.9rem; }
.identifiers .id-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--gold);
  margin-bottom: 0.25rem;
}
.identifiers .id-value { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 500; }

/* ---------- Article content (markdown body) ---------- */
article { max-width: var(--measure); }
article.wide { max-width: 100%; }
article > h2:first-child, article > h1:first-child { margin-top: 0; }

article dl { margin: 1.4rem 0; }
article dt { font-weight: 600; color: var(--ink); margin-top: 0.9rem; font-size: 0.95rem; }
article dd { margin: 0.15rem 0 0.6rem 0; color: var(--ink-2); }

article blockquote {
  border-left: 3px solid var(--rule-strong);
  margin: 1.4rem 0;
  padding: 0.4rem 0 0.4rem 1.2rem;
  color: var(--ink-muted);
  font-style: italic;
}

/* tables */
article table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.94rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}
article th, article td {
  text-align: left;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
article tbody tr:last-child td { border-bottom: 0; }
article th {
  background: var(--bg-alt);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
article tbody tr:hover { background: var(--accent-soft); }

article code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--bg-alt);
  padding: 0.12em 0.4em;
  border-radius: 3px;
  border: 1px solid var(--rule);
}

/* ---------- Principal cards ---------- */
.principal {
  padding: 2.4rem 0;
  border-top: 1px solid var(--rule);
  max-width: 100%;
  overflow: hidden;
}
.principal:first-of-type { border-top: 0; padding-top: 0; }
.principal h2 { margin-top: 0.2em; font-size: 1.6rem; }
.principal h3 { margin-top: 1.6em; }
.principal ul, .principal p { max-width: 64ch; }

.principal-photo {
  float: right;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0.2rem 0 1.4rem 2rem;
  border: 4px solid var(--bg-card);
  box-shadow:
    0 0 0 1px var(--rule),
    0 12px 32px -10px rgba(14, 20, 38, 0.32);
  background: var(--bg-alt);
}
@media (max-width: 540px) {
  .principal-photo {
    float: none;
    display: block;
    width: 160px;
    height: 160px;
    margin: 0 0 1.4rem 0;
  }
}

/* ---------- Placeholder callout ---------- */
.placeholder {
  background: var(--warn-bg);
  border-left: 3px solid var(--warn-bd);
  padding: 0.85rem 1.05rem;
  font-size: 0.9rem;
  color: var(--warn-ink);
  margin: 1.4rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* ---------- Page header (non-home pages) ---------- */
.page-header {
  padding: 4rem 0 2.4rem;
  border-bottom: 1px solid var(--rule);
  background: var(--bg-alt);
  margin-bottom: 3.5rem;
}
.page-header h1 { margin: 0; }
.page-header .lede {
  margin-top: 0.9rem;
  font-size: 1.1rem;
  color: var(--ink-2);
  max-width: 60ch;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-dark);
  color: #d4d2cc;
  padding: 4rem 0 3rem;
  margin-top: 6rem;
  border-top: 1px solid #2a2823;
}
.site-footer .wrap {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.4rem;
}
.site-footer h4 {
  color: #f4f2ec;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 0.9rem;
  font-weight: 600;
  font-family: var(--sans);
}
.site-footer .brand-block .brand {
  color: #f4f2ec;
  font-size: 1.3rem;
}
.site-footer p { font-size: 0.9rem; color: #b8b6b0; margin: 0.3rem 0; max-width: 36ch; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0.4rem 0; }
.site-footer a { color: #d4d2cc; text-decoration: none; font-size: 0.93rem; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .legal {
  grid-column: 1 / -1;
  margin-top: 2rem;
  padding-top: 1.6rem;
  border-top: 1px solid #2a2823;
  color: #8a8782;
  font-size: 0.82rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  body { font-size: 16px; }
  .site-header .wrap { height: auto; padding-top: 0.85rem; padding-bottom: 0.85rem; flex-wrap: wrap; }
  .site-header nav { width: 100%; }
  .site-header nav a { padding: 0.4rem 0.6rem; font-size: 0.88rem; }
  .hero { padding: 3.5rem 0 3rem; }
  .page-header { padding: 3rem 0 2rem; margin-bottom: 2.5rem; }
  .site-footer .wrap { grid-template-columns: 1fr; gap: 2rem; }
  h2 { margin-top: 2em; }
}

/* ---------- Selection ---------- */
::selection { background: var(--accent); color: #fff; }
