/* home-v3.css — PREVIEW home (home-v3.html), v3.1: MWT brand applied to Keyboard Theory.
   MWT tokens (docs/brand/tokens.md): purple #7C3AED / light #A78BFA / dark #5B21B6, gold #F59E0B /
   light #FCD34D, dark surfaces #0F0F1A / #08080F, Inter, signature purple-to-gold gradient.
   Gold is used only on dark surfaces (it fails contrast on white). Keys and the listen control
   keep the course's sound signal. ONE RULE BENT FOR OWNER RULING: the "Start" CTA uses the MWT
   gradient instead of coral (see docs/proposal-home-v3.md). */
:root { --mwt-purple: #7C3AED; --mwt-purple-l: #A78BFA; --mwt-purple-d: #5B21B6; --mwt-gold: #F59E0B; --mwt-gold-l: #FCD34D;
  --mwt-dark: #0F0F1A; --mwt-darker: #08080F; --mwt-grad: linear-gradient(135deg, #7C3AED 0%, #F59E0B 100%);
  /* AA-safe version for white text (white on #6D28D9 7.1:1, on #B45309 5.0:1) */
  --mwt-grad-text: linear-gradient(135deg, #6D28D9 0%, #B45309 100%); }
body.v3 { overflow-x: clip; font-family: Inter, "Inter Fallback", system-ui, -apple-system, "Segoe UI", sans-serif; }
body.v3 main { max-width: 1160px; margin: 0 auto; padding: 0 20px 72px; }
body.v3 header.site { background: var(--mwt-darker); border-bottom: 1px solid rgba(255,255,255,.06); }
body.v3 header.site h1, body.v3 header.site > p { display: none; }
body.v3 header.site .logo { background: transparent !important; box-shadow: none !important; }

/* HERO — the dark MWT surface, full bleed */
.v3-hero { position: relative; display: grid; grid-template-columns: 1.02fr 1fr; gap: 44px; align-items: center;
  padding: 72px 0 64px; color: #fff; isolation: isolate; }
.v3-hero::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw); z-index: -2;
  background:
    radial-gradient(48% 70% at 78% 40%, rgba(124,58,237,.38) 0%, rgba(124,58,237,0) 70%),
    radial-gradient(30% 40% at 92% 85%, rgba(245,158,11,.22) 0%, rgba(245,158,11,0) 70%),
    linear-gradient(180deg, var(--mwt-darker) 0%, var(--mwt-dark) 100%); }
.v3-hero::after { content: ""; position: absolute; top: 0; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw); z-index: -1;
  background: url("../assets/brand/hero-keys.jpg") right center / auto 100% no-repeat; opacity: .5;
  -webkit-mask-image: linear-gradient(90deg, transparent 20%, #000 75%); mask-image: linear-gradient(90deg, transparent 20%, #000 75%); }
.v3-eyebrow { margin: 0 0 16px; font: 700 13px/1 Inter, "Inter Fallback", system-ui, sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--mwt-gold-l); }
.v3-hero h2 { margin: 0 0 20px; font: 800 clamp(32px, 4.6vw, 58px)/1.06 Inter, "Inter Fallback", system-ui, sans-serif; letter-spacing: -0.025em; color: #fff; }
.v3-hero h2 .grad { background: linear-gradient(120deg, #A78BFA 0%, #FCD34D 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.v3-lede { margin: 0 0 30px; font-size: clamp(17px, 1.6vw, 19px); line-height: 1.65; color: #D6D2EC; max-width: 34em; }
.v3-cta { display: inline-flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 28px; border-radius: 999px;
  background: var(--mwt-grad-text); color: #fff; font: 800 17px/1.2 Inter, "Inter Fallback", system-ui, sans-serif; text-decoration: none;
  text-shadow: 0 1px 2px rgba(0,0,0,.25);
  box-shadow: 0 10px 30px rgba(124,58,237,.45), inset 0 1px 0 rgba(255,255,255,.25); transition: transform .15s ease, box-shadow .15s ease; }
.v3-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(124,58,237,.55), inset 0 1px 0 rgba(255,255,255,.25); }
.v3-cta:focus-visible { outline: 3px solid var(--mwt-gold-l); outline-offset: 3px; }
.v3-cta.small { min-height: 48px; font-size: 16px; padding: 0 22px; }
.v3-trust { margin: 18px 0 0; font-size: 14px; color: #A9A4C6; }

/* The try-it stage: a glass card on the dark surface */
.v3-stage { position: relative; border-radius: 26px; padding: 20px 20px 16px; color: #fff;
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.14); box-shadow: 0 30px 80px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.1);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.v3-stage-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 8px; }
.v3-listen { min-height: 48px; padding: 0 22px; border-radius: 999px; border: 2px solid var(--coral); background: rgba(216,90,48,.14);
  color: #fff; font: 800 16px/1 Inter, "Inter Fallback", system-ui, sans-serif; cursor: pointer; }
.v3-listen:hover:not(:disabled) { background: var(--coral); }
.v3-listen:focus-visible { outline: 3px solid var(--mwt-gold-l); outline-offset: 3px; }
.v3-listen:disabled { opacity: .6; cursor: default; }
.v3-status { font-size: 15px; color: #D6D2EC; min-height: 1.4em; }
.v3-board { margin-top: 6px; }
.v3-board svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 18px 30px rgba(0,0,0,.5)); }
.v3-board .pkey { stroke: #1b1830; }
.v3-board .pkey:not(.black):not(.lit):not(.lit-home):not(.lit-done) { fill: #F8F6FF; }
.v3-board .pkey.black:not(.lit):not(.lit-home):not(.lit-done) { fill: #15121f; }
.v3-board .pkey.guide { stroke: var(--mwt-gold); stroke-width: 3; }
.v3-after { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.v3-after[hidden] { display: none; }

/* Below the fold: light surfaces with MWT accents */
.v3-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 48px 0 52px; }
.v3-step { position: relative; background: #fff; border: 1px solid #ECE9F7; border-radius: 20px; padding: 22px;
  box-shadow: 0 1px 2px rgba(15,15,26,.04), 0 12px 30px rgba(91,33,182,.06); overflow: hidden; }
.v3-step::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: var(--mwt-grad); }
.v3-step-n { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 12px;
  background: var(--mwt-grad-text); color: #fff; font: 800 16px/1 Inter, "Inter Fallback", system-ui, sans-serif; }
.v3-step h3 { margin: 14px 0 6px; font: 800 22px/1.2 Inter, "Inter Fallback", system-ui, sans-serif; color: var(--mwt-dark); }
.v3-step p { margin: 0; color: #4A4762; }

.v3-section-h { font: 800 clamp(26px, 2.8vw, 34px)/1.15 Inter, "Inter Fallback", system-ui, sans-serif; color: var(--mwt-dark); margin: 8px 0 20px; letter-spacing: -0.015em; }

body.v3 ol.path { position: relative; list-style: none; padding: 0; margin: 0 0 52px; display: grid; gap: 14px; }
body.v3 ol.path::before { content: ""; position: absolute; left: 29px; top: 14px; bottom: 14px; width: 4px; border-radius: 2px;
  background: linear-gradient(var(--mwt-purple) 0 30%, var(--mwt-gold) 34%, #E7E4F3 36% 100%); }
body.v3 .path .mod { position: relative; display: flex; gap: 18px; align-items: flex-start; background: #fff; border: 1px solid #ECE9F7;
  border-radius: 20px; padding: 16px 18px 16px 0; box-shadow: 0 1px 2px rgba(15,15,26,.04); }
body.v3 .path .mod .num { flex: 0 0 auto; position: relative; z-index: 1; width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center; font: 800 20px/1 Inter, "Inter Fallback", system-ui, sans-serif; background: var(--mwt-grad-text); color: #fff;
  box-shadow: 0 0 0 6px #fff, 0 8px 18px rgba(124,58,237,.35); }
body.v3 .path .mod.locked { opacity: .6; }
body.v3 .path .mod.locked .num { background: #E7E4F3; color: #6E6A85; box-shadow: 0 0 0 6px #fff; }
body.v3 .path .mod h2 { font: 800 19px/1.25 Inter, "Inter Fallback", system-ui, sans-serif; margin: 6px 0; color: var(--mwt-dark); }
body.v3 .path .lesson-links { display: grid; gap: 6px; padding: 0; list-style: none; margin: 6px 0 0; }
body.v3 .path .lesson-links a:not(.speed-chip) { font-weight: 700; color: var(--mwt-purple); }

body.v3 .ear-home { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin: 0 0 44px; }
body.v3 .ear-card { border-radius: 20px; }

/* Teacher band: the dark MWT surface again, closing the page */
body.v3 .home-teacher { position: relative; color: #fff; border-radius: 26px; padding: 30px; margin: 0 0 20px; overflow: hidden;
  background: radial-gradient(60% 120% at 100% 0%, rgba(124,58,237,.45), rgba(124,58,237,0) 60%), var(--mwt-dark); }
body.v3 .home-teacher h3 { font: 800 24px/1.2 Inter, "Inter Fallback", system-ui, sans-serif; margin: 0 0 10px; color: #fff; }
body.v3 .home-teacher p { color: #D6D2EC; }
body.v3 .home-teacher a { color: var(--mwt-gold-l); }

/* Strings with class "draft" are SAMPLE wording (owner, 16 Nov 2026: "use sample scripts that can be
   replaced later"). They render normally; find them with grep 'class="draft' / '.draft' to replace. */

@media (max-width: 860px) {
  .v3-hero { grid-template-columns: 1fr; gap: 28px; padding: 36px 0 40px; }
  .v3-hero::after { opacity: .28; background-position: center bottom; background-size: 160% auto;
    -webkit-mask-image: linear-gradient(180deg, transparent 30%, #000 100%); mask-image: linear-gradient(180deg, transparent 30%, #000 100%); }
  .v3-steps { grid-template-columns: 1fr; gap: 10px; margin-top: 32px; }
  .v3-step { display: grid; grid-template-columns: 36px 1fr; column-gap: 14px; padding: 16px; }
  .v3-step h3 { margin: 4px 0 2px; font-size: 19px; }
  .v3-step p { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion]) .v3-cta { transition: none; }
}

/* ---------- Fewer words (owner 16 Nov): sound leads, grown-up text folds ---------- */
body.v3 .grownups { max-width: 760px; margin: 28px auto 8px; border: 1px solid #E6E1F7; border-radius: 16px; background: #FBFAFF; padding: 4px 18px; }
body.v3 .grownups > summary { cursor: pointer; font-weight: 700; color: var(--violet,#7C3AED); padding: 14px 0; list-style: none; }
body.v3 .grownups > summary::-webkit-details-marker { display: none; }
body.v3 .grownups > summary::after { content: " ＋"; color: var(--coral,#D85A30); }
body.v3 .grownups[open] > summary::after { content: " －"; }
body.v3 .grownups .home-teacher { margin: 8px 0; }
body.v3 .grownups p { color: #3d3a52; }
body.v3 .v3-listen { font-size: 18px; padding: 16px 22px; }
@media (max-width: 640px) {
  body.v3 .v3-hero-text { display: contents; }
  body.v3 .v3-hero { display: flex; flex-direction: column; }
  body.v3 .v3-eyebrow { display: none; }
  body.v3 .v3-hero h2 { order: 1; font-size: 30px; }
  body.v3 .v3-stage { order: 2; margin-top: 14px; }
  body.v3 .v3-hero .v3-cta:not(.small) { order: 3; margin-top: 16px; text-align: center; }
  body.v3 .v3-step p { font-size: 15px; line-height: 1.4; }
  body.v3 .ear-card small { display: none; }
  body.v3 .v3-listen { width: 100%; font-size: 20px; padding: 18px; }
}
body.v3 .v3-section-h { color: #fff; }
body.v3 header.site h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
body.v3 header.site > p { font-size: 12px; letter-spacing: .08em; margin: 0; }
body.v3 header.site { padding-bottom: 14px; }
@media (max-width: 640px) { body.v3 header.site > p { display: none; } }

/* Module can-do lines (owner approved the PM drafts, 16 Nov 02:08): Quality Matters GS2 measurable objectives */
body.v3 .mod-cando { margin: 2px 0 8px; font-weight: 600; color: #4C1D95; font-size: 14px; line-height: 1.4; }

/* Keys Wave band (17 Nov): full-bleed cinematic strip right under the hero, same dark as the hero,
   so the scale visibly climbs across the keys. */
.v3-wave { position: relative; margin: 0 calc(50% - 50vw); background: #000; line-height: 0; overflow: hidden; }
.v3-wave-video { display: block; width: 100%; height: clamp(220px, 42vw, 520px); object-fit: cover; object-position: 60% 22%; }
.v3-wave::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, var(--mwt-dark, #0F0F1A) 0%, rgba(0,0,0,0) 18%, rgba(0,0,0,0) 82%, rgba(0,0,0,.35) 100%); }
@media (max-width: 640px) { .v3-wave-video { height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 50%; } }

/* ---------- Journey map (17 Nov): snake trail of lesson stops, Candy Crush / Duolingo style ---------- */
.jm-host { position: relative; width: min(1080px, calc(100vw - 24px)); left: 50%; transform: translateX(-50%); margin: 8px 0 28px; }
.jm { position: relative; width: 100%; border-radius: 28px; overflow: hidden;
  background: radial-gradient(60% 50% at 20% 10%, rgba(124,58,237,.35), transparent 70%),
              radial-gradient(50% 40% at 90% 90%, rgba(245,158,11,.18), transparent 70%),
              linear-gradient(180deg, #17122B 0%, #0F0F1A 100%);
  box-shadow: inset 0 0 0 1px rgba(167,139,250,.18); }
.jm-trail { position: absolute; inset: 0; pointer-events: none; }
.jm-road { fill: none; stroke: rgba(167,139,250,.28); stroke-width: 14; stroke-linecap: round; stroke-dasharray: 2 22; }
.jm-road-done { fill: none; stroke: url(#jmGrad); stroke-width: 10; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(167,139,250,.6)); }
.jm-stops { list-style: none; margin: 0; padding: 0; }
.jm-stop { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; width: 120px; }
.jm-node { position: relative; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%;
  font: 800 17px/1 Inter, "Inter Fallback", system-ui, sans-serif; text-decoration: none; color: #fff;
  background: radial-gradient(circle at 35% 30%, #8B5CF6, #5B21B6 70%);
  box-shadow: 0 6px 0 #3B1680, 0 10px 22px rgba(0,0,0,.45), inset 0 2px 0 rgba(255,255,255,.35);
  transition: transform .12s ease; }
a.jm-node:hover, a.jm-node:focus-visible { transform: translateY(-3px); }
a.jm-node:focus-visible { outline: 3px solid #FCD34D; outline-offset: 4px; }
a.jm-node:active { transform: translateY(3px); box-shadow: 0 3px 0 #3B1680, 0 6px 14px rgba(0,0,0,.45); }
.jm-tick { position: absolute; right: -4px; bottom: -4px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-size: 14px; color: #1a1205; background: linear-gradient(135deg, #FCD34D, #F59E0B); box-shadow: 0 2px 6px rgba(0,0,0,.4); }
/* current stop: coral = the one thing to press (course signal colour) */
.jm-stop.is-current .jm-node { width: 78px; height: 78px; font-size: 20px;
  background: radial-gradient(circle at 35% 30%, #F08A63, #D85A30 60%, #A8401E); box-shadow: 0 7px 0 #8A3415, 0 12px 26px rgba(0,0,0,.5), inset 0 2px 0 rgba(255,255,255,.4); }
.jm-stop.is-current .jm-node::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 3px solid rgba(252,211,77,.85); }
.jm-here { margin-top: 6px; padding: 3px 10px; border-radius: 999px; font: 700 12px/1.4 Inter, "Inter Fallback", system-ui, sans-serif; color: #1a1205; background: #FCD34D; }
.jm-stop.is-open .jm-node { background: radial-gradient(circle at 35% 30%, #A78BFA, #6D28D9 70%); }
.jm-stop.is-locked .jm-node { background: radial-gradient(circle at 35% 30%, #4B4763, #2A2740 70%); color: #9A96B5; box-shadow: 0 6px 0 #1C1A2C, 0 8px 18px rgba(0,0,0,.4); }
.jm-lock { position: absolute; right: -6px; bottom: -6px; font-size: 18px; }
.jm-cap { margin-top: 10px; max-width: 120px; text-align: center; font: 600 12px/1.25 Inter, "Inter Fallback", system-ui, sans-serif; color: #E9E5FB; text-shadow: 0 1px 2px #000; }
.jm-stop.is-locked .jm-cap { color: #8C88A6; }
.jm-flag { position: absolute; top: -48px; padding: 3px 10px; border-radius: 8px; white-space: nowrap;
  font: 800 11px/1.5 Inter, "Inter Fallback", system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #FCD34D;
  background: rgba(15,15,26,.85); box-shadow: inset 0 0 0 1px rgba(252,211,77,.35); }
.jm-starnode { width: 58px; height: 58px; background: radial-gradient(circle at 35% 30%, #3A3550, #221F33 70%); box-shadow: 0 5px 0 #15131F, 0 8px 16px rgba(0,0,0,.4); }
.jm-star { font-size: 30px; color: #5E5A78; }
.jm-star.jm-star, .jm-stop.jm-star.is-done .jm-starnode { }
.jm-stop.jm-star.is-done .jm-starnode { background: radial-gradient(circle at 35% 30%, #FCD34D, #F59E0B 60%, #B45309); box-shadow: 0 5px 0 #8A4A06, 0 10px 22px rgba(245,158,11,.45); }
.jm-stop.jm-star.is-done .jm-star { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.35); }
@media (prefers-reduced-motion: no-preference) {
  html:not([data-motion="reduce"]) .jm-stop.is-current .jm-node::after { animation: jmGlow 2.4s ease-in-out infinite; }
}
@keyframes jmGlow { 0%,100% { box-shadow: 0 0 0 0 rgba(252,211,77,.0); } 50% { box-shadow: 0 0 22px 4px rgba(252,211,77,.45); } }
@media (max-width: 640px) { .jm-node { width: 56px; height: 56px; font-size: 15px; } .jm-stop.is-current .jm-node { width: 68px; height: 68px; } .jm-stop { width: 100px; } .jm-cap { max-width: 100px; font-size: 11px; } }

/* Proposal alignment (17 Nov): committed lessons not built yet. Quiet, dashed, clearly "not yet". */
.lesson-links li.coming { opacity: .7; }
.lesson-links li.coming .coming-label { font-style: italic; color: var(--muted, #6B6880); }
.path li.mod.soon { border-style: dashed; }
.jm-stop.is-coming .jm-node { background: transparent; border: 2px dashed rgba(167,139,250,.55); box-shadow: none; color: #A7A2C8; font-size: 14px; }
.jm-stop.is-coming .jm-cap { color: #8C88A6; font-style: italic; }

/* Home tiles: one line-icon set instead of emoji (17 Nov visual pass: adult course, one visual language) */
.ear-card .ear-ic { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 12px;
  color: var(--violet, #7C3AED); background: var(--lav, #EEEDFE); font-size: 0; }

/* P7 (CLS, 18 Nov): the try-it board is drawn by script, so the hero used to grow by the board's
   height after first paint and push everything below it down (home CLS 0.22 on a phone). Reserve
   the board's space up front with the same ratios home-v3.js uses: one octave (viewBox 498x260)
   when the board is narrower than 600px, two octaves (870x260) when wider, which only happens in
   the single-column layout from 690px to 860px. */
#v3-board { aspect-ratio: 498 / 260; }
@media (min-width: 690px) and (max-width: 860px) { #v3-board { aspect-ratio: 870 / 260; } }
/* Pause / play for the Keys Wave loop (WCAG 2.2.2). Sits above the fade overlay, bottom right. */
.v3-wave-toggle { position: absolute; right: 16px; bottom: 16px; z-index: 2; width: 44px; height: 44px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35); background: rgba(8,8,15,.55); color: #fff; font: 700 14px/1 Inter, "Inter Fallback", system-ui, sans-serif;
  display: grid; place-items: center; cursor: pointer; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.v3-wave-toggle[hidden] { display: none; }
.v3-wave-toggle:hover { background: rgba(8,8,15,.75); }
.v3-wave-toggle:focus-visible { outline: 3px solid var(--mwt-gold-l, #FCD34D); outline-offset: 3px; }

/* Home de-duplication (19 Nov): once the journey map is drawn, the module list it is built from
   is not shown a second time (it stays as the no-script fallback). */
body.jm-ready ol.path, body.jm-ready .pl-expander-wrap { display: none; }
.jm-extra { position: relative; width: min(720px, calc(100vw - 32px)); margin: 20px auto 32px; text-align: center; }
.jm-cando { margin: 0 0 12px; font: 600 16px/1.45 Inter, "Inter Fallback", system-ui, sans-serif; color: #E9E5FB; }
.jm-speed { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin: 0; }
.jm-speed-lab { font: 700 13px/1 Inter, "Inter Fallback", system-ui, sans-serif; color: #C4B5FD; margin-right: 4px; }
.jm-speed .speed-chip { min-height: 32px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid rgba(216,90,48,.55); background: rgba(216,90,48,.14); color: #FFD9C9; font: 700 13px/1 Inter, "Inter Fallback", system-ui, sans-serif; text-decoration: none; }
.jm-speed .speed-chip:hover, .jm-speed .speed-chip:focus-visible { background: rgba(216,90,48,.3); }
