/* v2h.css — FULL-PAGE THEMED HOME. PREVIEW ONLY (loaded by js/v2.js when ?v2h=1, and only
   on the home page — the html.v2h class is never added anywhere else, so nothing here can
   reach a lesson, Practice, Tools or account page even while the session flag is set).

   THE IDEA: the home stops being "a violet header on a white page". The whole page becomes
   one continuous designed surface — a deep violet field that the header flows straight into —
   and every content block (hero art, demo, path, feature cards, the six strands) sits on it
   as an ELEVATED LIGHT SURFACE. Text that sits DIRECTLY on the field flips to white/lavender;
   text inside the light surfaces keeps its existing (already-AA) colours untouched.

   COLOUR RULE (same as v2.css): every colour is an existing token, a token mixed with
   NEUTRAL black/white via color-mix (same precedent v2.css already set), or neutral
   black/white alpha. No new hues — the pending colour audit re-tints this file untouched.
   Every color-mix use sits behind a plain-token fallback line for older engines.

   CONTRAST: verified computed (not eyeballed) against the gradient colour at each element's
   actual page position — see the build report. The ONE substitution: strand eyebrows were
   --coral-deep on white; coral cannot hold 4.5:1 on the dark field, so ON THE FIELD eyebrows
   use --gold — whose token comment says "sparing accent (reads only on dark)". This is
   gold's stated purpose, not a new colour. Coral is unchanged on light surfaces.

   MOTION: this file adds NO motion of any kind (surface theming only), so the existing v2
   reduced-motion rules remain the complete story. */

/* ============================ the canvas ============================ */
/* Fallback first, then the gradient field. The violet -> brand-dark hand-off happens INSIDE
   the header's height, so all main content sits on brand-dark or deeper (the AA-safe zone
   for lavender body text). Deep base = brand-dark mixed 36% into neutral black. */
html.v2h { background: var(--brand-dark); }
html.v2h body {
  background: var(--brand-dark);
  background:
    linear-gradient(180deg,
      var(--violet) 0px,
      var(--brand-dark) 260px,
      color-mix(in srgb, var(--brand-dark) 36%, black) 1100px,
      color-mix(in srgb, var(--brand-dark) 36%, black) 100%);
}

/* the header flows into the page: same field, no band edge */
html.v2h header.site { background: transparent; }

/* ============================ text ON the field ============================ */
html.v2h .home-hero h2 { color: #fff; }
html.v2h .home-hero p { color: var(--lav); }
html.v2h .home-demo-sub { color: var(--lav); }
html.v2h .home-access { color: var(--lav); }
html.v2h .home-teacher h3 { color: #fff; }
html.v2h .home-teacher p { color: var(--lav); }
html.v2h .site-foot a, html.v2h .site-foot .foot-sep, html.v2h .site-foot .teach-note { color: var(--lav); }
html.v2h .site-foot a:hover { color: #fff; }
/* the account entry (js-injected into the footer) sits on the field too */
html.v2h .site-foot .acct-slot, html.v2h .site-foot .acct-sep,
html.v2h .site-foot .acct-link, html.v2h .site-foot .acct-who,
html.v2h .site-foot .acct-out { color: var(--lav); }
html.v2h .home-more > summary { color: var(--lav); }
html.v2h .home-more > summary:hover { color: #fff; }
html.v2h .pl-expander { color: var(--lav); }
html.v2h .pl-expander:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* hairlines that were light-grey on white become light alpha on the field */
html.v2h .home-demo { border-bottom-color: rgba(255, 255, 255, .16); }
html.v2h .home-teacher { border-top-color: rgba(255, 255, 255, .16); }
html.v2h .home-more { border-top-color: rgba(255, 255, 255, .16); }

/* ============================ elevated light surfaces ============================ */
/* Depth on a dark field needs a light RIM (the edge) plus a deeper, darker cast shadow —
   the soft grey shadows tuned for white simply vanish on violet. Surface fills stay light,
   so every colour INSIDE them (ink/muted/violet text, chips, badges) keeps its audited AA. */

/* the demo button becomes a light keycap — brand-dark text on white, seated on the field */
html.v2h .home-demo-btn {
  color: var(--brand-dark);
  background: linear-gradient(180deg, #ffffff, var(--soft));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .9) inset,
    0 5px 0 var(--lav),
    0 16px 32px -12px rgba(0, 0, 0, .8);
}
html.v2h .home-demo-btn:hover { background: #fff; }
html.v2h .home-demo-btn:active {
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 2px 0 var(--lav), 0 8px 16px -8px rgba(0, 0, 0, .7);
}

/* hero keycap tray + strand stages: light rim + deep cast */
html.v2h .v2-hero-art {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .9) inset,
    0 0 0 1px rgba(255, 255, 255, .18),
    0 34px 64px -24px rgba(0, 0, 0, .85);
}
html.v2h .v2-strand-stage {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .9) inset,
    0 0 0 1px rgba(255, 255, 255, .18),
    0 30px 56px -24px rgba(0, 0, 0, .85);
}

/* the dominant CTA (violet keycap button) needs a rim so it separates from the field */
html.v2h .v2-cta.home-cta {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .28) inset,
    0 0 0 1px rgba(255, 255, 255, .28),
    0 6px 0 var(--brand-dark),
    0 18px 36px -12px rgba(0, 0, 0, .8);
}
html.v2h .v2-cta.home-cta:hover {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .28) inset,
    0 0 0 1px rgba(255, 255, 255, .32),
    0 8px 0 var(--brand-dark),
    0 24px 44px -12px rgba(0, 0, 0, .85);
}
html.v2h .v2-cta.home-cta:active {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .28) inset,
    0 0 0 1px rgba(255, 255, 255, .28),
    0 2px 0 var(--brand-dark),
    0 8px 16px -8px rgba(0, 0, 0, .7);
}

/* returning "arrival" card: already a light surface — rim + deeper cast */
html.v2h .v2-arrival.resume-card {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .9) inset,
    0 0 0 1px rgba(255, 255, 255, .2),
    0 26px 48px -18px rgba(0, 0, 0, .8);
}
html.v2h .v2-arrival.resume-card:hover {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .9) inset,
    0 0 0 1px rgba(255, 255, 255, .24),
    0 34px 60px -18px rgba(0, 0, 0, .85);
}

/* module path: cards keep light fills; edges become light rims on the field */
html.v2h .path .mod { border-color: rgba(255, 255, 255, .16); }
html.v2h .path .mod.locked { border-color: rgba(255, 255, 255, .22); }
html.v2h .path .mod.open {
  box-shadow: inset 0 0 0 1px var(--lav), 0 18px 38px -20px rgba(0, 0, 0, .8) !important;
}

/* feature cards */
html.v2h .ear-card {
  border-color: rgba(255, 255, 255, .16);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .2), 0 14px 30px -16px rgba(0, 0, 0, .8);
}
html.v2h .ear-card:hover {
  border-color: rgba(255, 255, 255, .34);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .25), 0 26px 46px -18px rgba(0, 0, 0, .85);
}

/* ============================ the strand narrative on the field ============================ */
html.v2h .v2-strand { border-bottom-color: rgba(255, 255, 255, .14); }
html.v2h .v2-strand-title { color: #fff; }
html.v2h .v2-strand-line { color: var(--lav); }
/* the ONE substitution (see header note): gold is the token whose stated job is to read on
   dark. Eyebrows on the field use it; coral is untouched everywhere light. */
html.v2h .v2-strand-eyebrow { color: var(--gold); }
html.v2h .v2-strand-cta { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
html.v2h .v2-strand-cta:hover { color: var(--lav); }

/* anchor strip: deep translucent bar, lavender pills, active pill flips to white */
html.v2h .v2-anchors {
  background: rgba(0, 0, 0, .55);
  background: color-mix(in srgb, color-mix(in srgb, var(--brand-dark) 36%, black) 92%, transparent);
  border-bottom-color: rgba(255, 255, 255, .14);
}
html.v2h .v2-anchor { color: var(--lav); }
html.v2h .v2-anchor:hover { color: #fff; background: rgba(255, 255, 255, .12); }
html.v2h .v2-anchor.is-here { color: var(--brand-dark); background: #fff; }
