/*!
 * Arkada CMS — Design Tokens
 * Single source of truth for colour, elevation and rhythm.
 * Loaded FIRST, before the theme and every component stylesheet.
 *
 * The palette is lifted from includes/maintenance-page.php so the live site
 * and the maintenance page read as one product.
 *
 * Dark by design. There is no light mode: the ground colour, the gold
 * hairlines and the brand logo all assume a dark canvas. Earlier versions
 * shipped a light palette here and then fought it back to dark from each
 * theme's override stylesheet — do not reintroduce that.
 *
 * --ark-x is canonical. The --dh-x, --ucp-x and --mk-x families below are
 * compatibility aliases so existing component and theme CSS resolves to this
 * palette without being rewritten rule by rule. Prefer --ark-x in new code.
 */

:root {
    /* ---- Ground ------------------------------------------------------- */
    --ark-bg-0:          #0a0806;  /* page canvas — bronze-black */
    --ark-bg-1:          #171008;  /* warm lift, bottom of the gradient */
    --ark-bg-sunk:       #060503;  /* wells, footer, recessed areas */

    /* ---- Accent: gold ------------------------------------------------- */
    --ark-gold:          #d9a441;
    --ark-gold-bright:   #f4cd7a;
    --ark-gold-deep:     #8a6a2b;
    --ark-gold-a35:      rgba(217, 164, 65, .35);
    --ark-gold-a25:      rgba(217, 164, 65, .25);
    --ark-gold-a12:      rgba(217, 164, 65, .12);
    --ark-gold-a08:      rgba(217, 164, 65, .08);
    --ark-gold-gradient: linear-gradient(135deg, var(--ark-gold-bright), var(--ark-gold));

    /* ---- Secondary: sky ----------------------------------------------- */
    --ark-blue:          #57b6e6;
    --ark-blue-bright:   #8fd3f7;  /* light end of progress/stat bars */
    --ark-blue-deep:     #3f8fb8;
    --ark-blue-a30:      rgba(87, 182, 230, .30);
    --ark-blue-a12:      rgba(87, 182, 230, .12);

    /* ---- Ink ---------------------------------------------------------- */
    --ark-text:          #f2ead9;  /* cream */
    --ark-muted:         #a89a86;  /* warm grey, biased toward the accent */
    --ark-faint:         #6f6557;  /* de-emphasised captions */

    /* ---- Surfaces ----------------------------------------------------- */
    --ark-card:          rgba(20, 15, 10, .74);
    --ark-card-raise:    rgba(32, 24, 15, .80);
    --ark-well:          rgba(0, 0, 0, .26);
    --ark-border:        rgba(217, 164, 65, .25);  /* emphasised edge */
    --ark-border-soft:   rgba(217, 164, 65, .14);  /* default edge */
    --ark-hairline:      rgba(255, 255, 255, .06); /* row dividers */

    /* ---- Semantic — deliberately NOT the accent ----------------------- */
    --ark-success:       #8fd858;
    --ark-danger:        #e5654b;
    --ark-warning:       #e8964b;
    --ark-info:          var(--ark-blue);
    --ark-purple:        #b98cd0;

    /* ---- Elevation ---------------------------------------------------- */
    --ark-shadow-card:   0 24px 80px rgba(0, 0, 0, .45);
    --ark-shadow-btn:    0 8px 24px rgba(217, 164, 65, .25);
    --ark-inset:         inset 0 0 0 1px rgba(255, 255, 255, .04);

    /* ---- Radius ------------------------------------------------------- */
    --ark-r-sm:          .5rem;
    --ark-r-md:          .85rem;
    --ark-r-lg:          1.25rem;

    /* ---- Type --------------------------------------------------------- */
    --ark-display:       'Cinzel', Georgia, serif;
    --ark-body:          'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Ubuntu, sans-serif;

    /* ==================================================================
       COMPATIBILITY ALIASES
       Legacy names kept so existing CSS resolves to the palette above.
       ================================================================== */

    /* --dh-* — shared component stylesheets (auth, ucp, news, forum, ...).
       --dh-accent is the primary interactive colour; in this design that is
       gold, not the old slate blue. --dh-border carries ~160 uses, so it maps
       to the soft edge — the emphasised --ark-border would gild every rule. */
    --dh-accent:         var(--ark-gold);
    --dh-accent-hover:   var(--ark-gold-bright);
    --dh-gold:           var(--ark-gold);
    --dh-gold-light:     var(--ark-gold-bright);
    --dh-text:           var(--ark-text);
    --dh-text-muted:     var(--ark-muted);
    --dh-bg:             var(--ark-bg-0);
    --dh-bg-secondary:   var(--ark-bg-1);
    --dh-bg-card:        var(--ark-card);
    --dh-border:         var(--ark-border-soft);
    --dh-red:            var(--ark-danger);
    --dh-green:          var(--ark-success);
    --dh-blue:           var(--ark-blue);
    --dh-purple:         var(--ark-purple);
    --dh-orange:         var(--ark-warning);

    /* --ucp-* — referenced inline by a few UserCP module files. */
    --ucp-text:          var(--ark-text);
    --ucp-text-muted:    var(--ark-muted);
    --ucp-bg:            var(--ark-bg-0);
    --ucp-border:        var(--ark-border-soft);
    --ucp-accent:        var(--ark-gold);

    /* --mk-* — muarkada theme. The old cyan (#00d2ff) folds into the sky
       secondary so the site carries one blue, matching the logo's gems. */
    --mk-bg:             var(--ark-bg-0);
    --mk-bg-soft:        var(--ark-bg-1);
    --mk-panel:          var(--ark-card);
    --mk-panel-soft:     rgba(255, 255, 255, .03);
    /* Every --mk-card site is a card surface (news blocks, info/download
       cards, castle-siege panels), so it resolves to the real panel fill
       rather than the near-invisible white wash it used to hold. */
    --mk-card:           var(--ark-card);
    --mk-border:         var(--ark-border-soft);
    --mk-line:           var(--ark-hairline);
    --mk-line-soft:      rgba(255, 255, 255, .04);
    --mk-text:           var(--ark-text);
    --mk-text-soft:      var(--ark-muted);
    --mk-muted:          var(--ark-muted);
    --mk-gold:           var(--ark-gold);
    --mk-gold-soft:      var(--ark-gold-bright);
    --mk-cyan:           var(--ark-blue);
    --mk-blue:           var(--ark-blue);
    --mk-success:        var(--ark-success);
    --mk-danger:         var(--ark-danger);
    --mk-warning:        var(--ark-warning);
    --mk-shadow:         var(--ark-shadow-card);
    --mk-gold-gradient:  linear-gradient(180deg, #f3e2a5 0%, var(--ark-gold) 50%, var(--ark-gold-deep) 100%);

    /* Unprefixed legacy names from an older pass over the muarkada theme.
       Only style.css still reads these; retire them with it. */
    --bg-dark:           var(--ark-bg-0);
    --panel-glass:       var(--ark-card);
    --border-light:      var(--ark-hairline);
    --blue-energy:       var(--ark-blue);
    --gold-gradient:     var(--mk-gold-gradient);
}
