/* Palette: Basalt (black lava rock, sand accent) */
:root {
  --bg: #f4f3f1;
  --panel: #e9e7e3;
  --card: #ffffff;
  --text: #111111;
  --muted: #5c5a56;
  --line: #d6d3ce;
  --accent: #111111;
  --accent-ink: #ffffff;
  --hero-accent: #d9c4a3;
  --hero-btn: #ffffff;
  --hero-btn-ink: #111111;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --head-weight: 700;
  --head-tracking: -.01em;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0c0c; --panel: #141414; --card: #1a1a1a; --text: #f2f1ee; --muted: #a3a09a;
    --line: #2a2a2a; --accent: #d9c4a3; --accent-ink: #141008;
  }
}
:root[data-theme="dark"] {
  --bg: #0c0c0c; --panel: #141414; --card: #1a1a1a; --text: #f2f1ee; --muted: #a3a09a;
  --line: #2a2a2a; --accent: #d9c4a3; --accent-ink: #141008;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--serif); font-weight: var(--head-weight); letter-spacing: var(--head-tracking); line-height: 1.1; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; text-wrap: balance; }

/* ---------- Hero: full-screen photo, text over the left side ---------- */
/* The hero is always light text on a dark scrim, whatever the theme. */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  overflow: hidden; color: #fff; background: #1b1f1c;
}
.hero-photo {
  position: absolute; inset: 0;
  background: url("assets/todd-hero.jpg") 68% 35% / cover no-repeat;
}
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(10,14,12,.82) 0%, rgba(10,14,12,.62) 32%, rgba(10,14,12,.15) 55%, rgba(10,14,12,0) 70%),
    linear-gradient(0deg, rgba(10,14,12,.45) 0%, rgba(10,14,12,0) 30%);
}
.hero-panel {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; gap: 22px;
  width: min(620px, 48%);
  padding: 64px 0 64px clamp(24px, 6vw, 96px);
}
.hero h1 { font-size: clamp(48px, 6.4vw, 104px); text-shadow: 0 2px 24px rgba(0,0,0,.25); }
.hero .eyebrow { margin-bottom: 0; color: var(--hero-accent, #f0b96b); }
.lede { font-size: clamp(17px, 1.35vw, 20px); color: rgba(255,255,255,.92); max-width: 34em; }
.where { font-size: 14px; color: rgba(255,255,255,.72); }
.hero .btn { color: #fff; border-color: rgba(255,255,255,.45); background: rgba(255,255,255,.06); backdrop-filter: blur(6px); }
.hero .btn:hover { border-color: #fff; background: rgba(255,255,255,.14); }
.hero .btn.primary { background: var(--hero-btn, #e3a85c); border-color: var(--hero-btn, #e3a85c); color: var(--hero-btn-ink, #1a1208); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.hero-actions.center { justify-content: center; }
.btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px;
  border: 1px solid var(--line); border-radius: 8px; text-decoration: none;
  font-weight: 600; font-size: 15px; background: transparent;
  transition: background .15s, border-color .15s, transform .15s;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.scroll-cue {
  position: absolute; left: 50%; bottom: 28px; z-index: 2; margin-left: -22px;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0,0,0,.35); color: #fff; text-decoration: none; font-size: 20px;
  backdrop-filter: blur(6px);
}

/* ---------- Numbers ---------- */
.numbers {
  display: grid; grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.stat { padding: 36px clamp(16px, 2.5vw, 40px); border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat .n { display: block; font-family: var(--serif); font-size: clamp(34px, 3.4vw, 52px); font-weight: var(--head-weight); letter-spacing: var(--head-tracking); color: var(--accent); line-height: 1; }
.stat .l { display: block; margin-top: 10px; font-size: 14px; color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 120px) clamp(20px, 5vw, 80px); }
.section-head { margin-bottom: 40px; }
.section h2, .contact h2 { font-size: clamp(32px, 3.6vw, 52px); }
.sub { margin-top: 14px; color: var(--muted); max-width: 40em; }

.feature {
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(24px, 3vw, 48px);
  align-items: center; margin-bottom: 20px; padding: clamp(16px, 2vw, 24px);
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
}
.feature-media { margin: 0; }
.feature-media video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 6px; background: #000; object-fit: cover; }
.feature-media figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); }
.feature-body { display: flex; flex-direction: column; gap: 14px; }
.feature-body .tag { font-size: 13px; font-weight: 600; color: var(--muted); }
.feature-body h3 { font-size: clamp(26px, 2.4vw, 36px); }
.feature-body > p:not(.tag) { color: var(--muted); }
.feature-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 6px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.feature-stats dt { font-family: var(--serif); font-weight: var(--head-weight); font-size: clamp(26px, 2.2vw, 34px); line-height: 1; }
.feature-stats dd { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
@media (max-width: 1100px) { .feature { grid-template-columns: 1fr; } }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: 28px; display: flex; flex-direction: column; gap: 12px;
}
.card .tag { font-size: 13px; font-weight: 600; color: var(--muted); }
.card h3 { font-size: 24px; }
.card p:not(.tag) { color: var(--muted); font-size: 16px; }
.card .more { margin-top: auto; padding-top: 6px; font-weight: 600; color: var(--accent); text-decoration: none; }

.field { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.map-wrap { margin: 0 0 32px; }
.world-map { display: block; width: 100%; height: auto; }
.world-map .land path { fill: var(--line); stroke: var(--panel); stroke-width: .6; }
.world-map .field-country { fill: var(--accent); stroke: var(--panel); stroke-width: .6; transition: opacity .15s; cursor: default; }
.world-map.focus .field-country { opacity: .3; }
.world-map.focus .field-country.on { opacity: 1; }
.world-map .home circle { fill: var(--hero-accent); stroke: var(--text); stroke-width: 1.5; }
.world-map .home .home-pulse { fill: none; stroke: var(--hero-accent); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { from { transform: scale(.6); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .world-map .home .home-pulse { animation: none; } }
.map-label text {
  font: 600 11px var(--sans); fill: var(--text);
  paint-order: stroke; stroke: var(--panel); stroke-width: 3.5px; stroke-linejoin: round;
}
.map-label line { stroke: var(--muted); stroke-width: .8; }
.map-label circle { fill: var(--text); }
.map-label[data-country] { cursor: default; transition: opacity .15s; }
.world-map.focus .map-label[data-country] { opacity: .35; }
.world-map.focus .map-label.on { opacity: 1; }
.home-label text { fill: var(--muted); font-weight: 500; }
.photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 48px; }
.photo { position: relative; margin: 0; border-radius: 8px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--line); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.photo:hover img { transform: scale(1.03); }
.photo figcaption {
  position: absolute; inset: auto 0 0 0; padding: 44px 14px 12px;
  background: linear-gradient(0deg, rgba(0,0,0,.82) 0%, rgba(0,0,0,.55) 55%, rgba(0,0,0,0) 100%);
  color: #fff; font-size: 14px; line-height: 1.35; text-wrap: balance;
}
.photo figcaption b { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--hero-accent); margin-bottom: 2px; }
@media (max-width: 1100px) { .photos { grid-template-columns: repeat(2, 1fr); } }
@media (prefers-reduced-motion: reduce) { .photo img { transition: none; } .photo:hover img { transform: none; } }
/* Labels on the map for larger screens; chips only on phones, where labels would be too small */
.field .chips { display: none; }
.chips li[data-country] { cursor: default; transition: background .15s, color .15s, border-color .15s; }
.chips li.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chips .home-chip { display: inline-flex; align-items: center; gap: 8px; background: transparent; color: var(--muted); }
.chips .home-chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--hero-accent); border: 1.5px solid var(--text); }
.chips, .skills { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li {
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); font-weight: 500;
}

.timeline { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.timeline li {
  display: grid; grid-template-columns: 180px 1fr; gap: 24px;
  padding: 24px 0; border-bottom: 1px solid var(--line);
}
.timeline .when { color: var(--accent); font-weight: 600; font-size: 15px; padding-top: 3px; }
.timeline h3 { font-size: 22px; }
.timeline p { color: var(--muted); margin-top: 6px; }
.skills { margin-top: 36px; }
.skills li { padding: 6px 14px; border-radius: 6px; background: var(--panel); color: var(--muted); font-size: 14px; }

.contact {
  text-align: center; padding: clamp(72px, 10vw, 140px) clamp(20px, 5vw, 80px);
  background: var(--panel); border-top: 1px solid var(--line);
}
.contact .sub { margin: 14px auto 28px; }

.footer {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  padding: 24px clamp(20px, 5vw, 80px); font-size: 14px; color: var(--muted);
}
.theme { display: inline-flex; gap: 4px; }
.theme button {
  font: inherit; color: var(--muted); background: none; border: 1px solid var(--line);
  border-radius: 6px; padding: 6px 12px; min-height: 36px; cursor: pointer;
}
.theme button:hover { color: var(--text); }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .numbers { grid-template-columns: repeat(3, 1fr); }
  .stat:nth-child(3) { border-right: 0; }
  .stat:nth-child(n+4) { border-top: 1px solid var(--line); }
}

/* ---------- Phone: photo on top, text below ---------- */
@media (max-width: 760px) {
  .hero { align-items: flex-end; }
  .hero-photo { background-position: 80% 20%; }
  .hero-photo::after { background: linear-gradient(0deg, rgba(10,14,12,.92) 0%, rgba(10,14,12,.78) 42%, rgba(10,14,12,.1) 68%, rgba(10,14,12,0) 80%); }
  .hero-panel { width: 100%; padding: 40px 16px 32px; gap: 16px; }
  .lede { font-size: 16px; }
  .hero-actions .btn { flex: 1 1 calc(50% - 10px); justify-content: center; }
  .scroll-cue { display: none; }
  .numbers { grid-template-columns: 1fr 1fr; }
  .stat { border-right: 1px solid var(--line); border-top: 1px solid var(--line); padding: 24px 16px; }
  .stat:nth-child(2n) { border-right: 0; }
  .stat:nth-child(-n+2) { border-top: 0; }
  .stat:last-child { grid-column: 1 / -1; }
  .section, .contact { padding-left: 16px; padding-right: 16px; }
  .cards { grid-template-columns: 1fr; }
  /* Phone: zoom the map onto the Americas + Africa so the countries are big enough to see */
  .map-wrap { overflow: hidden; margin-left: -16px; margin-right: -16px; }
  .world-map { width: 150%; margin-left: -1%; }
  .world-map .map-labels { display: none; }
  .photos { gap: 8px; margin-top: 32px; }
  .photo figcaption { font-size: 12px; padding: 28px 10px 8px; }
  .photo figcaption b { font-size: 10px; }
  .field .chips { display: flex; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .footer { padding: 24px 16px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- Storytelling: YouTube, social, events ---------- */
.stories { border-top: 1px solid var(--line); }
.stories .sub b { color: var(--text); }
.block {
  margin-top: 20px; padding: clamp(18px, 2.4vw, 32px);
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
}
.block .tag { font-size: 13px; font-weight: 600; color: var(--muted); }
.block h3 { font-size: clamp(24px, 2.2vw, 32px); margin-top: 8px; }
.block-head { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 48px); align-items: end; margin-bottom: 24px; }
.block-head.one { grid-template-columns: 1fr; }
.block-head p:not(.tag) { margin-top: 12px; color: var(--muted); max-width: 40em; }
.block-head .feature-stats { border-top: 0; padding-top: 0; }
.block .more { display: inline-block; margin-top: 14px; font-weight: 600; color: var(--accent); text-decoration: none; }
.src { margin-top: 16px; font-size: 13px; color: var(--muted); }
.src a { color: var(--accent); font-weight: 600; text-decoration: none; margin-left: 6px; }
.yt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 16px; }
.yt-grid a { display: flex; flex-direction: column; gap: 8px; color: var(--text); text-decoration: none; }
.yt-grid img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; display: block; transition: opacity .2s; }
.yt-grid a:hover img { opacity: .85; }
.yt-grid .t { font-weight: 600; font-size: 15px; line-height: 1.3; text-wrap: balance; }
.yt-grid .v { font-size: 13px; color: var(--muted); }
.yt-grid .v b { color: var(--text); }
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px 16px; }
.posts .strip { grid-column: 1 / -1; display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: end; }
.posts .strip figcaption { margin: 0; }
.posts figure { margin: 0; }
.posts img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; border-radius: 6px; background: var(--line); }
.posts .strip img { aspect-ratio: 3 / 1; }
.posts figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); text-wrap: balance; }
.posts figcaption b { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 2px; }
.ev-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(150px, 15vw, 230px); gap: 12px; }
.ev-grid figure { position: relative; margin: 0; border-radius: 6px; overflow: hidden; background: var(--line); }
.ev-grid .wide { grid-column: span 2; }
.ev-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ev-grid figcaption {
  position: absolute; inset: auto 0 0 0; padding: 36px 14px 10px;
  background: linear-gradient(0deg, rgba(0,0,0,.8), rgba(0,0,0,0));
  color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
}
@media (max-width: 1100px) {
  .block-head { grid-template-columns: 1fr; align-items: start; }
  .yt-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .yt-grid, .posts { grid-template-columns: 1fr; }
  .posts .strip { grid-column: auto; display: block; }
  .posts .strip figcaption { margin-top: 10px; }
  .ev-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; }
}

/* ---------- Motion (only when html.motion is set, i.e. reduced motion is off) ---------- */
/* 3. Hero: the photo settles slowly; the text rises in on load. */
.motion .hero-photo { animation: hero-settle 20s cubic-bezier(.2,.6,.3,1) both; }
@keyframes hero-settle { from { transform: scale(1.08); } to { transform: scale(1); } }
.motion .hero-panel > * { animation: rise-in .7s cubic-bezier(.2,.7,.3,1) both; }
.motion .hero-panel > :nth-child(2) { animation-delay: .08s; }
.motion .hero-panel > :nth-child(3) { animation-delay: .16s; }
.motion .hero-panel > :nth-child(4) { animation-delay: .24s; }
.motion .hero-panel > :nth-child(5) { animation-delay: .32s; }
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* 1. Numbers: fixed-width digits so the count doesn't jitter. */
.stat .n { font-variant-numeric: tabular-nums; }

/* 2. Map: routes draw out from home, then each country fills in. */
.world-map .route { fill: none; stroke: color-mix(in srgb, var(--hero-accent) 55%, var(--text)); stroke-width: 1.1; stroke-linecap: round; opacity: .7; stroke-dasharray: 1; stroke-dashoffset: 0; }
.motion .world-map:not(.play) .route { stroke-dashoffset: 1; }
.motion .world-map:not(.play) .field-country { opacity: .12; }
.motion .world-map:not(.play) .map-label[data-country] { opacity: 0; }
.motion .world-map.play .route { animation: route-draw .9s cubic-bezier(.4,0,.2,1) var(--d, 0s) backwards; }
.motion .world-map.play .field-country { animation: country-in .5s ease-out calc(var(--d, 0s) + .7s) backwards; }
.motion .world-map.play .map-label[data-country] { animation: label-in .4s ease-out calc(var(--d, 0s) + .8s) backwards; }
@keyframes route-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes country-in { 0% { opacity: .12; } 60% { opacity: 1; filter: brightness(1.6); } 100% { opacity: 1; } }
@keyframes label-in { from { opacity: 0; } to { opacity: 1; } }

/* 4. Photos and post rows rise into place, a beat apart. */
.motion .rise { opacity: 0; transform: translateY(24px); }
.motion .rise.in { opacity: 1; transform: none; transition: opacity .6s ease-out, transform .6s cubic-bezier(.2,.7,.3,1); transition-delay: calc(var(--i, 0) * 90ms); }
