/* ============================================================
   CORRIENTE — Design tokens
   Original bright-glass identity. No third-party brand system.
   ============================================================ */

:root {
  /* ---- Core neutrals (warm, never grey-corporate) ---- */
  --ink-900: #14122b;
  --ink-800: #221f42;
  --ink-700: #383462;
  --ink-600: #514c85;
  --ink-500: #6f6aa3;
  --ink-400: #928dbe;
  --ink-300: #b9b5d6;
  --ink-200: #dcdaec;
  --ink-100: #eeedf7;
  --paper:   #f6f5fd;
  --white:   #ffffff;

  /* ---- Spectrum: every hue used by unit themes ---- */
  --c-coral:     #ff5d73;
  --c-coral-d:   #d92b48;
  --c-tangerine: #ff8a3d;
  --c-tangerine-d:#dd5f0d;
  --c-sun:       #ffc531;
  --c-sun-d:     #c78d00;
  --c-lime:      #7ed321;
  --c-lime-d:    #4b8d02;
  --c-emerald:   #12b981;
  --c-emerald-d: #067a53;
  --c-aqua:      #22cdd6;
  --c-aqua-d:    #048d95;
  --c-turquoise: #14b8c4;
  --c-turquoise-d:#03818c;
  --c-electric:  #2f7bff;
  --c-electric-d:#1150bd;
  --c-violet:    #7b5cff;
  --c-violet-d:  #4e2fd1;
  --c-purple:    #a855f7;
  --c-purple-d:  #7a25c9;
  --c-pink:      #ff4fa3;
  --c-pink-d:    #d1176f;
  --c-tomato:    #f0442e;
  --c-tomato-d:  #b71f0d;

  /* ---- Semantic feedback (never colour-only; paired w/ icon + text) ---- */
  --ok:        #0f9d6b;
  --ok-soft:   #e2fbf0;
  --ok-line:   #7ddcb5;
  --warn:      #b5710b;
  --warn-soft: #fff4dd;
  --warn-line: #f0c476;
  --bad:       #d62b4c;
  --bad-soft:  #ffe9ee;
  --bad-line:  #f3a3b4;

  /* ---- Active theme. Overridden per unit via [data-theme] ---- */
  --accent:      var(--c-electric);
  --accent-deep: var(--c-electric-d);
  --accent-2:    var(--c-aqua);
  --accent-ink:  #0e2f6b;
  --accent-wash: rgba(47, 123, 255, 0.10);

  /* ---- Glass ---- */
  --glass-bg:      rgba(255, 255, 255, 0.62);
  --glass-bg-soft: rgba(255, 255, 255, 0.42);
  --glass-bg-deep: rgba(255, 255, 255, 0.82);
  --glass-line:    rgba(255, 255, 255, 0.75);
  --glass-edge:    rgba(23, 20, 60, 0.08);
  --glass-blur:    22px;

  /* ---- Elevation. Soft, coloured, never muddy black ---- */
  --sh-1: 0 1px 2px rgba(28, 23, 71, .06), 0 2px 8px rgba(28, 23, 71, .05);
  --sh-2: 0 2px 6px rgba(28, 23, 71, .07), 0 12px 28px rgba(28, 23, 71, .09);
  --sh-3: 0 4px 12px rgba(28, 23, 71, .09), 0 24px 60px rgba(28, 23, 71, .13);
  --sh-glow: 0 8px 30px var(--accent-wash);

  /* ---- Radii ---- */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 34px;
  --r-pill: 999px;

  /* ---- Space scale ---- */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 24px; --s6: 32px; --s7: 44px; --s8: 64px; --s9: 96px;

  /* ---- Type ---- */
  /* Nunito first; then the platform's own rounded face, which is the
     closest fallback if the webfont is blocked or still loading. The
     emoji faces are last so decorative glyphs never fall back to a box. */
  --font-display: "Nunito", ui-rounded, "SF Pro Rounded", "Varela Round",
                  "Segoe UI Variable Display", system-ui, -apple-system,
                  "Segoe UI", Roboto, sans-serif,
                  "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
  --font-text: "Nunito Sans", ui-rounded, system-ui, -apple-system,
               "Segoe UI", Roboto, "Helvetica Neue", sans-serif,
               "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
  --font-mono: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;

  /* Fluid type: readable on a 360px phone, generous on a laptop */
  --t-xs:  clamp(0.74rem, 0.71rem + 0.14vw, 0.82rem);
  --t-sm:  clamp(0.85rem, 0.82rem + 0.16vw, 0.94rem);
  --t-md:  clamp(1.00rem, 0.96rem + 0.22vw, 1.12rem);
  --t-lg:  clamp(1.16rem, 1.09rem + 0.34vw, 1.36rem);
  --t-xl:  clamp(1.40rem, 1.26rem + 0.62vw, 1.80rem);
  --t-2xl: clamp(1.75rem, 1.48rem + 1.20vw, 2.60rem);
  --t-3xl: clamp(2.20rem, 1.72rem + 2.10vw, 3.60rem);

  /* ---- Layout ---- */
  --read: 42rem;          /* comfortable reading measure — never full-monitor */
  --read-wide: 58rem;     /* for stream cards + illustrations */
  --header-h: 60px;

  /* ---- Motion ---- */
  --e-out: cubic-bezier(.16, .84, .34, 1);
  --e-spring: cubic-bezier(.22, 1.4, .36, 1);
  --d-fast: 140ms;
  --d-med: 260ms;
  --d-slow: 460ms;

  color-scheme: light;
}

/* ============================================================
   UNIT THEMES — each unit paints the whole page a different way.
   Applied with  <body data-theme="coral">  etc.
   ============================================================ */
[data-theme="coral"]     { --accent:var(--c-coral);     --accent-deep:var(--c-coral-d);     --accent-2:var(--c-sun);       --accent-ink:#7a0f26; --accent-wash:rgba(255,93,115,.12); }
[data-theme="sun"]       { --accent:var(--c-sun);       --accent-deep:var(--c-sun-d);       --accent-2:var(--c-tangerine); --accent-ink:#6b4a00; --accent-wash:rgba(255,197,49,.16); }
[data-theme="electric"]  { --accent:var(--c-electric);  --accent-deep:var(--c-electric-d);  --accent-2:var(--c-aqua);      --accent-ink:#0e2f6b; --accent-wash:rgba(47,123,255,.12); }
[data-theme="violet"]    { --accent:var(--c-violet);    --accent-deep:var(--c-violet-d);    --accent-2:var(--c-pink);      --accent-ink:#2d1a7a; --accent-wash:rgba(123,92,255,.13); }
[data-theme="tangerine"] { --accent:var(--c-tangerine); --accent-deep:var(--c-tangerine-d); --accent-2:var(--c-sun);       --accent-ink:#7a3600; --accent-wash:rgba(255,138,61,.14); }
[data-theme="lime"]      { --accent:var(--c-lime);      --accent-deep:var(--c-lime-d);      --accent-2:var(--c-emerald);   --accent-ink:#2c5300; --accent-wash:rgba(126,211,33,.16); }
[data-theme="turquoise"] { --accent:var(--c-turquoise); --accent-deep:var(--c-turquoise-d); --accent-2:var(--c-electric);  --accent-ink:#014a51; --accent-wash:rgba(20,184,196,.14); }
[data-theme="pink"]      { --accent:var(--c-pink);      --accent-deep:var(--c-pink-d);      --accent-2:var(--c-purple);    --accent-ink:#7a0a41; --accent-wash:rgba(255,79,163,.13); }
[data-theme="tomato"]    { --accent:var(--c-tomato);    --accent-deep:var(--c-tomato-d);    --accent-2:var(--c-tangerine); --accent-ink:#6d1206; --accent-wash:rgba(240,68,46,.13); }
[data-theme="purple"]    { --accent:var(--c-purple);    --accent-deep:var(--c-purple-d);    --accent-2:var(--c-violet);    --accent-ink:#4a137e; --accent-wash:rgba(168,85,247,.13); }
[data-theme="aqua"]      { --accent:var(--c-aqua);      --accent-deep:var(--c-aqua-d);      --accent-2:var(--c-turquoise); --accent-ink:#014f54; --accent-wash:rgba(34,205,214,.14); }
[data-theme="emerald"]   { --accent:var(--c-emerald);   --accent-deep:var(--c-emerald-d);   --accent-2:var(--c-lime);      --accent-ink:#02523a; --accent-wash:rgba(18,185,129,.14); }
