/*
 * Base layer: reset, typography, layout primitives, accessibility helpers.
 * Components live in components/*.css and pages in pages/*.css (later phases).
 */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	/* Long Dutch words must never cause horizontal scroll. */
	overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

/* Anchor targets clear the sticky header. */
[id] {
	scroll-margin-top: var(--rbnl-header-offset);
}

body {
	margin: 0;
	background: var(--rbnl-cream);
	color: var(--rbnl-text);
	font-family: var(--rbnl-font-body);
	font-size: var(--rbnl-fs-body);
	font-weight: 400;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Headings */
h1,
h2,
h3,
h4 {
	margin: 0;
	color: var(--rbnl-ink);
	font-family: var(--rbnl-font-heading);
	font-weight: 600;
	hyphens: auto;
	-webkit-hyphens: auto;
	/* Only break really long words (Paardensportcentrum), never ordinary ones. */
	hyphenate-limit-chars: 13 5 5;
}

h1 {
	font-size: var(--rbnl-fs-h1);
	line-height: 0.98;
	letter-spacing: -0.035em;
}

h2 {
	font-size: var(--rbnl-fs-h2);
	line-height: 1.14;
	letter-spacing: -0.025em;
	text-wrap: balance;
}

h3 {
	font-size: var(--rbnl-fs-h3);
	line-height: 1.18;
	letter-spacing: -0.01em;
}

h4 {
	font-size: var(--rbnl-fs-h3-sm);
	line-height: 1.2;
	letter-spacing: -0.01em;
}

p {
	margin: 0 0 1em;
}

.eyebrow {
	margin: 0;
	color: var(--rbnl-orange-text);
	font-family: var(--rbnl-font-heading);
	font-size: var(--rbnl-fs-eyebrow);
	font-weight: 700; /* 20px bold counts as large text: 3:1 is enough */
	line-height: 1.2;
	letter-spacing: -0.005em;
}

/* Marked part of a line (editors write *like this*). */
.mark {
	color: var(--rbnl-orange-dark);
}

.lead {
	font-size: var(--rbnl-fs-lead);
	line-height: 1.6;
}

.small {
	font-size: var(--rbnl-fs-small);
	line-height: 1.5;
}

a {
	color: var(--rbnl-ink);
}

a:hover {
	color: var(--rbnl-orange-dark);
}

img,
svg,
video {
	max-width: 100%;
}

img,
video {
	display: block;
	height: auto;
}

/* Layout primitives */
.container {
	width: 100%;
	max-width: calc(var(--rbnl-content-max) + 2 * var(--rbnl-gutter));
	margin-inline: auto;
	padding-inline: var(--rbnl-gutter);
}

.container--narrow {
	max-width: calc(760px + 2 * var(--rbnl-gutter));
}

.section {
	margin-block: var(--rbnl-section-gap);
}

/* Focus: always visible, never colour-only. */
:focus-visible {
	outline: 3px solid var(--rbnl-ink);
	outline-offset: 3px;
	border-radius: 4px;
}

/* Visually hidden, still read by screen readers (WordPress core class name). */
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 1000;
	padding: 12px 20px;
	border-radius: var(--rbnl-radius-pill);
	background: var(--rbnl-ink);
	color: var(--rbnl-white);
	text-decoration: none;
	transform: translateY(-200%);
}

.skip-link:focus {
	transform: none;
}

/* Reduced motion: no animation or smooth scrolling, state changes are instant. */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		animation-delay: 0s !important;
		transition-duration: 0.01ms !important;
		transition-delay: 0s !important;
		scroll-behavior: auto !important;
	}
}

.text-orange {
	color: var(--rbnl-orange-text);
}
