/* ─────────────────────────────────────────────
   100dayslearning — 3 aesthetic directions
   Toggle via body[data-theme="editorial|terminal|sketch"]
   ───────────────────────────────────────────── */

:root {
  --max: 1180px;
  --gutter: clamp(20px, 4vw, 56px);
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: default; }

/* ─── Editorial ─────────────────────────────── */
body[data-theme="editorial"] {
  --bg: #f6f1e7;
  --bg-2: #efe7d6;
  --card: #fbf7ee;
  --ink: #2a241b;
  --ink-2: #5a4f3e;
  --muted: #8a7e6a;
  --rule: #d8cdb6;
  --accent: #8a3c1d;          /* burnt sienna */
  --accent-ink: #fbf7ee;
  --good: #5a6b3a;

  --font-display: "Newsreader", "Source Serif Pro", Georgia, serif;
  --font-body: "Newsreader", Georgia, serif;
  --font-ui: "Inconsolata", ui-monospace, monospace;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --display-weight: 500;
  --display-tracking: -0.015em;
}

/* ─── Terminal ──────────────────────────────── */
body[data-theme="terminal"] {
  --bg: #0e1014;
  --bg-2: #161a21;
  --card: #161a21;
  --ink: #d6dbe4;
  --ink-2: #9aa3b2;
  --muted: #5d6573;
  --rule: #232831;
  --accent: #7ee787;          /* GH green */
  --accent-ink: #0e1014;
  --good: #7ee787;

  --font-display: "JetBrains Mono", ui-monospace, monospace;
  --font-body: "JetBrains Mono", ui-monospace, monospace;
  --font-ui: "JetBrains Mono", ui-monospace, monospace;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --display-weight: 600;
  --display-tracking: -0.01em;
}

/* ─── Sketch ───────────────────────────────── */
body[data-theme="sketch"] {
  --bg: #f4ede1;
  --bg-2: #ece2cf;
  --card: #fbf6ea;
  --ink: #1f1b17;
  --ink-2: #4a4138;
  --muted: #7a6d5d;
  --rule: #cdbfa4;
  --accent: #c2410c;          /* warm orange */
  --accent-ink: #fbf6ea;
  --good: #4d6b1e;

  --font-display: "Caveat", "Patrick Hand", cursive;
  --font-body: "Lora", Georgia, serif;
  --font-ui: "Lora", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --display-weight: 700;
  --display-tracking: 0;
}

/* ─── Layout primitives ─────────────────────── */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 54px 0; border-top: 1px solid var(--rule); }
.section:first-of-type { border-top: 0; }

.eyebrow {
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  color: var(--ink);
  margin: 0;
  line-height: 1.05;
  text-wrap: balance;
}
h1 { font-size: clamp(44px, 6.4vw, 84px); }
h2 { font-size: clamp(32px, 4.4vw, 54px); line-height: 1.08; }
h3 { font-size: clamp(20px, 2vw, 26px); line-height: 1.2; }

/* Sketch boosts display further; Newsreader needs less */
body[data-theme="sketch"] h1 { font-size: clamp(56px, 9vw, 120px); line-height: 0.95; }
body[data-theme="sketch"] h2 { font-size: clamp(40px, 6vw, 72px); line-height: 1; }
body[data-theme="terminal"] h1 { font-size: clamp(34px, 4.8vw, 60px); line-height: 1.1; }
body[data-theme="terminal"] h2 { font-size: clamp(26px, 3.4vw, 40px); line-height: 1.15; }

p { margin: 0 0 1em; color: var(--ink-2); text-wrap: pretty; }
.lead { font-size: clamp(18px, 1.5vw, 22px); color: var(--ink-2); line-height: 1.5; max-width: 56ch; }

/* ─── Buttons ─────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 22px;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--accent-ink);
  transition: transform .12s ease, box-shadow .12s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 14px -8px var(--ink); }
.btn .arrow { transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
}
.btn-ghost:hover { background: var(--card); box-shadow: none; }

body[data-theme="terminal"] .btn { border-radius: 4px; }
body[data-theme="terminal"] .btn::before { content: "$ "; opacity: .6; }
body[data-theme="sketch"] .btn { border-radius: 999px; font-family: var(--font-body); font-weight: 600; }

/* ─── Nav ─────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid color-mix(in oklab, var(--rule) 60%, transparent);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 88px;
}
.nav-logo {
  font-family: var(--font-ui);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.025em;
  display: flex; align-items: center; gap: 10px;
  color: var(--ink);
}
.nav-logo .dot {
  display: inline-block; width: 11px; height: 11px;
  border-radius: 50%; background: var(--accent);
}
.nav-links { display: flex; align-items: center; gap: 26px; font-family: var(--font-ui); font-size: 14px; color: var(--ink-2); }
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  font-family: var(--font-ui); font-size: 14px;
  padding: 8px 14px; border: 1px solid var(--rule); border-radius: var(--r-md);
  color: var(--ink);
}
.nav-cta:hover { border-color: var(--ink); }

body[data-theme="sketch"] .nav-logo { font-family: var(--font-display); font-size: 46px; letter-spacing: 0; font-weight: 700; }

/* ─── Hero ────────────────────────────────── */
.hero { padding: clamp(10px, 4vh, 64px) 0 96px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; } }

.hero h1 .stroke {
  position: relative; display: inline-block;
}
.hero h1 .stroke::after {
  content: ""; position: absolute; left: -2%; right: -2%; bottom: 0.08em; height: 0.34em;
  background: var(--accent); opacity: .22; z-index: -1; border-radius: 4px;
}
body[data-theme="sketch"] .hero h1 .stroke::after {
  background: none;
  border-bottom: 6px solid var(--accent);
  border-radius: 0;
  height: auto; bottom: 0.04em;
  transform: rotate(-1deg);
  opacity: .9;
}
body[data-theme="terminal"] .hero h1 .stroke::after { display: none; }
body[data-theme="terminal"] .hero h1 .stroke { color: var(--accent); }

.hero .cta-row {
  display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; align-items: center;
}
.free-tag {
  font-family: var(--font-ui); font-size: 13px; color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 8px;
}
.free-tag .pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--good);
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--good) 60%, transparent);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--good) 60%, transparent); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ─── Streak grid (hero visual) ───────────── */
.streak-card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 24px;
  position: relative;
}
body[data-theme="terminal"] .streak-card { border-radius: 6px; }
body[data-theme="sketch"] .streak-card {
  transform: rotate(0.6deg);
  box-shadow: 0 12px 30px -18px rgba(80, 50, 20, .35);
}

.streak-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 16px; font-family: var(--font-ui); font-size: 13px; color: var(--muted);
}
.streak-head b { color: var(--ink); font-weight: 600; }

.streak-grid {
  display: grid;
  grid-template-columns: repeat(20, 1fr);
  gap: 4px;
}
.streak-cell {
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--bg-2);
  border: 1px solid color-mix(in oklab, var(--rule) 60%, transparent);
}
.streak-cell.done { background: var(--accent); border-color: transparent; }
.streak-cell.today {
  background: color-mix(in oklab, var(--accent) 40%, var(--bg));
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent) 30%, transparent);
}
body[data-theme="terminal"] .streak-cell { border-radius: 1px; }

.streak-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 18px; font-family: var(--font-ui); font-size: 12px; color: var(--muted);
}
.streak-foot .num { color: var(--ink); font-weight: 600; font-size: 14px; }

/* ─── Course cards ────────────────────────── */
.courses {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 36px;
}
@media (max-width: 880px) { .courses { grid-template-columns: 1fr; } }

.course {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 28px 24px 22px;
  display: flex; flex-direction: column;
  min-height: 260px;
  transition: transform .15s ease, border-color .15s ease;
  position: relative;
  overflow: hidden;
}
.course.live { cursor: pointer; }
.course.live:hover { transform: translateY(-2px); border-color: var(--ink); }
.course.soon { opacity: 0.78; }
body[data-theme="terminal"] .course { border-radius: 6px; }
body[data-theme="sketch"] .course:nth-child(2) { transform: rotate(-0.6deg); }
body[data-theme="sketch"] .course:nth-child(3) { transform: rotate(0.4deg); }

.course-tag {
  font-family: var(--font-ui); font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: 14px;
}
.course-tag.live { color: var(--good); }
.course-tag.soon { color: var(--muted); }
.course-tag .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor;
}
.course-tag.live .dot { box-shadow: 0 0 0 0 currentColor; animation: pulse 2.4s ease-out infinite; }

.course h3 { margin-bottom: 8px; }
.course p { font-size: 15px; margin: 0; color: var(--ink-2); flex: 1; }
.course-foot {
  margin-top: 22px;
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-ui); font-size: 13px;
}
.course-foot .price { color: var(--muted); }
.course-foot .price s { color: var(--muted); margin-right: 6px; opacity: .65; }
.course-foot .price b { color: var(--ink); font-weight: 600; }
.course-foot .go { color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }

/* ─── How it works ───────────────────────── */
.how {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  margin-top: 48px;
}
@media (max-width: 880px) { .how { grid-template-columns: 1fr; gap: 28px; } }
.how-item .num {
  font-family: var(--font-ui); font-size: 13px; color: var(--muted);
  margin-bottom: 14px;
}
.how-item h3 { margin-bottom: 8px; }
.how-item p { font-size: 15.5px; margin: 0; }

/* ─── Code demo ──────────────────────────── */
.demo {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-top: 36px;
}
body[data-theme="terminal"] .demo { border-radius: 6px; }
.demo-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-ui); font-size: 12px; color: var(--muted);
  background: var(--bg-2);
}
.demo-bar .lights { display: flex; gap: 6px; margin-right: 10px; }
.demo-bar .lights span {
  width: 10px; height: 10px; border-radius: 50%;
  background: color-mix(in oklab, var(--ink-2) 30%, transparent);
}
.demo-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
}
@media (max-width: 720px) { .demo-grid { grid-template-columns: 1fr; } }

.demo-code {
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 20px 22px;
  line-height: 1.7;
  background: var(--card);
  white-space: pre;
  overflow-x: auto;
  color: var(--ink);
}
.demo-code .kw { color: var(--accent); font-weight: 600; }
.demo-code .str { color: var(--good); }
.demo-code .cmt { color: var(--muted); font-style: italic; }
.demo-code .ln { color: var(--muted); margin-right: 14px; user-select: none; display: inline-block; width: 1.5em; text-align: right; }

.demo-side {
  border-left: 1px solid var(--rule);
  padding: 20px 22px;
  display: flex; flex-direction: column; gap: 14px;
  background: var(--bg-2);
}
.demo-output {
  font-family: var(--font-mono); font-size: 13px;
  color: var(--ink); flex: 1; min-height: 80px;
  white-space: pre-wrap;
}
.demo-output .prompt { color: var(--good); }
.demo-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-family: var(--font-ui); font-size: 12px;
  padding: 6px 10px; border: 1px solid var(--rule); border-radius: 999px;
  color: var(--ink-2); background: transparent;
}
.chip:hover { color: var(--ink); border-color: var(--ink); }
.ai-msg {
  background: color-mix(in oklab, var(--accent) 8%, var(--card));
  border-left: 2px solid var(--accent);
  padding: 10px 12px;
  font-family: var(--font-body); font-size: 14px;
  color: var(--ink); line-height: 1.5;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.ai-msg .ai-from {
  font-family: var(--font-ui); font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 4px;
}

/* ─── Founder ────────────────────────────── */
.founder {
  margin-top: 40px;
  max-width: 640px;
  margin-left: 0;
  margin-right: 0;
}
.founder-photo {
  width: 200px; aspect-ratio: 1;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-ui); font-size: 11px; color: var(--muted);
  letter-spacing: .04em;
  background-image: repeating-linear-gradient(45deg, transparent 0 8px, color-mix(in oklab, var(--rule) 70%, transparent) 8px 9px);
}
body[data-theme="sketch"] .founder-photo { transform: rotate(-2deg); }
.founder-letter {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  text-align: left;
}
body[data-theme="terminal"] .founder-letter { font-size: 15px; }
.founder-letter p { color: var(--ink); margin: 0 0 1.1em; }
.founder-sig {
  margin-top: 18px;
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--ink);
}
body[data-theme="terminal"] .founder-sig { font-size: 16px; }
body[data-theme="sketch"] .founder-sig { font-size: 42px; transform: rotate(-2deg); display: inline-block; }
.founder-meta {
  font-family: var(--font-ui); font-size: 12px; color: var(--muted);
  margin-top: 4px;
}

/* ─── Pricing ────────────────────────────── */
.price-card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: clamp(28px, 4vw, 48px);
  max-width: 560px;
  margin: 40px auto 0;
  text-align: center;
}
body[data-theme="terminal"] .price-card { border-radius: 6px; }
.price-card .number {
  font-family: var(--font-display);
  font-size: clamp(60px, 9vw, 110px);
  font-weight: var(--display-weight);
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
  display: inline-flex; align-items: baseline; gap: 6px;
}
.price-card .number .curr { font-size: 0.5em; color: var(--muted); }
.price-card .was {
  font-family: var(--font-ui); font-size: 14px; color: var(--muted);
  margin-top: 10px;
}
.price-card .was s { margin-right: 8px; }
.price-card .was .badge {
  display: inline-block; padding: 2px 8px;
  background: color-mix(in oklab, var(--accent) 15%, var(--card));
  color: var(--accent);
  border-radius: 4px; font-weight: 600; font-size: 12px;
  margin-left: 6px;
}
.price-list {
  list-style: none; padding: 0; margin: 28px 0 28px;
  text-align: left; max-width: 360px; margin-left: auto; margin-right: auto;
}
.price-list li {
  padding: 10px 0; border-bottom: 1px dashed var(--rule);
  display: flex; gap: 12px; align-items: baseline;
  font-size: 15px; color: var(--ink);
}
.price-list li:last-child { border-bottom: 0; }
.price-list .check {
  color: var(--accent); font-family: var(--font-ui); font-weight: 700;
}

/* ─── FAQ ───────────────────────────────── */
.section .eyebrow { text-align: left; }
.section h2 { text-align: left; max-width: none; margin-left: 0; margin-right: 0; }
#how h2    { max-width: 32ch; }
#founder h2 { max-width: 28ch; }
.faq-list { margin-top: 40px; max-width: 760px; margin-left: 0; margin-right: 0; }
.faq-item {
  border-bottom: 1px solid var(--rule);
}
.faq-item summary {
  list-style: none;
  cursor: default;
  padding: 22px 0;
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px;
  font-family: var(--font-display);
  font-size: clamp(19px, 2vw, 23px);
  font-weight: var(--display-weight);
  color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .toggle {
  width: 24px; height: 24px; flex-shrink: 0;
  border: 1px solid var(--rule); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-ui); font-size: 14px; color: var(--muted);
  transition: transform .2s ease;
}
.faq-item[open] summary .toggle { transform: rotate(45deg); border-color: var(--ink); color: var(--ink); }
.faq-item .answer {
  padding: 0 0 24px;
  max-width: 64ch;
  font-size: 16px;
  color: var(--ink-2);
  line-height: 1.6;
}
body[data-theme="terminal"] .faq-item summary { font-size: 16px; }

/* ─── Footer ────────────────────────────── */
.footer {
  border-top: 1px solid var(--rule);
  padding: 56px 0 80px;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer h4 {
  font-family: var(--font-ui); font-size: 11px;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink); font-weight: 600; margin: 0 0 14px;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer a:hover { color: var(--ink); }
.footer-bot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; border-top: 1px solid var(--rule);
  flex-wrap: wrap; gap: 14px;
}

/* ─── Sketch-only flourishes ─────────────── */
body[data-theme="sketch"] .scribble {
  display: inline-block; transform: rotate(-2deg);
  color: var(--accent);
}
body[data-theme="sketch"] .section h2 .scribble { display: inline-block; }

/* ─── Terminal-only flourishes ───────────── */
body[data-theme="terminal"] .eyebrow::before { content: "// "; }
body[data-theme="terminal"] h2::before { content: "## "; color: var(--muted); }
body[data-theme="terminal"] h1::before { content: "# "; color: var(--muted); opacity: .6; }
