/* ==========================================================================
   BASE TOKENS: the raw values. They never change between themes.
   Components should not use the colours here directly; they use the
   purpose names in themes.css.
   Source: "Foundations & Controls.svg", plus values agreed since.
   ========================================================================== */
:root {
  /* Brand colours */
  --brand-yellow: #FEF601;
  --brand-yellow-bright: #FFF700;         /* ring gradient, light end */
  --brand-yellow-deep: #BAB400;           /* ring gradient, dark end */
  --brand-yellow-darker: #8F8A00;         /* for light backgrounds (draft) */
  --brand-yellow-darkest: #5C5900;        /* for light backgrounds (draft) */

  --brand-yellow-soft: #FFE1A4;           /* highlighted headline words */

  /* Client tint, used on one case study card */
  --client-adyen: #24313B;

  /* Neutrals (higher number = darker) */
  --neutral-0: #FFFFFF;
  --neutral-100: #F0F0F0;                 /* light theme (draft) */
  --neutral-200: #D9D9D9;
  --neutral-250: #C6C6C6;
  --neutral-300: #B3B3B3;
  --neutral-500: #767676;                 /* quietest text: footer */
  --neutral-600: #595959;                 /* light theme (draft) */
  --neutral-800: #292929;
  --neutral-850: #25272A;                 /* case study cards */
  --neutral-870: #222222;                 /* card media area */
  --neutral-1000: #000000;

  /* Spacing */
  --space-4: 4px;
  --space-8: 8px;
  --space-16: 16px;
  --space-24: 24px;
  --space-32: 32px;
  --space-40: 40px;
  --space-64: 64px;
  --space-128: 128px;

  /* Corners */
  --radius-8: 8px;
  --radius-16: 16px;
  --radius-32: 32px;
  --radius-96: 96px;                      /* maximum */
  --radius-pill: 999px;

  /* Lines */
  --line-1: 1px;
  --line-2: 2px;
  --line-4: 4px;
  --line-8: 8px;

  /* Layout */
  --page-width: 100vw;                    /* widest the page gets: full width */
  --gridline-overshoot: 160px;            /* how far lines fade out past the page edge */
  --page-margin: var(--space-32);
  --grid-columns: 6;
  --grid-gutter: var(--space-24);

  /* Type: family, sizes, weights, line heights */
  --font: "Space Grotesk", system-ui, sans-serif;

  --font-size-12: 12px;
  --font-size-16: 16px;
  --font-size-24: 24px;
  --font-size-32: 32px;
  --font-size-40: 40px;
  --font-size-48: 48px;
  --font-size-96: 96px;

  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-bold: 700;

  --leading-display: 1.1;
  --leading-title: 1.2;
  --leading-heading: 1.25;
  --leading-subheading: 1.3;
  --leading-body: 1.5;

  --tracking-display: -0.02em;

  /* Type: which size each text style uses */
  --text-headline: clamp(var(--font-size-48), 12vw, var(--font-size-96));
  --text-page-heading: clamp(var(--font-size-32), 7vw, var(--font-size-40));
  --text-heading: var(--font-size-32);
  --text-small-heading: var(--font-size-24);
  --text-overline: var(--font-size-16);
  --text-body-large: var(--font-size-24);
  --text-body-small: var(--font-size-16);
  --text-body-xsmall: var(--font-size-12);

  /* Controls */
  --button-line-l: 36px;                  /* L height = 8 + 36 + 8 = 52 */
  --button-line-m: 24px;                  /* M height = 8 + 24 + 8 = 40 */
  --button-line-s: 16px;                  /* S height = 8 + 16 + 8 = 32 */
  --icon-12: 12px;
  --icon-16: 16px;
  --icon-24: 24px;
  /* Feather draws on a 24-unit square, so the stroke is set per size */
  --icon-stroke-12: 2;                    /* looks 1px at 12 */
  --icon-stroke-16: 3;                    /* looks 2px at 16 */
  --icon-stroke-24: 2;                    /* looks 2px at 24 */
  --underline-offset: 3px;
  --focus-offset: var(--space-4);
  --ring-width: var(--line-4);

  /* Motion */
  --hover-fade: 350ms ease;               /* everything fades together */
  --cursor-fade: 150ms ease;              /* custom cursor appearing */
  --shadow-float: drop-shadow(0 var(--space-8) var(--space-8) rgb(0 0 0 / 0.35));
  --ring-duration: 3s;                    /* one full pass of the gradient */
  --appear-delay: 0ms;                    /* wait before a block starts fading in */
  --wipe-duration: var(--appear-duration); /* bar above the navigation: in step with its link */
  --wipe-ease: ease-in-out;
  --slide-distance: var(--space-32);      /* how far the profile photo travels in */
  --sequence-gap: 200ms;                  /* between items fading in after the headline */
  --appear-duration: 1400ms;              /* a block fading in on scroll */
  --reveal-delay: 0ms;                    /* wait before the headline starts */
  --reveal-duration: 800ms;               /* one blind slat turning into view */
  --reveal-stagger: 0ms;                  /* between lines; 0 moves them together */
  --reveal-ease: cubic-bezier(0.2, 0.7, 0.2, 1);   /* snaps in, settles softly */
  --reveal-sweep: 300ms;                  /* slats start one after another across this */
  --reveal-slats: 2;                      /* slats per line of text */
  --reveal-angle: 6deg;                   /* slant of the slats; positive rises to the right */
}

/* Mobile. CSS variables cannot be used inside @media, so 560px is typed
   here and in components.css. */
@media (max-width: 560px) {
  :root {
    --page-margin: var(--space-16);
    --grid-gutter: var(--space-8);

    --text-headline: var(--font-size-48);
    --text-page-heading: var(--font-size-32);
    --text-heading: var(--font-size-24);
    --text-small-heading: var(--font-size-16);
    --text-overline: var(--font-size-12);
    --text-body-large: var(--font-size-16);
    --text-body-small: var(--font-size-16);
    --text-body-xsmall: var(--font-size-12);
  }
}
