/* =============================================================================
   CIPESA Design System — Design Tokens
   -----------------------------------------------------------------------------
   Two tiers:
     1. PRIMITIVES  — the raw palette and scales. Rarely referenced directly.
     2. SEMANTIC    — role-based tokens (--color-bg, --color-primary, ...).
                      Components ONLY use these. Re-skinning a brand means
                      overriding semantic tokens, never editing components.

   Brand values are grounded in the live cipesa.org stylesheet
   (orange #f58220, navy #002c5b, Poppins headings, Roboto body).
   ============================================================================= */

:root {
  /* ---------------------------------------------------------------------------
     1. PRIMITIVES — palette
     --------------------------------------------------------------------------- */

  /* CIPESA brand orange (signature) */
  --c-orange-50:  #fff4ea;
  --c-orange-100: #ffe2c7;
  --c-orange-200: #fcc78d;
  --c-orange-300: #f9a955;
  --c-orange-400: #f58220;   /* ← brand primary (cipesa.org) */
  --c-orange-500: #ec7813;
  --c-orange-600: #d76402;   /* ← text-on-white safe (cipesa.org) */
  --c-orange-700: #b04f00;
  --c-orange-800: #823a00;
  --c-orange-900: #552600;

  /* CIPESA navy */
  --c-navy-50:  #eaf0f7;
  --c-navy-100: #c8d6e8;
  --c-navy-200: #93acce;
  --c-navy-300: #5d80b0;
  --c-navy-400: #2f5589;
  --c-navy-500: #002c5b;     /* ← brand navy (cipesa.org) */
  --c-navy-600: #022247;
  --c-navy-700: #021833;
  --c-navy-800: #010e1c;     /* ← near-black navy (cipesa.org) */
  --c-navy-900: #00070f;

  /* Neutral grays (from cipesa.org neutrals: 6c757d, 7d8791, 484848, 202020 …) */
  --c-gray-0:   #ffffff;
  --c-gray-50:  #f8f9fa;
  --c-gray-100: #f5f5f5;
  --c-gray-200: #efefef;
  --c-gray-300: #dfe3e7;
  --c-gray-400: #b9bfc6;
  --c-gray-500: #7d8791;
  --c-gray-600: #6c757d;
  --c-gray-700: #484848;
  --c-gray-800: #2b2f33;
  --c-gray-900: #202020;

  /* Support / status hues (info & coral grounded in cipesa.org) */
  --c-info-400:    #2ca8ff;
  --c-info-600:    #0a6fc2;
  --c-success-400: #2faf6a;
  --c-success-600: #1d8050;
  --c-warning-400: #ffb236;
  --c-warning-600: #c47e00;
  --c-danger-400:  #ff5062;
  --c-danger-600:  #d62f42;

  /* ---------------------------------------------------------------------------
     1. PRIMITIVES — non-color scales
     --------------------------------------------------------------------------- */

  /* Type families */
  --font-heading: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body:    "Roboto", "Helvetica Neue", system-ui, -apple-system, sans-serif;
  --font-mono:    ui-monospace, "SF Mono", Menlo, monospace;

  /* Type scale — 1.250 (major third), base 16px */
  --text-xs:   0.75rem;   /* 12 */
  --text-sm:   0.875rem;  /* 14 */
  --text-base: 1rem;      /* 16 */
  --text-lg:   1.125rem;  /* 18 */
  --text-xl:   1.25rem;   /* 20 */
  --text-2xl:  1.5rem;    /* 24 */
  --text-3xl:  1.953rem;  /* ~31 */
  --text-4xl:  2.441rem;  /* ~39 */
  --text-5xl:  3.052rem;  /* ~49 */

  /* Weights */
  --weight-light:    300;
  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  /* Line heights */
  --leading-tight:   1.15;
  --leading-snug:    1.3;
  --leading-normal:  1.6;
  --leading-relaxed: 1.8;

  /* Letter spacing */
  --tracking-tight:  -0.01em;
  --tracking-normal: 0;
  --tracking-wide:   0.04em;
  --tracking-caps:   0.08em;

  /* Spacing scale — 4px base */
  --space-0:   0;
  --space-3xs: 0.25rem;  /* 4  */
  --space-2xs: 0.5rem;   /* 8  */
  --space-xs:  0.75rem;  /* 12 */
  --space-sm:  1rem;     /* 16 */
  --space-md:  1.5rem;   /* 24 */
  --space-lg:  2rem;     /* 32 */
  --space-xl:  3rem;     /* 48 */
  --space-2xl: 4rem;     /* 64 */
  --space-3xl: 6rem;     /* 96 */

  /* Radius */
  --radius-none: 0;
  --radius-sm:   3px;
  --radius-md:   6px;
  --radius-lg:   12px;
  --radius-xl:   20px;
  --radius-pill: 999px;

  /* Elevation (shadows) */
  --shadow-sm: 0 1px 2px rgba(1, 14, 28, 0.08);
  --shadow-md: 0 4px 12px rgba(1, 14, 28, 0.10);
  --shadow-lg: 0 12px 28px rgba(1, 14, 28, 0.14);
  --shadow-focus: 0 0 0 3px rgba(245, 130, 32, 0.40);

  /* Borders */
  --border-width: 1px;

  /* Motion */
  --ease:        cubic-bezier(0.2, 0, 0.2, 1);
  --duration-fast:  120ms;
  --duration-base:  200ms;

  /* Layout */
  --container-sm: 640px;
  --container-md: 880px;
  --container-lg: 1120px;
  --container-xl: 1320px;

  /* Z-index scale */
  --z-base:    1;
  --z-sticky:  100;
  --z-overlay: 1000;
  --z-modal:   1100;
  --z-toast:   1200;

  /* ===========================================================================
     2. SEMANTIC TOKENS  — the only layer components reference.
     Default brand = CIPESA. Override these under [data-brand="…"] to re-skin.
     =========================================================================== */

  /* Surfaces & text */
  --color-bg:           var(--c-gray-0);
  --color-bg-subtle:    var(--c-gray-50);
  --color-bg-muted:     var(--c-gray-100);
  --color-surface:      var(--c-gray-0);
  --color-text:         var(--c-gray-900);
  --color-text-muted:   var(--c-gray-600);
  --color-text-onbrand: var(--c-gray-0);
  --color-border:       var(--c-gray-300);
  --color-border-strong:var(--c-gray-400);

  /* Brand roles */
  --color-primary:        var(--c-orange-400);
  --color-primary-hover:  var(--c-orange-500);
  --color-primary-active: var(--c-orange-600);
  --color-primary-text:   var(--c-orange-600);  /* orange used as text/link on white */
  --color-primary-subtle: var(--c-orange-50);

  --color-secondary:        var(--c-navy-500);
  --color-secondary-hover:  var(--c-navy-600);
  --color-secondary-active: var(--c-navy-700);
  --color-secondary-subtle: var(--c-navy-50);

  /* Status roles */
  --color-info:    var(--c-info-600);
  --color-success: var(--c-success-600);
  --color-warning: var(--c-warning-600);
  --color-danger:  var(--c-danger-600);

  /* Focus ring */
  --color-focus-ring: var(--shadow-focus);

  /* Headings */
  --color-heading: var(--c-navy-500);
}

/* =============================================================================
   BRAND VARIANTS — the payoff of semantic tokens.
   CIPESA is the default (:root). FIFAFRICA and DRAA only override roles.

   All three brands are now GROUNDED in their live sites:
     CIPESA       cipesa.org              (orange #f58220, navy #002c5b)
     FIFAFRICA    internetfreedom.africa  (coral #ff4d54, indigo #0b054b)
     DRAA         digitalrightsalliance.africa (lime #bbcd33, indigo #3e499b)
   ============================================================================= */

/* FIFAFRICA — convening/event identity: coral-red CTA on deep indigo */
[data-brand="fifafrica"] {
  --color-primary:        #ff4d54;   /* coral red (internetfreedom.africa) */
  --color-primary-hover:  #e63b42;
  --color-primary-active: #c92d34;
  --color-primary-text:   #d6323a;   /* darker red for text/links on white */
  --color-primary-subtle: #ffe9ea;

  --color-secondary:        #0b054b;  /* deep indigo */
  --color-secondary-hover:  #08043a;
  --color-secondary-active: #06032b;
  --color-secondary-subtle: #e9e8f1;

  --color-heading:        #0b054b;
}

/* DRAA — Digital Rights Alliance Africa.
   Signature colour is lime #bbcd33, but as a white-text button fill it fails
   contrast; the grounded indigo #3e499b is the accessible CTA primary, lime is
   the accent (use with dark text — e.g. style={{background:"#bbcd33",color:"#1f2a44"}}). */
[data-brand="draa"] {
  --color-primary:        #3e499b;   /* indigo (digitalrightsalliance.africa) */
  --color-primary-hover:  #333d85;
  --color-primary-active: #2a3270;
  --color-primary-text:   #333d85;
  --color-primary-subtle: #ecedf6;

  --color-secondary:        #1f2a44;  /* dark navy */
  --color-secondary-hover:  #18213a;
  --color-secondary-active: #121a2e;
  --color-secondary-subtle: #e9ebf0;

  --color-heading:        #1f2a44;

  /* DRAA extended palette — sampled from the Alliance logo (dhow/sail mark), 2026-07-08.
     Converges with hexes grounded on the live site: the sky blue and plum below are the
     values found hand-typed live (#229CD8/#239DD9 → standardised here; #9A247F) — they
     were logo colours all along, never documented. Roles provisional pending D:1 sign-off
     (Pingu + Alliance); see Projects/DRAA Online/DRAA_Website_Redesign_Plan_2026-07-08.md. */
  --draa-blue:   #239dd9;  /* sky blue — Africa mark + mast. Graphics/large text only: ~2.9:1 on white, fails AA for body text */
  --draa-purple: #9a247f;  /* plum — tertiary accent: eyebrows, badges, sparing. ~7:1 on white, AA-safe */
  --draa-lime:   #bbcd33;  /* lime sail — accent fills with DARK text only (fails as white-text fill) */
  --draa-red:    #e5173f;  /* inner petal — reserve for alerts/danger only; smallest shape in the logo, smallest role on the site */
  --draa-ink:    #231f20;  /* wordmark black */
  --draa-orange:        #d68035;  /* ICNL "mango" — GROUNDED from icnl.org theme CSS 2026-07-09 (their heading/
                                     download-button orange; ICNL's own class name). Member-directed warm accent
                                     (June 11 mtg), the WORKING orange: headings-scale text, buttons, hovers.
                                     ~3.0:1 on white — OK large/bold; darken toward #a85e1c for body-size text */
  --draa-orange-bright: #ffa454;  /* ICNL "tangerine" — GROUNDED from the icnl.org homepage SVG mosaic + stat
                                     bands (the visually prominent orange). DECORATIVE fills only: bands, shapes,
                                     data-viz — with DARK text (~2:1 on white; ICNL's own white-on-tangerine
                                     stat text fails AA — don't copy that) */
}

/* Optional dark surface (opt-in via [data-theme="dark"]) */
[data-theme="dark"] {
  --color-bg:           var(--c-navy-800);
  --color-bg-subtle:    var(--c-navy-700);
  --color-bg-muted:     var(--c-navy-600);
  --color-surface:      var(--c-navy-700);
  --color-text:         var(--c-gray-100);
  --color-text-muted:   var(--c-gray-400);
  --color-border:       rgba(255, 255, 255, 0.14);
  --color-border-strong:rgba(255, 255, 255, 0.28);
  --color-heading:      var(--c-gray-0);
  --color-primary-text: var(--c-orange-300);
}
/* =============================================================================
   CIPESA Design System — Base / Reset
   A light, opinionated reset + element defaults wired to the semantic tokens.
   ============================================================================= */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-heading);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-heading);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); text-transform: uppercase; letter-spacing: var(--tracking-caps); }

p { margin: 0 0 var(--space-sm); }

a {
  color: var(--color-primary-text);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease);
}
a:hover { color: var(--color-primary-active); text-decoration: underline; }

small { font-size: var(--text-sm); }
strong, b { font-weight: var(--weight-semibold); }

code, kbd, pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}
code {
  background: var(--color-bg-muted);
  padding: 0.1em 0.4em;
  border-radius: var(--radius-sm);
}

hr {
  border: 0;
  border-top: var(--border-width) solid var(--color-border);
  margin: var(--space-lg) 0;
}

img { max-width: 100%; height: auto; display: block; }

:focus-visible {
  outline: none;
  box-shadow: var(--color-focus-ring);
  border-radius: var(--radius-sm);
}

/* Utility text roles */
.text-muted { color: var(--color-text-muted); }
.eyebrow {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--color-primary-text);
}
/* =============================================================================
   Component — Layout primitives
   Composable building blocks (no bespoke page CSS needed):
     .container       — centered max-width wrapper
     .stack           — vertical rhythm (gap via --stack-space)
     .cluster         — horizontal wrap with gap (toolbars, tag rows)
     .grid-auto       — responsive auto-fit card grid
     .split           — two columns that collapse on narrow screens
   ============================================================================= */

.container {
  width: 100%;
  max-width: var(--container-lg);
  margin-inline: auto;
  padding-inline: var(--space-md);
}
.container--sm { max-width: var(--container-sm); }
.container--md { max-width: var(--container-md); }
.container--xl { max-width: var(--container-xl); }

/* Vertical stack with consistent rhythm */
.stack {
  display: flex;
  flex-direction: column;
  gap: var(--stack-space, var(--space-sm));
}
.stack--xs { --stack-space: var(--space-2xs); }
.stack--lg { --stack-space: var(--space-lg); }

/* Horizontal cluster that wraps */
.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--cluster-space, var(--space-2xs));
}
.cluster--between { justify-content: space-between; }

/* Auto-fit responsive grid */
.grid-auto {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fill, minmax(var(--grid-min, 260px), 1fr));
}

/* Two-up split that collapses */
.split {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--sidebar { grid-template-columns: 2fr 1fr; }
}

/* Section spacing helper */
.section { padding-block: var(--space-2xl); }
.section--subtle { background: var(--color-bg-subtle); }
/* =============================================================================
   Component — Button
   Variants: primary, secondary, outline, ghost, danger
   Sizes:    sm, md (default), lg
   Modifier: --block (full width)
   Usage:    <button class="btn btn--primary">…</button>
             <a class="btn btn--outline btn--lg">…</a>
   ============================================================================= */

.btn {
  --_bg: var(--color-primary);
  --_bg-hover: var(--color-primary-hover);
  --_bg-active: var(--color-primary-active);
  --_fg: var(--color-text-onbrand);
  --_border: transparent;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  padding: 0.7em 1.4em;
  border: var(--border-width) solid var(--_border);
  border-radius: var(--radius-md);
  background: var(--_bg);
  color: var(--_fg);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease),
              color var(--duration-fast) var(--ease),
              border-color var(--duration-fast) var(--ease),
              transform var(--duration-fast) var(--ease);
}

.btn:hover { background: var(--_bg-hover); color: var(--_fg); text-decoration: none; }
.btn:active { background: var(--_bg-active); transform: translateY(1px); }
.btn:focus-visible { box-shadow: var(--color-focus-ring); }

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---- Variants ---- */
.btn--primary {
  --_bg: var(--color-primary);
  --_bg-hover: var(--color-primary-hover);
  --_bg-active: var(--color-primary-active);
  --_fg: var(--color-text-onbrand);
}

.btn--secondary {
  --_bg: var(--color-secondary);
  --_bg-hover: var(--color-secondary-hover);
  --_bg-active: var(--color-secondary-active);
  --_fg: var(--color-text-onbrand);
}

.btn--outline {
  --_bg: transparent;
  --_bg-hover: var(--color-primary-subtle);
  --_bg-active: var(--color-primary-subtle);
  --_fg: var(--color-primary-text);
  --_border: var(--color-primary);
}
.btn--outline:hover { color: var(--color-primary-active); }

.btn--ghost {
  --_bg: transparent;
  --_bg-hover: var(--color-bg-muted);
  --_bg-active: var(--color-bg-muted);
  --_fg: var(--color-text);
}

.btn--danger {
  --_bg: var(--color-danger);
  --_bg-hover: var(--c-danger-600);
  --_bg-active: #b3273a;
  --_fg: var(--color-text-onbrand);
}

/* ---- Sizes ---- */
.btn--sm { font-size: var(--text-sm); padding: 0.5em 1em; border-radius: var(--radius-sm); }
.btn--lg { font-size: var(--text-lg); padding: 0.85em 1.8em; }

/* ---- Block ---- */
.btn--block { display: flex; width: 100%; }
/* =============================================================================
   Component — Form fields
   Elements: .field (wrapper), .label, .input, .textarea, .select, .help, .field--error
   Usage:
     <div class="field">
       <label class="label" for="email">Email</label>
       <input class="input" id="email" type="email">
       <p class="help">We never share it.</p>
     </div>
   ============================================================================= */

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xs);
  margin-bottom: var(--space-sm);
}

.label {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text);
}
.label[data-required]::after {
  content: " *";
  color: var(--color-danger);
}

.input,
.textarea,
.select {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-snug);
  color: var(--color-text);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.65em 0.85em;
  transition: border-color var(--duration-fast) var(--ease),
              box-shadow var(--duration-fast) var(--ease);
}

.input::placeholder,
.textarea::placeholder { color: var(--color-text-muted); }

.input:hover,
.textarea:hover,
.select:hover { border-color: var(--color-border-strong); }

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: var(--color-focus-ring);
}

.textarea { min-height: 7rem; resize: vertical; }

.select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--color-text-muted) 50%),
                    linear-gradient(135deg, var(--color-text-muted) 50%, transparent 50%);
  background-position: calc(100% - 1.1em) center, calc(100% - 0.75em) center;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.4em;
}

.help { font-size: var(--text-sm); color: var(--color-text-muted); margin: 0; }

/* ---- Error state ---- */
.field--error .input,
.field--error .textarea,
.field--error .select { border-color: var(--color-danger); }
.field--error .input:focus,
.field--error .textarea:focus,
.field--error .select:focus { box-shadow: 0 0 0 3px rgba(255, 80, 98, 0.30); }
.field--error .help { color: var(--color-danger); }

.input:disabled,
.textarea:disabled,
.select:disabled {
  background: var(--color-bg-muted);
  color: var(--color-text-muted);
  cursor: not-allowed;
}
/* =============================================================================
   Component — Card
   Modeled on CIPESA's publication / news cards (image, eyebrow, title, meta).
   Elements: .card, .card__media, .card__body, .card__eyebrow,
             .card__title, .card__text, .card__meta, .card__footer
   Modifier: .card--row (horizontal), .card--flat (no shadow/border highlight)
   ============================================================================= */

.card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--duration-base) var(--ease),
              transform var(--duration-base) var(--ease);
}

a.card,
.card--interactive { cursor: pointer; }
a.card:hover,
.card--interactive:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  text-decoration: none;
}

.card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--color-bg-muted);
  overflow: hidden;
}
.card__media img { width: 100%; height: 100%; object-fit: cover; }

/* Accent rule top edge — a CIPESA signature */
.card__media::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 4px;
  background: var(--color-primary);
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  padding: var(--space-md);
  flex: 1;
}

.card__eyebrow {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--color-primary-text);
}

.card__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  color: var(--color-heading);
}

.card__text { margin: 0; color: var(--color-text-muted); }

.card__meta {
  margin-top: auto;
  padding-top: var(--space-2xs);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.card__footer {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: var(--space-sm) var(--space-md);
  border-top: var(--border-width) solid var(--color-border);
}

/* ---- Horizontal variant ---- */
.card--row { flex-direction: row; }
.card--row .card__media { aspect-ratio: auto; width: 38%; min-width: 38%; }
.card--row .card__media::after { inset: 0 auto 0 0; width: 4px; height: auto; }

/* ---- Flat variant ---- */
.card--flat { box-shadow: none; }
.card--flat:hover { box-shadow: var(--shadow-md); }
/* =============================================================================
   Component — Badge / Tag
   Variants: default, primary, secondary, success, warning, danger, info
   Modifier: .badge--solid (filled), .badge--pill
   Usage: <span class="badge badge--primary">Policy</span>
   ============================================================================= */

.badge {
  --_fg: var(--color-text);
  --_bg: var(--color-bg-muted);

  display: inline-flex;
  align-items: center;
  gap: var(--space-3xs);
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  line-height: 1;
  padding: 0.4em 0.7em;
  border-radius: var(--radius-sm);
  background: var(--_bg);
  color: var(--_fg);
}

.badge--pill { border-radius: var(--radius-pill); }

/* Soft (default) variants — tinted bg, colored text */
.badge--primary   { --_bg: var(--color-primary-subtle);   --_fg: var(--color-primary-text); }
.badge--secondary { --_bg: var(--color-secondary-subtle); --_fg: var(--color-secondary); }
.badge--success   { --_bg: rgba(47,175,106,0.14);  --_fg: var(--color-success); }
.badge--warning   { --_bg: rgba(255,178,54,0.18);  --_fg: var(--color-warning); }
.badge--danger    { --_bg: rgba(255,80,98,0.14);   --_fg: var(--color-danger); }
.badge--info      { --_bg: rgba(44,168,255,0.14);  --_fg: var(--color-info); }

/* Solid variants — filled bg, on-brand text */
.badge--solid               { --_fg: var(--color-text-onbrand); }
.badge--solid.badge--primary   { --_bg: var(--color-primary); }
.badge--solid.badge--secondary { --_bg: var(--color-secondary); }
.badge--solid.badge--success   { --_bg: var(--color-success); }
.badge--solid.badge--warning   { --_bg: var(--color-warning); }
.badge--solid.badge--danger    { --_bg: var(--color-danger); }
.badge--solid.badge--info      { --_bg: var(--color-info); }
/* =============================================================================
   Component — Alert / Callout
   Variants: info (default), success, warning, danger
   Usage:
     <div class="alert alert--warning" role="alert">
       <strong class="alert__title">Heads up</strong>
       <p class="alert__body">Consultation closes Friday.</p>
     </div>
   ============================================================================= */

.alert {
  --_accent: var(--color-info);
  --_bg: rgba(44,168,255,0.08);

  display: flex;
  flex-direction: column;
  gap: var(--space-3xs);
  padding: var(--space-sm) var(--space-md);
  background: var(--_bg);
  border: var(--border-width) solid transparent;
  border-left: 4px solid var(--_accent);
  border-radius: var(--radius-md);
  color: var(--color-text);
}

.alert__title {
  font-family: var(--font-heading);
  font-weight: var(--weight-semibold);
  color: var(--_accent);
}
.alert__body { margin: 0; color: var(--color-text); }
.alert__body :last-child { margin-bottom: 0; }

.alert--info    { --_accent: var(--color-info);    --_bg: rgba(44,168,255,0.08); }
.alert--success { --_accent: var(--color-success); --_bg: rgba(47,175,106,0.10); }
.alert--warning { --_accent: var(--color-warning); --_bg: rgba(255,178,54,0.12); }
.alert--danger  { --_accent: var(--color-danger);  --_bg: rgba(255,80,98,0.09); }
/* =============================================================================
   MOTION OVERRIDES — animation review 2026-08-26 (STAGING ONLY)
   Source: /review-animations pass on staging.digitalrightsalliance.africa
   Fixes vendor motion defaults (Elementor / Hello Elementor) + a11y gaps.
   Append verbatim to the END of:
   wp-content/plugins/draa-content-model/assets/draa-design-system.css
   Contested vendor rules carry !important; same-file overrides do not.
   ========================================================================== */

:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1); /* strong ease-out for movement */
}

/* 1 — Nav menu links: color-only, fast (vendor default: all .4s ease) */
.elementor-nav-menu a {
  transition: color var(--duration-fast) var(--ease),
              background-color var(--duration-fast) var(--ease) !important;
}

/* 2 — Mobile menu panel: fade + lift instead of the max-height wipe.
   VERIFY open/close on a phone viewport after applying; if the panel
   misbehaves, remove this block only. */
.elementor-nav-menu--dropdown.elementor-nav-menu__container {
  transition: opacity 200ms var(--ease-out),
              transform 200ms var(--ease-out) !important;
}

/* 3 — Elementor buttons + social icons: named properties in budget, press
   feedback (vendor default: all .3s ease) */
.elementor-button,
button,
[type="button"],
[type="submit"],
.elementor-social-icon {
  transition: background-color var(--duration-fast) var(--ease),
              color var(--duration-fast) var(--ease),
              border-color var(--duration-fast) var(--ease),
              transform 140ms var(--ease-out) !important;
}
.elementor-button:active,
button:active,
[type="button"]:active,
[type="submit"]:active {
  transform: scale(0.97);
}

/* 3b — Design-system .btn: same press feedback, strong curve on transform
   (same-file override, no !important) */
.btn {
  transition: background var(--duration-fast) var(--ease),
              color var(--duration-fast) var(--ease),
              border-color var(--duration-fast) var(--ease),
              transform 140ms var(--ease-out);
}
.btn:active {
  transform: scale(0.97);
}

/* 4 — Cards: movement gets the strong curve. The box-shadow transition stays
   as a documented exception: .card is overflow:hidden (media accent bar), so
   the pre-rendered ::after shadow fix would be clipped; shadow paint at this
   card count is acceptable. */
.card {
  transition: box-shadow var(--duration-base) var(--ease),
              transform var(--duration-base) var(--ease-out);
}

/* 5 — Touch devices: hover motion must not stick after a tap */
@media (hover: none) {
  .card:hover,
  .card--interactive:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
  }
  .card--flat:hover {
    box-shadow: none;
  }
}

/* 6 — Counters: fixed-width digits so the 2s count-up doesn't jitter */
.elementor-counter-number {
  font-variant-numeric: tabular-nums;
}

/* 7 — Reduced motion: gentler, not zero — keep color/opacity/shadow fades,
   drop movement and the whole-page smooth scroll */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }
  .card,
  .btn,
  .elementor-button,
  button,
  [type="button"],
  [type="submit"],
  .elementor-nav-menu--dropdown.elementor-nav-menu__container,
  .elementor-nav-menu a {
    transition-property: color, background-color, border-color, opacity, box-shadow !important;
  }
  .card:hover,
  .card--interactive:hover {
    transform: none;
  }
  .btn:active,
  .elementor-button:active,
  button:active,
  [type="button"]:active,
  [type="submit"]:active {
    transform: none;
  }
}
/* =============================================================================
   HOMEPAGE CRAFT FIXES — design-taste audit 2026-08-27 (STAGING ONLY)
   Work order: Projects/DRAA Online/Work_Order_Homepage_Craft_2026-08-27.md
   Append verbatim to the END of:
   wp-content/plugins/draa-content-model/assets/draa-design-system.css
   All items reversible; A2 is a presentation-layer hide pending the
   editor-session removal (work order Part B).
   ========================================================================== */


/* A4 — Shape rule (documented): buttons sharp (0) / cards 12px / inputs 6px.
   Aligns design-system .btn with the sharp Elementor buttons already rendered. */
.btn {
  border-radius: 0;
}

/* A1 — Hero secondary CTA ("Join the alliance"): legible over photography.
   Was: transparent, borderless, white text on a busy photo. */
.elementor-element-9079fd6 .elementor-button {
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  background-color: rgba(31, 42, 68, 0.25) !important;
}
.elementor-element-9079fd6 .elementor-button:hover,
.elementor-element-9079fd6 .elementor-button:focus {
  background-color: rgba(31, 42, 68, 0.5) !important;
}

/* A2 — Hero eyebrow ("DIGITAL RIGHTS ALLIANCE AFRICA") duplicates the logo
   directly above it. Hidden pending removal/repurposing in the Elementor
   editor (work order Part B item 1). Reversible: delete this rule. */
.elementor-element-1b37347 {
  display: none;
}

/* A5 — H1 descender clearance (was line-height 1.0 at 44px; descenders in
   "society" / "rights" touched line two) */
.elementor-element-c19c9be .elementor-heading-title {
  line-height: 1.1 !important;
}

/* A6 — Body text consumes the design-system body token. Roboto is already
   loaded on the page; the theme's system-stack default was winning the
   cascade, so headings were on-brand and body text was not. */
html body {
  font-family: var(--font-body);
}
/* =============================================================================
   A7 — DRAA PRIMARY RESTORED TO BRAND INDIGO (STAGING ONLY)
   Work order: Projects/DRAA Online/Work_Order_Homepage_Craft_2026-08-27.md
   Decision: Riban, 2026-08-27 ("go with indigo").

   Why this block exists: the Download Manager plugin injects an inline
   :root { --color-primary: #4a8eff; ... } into every page, which beats any
   :root declaration in this stylesheet by source order. html[data-brand="draa"]
   (specificity 0-1-1) beats an inline :root block (0-1-0) regardless of source
   order, restoring the values the [data-brand="draa"] brand map (defined above
   in this file) already intends.

   The A3 :root accent-token block appended earlier on 2026-08-27 is REMOVED as
   part of this patch: its primary trio was inert against the WPDM inline
   block, and its --color-primary-text unintentionally overrode the brand
   map's indigo (#333d85). #ffa454 remains available as --draa-orange-bright
   (decorative fills only, dark text — see the brand map's own notes).
   ========================================================================== */
html[data-brand="draa"] {
  --color-primary: #3e499b;
  --color-primary-hover: #333d85;
  --color-primary-active: #2a3270;
}
