/* =====================================================================
 * variables.css — Tahfiz Abroad SG design tokens.
 *
 * THIS IS THE SINGLE HEX SOURCE for the project (CLAUDE.md rule 11 /
 * PROJECT_SPEC §10.4). Every other CSS file MUST reference these tokens
 * via var(...). The hex audit confirms that:
 *   grep -rn "#[0-9a-fA-F]\{3,8\}" public/assets/css/
 * matches only this file (and the vendor/ third-party CSS files).
 *
 * Token layers, in order:
 *   1. Raw brand colours, with 5 tones for the four "deep" colours.
 *   2. Single-tone brand colours (Ice Mist, White).
 *   3. Semantic feedback colours (success/error/warning/info).
 *   4. Semantic UI tokens (bg, surface, text, border, link, …).
 *      ← Components read THESE, not the raw colour names.
 *   5. Brand-derived tokens (primary, accent, secondary, ink) —
 *      also fair game for components.
 *   6. Typography, spacing, radii, shadows, motion, z-index.
 *
 * Dark mode is built but NOT toggled in v1 — flip via [data-theme="dark"]
 * on <html> for a manual smoke test (DevTools).
 * ===================================================================== */

:root {
    /* ---------------------------------------------------------------
     * 1. RAW BRAND PALETTE — 5 tones each for the four core colours.
     * Tones derived perceptually (HSL-balanced) — DO NOT linearly
     * lighten/darken RGB in code; refine these values here only.
     * --------------------------------------------------------------- */

    /* Deep Teal — primary brand. Anchor: #0E7C86. */
    --color-deep-teal-lighter:  #D3EBEE;
    --color-deep-teal-light:    #79C1C9;
    --color-deep-teal-base:     #0E7C86;
    --color-deep-teal-dark:     #0A5F66;
    --color-deep-teal-darker:   #063C42;

    /* Turquoise — accent / CTA energy. Anchor: #19A7B8. */
    --color-turquoise-lighter:  #D8F0F4;
    --color-turquoise-light:    #80D6E1;
    --color-turquoise-base:     #19A7B8;
    --color-turquoise-dark:     #118797;
    --color-turquoise-darker:   #0A5A65;

    /* Electric Blue — secondary / links / country accents. Anchor: #2563C9. */
    --color-electric-blue-lighter: #D7E3F8;
    --color-electric-blue-light:   #9CB6E3;
    --color-electric-blue-base:    #2563C9;
    --color-electric-blue-dark:    #1D4FA1;
    --color-electric-blue-darker:  #13366D;

    /* Midnight Navy — ink / dark-mode background. Anchor: #0A1A2F. */
    --color-midnight-navy-lighter: #CDD6DF;
    --color-midnight-navy-light:   #6B86A6;
    --color-midnight-navy-base:    #0A1A2F;
    --color-midnight-navy-dark:    #06121F;
    --color-midnight-navy-darker:  #030A14;

    /* ---------------------------------------------------------------
     * 2. SINGLE-TONE BRAND COLOURS.
     * --------------------------------------------------------------- */
    --color-ice-mist:  #EAF6F7;
    --color-white:     #FFFFFF;

    /* ---------------------------------------------------------------
     * 3. SEMANTIC FEEDBACK COLOURS (status, not brand).
     * --------------------------------------------------------------- */
    --color-success-base: #16A34A;
    --color-error-base:   #DC2626;
    --color-warning-base: #D97706;
    /* info reuses turquoise — declared via the semantic token below. */

    /* ---------------------------------------------------------------
     * 4. SEMANTIC UI TOKENS (light mode default).
     *    Components reference THESE — never the raw names above.
     * --------------------------------------------------------------- */
    --color-bg:                var(--color-white);
    --color-surface:           var(--color-ice-mist);
    --color-surface-elevated:  var(--color-white);

    --color-text:              var(--color-midnight-navy-base);
    --color-text-muted:        var(--color-midnight-navy-light);
    --color-text-inverse:      var(--color-white);

    --color-border:            var(--color-deep-teal-lighter);
    --color-border-strong:     var(--color-deep-teal-light);

    --color-link:              var(--color-electric-blue-base);
    --color-link-hover:        var(--color-electric-blue-dark);

    --color-success:           var(--color-success-base);
    --color-error:             var(--color-error-base);
    --color-warning:           var(--color-warning-base);
    --color-info:              var(--color-turquoise-base);

    /* ---------------------------------------------------------------
     * 5. BRAND-DERIVED TOKENS (also safe for components to reference).
     * --------------------------------------------------------------- */
    --color-primary:           var(--color-deep-teal-base);
    --color-primary-hover:     var(--color-deep-teal-dark);
    --color-primary-active:    var(--color-deep-teal-darker);

    --color-accent:            var(--color-turquoise-base);
    --color-accent-hover:      var(--color-turquoise-dark);

    /* Zalo brand blue (Vietnam site contact channel). */
    --color-zalo:              #0068FF;
    --color-zalo-hover:        #0057D6;

    --color-secondary:         var(--color-electric-blue-base);
    --color-secondary-hover:   var(--color-electric-blue-dark);

    --color-ink:               var(--color-midnight-navy-base);

    /* ---------------------------------------------------------------
     * 6. TYPOGRAPHY.
     * --------------------------------------------------------------- */
    --font-sans:   'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-arabic: 'Amiri', 'Traditional Arabic', serif;

    /* Type scale — Major Third (1.250). */
    --fs-xs:    0.75rem;
    --fs-sm:    0.875rem;
    --fs-base:  1rem;
    --fs-md:    1.125rem;
    --fs-lg:    1.25rem;
    --fs-xl:    1.5625rem;
    --fs-2xl:   1.953rem;
    --fs-3xl:   2.441rem;
    --fs-4xl:   3.815rem;
    --fs-5xl:   4.768rem;

    --fw-light:    300;
    --fw-regular:  400;
    --fw-medium:   500;
    --fw-semibold: 600;
    --fw-bold:     700;

    --lh-tight:   1.2;
    --lh-normal:  1.5;
    --lh-relaxed: 1.6;

    /* Spacing — 4px base, 10 steps. */
    --space-1:  0.25rem;
    --space-2:  0.5rem;
    --space-3:  0.75rem;
    --space-4:  1rem;
    --space-5:  1.5rem;
    --space-6:  2rem;
    --space-7:  3rem;
    --space-8:  4rem;
    --space-9:  6rem;
    --space-10: 8rem;

    --container-max: 1280px;

    /* Radii. */
    --radius-sm:   0.25rem;
    --radius-md:   0.5rem;
    --radius-lg:   1rem;
    --radius-pill: 999px;

    /* Shadows — built from translucent ink so they keep their look on
     * the ice-mist surface and don't bleed in dark mode (re-tuned in
     * the dark scope further down). */
    --shadow-sm: 0 1px 2px 0 rgba(10, 26, 47, 0.06),
                 0 1px 1px 0 rgba(10, 26, 47, 0.04);
    --shadow-md: 0 4px 12px -2px rgba(10, 26, 47, 0.10),
                 0 2px 6px -1px rgba(10, 26, 47, 0.06);
    --shadow-lg: 0 20px 40px -10px rgba(10, 26, 47, 0.20),
                 0 8px 16px -4px rgba(10, 26, 47, 0.10);

    /* Motion. */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;

    /* Z-index ladder. */
    --z-base:     1;
    --z-dropdown: 10;
    --z-sticky:   100;
    --z-fixed:    200;
    --z-modal:    300;
    --z-toast:    400;
}

/* =====================================================================
 * DARK MODE — palette is dark-ready (CLAUDE.md rule 16, PROJECT_SPEC §10.3).
 * No toggle UI ships in v1; this scope exists so a manual
 * <html data-theme="dark"> flips the entire site.
 *
 * We redefine ONLY the semantic UI tokens and a slightly stronger
 * shadow set. Brand-derived tokens stay identical (the brand colour
 * does not change between modes).
 * ===================================================================== */
[data-theme="dark"] {
    --color-bg:                var(--color-midnight-navy-base);
    --color-surface:           var(--color-midnight-navy-dark);
    --color-surface-elevated:  var(--color-midnight-navy-light);

    --color-text:              var(--color-ice-mist);
    --color-text-muted:        var(--color-midnight-navy-lighter);
    --color-text-inverse:      var(--color-midnight-navy-base);

    --color-border:            var(--color-midnight-navy-light);
    --color-border-strong:     var(--color-deep-teal-dark);

    --color-link:              var(--color-turquoise-base);
    --color-link-hover:        var(--color-turquoise-light);

    /* Shadows on a near-black background need more punch to remain visible. */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.40);
    --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.50);
    --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.70);
}
