/* ============================================================
   Humanly — Color System
   ------------------------------------------------------------
   Rooted in neutrality and balance. Humanly Blue is the single
   hero color; Lumen / Fawn / Mica / Onyx form the neutral
   foundation. Secondary colors are derived from the hero
   gradient and reserved for functional/digital use (charts,
   maps, UI accents) — used purposefully and sparingly.
   ============================================================ */

:root {
  /* --- Primary palette --- */
  --lumen: #FFFFFF;        /* white — light surfaces, on-dark text */
  --humanly-blue: #4179F2; /* HERO color — primary action, links, focus */
  --onyx: #241F21;         /* near-black — primary text, dark surfaces */
  --fawn: #F0EDEB;         /* warm off-white — muted surfaces, sections */
  --mica: #827E7A;         /* warm gray — secondary text, hairlines */

  /* Neutral tints (over white) */
  --onyx-60: #6F6B6D;
  --onyx-40: #A6A3A4;
  --onyx-20: #D3D1D2;
  --mica-60: #ABA8A6;
  --mica-40: #CDCBCA;
  --mica-20: #E6E5E4;
  --fawn-deep: #E4DFDB;    /* slightly deeper fawn for borders on fawn */

  /* --- Secondary palette (from the hero gradient) --- */
  --sky: #6BCEFF;
  --indigo: #0C007A;
  --amethyst: #AA3DAD;
  --cinder: #FF6136;
  --pollen: #FFE366;
  /* Gradient anchor used in brand artwork (warm orange) */
  --ember: #F55D33;

  /* Secondary tints (60 / 40 / 20 over white) */
  --sky-60: #A0DEFF;     --sky-40: #C4EBFF;     --sky-20: #E1F5FF;
  --indigo-60: #5450A3;  --indigo-40: #9B98C8;  --indigo-20: #CDCCE4;
  --amethyst-60: #C685C8; --amethyst-40: #DDB1DE; --amethyst-20: #EED8EF;
  --cinder-60: #FF9B82;  --cinder-40: #FFC0B0;  --cinder-20: #FFE0D7;
  --pollen-60: #FFEE99;  --pollen-40: #FFF5C2;  --pollen-20: #FFFAE0;

  /* ============================================================
     Semantic aliases — reference THESE in product UI.
     ============================================================ */

  /* Text */
  --text-primary: var(--onyx);
  --text-secondary: var(--mica);
  --text-tertiary: var(--onyx-40);
  --text-inverse: var(--lumen);
  --text-brand: var(--humanly-blue);
  --text-on-gradient: var(--lumen);

  /* Surfaces */
  --surface-page: var(--lumen);
  --surface-muted: var(--fawn);
  --surface-card: var(--lumen);
  --surface-inverse: var(--onyx);
  --surface-sunken: #FAF8F7;
  --surface-hover: rgba(36, 31, 33, 0.04);
  --surface-active: rgba(36, 31, 33, 0.07);

  /* Borders */
  --border-subtle: var(--fawn-deep);
  --border-default: #DEDAD7;
  --border-strong: var(--mica);
  --border-focus: var(--humanly-blue);

  /* Brand / interactive */
  --accent: var(--humanly-blue);
  --accent-hover: #2F66E0;   /* darker blue for hover */
  --accent-active: #2557C9;  /* deeper still for press */
  --accent-soft: #EAF1FE;    /* tinted blue surface */
  --on-accent: var(--lumen);

  /* Status — drawn from the secondary palette so they stay on-brand */
  --success: #1F8A5B;
  --success-soft: #E4F3EC;
  --warning: var(--cinder);
  --warning-soft: var(--cinder-20);
  --info: var(--humanly-blue);
  --info-soft: var(--accent-soft);
  --highlight: var(--pollen);

  /* Focus ring */
  --focus-ring: 0 0 0 3px rgba(65, 121, 242, 0.35);

  /* ============================================================
     Gradients — the heart of the Humanly identity.
     Primary: blue -> ember -> pollen. Use linear (no grain) for
     UI: dividers, borders, charts, fine accents. Use the grain
     image (assets/hero-gradient*.jpg) for large-scale fields.
     ============================================================ */
  --gradient-hero: linear-gradient(120deg, #4179F2 0%, #F55D33 62%, #FFE366 100%); /* @kind color */
  --gradient-hero-soft: linear-gradient(120deg, #4179F2 0%, #AA3DAD 45%, #F55D33 78%, #FFE366 100%); /* @kind color */
  --gradient-communities: linear-gradient(120deg, #0C007A 0%, #AA3DAD 40%, #F55D33 78%, #FFE366 100%); /* @kind color */
  --gradient-labs: linear-gradient(120deg, #0C007A 0%, #4179F2 45%, #6BCEFF 80%, #FFE366 100%); /* @kind color */
  --gradient-line: linear-gradient(90deg, #4179F2 0%, #F55D33 62%, #FFE366 100%); /* @kind color */
  --gradient-mark: linear-gradient(150deg, #6BCEFF 0%, #4179F2 35%, #AA3DAD 60%, #F55D33 82%, #FFE366 100%); /* @kind color */
}

/* ------------------------------------------------------------
   Dark scope — apply data-theme="onyx" to a container to flip
   surfaces/text for dark sections (footers, hero bands, app
   chrome). Mirrors the Fawn+Gradient-on-Dark logo treatment.
   ------------------------------------------------------------ */
[data-theme="onyx"] {
  --text-primary: var(--fawn);
  --text-secondary: var(--mica-60);
  --text-tertiary: var(--mica);
  --text-inverse: var(--onyx);
  --surface-page: var(--onyx);
  --surface-muted: #2E292B;
  --surface-card: #2E292B;
  --surface-sunken: #1C181A;
  --surface-hover: rgba(255, 255, 255, 0.06);
  --surface-active: rgba(255, 255, 255, 0.10);
  --border-subtle: rgba(255, 255, 255, 0.10);
  --border-default: rgba(255, 255, 255, 0.16);
  --border-strong: var(--mica);
  --accent-soft: rgba(65, 121, 242, 0.18);
}
