/* Adizes design tokens — v1.0 (December 2026)
   Source of truth for colour, type, spacing, radius, borders and motion.
   Import once at the app root, after fonts.css. Every component reads these variables;
   never hard-code a hex value in a component. */

:root {
  /* ---------- Colour: neutrals ---------- */
  --adz-paper:        #FAFAF7;  /* page background (light) */
  --adz-surface:      #FFFFFF;  /* cards, inputs, table rows */
  --adz-surface-2:    #F2F1EC;  /* subtle fill: hover rows, sidebars, code */
  --adz-hairline:     #E4E2DC;  /* default 1px borders and dividers */
  --adz-border:       #CFCDC6;  /* input borders, stronger dividers */
  --adz-ink:          #0E0E10;  /* primary text, dark sections, strong rules */
  --adz-ink-2:        #1A1A1D;  /* raised surface on dark */
  --adz-body:         #3A3A40;  /* long-form body text on light (10.8:1) */
  --adz-graphite:     #5C5C63;  /* secondary text, labels, captions (6.3:1) */
  --adz-muted:        #8A8A90;  /* decorative only: placeholders, disabled (3.3:1, never for body text) */

  /* ---------- Colour: brand accent (the ONLY accent) ---------- */
  --adz-red:          #D40E14;  /* primary actions, focus of attention, Prime highlight (5.2:1 on paper) */
  --adz-red-hover:    #B30B10;
  --adz-red-tint:     #FDF3F3;  /* selected-row / selected-option fill */
  --adz-on-red:       #FFFFFF;

  /* ---------- Colour: status (use with a word or icon, never colour alone) ---------- */
  --adz-success:      #2F6B4F;
  --adz-success-tint: #EAF3EE;
  --adz-warning:      #8A5A00;
  --adz-warning-tint: #FBF3E2;
  --adz-danger:       #9E2A1F;  /* errors are darker than brand red so red buttons never read as errors */
  --adz-danger-tint:  #FBECEA;
  --adz-info:         #2F4A6B;
  --adz-info-tint:    #EAF0F6;

  /* ---------- Colour: PAEI roles (Adizes methodology) ----------
     Always paired with the letter (P, A, E, I). White text passes 4.5:1 on each. */
  --adz-paei-p:       #9E2A1F;  /* Produce */
  --adz-paei-a:       #2F4A6B;  /* Administer */
  --adz-paei-e:       #8A5A00;  /* Entrepreneur */
  --adz-paei-i:       #2F6B4F;  /* Integrate */
  --adz-paei-p-tint:  #FBECEA;
  --adz-paei-a-tint:  #EAF0F6;
  --adz-paei-e-tint:  #FBF3E2;
  --adz-paei-i-tint:  #EAF3EE;

  /* ---------- Semantic aliases (components use these) ---------- */
  --adz-bg:           var(--adz-paper);
  --adz-bg-raised:    var(--adz-surface);
  --adz-bg-sunken:    var(--adz-surface-2);
  --adz-text:         var(--adz-ink);
  --adz-text-body:    var(--adz-body);
  --adz-text-muted:   var(--adz-graphite);
  --adz-line:         var(--adz-hairline);
  --adz-line-strong:  var(--adz-ink);
  --adz-accent:       var(--adz-red);
  --adz-accent-text:  var(--adz-red);   /* red used as TEXT (links, eyebrows, deltas) */
  --adz-focus:        var(--adz-ink);

  /* ---------- Type ---------- */
  --adz-font-display: 'Fraunces Variable', 'Fraunces', Georgia, 'Times New Roman', serif;
  --adz-font-ui:      'Inter Tight Variable', 'Inter Tight', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --adz-font-mono:    ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* App scale (px). Marketing pages may go larger with --adz-text-hero. */
  --adz-text-xs:   12px;  /* table meta, badges — UI font only */
  --adz-text-sm:   13px;  /* labels, captions, eyebrows */
  --adz-text-md:   15px;  /* default UI text, inputs, table cells */
  --adz-text-lg:   17px;  /* long-form body, descriptions */
  --adz-text-xl:   20px;  /* card titles (UI font, 600) */
  --adz-text-2xl:  28px;  /* section titles (display font) */
  --adz-text-3xl:  40px;  /* page titles (display font) */
  --adz-text-4xl:  56px;  /* empty states, dashboard hero numbers */
  --adz-text-hero: clamp(44px, 6vw, 84px); /* website hero only */

  --adz-leading-tight: 1.08;
  --adz-leading-snug:  1.3;
  --adz-leading-body:  1.55;
  --adz-tracking-eyebrow: 0.14em;

  --adz-weight-regular: 400;
  --adz-weight-medium:  500;
  --adz-weight-semi:    600;

  /* ---------- Space (4px base) ---------- */
  --adz-space-1: 4px;
  --adz-space-2: 8px;
  --adz-space-3: 12px;
  --adz-space-4: 16px;
  --adz-space-5: 24px;
  --adz-space-6: 32px;
  --adz-space-7: 48px;
  --adz-space-8: 64px;
  --adz-space-9: 96px;

  /* ---------- Shape ---------- */
  --adz-radius-0: 0px;   /* default: buttons, inputs, cards, tables — square corners */
  --adz-radius-1: 2px;   /* tiny elements: checkboxes, badges */
  --adz-radius-full: 999px; /* avatars and status dots only */
  --adz-border-1: 1px solid var(--adz-line);
  --adz-border-strong: 2px solid var(--adz-line-strong);
  --adz-shadow-pop: 0 8px 24px rgba(14, 14, 16, 0.12); /* menus, popovers, modals ONLY — cards never get shadows */

  /* ---------- Layout ---------- */
  --adz-content-max: 1240px;
  --adz-sidebar-w:   248px;
  --adz-topbar-h:    56px;
  --adz-control-h:   40px;  /* buttons, inputs, selects */
  --adz-control-h-sm: 32px;

  /* ---------- Motion ---------- */
  --adz-ease:        cubic-bezier(.2, .7, .2, 1);   /* entrances, reveals */
  --adz-ease-inout:  cubic-bezier(.6, 0, .2, 1);    /* drawing curves, panels */
  --adz-dur-fast:    150ms;  /* hover, press, focus */
  --adz-dur-base:    250ms;  /* menus, tabs, toasts */
  --adz-dur-slow:    450ms;  /* panels, page sections */
  --adz-dur-draw:    1800ms; /* lifecycle curve / chart lines drawing once */
}

/* ---------- Dark theme: set data-theme="dark" on <html> ---------- */
[data-theme="dark"] {
  --adz-bg:          var(--adz-ink);
  --adz-bg-raised:   var(--adz-ink-2);
  --adz-bg-sunken:   #141416;
  --adz-text:        var(--adz-paper);
  --adz-text-body:   #C9C9CE;
  --adz-text-muted:  #A9A9B0;
  --adz-line:        #2A2A2E;
  --adz-line-strong: var(--adz-paper);
  --adz-focus:       var(--adz-paper);
  --adz-red-tint:    #2A1212;
  --adz-border:      #3A3A40;
  --adz-surface:     var(--adz-ink-2);
  --adz-surface-2:   #141416;
  --adz-accent-text: #FF6B6E;
  /* status colours lighten on dark; tints darken so badge text keeps contrast */
  --adz-success: #7CC49C;  --adz-success-tint: #14261C;
  --adz-warning: #E3AE52;  --adz-warning-tint: #2B210C;
  --adz-danger:  #F2948A;  --adz-danger-tint:  #2E1512;
  --adz-info:    #9DB8DC;  --adz-info-tint:    #142031;
}
