/* ==========================================================================
   FlexiLock brand tokens (v1.0, 2026-10-07)
   Source: "FLEXILOCK BRAND GUIDELINES" PDF (59 pp.). Page numbers = PDF pages.
   Components use the ROLES (section 2), never the raw palette (section 1).
   Ratios are WCAG 2.x contrast; AA = 4.5 normal text, 3 large text (≥24px or ≥19px bold).
   ========================================================================== */

:root {
    /* ── 1. Palette: exact values from p.27 (60 · 30 · 10 · 10 · 10) ─────────── */
    --fl-green:  #006456;   /* Greenish     60%: the lead colour */
    --fl-yellow: #FCE615;   /* Fresh Yellow 30% */
    --fl-orange: #EE5107;   /* Red Orange   10% */
    --fl-blue:   #B9CFE9;   /* Velvet Herbs 10% */
    --fl-egg:    #F1F7FC;   /* Egg White    10% */

    /* ── 2. Roles ───────────────────────────────────────────────────────────── */
    /* action: the one main CTA (add to cart, checkout). Logo pairing p.24: yellow on green. */
    --action:        var(--fl-green);
    --action-strong: #00463C;            /* hover/pressed; yellow on it 8.48 (kept from the current theme) */
    --on-action:     var(--fl-yellow);   /* 5.57 on green ✓ AA */

    /* primary: links, active states, headings, header/footer bands */
    --primary:        var(--fl-green);   /* 6.58 on paper · 7.10 on surface ✓ */
    --primary-strong: #00463C;           /* footer, dark bands: egg on it 10.02 */
    --primary-soft:   color-mix(in srgb, var(--fl-green) 10%, var(--fl-egg));  /* tint band, selected rows */
    --on-primary:     var(--fl-egg);     /* 6.58 ✓ (yellow 5.57 ✓ for highlights) */

    /* second: yellow, the 30% colour. Big surfaces and highlights, never text on light. */
    --second:      var(--fl-yellow);
    --on-second:   var(--fl-green);      /* 5.57 ✓ (ink 9.85) */

    /* accent: orange, badges/tags/starbursts only (p.26, p.38). Raw orange fails small text. */
    --accent:        var(--fl-orange);   /* white on it 3.61: large/bold text only */
    --accent-strong: #C63F00;            /* small-text orange: 4.73 on paper; white on it 5.11 (kept from the current theme) */
    --on-accent:     #FFFFFF;            /* ≥19px bold on --accent; any size on --accent-strong */

    /* soft panel: Velvet Herbs blue, calm panels and product backdrops (p.40, p.50) */
    --panel:    var(--fl-blue);
    --on-panel: var(--ink);              /* 7.87 ✓ · green 4.45 = large text only */

    /* neutrals */
    --ink:       #0D3A34;                /* body text, deep green-black: 11.63 on paper · 12.56 on surface */
    --ink-soft:  var(--fl-green);        /* secondary text: 6.58 on paper ✓ */
    --ink-faint: color-mix(in srgb, var(--fl-green) 45%, var(--fl-egg)); /* borders/icons ONLY (2.1:1), never text. The old theme used this name for captions */
    --line:      color-mix(in srgb, var(--fl-green) 16%, var(--fl-egg)); /* hairlines */
    --paper:     var(--fl-egg);          /* page background (the PDF's own page colour) */
    --surface:   #FFFFFF;                /* cards, inputs, sheets */

    /* decorative only (patterns, art, tiles): never carry text */
    --tint-yellow: color-mix(in srgb, var(--fl-yellow) 35%, var(--fl-egg));
    --tint-blue:   color-mix(in srgb, var(--fl-blue) 45%, var(--fl-egg));

    /* focus: orange ring + white halo, visible on paper (4.73) and on green (white 7.10) */
    --focus: var(--accent-strong);

    /* status: kept apart from the brand hues */
    --success:      #1B7F3B;  /* 4.69 on paper · white on it 5.07 */
    --success-soft: #E3F3E8;
    --warning:      #8F5B00;  /* 5.31 on paper (text); fill with --warning-soft */
    --warning-soft: #FFF3D1;
    --danger:       #C0262D;  /* 5.47 on paper · white on it 5.90 */
    --danger-soft:  #FCE5E6;

    /* ── 3. Type (p.30) ─────────────────────────────────────────────────────── */
    /* display: Beachday (Latin, caps only) → Baloo Bhaijaan 2 for Arabic ("خط بالو")
       body:    Baloo Bhaijaan 2 (Arabic + Latin, variable 400–800): the PDF sets its
                Arabic paragraphs in it (p.7–10); covers both scripts in one family
       hand:    Handy Casual (Latin italic): asides, stickers, values (p.5, p.12) — sparingly.
                Latin only; Arabic in this style stays Baloo 800 (the PDF's "كاسديا" is not used). */
    --font-display: "Beachday", "Baloo Bhaijaan 2", system-ui, sans-serif;
    --font-body:    "Baloo Bhaijaan 2", system-ui, "Segoe UI", sans-serif;
    --font-hand:    "Handy Casual", "Baloo Bhaijaan 2", system-ui, sans-serif;

    --fw-body: 400;  --fw-medium: 500;  --fw-bold: 700;
    --fw-heavy: 800;   /* display weight: Arabic headings in Baloo match the PDF only at 800 (p.15) */

    --fs-xs:   0.75rem;                                  /* 12 */
    --fs-sm:   0.875rem;                                 /* 14 */
    --fs-base: 1rem;                                     /* 16 */
    --fs-lg:   clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);  /* 18 → 20 */
    --fs-xl:   clamp(1.375rem, 1.2rem + 0.7vw, 1.75rem);   /* 22 → 28 */
    --fs-2xl:  clamp(1.75rem, 1.4rem + 1.5vw, 2.75rem);    /* 28 → 44 */
    --fs-hero: clamp(2.5rem, 1.6rem + 4vw, 5rem);          /* 40 → 80 */

    --lh-display: 1;      /* Beachday caps sit tight (p.7 "OUR STORY BEGINS…") */
    --lh-body:    1.65;
    --lh-body-ar: 1.85;   /* Arabic needs more air */
    --tracking-caps: 0.04em;  /* Latin only, never on Arabic */

    /* ── 4. Shape & space ───────────────────────────────────────────────────── */
    /* rounded like the wordmark's stroke ends; app-icon square = p.24 */
    --r-sm: 6px;  --r-md: 12px;  --r-lg: 24px;  --r-pill: 999px;
    --shadow: 0 12px 32px -18px color-mix(in srgb, var(--ink) 45%, transparent);  /* the one shadow; the brand is flat */

    --s-1: 4px;  --s-2: 8px;  --s-3: 12px;  --s-4: 16px;
    --s-5: 24px; --s-6: 32px; --s-7: 48px;  --s-8: 64px;

    /* ── 5. Motifs ──────────────────────────────────────────────────────────── */
    /* 12-point starburst (p.26, p.38): stickers, one per section */
    --shape-burst: polygon(50% 0%, 58.5% 18.1%, 75% 6.7%, 73.3% 26.7%, 93.3% 25%, 81.9% 41.5%, 100% 50%, 81.9% 58.5%, 93.3% 75%, 73.3% 73.3%, 75% 93.3%, 58.5% 81.9%, 50% 100%, 41.5% 81.9%, 25% 93.3%, 26.7% 73.3%, 6.7% 75%, 18.1% 58.5%, 0% 50%, 18.1% 41.5%, 6.7% 25%, 26.7% 26.7%, 25% 6.7%, 41.5% 18.1%);
    /* diamond checker (p.32–35): mask tile; colour = element background, base = the other colour */
    --tile-diamond: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M20 1 39 20 20 39 1 20Z'/%3E%3C/svg%3E");
    --tile-diamond-size: 48px;
    /* grid tiles (p.49): hairline square grid */
    --grid-cell: 56px;
}
