:root {
  --font-sans: "Figtree", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  --bg: #f3efe7;
  --surface: #fffbf4;
  --fg: #1a1714;
  --muted: #6b6358;
  --subtle: #8a8176;
  --primary: #243447;
  --primary-fg: #f3efe7;
  --border: #e4ddd2;
  --good: #2f5d50;
  --danger: #8f3d32;
  --reward: #b5522a;
  --shadow: 0 0 0 1px rgba(26, 23, 20, 0.06), 0 1px 2px -1px rgba(26, 23, 20, 0.06),
    0 2px 4px 0 rgba(26, 23, 20, 0.04);
  --shadow-hover: 0 0 0 1px rgba(26, 23, 20, 0.1), 0 8px 20px -12px rgba(26, 23, 20, 0.12);
  --max: 72rem;
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; background: var(--bg); color: var(--fg); }
body {
  margin: 0;
  font-family: var(--font-sans);
  line-height: 1.5;
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
}
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.03em; text-wrap: balance; font-weight: 560; }
p { text-wrap: pretty; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button, [role="button"] { cursor: pointer; font-family: inherit; }
::selection { background: color-mix(in oklab, var(--primary) 18%, transparent); }

.wrap { width: min(var(--max), calc(100% - 2rem)); margin-inline: auto; }
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}
.site-header.is-solid { border-bottom-color: var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 4rem; }
.logo { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; font-family: var(--font-display); font-size: 1.15rem; }
.nav-desk { display: none; gap: 1.4rem; font-size: 0.9rem; color: var(--muted); }
.nav-desk a { text-decoration: none; }
.nav-desk a:hover { color: var(--fg); }
.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.burger { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 0; background: none; border-radius: 12px; }
.mobile-nav { display: none; border-top: 1px solid var(--border); background: var(--bg); padding: 0.75rem 1rem 1rem; }
.mobile-nav.open { display: block; }
.mobile-nav a { display: flex; align-items: center; height: 2.75rem; text-decoration: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-height: 2.75rem; padding: 0.55rem 1.1rem; border-radius: 12px;
  border: 1px solid transparent; text-decoration: none; font-weight: 600; font-size: 0.95rem;
  background: var(--primary); color: var(--primary-fg);
}
.btn:hover { filter: brightness(1.08); }
.btn-lg { min-height: 3.1rem; padding: 0.7rem 1.25rem; }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--border); }
.btn-light { background: var(--bg); color: var(--fg); }

.kicker { font-size: 0.82rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
h1.display { font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.08; margin: 0.7rem 0 0; }
h2.display { font-size: clamp(1.7rem, 3.4vw, 2.4rem); line-height: 1.12; margin: 0.4rem 0 0; }
.lede { max-width: 36rem; color: var(--muted); font-size: 1.05rem; }

.hero { display: grid; gap: 2.4rem; padding: 2.5rem 0 3rem; align-items: center; }
.hero figure img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 24px; outline: 1px solid rgba(0,0,0,.08); }
.hero figcaption, .muted { color: var(--muted); }
.subtle { color: var(--subtle); font-size: 0.9rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.6rem; }

.band-primary { background: var(--primary); color: var(--primary-fg); padding: 3.5rem 0; }
.band-primary .kicker, .band-primary .lede { color: color-mix(in oklab, var(--primary-fg) 72%, transparent); }
.grid-3 { display: grid; gap: 0.8rem; }
.tile { background: color-mix(in oklab, var(--primary-fg) 10%, transparent); border-radius: 16px; padding: 1rem; }

.terrain { position: relative; overflow: hidden; }
.terrain > img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.terrain .veil { position: relative; background: color-mix(in oklab, var(--bg) 55%, transparent); padding: 3.5rem 0; }
.card {
  background: color-mix(in oklab, var(--surface) 94%, transparent);
  border-radius: 16px; padding: 1.2rem 1.3rem; box-shadow: var(--shadow);
  text-decoration: none; display: block; color: inherit;
}
.card:hover { box-shadow: var(--shadow-hover); }
.card h3 { margin: 0; font-size: 1.35rem; }

.speaker-grid { display: grid; gap: 1rem; }
.speaker-card { overflow: hidden; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); text-decoration: none; display: flex; flex-direction: column; height: 100%; }
.speaker-card img { height: 8rem; width: 100%; object-fit: cover; }
.speaker-card .body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.figure { font-family: var(--font-display); font-size: 1.9rem; }

.site-footer { border-top: 1px solid var(--border); padding: 3rem 0 2rem; margin-top: 2rem; }
.footer-grid { display: grid; gap: 2rem; }
.footer-grid h4 { margin: 0 0 0.7rem; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.footer-grid a { display: block; text-decoration: none; color: var(--muted); padding: 0.2rem 0; }
.footer-grid a:hover { color: var(--fg); }

.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip { border-radius: 999px; padding: 0.35rem 0.85rem; border: 1px solid var(--border); text-decoration: none; font-size: 0.88rem; background: var(--surface); }
.chip.on { background: var(--primary); color: var(--primary-fg); border-color: var(--primary); }

.unit { padding: 1.1rem 0; border-bottom: 1px solid var(--border); }
.unit:last-child { border-bottom: 0; }
.lesson-link { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; text-decoration: none; }
.lesson-link span { color: var(--muted); font-size: 0.9rem; }
.done { color: var(--good); }

.lesson-stage { max-width: 36rem; margin: 2rem auto 4rem; }
.prompt-card { background: var(--surface); border-radius: 20px; padding: 1.6rem; box-shadow: var(--shadow); min-height: 12rem; }
.options { display: grid; gap: 0.55rem; margin-top: 1rem; }
.opt { text-align: left; padding: 0.85rem 1rem; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); font-size: 1rem; }
.opt.good { border-color: var(--good); background: color-mix(in oklab, var(--good) 12%, var(--surface)); }
.opt.bad { border-color: var(--danger); animation: shake 280ms ease; }
.bar { height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--reward); width: 0; }

.flash { background: color-mix(in oklab, var(--good) 14%, var(--surface)); border-radius: 12px; padding: 0.8rem 1rem; margin: 1rem 0; }
.flash.err { background: color-mix(in oklab, var(--danger) 12%, var(--surface)); }
.form { display: grid; gap: 0.8rem; max-width: 28rem; }
label { font-size: 0.92rem; }
input, textarea, select {
  width: 100%; margin-top: 0.3rem; padding: 0.7rem 0.8rem; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); font: inherit; color: inherit;
}
.prose { max-width: 42rem; }
.prose p { color: var(--muted); }
.list { display: grid; gap: 0.8rem; }
.native { font-size: 1.25rem; }

.game-board { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.45rem; max-width: 28rem; }
.pit { aspect-ratio: 1; border-radius: 999px; border: 2px solid var(--primary); background: var(--surface); display: grid; place-items: center; font-family: var(--font-display); font-size: 1.1rem; }
.pit.mine { background: color-mix(in oklab, var(--reward) 16%, var(--surface)); }
.hop { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.4rem; }
.hop button { min-height: 3.2rem; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.hop button.on { background: var(--primary); color: var(--primary-fg); }

@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.rise { animation: rise 420ms cubic-bezier(0.22,1,0.36,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (min-width: 800px) {
  .nav-desk { display: flex; }
  .burger { display: none; }
  .hero { grid-template-columns: 1.1fr 0.9fr; padding: 3.5rem 0; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .speaker-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
  .two { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
}
