/*
 * Design tokens. Components reference these semantic names only, never raw values.
 * Brand palette (Kasi brand guide): Deep Purple #512455, Turquoise #00A1B1, Slate Gray #939199,
 * Off White #EEF4ED, Orange #FC6700. Text uses darker shades of the same hues where the brand
 * colour itself is too light to read (turquoise and orange are 3:1 on white). Typeface: Montserrat.
 * Breakpoints (CSS cannot use variables in media queries): 1080px tablet, 720px mobile.
 */
:root {
  /* Surfaces & text */
  --background: #ffffff;
  --foreground: #241a26;
  --muted: #eef4ed; /* Off White */
  --muted-foreground: #5f5d66; /* Slate Gray, darkened for text */
  --secondary: #f4eff5;
  --accent: #dff3f5;
  --accent-foreground: #005a63;
  --border: #dcdbe0;
  --input: #939199; /* Slate Gray: field edges at 3:1 */
  --ring: #00a1b1;

  /* Brand */
  --primary: #512455; /* Deep Purple */
  --primary-hover: #411c45;
  --primary-foreground: #ffffff;
  /* Solid buttons (.btn--primary): Deep Purple in light mode, Turquoise in dark mode. */
  --button: var(--primary);
  --button-hover: var(--primary-hover);
  --button-foreground: var(--primary-foreground);
  --brand-deep: oklch(0.22 0.06 325);
  --brand-muted: oklch(0.84 0.018 325);
  --on-brand: oklch(1 0 0);
  --line-on-brand: color-mix(in oklch, var(--on-brand) 18%, transparent);
  --teal: #00707b; /* Turquoise, darkened for text on light backgrounds */
  --teal-bright: #00a1b1; /* Turquoise, on dark backgrounds */
  --orange: #fc6700; /* Orange: alerts and falling indicators only */
  /* Indicator direction (Signals) */
  --signal-up: var(--teal);
  --signal-down: #b84c00; /* Orange, darkened for text */
  --signal-flat: var(--muted-foreground);
  /* Draft and preview notices */
  --notice: oklch(0.93 0.08 85);
  --notice-foreground: oklch(0.38 0.08 70);
  /* Behind client logos, whose files have white backgrounds */
  --logo-surface: oklch(1 0 0);

  /* Effects */
  --hero-shade: linear-gradient(90deg, oklch(0.17 0.05 325 / 96%) 0%, oklch(0.2 0.055 325 / 86%) 48%, oklch(0.2 0.04 325 / 45%) 100%);
  --hero-shade-mobile: linear-gradient(180deg, oklch(0.17 0.05 325 / 88%) 0%, oklch(0.18 0.05 325 / 96%) 100%);
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 5%);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 10%), 0 1px 2px -1px rgb(0 0 0 / 10%);
  --shadow-card: 0 12px 32px oklch(0.25 0.04 325 / 10%);
  --shadow-menu: 0 16px 48px oklch(0.2 0.02 325 / 14%);

  /* Shape */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 14px;

  /* Type */
  --font-sans: 'Montserrat', system-ui, sans-serif;
  --font-display: 'Montserrat', system-ui, sans-serif;
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 18px;
  --text-xl: 21px;
  --display-sm: 26px;
  --display-md: 34px;
  --display-lg: 44px;
  --display-xl: 60px;
  /* Type scale: text steps 12–21px, display steps about ×1.3 (26, 34, 44, 60). Headings and body share Montserrat, so
     weight and spacing carry the contrast: headings bold, body regular, extra-bold only for small uppercase labels. */
  --weight-body: 400;
  --weight-heading: 700;
  --weight-label: 800;
  --leading-display: 1.12;
  --leading-heading: 1.22;
  --leading-body: 1.7;
  --tracking-display: -0.02em;

  /* Layout */
  --content-width: 1240px;
  --gutter: 48px;
  --header-height: 76px;
  --section-space: 96px;
}

/* The site supports both schemes; browsers then leave it alone instead of darkening it themselves. */
:root { color-scheme: light dark; }

/* Dark theme: same semantic names, values tuned for contrast on a deep plum background. */
@media (prefers-color-scheme: dark) {
  :root {
    --background: oklch(0.17 0.018 320);
    --foreground: oklch(0.95 0.006 320);
    --muted: oklch(0.21 0.02 320);
    --muted-foreground: oklch(0.75 0.014 320);
    --secondary: oklch(0.23 0.028 320);
    --accent: oklch(0.3 0.05 185);
    --accent-foreground: oklch(0.9 0.08 185);
    --border: oklch(0.32 0.02 320);
    --input: oklch(0.45 0.02 320);
    --ring: oklch(0.75 0.11 185);

    /* Brand purple lightens so links stay readable; solid buttons switch to Turquoise, as on every dark section. */
    --primary: oklch(0.78 0.1 320);
    --primary-hover: oklch(0.84 0.08 320);
    --primary-foreground: oklch(0.2 0.05 325);
    --button: var(--teal-bright);
    --button-hover: #2fc4d3;
    --button-foreground: var(--brand-deep);
    --brand-deep: oklch(0.23 0.06 325);
    --teal: #2fc4d3;
    --signal-down: var(--orange);
    --notice: oklch(0.36 0.07 80);
    --notice-foreground: oklch(0.93 0.07 85);

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 30%);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 40%), 0 1px 2px -1px rgb(0 0 0 / 40%);
    --shadow-card: 0 12px 32px rgb(0 0 0 / 35%);
    --shadow-menu: 0 16px 48px rgb(0 0 0 / 50%);
  }
}

@media (max-width: 1080px) {
  :root { --gutter: 32px; --display-xl: 50px; --display-lg: 38px; }
}

@media (max-width: 720px) {
  :root { --gutter: 20px; --header-height: 64px; --section-space: 64px; --display-xl: 38px; --display-lg: 31px; --display-md: 28px; --display-sm: 23px; }
}
