/*
 * Base / reset and element defaults.
 */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--font-base);
	font-weight: var(--fw-regular);
	font-size: var(--fs-body);
	line-height: var(--lh-base);
	color: var(--color-text);
	background: var(--color-bg);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

img,
picture,
svg,
video {
	max-width: 100%;
	height: auto;
	display: block;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 0.5em;
	font-weight: var(--fw-bold);
	line-height: var(--lh-heading);
	color: var(--color-heading);
	letter-spacing: -0.01em;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }
h5 { font-size: 1.1rem; }

p {
	margin: 0 0 1rem;
}
p:last-child { margin-bottom: 0; }

a {
	color: var(--color-link);
	text-decoration: none;
	transition: color var(--transition);
}

a:hover {
	color: var(--color-link-hover);
}

ul, ol {
	margin: 0 0 1rem;
	padding-left: 1.5rem;
}

strong, b { font-weight: var(--fw-bold); }

hr {
	border: 0;
	border-top: 1px solid var(--color-border);
	margin: 2rem 0;
}

table {
	border-collapse: collapse;
	width: 100%;
}

button, input, select, textarea {
	font: inherit;
	color: inherit;
}

:focus-visible {
	outline: 3px solid rgba(14, 165, 233, 0.5);
	outline-offset: 2px;
}

/* Accessibility helpers */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	word-wrap: normal !important;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 1000;
	background: var(--pos-dark);
	color: #fff;
	padding: 0.75rem 1.25rem;
	border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus {
	left: 0;
	color: #fff;
}

/* Reduced motion: kill decorative animation everywhere. */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}
}
