/* FILE-MAP:
purpose: >
  MAPPING LAYER. Binds the deck's own token vocabulary (--bg, --accent, --fs-*)
  to the Ezon Partners design system in ./ezon-tokens.css. The deck token NAMES
  are frozen on purpose — deck.css, form.html and the /editor UI consume them —
  so a re-skin only rewrites the VALUES here. Every mapping carries the reason
  it points where it points.
  The whole mapping block is declared for the dark scope AND for the DS light
  scope selectors, so any element carrying .theme-light / [data-theme-lock="light"]
  re-resolves the same deck tokens against the Starlight semantics. No slide opts
  into light today (see DECISION-BG below) — the capability is wired, not used.
depends_on:
  - path: ./ezon-tokens.css
    uses: [DS primitives + semantic layers]
used_by:
  - ./deck.css
  - ./index.html
  - ./form.html
  - ../src/editor.js
touches:
  db_tables: []
  env: []
  config_files: []
  cache_keys: []
effects: []
invariants:
  - only custom properties, no selectors with layout rules
  - no raw hex here: every colour resolves through an ezon-tokens.css variable
    (the two exceptions are the CSS-only nebula texture and the mono stack, both
    annotated below)
  - deck token names are never renamed, only remapped
END-FILE-MAP */

@import "/ezon-tokens.css";

/* ============================================================
   DECISION-BG — dark Galaxy everywhere.
   DESIGN.md §8 offers three worlds; the light Starlight world is scoped there
   to analytical surfaces (cases, bio, tables). This deck has none of those:
   its densest blocks (matriz 3x3, cols, map3) are diagram-like, not tabular,
   and it is delivered live from a stage in a dark room, where a full-screen
   #F5F3F0 slide is a glare bomb mid-talk. The persistent HUD frame would also
   have to crossfade per slide. So: Galaxy dark for all 49 slides, with the
   nebula texture below satisfying the "no flat background" rule of §8.
   ============================================================ */

:root,
.theme-light,
[data-theme="light"],
[data-theme-lock="light"] {
  /* ---------- Surfaces ---------- */
  /* Slide canvas = the master-dark galaxy gradient itself (DS §5 master-dark,
     135deg #0A0A0A→#1A1A1A→#2A2A2A). --slide-bg flips to master-light inside a
     light scope, so this one line carries both worlds. */
  --bg: var(--slide-bg);
  /* CSS-pure nebula bands (DS §8 asks for texture; the .webp band assets are not
     vendored with the token kit). Two soft nebulae in Pulsar Teal / Nebula Purple
     + one diagonal Starlight band. All alphas <= 0.10 so the measured contrast
     against --bg barely moves. Only literal rgba() in this file, by necessity. */
  /* Real Galaxy nebula from the brand asset library (the same file the Ezon
     proposal decks use), not a CSS approximation of it. The gradient wash stays
     underneath as a tint so the photo never has to carry contrast on its own. */
  --bg-texture:
    image-set(url("/assets/bg/nebula-galaxy2.webp") type("image/webp")),
    radial-gradient(115% 80% at 80% 6%, rgba(78, 205, 196, 0.07) 0%, rgba(78, 205, 196, 0) 58%),
    radial-gradient(95% 75% at 8% 96%, rgba(123, 104, 238, 0.05) 0%, rgba(123, 104, 238, 0) 62%);
  /* Cards / HUD / inputs need an OPAQUE base: deck.css color-mixes the matriz
     highlight against it, and a translucent --surface-card would wash the
     highlight out over the gradient. --surface-solid is the DS's opaque
     dark surface (Event Horizon family) — #22222E dark / #FFFFFF light. */
  --bg-elevated: var(--surface-solid);
  /* Recessed wells: prompt block, text inputs. DS --surface-inset. */
  --bg-inset: var(--surface-inset);
  /* Projection distance: --border-default (10% white) disappears on a beamer,
     so the deck takes the DS's --border-strong (16%) as its default rule weight.
     Still a DS token, one notch up the same scale. */
  --border: var(--border-strong);

  /* ---------- Text ---------- */
  --text: var(--text-primary);        /* Starlight #F5F3F0 — DS: never #FFF on dark */
  /* --text-muted is not chrome here: it paints .subtitle, .col-card copy and the
     matriz cell descriptions — real content, read from the back of a room. So it
     maps to --text-secondary (9.0:1), not --text-tertiary (5.1:1). Cosmic Dust
     stays banned as body copy (DS §2). */
  --text-muted: var(--text-secondary);

  /* ---------- Accents & status: NAME COLLISION, resolved by inheritance ----------
     Six deck tokens share their exact name with a DS semantic token:
       --accent  --accent-strong  --accent-contrast  --success  --warning  --danger
     ezon-tokens.css already declares all six on :root (and re-declares them in the
     light scope), so they arrive with DS values for free and are NOT re-declared
     here — writing `--accent: var(--accent)` would be a self-reference cycle and
     make the property invalid. Resolved values, for the record:
       --accent           #4ECDC4  Pulsar Teal — kickers, bullets, CTA fills, focus
       --accent-strong    #3BB8AF  deeper teal — pressed/hover only (.btn-primary:hover)
       --accent-contrast  #1A1A1A  Deep Space — text on teal fills
       --success          #5BD6CD  teal-family, per DS. NOT Aurora Green: green is
                                   spoken for by the emphasis role, and doubling it
                                   would make every checkpoint read as a metric
       --warning          #FFB454  unfilled {PLACEHOLDER}, presenter notes
       --danger           #FF7675  cassino cell, form errors, offline dot
     EMPHASIS is the one role the deck used to hang off --accent-strong (<em> inside
     h1/.statement/.num-hero, .ph-value, .col-card h3, download links). That is the
     DS's --accent-emphasis instead — Aurora Green #46D880 on dark (9.4:1), Teal
     Profundo #113F3C on light — so deck.css points those rules straight at it and
     --accent-strong keeps its DS meaning. */
}

/* ============================================================
   TYPOGRAPHY
   DS §3 is a cqw scale pinned to a 1280x720 stage. This deck is a fullscreen
   responsive surface, so the ROLE PROPORTIONS travel, not the literals:
   1cqw of the stage == 1vw of the viewport, so DS pt/9.6 becomes the vw term of
   a clamp(). The rem floor keeps phones legible; the rem ceiling stops a 4K
   projector from exploding the scale past ~1.5x the 1920 value.
   ============================================================ */
:root {
  --font-display: var(--font-heading);  /* Sora — headings, capa, statements, numbers */
  /* --font-body already ends in the `sans-serif` generic, so appending a system
     stack after it would be dead weight (the generic never fails). */
  --font-sans: var(--font-body);            /* Montserrat — all body copy */
  /* The DS has no monospace face (the PPTX theme defines none). Prompt blocks and
     [IMG-*] placeholder labels need one; system stack, flagged as out-of-DS. */
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* DS impact (66pt) is deliberately absent: no surface in this deck uses it —
     see the .statement arbitration below. */
  --fs-hero: clamp(2.25rem, 6.25vw, 7.25rem);     /* DS hero 60pt — capa h1, .num-hero */
  /* DS title 44pt. .statement lands here, not on impact: the deck's FRASE lines run
     25–32 chars against the PPTX Impact Statement's ~15, and 6.88vw overflows the
     stage. Arbitration documented in the report. */
  --fs-title: clamp(1.9rem, 4.58vw, 5.25rem);
  --fs-h2: clamp(1.6rem, 3.75vw, 4.35rem);        /* DS h2 36pt */
  --fs-h3: clamp(1.4rem, 3.33vw, 3.9rem);         /* DS h3 32pt */
  --fs-lead: clamp(1.15rem, 2.5vw, 2.9rem);       /* DS lead 24pt — subtitles */
  --fs-body-lg: clamp(1.05rem, 2.08vw, 2.4rem);   /* DS body-lg 20pt */
  --fs-body: clamp(1rem, 1.88vw, 2.2rem);         /* DS body 18pt — dominant */
  --fs-body-sm: clamp(0.95rem, 1.67vw, 1.95rem);  /* DS body-sm 16pt */
  --fs-small: clamp(0.9rem, 1.46vw, 1.7rem);      /* DS caption 14pt */
  --fs-caption-sm: clamp(0.8rem, 1.25vw, 1.45rem);/* DS caption-sm 12pt — chrome floor */
  --fs-mono: clamp(0.85rem, 1.25vw, 1.5rem);      /* prompt block, at the 12pt floor */

  /* Non-slide surfaces (the /form lead page). The DS is a slide system pinned to a
     1280 stage; a 480px form card opened from a QR code on a phone cannot ride
     that scale — the vw term would be either unreadable at 375px or absurd at
     1920. Same faces and roles, page-sized. */
  --fs-page-title: clamp(1.5rem, 3.2vw, 2rem);    /* DS lead/h3 role, page-sized */
  --fs-page-body: clamp(0.9rem, 1.6vw, 1.05rem);  /* DS body-sm role, page-sized */

  --lh-tight: 0.9;    /* DS master lnSpc 90% — the signature of Ezon headings */
  --lh-body: 1.35;    /* DS measured paragraph rhythm */
  --ls-tight: -0.02em;  /* DS §3 negative tracking on titles: -0.015 to -0.02em */
  --ls-title: -0.015em;

  /* ---------- Spacing — snapped to the brand 8px grid (DS §7) ---------- */
  --space-1: 0.5rem;   /* 8px  — sp-sm */
  --space-2: 1rem;     /* 16px — sp-md */
  --space-3: 1.5rem;   /* 24px — sp-lg */
  --space-4: 3rem;     /* 48px — sp-2xl */

  /* ---------- Shape — DS §4 radius scale, in px (no cqw stage here) ---------- */
  --radius: 12px;      /* DS lg */
  --radius-sm: 6px;    /* DS md */

  /* ---------- Motion — DS §10 ---------- */
  --dur-fast: 250ms;   /* theme/letterbox crossfade */
  --dur-slow: 400ms;   /* .reveal / slide transition */
  /* DS only says "ease"; the expressive ease-out is an app-level choice kept from
     the original deck (curve, not a brand value). */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
