/*
 * Base: reset, typography and layout helpers. Uses tokens only, so it rarely changes.
 * Section styles go in each project's own CSS.
 */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

/* Gentle root: 15px @390, ~16px @1440, ~17px @2560 (round 2). Front end only. */
html { font-size: clamp(15px, calc(13px + 0.2vw), 17px); -webkit-text-size-adjust: none; text-size-adjust: none; overflow-x: clip; } /* with body: no sideways page scroll (Chrome takes the viewport's value from html) */

body {
	background: var(--c-light);
	color: var(--c-dark);
	font-family: var(--font-body);
	font-size: 1rem;
	line-height: 1.5;
	font-weight: 400;
	-webkit-font-smoothing: antialiased;
	padding-top: var(--header-h); /* the header is position: fixed (global/20-header.css) */
	overflow-x: clip; /* safety net: a decoration a few px past the edge (sparks, underlines, tilted cards) never makes the page scroll sideways; clip keeps sticky working */
}

img, picture, video, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; }

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 400; text-transform: uppercase; line-height: var(--leading-tight); text-wrap: wrap; }
h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }
p { text-wrap: pretty; }

/*
 * Links: colour is inherited; hover/active colours are set per component (nav, breadcrumb, footer…). Links inside
 * running text keep a thin static underline, so they are not marked by colour alone (WCAG 1.4.1).
 */
a { color: inherit; text-decoration: none; transition: color 0.3s; }
:where(.rich-text, .content) a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
:focus-visible { outline: 2px solid var(--c-dark); outline-offset: 2px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip-link { position: absolute; left: var(--pad-x); top: -100%; z-index: 1100; padding: 0.5rem 1rem; background: var(--c-white); }
.skip-link:focus { top: var(--space-xs); }

/* Plain content column (page.php): the viewport minus the side padding */
.content { width: min(100% - 2 * var(--pad-x), var(--box-max)); margin-inline: auto; }
.content > * + * { margin-top: var(--space-s); }

.section { padding-block: var(--space-xl); }

/* Reduced motion (client 17/11, the middle way): fades, hovers, sliders and the photo band stay; big movement is switched off
   where it is made (the GSAP scenes in the page scripts, a few CSS animations). Only smooth page scrolling goes here. */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { scroll-behavior: auto !important; }
}
