/* CTS Growth design tokens. Use role colours in components and page styles. */

:root {
  color-scheme: dark;

  /* Colour: CTS brand */
  --growth-color-gold: #f2bf65;
  --growth-color-red: #b83723;
  --growth-color-cream: #fff4df;
  --growth-color-gold-bright: #ffdc99;
  --growth-color-red-bright: #ff8f78;

  /* Colour: warm graphite ramp from the live CTS site */
  --growth-color-graphite-950: #0b0a08;
  --growth-color-graphite-900: #100f0d;
  --growth-color-graphite-850: #151412;
  --growth-color-graphite-800: #1a1917;
  --growth-color-graphite-750: #211f1d;
  --growth-color-graphite-700: #282624;
  --growth-color-graphite-600: #343230;
  --growth-color-graphite-500: #4a4846;
  --growth-color-graphite-400: #6e6c6a;
  --growth-color-graphite-300: #989695;
  --growth-color-graphite-200: #c6c4c2;
  --growth-color-graphite-100: #e8e6e4;

  /* Colour: roles */
  --growth-color-bg: #0d0c0a;
  --growth-color-bg-raised: #141211;
  --growth-color-bg-sunken: #060504;
  --growth-color-surface: #1b1917;
  --growth-color-surface-raised: #242221;
  --growth-color-surface-well: rgba(6, 5, 4, 0.4);
  --growth-color-text: var(--growth-color-cream);
  --growth-color-text-secondary: #b9b6af;
  --growth-color-text-tertiary: var(--growth-color-graphite-300);
  --growth-color-text-on-accent: #15110a;
  --growth-color-line: rgba(255, 244, 223, 0.09);
  --growth-color-line-strong: rgba(255, 244, 223, 0.17);
  --growth-color-control-border: #777471;
  --growth-color-accent: var(--growth-color-gold);
  --growth-color-accent-hover: var(--growth-color-gold-bright);
  --growth-color-accent-soft: rgba(242, 191, 101, 0.12);
  --growth-color-accent-line: rgba(242, 191, 101, 0.38);
  --growth-color-signal: var(--growth-color-red);
  --growth-color-focus: var(--growth-color-gold);
  --growth-color-danger: var(--growth-color-red-bright);
  --growth-color-danger-soft: rgba(184, 55, 35, 0.16);
  --growth-color-scene-light: var(--growth-color-graphite-700);
  --growth-color-scene-wash: rgba(242, 191, 101, 0.055);
  --growth-color-scene-falloff: rgba(20, 18, 17, 0.025);
  --growth-color-pointer-light: rgba(242, 191, 101, 0.14);
  --growth-color-pointer-edge: rgba(242, 191, 101, 0.56);

  /* Gradients: each surface is lit from above */
  --growth-gradient-surface: linear-gradient(180deg, var(--growth-color-graphite-750), var(--growth-color-surface));
  --growth-gradient-surface-raised: linear-gradient(180deg, var(--growth-color-graphite-700), var(--growth-color-graphite-800));
  --growth-gradient-band: linear-gradient(180deg, var(--growth-color-bg-raised), var(--growth-color-bg));
  --growth-gradient-accent: linear-gradient(180deg, #ffe4ad, var(--growth-color-gold) 55%, #dea94f);
  --growth-gradient-accent-hover: linear-gradient(180deg, #ffecc4, #f7cb7c 55%, #e6b45d);
  --growth-gradient-text-accent: linear-gradient(180deg, #ffdf9f, var(--growth-color-gold) 60%, #d9a349);
  --growth-gradient-text-graphite: linear-gradient(180deg, var(--growth-color-text), var(--growth-color-text-tertiary));
  --growth-gradient-keyline: linear-gradient(90deg, var(--growth-color-signal), var(--growth-color-accent) 45%, transparent);
  --growth-gradient-hairline: linear-gradient(90deg, transparent, var(--growth-color-line-strong) 50%, transparent);

  /* Type: the live CTS system stacks and rhythm */
  --growth-font-family-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --growth-font-family-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --growth-font-family-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Liberation Mono", Menlo, monospace;

  --growth-font-size-display: clamp(2.75rem, 1rem + 6vw, 6rem);
  --growth-font-size-headline: clamp(2.125rem, 1.2rem + 3.6vw, 4rem);
  --growth-font-size-title-1: clamp(1.625rem, 1.2rem + 1.4vw, 2.25rem);
  --growth-font-size-title-2: clamp(1.3125rem, 1.15rem + 0.6vw, 1.5rem);
  --growth-font-size-body-lg: clamp(1.125rem, 1rem + 0.45vw, 1.3125rem);
  --growth-font-size-body: 1.0625rem;
  --growth-font-size-small: 0.9375rem;
  --growth-font-size-caption: 0.8125rem;
  --growth-font-size-eyebrow: 0.8125rem;

  --growth-font-weight-regular: 400;
  --growth-font-weight-medium: 500;
  --growth-font-weight-semibold: 600;
  --growth-font-weight-bold: 700;

  --growth-line-height-display: 1.03;
  --growth-line-height-headline: 1.07;
  --growth-line-height-title: 1.16;
  --growth-line-height-snug: 1.4;
  --growth-line-height-body: 1.6;

  --growth-letter-spacing-display: -0.045em;
  --growth-letter-spacing-headline: -0.035em;
  --growth-letter-spacing-title: -0.022em;
  --growth-letter-spacing-body: -0.006em;
  --growth-letter-spacing-eyebrow: 0.14em;

  /* Space: 4 px base */
  --growth-space-1: 0.25rem;
  --growth-space-2: 0.5rem;
  --growth-space-3: 0.75rem;
  --growth-space-4: 1rem;
  --growth-space-5: 1.5rem;
  --growth-space-6: 2rem;
  --growth-space-7: 3rem;
  --growth-space-8: 4rem;
  --growth-space-9: 6rem;
  --growth-space-10: 8rem;

  /* Layout */
  --growth-layout-wrap: 75rem;
  --growth-layout-wrap-narrow: 54rem;
  --growth-layout-gutter: clamp(1.25rem, 5vw, 4rem);
  --growth-layout-section: clamp(4.5rem, 3rem + 7vw, 9.5rem);
  --growth-layout-measure: 38rem;
  --growth-layout-header: 4rem;

  /* Shape */
  --growth-radius-xs: 6px;
  --growth-radius-sm: 10px;
  --growth-radius-md: 14px;
  --growth-radius-lg: 20px;
  --growth-radius-xl: 28px;
  --growth-radius-2xl: 36px;
  --growth-radius-pill: 999px;

  /* Size: 44 px touch target and 52 px regular control */
  --growth-size-target: 2.75rem;
  --growth-size-control: 3.25rem;

  /* Elevation */
  --growth-shadow-sheen: inset 0 1px 0 rgba(255, 244, 223, 0.07);
  --growth-shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5), 0 6px 16px rgba(0, 0, 0, 0.28);
  --growth-shadow-2: 0 1px 2px rgba(0, 0, 0, 0.5), 0 18px 48px rgba(0, 0, 0, 0.42);
  --growth-shadow-3: 0 2px 4px rgba(0, 0, 0, 0.5), 0 40px 110px rgba(0, 0, 0, 0.6);
  --growth-shadow-accent: 0 10px 30px rgba(242, 191, 101, 0.14);

  /* Materials */
  --growth-material-glass: rgba(20, 18, 17, 0.92);
  --growth-material-glass-raised: rgba(36, 34, 33, 0.96);
  --growth-material-glass-sheet: rgba(27, 25, 23, 0.98);
  --growth-material-glass-solid: var(--growth-color-bg-raised);
  --growth-material-blur: saturate(180%) blur(20px);
  --growth-material-border: rgba(255, 244, 223, 0.1);

  /* Focus */
  --growth-focus-width: 3px;
  --growth-focus-offset: 3px;

  /* Motion */
  --growth-motion-duration-press: 120ms;
  --growth-motion-duration-hover: 240ms;
  --growth-motion-duration-enter: 520ms;
  --growth-motion-duration-stage: 900ms;
  --growth-motion-duration-navigation: 160ms;
  --growth-motion-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --growth-motion-ease-standard: cubic-bezier(0.2, 0.7, 0.2, 1);
  --growth-motion-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* Layers */
  --growth-layer-header: 40;
  --growth-layer-overlay: 60;
}

@media (max-width: 760px) {
  :root {
    --growth-font-size-caption: 0.875rem;
    --growth-font-size-eyebrow: 0.875rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --growth-motion-duration-press: 0s;
    --growth-motion-duration-hover: 0s;
    --growth-motion-duration-enter: 0s;
    --growth-motion-duration-stage: 0s;
    --growth-motion-duration-navigation: 0s;
  }
}
