/*
 * ============================================================================
 * ZEDD LABS — SHARED DESIGN TOKENS (Apple-minimal)
 * ============================================================================
 *
 * HOW TO USE
 * ----------
 * 1. Link it (place BEFORE your site's own stylesheet so the site can still
 *    override locally if needed):
 *
 *      <link rel="stylesheet" href="/tokens/zedd-design-tokens.css">
 *
 *    …or @import it at the very top of a CSS file (must be the first rule):
 *
 *      @import url("/tokens/zedd-design-tokens.css");
 *
 *    Pure CSS — no build step, no preprocessor, no JS required.
 *
 * 2. Reference tokens by name in your CSS:
 *
 *      body   { background: var(--zl-white); color: var(--zl-gray-dark);
 *               font-family: var(--zl-font); }
 *      a, .cta { color: var(--zl-blue); }   (links and CTAs)
 *      .panel { background: var(--zl-gray-light); }
 *
 * DARK MODE — AUTOMATIC BLUE SHIFT
 * --------------------------------
 * `--zl-blue` is `#0071E3` in light mode (Apple's light link blue) and
 * `#2997FF` in dark mode (Apple's dark link blue — #0071E3 "vibrates" on
 * dark backgrounds per Apple's HIG). The VARIABLE NAME STAYS THE SAME;
 * only the value shifts. Site code never changes.
 *
 * Both triggers are supported so this file works regardless of each site's
 * existing convention:
 *   • `@media (prefers-color-scheme: dark)` — automatic OS-level dark mode
 *   • `[data-theme="dark"]` on <html> — explicit attribute opt-in
 *
 * TOKEN GUIDE — WHICH TO USE FOR WHAT
 * ------------------------------------
 * --zl-white        Page background (light mode) / primary text (dark mode)
 * --zl-black        Pure black — near-full-screen overlays, dark chips only.
 *                   Prefer --zl-gray-dark for normal text.
 * --zl-gray-dark    Default text color (Apple's #1D1D1F)
 * --zl-gray-light   Card / panel / section backgrounds (Apple's #F5F5F7)
 * --zl-blue         Links, CTAs, focus rings, active accents. Auto-shifts to
 *                   #2997FF in dark mode. NEVER hard-code a hex for links.
 * --zl-warning-bg / --zl-warning-text / --zl-warning-border
 *                   The intentional amber trio — the only non-Apple colors in
 *                   this file. Amber is semantically correct for warnings.
 * --zl-success      Confirmations, positive states (Apple-ish #1E8E3E)
 * --zl-error        Errors, destructive actions (Apple's #D70015)
 * --zl-accent-*     Product accents — one per product, drawn from Apple's
 *                   system palette (the family Apple designed to coexist):
 *                   use on product cards, icon chips, and small brand
 *                   touches. NEVER body text, NEVER links/CTAs (links and
 *                   CTAs stay --zl-blue). Each auto-shifts to its HIG dark
 *                   variant in dark mode (both triggers), same as --zl-blue.
 *                   • --zl-accent-vestwiz  green  #34C759 — money/growth:
 *                     VestWiz is equity-comp tax tools
 *                   • --zl-accent-provatus purple #AF52DE — trust/premium:
 *                     Provatus is enterprise compliance-audit SaaS
 *                   • --zl-accent-tendery  orange #FF9500 — deals/action:
 *                     Tendery is tender-offer management
 *                   • --zl-accent-6039pro  mint   #00C7BE — precision/forms:
 *                     6039Pro is Form 3921/3922 employer filing
 *                   • --zl-accent-zeddlabs pink   #FF2D55 — studio creative
 *                     energy: the Zedd Labs mark itself
 *                   Each site's own accent can double as its local brand
 *                   touch (e.g. Tendery's site uses the Tendery accent).
 * --zl-font         UI type stack. Apple-native FIRST so iPhones render true
 *                   SF Pro (system-ui aliases do NOT guarantee SF Pro).
 * --zl-font-mono    Code / numbers / mono text
 * --zl-text-*       Type scale (xs → 3xl). Pair with --zl-leading-*.
 *
 * LEGACY ALIASES
 * --------------
 * Old per-site variable names that used to carry navy/Tailwind values are
 * remapped here to the Apple palette so existing declarations keep working
 * without editing every site. These aliases are DEPRECATED for new code —
 * prefer the --zl-* names — but they will not break.
 *
 * RULES (enforced by review)
 * -------------------------
 * • NO navy, NO gold, NO gradients in new tokens.
 * • The ONLY warm hexes allowed are the amber warning trio AND the five
 *   --zl-accent-* product accents (2026-09-26: accents approved by Leo —
 *   Apple's system palette is warm-inclusive by design).
 * • Never introduce Tailwind hexes (#e5e7eb, #f3f4f6, #111827, …) as new
 *   tokens — they exist here only as legacy-name remaps to Apple values.
 * ============================================================================
 */

:root {
  /* ---- Apple core palette ---- */
  --zl-white: #FFFFFF;
  --zl-black: #000000;
  --zl-gray-dark: #1D1D1F;
  --zl-gray-light: #F5F5F7;
  --zl-blue: #0071E3; /* light-mode links/CTAs — auto-shifts in dark mode */

  /* ---- Semantic colors ---- */
  --zl-warning-bg: #fef3e2;
  --zl-warning-text: #5a4a1e;
  --zl-warning-border: #f5dfb8;
  --zl-warning: var(--zl-warning-text); /* convenience alias: default warning ink */
  --zl-success: #1e8e3e;
  --zl-error: #d70015;

  /* ---- Product accents (Apple system palette — designed to coexist) ----
     One accent per product: product cards, icon chips, small brand touches.
     NEVER body text, NEVER links/CTAs. Values shift to HIG dark variants
     in the dark-mode blocks below (variable names stay the same). */
  --zl-accent-vestwiz: #34c759;  /* Apple systemGreen  — money/growth */
  --zl-accent-provatus: #af52de; /* Apple systemPurple — trust/premium */
  --zl-accent-tendery: #ff9500;  /* Apple systemOrange — deals/action */
  --zl-accent-6039pro: #00c7be;  /* Apple systemMint   — precision/forms */
  --zl-accent-zeddlabs: #ff2d55; /* Apple systemPink   — studio energy */

  /* ---- Type ---- */
  --zl-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
             Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --zl-font-mono: ui-monospace, "SF Mono", Menlo, monospace;

  --zl-text-xs: 0.75rem;
  --zl-text-sm: 0.875rem;
  --zl-text-base: 1rem;
  --zl-text-lg: 1.125rem;
  --zl-text-xl: 1.25rem;
  --zl-text-2xl: 1.5rem;
  --zl-text-3xl: 1.875rem;

  --zl-leading-tight: 1.25;
  --zl-leading-normal: 1.5;
  --zl-leading-relaxed: 1.625;

  /* ---- Legacy aliases (deprecated — prefer --zl-* names) ---- */
  --navy-950: var(--zl-gray-dark); /* old navy keystone remapped to Apple gray */
  --navy-900: var(--zl-gray-dark);
  --navy-800: var(--zl-gray-dark);
  --navy: var(--zl-gray-dark);
  --gray-900: var(--zl-gray-dark);   /* Tailwind-gray names remapped to Apple */
  --gray-100: var(--zl-gray-light);
  --gray-50: var(--zl-white);
}

/* ---- Dark mode: OS-level preference ---- */
@media (prefers-color-scheme: dark) {
  :root {
    --zl-blue: #2997FF; /* dark-mode link blue (HIG-correct, no vibration) */
    --zl-accent-vestwiz: #30d158;  /* dark systemGreen  */
    --zl-accent-provatus: #bf5af2; /* dark systemPurple */
    --zl-accent-tendery: #ff9f0a;  /* dark systemOrange */
    --zl-accent-6039pro: #63e6e2;  /* dark systemMint   */
    --zl-accent-zeddlabs: #ff375f; /* dark systemPink   */
  }
}

/* ---- Dark mode: explicit attribute opt-in (works regardless of site convention) ---- */
[data-theme="dark"] {
  --zl-blue: #2997FF;
  --zl-accent-vestwiz: #30d158;  /* dark systemGreen  */
  --zl-accent-provatus: #bf5af2; /* dark systemPurple */
  --zl-accent-tendery: #ff9f0a;  /* dark systemOrange */
  --zl-accent-6039pro: #63e6e2;  /* dark systemMint   */
  --zl-accent-zeddlabs: #ff375f; /* dark systemPink   */
}
