/* ==========================================================================
   Gel4Med design tokens — the single source of every locked value.
   Rules and reasoning: design-system/README.md. Visual reference: design-system/index.html.
   Pages use the JOB names (second block of each group), never raw values.
   Linked on every page, before styles.css. Older names in styles.css (--black, --ink,
   --fs-bl, --s-32 ...) point at these values. Names that exist in both files (--dark,
   --slate, --line, --paper, --white, --cyan, --gutter) must carry the SAME values.
   ========================================================================== */

:root {
  /* ---------- Colour: palette (12 core) ---------- */
  --dark: #0b0f10;       /* brand neutral: the dark ground. Pure black (#000) folds in */
  --graphite: #14181a;   /* raised dark panel; start of the graphite ground */
  --charcoal: #3a4247;   /* secondary text on light. 10.2:1 on white */
  --slate: #5d6c7b;      /* quiet text, labels, field lines on light. 5.4:1 on white */
  --line: #dddddd;       /* dividers on light (decoration only: 1.4:1) */
  --paper: #fafafa;      /* light grey ground */
  --white: #ffffff;      /* brand neutral: the light ground */
  --mist: #f2f5f6;       /* text on dark. 17.6:1 on dark */
  --cyan: #64d8ea;       /* primary. On dark only as text: 1.7:1 on white */
  --cyan-ink: #007a8e;   /* primary, deep step: cyan text and lines on light. 5.0:1 on white */
  --error: #c0392b;      /* functional: errors on light, always with icon + words. 5.4:1 on white */
  --error-on-dark: #ff8a8a; /* functional: the footer newsletter's errors. 8.5:1 on dark */

  /* Section grounds (reusable) */
  --ground-petrol: radial-gradient(120% 90% at 78% 40%, rgba(0, 184, 213, 0.18) 0%, transparent 62%),
                   linear-gradient(152deg, #052a37 0%, #06364f 52%, #053062 100%);
  --ground-graphite: linear-gradient(152deg, #14181a 0%, #1e2427 54%, #272f33 100%);
  --ground-cyan: linear-gradient(115.96deg, #64d8ea 0%, #6fdbe0 42%, #7fded0 100%);

  /* Page grounds: one section each, never reused (the three testimonials) */
  --ground-mint: linear-gradient(180deg, #e9f2f1 0%, #e4efee 100%);
  --ground-sky: linear-gradient(180deg, #eaf7f9 0%, #e2f2f5 100%);
  --ground-periwinkle: linear-gradient(180deg, #eef0f8 0%, #e7eaf5 100%);

  /* Overlays */
  --mist-66: rgba(242, 245, 246, 0.66);   /* quiet text on dark */
  --mist-80: rgba(242, 245, 246, 0.80);   /* labels on dark */
  --mist-88: rgba(242, 245, 246, 0.88);   /* strong secondary text on dark and photos */
  --white-10: rgba(255, 255, 255, 0.10);  /* faint rules on dark */
  --white-14: rgba(255, 255, 255, 0.14);  /* standard line on dark */
  --white-24: rgba(255, 255, 255, 0.24);  /* outlined-button edge on dark */
  --cyan-8: rgba(100, 216, 234, 0.08);    /* hover wash */
  --cyan-12: rgba(100, 216, 234, 0.12);   /* faint cyan */
  --cyan-30: rgba(100, 216, 234, 0.30);   /* soft cyan */
  --cyan-45: rgba(100, 216, 234, 0.45);   /* link underline on dark */
  --dark-80: rgba(17, 20, 23, 0.80);      /* eyebrow rule on light and cyan grounds */

  /* Colour: jobs */
  --surface-light: var(--white);
  --surface-grey: var(--paper);
  --surface-dark: var(--dark);
  --surface-raised-dark: var(--graphite);
  --text-on-light: var(--dark);
  --text-on-dark: var(--mist);
  --text-second-on-light: var(--charcoal);
  --text-quiet-on-light: var(--slate);
  --text-quiet-on-dark: var(--mist-66);
  --line-on-light: var(--line);
  --line-on-dark: var(--white-14);
  --caption-on-light: var(--slate);
  --caption-on-dark: var(--mist-66);
  --accent-on-dark: var(--cyan);
  --accent-on-light: var(--cyan-ink);

  /* ---------- Focus and fields ---------- */
  --focus-ring: 0 0 0 2px var(--dark), 0 0 0 4px var(--cyan);   /* links, buttons, menu items */
  --field-line: var(--slate);          /* resting: 1px */
  --field-line-active: var(--dark);    /* hover 1px, focus 2px. No glow */
  --field-fill: var(--white);
  --field-fill-disabled: var(--paper);
  --field-valid: var(--cyan-ink);      /* the tick */
  --field-placeholder: var(--slate);

  /* ---------- Type ---------- */
  --serif: "Newsreader", Georgia, serif;
  --sans: "Archivo", system-ui, sans-serif;

  /* desktop values; tablet and phone below. Round 1 feedback (Oct 2026): everything below the
     hero headline steps up; body by 1pt (17 to 18px). */
  --display-size: 64px;  --display-line: 72px;   /* the one big in-page statement */
  --h1-size: 76px;  --h1-line: 80px;              /* hero headline */
  --h2-size: 52px;  --h2-line: 60px;
  --h3-size: 40px;  --h3-line: 48px;
  --h4-size: 32px;  --h4-line: 40px;
  --h5-size: 26px;  --h5-line: 36px;
  --h6-size: 20px;  --h6-line: 28px;              /* H6 is the eyebrow */
  --lead-size: 22px;  --lead-line: 32px;
  --body-size: 19px;  --body-line: 30px;
  --small-size: 15px; --small-line: 22px;         /* also captions, labels, button words */
  --nav-size: 17px;   --nav-line: 28px;           /* top menu links: kept so the row fits */
  --nav-size-tight: 14px; --nav-line-tight: 20px; /* top menu between 1120 and 1279px wide */

  /* ---------- Space: 4px grid, 17 steps ---------- */
  --space-4: 4px;   --space-8: 8px;   --space-12: 12px;  --space-16: 16px;
  --space-20: 20px; --space-24: 24px; --space-32: 32px;  --space-40: 40px;
  --space-48: 48px; --space-56: 56px; --space-64: 64px;  --space-80: 80px;
  --space-96: 96px; --space-120: 120px; --space-144: 144px; --space-160: 160px; --space-200: 200px;

  /* Space: jobs (desktop; tablet and phone below) */
  --gutter: 32px;               /* page margin */
  --section-pad: 160px;         /* section top and bottom (was 200: less empty space, Round 1) */
  --section-pad-compact: 96px;  /* smaller bands */
  --content-gap: 96px;          /* between pieces of content in a section */
  --column-gap: 96px;
  --heading-gap: 24px;          /* heading to the copy under it */
  --eyebrow-gap: 32px;          /* eyebrow block to the heading under it */
  --target: 44px;               /* smallest tappable size */

  /* ---------- Layout widths ---------- */
  --w-full: 1600px;
  --w-content: 1440px;          /* container is this plus the gutter either side */
  --w-reading: 720px;
  --w-narrow: 560px;

  /* ---------- Corners ---------- */
  --r-pill: 999px;
  --r-circle: 50%;
  --r-small: 4px;               /* fields, tiny pieces */
  --r-photo: 0;                 /* photos and figures stay square */

  /* ---------- Motion ---------- */
  --t-quick: 200ms;     /* hover colour, underline */
  --t-short: 300ms;     /* small moves */
  --t-medium: 500ms;    /* panels, menus */
  --t-long: 700ms;      /* scroll reveals */
  --t-ambient: 1800ms;  /* slow loops */
  --ease-glide: cubic-bezier(0.16, 1, 0.3, 1);       /* arriving (the site's --ease-out) */
  --ease-sway: cubic-bezier(0.65, 0, 0.35, 1);       /* between two states */
  --ease-standard: cubic-bezier(0.22, 0.61, 0.36, 1);/* colour and fades (the site's --ease) */
  --ease-steady: linear;                             /* loops and progress only */
}

/* Tablet: 641–1024px */
@media (max-width: 1024px) {
  :root {
    --display-size: 48px;  --display-line: 56px;
    --h1-size: 56px;  --h1-line: 60px;
    --h2-size: 42px;  --h2-line: 48px;
    --h3-size: 34px;  --h3-line: 40px;
    --h4-size: 28px;  --h4-line: 36px;
    --h5-size: 22px;  --h5-line: 32px;
    --lead-size: 22px;  --lead-line: 32px;

    --section-pad: 96px;
    --section-pad-compact: 80px;
    --content-gap: 80px;
    --column-gap: 64px;
  }
}

/* Phone: up to 640px */
@media (max-width: 640px) {
  :root {
    --display-size: 36px;  --display-line: 44px;
    --h1-size: 40px;  --h1-line: 44px;
    --h2-size: 32px;  --h2-line: 40px;
    --h3-size: 28px;  --h3-line: 36px;
    --h4-size: 24px;  --h4-line: 32px;
    --h5-size: 20px;  --h5-line: 28px;
    --h6-size: 17px;  --h6-line: 24px;
    --lead-size: 20px;  --lead-line: 30px;

    --gutter: 24px;
    --section-pad: 64px;
    --section-pad-compact: 56px;
    --content-gap: 56px;
  }
}

/* Reduced motion: nothing slides, scales or loops; fades 150ms or less */
@media (prefers-reduced-motion: reduce) {
  :root {
    --t-short: 150ms; --t-medium: 150ms; --t-long: 150ms; --t-ambient: 0ms;
  }
}
