/* wide-screen.v1.0.0.css: the shared wide-screen tokens (S-450, WIDE_SCREEN_SPEC.md). One file for every Aurifex site; sites import it, never copy edits into their own CSS.
   A released version's file never changes: a new version gets a new name. Import it BEFORE the site's own stylesheet.
   Everything below 1440 CSS px is unchanged: --ws is exactly 1 there, so a site that converts its lengths to calc(N * var(--s)) renders identically on phones, tablets and laptops. */
:root {
  /* the viewport width as a plain number of px (unit stripped; works in Chrome 111+, Safari 15.4+, Firefox 108+) */
  --vwn: tan(atan2(100vw, 1px));
  /* the one scale factor: 1 up to 1440, then grows with the width: 1.15 at 1920, 1.35 at 2560, 1.55 at 3200, 1.6 (cap) from 3360 */
  --ws: clamp(1, calc(0.55 + var(--vwn) / 3200), 1.6);
  /* one scaled pixel: write every length that must grow as calc(N * var(--s)) (type, spacing, radius, container, gaps) */
  --s: calc(1px * var(--ws));
  /* 0 up to 1440, 1 from 1920: how far the wide-screen figure rule applies */
  --wide: clamp(0, calc((var(--vwn) - 1440) / 480), 1);
  /* containers: the site's own 1240 (or 1360) content width, grown; never wider than the window minus the gutters */
  --container: min(calc(var(--max, 1240) * var(--s)), calc(100vw - 2 * var(--gutter, 24px)));
  --container-wide: min(calc(1560 * var(--s)), calc(100vw - 2 * var(--gutter, 24px)));
  /* reading measure stays put: text never gets longer lines than this, whatever the window */
  --measure: 68ch;
  /* hero and illustration scenes: at least this share of the viewport width from 1920 up, never wider than --fig-cap */
  --fig-share: 60vw;
  --fig-cap: 2560px;
  --fig-w: max(var(--fig-base, 100%), min(var(--fig-cap), calc(var(--fig-share) * var(--wide))));
  /* type, from the 1440 sizes the sites use today (so no site changes below 1440) */
  --t-body: calc(16 * var(--s));
  --t-lede: calc(19 * var(--s));
  --t-small: calc(14 * var(--s));
  --t-h2: clamp(calc(30 * var(--s)), 3.6vw, calc(52 * var(--s)));
  --t-h1: clamp(calc(34 * var(--s)), 4.1vw, calc(62 * var(--s)));
  --t-hero: clamp(calc(36 * var(--s)), 5.3vw, calc(80 * var(--s)));
  /* spacing rhythm (section padding, gaps) */
  --space-section: clamp(calc(84 * var(--s)), 11vw, calc(150 * var(--s)));
  --space-gap: calc(24 * var(--s));
}
/* a site that can use the helper classes directly (Jekyll product sites): */
.ws-container { width: var(--container); margin-inline: auto; }
.ws-container--wide { width: var(--container-wide); margin-inline: auto; }
.ws-fig { width: var(--fig-w); margin-inline: auto; }
.ws-text { max-width: var(--measure); }
