/*
  Design tokens: the one place this site's identity is decided.

    DIRECTION: Werkvloer-nuchter en premium. Diep indigo, koraal en
    bordeaux, voor foodondernemers die producten op gewicht verkopen
    en grip willen op hun operatie. Schoon maar niet steriel,
    technologisch maar niet futuristisch.

    PALETTE: De twee kleuren van het beeldmerk (indigo #262260 en
    bordeaux #B63349) plus het koraal (#D95A4C) dat in het Meatron-
    dashboard de knoppen, de actieve navigatie en de grafieklijn
    draagt. Indigo draagt de volle banden, koraal draagt actie en de
    ketenlijn, bordeaux is het tweede accent en staat nooit als knop
    naast koraal. De grond is koel bijna-wit, zoals het canvas van de
    applicatie. Elke andere tint op deze site is een van deze vijf,
    gemengd met de grond.

    TYPE: Archivo variabel (400-800, breedte-as 62-125%) voor koppen
    en labels -- een industriele grotesk die zich als een etiket laat
    zetten: smal, klein, uppercase, ruim gespatieerd. IBM Plex Sans
    voor lopende tekst; technisch en rustig op lengte.

    SIGNATURE: De ketenlijn. Een koraalrail die een order langs
    webshoporder, picking, wegen, labelen, voorraad, betaling en
    dashboard voert, met een knoop per stap. Die lijn is het enige
    dat op deze site mag opvallen; de rest blijft stil.
*/

/* Fixes the cascade order for every stylesheet on the site, whatever
   order they are linked in. This statement must stay first. */
@layer tokens, base, layout, components, utilities;

@layer tokens {
  :root {
    /* Identity. Five colours with a job each. */
    --color-bg: #fafafb;
    --color-ink: #1b1836;
    --color-deep: #262260;
    --color-accent: #d95a4c;
    --color-berry: #b63349;
    --color-on-accent: #ffffff;

    --font-display: 'Archivo', system-ui, sans-serif;
    --font-body: 'IBM Plex Sans', system-ui, sans-serif;

    /* Soft corners, matching the application the client already
       works in every day. */
    --radius: 0.625rem;
    --radius-lg: 1.375rem;

    /* Derived, so they move with the palette instead of drifting
       away from it. */
    --color-surface: color-mix(in oklch, var(--color-deep) 5%, var(--color-bg));
    --color-muted: color-mix(in oklch, var(--color-ink) 62%, var(--color-bg));
    --color-line: color-mix(in oklch, var(--color-ink) 14%, transparent);

    /* The same three roles again, but on the indigo band, so a dark
       section is not a pile of one-off rgba() values. */
    --color-on-deep: color-mix(in oklch, #ffffff 94%, var(--color-deep));
    --color-muted-on-deep: color-mix(in oklch, #ffffff 68%, var(--color-deep));
    --color-line-on-deep: color-mix(in oklch, #ffffff 22%, transparent);
    --color-wash-on-deep: color-mix(in oklch, #ffffff 9%, transparent);

    /* Koraal is op indigo te donker om tekst mee te zetten. Dit is
       dezelfde kleur, opgelicht tot hij op de band leesbaar is, en
       uitsluitend voor tekstaccenten binnen een donkere sectie. */
    --color-accent-on-deep: color-mix(in oklch, var(--color-accent) 72%, #ffffff);

    /* A fluid type scale: sizes interpolate with the viewport, which
       is why this site has no font-size media queries anywhere. */
    --step--1: clamp(0.83rem, 0.80rem + 0.17vw, 0.94rem);
    --step-0: clamp(1rem, 0.95rem + 0.25vw, 1.13rem);
    --step-1: clamp(1.20rem, 1.11rem + 0.45vw, 1.50rem);
    --step-2: clamp(1.44rem, 1.29rem + 0.75vw, 2.00rem);
    --step-3: clamp(1.73rem, 1.49rem + 1.20vw, 2.66rem);
    --step-4: clamp(2.07rem, 1.71rem + 1.80vw, 3.55rem);
    --step-5: clamp(2.49rem, 1.94rem + 2.75vw, 4.74rem);
    --step-6: clamp(2.99rem, 2.16rem + 4.15vw, 6.31rem);

    /* Size is only half of type. */
    --leading-display: 1.03;
    --leading-heading: 1.18;
    --leading-body: 1.62;
    --tracking-display: -0.025em;
    --tracking-label: 0.14em;

    /* The label setting: Archivo pulled in to 82% width, so a small
       uppercase line reads as something printed on a sticker rather
       than as a shrunken heading. */
    --width-label: 82%;
    --width-display: 100%;

    /* Small steps are fixed; the large ones interpolate. */
    --space-3xs: 0.25rem;
    --space-2xs: 0.5rem;
    --space-xs: 0.75rem;
    --space-s: 1rem;
    --space-m: 1.5rem;
    --space-l: clamp(2rem, 1.6rem + 2vw, 3rem);
    --space-xl: clamp(3rem, 2.2rem + 4vw, 5.5rem);
    --space-2xl: clamp(4rem, 2.6rem + 7vw, 9rem);

    /* Widths. */
    --measure: 62ch;
    --container-narrow: 46rem;
    --container: 82rem;
    --container-wide: 100rem;
    --gutter: clamp(1rem, 4vw, 3rem);

    /* Two speeds, because they are two different things. */
    --motion: 200ms cubic-bezier(0.2, 0, 0, 1);
    --motion-entrance: 800ms cubic-bezier(0.16, 1, 0.3, 1);

    /* One shadow recipe for the entire site: the lift under the
       floating ROI card and under a screenshot. Nothing else. */
    --shadow: 0 1.5rem 3.5rem color-mix(in oklch, var(--color-deep) 16%, transparent);
  }
}
