/* Studio Web Visible — design tokens (from the Studio Design system).
   Every colour, space, radius and shadow used by the site lives here. Components use these variables only.
   Light theme by default; dark theme when the visitor's device asks for it (prefers-color-scheme).
   data-theme="light" or data-theme="dark" on <html> forces one theme (useful for testing). */

:root {
  --font-display: Poppins, "Avenir Next", "Segoe UI", sans-serif;
  --font-text: Figtree, "Segoe UI", Roboto, sans-serif;

  /* Brand */
  --brand-navy: #071b30;
  --brand-teal-deep: #026c70;
  --brand-teal: #029194;
  --brand-turquoise: #04dada;
  --brand-aqua: #9cfdfc;
  --brand-white: #ffffff;

  /* Light theme (default) */
  --color-bg: #ffffff;
  --color-surface: #f1f8f9;
  --color-surface-raised: #ffffff;
  --color-text: #071b30;
  --color-text-muted: #4d5c6e;
  --color-border: #dae2eb;
  --color-border-strong: #748292;
  --color-action: #026c70;
  --color-action-hover: #005b5f;
  --color-on-action: #ffffff;
  --color-link: #026c70;
  --color-accent: #026c70;
  --color-focus: #071b30;
  --color-success: #1e7a46;
  --color-warning: #8a5a00;
  --color-error: #b3261e;

  /* Space (4 px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;
  --space-32: 128px;
  --space-40: 160px;

  /* Shape and depth */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-1: 0 1px 2px rgba(7, 27, 48, 0.06), 0 4px 16px rgba(7, 27, 48, 0.06);
  --shadow-2: 0 12px 32px rgba(7, 27, 48, 0.16);

  /* Layout */
  --container-max: 1280px;
  --measure: 68ch;
  --header-height: 72px;
  --touch-target: 44px;
  --focus-width: 2px;
  --focus-offset: 2px;

  color-scheme: light;
}

/* Navy theme: dark bands (.navy) inside the light site */
.navy {
  --color-bg: #071b30;
  --color-surface: #10253a;
  --color-surface-raised: #1a2f45;
  --color-text: #ffffff;
  --color-text-muted: #a8b9ce;
  --color-border: #273c53;
  --color-border-strong: #6f8298;
  --color-action: #04dada;
  --color-action-hover: #9cfdfc;
  --color-on-action: #071b30;
  --color-link: #04dada;
  --color-accent: #04dada;
  --color-focus: #9cfdfc;
  --color-success: #6fe3a0;
  --color-warning: #ffcf66;
  --color-error: #ff8f80;
  --shadow-1: none;
  --shadow-2: 0 12px 32px rgba(0, 0, 0, 0.45);
}

/* Dark mode: follows the device setting, unless data-theme="light" forces the light theme.
   The same values are repeated under :root[data-theme="dark"] so the dark theme can be forced for testing. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg: #071b30;
    --color-surface: #10253a;
    --color-surface-raised: #1a2f45;
    --color-text: #ffffff;
    --color-text-muted: #a8b9ce;
    --color-border: #273c53;
    --color-border-strong: #6f8298;
    --color-action: #04dada;
    --color-action-hover: #9cfdfc;
    --color-on-action: #071b30;
    --color-link: #04dada;
    --color-accent: #04dada;
    --color-focus: #9cfdfc;
    --color-success: #6fe3a0;
    --color-warning: #ffcf66;
    --color-error: #ff8f80;
    --shadow-1: none;
    --shadow-2: 0 12px 32px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
  /* Navy bands go one step deeper so they still read as bands on the navy page */
  :root:not([data-theme="light"]) .navy {
    --color-bg: #031222;
    --color-surface: #0a1d31;
    --color-border: #1f344b;
  }
}
:root[data-theme="dark"] {
  --color-bg: #071b30;
  --color-surface: #10253a;
  --color-surface-raised: #1a2f45;
  --color-text: #ffffff;
  --color-text-muted: #a8b9ce;
  --color-border: #273c53;
  --color-border-strong: #6f8298;
  --color-action: #04dada;
  --color-action-hover: #9cfdfc;
  --color-on-action: #071b30;
  --color-link: #04dada;
  --color-accent: #04dada;
  --color-focus: #9cfdfc;
  --color-success: #6fe3a0;
  --color-warning: #ffcf66;
  --color-error: #ff8f80;
  --shadow-1: none;
  --shadow-2: 0 12px 32px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}
:root[data-theme="dark"] .navy {
  --color-bg: #031222;
  --color-surface: #0a1d31;
  --color-border: #1f344b;
}
