/* The Living School concept mockup.
   One accent (lime), one theme per visitor preference, one radius system:
   pills for actions, 20px for panels, 12px for fields. */

@font-face { font-family: "Outfit"; font-weight: 400; font-display: swap; src: url("/fonts/outfit-400.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-weight: 600; font-display: swap; src: url("/fonts/outfit-600.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-weight: 800; font-display: swap; src: url("/fonts/outfit-800.woff2") format("woff2"); }

:root {
  --bg: #0e0f0d;
  --surface: #171814;
  --surface-2: #21231d;
  --line: #34372d;
  --text: #f3f2ec;
  --muted: #b3b5a9;
  --accent: #c8f031;
  --on-accent: #11130a;
  --accent-text: #c8f031;
  --good: #7ee08a;
  --bad: #ff9a8a;
  --r-panel: 20px;
  --r-field: 12px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --z-nav: 20;
  --z-dialog: 40;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f6f1;
    --surface: #ffffff;
    --surface-2: #ebede4;
    --line: #d3d7c8;
    --text: #12140d;
    --muted: #4b4f40;
    --accent-text: #3b5900;
    --good: #1f6b2c;
    --bad: #a32d1c;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, svg { max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
.wrap { width: min(1240px, 100% - 32px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: 999px; z-index: 60; font-weight: 600; }
.skip:focus { top: 12px; }

/* accent-text is lime on dark and deep green on light, so the ring always has 3:1 or better */
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 3px; border-radius: 8px; }

/* ---------- type ---------- */
.display { font-weight: 800; font-size: clamp(2.75rem, 7.4vw, 6.25rem); line-height: 0.95; letter-spacing: -0.04em; margin: 0; text-wrap: balance; }
.hl { color: var(--accent-text); }
.h2 { font-weight: 800; font-size: clamp(2rem, 4.2vw, 3.5rem); line-height: 1.02; letter-spacing: -0.035em; margin: 0; text-wrap: balance; }
.h3 { font-weight: 800; font-size: 1.5rem; letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
.mega { font-weight: 800; font-size: clamp(2.5rem, 8vw, 7rem); line-height: 0.95; letter-spacing: -0.045em; margin: 0; text-wrap: balance; max-width: 14ch; }
.lede { font-size: clamp(1.15rem, 1.7vw, 1.4rem); color: var(--muted); max-width: 34ch; margin: 24px 0 0; text-wrap: pretty; }
.body { color: var(--muted); max-width: 52ch; margin: 18px 0 0; text-wrap: pretty; }
.body-sm { color: var(--muted); font-size: 1rem; margin: 8px 0 20px; }
.fine { color: var(--muted); font-size: 0.9rem; max-width: 60ch; }

/* ---------- strip + nav ---------- */
.strip { background: var(--accent); color: var(--on-accent); text-align: center; font-size: 0.875rem; font-weight: 600; padding: 7px 16px; }
.nav { position: sticky; top: 0; z-index: var(--z-nav); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.02em; text-decoration: none; font-size: 1.15rem; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-size: 1.1rem; }
.nav-links { display: flex; gap: 28px; }
.nav-links a, .link-quiet { text-decoration: none; color: var(--muted); font-weight: 600; transition: color 0.2s var(--ease); }
.link-quiet { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; background: none; border: 0; cursor: pointer; }
.nav-links a { display: inline-flex; align-items: center; min-height: 44px; }
.nav-links a:hover, .link-quiet:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 20px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 999px; padding: 15px 26px; font-weight: 800; font-size: 1.05rem; text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform 0.25s var(--ease), background 0.2s, box-shadow 0.25s var(--ease); }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-accent { background: var(--accent); color: var(--on-accent); box-shadow: 0 10px 30px -12px color-mix(in srgb, var(--accent) 60%, transparent); }
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -12px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 2px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--text); }
.btn-sm { padding: 10px 18px; font-size: 0.95rem; min-height: 44px; }
.btn-lg { padding: 20px 34px; font-size: 1.25rem; }
.btn-block { width: 100%; }
.btn-icon { width: 48px; height: 48px; padding: 0; font-size: 1.25rem; flex: none; }
.icon-btn { background: none; border: 0; width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; cursor: pointer; font-size: 1.2rem; }
.icon-btn:hover { background: var(--surface-2); }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(28px, 5vw, 72px); align-items: start; padding-block: clamp(36px, 6vw, 72px) clamp(56px, 8vw, 110px); min-height: calc(100dvh - 110px); }
.hero-copy { padding-top: clamp(0px, 3vw, 36px); }
.hero-actions { display: flex; align-items: center; gap: 28px; margin-top: 36px; flex-wrap: wrap; }

.play { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: clamp(20px, 3vw, 32px); box-shadow: 0 40px 80px -40px color-mix(in srgb, var(--accent) 22%, transparent); scroll-margin-top: 96px; }
.play-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab { display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 0; border-radius: 999px; padding: 10px 16px; min-height: 44px; font-weight: 600; color: var(--muted); cursor: pointer; box-shadow: inset 0 0 0 2px var(--line); transition: all 0.2s var(--ease); }
.tab:hover { color: var(--text); }
.tab[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.xp { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.xp-level { color: var(--muted); }
.xp-bar { width: 84px; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.xp-bar span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width 0.8s var(--ease); }

.q { font-weight: 800; font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.12; letter-spacing: -0.025em; margin: 0 0 22px; text-wrap: balance; }
.opts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.opt { width: 100%; text-align: left; display: flex; gap: 14px; align-items: center; background: var(--surface-2); border: 2px solid transparent; border-radius: var(--r-field); padding: 16px 18px; font-weight: 600; font-size: 1.05rem; cursor: pointer; transition: transform 0.25s var(--ease), border-color 0.2s, background 0.2s; }
.opt:hover:not([aria-disabled]) { transform: translateX(4px); border-color: var(--text); }
.opt:active:not([aria-disabled]) { transform: scale(0.99); }
.opt[aria-disabled] { cursor: default; }
.opt .k { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 999px; background: var(--surface); font-size: 0.85rem; font-weight: 800; }
.opt.right { border-color: var(--good); background: color-mix(in srgb, var(--good) 14%, var(--surface-2)); }
.opt.wrong { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, var(--surface-2)); }
.opt.dim { opacity: 0.75; }
.opt .mark { margin-left: auto; font-size: 1.4rem; flex: none; }
.opt.right .mark { color: var(--good); }
.opt.wrong .mark { color: var(--bad); }

.reveal { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); animation: rise 0.5s var(--ease) both; }
.reveal-head { font-weight: 800; font-size: 1.25rem; margin: 0; letter-spacing: -0.02em; }
.reveal-head .gain { color: var(--accent-text); }
.reveal-body { color: var(--muted); margin: 8px 0 18px; text-wrap: pretty; }
.reveal-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- photos ---------- */
.shot { margin: 0; overflow: hidden; border-radius: var(--r-panel); background: var(--surface-2); }
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.shot-wide { margin-top: 36px; aspect-ratio: 16 / 9; max-height: 280px; }
.shot-tall { margin-top: 32px; aspect-ratio: 4 / 3; max-height: 340px; }
.shot-tall img { object-position: 50% 30%; }
.shot-mid { margin-top: 32px; aspect-ratio: 5 / 4; max-height: 280px; }
.shot-portrait { aspect-ratio: 4 / 5; width: min(100%, 420px); justify-self: end; }
.credits { max-width: 60ch; }
.credits a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- shared section spacing ---------- */
.mentor, .path, .pricing, .close { padding-block: clamp(64px, 10vw, 140px) 0; }

/* ---------- mentor ---------- */
.mentor { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 6vw, 88px); align-items: center; }
.chips { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chip { background: transparent; border: 0; border-radius: 999px; padding: 10px 16px; font-weight: 600; cursor: pointer; box-shadow: inset 0 0 0 2px var(--line); transition: all 0.2s var(--ease); }
.chip:hover { box-shadow: inset 0 0 0 2px var(--accent); transform: translateY(-2px); }
.chat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); display: flex; flex-direction: column; min-height: 440px; overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--accent); color: var(--on-accent); font-size: 1.3rem; }
.chat-name { margin: 0; font-weight: 800; line-height: 1.2; }
.chat-sub { margin: 0; color: var(--muted); font-size: 0.85rem; }
.chat-log { flex: 1; padding: 22px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; max-height: 420px; }
.msg { margin: 0; max-width: 82%; padding: 12px 16px; border-radius: 18px; animation: rise 0.4s var(--ease) both; text-wrap: pretty; }
.msg.bot { background: var(--surface-2); border-bottom-left-radius: 6px; }
.msg.me { align-self: flex-end; background: var(--accent); color: var(--on-accent); font-weight: 600; border-bottom-right-radius: 6px; }
.msg.typing { display: inline-flex; gap: 5px; padding: 16px 18px; }
.msg.typing i { width: 7px; height: 7px; border-radius: 999px; background: var(--muted); animation: blink 1s infinite; }
.msg.typing i:nth-child(2) { animation-delay: 0.15s; }
.msg.typing i:nth-child(3) { animation-delay: 0.3s; }
.chat-form { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; background: var(--surface-2); border: 2px solid transparent; border-radius: 999px; padding: 0 20px; height: 48px; }
.chat-form input::placeholder, #phone::placeholder { color: var(--muted); opacity: 1; }
.chat-form input:focus-visible, #phone:focus-visible, #age:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 2px; border-radius: 999px; }
#phone:focus-visible, #age:focus-visible { border-radius: var(--r-field); }
.chat-log:focus-visible { outline-offset: -3px; }

/* ---------- path ---------- */
.path { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 6vw, 88px); align-items: start; }
.path-head { position: sticky; top: 100px; }
.lessons { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.lesson { display: grid; grid-template-columns: 48px 1fr auto auto; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 16px 18px; transition: transform 0.3s var(--ease), border-color 0.2s; }
.lesson.open:hover { transform: translateY(-3px); border-color: var(--accent); }
.lesson-n { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 1.2rem; }
.lesson.locked { background: transparent; }
.lesson.locked .lesson-n { background: var(--surface-2); color: var(--muted); }
.lesson.locked h3 { color: var(--muted); }
.lesson h3 { margin: 0; font-size: 1.15rem; letter-spacing: -0.015em; }
.lesson p { margin: 2px 0 0; color: var(--muted); font-size: 0.95rem; }
.lesson-t, .lock-note { color: var(--muted); font-size: 0.9rem; font-weight: 600; white-space: nowrap; }
.vote { grid-column: 1 / -1; margin-top: clamp(28px, 5vw, 64px); }
.vote-row { list-style: none; margin: 18px 0 0; padding: 0; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.vote-row li { scroll-snap-align: start; flex: none; }
.vote-btn { display: inline-flex; align-items: center; gap: 12px; background: var(--surface); border: 2px solid var(--line); border-radius: 999px; padding: 14px 22px; font-weight: 600; cursor: pointer; transition: all 0.25s var(--ease); white-space: nowrap; }
.vote-btn i { font-size: 1.25rem; }
.vote-btn:hover { border-color: var(--text); transform: translateY(-2px); }
.vote-btn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* ---------- pricing ---------- */
.pricing { display: grid; gap: 14px; }
.pricing .h2 { margin-bottom: 18px; max-width: 18ch; }
.plan { display: grid; grid-template-columns: minmax(180px, 0.7fr) 1.3fr auto; gap: clamp(18px, 4vw, 56px); align-items: center; border: 1px solid var(--line); border-radius: var(--r-panel); padding: clamp(22px, 3vw, 36px); }
.plan-free { background: var(--surface); border-color: var(--accent); }
.plan h3 { margin: 0; font-size: 1.1rem; font-weight: 600; color: var(--muted); }
.price { margin: 4px 0 0; font-weight: 800; font-size: clamp(2.25rem, 4vw, 3.25rem); letter-spacing: -0.04em; line-height: 1; }
.price span { font-size: 1rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.plan-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.plan-list li { display: flex; gap: 12px; align-items: center; }
.plan-list i { color: var(--accent-text); }

/* ---------- close + footer ---------- */
.close { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: clamp(28px, 6vw, 88px); align-items: center; padding-bottom: clamp(72px, 10vw, 140px); }
.close-copy { display: grid; gap: 36px; justify-items: start; }
.foot { border-top: 1px solid var(--line); padding-block: 28px; color: var(--muted); font-size: 0.95rem; }
.foot-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot p { margin: 0; }
.foot nav { display: flex; gap: 22px; flex-wrap: wrap; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--text); }

/* ---------- dialog ---------- */
dialog { z-index: var(--z-dialog); width: min(440px, calc(100% - 32px)); background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 28px; box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.6); }
dialog::backdrop { background: rgba(8, 9, 7, 0.72); backdrop-filter: blur(4px); }
dialog[open] { animation: rise 0.4s var(--ease) both; }
.dlg-close { position: absolute; top: 12px; right: 12px; margin: 0; }
.or { display: grid; place-items: center; margin: 18px 0; position: relative; color: var(--muted); font-size: 0.9rem; }
.or::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--line); }
.or span { position: relative; background: var(--surface); padding: 0 12px; }
dialog label { display: block; font-weight: 600; margin-bottom: 8px; }
dialog input, dialog select { width: 100%; height: 50px; background: var(--surface-2); border: 2px solid transparent; border-radius: var(--r-field); padding: 0 16px; margin-bottom: 14px; }
dialog input[aria-invalid="true"] { border-color: var(--bad); }
.err { color: var(--bad); font-size: 0.9rem; margin: -6px 0 14px; }
.age-l { margin-top: 2px; }

/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes blink { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise 0.8s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: 0.1s; }
  .hero-copy > :nth-child(3) { animation-delay: 0.2s; }
  .play { animation: rise 0.9s 0.25s var(--ease) both; }
  .js .fade { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
  .js .fade.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .nav { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
  dialog::backdrop { backdrop-filter: none; background: rgba(8, 9, 7, 0.92); }
}
@media (forced-colors: active) {
  .btn, .tab, .chip, .vote-btn, .opt { border: 2px solid ButtonText; }
  .tab[aria-pressed="true"], .vote-btn[aria-pressed="true"] { border-color: Highlight; forced-color-adjust: none; background: Highlight; color: HighlightText; }
  .opt.right { border-color: Highlight; }
  .xp-bar { border: 1px solid CanvasText; }
  .xp-bar span { background: Highlight; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- mobile ---------- */
@media (max-width: 900px) {
  .hero, .mentor, .path, .close { grid-template-columns: minmax(0, 1fr); }
  .shot-portrait { justify-self: start; width: min(100%, 320px); }
  .vote, .vote-row { min-width: 0; max-width: 100%; }
  .hero { min-height: 0; }
  .path-head { position: static; }
  .plan { grid-template-columns: 1fr; align-items: start; }
  .plan .btn { justify-self: start; }
}
@media (max-width: 720px) {
  .nav-links, .nav-actions .link-quiet { display: none; }
  .brand span:last-child { font-size: 1.05rem; }
  .lesson { grid-template-columns: 44px 1fr auto; }
  .lesson-t { display: none; }
  .lesson-n { width: 44px; height: 44px; }
  .xp-bar { width: 56px; }
}
