/* Vivid Pacific colour tokens.
   Layer 1 — brand primitives (the five supplied hex values).
   Layer 2 — tint/shade scales generated from each primitive (sRGB mix toward
             white for tints; toward #0D3034 / burnt amber / deep earth for shades).
   Layer 3 — semantic aliases. Components and layouts consume ONLY layer 3.
   Contrast ratios are WCAG 2.2 relative-luminance values; see guidelines/color-contrast.html. */
:root{
  --color-primary:#46A5BB;   /* Pacific Green (teal)  — brand, graphics, large fills */
  --color-secondary:#F8C268; /* Sunrise Orange        — highlight, accent fills */
  --color-accent:#52402A;    /* Earth Brown           — grounding, the mark's diamond */
  --color-text-dark:#0D3034; /* Deep Lagoon           — text, inverse surfaces */
  --color-white:#FFFFFF;
  /* teal */
  --teal-50:#F0F8FA;
  --teal-100:#DEEFF3;
  --teal-200:#BCDFE7;
  --teal-300:#97CDD9;
  --teal-400:#6FB9CA;
  --teal-500:#46A5BB;
  --teal-600:#3B8EA0;
  --teal-700:#307988;
  --teal-800:#26636F;
  --teal-900:#1D515A;
  /* orange */
  --orange-50:#FEF9F0;
  --orange-100:#FDF2DE;
  --orange-200:#FCE4BD;
  --orange-300:#FAD495;
  --orange-400:#F8C268;
  --orange-500:#E4AF5B;
  --orange-600:#CE994C;
  --orange-700:#B4813C;
  --orange-800:#9E6B2D;
  --orange-900:#8A5820;
  /* brown */
  --brown-50:#F5F4F2;
  --brown-100:#E7E4E1;
  --brown-200:#CFCAC3;
  --brown-300:#AFA79D;
  --brown-400:#908577;
  --brown-500:#756655;
  --brown-600:#63533F;
  --brown-700:#52402A;
  --brown-800:#443522;
  --brown-900:#36291A;
  /* ink */
  --ink-50:#F3F5F5;
  --ink-100:#E2E6E7;
  --ink-200:#C5CDCE;
  --ink-300:#9EACAE;
  --ink-400:#738789;
  --ink-500:#4C6669;
  --ink-600:#2F4D50;
  --ink-700:#1C3C40;
  --ink-800:#0D3034;
  --ink-900:#092224;

  /* semantic status primitives — chosen to sit inside the palette's warmth */
  --color-success:#2E7D4F;  /* Leaf    · 5.05:1 on white */
  --color-warning:#F8C268;  /* Sunrise · surface only; text stays ink (8.67:1) */
  --color-warning-strong:#8A5820; /* 6.00:1 on white — icons/text on light */
  --color-error:#B83A2B;    /* Coral   · 5.71:1 on white */
  --color-info:#307988;     /* Lagoon  · 4.98:1 on white */

  /* ---- semantic ---- */
  --action-primary:var(--teal-700);          /* white label 4.98:1 */
  --action-primary-hover:var(--teal-800);    /* 6.78:1 */
  --action-primary-text:var(--color-white);
  --action-primary-border:var(--teal-700);
  --action-secondary-border:var(--teal-700);
  --action-secondary-text:var(--color-text-dark);
  --action-accent:var(--color-secondary);    /* ink label 8.67:1 */
  --action-accent-hover:var(--orange-500);
  --action-accent-text:var(--color-text-dark);
  --action-earth:var(--color-accent);        /* white label 9.88:1 */
  --action-earth-text:var(--color-white);
  --action-link:var(--teal-800);             /* 6.78:1 */
  --action-link-inverse:var(--teal-300);     /* 8.09:1 on ink */
  --action-focus:var(--teal-700);            /* 4.98:1 ring vs white (≥3:1 non-text) */
  --action-selected:var(--teal-700);

  --background-default:var(--color-white);
  --background-sand:var(--orange-50);
  --background-lagoon:var(--teal-50);
  --background-inverse:var(--color-text-dark);

  --surface-default:var(--color-white);
  --surface-raised:var(--color-white);
  --surface-elevated:var(--color-white);
  --surface-brand:var(--color-primary);      /* ink text only — 4.94:1 */
  --surface-brand-subtle:var(--teal-50);
  --surface-accent:var(--color-secondary);   /* ink or earth text */
  --surface-accent-subtle:var(--orange-100);
  --surface-earth:var(--color-accent);       /* white or orange text */
  --surface-earth-subtle:var(--brown-50);
  --surface-inverse:var(--color-text-dark);
  --surface-success-subtle:rgba(46,125,79,0.10);
  --surface-warning-subtle:rgba(248,194,104,0.28);
  --surface-error-subtle:rgba(184,58,43,0.08);
  --surface-info-subtle:rgba(70,165,187,0.14);

  --text-primary:var(--color-text-dark);     /* 14.10:1 */
  --text-secondary:rgba(13,48,52,0.78);      /* ≈ 8.0:1 */
  --text-muted:rgba(13,48,52,0.66);          /* ≈ 5.0:1 — smallest allowed */
  --text-inverse:var(--color-white);
  --text-on-brand:var(--color-text-dark);
  --text-on-accent:var(--color-text-dark);
  --text-on-earth:var(--color-white);
  --text-highlight-inverse:var(--color-secondary); /* orange on ink 8.67:1 */
  --text-error:var(--color-error);

  --border-default:rgba(13,48,52,0.18);
  --border-strong:rgba(13,48,52,0.36);
  --divider:rgba(13,48,52,0.12);

  --status-success:var(--color-success);
  --status-warning:var(--color-warning);
  --status-warning-strong:var(--color-warning-strong);
  --status-error:var(--color-error);
  --status-info:var(--color-info);
}
:root[data-theme="dark"], .dark{
  --action-primary:var(--color-secondary);
  --action-primary-hover:var(--orange-300);
  --action-primary-text:var(--color-text-dark);
  --action-primary-border:var(--color-secondary);
  --action-secondary-border:var(--teal-300);
  --action-secondary-text:var(--color-white);
  --action-link:var(--teal-300);
  --action-focus:var(--color-secondary);
  --action-selected:var(--color-secondary);
  --background-default:var(--color-text-dark);
  --surface-default:rgba(255,255,255,0.04);
  --surface-raised:rgba(255,255,255,0.08);
  --surface-elevated:rgba(255,255,255,0.12);
  --surface-brand-subtle:rgba(70,165,187,0.16);
  --surface-accent-subtle:rgba(248,194,104,0.14);
  --text-primary:var(--color-white);
  --text-secondary:rgba(255,255,255,0.82);
  --text-muted:rgba(255,255,255,0.68);
  --text-inverse:var(--color-text-dark);
  --border-default:rgba(255,255,255,0.20);
  --border-strong:rgba(255,255,255,0.36);
  --divider:rgba(255,255,255,0.12);
}
