/* ============================================================================
   ALVEA retheme layer — remaps the legacy token system onto the new brand.
   Load this LAST (after every other css/*.css) so it wins the cascade.
   Requires the brand fonts on the page:
   https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Hanken+Grotesk:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap
   Pairs with /css/alvea-system.css for any new markup. No structural rules here
   on purpose — variables only, so nothing can shift layout or break a page.
   ========================================================================== */

/* ---------- FONTS: Clash/General Sans/Azeret -> Space Grotesk/Hanken/Space Mono ---------- */
:root{
  --font-display:'Space Grotesk',system-ui,sans-serif;
  --font-family-display:'Space Grotesk',system-ui,sans-serif;
  --font-heading:'Space Grotesk',system-ui,sans-serif;
  --font-body:'Hanken Grotesk',system-ui,sans-serif;
  --font-family-body:'Hanken Grotesk',system-ui,sans-serif;
  --font-sans:'Hanken Grotesk',system-ui,sans-serif;
  --font-mono:'Space Mono',ui-monospace,monospace;
  --font-code:'Space Mono',ui-monospace,monospace;
  --font-family-mono:'Space Mono',ui-monospace,monospace;
}

/* ---------- LIGHT THEME: warm clinical paper + medical teal + brass gold ---------- */
:root{
  /* brand accents */
  --color-primary:#0E9B8C; --color-primary-hover:#0B7A6E; --color-primary-light:#D4EFEA; --color-primary-dark:#0B7A6E;
  --color-secondary:#0B7A6E; --color-secondary-hover:#095E55; --color-secondary-light:#CFE9E4;
  --color-accent:#B8913F; --color-accent-hover:#A97F2E; --color-accent-light:#EBD9A8; --color-accent-dark:#8F6E2C;
  --accent-teal:#0E9B8C; --accent-cyan:#0E9B8C; --accent-cyan-light:#3FB6A7; --accent-cyan-dark:#0B7A6E;
  --accent-indigo:#B8913F; --accent-indigo-light:#D9B968; --accent-indigo-dark:#8F6E2C;
  --accent-purple:#B8913F; --accent-purple-light:#D9B968; --accent-purple-dark:#8F6E2C;
  --accent-blue:#0E9B8C; --accent-blue-light:#3FB6A7; --accent-blue-dark:#0B7A6E; --accent-blue-darker:#095E55; --accent-blue-lighter:#8FD0C8;
  --accent-amber:#B8913F; --accent-gradient:linear-gradient(135deg,#0E9B8C 0%,#B8913F 100%);
  --page-cyan:#0E9B8C; --page-cyan-rgb:14,155,140; --page-cyan-light:#3FB6A7; --page-cyan-dark:#0B7A6E;

  /* paper surfaces */
  --color-cream:#F6F4EF; --color-cream-dark:#EFECE4; --color-cream-darker:#E6E2D8;
  --bg-primary:#F6F4EF; --bg-secondary:#FCFBF8; --bg-tertiary:#EFECE4; --bg-card:#FCFBF8; --bg-card-hover:#F1EEE6;
  --bg-light:#F6F4EF; --bg-lightest:#FCFBF8;
  --color-bg-base:#F6F4EF; --color-bg-surface:#FCFBF8; --color-bg-elevated:#FFFFFF; --color-bg-muted:#EFECE4; --color-bg-overlay:rgba(20,24,31,.5);
  --surface-primary:#F6F4EF; --surface-secondary:#FCFBF8;

  /* ink text */
  --text-primary:#14181F; --text-secondary:#5A6672; --text-tertiary:#6B7480; --text-muted:#8A94A0;
  --color-text-primary:#14181F; --color-text-secondary:#5A6672; --color-text-muted:#8A94A0; --color-text-inverted:#FCFBF8;
  --color-hero-text:#14181F; --color-hero-text-muted:#5A6672;

  /* hairlines */
  --border-light:rgba(20,24,31,.10); --border-medium:rgba(20,24,31,.18); --border-dark:rgba(20,24,31,.28);
  --border-color:rgba(20,24,31,.10); --border-color-hover:rgba(20,24,31,.20);
  --border-default:rgba(20,24,31,.10); --border-subtle:rgba(20,24,31,.07); --border-strong:rgba(20,24,31,.22);
  --border-primary:rgba(20,24,31,.10); --border-on-dark:rgba(255,255,255,.12);
  --color-border-default:rgba(20,24,31,.10); --color-border-subtle:rgba(20,24,31,.07); --color-border-hover:rgba(20,24,31,.20); --color-border-active:#0E9B8C;

  --color-success:#0E9B8C; --color-info:#0E9B8C;
}

/* ---------- DARK THEME: deep-ink instrument (dashboard-adjacent) ---------- */
[data-theme="dark"]{
  --color-primary:#2FB6A6; --color-primary-hover:#0E9B8C; --color-primary-light:#0B3A35; --color-primary-dark:#0E9B8C;
  --color-secondary:#3FB6A7; --color-secondary-hover:#2FB6A6; --color-secondary-light:#0B3A35;
  --color-accent:#D9B968; --color-accent-hover:#C69A3F; --color-accent-light:#3A3016; --color-accent-dark:#B8913F;
  --accent-teal:#2FB6A6; --accent-cyan:#2FB6A6; --accent-cyan-light:#5CD0C2; --accent-cyan-dark:#0E9B8C;
  --accent-indigo:#D9B968; --accent-purple:#D9B968; --accent-blue:#2FB6A6; --accent-amber:#D9B968;
  --page-cyan:#2FB6A6; --page-cyan-light:#5CD0C2; --page-cyan-dark:#0E9B8C;

  --bg-primary:#0E1218; --bg-secondary:#161B22; --bg-tertiary:#1B2027; --bg-card:#161B22; --bg-card-hover:#1F2630;
  --color-bg-base:#0E1218; --color-bg-surface:#161B22; --color-bg-elevated:#1B2027; --color-bg-muted:#12171E; --color-bg-overlay:rgba(0,0,0,.6);
  --surface-primary:#0E1218; --surface-secondary:#161B22;

  --text-primary:#EAF0F6; --text-secondary:#AEB8C4; --text-tertiary:#8A94A0; --text-muted:#6B7480;
  --color-text-primary:#EAF0F6; --color-text-secondary:#AEB8C4; --color-text-muted:#8A94A0; --color-text-inverted:#14181F;
  --color-hero-text:#EAF0F6; --color-hero-text-muted:#AEB8C4;

  --border-light:rgba(255,255,255,.10); --border-medium:rgba(255,255,255,.16); --border-dark:rgba(255,255,255,.24);
  --border-color:rgba(255,255,255,.10); --border-default:rgba(255,255,255,.10); --border-subtle:rgba(255,255,255,.06); --border-primary:rgba(255,255,255,.10);
  --color-border-default:rgba(255,255,255,.10); --color-border-subtle:rgba(255,255,255,.06); --color-border-hover:rgba(255,255,255,.20); --color-border-active:#2FB6A6;
}

/* Legacy gradient accents that were hardcoded to indigo->cyan get the brand sweep */
:root{ --cbct-gradient:linear-gradient(135deg,#0E9B8C 0%,#B8913F 100%); }

/* ---------- Neutralize the Family-B indigo signature on recurring components ----------
   These are the few places the old CSS hardcoded #6366f1 gradients instead of tokens.
   Primary action becomes the brass "key" button; eyebrows/badges become medical teal. */
.btn-primary,.cta-primary,.btn-cbct-primary,.hero-cta.primary,.data-cta-buttons .btn-primary{
  background:linear-gradient(180deg,#E9CE86,#C69A3F 46%,#A97F2E)!important;
  color:#231a06!important;border:0!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.55),inset 0 -1.5px 0 rgba(0,0,0,.22),0 8px 18px -8px rgba(184,145,63,.6)!important;
}
.btn-primary:hover,.cta-primary:hover,.btn-cbct-primary:hover,.data-cta-buttons .btn-primary:hover{
  transform:translateY(-1.5px);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.6),inset 0 -1.5px 0 rgba(0,0,0,.22),0 14px 30px -9px rgba(184,145,63,.7)!important;
}
.hero-eyebrow,.section-eyebrow,.eyebrow-pill,.badge-pill{
  background:rgba(14,155,140,.10)!important;color:#0B7A6E!important;
  border:1px solid rgba(14,155,140,.22)!important;
  font-family:var(--font-mono)!important;letter-spacing:.14em!important;text-transform:uppercase!important;
}
