/* v2.css — "Dimensional keys" premium elevation. PREVIEW ONLY (loaded by js/v2.js when
   ?v2=1). Every rule is scoped under html.v2 so it cannot affect production.

   COLOUR RULE: every coloured fill references an existing token (var(--violet), --brand-dark,
   --soft, --lav, --coral, --accent-700 ...). Depth shadows use NEUTRAL black/white alpha only,
   never a brand hue, so the pending colour audit re-tints the elevation on top with no edits
   here. Shape-grammar motifs are CSS masks (pure geometry) filled by a token, so they re-tint
   too. NOTHING here targets lesson step surfaces (.stage/.card/.opt/figures) — home, brand
   chrome and page headers only. All motion has a reduced-motion static fallback at the bottom. */

/* ============================ keycap + sheen primitives ============================ */
html.v2 { --v2-ease: cubic-bezier(.3,.7,.3,1); }

/* A physical keycap: a top face, a coloured "side" (token) cast straight down, and a soft
   neutral shadow beneath. Depresses on press. Used for the hero art, the CTA and the logo. */
html.v2 .v2kc {
  position: relative; display: inline-block; width: 46px; height: 132px;
  border-radius: 9px 9px 11px 11px;
  background:
    linear-gradient(180deg, #ffffff 0%, var(--soft) 70%, var(--lav) 100%);
  box-shadow:
    0 0 0 1px var(--lav),                       /* crisp edge so a white key reads on white */
    0 2px 1px rgba(255,255,255,.95) inset,
    0 -10px 14px -8px rgba(0,0,0,.14) inset,
    0 8px 0 var(--lav),                          /* the coloured "side" (token) */
    0 16px 26px -8px rgba(0,0,0,.32);            /* soft neutral cast shadow */
  transition: transform .14s var(--v2-ease), box-shadow .14s var(--v2-ease);
}
html.v2 .v2kc-face {
  position: absolute; left: 7px; right: 7px; bottom: 12px; height: 20px; border-radius: 6px;
  /* token-derived wash: color-mix keeps this tied to --violet so the colour audit re-tints it.
     Falls back to the plain token at 6% is not possible without mix, so unsupported engines
     simply show no wash (transparent) — purely decorative, safe to drop. */
  background: linear-gradient(180deg, transparent, transparent);
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--violet) 8%, transparent));
}
html.v2 .v2kc-b {   /* the black keys of the motif — shorter, seated forward */
  width: 30px; height: 84px; z-index: 2; margin: 0 -15px; align-self: flex-start;
  background: linear-gradient(180deg, var(--brand-dark) 0%, var(--ink) 100%);
  box-shadow:
    0 2px 1px rgba(255,255,255,.14) inset,
    0 6px 0 rgba(0,0,0,.55),
    0 12px 20px -8px rgba(0,0,0,.4);
}
html.v2 .v2kc-b .v2kc-face { background: linear-gradient(180deg, rgba(255,255,255,.10), transparent); }

/* one-pass diagonal light sweep — pure white alpha (neutral), so it never tints anything */
html.v2 .v2sheen { position: relative; overflow: hidden; isolation: isolate; }
html.v2 .v2sheen::after {
  content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none;
  background: linear-gradient(115deg, transparent 32%, rgba(255,255,255,.5) 48%, transparent 64%);
  transform: translateX(-130%);
}
@media (prefers-reduced-motion: no-preference) {
  html.v2:not([data-motion]) .v2sheen::after { animation: v2sweep 2.6s cubic-bezier(.4,0,.15,1) .35s both; }
}
@keyframes v2sweep { to { transform: translateX(130%); } }

/* ============================ page-header logo keycap (ALL pages) ============================ */
/* Quiet but unmistakable: the logo tile reads as a physical keycap, and lifts a touch on hover.
   This is the only v2 treatment a lesson page receives — its step surfaces are untouched. */
html.v2 header.site .lockup .logo {
  border-radius: 11px;
  box-shadow:
    0 1px 0 rgba(255,255,255,.9) inset,
    0 4px 0 rgba(0,0,0,.22),
    0 9px 16px -6px rgba(0,0,0,.45);
  transition: transform .16s var(--v2-ease), box-shadow .16s var(--v2-ease);
}
html.v2 .lockup-home:hover .logo, html.v2 header.site .logo:hover {
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 6px 0 rgba(0,0,0,.22), 0 14px 22px -6px rgba(0,0,0,.5);
}

/* ============================ HOME — shared ============================ */
html.v2 main { max-width: 760px; }
/* generous premium rhythm + tighter, more confident headings */
html.v2 .home-hero { margin: 20px 0 40px; position: relative; }
html.v2 .home-hero h2 { font-size: 46px; line-height: 1.04; letter-spacing: -.035em; }
html.v2 .home-hero p { font-size: 21px; max-width: 40ch; margin-top: 14px; }

/* WATERMARK RULING (owner, 2026-07-23): the shape-grammar watermark is reserved for the
   COLOURED headers, where it embosses naturally. It is deliberately NOT on the white hero —
   against plain white it read as stray outlined boxes rather than music geometry. */
html.v2 {
  --v2-motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' fill='none' stroke='%23000' stroke-width='4' stroke-linecap='round'%3E%3Crect x='150' y='16' width='34' height='52' rx='8'/%3E%3Crect x='192' y='16' width='34' height='52' rx='8'/%3E%3Cpath d='M20 96 Q70 44 120 96'/%3E%3Ccircle cx='52' cy='176' r='13'/%3E%3Ccircle cx='80' cy='198' r='13'/%3E%3Ccircle cx='108' cy='220' r='13'/%3E%3Cpath d='M52 176 L80 198 L108 220'/%3E%3C/svg%3E");
}

/* the injected hero keycap cluster, seated on a soft premium tray */
html.v2 .v2-hero-art {
  display: flex; align-items: flex-start; justify-content: center; gap: 0;
  padding: 34px 44px 30px; margin: 6px auto 30px; width: fit-content;
  border-radius: 24px;
  background:
    radial-gradient(120% 120% at 50% 0%, #ffffff 0%, var(--soft) 70%, var(--lav) 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,.9) inset,
    0 0 0 1px var(--lav),
    0 30px 60px -26px rgba(0,0,0,.45);
}
html.v2 .v2-hero-art .v2kc:hover { transform: translateY(-4px); }
html.v2 .v2-hero-art .v2kc:active,
html.v2 .v2-hero-art .v2kc.v2-press { transform: translateY(6px); box-shadow: 0 1px 0 var(--lav), 0 4px 12px -6px rgba(0,0,0,.3); }

/* ============================ HOME — the dominant CTA (fresh) ============================ */
html.v2 .v2-cta.home-cta {
  border: none; border-radius: 16px; padding: 22px 26px;
  font-size: 20px; letter-spacing: -.01em;
  background: linear-gradient(180deg, var(--violet), var(--brand-dark));
  box-shadow:
    0 1px 0 rgba(255,255,255,.28) inset,
    0 6px 0 var(--brand-dark),
    0 16px 30px -10px rgba(0,0,0,.5);
  transition: transform .14s var(--v2-ease), box-shadow .14s var(--v2-ease);
}
html.v2 .v2-cta.home-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(255,255,255,.28) inset, 0 8px 0 var(--brand-dark), 0 22px 40px -10px rgba(0,0,0,.55);
}
html.v2 .v2-cta.home-cta:active {
  transform: translateY(5px);
  box-shadow: 0 1px 0 rgba(255,255,255,.28) inset, 0 2px 0 var(--brand-dark), 0 8px 16px -8px rgba(0,0,0,.5);
}

/* ============================ HOME — returning "arrival" card ============================ */
/* The promoted resume card should feel like arriving somewhere, not a leftover pill. */
html.v2 .v2-arrival.resume-card {
  border-radius: 20px; padding: 30px 28px; margin-bottom: 26px;
  font-size: 22px; letter-spacing: -.01em; text-align: left;
  background:
    radial-gradient(120% 140% at 100% 0%, var(--lav) 0%, transparent 55%),
    linear-gradient(180deg, #ffffff 0%, var(--soft) 100%);
  color: var(--ink);
  box-shadow:
    0 1px 0 rgba(255,255,255,.9) inset,
    0 2px 0 var(--lav),
    0 22px 44px -18px rgba(0,0,0,.4);
  transition: transform .16s var(--v2-ease), box-shadow .16s var(--v2-ease);
}
html.v2 .v2-arrival.resume-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 2px 0 var(--lav), 0 30px 56px -18px rgba(0,0,0,.45);
}
/* a small keycap glyph seated in the corner, so the arrival card carries the brand motif */
html.v2 .v2-arrival.resume-card::before {
  content: ""; position: absolute; top: 20px; right: 22px; width: 46px; height: 46px; opacity: .16;
  background-color: var(--violet);
  -webkit-mask: var(--v2-keycap) center / contain no-repeat; mask: var(--v2-keycap) center / contain no-repeat;
}
html.v2 {
  --v2-keycap: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='60' fill='%23000'%3E%3Crect x='4' y='2' width='40' height='50' rx='9'/%3E%3C/svg%3E");
}

/* ============================ HOME — feature cards ============================ */
html.v2 .ear-home { display: grid; gap: 14px; margin: 26px 0 10px; }
html.v2 .ear-card {
  border: 1px solid var(--lav); border-radius: 16px; padding: 18px 18px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 10px 24px -16px rgba(0,0,0,.35);
  transition: transform .16s var(--v2-ease), box-shadow .16s var(--v2-ease), border-color .16s;
}
html.v2 .ear-card:hover {
  transform: translateY(-4px); border-color: var(--violet);
  box-shadow: 0 2px 4px rgba(0,0,0,.05), 0 22px 40px -18px rgba(0,0,0,.4);
}
/* the icon sits in a soft keycap chip */
html.v2 .ear-card .v2-chip {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, var(--soft));
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 3px 0 var(--lav), 0 6px 12px -6px rgba(0,0,0,.22);
}

/* ============================ HOME — the module path ============================ */
html.v2 ol.path { margin-top: 26px; }
html.v2 .path .mod.open {
  border-radius: 16px !important; padding: 20px 18px !important;
  border-bottom: none !important;
  background: linear-gradient(180deg, #fff, var(--soft)) !important;
  box-shadow: inset 0 0 0 1px var(--lav), 0 12px 26px -18px rgba(0,0,0,.35) !important;
}
html.v2 .path .num {
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 3px 0 rgba(0,0,0,.14), 0 5px 10px -5px rgba(0,0,0,.3);
}

/* ============================ BRAND CHROME — tools + repertoire headers ============================ */
/* a faint keycap-silhouette watermark in the header of the brand surfaces (CVD-safe geometry) */
html.v2 body.tools-page header.site,
html.v2 body.repertoire-page header.site,
html.v2 body.v2-home header.site { position: relative; overflow: hidden; }
html.v2 body.tools-page header.site::after,
html.v2 body.repertoire-page header.site::after,
html.v2 body.v2-home header.site::after {
  content: ""; position: absolute; top: -30px; right: -20px; width: 220px; height: 220px;
  opacity: .12; background-color: #fff;                      /* on the violet header, white reads as a quiet emboss */
  -webkit-mask: var(--v2-motif) center / contain no-repeat; mask: var(--v2-motif) center / contain no-repeat;
  pointer-events: none;
}
/* tool cards on the Tools page get the same lift as the home feature cards */
html.v2 .tool-card {
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 14px 30px -18px rgba(0,0,0,.35);
}

/* ============================ reduced-motion static path ============================ */
/* Keep every dimensional look (depth, shadows, gradients, the seated keycaps) but remove all
   MOTION: no sweep, no lift/press translate, no transitions. The premium feel is in the form,
   not the animation, so the static view is fully intact. */
@media (prefers-reduced-motion: reduce) {
  html.v2:not([data-motion]) .v2sheen::after { display: none; }
  html.v2:not([data-motion]) .v2kc,
  html.v2:not([data-motion]) .v2-cta.home-cta,
  html.v2:not([data-motion]) .ear-card,
  html.v2:not([data-motion]) .v2-arrival.resume-card,
  html.v2:not([data-motion]) header.site .lockup .logo,
  html.v2:not([data-motion]) .path .mod.open {
    transition: none !important;
  }
  html.v2:not([data-motion]) .v2kc:hover,
  html.v2:not([data-motion]) .v2-cta.home-cta:hover,
  html.v2:not([data-motion]) .ear-card:hover,
  html.v2:not([data-motion]) .v2-arrival.resume-card:hover,
  html.v2:not([data-motion]) .lockup-home:hover .logo,
  html.v2:not([data-motion]) header.site .logo:hover,
  html.v2:not([data-motion]) .v2-hero-art .v2kc:hover {
    transform: none !important;
  }
}

/* ============================ narrow-screen tuning (375px) ============================ */
@media (max-width: 720px) {
  html.v2 .home-hero h2 { font-size: 34px; }
  html.v2 .home-hero p { font-size: 18px; }
  html.v2 .v2kc { width: 34px; height: 100px; }
  html.v2 .v2kc-b { width: 22px; height: 64px; margin: 0 -11px; }
  html.v2 .v2-hero-art { padding: 18px 0 22px; }
  html.v2 .v2-arrival.resume-card { font-size: 19px; padding: 24px 22px; }
}

/* ==================================================================================
   THE STRAND NARRATIVE — a scrolling, staged tour of the whole platform.
   Sits below the hero + dominant CTA. Generous spacing; each strand is its own moment.
   ================================================================================== */

/* ---- slim anchor strip (scroll-spy). Stays hidden until the narrative starts, so it never
   competes with the dominant CTA above it. ---- */
html.v2 .v2-anchors {
  position: sticky; top: 0; z-index: 40; margin: 8px -16px 0; padding: 0;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--lav);
  opacity: 0; transform: translateY(-8px); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
html.v2 .v2-anchors.is-on { opacity: 1; transform: none; pointer-events: auto; }
html.v2 .v2-anchors-inner {
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  padding: 8px 16px; max-width: 760px; margin: 0 auto;
}
html.v2 .v2-anchors-inner::-webkit-scrollbar { display: none; }
html.v2 .v2-anchor {
  flex: none; padding: 8px 12px; border-radius: 999px; text-decoration: none;
  font-family: inherit; font-size: 13px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
html.v2 .v2-anchor:hover { color: var(--brand-dark); background: var(--soft); }
html.v2 .v2-anchor.is-here { color: #fff; background: var(--brand-dark); }

/* ---- the sections ---- */
html.v2 .v2-strands { margin: 0 0 8px; }
html.v2 .v2-strand {
  display: grid; grid-template-columns: 1fr; gap: 26px; align-items: center;
  padding: 68px 0; border-bottom: 1px solid var(--lav);
  scroll-margin-top: 64px;                      /* so anchor jumps clear the sticky strip */
}
html.v2 .v2-strand:last-child { border-bottom: none; }
html.v2 .v2-strand-eyebrow {
  margin: 0 0 10px; font-family: Arial, sans-serif; font-size: 12px; font-weight: 800;
  letter-spacing: .18em; text-transform: uppercase; color: var(--coral-deep);
}
html.v2 .v2-strand-title {
  margin: 0 0 12px; font-size: 34px; line-height: 1.08; letter-spacing: -.03em; color: var(--ink);
}
html.v2 .v2-strand-line {
  margin: 0 0 18px; font-size: 19px; line-height: 1.55; color: var(--muted); max-width: 40ch;
}
html.v2 .v2-strand-cta {
  display: inline-block; font-family: inherit; font-size: 16px; font-weight: 700;
  color: var(--brand-dark); text-decoration: none; padding: 10px 0; min-height: 44px;
}
html.v2 .v2-strand-cta:hover { text-decoration: underline; }
html.v2 .v2-strand-soon {
  display: inline-block; padding: 8px 14px; border-radius: 999px;
  background: var(--soft); border: 1px dashed var(--lav);
  font-family: inherit; font-size: 14px; font-weight: 700; color: var(--muted);
}

/* the staged panel each glimpse sits on — the same material language as the hero tray */
html.v2 .v2-strand-stage {
  display: grid; place-items: center; min-height: 190px; padding: 26px 22px;
  border-radius: 22px; color: var(--violet);            /* glimpses inherit this via currentColor */
  background: radial-gradient(120% 130% at 50% 0%, #ffffff 0%, var(--soft) 72%, var(--lav) 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,.9) inset,
    0 0 0 1px var(--lav),
    0 26px 50px -26px rgba(0,0,0,.42);
}

/* ---- the live glimpses ---- */
html.v2 .v2-glimpse { display: flex; align-items: flex-start; justify-content: center; width: 100%; }
html.v2 .v2-glimpse-keys .v2kc { width: 30px; height: 86px; }
html.v2 .v2-glimpse-keys .v2kc-b { width: 20px; height: 54px; margin: 0 -10px; }
html.v2 .v2-glimpse-arc svg, html.v2 .v2-glimpse-ear svg { width: 100%; max-width: 240px; height: auto; }
html.v2 .v2-chip-sol {
  margin: 0 5px; padding: 12px 18px; border-radius: 12px;
  font-family: inherit; font-size: 17px; font-weight: 700; color: var(--brand-dark);
  background: linear-gradient(180deg, #ffffff, var(--soft));
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 4px 0 var(--lav), 0 8px 16px -8px rgba(0,0,0,.28);
}
html.v2 .v2-metro { width: 100%; max-width: 220px; text-align: center; }
html.v2 .v2-metro-read { font-family: inherit; font-size: 40px; font-weight: 800; color: var(--ink); line-height: 1; }
html.v2 .v2-metro-unit { font-size: 15px; font-weight: 700; color: var(--muted); margin-left: 6px; }
html.v2 .v2-metro-bar { margin-top: 14px; height: 8px; border-radius: 999px; background: var(--lav); overflow: hidden; }
html.v2 .v2-metro-fill { display: block; width: 46%; height: 100%; border-radius: 999px; background: var(--violet); }
html.v2 .v2-mini-card {
  width: 100%; max-width: 230px; padding: 18px; border-radius: 16px; text-align: center;
  background: #fff; box-shadow: 0 0 0 1px var(--lav), 0 14px 28px -14px rgba(0,0,0,.4);
}
html.v2 .v2-mini-eyebrow {
  font-family: Arial, sans-serif; font-size: 9px; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent-700, #5e8420);
}
html.v2 .v2-mini-title { margin-top: 8px; font-family: inherit; font-size: 26px; font-weight: 800; color: var(--violet); letter-spacing: -.02em; }
html.v2 .v2-mini-dots { display: flex; gap: 7px; justify-content: center; margin-top: 14px; }
html.v2 .v2-mini-dots span { width: 12px; height: 12px; border-radius: 50%; background: var(--violet); opacity: .28; }
html.v2 .v2-mini-dots span:nth-child(2) { opacity: .55; }
html.v2 .v2-mini-dots span:nth-child(3) { opacity: .85; }

/* ---- scroll staging: rise and settle. The pre-state is only applied by JS when motion is
   allowed AND IntersectionObserver exists, so without either the section is simply visible. ---- */
html.v2 .v2-strand.v2-pre { opacity: 0; transform: translateY(30px); }
html.v2 .v2-strand.v2-in {
  opacity: 1; transform: none;
  transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1);
}

/* desktop: alternate the stage side so the scroll has rhythm */
@media (min-width: 760px) {
  html.v2 .v2-strand { grid-template-columns: 1fr 1fr; gap: 48px; padding: 88px 0; }
  html.v2 .v2-strand:nth-child(even) .v2-strand-body { order: 2; }
  html.v2 .v2-strand-title { font-size: 40px; }
  html.v2 .v2-strand-stage { min-height: 230px; }
}

/* narrow tuning */
@media (max-width: 759px) {
  html.v2 .v2-strand { padding: 52px 0; gap: 22px; }
  html.v2 .v2-strand-title { font-size: 28px; }
  html.v2 .v2-strand-line { font-size: 17px; }
  html.v2 .v2-strand-stage { min-height: 160px; padding: 22px 16px; }
}

/* reduced motion: no rise, no strip slide — everything simply present. Depth is untouched. */
@media (prefers-reduced-motion: reduce) {
  html.v2:not([data-motion]) .v2-strand.v2-pre,
  html.v2:not([data-motion]) .v2-strand { opacity: 1 !important; transform: none !important; transition: none !important; }
  html.v2:not([data-motion]) .v2-anchors { transition: none !important; }
}


/* ============================================================================
   MOTION PREFERENCE — attribute-driven (js/prefs.js).
   The @media (prefers-reduced-motion) blocks above are guarded with html:not([data-motion]) so
   they act ONLY as the no-JavaScript fallback. When prefs.js runs it resolves the preference
   (the device default, or the student's explicit override) and sets data-motion="reduce" or
   "full" on <html>; the rules below then take over. That is what lets a student ask for FULL
   motion even though their device asks for less, which a media query alone cannot express.
   Generated from the rules above, so the two can never drift apart.
   ============================================================================ */
html[data-motion="full"] html.v2 .v2sheen::after { animation: v2sweep 2.6s cubic-bezier(.4,0,.15,1) .35s both; }
html.v2[data-motion="reduce"] .v2sheen::after { display: none; }
html.v2[data-motion="reduce"] .v2kc,
  html.v2[data-motion="reduce"] .v2-cta.home-cta,
  html.v2[data-motion="reduce"] .ear-card,
  html.v2[data-motion="reduce"] .v2-arrival.resume-card,
  html.v2[data-motion="reduce"] header.site .lockup .logo,
  html.v2[data-motion="reduce"] .path .mod.open {
    transition: none !important;
  }
html.v2[data-motion="reduce"] .v2kc:hover,
  html.v2[data-motion="reduce"] .v2-cta.home-cta:hover,
  html.v2[data-motion="reduce"] .ear-card:hover,
  html.v2[data-motion="reduce"] .v2-arrival.resume-card:hover,
  html.v2[data-motion="reduce"] .lockup-home:hover .logo,
  html.v2[data-motion="reduce"] header.site .logo:hover,
  html.v2[data-motion="reduce"] .v2-hero-art .v2kc:hover {
    transform: none !important;
  }
html.v2[data-motion="reduce"] .v2-strand.v2-pre,
  html.v2[data-motion="reduce"] .v2-strand { opacity: 1 !important; transform: none !important; transition: none !important; }
html.v2[data-motion="reduce"] .v2-anchors { transition: none !important; }
