/**
 * Base layer: self-hosted fonts, reset, foundational typography.
 */

/* ---- Self-hosted variable fonts (no external request, GDPR-safe) ------- */
@font-face {
	font-family: 'Inter';
	font-style: normal;
	font-weight: 300 800;
	font-display: swap;
	src: url('../fonts/inter-normal-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
	font-family: 'Inter';
	font-style: normal;
	font-weight: 300 800;
	font-display: swap;
	src: url('../fonts/inter-normal-latin-ext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+1E00-1E9F, U+2020, U+2113;
}
@font-face {
	font-family: 'Fraunces';
	font-style: normal;
	font-weight: 300 700;
	font-display: swap;
	src: url('../fonts/fraunces-normal-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
	font-family: 'Fraunces';
	font-style: normal;
	font-weight: 300 700;
	font-display: swap;
	src: url('../fonts/fraunces-normal-latin-ext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+1E00-1E9F, U+2020, U+2113;
}
@font-face {
	font-family: 'Fraunces';
	font-style: italic;
	font-weight: 300 700;
	font-display: swap;
	src: url('../fonts/fraunces-italic-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
	font-family: 'Fraunces';
	font-style: italic;
	font-weight: 300 700;
	font-display: swap;
	src: url('../fonts/fraunces-italic-latin-ext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+1E00-1E9F, U+2020, U+2113;
}

/* ---- Reset ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

body {
	min-height: 100vh;
	font-family: var(--font-body);
	font-size: var(--text-base);
	line-height: var(--leading-relaxed);
	color: var(--color-text);
	background: var(--color-bg);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

img, picture, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
table { border-collapse: collapse; width: 100%; }

/* ---- Type scale --------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-display);
	font-weight: 500;
	line-height: var(--leading-tight);
	letter-spacing: var(--tracking-tight);
	color: var(--color-forest);
}
h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); font-weight: 600; }
h5 { font-size: var(--text-lg); font-weight: 600; }
h6 { font-size: var(--text-base); font-weight: 700; text-transform: uppercase; letter-spacing: var(--tracking-wide); }

p { max-width: 68ch; }
p + p { margin-top: var(--space-4); }

.aap-prose a, .entry-content a, .aap-content a {
	color: var(--color-link);
	text-underline-offset: 3px;
	text-decoration: underline;
	text-decoration-color: var(--color-turquoise);
	text-decoration-thickness: 1.5px;
	transition: color var(--transition-fast);
}
.aap-prose a:hover, .entry-content a:hover, .aap-content a:hover { color: var(--color-turquoise-dark); }

.aap-prose, .entry-content, .aap-content {
	font-size: var(--text-base);
	color: var(--color-text-soft);
}
.aap-prose > * + *, .entry-content > * + *, .aap-content > * + * { margin-top: var(--space-4); }
.aap-prose h2, .entry-content h2, .aap-content h2 { margin-top: var(--space-10); margin-bottom: var(--space-2); font-size: var(--text-2xl); }
.aap-prose h3, .entry-content h3, .aap-content h3 { margin-top: var(--space-8); margin-bottom: var(--space-2); font-size: var(--text-xl); }
.aap-prose ul, .entry-content ul { list-style: disc; padding-left: 1.25em; }
.aap-prose ol, .entry-content ol { list-style: decimal; padding-left: 1.25em; }
.aap-prose li + li, .entry-content li + li { margin-top: var(--space-2); }
.aap-prose blockquote, .entry-content blockquote {
	border-left: 3px solid var(--color-turquoise);
	padding-left: var(--space-5);
	font-family: var(--font-display);
	font-style: italic;
	font-size: var(--text-lg);
	color: var(--color-forest);
}
.aap-prose img, .entry-content img { border-radius: var(--radius-md); }
.aap-prose figcaption, .entry-content figcaption { font-size: var(--text-xs); color: var(--color-text-soft); margin-top: var(--space-2); }

/* ---- Focus / accessibility --------------------------------------------- */
:focus-visible {
	outline: 2px solid var(--color-turquoise);
	outline-offset: 3px;
}
::selection { background: var(--color-turquoise); color: var(--color-white); }

.aap-skip-link {
	position: absolute;
	left: var(--space-4);
	top: -100px;
	background: var(--color-forest);
	color: var(--color-white);
	padding: var(--space-3) var(--space-5);
	border-radius: var(--radius-md);
	z-index: var(--z-modal);
	transition: top var(--transition-fast);
}
.aap-skip-link:focus { top: var(--space-4); }

.aap-visually-hidden {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
