/* IAMX tokens. The only file in the site allowed raw colour, size and spacing values.
   Source: Claude Design round 2, turn A (design/rounds/2026-09-24-iamx-system-tokens-reply.md),
   on top of the round 1 Variable palette. The dark block under prefers-color-scheme repeats
   the data-theme dark block, so the site follows the system until a theme is chosen.
   npm run check reads the pair comments below and fails any pair under its minimum, in light and dark. */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("../fonts/SchibstedGrotesk-var.woff") format("woff");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("../fonts/SchibstedGrotesk-Italic-var.woff") format("woff");
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-var.woff") format("woff");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/* Text, 4.5:1 */
/* pair: text on bg >= 4.5 */
/* pair: text on surface >= 4.5 */
/* pair: text on surface-2 >= 4.5 */
/* pair: muted on bg >= 4.5 */
/* pair: muted on surface >= 4.5 */
/* pair: muted on surface-2 >= 4.5 */
/* pair: accent on bg >= 4.5 */
/* pair: accent on surface >= 4.5 */
/* pair: accent on surface-2 >= 4.5 */
/* pair: accent-hover on bg >= 4.5 */
/* pair: accent-hover on surface >= 4.5 */
/* pair: on-accent on accent >= 4.5 */
/* pair: on-accent on accent-hover >= 4.5 */
/* pair: on-accent on accent-pressed >= 4.5 */
/* pair: on-disabled on disabled >= 4.5 */
/* pair: error on bg >= 4.5 */
/* pair: error on surface >= 4.5 */
/* pair: success on bg >= 4.5 */
/* pair: success on surface >= 4.5 */
/* Control edges and focus rings, 3:1 */
/* pair: control-border on bg >= 3 */
/* pair: control-border on surface >= 3 */
/* pair: control-border on surface-2 >= 3 */
/* pair: error on surface-2 >= 3 */
/* pair: focus on bg >= 3 */
/* pair: focus on surface >= 3 */
/* pair: focus on surface-2 >= 3 */
/* The stage: the 3D story is always the dark set, in both schemes */
/* pair: stage-text on stage-bg >= 4.5 */
/* pair: stage-muted on stage-bg >= 4.5 */
/* pair: stage-accent on stage-bg >= 4.5 */
/* pair: stage-on-accent on stage-accent >= 4.5 */
/* pair: stage-on-accent on stage-accent-hover >= 4.5 */
/* pair: stage-focus on stage-bg >= 3 */

:root {
  /* Colour: fixed roles */
  --bg: #F4F5F2;
  --surface: #FFFFFF;
  --text: #111418;
  --muted: #4E5560;
  --accent: #1F3FD1;
  --on-accent: #FFFFFF;
  --border: #D5D8DC;
  --focus: #0F2A9E;
  /* Colour: added roles */
  --accent-hover: #1A36B8;
  --accent-pressed: #152C96;
  --surface-2: #EBECE8;
  --control-border: #747B85;
  --disabled: #E3E5E3;
  --on-disabled: #5C636D;
  --error: #B3261E;
  --success: #1B7340;

  /* Type */
  --font-sans: "Schibsted Grotesk", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-bold: 700;
  --step-display: clamp(3.5rem, 0.7143rem + 11.4286vw, 11rem);
  --step-slot: clamp(2rem, 1.0714rem + 3.8095vw, 4.5rem);
  --step-h1: clamp(2.25rem, 1.6rem + 2.6667vw, 4rem);
  --step-h2: clamp(1.75rem, 1.4714rem + 1.1429vw, 2.5rem);
  --step-lead: clamp(1.25rem, 1.0643rem + 0.7619vw, 1.75rem);
  --step-mark: clamp(1.25rem, 1.1571rem + 0.381vw, 1.5rem);
  --step-body: clamp(1.0625rem, 1.0393rem + 0.0952vw, 1.125rem);
  --step-button: 1rem;
  --step-label: 0.9375rem;
  --step-caption: 0.8125rem;
  --lh-display: 0.95;
  --lh-slot: 1;
  --lh-h1: 1.05;
  --lh-h2: 1.15;
  --lh-lead: 1.35;
  --lh-body: 1.55;
  --lh-ui: 1.25;
  --lh-label: 1.4;
  --track-display: -0.03em;
  --track-slot: -0.025em;
  --track-h1: -0.02em;
  --track-h2: -0.015em;
  --track-lead: -0.01em;
  --track-mark: -0.01em;
  --track-body: 0;
  --track-label: 0.01em;
  --track-mono: 0.02em;
  --measure: 38rem;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;
  --space-11: 192px;

  /* Radius */
  --radius-none: 0;
  --radius-control: 8px;
  --radius-icon: 20%;

  /* Borders */
  --border-divider: 1px;
  --border-control: 1px;
  --border-error: 2px;

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

  /* Shadow */
  --shadow: none;

  /* Sizes */
  --control-h: 48px;
  --field-lg-h: 9rem;
  --header-h: 64px;
  --z-header: 10;

  /* Breakpoints, for reference: @media cannot read custom properties, so the literals repeat below */
  --bp-sm: 390px;
  --bp-md: 768px;
  --bp-lg: 1024px;
  --bp-xl: 1440px;

  /* Grid, 390 first */
  --grid-columns: 4;
  --grid-gutter: 16px;
  --grid-margin: 20px;
  --content-max: 1312px;

  /* Motion */
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-header: 240ms;
  --dur-slot: 360ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-enter: cubic-bezier(0, 0, 0.2, 1);
  --ease-exit: cubic-bezier(0.4, 0, 1, 1);
  --slot-scroll-per-stop: 80svh;

  /* Site build: derived values the board used inline, named here so site.css holds no raw value */
  --slot-stops: 6;
  --blank-w: calc(var(--space-10) + var(--space-8));
  --sr-size: 1px;

  /* The stage: fixed dark set for the 3D story. It does not flip with the theme.
     --stage-light is the light beyond the X-shaped door, the light page's own background.
     The scene reads these at runtime (scripts/hero.js), so the canvas and the CSS agree. */
  --stage-bg: #0C0E12;
  --stage-text: #F1F2EF;
  --stage-muted: #A3AAB5;
  --stage-accent: #8197FF;
  --stage-accent-hover: #9DADFF;
  --stage-on-accent: #0C0E12;
  --stage-focus: #B8C6FF;
  --stage-light: #F4F5F2;
  --stage-scrim: rgba(12, 14, 18, 0.84);
  --stage-scrim-mid: rgba(12, 14, 18, 0.5);
  --stage-scrim-0: rgba(12, 14, 18, 0);
  /* A soft dark halo behind the stage's words, so a label keeps its contrast where lit stone passes behind it
     (stop 4's slab face measured about #50) without the side fade dimming the X. */
  --stage-text-halo: 0 0 0.3em rgba(12, 14, 18, 0.9), 0 0 0.9em rgba(12, 14, 18, 0.7);

  /* The story's layout. The stage lets go the moment the sixth stop ends and scrolls away; on the light page the
     camera walks through the door as it leaves (scripts/hero.js), so no stretch of scroll is a blank screen. */
  --stage-copy-w: min(44vw, 39rem);
  --slot-top: 29svh;
  --scrim-top-h: 18svh;
  --scrim-side-w: calc(var(--stage-copy-w) + var(--grid-margin) + 4vw);
  --scrim-bottom-h: 50svh;
  --scrim-bottom-mid: 28%;
  --scrim-foot-h: 14svh;
  --stage-pad-bottom: var(--space-7);

  /* Masked line reveal: room inside each mask for italic overhang and descenders */
  --mask-pad-x: 0.16em;
  --mask-pad-y: 0.18em;
  --mask-travel: 115%;
  --slot-stagger: 26ms;
  --slot-enter-delay: 90ms;
  --slot-line-delay: 120ms;
  --slot-blank-w: 3em;
  --slot-blank-gap: 0.24em;
  --slot-blank-rule: 0.07em;
  --slot-shrink-delay: 160ms;
  --dur-reveal: 760ms;
  --reveal-delay-1: 80ms;
  --reveal-delay-2: 300ms;
  --reveal-delay-3: 440ms;

  /* Progress rail */
  --rail-mark-w: 12px;
  --rail-mark-on-w: 40px;
  --rail-mark-h: 3px;
  --rail-gap: 8px;

  /* The "Your X" field: while it has focus, a large faint X lies in its corner, cropped by the field's right and lower
     edges, the X of light the scene's open door throws on its floor. Decorative; text contrast is unaffected. */
  --x-echo-size: 15rem;
  --x-echo-crop-x: 5.5rem;
  --x-echo-crop-y: 6.5rem;
  --x-echo-tint: rgba(31, 63, 209, 0.08);

  color-scheme: light;
}

@media (min-width: 768px) {
  :root {
    --grid-columns: 8;
    --grid-gutter: 20px;
    --grid-margin: 40px;
  }
}

@media (min-width: 1024px) {
  :root {
    --grid-columns: 12;
    --grid-gutter: 24px;
    --grid-margin: 48px;
    --header-h: 72px;
  }
}

@media (min-width: 1440px) {
  :root {
    --grid-margin: 64px;
  }
}

:root[data-theme="dark"] {
  --bg: #0C0E12;
  --surface: #161A20;
  --text: #F1F2EF;
  --muted: #A3AAB5;
  --accent: #8197FF;
  --on-accent: #0C0E12;
  --border: #2A303A;
  --focus: #B8C6FF;
  --accent-hover: #9DADFF;
  --accent-pressed: #6A83F2;
  --surface-2: #1F242C;
  --control-border: #7C8490;
  --disabled: #262B33;
  --on-disabled: #A0A7B1;
  --error: #FF8A80;
  --success: #5FD08A;
  --x-echo-tint: rgba(129, 151, 255, 0.1);

  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C0E12;
    --surface: #161A20;
    --text: #F1F2EF;
    --muted: #A3AAB5;
    --accent: #8197FF;
    --on-accent: #0C0E12;
    --border: #2A303A;
    --focus: #B8C6FF;
    --accent-hover: #9DADFF;
    --accent-pressed: #6A83F2;
    --surface-2: #1F242C;
    --control-border: #7C8490;
    --disabled: #262B33;
    --on-disabled: #A0A7B1;
    --error: #FF8A80;
    --success: #5FD08A;
    --x-echo-tint: rgba(129, 151, 255, 0.1);

    color-scheme: dark;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-fast: 0ms;
    --dur-base: 0ms;
    --dur-header: 0ms;
    --dur-slot: 0ms;
    --dur-reveal: 0ms;
  }
}
