/* =========================================================================
   Lizensa theme — complete tenant override

   This file is loaded ONLY for Lizensa tenants (via layout.tsx <link>).
   It overrides globals.css :root defaults for ALL three token families
   that Lizensa pages consume. Each family uses its own format, set once,
   never aliased across families.

   Token families:
     1. SHADCN HSL — --background, --foreground, --ring, --accent-hsl, etc.
        Bare HSL triplets consumed via hsl(var(--*)) by Tailwind + shadcn/ui.
        (Note: --accent itself is oklch for legacy rules; shadcn uses --accent-hsl.)

     2. LEGACY TWEAKCN — --accent, --bg-0, --ink-0, --line, etc.
        oklch() raw values consumed via var(--*) by globals.css shared rules.

     3. LIZENSA-BRAND — --lz-amber, --lz-cream, --lz-teal, etc.
        Bare HSL triplets consumed via hsl(var(--lz-*)) by lizensa-home.css
        and Lizensa SVG/TSX components.

   RULES FOR FUTURE EDITORS:
     - Each variable is set exactly ONCE, in its canonical format.
     - NEVER alias --lz-* to --accent / --background / etc. Formats differ.
     - New --lz-* variables: bare HSL triplet (e.g. "38 92% 50%").
     - New legacy oklch variables: oklch() notation (e.g. "oklch(0.74 0.16 70)").
     - New shadcn variables: bare HSL triplet.
     ========================================================================= */

:root {

  /* ====================================================================
     1. SHADCN HSL TOKENS — bare triplets, consumed via hsl(var(--*))
        These override the Distivo defaults from globals.css @layer base.
     ==================================================================== */

  --primary:              186 67% 23%;
  --primary-foreground:   0 0% 100%;
  --accent-hsl:           38 92% 50%;      /* amber — shadcn accent */
  --accent-foreground:    222 47% 11%;

  --background:           40 33% 96%;      /* warm cream */
  --card:                 0 0% 100%;
  --card-foreground:      186 30% 15%;
  --popover:              0 0% 100%;
  --popover-foreground:   186 30% 15%;
  --foreground:           186 30% 15%;
  --muted:                40 22% 92%;
  --muted-foreground:     186 18% 38%;
  --secondary:            40 22% 92%;
  --secondary-foreground: 186 30% 15%;
  --border:               40 20% 86%;
  --input:                40 20% 88%;
  --ring:                 186 67% 23%;

  --success:              155 55% 30%;
  --success-foreground:   40 33% 96%;
  --warning:              32 90% 48%;
  --warning-foreground:   222 47% 11%;
  --info:                 195 70% 35%;
  --info-foreground:      40 33% 96%;

  /* ====================================================================
     2. LEGACY TWEAKCN TOKENS — oklch() raw, consumed via var(--*)
        Used by globals.css shared rules (header, footer, chrome, buttons,
        checkout shell, catalog filters).  --accent is oklch here because
        globals.css uses var(--accent) directly (not wrapped in hsl()).
     ==================================================================== */

  --bg-0:   oklch(0.96 0.02 80);
  --bg-1:   oklch(0.97 0.02 80);
  --bg-2:   oklch(1 0 0);
  --bg-3:   oklch(0.93 0.02 80);

  --ink-0:  oklch(0.22 0.04 200);
  --ink-1:  oklch(0.34 0.03 200);
  --ink-2:  oklch(0.46 0.025 200);
  --ink-3:  oklch(0.55 0.02 200);
  --ink-4:  oklch(0.70 0.015 200);

  /* Accent ramp — warm amber, not Distivo blue.
     NOTE: --accent is oklch() because 55+ globals.css rules consume it
     as var(--accent) directly. For hsl() wrapping (shadcn/Tailwind),
     use --accent-hsl above.  NEVER mix the two. */
  --accent:         oklch(0.74 0.16 70);
  --accent-bright:  oklch(0.68 0.18 70);
  --accent-ink:     oklch(0.18 0.04 200);
  --accent-glow:    oklch(0.74 0.16 70 / 0.18);
  --accent-soft:    oklch(0.74 0.16 70 / 0.35);

  --line:           oklch(0.86 0.02 80);
  --line-strong:    oklch(0.78 0.02 80);
  --line-soft:      oklch(0.92 0.02 80);

  /* ====================================================================
     3. LIZENSA-BRAND TOKENS — oklch, consumed via var(--lz-*) and
        color-mix(in oklch, var(--lz-*) N%, transparent).
        Same format as family 2 (TweakCN). These are Lizensa-specific
        names that don't conflict with shared tokens. Future Lizensa
        pages should use these instead of repurposing --accent/etc.
     ==================================================================== */

  --lz-cream:        oklch(0.9733 0.0070 88.6);
  --lz-card:         oklch(1.0000 0.0000 89.9);
  --lz-ink:          oklch(0.2662 0.0240 204.7);
  --lz-ink-2:        oklch(0.4887 0.0343 204.1);
  --lz-ink-3:        oklch(0.6581 0.0285 205.4);
  --lz-line:         oklch(0.9015 0.0158 86.4);
  --lz-line-strong:  oklch(0.8442 0.0235 84.6);
  --lz-teal:         oklch(0.4299 0.0671 206.4);
  --lz-teal-2:       oklch(0.5304 0.0809 206.2);
  --lz-amber:        oklch(0.7704 0.1646 70.7);
  --lz-amber-deep:   oklch(0.5939 0.1367 59.7);
  --lz-amber-soft:   oklch(0.9591 0.0345 82.9);
  --lz-radius:       18px;
  --lz-radius-lg:    24px;
  --lz-radius-pill:  9999px;
  --lz-shadow-sm:    0 1px 2px hsl(186 30% 15% / 0.04),
                     0 4px 12px hsl(38 92% 50% / 0.04);
  --lz-shadow-md:    0 1px 2px hsl(186 30% 15% 0.04),
                     0 8px 24px hsl(38 92% 50% / 0.06);
}

/* Dark-mode overrides — Lizensa is locked to light by layout.tsx, but if
   a user force-toggles via browser extension, these keep shadcn tokens
   reasonable instead of falling back to Distivo's dark palette. */
.dark {
  --primary:              174 78% 35%;
  --primary-foreground:   0 0% 100%;
  --accent-hsl:           38 92% 55%;
  --accent-foreground:    222 47% 11%;
}
