/**
 * Site-wide chrome: the header, the footer, and the shared button.
 *
 * Loaded on every page. The homepage sections load home.css on top; the two
 * share the same tokens, defined here so the header and footer stand on their
 * own even on pages that never load home.css.
 */

:root {
	--aim-ink: #14181d;
	--aim-ink-soft: #3d454f;
	--aim-muted: #6b7480;
	--aim-line: #e4e7ec;
	--aim-sand: #f4f6fa;
	--aim-paper: #ffffff;

	/* Blue accent — the site's one colour, over white and near-black. */
	--aim-accent: #2563eb;
	--aim-accent-dark: #1d4ed8;

	--aim-max: 1180px;
	--aim-pad: clamp(1rem, 4vw, 2.5rem);
	--aim-radius: 6px;
	--aim-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
	--aim-header-h: 4.5rem;
}

/* ---------------------------------------------------------------- buttons */

.aim-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.85rem 1.7rem;
	border-radius: var(--aim-radius);
	font-weight: 600;
	font-size: 1rem;
	line-height: 1.2;
	text-decoration: none;
	border: 1.5px solid transparent;
	cursor: pointer;
	transition: background-color 0.18s var(--aim-ease),
		border-color 0.18s var(--aim-ease), color 0.18s var(--aim-ease),
		transform 0.18s var(--aim-ease), box-shadow 0.18s var(--aim-ease);
}

.aim-btn--primary {
	background: var(--aim-accent);
	color: #fff;
	box-shadow: 0 1px 2px rgb(20 24 29 / 0.12);
}

.aim-btn--primary:hover,
.aim-btn--primary:focus-visible {
	background: var(--aim-accent-dark);
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgb(37 99 235 / 0.28);
}

.aim-btn--secondary {
	background: transparent;
	color: var(--aim-ink);
	border-color: rgb(20 24 29 / 0.24);
}

.aim-btn--secondary:hover,
.aim-btn--secondary:focus-visible {
	border-color: var(--aim-ink);
	background: var(--aim-ink);
	color: #fff;
}

.aim-btn--lg {
	padding: 1.05rem 2.3rem;
	font-size: 1.06rem;
}

/* ----------------------------------------------------------------- header */

.aim-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgb(255 255 255 / 0.92);
	backdrop-filter: saturate(180%) blur(8px);
	border-bottom: 1px solid var(--aim-line);
	transition: box-shadow 0.2s var(--aim-ease), background-color 0.2s var(--aim-ease);
}

.aim-header.is-scrolled {
	box-shadow: 0 6px 24px rgb(20 24 29 / 0.08);
}

.aim-header__inner {
	width: min(100% - 2 * var(--aim-pad), var(--aim-max));
	margin-inline: auto;
	min-height: var(--aim-header-h);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
}

.aim-header__brand {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
}

/* brand lockup — logo mark + wordmark, shared by header and footer */
.aim-brand {
	display: inline-flex;
	align-items: center;
	gap: 0.7rem;
	text-decoration: none;
	color: inherit;
}

.aim-brand__mark {
	display: block;
	height: 2.9rem;
	width: auto;
	border-radius: 6px;
}

.aim-brand__text {
	display: flex;
	flex-direction: column;
	line-height: 1.05;
}

.aim-brand__name {
	font-weight: 800;
	font-size: 1.35rem;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--aim-ink);
}

.aim-brand__tag {
	max-width: 16ch;
	font-size: 0.78rem;
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--aim-ink-soft);
}

.aim-brand--footer .aim-brand__mark {
	height: 3.4rem;
}

/* The tagline is long; drop it on narrow headers to keep the bar tidy. */
@media (max-width: 34rem) {
	.aim-brand--header .aim-brand__tag {
		display: none;
	}
}

.aim-btn__heart {
	flex: 0 0 auto;
}

.aim-header__nav {
	display: flex;
	align-items: center;
	gap: clamp(1rem, 2.5vw, 2rem);
}

.aim-menu {
	display: flex;
	align-items: center;
	gap: clamp(0.75rem, 2vw, 1.75rem);
	list-style: none;
	margin: 0;
	padding: 0;
}

.aim-menu a {
	display: inline-block;
	padding: 0.4rem 0;
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--aim-ink-soft);
	text-decoration: none;
	position: relative;
	transition: color 0.16s var(--aim-ease);
}

.aim-menu a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -2px;
	width: 100%;
	height: 2px;
	background: var(--aim-accent);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.2s var(--aim-ease);
}

.aim-menu a:hover,
.aim-menu a:focus-visible,
.aim-menu .current-menu-item > a {
	color: var(--aim-ink);
}

.aim-menu a:hover::after,
.aim-menu a:focus-visible::after,
.aim-menu .current-menu-item > a::after {
	transform: scaleX(1);
}

.aim-header__donate {
	flex: 0 0 auto;
	padding: 0.6rem 1.35rem;
	font-size: 0.95rem;
}

/* hamburger — hidden until the menu collapses */
.aim-header__toggle {
	display: none;
	width: 2.75rem;
	height: 2.75rem;
	border: 1px solid var(--aim-line);
	border-radius: var(--aim-radius);
	background: #fff;
	cursor: pointer;
	position: relative;
}

.aim-header__bars,
.aim-header__bars::before,
.aim-header__bars::after {
	content: "";
	position: absolute;
	left: 50%;
	width: 1.15rem;
	height: 2px;
	background: var(--aim-ink);
	transform: translateX(-50%);
	transition: transform 0.2s var(--aim-ease), opacity 0.2s var(--aim-ease);
}

.aim-header__bars { top: 50%; margin-top: -1px; }
.aim-header__bars::before { top: -6px; }
.aim-header__bars::after { top: 6px; }

.aim-header__toggle[aria-expanded="true"] .aim-header__bars { background: transparent; }
.aim-header__toggle[aria-expanded="true"] .aim-header__bars::before { transform: translateX(-50%) translateY(6px) rotate(45deg); }
.aim-header__toggle[aria-expanded="true"] .aim-header__bars::after { transform: translateX(-50%) translateY(-6px) rotate(-45deg); }

@media (max-width: 60rem) {
	.aim-header__toggle {
		display: block;
		order: 3;
	}

	.aim-header__nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		background: #fff;
		border-bottom: 1px solid var(--aim-line);
		box-shadow: 0 12px 24px rgb(20 24 29 / 0.1);
		padding: 0.5rem var(--aim-pad) 1.25rem;
		clip-path: inset(0 0 100% 0);
		opacity: 0;
		pointer-events: none;
		transition: clip-path 0.25s var(--aim-ease), opacity 0.2s var(--aim-ease);
	}

	.aim-header__nav.is-open {
		clip-path: inset(0 0 0 0);
		opacity: 1;
		pointer-events: auto;
	}

	.aim-menu {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.aim-menu li {
		border-bottom: 1px solid var(--aim-line);
	}

	.aim-menu a {
		display: block;
		padding: 0.9rem 0;
		font-size: 1.05rem;
	}

	.aim-menu a::after { display: none; }

	.aim-header__donate {
		margin-top: 1rem;
		width: 100%;
		padding: 0.9rem 1.35rem;
		font-size: 1rem;
	}
}

/* ----------------------------------------------------------------- footer */

.aim-footer {
	background: var(--aim-ink);
	color: #c8ccd2;
	font-size: 0.95rem;
	line-height: 1.6;
	border-top: 3px solid var(--aim-accent);
}

.aim-footer__inner {
	width: min(100% - 2 * var(--aim-pad), var(--aim-max));
	margin-inline: auto;
	padding-block: clamp(3rem, 6vw, 4.5rem);
	display: grid;
	gap: clamp(2rem, 5vw, 3.5rem);
	grid-template-columns: 1fr;
}

@media (min-width: 48rem) {
	.aim-footer__inner {
		grid-template-columns: 1.6fr 1fr 1fr 1.1fr;
	}
}

.aim-brand--footer .aim-brand__name {
	color: #fff;
	font-size: 1.5rem;
}

.aim-brand--footer .aim-brand__tag {
	color: #8f96a0;
}

.aim-footer__blurb {
	margin: 1rem 0 0;
	max-width: 40ch;
	color: #aab0b8;
}

.aim-footer__social {
	display: flex;
	gap: 0.6rem;
	list-style: none;
	margin: 1.5rem 0 0;
	padding: 0;
}

.aim-footer__social a {
	display: grid;
	place-items: center;
	width: 2.4rem;
	height: 2.4rem;
	border-radius: 50%;
	border: 1px solid rgb(255 255 255 / 0.18);
	color: #c8ccd2;
	transition: background-color 0.18s var(--aim-ease), color 0.18s var(--aim-ease),
		border-color 0.18s var(--aim-ease), transform 0.18s var(--aim-ease);
}

.aim-footer__social a:hover,
.aim-footer__social a:focus-visible {
	background: var(--aim-accent);
	border-color: var(--aim-accent);
	color: #fff;
	transform: translateY(-2px);
}

.aim-footer__heading {
	margin: 0 0 1.15rem;
	padding-bottom: 0.6rem;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #fff;
	position: relative;
}

.aim-footer__heading::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 1.75rem;
	height: 2px;
	background: var(--aim-accent);
}

.aim-footer__links,
.aim-footer__contact {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.aim-footer__links a,
.aim-footer__contact a {
	color: #c8ccd2;
	text-decoration: none;
	transition: color 0.16s var(--aim-ease);
}

.aim-footer__links a:hover,
.aim-footer__contact a:hover,
.aim-footer__links a:focus-visible,
.aim-footer__contact a:focus-visible {
	color: var(--aim-accent);
}

.aim-footer__cta .aim-btn {
	width: 100%;
}

.aim-footer__bar {
	border-top: 1px solid rgb(255 255 255 / 0.1);
}

.aim-footer__bar {
	width: min(100% - 2 * var(--aim-pad), var(--aim-max));
	margin-inline: auto;
	padding-block: 1.4rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	justify-content: space-between;
	align-items: center;
}

.aim-footer__copy,
.aim-footer__credit {
	margin: 0;
	font-size: 0.8rem;
	color: #868c94;
}

@media (prefers-reduced-motion: reduce) {
	.aim-header *,
	.aim-footer * {
		transition-duration: 0.01ms !important;
	}
}
