/*
 * Brightway Consultancy — base.css
 * Modern CSS reset (Josh Comeau-style, adapted) + root surfaces.
 * Depends on tokens.css. MASTER.md §base / §3 / §8.
 */

/* 1. Box sizing */
*,
*::before,
*::after {
	box-sizing: border-box;
}

/* 2. Reset margins */
* {
	margin: 0;
}

/* 3. Root element */
html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	tab-size: 4;
}

/* Smooth scroll only when the user has no reduced-motion preference */
@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

/* 4. Body — Desert Precision base surface */
body {
	min-block-size: 100dvh; /* NOT 100vh — iOS Safari */
	background-color: var(--bwc-bg);
	color: var(--bwc-text);
	font-family: var(--bwc-font-body);
	font-size: var(--bwc-fs-base);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	font-synthesis: none;
	isolation: isolate; /* root stacking context */
}

/* 5. Media defaults */
img,
picture,
video,
canvas,
svg {
	display: block;
	max-inline-size: 100%;
	block-size: auto;
}

/* 6. Form elements inherit typography */
input,
button,
textarea,
select {
	font: inherit;
	color: inherit;
}

button {
	cursor: pointer;
	background: none;
	border: 0;
}

/* 7. Long words don't overflow */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
	overflow-wrap: break-word;
}

/* 8. Links inherit colour by default (styled in typography/components) */
a {
	color: inherit;
	text-decoration: none;
}

/* 9. Lists used as semantic lists keep their role; presentational ones reset */
ul[role='list'],
ol[role='list'] {
	list-style: none;
	padding: 0;
}

/* 10. Reduced-motion: gentle global guard.
 * (The full prefers-reduced-motion override lives in utilities.css, Phase 5
 * complete. This keeps scroll/anim safe in the partial build.) */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}
