/* ==========================================================================
   Mediquipt - Design Tokens
   Single source of truth for colour, typography, spacing, radius, elevation
   and layout. Brand colours come from the vector fills in the design PDFs.
   Layout sizes are measured on the 1920 px renders (1 render px = 1 CSS px)
   and scale down fluidly to 360 px with clamp(). Text sizes run at 90 % of
   the render at 1920 px and at 75 % at 1440 px, the same ratio as the
   layout: see "Typography" and "Typography on desktop widths".
   ========================================================================== */

:root {
    /* --- Brand palette ---------------------------------------------------- */
    --color-ink:   #38444c; /* text, headings, line icons */
    --color-blue:  #1d91c8; /* active nav, eyebrows, stats, accents */
    --color-green: #00ae6b; /* CTA, links, accents, outlines */
    --color-white: #ffffff;

    /* --- Surfaces (designer: "10 % van blauw", "13 % van groen") ---------- */
    --color-blue-10:   #e8f4f9; /* brand blue at 10 % on white */
    --color-blue-tile: #e7f3f9; /* the blue baked into the prototype product tiles, one step off blue-10 */
    --color-green-13:  #def4ec; /* brand green at 13 % on white */
    --color-green-20:  #ccede0; /* icon discs, table rules, checked chips */
    --color-blue-line: #d2e9f4; /* 2 px edge of light-blue blocks and cards */
    --color-green-line:#c7ecdd; /* 2 px edge of light-green blocks */

    /* --- Text and CTA colours ---------------------------------------------
       The prototype follows the design exactly: small green and blue text
       and the button fill use the brand colours. Brand green on white is
       2.9:1 and brand blue on white is 3.5:1, below WCAG AA for small text.
       This is listed as an open item for the designer. Darker shades for a
       later accessibility pass: green #007a48 (5.4:1), blue #1676a3 (5.1:1). */
    --color-green-text:    var(--color-green);
    --color-green-text-lg: var(--color-green);
    --color-blue-text:     var(--color-blue);
    --color-cta:           var(--color-green);
    --color-cta-hover:     #008f58;
    --color-cta-active:    #007a48;

    /* --- Neutrals ---------------------------------------------------------- */
    --color-muted:       #5e6c70; /* placeholders, secondary meta (4.7:1 on green-13) */
    --color-dot:         #9ba1a5; /* inactive carousel dot */
    --color-dot-active:  #7fd6b4; /* active carousel dot */
    --color-overlay:     rgba(20, 26, 31, 0.55); /* hero video/photo scrim */
    --color-scrim:       #141a1f; /* base of the hero scrim */
    --color-rule-doc:    #bfdced; /* 1 px rule between document rows */
    --color-error:       #c2261a; /* border of a field with aria-invalid (5.9:1 on white) */

    /* --- Derived (transparent) variants: brand colour + alpha via color-mix */
    --color-focus-ring:  color-mix(in srgb, var(--color-green) 28%, transparent); /* field focus halo */
    --color-play-disc:   color-mix(in srgb, var(--color-blue) 55%, transparent);  /* video play button */
    --color-play-ring:   color-mix(in srgb, var(--color-white) 18%, transparent); /* ring around it */

    /* --- Semantic roles ---------------------------------------------------- */
    --color-bg:          var(--color-white);
    --color-text:        var(--color-ink);
    --color-heading:     var(--color-ink);
    --color-link:        var(--color-green-text);
    --color-link-hover:  var(--color-ink);
    --color-nav-active:  var(--color-blue);
    --color-focus:       var(--color-blue);
    --color-border:      var(--color-blue-line);

    /* --- Typography -------------------------------------------------------- */
    --font-base: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --weight-light:    300;
    --weight-regular:  400;
    --weight-medium:   500;
    --weight-semibold: 600;
    --weight-bold:     700;
    --weight-black:    900; /* every heading in the design is set in 900 */

    /* The PDF is 1920 px wide and sets body copy at 20 px. A reader views that
       PDF fitted to a laptop screen, so the design appears at 70 to 80 %. The
       first client review found the 1:1 sizes too large. The scale therefore
       stops at 90 % of the PDF value at 1920 px (right value of each clamp,
       the PDF value is in brackets). The values below apply to widths
       below 992 px. From 992 px the block "Typography on desktop widths" at
       the end of this file replaces them. The navigation is the exception:
       it runs at body size. */
    --text-display: clamp(2.25rem, 1.6875rem + 1.875vw, 3.9375rem); /* 63  hero h1, page header title (70 in the PDF) */
    --text-h2:      clamp(1.625rem, 1.4rem + 0.425vw, 1.90625rem); /* 30.5 section title (34) */
    --text-h3:      clamp(1.25rem, 1.1125rem + 0.3375vw, 1.53125rem); /* 24.5 card title (27) */
    --text-h4:      clamp(1.125rem, 1.075rem + 0.325vw, 1.46875rem); /* 23.5 product title, doc card, "Specificaties:" (26) */
    --text-eyebrow: clamp(1.25rem, 1.155rem + 0.35vw, 1.5625rem); /* 25  page eyebrow, product category (28) */
    --text-lead:    clamp(1.125rem, 0.99rem + 0.3vw, 1.34375rem); /* 21.5 footer links (24) */
    --text-nav:     clamp(1rem, 0.825rem + 0.25vw, 1.125rem); /* 18  primary navigation and breadcrumb (24): the second client review set the menu at body size */
    --text-body:    clamp(1rem, 0.825rem + 0.25vw, 1.125rem); /* 18  body copy, labels, buttons (20) */
    --text-sm:      clamp(0.9375rem, 0.7425rem + 0.225vw, 1rem); /* 16  document rows (18) */
    --text-xs:      clamp(0.875rem, 0.66rem + 0.2vw, 0.90625rem); /* 14.5 date, article number (16) */
    --text-stat:    clamp(2.5rem, 2.1375rem + 1.215vw, 3.59375rem); /* 57.5 "at a glance" figures (64) */
    --text-art-nr:  clamp(1.0625rem, 0.9075rem + 0.275vw, 1.25rem); /* 20  "Art. nr:" (22) */

    --leading-tight:   1.1;
    --leading-heading: 1.2;
    --leading-snug:    1.35;
    --leading-body:    1.65; /* 29.7 px on 18 px body */

    /* --- Spacing scale (names shared with utility.css) --------------------- */
    --space-1:  0.25rem;  /*   4 */
    --space-2:  0.5rem;   /*   8 */
    --space-3:  0.75rem;  /*  12 */
    --space-4:  1rem;     /*  16 */
    --space-5:  1.5rem;   /*  24 */
    --space-6:  2rem;     /*  32 */
    --space-7:  3rem;     /*  48 */
    --space-8:  4rem;     /*  64 */
    --space-9:  6rem;     /*  96 */
    --space-10: 8rem;     /* 128 */

    --section-y:  clamp(3rem, 1.5rem + 4vw, 5.5rem);   /* vertical rhythm between sections */
    --panel-pad:  clamp(1.5rem, -0.15rem + 7.3vw, 8.625rem); /* 138 px inset inside shape blocks at 1920, 24 px at 360 */
    --stack:      var(--space-5); /* gap between paragraph-level elements */

    /* --- Radius ------------------------------------------------------------ */
    --radius-sm:   8px;   /* inputs, choice chips */
    --radius:      16px;
    --radius-card: 24px;  /* cards, tiles */
    --radius-lg:   32px;  /* logo cards */
    --radius-xl:   40px;  /* icon panel */
    --radius-pill: 999px;

    /* The brand shape: top-right and bottom-left corners strongly rounded.
       Blocks use one fluid radius (about 200 px at 1920). Photos use a
       percentage so the curve follows the photo size (190 px on 604 x 518). */
    --shape-r:        clamp(3.5rem, 2rem + 9vw, 12.5rem);
    --shape-media-rx: 31%;
    --shape-media-ry: 36%;

    /* --- Borders & elevation ---------------------------------------------- */
    --border-w:      2px;
    --shadow-header: 0 2px 8px rgba(56, 68, 76, 0.14);
    --shadow-sm:     0 1px 3px rgba(56, 68, 76, 0.16);
    --shadow:        0 6px 20px rgba(56, 68, 76, 0.10);
    --shadow-lg:     0 18px 48px rgba(56, 68, 76, 0.14);
    --shadow-control: 0 1px 4px rgba(56, 68, 76, 0.25); /* round carousel arrows (ink at 25 %) */

    /* --- Layout ------------------------------------------------------------ */
    /* The side margins and the text columns keep the proportions of the
       1920 px design on a laptop: the designer compares the site with the
       PDF fitted to the screen. A fixed 32 px margin at 1440 px made every
       block and the menu run almost to the screen edge. The margin is
       7.3 % of the viewport (140 px at 1920, 105 at 1440, 26 at 360), the
       narrow column 71 % and the intro measure 56.7 % (never below 40rem,
       so a tablet keeps a readable column). Above 1920 px both containers
       stop growing and stay centred, so the text columns keep their place
       relative to the logo on a wide screen. */
    --container-pad:    clamp(1.25rem, 7.3vw, 8.75rem);
    --container-max:    calc(1640px + 2 * var(--container-pad)); /* x 140 to 1780 at 1920 */
    --container-narrow: calc(min(71vw, 1363.2px) + 2 * var(--container-pad)); /* x 278 to 1642 at 1920: text columns */
    --measure:          min(68rem, max(56.7vw, 40rem));  /* 1088 px at 1920: centered intro paragraphs */
    --header-h:         clamp(4.5rem, 2rem + 5vw, 7.9375rem); /* 127 px at 1920 */
    --hero-h:           clamp(30rem, 18rem + 30vw, 49.625rem); /* 794 px homepage hero */

    /* --- Motion ------------------------------------------------------------ */
    --ease:       cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 180ms var(--ease);
}

/* --- Typography on desktop widths -----------------------------------------
   The layout at 1440 px is 75 % of the 1920 px render. Text at 84 % in a
   column at 75 % needs more lines than the design, so a text block became
   taller than the photo beside it. From 992 px each step therefore follows
   the layout: 75 % of the PDF value at 1440 px, 90 % at 1920 px, on one
   straight line. The line goes on down to 1280 px, where body copy is
   14 px. Below 1280 px a step keeps that value (70 % of the PDF value),
   with a floor of 13 px for the small steps. Display and stat keep their
   old curve where that is the smaller of the two. */
@media (min-width: 992px) {
    :root {
        --text-display: min(clamp(2.25rem, 1.6875rem + 1.875vw, 3.9375rem), max(3.0625rem, 1.3125rem + 2.1875vw)); /* 52.5 at 1440 */
        --text-h2:      clamp(1.4875rem, 0.6375rem + 1.0625vw, 1.90625rem); /* 25.5 at 1440 */
        --text-h3:      clamp(1.18125rem, 0.50625rem + 0.84375vw, 1.53125rem); /* 20.25 at 1440 */
        --text-h4:      clamp(1.1375rem, 0.4875rem + 0.8125vw, 1.46875rem); /* 19.5 at 1440 */
        --text-eyebrow: clamp(1.225rem, 0.525rem + 0.875vw, 1.5625rem); /* 21 at 1440 */
        --text-lead:    clamp(1.05rem, 0.45rem + 0.75vw, 1.34375rem); /* 18 at 1440 */
        --text-nav:     clamp(0.875rem, 0.375rem + 0.625vw, 1.125rem); /* 15 at 1440 */
        --text-body:    clamp(0.875rem, 0.375rem + 0.625vw, 1.125rem); /* 15 at 1440 */
        --text-sm:      clamp(0.8125rem, 0.3375rem + 0.5625vw, 1rem); /* 13.5 at 1440 */
        --text-xs:      clamp(0.8125rem, 0.3rem + 0.5vw, 0.90625rem); /* 13 at 1440: the floor */
        --text-stat:    min(clamp(2.5rem, 2.1375rem + 1.215vw, 3.59375rem), max(2.8rem, 1.2rem + 2vw)); /* 48 at 1440 */
        --text-art-nr:  clamp(0.9625rem, 0.4125rem + 0.6875vw, 1.25rem); /* 16.5 at 1440 */
    }
}
