/* Photoray Industries design tokens.
   Source of truth: design-system/project/tokens.json (published design system).
   Link this file first on every page, then the page's own CSS.
   Every size, colour, radius and duration on the site comes from a token here,
   so /tweak can adjust it and Bake can write it back. */

@import url("https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@100..125,500..700&family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600&display=swap");

:root {
  color-scheme: light;

  /* Brand identity colours (60 / 30 / 10) */
  --brand-charcoal: #2f3640;
  --brand-silver: #dcdde1;
  --brand-sheet: #f5f6fa;
  --brand-blue: #0984e3;

  /* Role colours, light theme "Sheet" */
  --canvas: #f5f6fa;
  --surface: #fbfbfd;
  --surface-sunken: #ecedf1;
  --line: #dcdde1;
  --line-strong: #7b828e;
  --ink: #2f3640;
  --ink-muted: #5c6573;
  --band: #2f3640;
  --on-band: #f5f6fa;
  --on-band-muted: #b4bac4;
  --cta: #0670c4;
  --cta-hover: #055a9e;
  --on-cta: #ffffff;
  --link: #0670c4;
  --focus: #0984e3;
  --error: #b42318;

  /* Font families */
  --font-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "Cascadia Mono", Consolas, monospace;
  --display-stretch: 112%;

  /* Font sizes (desktop) */
  --fs-display-xl: 64px;
  --fs-display-lg: 44px;
  --fs-heading: 28px;
  --fs-subheading: 20px;
  --fs-body-lg: 18px;
  --fs-body: 16px;
  --fs-small: 14px;
  --fs-button: 15px;
  --fs-label: 12px;
  --fs-data: 14px;
  --fs-stat: 48px;

  /* Spacing, 4px 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;
  --section-pad: 96px;
  --gutter: 32px;
  --max-width: 1200px;

  /* Corners: machined, never pills */
  --radius-0: 0px;
  --radius-sm: 2px;
  --radius-md: 4px;

  /* The only shadow */
  --shadow-header: 0 1px 0 rgba(47, 54, 64, 0.12);

  /* Motion (GSAP reads these; see references/motion-gsap.md) */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-micro: 200ms;
  --dur-ui: 300ms;
  --dur-state: 400ms;
  --dur-reveal: 700ms;
  --dur-draw: 900ms;
}

/* Phones and small tablets */
@media (max-width: 640px) {
  :root {
    --fs-display-xl: 40px;
    --fs-display-lg: 32px;
    --fs-heading: 24px;
    --fs-stat: 40px;
    --section-pad: 64px;
    --gutter: 16px;
  }
}

/* Dark theme "Press shop": the scroll-video hero and full dark sections */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --canvas: #171b21;
    --surface: #20252d;
    --surface-sunken: #1b2026;
    --line: #343b46;
    --line-strong: #6e7682;
    --ink: #f5f6fa;
    --ink-muted: #a9b0bb;
    --band: #0f1216;
    --link: #4da3f0;
    --focus: #4da3f0;
    --error: #f97066;
    --shadow-header: 0 1px 0 rgba(0, 0, 0, 0.5);
  }
}
:root[data-theme="dark"], [data-theme="dark"] {
  color-scheme: dark;
  --canvas: #171b21;
  --surface: #20252d;
  --surface-sunken: #1b2026;
  --line: #343b46;
  --line-strong: #6e7682;
  --ink: #f5f6fa;
  --ink-muted: #a9b0bb;
  --band: #0f1216;
  --link: #4da3f0;
  --focus: #4da3f0;
  --error: #f97066;
  --shadow-header: 0 1px 0 rgba(0, 0, 0, 0.5);
}

/* Type styles */
.t-display-xl { font: 700 var(--fs-display-xl)/1.0 var(--font-display); font-stretch: var(--display-stretch); letter-spacing: -0.02em; }
.t-display-lg { font: 700 var(--fs-display-lg)/1.05 var(--font-display); font-stretch: var(--display-stretch); letter-spacing: -0.015em; }
.t-heading    { font: 600 var(--fs-heading)/1.2 var(--font-display); font-stretch: var(--display-stretch); letter-spacing: -0.01em; }
.t-subheading { font: 600 var(--fs-subheading)/1.35 var(--font-display); font-stretch: var(--display-stretch); }
.t-body-lg    { font: 400 var(--fs-body-lg)/1.6 var(--font-body); max-width: 62ch; }
.t-body       { font: 400 var(--fs-body)/1.6 var(--font-body); max-width: 68ch; }
.t-small      { font: 400 var(--fs-small)/1.5 var(--font-body); }
.t-label      { font: 500 var(--fs-label)/1.4 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.t-data       { font: 400 var(--fs-data)/1.5 var(--font-mono); font-variant-numeric: tabular-nums; }
.t-stat       { font: 500 var(--fs-stat)/1.0 var(--font-mono); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

body { margin: 0; background: var(--canvas); color: var(--ink); font: 400 var(--fs-body)/1.6 var(--font-body); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
