:root {
  --ink: #1F1A15;
  --navy: #2A1B0E;
  --ivory: #F7F4EC;
  --paper: #FFFFFF;
  --muted: #5A6068;
  --line: #E2DED6;
  --accent: #603813;
  --accent-light: #A9C95A;
  --serif: "Lora", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --olive: #88AE31;
  --olive-dark: #55701A;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--ivory); font-size: 18px; line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: var(--accent); }
a:hover { color: var(--ink); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

/* Header */
.site-header { background: var(--navy); color: #F3EFE8; }
.site-header .wrap { max-width: 1200px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 18px; padding-bottom: 18px; }
.brand { font-family: var(--serif); font-size: 22px; font-weight: 600; color: #F3EFE8; text-decoration: none; }
.brand:hover { color: #FFFFFF; }
.nav { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.nav a { color: #D9CDBE; text-decoration: none; font-size: 14.5px; }
.nav .btn { padding: 10px 16px; }
.nav a:hover, .nav a[aria-current="page"] { color: #FFFFFF; }
.nav .btn { color: var(--navy); }

/* Buttons */
.btn { display: inline-block; background: var(--olive); color: #1C2508; font-weight: 600; font-size: 16px; padding: 12px 22px; border-radius: 4px; text-decoration: none; border: 0; cursor: pointer; min-height: 44px; }
.btn:hover { background: #A9C95A; color: #1C2508; }
.btn-dark { background: var(--navy); color: #FFFFFF; }
.btn-dark:hover { background: #4A2B0F; color: #FFFFFF; }

/* Hero */
.hero { background: var(--navy); color: #F3EFE8; padding: 72px 0 88px; }
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-light); font-weight: 600; margin: 0 0 16px; }
.hero h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(36px, 5vw, 58px); line-height: 1.1; margin: 0 0 24px; max-width: 900px; }
.hero p.lead { font-size: 20px; color: #D9CDBE; max-width: 720px; margin: 0 0 32px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero .btn-ghost { color: #F3EFE8; border: 1px solid #7A6650; background: transparent; }
.hero .btn-ghost:hover { border-color: #F3EFE8; color: #FFFFFF; }

/* Chess squares motif */
.squares { display: flex; gap: 6px; margin: 0 0 24px; }
.squares span { width: 14px; height: 14px; display: block; }
.squares span:nth-child(1) { background: #2C5F8A; }
.squares span:nth-child(2) { background: #46789A; }
.squares span:nth-child(3) { background: #C8965A; }
.squares span:nth-child(4) { background: #D97B3A; }
.squares span:nth-child(5) { background: #B23A30; }

/* Sections */
section { padding: 72px 0; }
section.alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.15; margin: 0 0 20px; }
h3 { font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1.25; margin: 0 0 10px; }
.section-intro { color: var(--muted); max-width: 720px; margin: 0 0 40px; }

.grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 28px; }
section.alt .card { background: var(--ivory); }
.card p { margin: 0 0 12px; }
.card ul { margin: 0 0 12px; padding-left: 20px; }
.card .more { font-weight: 600; text-decoration: none; }

/* Timeline of firsts */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 26px 28px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 8px; width: 12px; height: 12px; background: var(--accent-light); }
.timeline .year { font-weight: 700; color: var(--accent); display: block; font-size: 15px; letter-spacing: 0.04em; }

/* Quotes */
blockquote { margin: 0; padding: 24px 28px; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; }
blockquote p { font-family: var(--serif); font-size: 20px; line-height: 1.45; margin: 0 0 12px; }
blockquote cite { font-style: normal; font-size: 15px; color: var(--muted); }

/* Bio layout */
.bio { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.bio-photo { flex: 0 0 260px; aspect-ratio: 4 / 5; background: #DCD7CC; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 15px; text-align: center; padding: 20px; }
.bio-text { flex: 999 1 420px; min-width: 0; }
.facts { display: grid; gap: 8px 32px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); padding: 0; list-style: none; margin: 24px 0 0; }
.facts li { font-size: 16px; color: var(--muted); }
.facts strong { color: var(--ink); display: block; }

/* CTA band */
.cta { background: var(--navy); color: #F3EFE8; padding: 64px 0; }
.cta h2 { color: #F3EFE8; }
.cta p { color: #D9CDBE; max-width: 680px; }

/* Form */
form { display: grid; gap: 18px; max-width: 640px; }
label { font-weight: 600; font-size: 16px; display: block; margin-bottom: 6px; }
input, textarea, select { width: 100%; font: inherit; font-size: 17px; padding: 12px 14px; border: 1px solid #B9B3A7; border-radius: 4px; background: var(--paper); color: var(--ink); }
textarea { min-height: 160px; resize: vertical; }
.hidden { display: none; }

/* Footer */
.site-footer { background: var(--ink); color: #A9AFB8; padding: 40px 0; font-size: 15px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer a { color: #D9DDE2; }

@media (max-width: 640px) {
  body { font-size: 17px; }
  section { padding: 52px 0; }
  .hero { padding: 52px 0 64px; }
  .bio-photo { flex-basis: 100%; max-width: 280px; }
}

/* ===== Visual upgrade ===== */
.hero { position: relative; overflow: hidden; }
.hero .wrap { position: relative; z-index: 1; }
.hero-board { position: absolute; right: -40px; top: 50%; transform: translateY(-50%); display: grid; grid-template-columns: repeat(9, 52px); grid-auto-rows: 52px; z-index: 0; pointer-events: none; }
.hero-board span { display: block; }
.hero h1, .hero p.lead { max-width: 640px; }
@media (max-width: 1100px) { .hero-board { opacity: 0.35; right: -160px; } }
@media (max-width: 700px) { .hero-board { display: none; } }

.stats { background: #22160B; color: #F3EFE8; padding: 56px 0; border-top: 1px solid #3A2816; }
.stats .grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; }
.stat-num { font-family: var(--serif); font-size: clamp(44px, 5vw, 64px); line-height: 1; color: var(--accent-light); display: block; margin-bottom: 10px; }
.stat-label { font-size: 16px; color: #D9CDBE; line-height: 1.45; }

.pull { padding: 80px 0; background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pull p { font-family: var(--serif); font-size: clamp(26px, 3.2vw, 38px); line-height: 1.3; max-width: 900px; margin: 0; }
.pull p em { color: var(--accent); font-style: normal; }

.split { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.split > * { flex: 1 1 380px; min-width: 0; }
.mini-board { display: grid; grid-template-columns: repeat(6, 1fr); aspect-ratio: 1 / 1; max-width: 360px; width: 100%; margin: 0 auto; border: 1px solid var(--line); }
.mini-board span { display: block; }

.offer-num { font-family: var(--serif); font-size: 40px; color: var(--accent); line-height: 1; display: block; margin-bottom: 14px; }
.card { transition: transform .15s ease, box-shadow .15s ease; }


.htimeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0; }
.htimeline li { padding: 28px 24px 8px 0; border-top: 2px solid var(--line); position: relative; }
.htimeline li::before { content: ""; position: absolute; top: -8px; left: 0; width: 14px; height: 14px; background: var(--accent-light); }
.htimeline .year { font-family: var(--serif); font-size: 30px; color: var(--accent); display: block; line-height: 1.1; margin-bottom: 4px; }
.htimeline .where { font-weight: 700; font-size: 15px; display: block; margin-bottom: 6px; }
.htimeline p { margin: 0; font-size: 16px; color: var(--muted); }

/* Compass motif */
.hero-compass { position: absolute; right: 4%; top: 50%; transform: translateY(-50%); width: 400px; height: 400px; z-index: 0; pointer-events: none; opacity: .9; }
@media (max-width: 1100px) { .hero-compass { opacity: .25; right: -120px; } }
@media (max-width: 700px) { .hero-compass { display: none; } }
.eyebrow-dark { color: var(--olive-dark) !important; }
.htimeline .year, .offer-num { color: var(--olive-dark); }
.htimeline li::before { background: var(--olive); }
.pull p em { color: var(--olive-dark); }
.logos { display: flex; flex-wrap: wrap; gap: 10px 28px; padding: 0; margin: 0; list-style: none; }
.logos li { font-family: var(--serif); font-size: 19px; color: var(--muted); }
.pubs { padding-left: 20px; } .pubs li { margin-bottom: 10px; }
.team { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* Footer */
.site-footer { padding: 56px 0 28px; }
.site-footer .wrap.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.3fr 1.2fr; gap: 32px; }
@media (max-width: 800px) { .site-footer .wrap.footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-footer .wrap.footer-grid { grid-template-columns: 1fr; } }
.footer-brand p { margin: 12px 0 0; font-size: 15px; line-height: 1.55; max-width: 360px; }
.footer-brand p:first-of-type { font-family: var(--serif); font-size: 17px; color: #E6DED2; }
.footer-h { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-light); margin: 0 0 12px; font-weight: 500; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-bottom { display: block !important; border-top: 1px solid #3A332B; margin-top: 36px; padding-top: 20px; font-size: 14px; }

.legal h2 { font-size: 24px; margin: 36px 0 12px; }

/* ---- Our Brains ---- */
.map-key { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 40px 0 12px; font-size: 14px; color: #D8D2C6; }
.map-key span { display: inline-flex; align-items: center; gap: 8px; }
.map-key i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.map-fig { width: 100%; height: 520px; }
.map-fig svg { width: 100%; height: 100%; display: block; font-family: Inter, sans-serif; font-size: 13px; font-weight: 600; }
.map-cap { font-size: 14px; color: #B9B2A5; margin-top: 8px; max-width: 720px; }
@media (max-width: 620px) { .map-fig { height: 380px; } }
.pulse { transform-box: fill-box; transform-origin: center; animation: pulse 3s ease-in-out infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: .3; } 50% { transform: scale(1.35); opacity: .1; } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }
.bricks { display: flex; flex-wrap: wrap; gap: 4px; margin: 12px 0 18px; }
.bricks span { height: 12px; border-radius: 2px; opacity: .85; }
.rows { display: grid; gap: 12px; }
.row { display: grid; grid-template-columns: 200px 1fr 70px; align-items: center; gap: 12px; font-size: 15px; }
.row .bar { background: var(--line); height: 10px; border-radius: 5px; overflow: hidden; }
.row .bar i { display: block; height: 100%; background: var(--olive); border-radius: 5px; }
.row b { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 620px) { .row { grid-template-columns: 1fr 60px; } .row .bar { grid-column: 1 / -1; grid-row: 2; } }
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.theme { background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: 6px; padding: 22px 24px; }
.theme h3 { margin: 0 0 12px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.theme h3 small { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--muted); font-weight: 400; white-space: nowrap; }
.theme ul { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.theme li { padding: 4px 0; border-bottom: 1px dotted var(--line); }
.theme li:last-child { border-bottom: 0; }
.star { color: #C8901A; }
.qs { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.q { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 4px; padding: 14px 18px; font-size: 16px; }
.route { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; counter-reset: stop; }
.stop { position: relative; padding: 36px 16px 8px 0; border-top: 4px solid var(--c); counter-increment: stop; }
.stop::before { content: counter(stop); position: absolute; top: -18px; left: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--c); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.stop b { display: block; font-family: Lora, serif; font-size: 18px; margin-bottom: 6px; }
.stop span { font-size: 15px; color: var(--muted); }
@media (max-width: 820px) { .route { grid-template-columns: 1fr; gap: 28px; } }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.plain-list small { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.caution { background: #FBF3E2; border: 1px solid #E8D3A6; border-left: 4px solid #C8901A; border-radius: 4px; padding: 16px 20px; font-size: 16px; margin: 20px 0; }

/* ---- Images ---- */
.bio-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; display: block; }
.bio-photo:has(img) { padding: 0; background: none; }
.bio-photos { flex: 0 0 300px; min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; }
.bio-photos figure { margin: 0; }
.bio-photos img { width: 100%; max-width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 6px; display: block; }
.bio-photos figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.shot { margin: 36px 0 0; }
.shot img { width: 100%; height: auto; display: block; border-radius: 6px; border: 1px solid var(--line); box-shadow: 0 8px 28px rgba(42,27,14,.12); }
.shot figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }
.avatar { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; display: block; margin-bottom: 14px; }
.free { background: #EEF2E2; border-top: 1px solid #DCE4C4; border-bottom: 1px solid #DCE4C4; }
.free .card { background: #fff; }
.cases { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .cases { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cases { grid-template-columns: 1fr; } }
.case .tag { font-family: "IBM Plex Mono", monospace; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #5E7A1F; margin: 0 0 8px; }
.case h3 { margin-top: 0; }
.firsts { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 10px 32px; }
.firsts li { padding: 10px 0 10px 28px; border-bottom: 1px solid var(--line); position: relative; font-size: 16px; }
.firsts li::before { content: "★"; position: absolute; left: 0; top: 10px; color: #C8901A; }

/* ===== v8 revisions ===== */
/* Light header with the compass logo */
.site-header { background: var(--paper); color: var(--ink); border-bottom: 1px solid var(--line); position: relative; z-index: 5; }
.site-header .wrap { padding-top: 14px; padding-bottom: 14px; }
.site-header .brand { display: block; line-height: 0; }
.site-header .brand img { height: 42px; width: auto; }
.nav a { color: var(--ink); font-weight: 500; }
.nav a:hover { color: var(--olive-dark); }
.nav a[aria-current="page"] { color: var(--olive-dark); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.nav .btn, .nav .btn:hover { color: #1C2508; text-decoration: none; }

/* Phone menu */
.nav-toggle { display: none; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px; font: 600 15px var(--sans); color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; } .nav-toggle-bars::after { top: 6px; }
@media (max-width: 1060px) {
  .site-header .wrap { flex-wrap: wrap; }
  .nav-toggle { display: inline-flex; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0 4px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-top: 1px solid var(--line); font-size: 16px; }
  .nav .btn { margin-top: 12px; text-align: center; border-top: 0; padding: 12px 16px; }
}
@media (max-width: 520px) { .site-header .brand img { height: 34px; } }

/* Shorter inner-page heroes with their own picture */
.hero-inner { padding: 64px 0 72px; }
.hero-inner h1 { font-size: clamp(32px, 4.2vw, 48px); }
.hero-inner p.lead { font-size: 19px; }
.hero-media { position: absolute; right: 5%; top: 50%; transform: translateY(-50%); margin: 0; z-index: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; box-shadow: 0 18px 50px rgba(0,0,0,.35); border: 1px solid rgba(217,205,190,.25); }
.hero-portrait { width: min(300px, 24vw); aspect-ratio: 4 / 5; }
.hero-screen { width: min(460px, 34vw); aspect-ratio: 4 / 3; }
.hero-screen img { object-position: left top; }
@media (max-width: 960px) {
  .hero-media { position: static; transform: none; margin: 36px 24px 0; }
  .hero-portrait { width: 220px; }
  .hero-screen { width: auto; max-width: 520px; }
}

/* Team section: bigger photos, higher on the page */
.team-section .bio-photos { flex: 0 0 440px; gap: 16px; }
.team-section .bio-photos figcaption { font-size: 14px; color: var(--ink); font-weight: 600; }
@media (max-width: 960px) { .team-section .bio-photos { flex-basis: 100%; max-width: 480px; } }

/* Free resources as a compact list */
.free { padding: 56px 0; }
.free .section-intro { margin-bottom: 28px; }
.free-list { gap: 0 40px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.free-list .card { background: transparent; border: 0; border-top: 1px solid #CBD6AE; border-radius: 0; padding: 18px 0 20px; }
.free-list .card h3 { font-size: 18px; margin-bottom: 4px; }
.free-list .card p { font-size: 15.5px; color: var(--muted); margin-bottom: 6px; }
.free-list .card .more { font-size: 15px; }
