/* AMARBARO design tokens.
   Canonical source for every service under the brand: colours, type, spacing,
   radii, transitions. No layout, no component rules, no page chrome: those
   live in chrome.css. Values are extracted from amarbaro.com/app/globals.css.
   Change them there in spirit, but land the actual edit here and let
   amarbaro.com import this file, never the reverse.

   Theming contract: a viewer is stamped light (`[data-theme="light"]`),
   stamped dark (`[data-theme="dark"]`), or unstamped (only
   `prefers-color-scheme` applies, no JS ran). Dark is the default look, so
   every colour is defined once in the bare `:root` as dark, then the light
   values are redefined under `@media (prefers-color-scheme: light)` (guarded
   so an explicit dark stamp always wins) and again under `[data-theme="light"]`
   for an explicit stamp regardless of OS preference. A colour whose only
   definition sits inside a media or attribute block silently never applies to
   an unstamped viewer, so nothing here is defined only there. */

:root {
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --space-1: 4px;   --space-2: 8px;   --space-3: 12px;  --space-4: 16px;
  --space-5: 20px;  --space-6: 24px;  --space-8: 32px;  --space-10: 40px;
  --space-12: 48px; --space-16: 64px; --space-20: 80px;

  --radius-sm: 2px;
  --radius: 4px;
  --radius-md: 6px;
  --transition-fast: 100ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-base: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 300ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Carbon Dark Deck (default) */
  --bg:             #080B10;
  --bg-subtle:      #0C1017;
  --surface:        #0F141D;
  --surface-hover:  #161D2A;
  --surface-active: #1D2636;
  --border:         #1E2736;
  --border-subtle:  #141B24;
  --border-accent:  rgba(157, 174, 81, 0.35);

  /* Brand Colors from masters/amarbaro-symbol.svg */
  --accent:         #9DAE51;              /* Brand Olive */
  --accent-light:   #B5C862;
  --accent-soft:    rgba(157, 174, 81, 0.12);
  --accent-glow:    rgba(157, 174, 81, 0.22);
  --emerald:        #22C55E;
  --emerald-soft:   rgba(34, 197, 94, 0.14);

  --text-1:         #F3F6FA;
  --text-2:         #94A3B8;
  --text-3:         #77879E;
  --text-inverse:   #080B10;

  --alert:          #EF4444;
  --alert-soft:     rgba(239, 68, 68, 0.15);
  --warning:        #F59E0B;
  --success:        #22C55E;

  --grid-dot:       rgba(157, 174, 81, 0.18);
  --grid-line:      rgba(255, 255, 255, 0.04);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg:             #F5F7F9;
    --bg-subtle:      #EAEEF2;
    --surface:        #FFFFFF;
    --surface-hover:  #F0F3F6;
    --surface-active: #E4E9EE;
    --border:         #D0D8E2;
    --border-subtle:  #E2E8F0;
    --border-accent:  rgba(85, 102, 31, 0.35);

    --accent:         #55661F;              /* Darker olive for AA compliance on light */
    --accent-light:   #637824;
    --accent-soft:    rgba(85, 102, 31, 0.10);
    --accent-glow:    rgba(85, 102, 31, 0.18);
    --emerald:        #15803D;
    --emerald-soft:   rgba(21, 128, 61, 0.12);

    --text-1:         #0A0F16;
    --text-2:         #334155;
    --text-3:         #5A687D;
    --text-inverse:   #FFFFFF;

    --alert:          #DC2626;
    --alert-soft:     rgba(220, 38, 38, 0.12);
    --warning:        #A95D05;
    --success:        #15803D;

    --grid-dot:       rgba(85, 102, 31, 0.22);
    --grid-line:      rgba(0, 0, 0, 0.05);
  }
}

[data-theme="light"] {
  --bg:             #F5F7F9;
  --bg-subtle:      #EAEEF2;
  --surface:        #FFFFFF;
  --surface-hover:  #F0F3F6;
  --surface-active: #E4E9EE;
  --border:         #D0D8E2;
  --border-subtle:  #E2E8F0;
  --border-accent:  rgba(85, 102, 31, 0.35);

  --accent:         #55661F;              /* Darker olive for AA compliance on light */
  --accent-light:   #637824;
  --accent-soft:    rgba(85, 102, 31, 0.10);
  --accent-glow:    rgba(85, 102, 31, 0.18);
  --emerald:        #15803D;
  --emerald-soft:   rgba(21, 128, 61, 0.12);

  --text-1:         #0A0F16;
  --text-2:         #334155;
  --text-3:         #5A687D;
  --text-inverse:   #FFFFFF;

  --alert:          #DC2626;
  --alert-soft:     rgba(220, 38, 38, 0.12);
  --warning:        #A95D05;
  --success:        #15803D;

  --grid-dot:       rgba(85, 102, 31, 0.22);
  --grid-line:      rgba(0, 0, 0, 0.05);
}
