/* OpenFounderSchool showcase — field-notebook theme.
   Paper white, ledger ink, highlighter amber, rubber-stamp red.
   System type stacks only: no webfonts, no external requests. */

:root {
  --ink: #1c2317;
  --ink-soft: #3d4636;
  --paper: #ffffff;
  --wash: #eef0e2;
  --line: #d8dcc6;
  --highlight: #ffd23f;
  --ledger: #207a46;
  --stamp: #c2402a;
  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 8px 16px; z-index: 100;
}
.skip:focus { left: 8px; top: 8px; }
a { color: var(--ledger); }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--highlight); outline-offset: 2px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 2px solid var(--ink);
}
.topbar-inner {
  display: flex; align-items: center; gap: 28px;
  padding-top: 12px; padding-bottom: 12px;
}
.wordmark {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-weight: 700; font-size: 20px;
  color: var(--ink); text-decoration: none; margin-right: auto;
  white-space: nowrap;
}
.nav { display: flex; gap: 20px; }
.nav a { color: var(--ink-soft); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 10px 20px;
  color: var(--ink); background: var(--paper);
  text-decoration: none; font-weight: 600; font-size: 16px;
}
.btn:hover { background: var(--wash); color: var(--ink); }
.btn-primary { background: var(--highlight); }
.btn-primary:hover { background: #f2c41f; color: var(--ink); }
.btn-small { padding: 6px 14px; font-size: 14px; }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: 48px; align-items: start;
  padding-top: 64px; padding-bottom: 56px;
}
.stamp {
  display: inline-block;
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  color: var(--stamp);
  border: 2px solid var(--stamp); border-radius: 4px;
  padding: 3px 12px; margin: 0 0 20px;
  transform: rotate(-2deg);
  text-transform: lowercase; letter-spacing: 0.04em;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(40px, 5.4vw, 62px);
  line-height: 1.04; letter-spacing: -0.01em;
  margin: 0 0 20px;
}
.lede { font-size: 19px; color: var(--ink-soft); max-width: 34em; margin: 0 0 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.tuition-line {
  font-size: 14.5px; color: var(--ink-soft);
  border-top: 1px solid var(--line); padding-top: 16px; max-width: 38em;
}

/* ---------- chat + terminal windows ---------- */
.chat, .terminal {
  border: 2px solid var(--ink); border-radius: 10px;
  overflow: hidden; background: var(--paper);
  box-shadow: 6px 6px 0 var(--wash);
}
.chat-head {
  display: flex; align-items: center; gap: 7px;
  background: var(--ink); color: #fff;
  padding: 10px 14px;
  font-family: var(--mono); font-size: 12.5px;
}
.dot { width: 10px; height: 10px; border-radius: 50%; background: #8a9382; }
.chat-title { margin-left: 6px; }
.chat-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.bubble {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 13px; font-size: 14.5px; line-height: 1.55;
  background: var(--paper);
}
.bubble strong {
  display: block; font-family: var(--mono); font-size: 11.5px;
  color: var(--ledger); margin-bottom: 3px;
}
.bubble.student strong { color: var(--stamp); }
.bubble.coach { background: var(--wash); }
.saved {
  display: inline-block; background: var(--highlight);
  padding: 0 6px; border-radius: 3px; font-size: 13px;
}
.caption { font-size: 13.5px; color: var(--ink-soft); margin: 12px 0 0; }
.hero-art .caption { text-align: right; }

/* ---------- stats strip ---------- */
.stats { border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.stats-inner {
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding-top: 22px; padding-bottom: 22px; gap: 16px;
}
.stats-inner > div { border-left: 1px solid var(--line); padding-left: 16px; }
.stats-inner > div:first-child { border-left: none; padding-left: 0; }
.num { display: block; font-family: var(--mono); font-weight: 700; font-size: 30px; }
.lbl { font-size: 13.5px; color: var(--ink-soft); }

/* ---------- sections ---------- */
.section { padding-top: 72px; padding-bottom: 8px; }
.section-head { max-width: 44em; margin-bottom: 36px; }
.section-head h2 {
  font-family: var(--serif); font-size: clamp(30px, 3.6vw, 42px);
  line-height: 1.1; margin: 0 0 12px;
}
.section-head p { color: var(--ink-soft); font-size: 18px; margin: 0; }

/* ---------- phases ---------- */
.phases {
  list-style: none; margin: 0 0 40px; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border: 2px solid var(--ink); border-radius: 10px; overflow: hidden;
}
.phase { padding: 22px 20px; border-left: 2px solid var(--ink); }
.phase:first-child { border-left: none; }
.phase-no {
  font-family: var(--mono); font-size: 12.5px; font-weight: 700;
  display: inline-block; padding: 2px 10px; border-radius: 20px;
  margin-bottom: 12px; border: 1.5px solid var(--ink);
}
.p1 .phase-no { background: var(--highlight); }
.p2 .phase-no { background: #bfe3cd; }
.p3 .phase-no { background: #f4c9a8; }
.p4 .phase-no { background: var(--ink); color: #fff; }
.phase h3 { font-family: var(--serif); font-size: 21px; margin: 0 0 2px; }
.phase .weeks { font-family: var(--mono); font-size: 13px; color: var(--ink-soft); margin: 0 0 10px; }
.phase p { font-size: 14.5px; margin: 0; color: var(--ink-soft); }
.phase p.weeks { margin-bottom: 10px; }

/* ---------- week grid ---------- */
.weekgrid-block { margin-bottom: 56px; }
.weekgrid {
  display: grid; grid-template-columns: repeat(40, 1fr);
  gap: 3px; margin-top: 12px;
}
.weekgrid span {
  aspect-ratio: 1 / 1; border-radius: 2px; min-width: 0;
  border: 1px solid rgba(28, 35, 23, 0.25);
}
.w1 { background: var(--highlight); }
.w2 { background: #5da87f; }
.w3 { background: #dd8a4b; }
.w4 { background: var(--ink); }

/* ---------- lesson ---------- */
.lesson-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 32px; margin-bottom: 56px; }
.factlist { margin: 0; }
.factlist > div {
  display: grid; grid-template-columns: 150px 1fr; gap: 16px;
  padding: 16px 0; border-top: 1px solid var(--line);
}
.factlist > div:last-child { border-bottom: 1px solid var(--line); }
.factlist dt {
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  text-transform: none; color: var(--ledger); padding-top: 3px;
}
.factlist dd { margin: 0; font-size: 15.5px; }
.review-card {
  border: 2px solid var(--ink); border-radius: 10px;
  padding: 24px; background: var(--wash); align-self: start;
  box-shadow: 6px 6px 0 var(--highlight);
}
.review-card h3 { font-family: var(--serif); font-size: 22px; margin: 0 0 8px; }
.review-card p { font-size: 15px; margin: 0 0 12px; }
.review-card ol { margin: 0 0 12px; padding-left: 22px; font-size: 15px; }

/* ---------- student work rows ---------- */
.work-rows { display: flex; flex-direction: column; margin-bottom: 56px; }
.work-row {
  display: grid; grid-template-columns: 220px 1fr 1.2fr; gap: 24px;
  align-items: start; padding: 24px 0;
  border-top: 2px solid var(--ink);
}
.work-row:last-child { border-bottom: 2px solid var(--ink); }
.work-row h3 { font-family: var(--serif); font-size: 22px; margin: 0; }
.work-row p { margin: 0; font-size: 15.5px; color: var(--ink-soft); }
.work-row pre {
  margin: 0; background: var(--ink); color: #f2f3ea;
  border-radius: var(--radius); padding: 14px 16px;
  font-family: var(--mono); font-size: 12.8px; line-height: 1.6;
  overflow-x: auto; white-space: pre-wrap;
}

/* ---------- dark demo section ---------- */
.dark { background: var(--ink); color: #f2f3ea; margin-top: 64px; }
.dark .wrap { padding-top: 72px; padding-bottom: 72px; }
.dark .section-head p { color: #c9cec0; }
.dark h2 { color: #fff; }
.demo-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 40px; align-items: start; }
.steps { margin: 0; padding-left: 24px; font-size: 16px; }
.steps li { margin-bottom: 16px; }
.steps a, .dark a { color: var(--highlight); }
.steps q { quotes: "“" "”"; font-style: italic; }
.terminal {
  border-color: #000; background: #10140c;
  box-shadow: 6px 6px 0 rgba(255, 210, 63, 0.35);
}
.terminal .chat-body p { margin: 0; font-size: 14.5px; line-height: 1.55; }
.who {
  display: inline-block; font-family: var(--mono); font-size: 11.5px; font-weight: 700;
  background: var(--ledger); color: #fff; border-radius: 3px;
  padding: 1px 8px; margin-right: 8px;
}
.who.you { background: var(--stamp); }
.dim { color: #9aa392; font-size: 13px; }

/* ---------- platforms table ---------- */
.table-scroll { overflow-x: auto; margin-bottom: 56px; }
table.platforms { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.platforms th, .platforms td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.platforms thead th {
  font-family: var(--mono); font-size: 13px;
  border-bottom: 2px solid var(--ink); border-top: 2px solid var(--ink);
}
.platforms tbody tr:hover { background: var(--wash); }
.platforms td:first-child { font-weight: 700; white-space: nowrap; }

/* ---------- cost ---------- */
.cost-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 32px; margin-bottom: 28px; }
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { padding: 12px 0 12px 34px; position: relative; border-bottom: 1px solid var(--line); font-size: 16px; }
.ticks li::before {
  content: "✓"; position: absolute; left: 2px; top: 12px;
  font-family: var(--mono); font-weight: 700; color: var(--ledger);
}
.note {
  border: 2px dashed var(--stamp); border-radius: 10px;
  padding: 22px 24px; align-self: start; transform: rotate(0.6deg);
}
.note h3 { font-family: var(--serif); font-size: 21px; margin: 0 0 8px; color: var(--stamp); }
.note p { margin: 0; font-size: 15px; }
.start-cta { font-family: var(--serif); font-size: 21px; margin: 0 0 64px; }
.start-cta a { font-weight: 700; }

/* ---------- footer ---------- */
footer { border-top: 2px solid var(--ink); background: var(--wash); }
.foot-inner { padding-top: 32px; padding-bottom: 36px; font-size: 14px; color: var(--ink-soft); }
.foot-inner p { margin: 0 0 10px; max-width: 62em; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 44px; }
  .hero-art .caption { text-align: left; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .stats-inner > div { border-left: none; padding-left: 0; }
  .phases { grid-template-columns: 1fr 1fr; }
  .phase:nth-child(odd) { border-left: none; }
  .phase { border-top: 2px solid var(--ink); }
  .phase:nth-child(-n+2) { border-top: none; }
  .weekgrid { grid-template-columns: repeat(20, 1fr); }
  .lesson-grid, .demo-grid, .cost-grid { grid-template-columns: 1fr; }
  .work-row { grid-template-columns: 1fr; gap: 10px; }
  .nav { display: none; }
}

/* ---------- dark theme ---------- */
[data-theme="dark"] {
  --ink: #f0f2e7;
  --ink-soft: #b9c0ab;
  --paper: #10130c;
  --wash: #1d2317;
  --line: #333b2a;
  --ledger: #7cc79b;
  --stamp: #e0704f;
}
[data-theme="dark"] .topbar { background: rgba(16, 19, 12, 0.96); }
[data-theme="dark"] .chat,
[data-theme="dark"] .mock { box-shadow: 6px 6px 0 #000; }
[data-theme="dark"] .bubble.coach { background: #1d2317; }
[data-theme="dark"] .review-card { background: #1d2317; }
[data-theme="dark"] footer { background: #0b0e08; }
[data-theme="dark"] .dark { background: #0b0e08; }
[data-theme="dark"] .work-row pre { background: #000; }
[data-theme="dark"] .btn-primary { color: #1c2317; }
[data-theme="dark"] .btn-primary:hover { color: #1c2317; }
[data-theme="dark"] .p4 .phase-no { background: var(--highlight); color: #1c2317; }
[data-theme="dark"] .stamp { color: var(--stamp); border-color: var(--stamp); }

/* ---------- platform preview tabs ---------- */
.tabs { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.tab {
  font-family: var(--mono); font-size: 14px; font-weight: 700;
  border: 2px solid var(--ink); border-radius: 20px;
  background: transparent; color: var(--ink-soft);
  padding: 8px 20px; cursor: pointer;
}
.tab[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"]:hover { color: var(--paper); }
.panel { margin-bottom: 56px; }
.mock {
  border: 2px solid var(--ink); border-radius: 10px;
  overflow: hidden; background: var(--paper);
  box-shadow: 6px 6px 0 var(--wash);
  max-width: 640px;
}
.mock.grok .chat-head { background: #000; }
.mock.claude .chat-head { background: #4a3f30; }
.mock.chatgpt .chat-head { background: #0d533f; }
.js .msg { opacity: 0; transform: translateY(10px); }
.js .msg.on { opacity: 1; transform: none; transition: opacity 0.45s ease, transform 0.45s ease; }
.replay {
  background: none; border: none; padding: 0;
  color: var(--ledger); font: inherit; font-size: inherit;
  text-decoration: underline; cursor: pointer;
}
.replay:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .msg { opacity: 1; transform: none; }
  .msg.on { transition: none; }
}
