/*
 * ═══════════════════════════════════════════════════════════════════════
 *  darx_tokens.css  —  Site-wide Design Tokens
 *  Daralbeida.com  ·  DAB-VIS-CSS-TOKENS-001  ·  v1.0  ·  May 2026
 *
 *  Linked by EVERY page on the site — consumer and system alike:
 *      <link rel="stylesheet" href="css/darx_tokens.css">
 *
 *  Contains only what every page needs:
 *      · Google Fonts @import
 *      · CSS custom properties (design tokens)
 *      · Universal reset
 *      · Base body rules
 *
 *  System / internal pages also load darx_system.css (AFTER this file):
 *      <link rel="stylesheet" href="css/darx_tokens.css">
 *      <link rel="stylesheet" href="css/darx_system.css">
 *
 *  Consumer pages (homepage etc.) do NOT load darx_system.css — they
 *  only need the tokens, reset, and base body defined here.
 *
 *  SPLIT FROM: darx_style_master.css (Sections 1-3 of that file)
 *  darx_system.css carries Sections 4-10 (chrome, layouts, components).
 *
 *  HOW TO CUSTOMIZE — read this first
 *  ───────────────────────────────────
 *  Almost everything visual is controlled by CSS variables in SECTION 1.
 *  Want to tweak the site?  Open SECTION 1, find the variable, change one
 *  value, save.  No need to touch the rule blocks below.
 *
 *  Common tweaks:
 *    · Change brand background        →  --olive-1, --olive-2
 *    · Resize the fixed header/footer →  --stripe-h, --banner-h, --topbar-h
 *    · Change the sidebar width       →  --sidebar-w
 *    · Change body text size          →  body { font-size: ... }
 *    · Change consumer landing colors →  --lp-gold, --lp-dark, --lp-bg
 *
 *  PER-PAGE ENTITY ACCENT (gold / blue / terracotta)
 *  ──────────────────────────────────────────────────
 *  Each template should set its own --accent in a small <style> block
 *  in the page <head>, AFTER linking this file:
 *
 *      :root {
 *        --accent:     #B8832A;   (entity color)
 *        --accent-mid: #D4A95C;   (lighter tint for borders/hover)
 *        --accent-bg:  #FAF1DD;   (very light tint for backgrounds)
 *      }
 *
 *  Reference values:
 *      DARH (Holdings)  →  #1A4D6D / #4A7C9E / #E8EEF3   (deep blue)
 *      DARX (Brands)    →  #B8832A / #D4A95C / #FAF1DD   (atlas gold)
 *      DARM (Maroc)     →  #C4856A / #DCA591 / #F7E8E0   (terracotta)
 *      DAB  (Parent)    →  #B8832A / #D4A95C / #FAF1DD   (same as DARX)
 *
 *  BODY CHROME CLASS
 *  ─────────────────
 *  Pages with the fixed header + footer need  class="has-chrome"  on <body>.
 *  Consumer pages (no fixed chrome) omit this class.
 *
 *  SECTIONS
 *      1.  Design tokens          ← edit here for global changes
 *      2.  Reset
 *      3.  Base body
 * ═══════════════════════════════════════════════════════════════════════
 */

/* ═══════════════════════════════════════════════════════════════════════
   1. DESIGN TOKENS  ← MAIN CUSTOMIZATION PANEL
   ═══════════════════════════════════════════════════════════════════════ */

/* Fonts loaded once for all pages — self-hosted master, NO external domains.
   Resolves relative to THIS file (css/), so it works from any page depth. */
@import url('fonts.css?v=062503');

:root {
  /* ─── FOUNDATION COLORS ────────────────────────────────────────────
     The neutral backbone. Changing these affects every page. */
  --ivory:        #F6F1E7;            /* main page background     */
  --ink:          #1C1C1E;            /* primary text             */
  --ink-muted:    #4A4A4C;            /* secondary text           */
  --ink-faint:    #8A8A8E;            /* labels, captions, hints  */
  --rule:         rgba(28,28,30,0.10); /* faint dividing lines    */

  /* ─── STATUS COLORS ────────────────────────────────────────────────
     Used for KPI states, error blocks, etc. */
  --ok:           #2E7D32;   /* green — success / on-target       */
  --warn:         #B8832A;   /* gold  — attention (same as DARX)  */
  --alert:        #C0392B;   /* red   — error / off-target        */

  /* ─── DARALL CHROME COLORS ─────────────────────────────────────────
     Fixed header/footer brand-band and topbar/footer-bar.
     Change these to repaint the chrome across ALL system pages. */
  --olive:        #6B7F4A;   /* light olive — accents             */
  --olive-1:      #485532;   /* brand-banner background           */
  --olive-2:      #303922;   /* topbar / footer-bar background    */

  /* ─── ENTITY ACCENT (set per-page in template's local <style>) ─────
     These are FALLBACK defaults; each template overrides them.
     See "PER-PAGE ENTITY ACCENT" in the file header. */
  --accent:       #534E46;   /* neutral fallback                  */
  --accent-mid:   #DBC99A;   /* lighter tint                      */
  --accent-bg:   #F4ECD8;    /* very light background tint        */

  /* ─── BRAND PALETTE ALIASES ────────────────────────────────────────
     Named shortcuts for the four entity colors, useful in custom CSS
     when you want a specific entity color regardless of --accent. */
  --brand-dark:  #1C1410;          /* warm near-black — dark sections */
  --gold:         #B8832A;   /* DARX accent                       */
  --ocean:        #4A7C9E;   /* DARH mid-tint                     */
  --terracotta:   #C4856A;   /* DARM accent                       */
  --charcoal:     #2C3539;   /* dark neutral (chart backgrounds)  */

  /* ─── CONSUMER LANDING PALETTE ─────────────────────────────────────
     Used by homepage_features.css and other consumer pages. */
  --lp-gold:      #d4b26a;   /* landing-page accent (warm gold)   */
  --lp-dark:      #1c1b19;   /* landing-page dark background      */
  --lp-bg:        #f6f2ea;   /* landing-page card background      */

  /* ─── TYPOGRAPHY ───────────────────────────────────────────────────
     Change the font for an entire category at once. */
   /* 2026-06-25 (user) UNIFY: bridged to the platform font roles
      (__darmaster/css/base/tokens.css --font-*) so this rogue namespace no longer
      pulls Bebas/Montserrat/DM Mono. Fallbacks = the chosen self-hosted faces. */
   --f-display:    var(--font-title, 'Bricolage Grotesque', sans-serif);  /* headlines, hero titles → title font */
  --f-body:       var(--font-sans, 'Inter', sans-serif);                 /* internal-page body → sans */
  --f-mono:       var(--font-mono, 'Victor Mono', monospace);            /* labels, codes, IDs → mono */
  --f-landing:    var(--font-sans, 'Inter', sans-serif);                 /* consumer-page body → sans */

  /* ─── SPACING ──────────────────────────────────────────────────────
     Base padding/margin units used throughout. */
  --space:        20px;      /* standard internal padding         */
  --space-b:      24px;      /* larger block padding              */
  --sidebar-w:    200px;     /* sidebar width (Register A)        */
  --col-w:        720px;     /* main content column max width     */

  /* ─── CHROME HEIGHTS ───────────────────────────────────────────────
     Resize the fixed header/footer by editing these four values.
     --header-h and --footer-h auto-calculate from them. */
  --stripe-h:     16px;      /* top accent stripe                 */
  --sep-h:         8px;      /* black separator lines             */
  --banner-h:     50px;      /* main brand-banner band            */
  --topbar-h:     40px;      /* topbar (entity + ref)             */

  --header-h: calc(var(--stripe-h) + var(--sep-h) + var(--banner-h) + var(--sep-h) + var(--topbar-h));
  --footer-h: calc(var(--topbar-h) + var(--sep-h) + var(--banner-h) + var(--sep-h) + var(--stripe-h));
}


/* ═══════════════════════════════════════════════════════════════════════
   2. RESET
   ═══════════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { height: 100%; }



/* ═══════════════════════════════════════════════════════════════════════
   3. BASE BODY
   ═══════════════════════════════════════════════════════════════════════ */
body {
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--ui-fs-value);          /* base size — readable but compact      */
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Chrome padding: applied ONLY when the page has the fixed header + footer.
   Add class="has-chrome" to <body> on every system page. Omit on consumer
   pages where the chrome is part of the design (landing, hero, etc.). */
body.has-chrome {
  padding-top:    var(--header-h);
  padding-bottom: var(--footer-h);
}

/* Consumer pages (no fixed chrome) use Inter as the primary font.
   System pages keep Montserrat from --f-body above. */
body:not(.has-chrome) {
  font-family: var(--f-landing);
}
