/* =========================================================================
   BASE — reset, typography, accessibility primitives.
   Tokens come from style.css (:root). a11y is baked in here from day one.
   ========================================================================= */

*, *::before, *::after { box-sizing: border-box; }
/* `clip` stops the off-canvas mobile menu (parked off-screen) from creating a
   horizontal scroll, without breaking position:sticky like overflow:hidden would. */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: var(--fs-base);
	line-height: var(--lh-base);
	color: var(--color-text);
	background: var(--color-bg);
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-head); line-height: var(--lh-head); margin: 0 0 var(--space-3); color: var(--color-brand-dark); }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p, ul, ol { margin: 0 0 var(--space-3); }
img { max-width: 100%; height: auto; display: block; }

a { color: var(--color-link); text-decoration: underline; text-underline-offset: 2px; transition: color var(--transition); }
a:hover { color: var(--color-link-hover); }

/* Visible focus for keyboard users — never remove without a replacement. */
:focus-visible {
	outline: 3px solid var(--color-focus);
	outline-offset: 2px;
	border-radius: 2px;
}

/* Skip link — first focusable element, hidden until focused. */
.skip-link {
	position: absolute;
	left: var(--space-3);
	top: -100px;
	z-index: 1000;
	background: var(--color-brand);
	color: #fff;
	padding: var(--space-2) var(--space-3);
	border-radius: var(--radius);
	text-decoration: none;
	transition: top var(--transition);
}
.skip-link:focus { top: var(--space-3); color: #fff; }
/* main is focusable (tabindex=-1) only so the skip link can move focus into it;
   don't draw an outline around the whole content region when it receives focus. */
.site-main:focus { outline: none; }

/* Screen-reader-only text. */
.sr-only {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0,0,0,0);
	white-space: nowrap; border: 0;
}

:target { scroll-margin-top: 6rem; }

/* Scroll-reveal: elements gently rise + fade in as they enter the viewport.
   Only active when JS is on (has-js), so content is never stuck hidden. */
.has-js .reveal-up { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.has-js .reveal-up.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
	.has-js .reveal-up { opacity: 1; transform: none; transition: none; }
}

table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--color-border); }
th { background: var(--color-bg-alt); }

/* ---- Print: clean, ink-friendly pages (hide chrome, black text on white) ---- */
@media print {
	.utility-bar, .site-header, .nav-primary, .header-search, .site-footer,
	.skip-link, .btn, .btn--donate, .events__calendar, .events__donate,
	.search-form, form[role="search"], .vh__form, .tspot__arrow, .tspot__dots,
	.back-to-top, .hero-emblem { display: none !important; }

	html, body { background: #fff !important; color: #000 !important; font-size: 12pt; }
	a { color: #000 !important; text-decoration: underline; }

	.container, .container--narrow { max-width: 100% !important; width: auto !important; margin: 0 !important; padding: 0 1cm !important; }
	.section, .page-hero { padding: .4cm 0 !important; background: none !important; }
	.page-hero, .section--hero, .section--alt, .section--brand { background: none !important; }
	.page-title, .section__heading, .hero__heading, h1, h2, h3, h4 { color: #000 !important; }
	.hero__subheading, .section__intro { color: #222 !important; }
	.page-hero::before, .section--hero::before { display: none !important; }

	/* don't keep things hidden behind scroll-reveal when printing */
	.reveal-up, .reveal, .reveal-up.is-in { opacity: 1 !important; transform: none !important; }

	/* spell out external links so a printout is still useful */
	a[href^="http"]:after { content: " (" attr(href) ")"; font-size: 9pt; color: #444; word-break: break-all; }

	/* keep blocks from splitting awkwardly across pages */
	.card, .staff-card, .event, .bell-card, .ln-rf__card, tr, figure, .accordion__item { page-break-inside: avoid; }
	.accordion__panel { display: block !important; height: auto !important; } /* open accordions when printed */
}
