/* EduCraft · Education and Adventure
   House style: warm / premium cream (F: drive design system).
   Faces: Fraunces (display, variable) + Nunito Sans (body, variable), self-hosted. */

/* ============ fonts ============ */
@font-face {
  font-family: "Fraunces";
  src: url("assets/fonts/Fraunces.var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Nunito Sans";
  src: url("assets/fonts/NunitoSans.var.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}

/* ============ tokens: primitives ============ */
:root {
  /* cream ramp */
  --cream-0: #fdfaf4;
  --cream-1: #fbf7ef;
  --cream-2: #f6efe0;
  --cream-3: #efe6d2;
  --cream-4: #e3d9c8;
  /* ink ramp (warm) */
  --ink-0: #2b2519;
  --ink-1: #4a4234;
  --ink-2: #6d6455;
  --ink-3: #8d8474;
  /* olive ramp */
  --olive-0: #465236;
  --olive-1: #5d6b47;
  --olive-2: #7a8a5e;
  --olive-3: #aab68d;
  --olive-4: #e2e7d3;
  /* ochre + rose */
  --ochre-0: #8a5f22;
  --ochre-1: #a9772e;
  --ochre-2: #d9a857;
  --rose-0: #8e3f39;
  --rose-1: #b0524a;
  /* status */
  --green: #446937;
  --red: #a8433b;
  /* spacing scale */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;
  /* type scale */
  --t-xs: 13px; --t-sm: 15px; --t-md: 16px; --t-lg: 18px;
  --t-xl: 21px; --t-2xl: 26px; --t-3xl: 34px;
  /* radius: quiet, nested-aware */
  --r-sm: 4px; --r-md: 8px; --r-lg: 12px;
}

/* ============ tokens: semantic ============ */
:root {
  --background: var(--cream-1);
  --background-raised: var(--cream-0);
  --surface: var(--cream-0);
  --surface-alt: var(--cream-2);
  --surface-deep: var(--olive-0);
  --text-primary: var(--ink-0);
  --text-secondary: var(--ink-1);
  --text-muted: var(--ink-2);
  --text-on-deep: #f2efe6;
  --text-on-deep-muted: #c8c9b8;
  --border: var(--cream-4);
  --border-strong: #d3c7b0;
  --accent: var(--olive-1);
  --accent-strong: var(--olive-0);
  --accent-fg: #f4f2ea;
  --highlight: var(--ochre-0);
  --heart: var(--rose-1);
  --focus-ring: 2px solid var(--ochre-1);
  --shadow-card: 0 1px 0 rgba(74, 66, 52, 0.06), 0 8px 24px -16px rgba(74, 66, 52, 0.35);
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Nunito Sans", "Segoe UI", Verdana, sans-serif;
}

/* ============ base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--background);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--t-md);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 var(--s-4);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(34px, 5.2vw, 56px); }
h2 { font-size: var(--t-3xl); }
h3 { font-size: var(--t-xl); }
p { margin: 0 0 var(--s-4); }
a { color: var(--accent-strong); text-decoration-color: var(--olive-3); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent-strong); }
:focus-visible { outline: var(--focus-ring); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--olive-4); }
code, .mono {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.92em;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 1px 6px;
}
.num { font-variant-numeric: tabular-nums; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--s-5); }
.section { padding: var(--s-8) 0; }
.section--alt { background: var(--surface-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.eyebrow {
  display: inline-block;
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--highlight);
  margin-bottom: var(--s-3);
}
.lede { font-size: var(--t-lg); color: var(--text-secondary); max-width: 62ch; }

/* ============ buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font: 700 var(--t-md) var(--font-body);
  padding: 10px 22px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}
.btn--primary { background: var(--accent); color: var(--accent-fg); }
.btn--primary:hover { background: var(--accent-strong); }
.btn--primary:active { background: var(--olive-0); }
.btn--ghost { background: transparent; color: var(--accent-strong); border-color: var(--border-strong); }
.btn--ghost:hover { border-color: var(--accent); background: var(--olive-4); }
.btn--ghost:active { background: var(--olive-3); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn svg { flex: none; }

/* ============ topbar ============ */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--cream-1) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.topbar__row { display: flex; align-items: center; gap: var(--s-5); padding: var(--s-3) 0; }
.wordmark {
  display: flex; align-items: center; gap: var(--s-2);
  font-family: var(--font-display); font-weight: 700; font-size: var(--t-lg);
  color: var(--text-primary); text-decoration: none;
}
.wordmark svg { display: block; }
.topbar nav { margin-left: auto; display: flex; gap: var(--s-4); align-items: center; }
.topbar nav a {
  font-size: var(--t-sm); font-weight: 600; color: var(--text-secondary);
  text-decoration: none; padding: 6px 8px; border-radius: var(--r-sm);
}
.topbar nav a:hover { color: var(--text-primary); background: var(--surface-alt); }
.topbar .btn { padding: 7px 16px; font-size: var(--t-sm); }

/* ============ hero ============ */
.hero { position: relative; overflow: hidden; background: var(--cream-1); }
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--s-7); align-items: start;
  padding: var(--s-8) 0 calc(var(--s-8) + 300px);
}
.hero h1 { max-width: 15ch; }
.hero .lede { margin-bottom: var(--s-5); }
.hero__cta { display: flex; gap: var(--s-3); flex-wrap: wrap; align-items: center; }
.hero__meta { margin-top: var(--s-4); font-size: var(--t-sm); color: var(--text-muted); }
.hero__art {
  position: absolute; inset: auto 0 0 0; height: 300px;
  pointer-events: none; line-height: 0;
}
.hero__art svg { width: 100%; height: 100%; display: block; }
.hero__art img { width: 100%; height: 100%; object-fit: cover; object-position: bottom; display: block; }

/* partner line under the CTAs */
.partner-line {
  display: inline-flex; align-items: center; gap: var(--s-2);
  margin-top: var(--s-5); font-size: var(--t-sm); font-weight: 700;
  color: var(--text-secondary);
}
.partner-line svg { display: block; }

/* ============ status card ============ */
.status-card {
  position: relative; z-index: 2;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: var(--s-5);
}
.status-card__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s-4); }
.status-card__head h3 { margin: 0; font-size: var(--t-lg); }
.status-pill {
  font-size: var(--t-xs); font-weight: 700; letter-spacing: 0.04em;
  padding: 3px 10px; border-radius: 999px; border: 1px solid transparent;
}
.status-pill--private { background: var(--olive-4); color: var(--accent-strong); border-color: var(--olive-3); }
.status-card dl {
  display: grid; grid-template-columns: auto 1fr; gap: var(--s-2) var(--s-4);
  margin: 0 0 var(--s-4); font-size: var(--t-sm);
}
.status-card dt { color: var(--text-muted); }
.status-card dd { margin: 0; font-weight: 700; text-align: right; }
.status-card__note {
  font-size: var(--t-xs); color: var(--text-muted);
  margin: 0; padding-top: var(--s-3); border-top: 1px solid var(--border);
}

/* ============ learn: curriculum ledger ============ */
.ledger { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s-7); }
.ledger__item {
  display: grid; grid-template-columns: 56px 1fr; gap: var(--s-4);
  padding: var(--s-5) 0; border-top: 1px solid var(--border-strong);
}
.ledger__num {
  font-family: var(--font-display); font-size: var(--t-2xl); font-weight: 600;
  color: var(--olive-2); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ledger__item h3 { margin-bottom: var(--s-2); }
.ledger__item p { margin-bottom: var(--s-2); color: var(--text-secondary); font-size: var(--t-sm); }
.ledger__mods { font-size: var(--t-xs); color: var(--text-muted); }
.ledger__mods strong { color: var(--ochre-0); font-weight: 700; }

/* ============ adventure: deep band ============ */
.deep { background: var(--surface-deep); color: var(--text-on-deep); }
.deep .eyebrow { color: #e3bc6f; }
.deep h2 { color: var(--text-on-deep); }
.deep .lede { color: var(--text-on-deep-muted); }
.deep-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-6); margin-top: var(--s-6); }
.deep-grid h3 { color: var(--text-on-deep); font-size: var(--t-lg); margin-bottom: var(--s-2); }
.deep-grid p { color: var(--text-on-deep-muted); font-size: var(--t-sm); margin: 0; }
.deep-grid .rule { width: 40px; height: 3px; background: var(--ochre-2); margin-bottom: var(--s-3); }
.facts {
  margin-top: var(--s-7); padding-top: var(--s-5);
  border-top: 1px solid #5a6a48;
  display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-7);
}
.facts div { font-size: var(--t-sm); color: var(--text-on-deep-muted); }
.facts strong { display: block; font-size: var(--t-xl); font-weight: 700; color: var(--text-on-deep); font-variant-numeric: tabular-nums; }

/* ============ join steps ============ */
.steps { counter-reset: step; max-width: 760px; }
.step {
  counter-increment: step;
  position: relative;
  padding: 0 0 var(--s-6) 72px;
}
.step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 0;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  font: 600 var(--t-lg) var(--font-display);
  color: var(--accent-strong);
}
.step:not(:last-child)::after {
  content: ""; position: absolute; left: 24px; top: 56px; bottom: 8px;
  width: 1px; background: var(--border-strong);
}
.step h3 { margin-bottom: var(--s-2); }
.step p { color: var(--text-secondary); font-size: var(--t-sm); max-width: 60ch; }
.step .btn { margin-top: var(--s-2); }
/* Practical caveat under a step (exact spelling, no real names). De-emphasised
   by colour and a hairline rule rather than another box, so it reads as an
   aside to the step above it and not as a second instruction competing with it. */
.step-note {
  margin-top: var(--s-3);
  padding-left: var(--s-3);
  border-left: 2px solid var(--border-strong);
  color: var(--text-muted);
  font-size: var(--t-xs);
}

/* ============ mods table ============ */
.mods-table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.mods-table caption { text-align: left; font-size: var(--t-xs); color: var(--text-muted); padding: var(--s-2) 0; caption-side: bottom; }
.mods-table th {
  text-align: left; font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted); font-weight: 700;
  padding: var(--s-2) var(--s-3); border-bottom: 2px solid var(--border-strong);
}
.mods-table td { padding: 7px var(--s-3); border-bottom: 1px solid var(--border); vertical-align: top; }
.mods-table td:last-child { color: var(--text-secondary); }
.mods-table .group td {
  padding-top: var(--s-5);
  font-family: var(--font-display); font-weight: 600; font-size: var(--t-md);
  color: var(--ochre-0); border-bottom: 1px solid var(--border-strong);
}
.mods-table .ver { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text-muted); }
.table-scroll { overflow-x: auto; }

/* ============ parents ============ */
.parents-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-7); }
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li {
  position: relative; padding: var(--s-2) 0 var(--s-2) 32px;
  border-bottom: 1px solid var(--border);
  font-size: var(--t-sm); color: var(--text-secondary);
}
.check-list li strong { color: var(--text-primary); }
.check-list li svg { position: absolute; left: 0; top: 11px; }
.parents-aside {
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--r-lg); padding: var(--s-5);
}
.parents-aside h3 { font-size: var(--t-lg); }
.parents-aside p { font-size: var(--t-sm); color: var(--text-secondary); }
.parents-aside p:last-child { margin-bottom: 0; }

/* ============ faq ============ */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--border-strong); }
.faq summary {
  cursor: pointer; list-style: none;
  font-weight: 700; font-size: var(--t-md);
  padding: var(--s-4) 0; position: relative; padding-right: 36px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-display); font-size: var(--t-xl); color: var(--accent);
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--text-secondary); font-size: var(--t-sm); padding-bottom: var(--s-4); max-width: 65ch; }
.faq summary:hover { color: var(--accent-strong); }

/* ============ footer ============ */
.footer { background: var(--surface-deep); color: var(--text-on-deep-muted); padding: var(--s-7) 0; }
.footer__row { display: flex; gap: var(--s-6); align-items: flex-start; flex-wrap: wrap; }
.footer .wordmark { color: var(--text-on-deep); }
.footer p { font-size: var(--t-sm); max-width: 46ch; }
.footer nav { margin-left: auto; display: grid; gap: var(--s-2); }
.footer nav a { color: var(--text-on-deep-muted); font-size: var(--t-sm); text-decoration-color: #5a6a48; }
.footer nav a:hover { color: var(--text-on-deep); }
.footer__legal { margin-top: var(--s-6); padding-top: var(--s-4); border-top: 1px solid #5a6a48; font-size: var(--t-xs); }

/* ============ responsive ============ */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: var(--s-6); padding-bottom: calc(var(--s-6) + 190px); }
  .ledger { grid-template-columns: 1fr; }
  .deep-grid { grid-template-columns: 1fr; }
  .parents-grid { grid-template-columns: 1fr; }
  .topbar nav a:not(.btn) { display: none; }
  .hero__art { height: 190px; }
}

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