/*
  Minimal modern reset + base typography for albinfo-v2.
  Mostly Andy Bell's modern reset, trimmed.
*/

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

* { margin: 0; }

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

body {
	min-height: 100vh;
	font-family: var(--ff-base);
	font-size: var(--fs-newstitle);
	line-height: var(--lh-newstitle);
	color: var(--c-fg);
	background: var(--c-bg);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

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

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

p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }

a {
	color: inherit;
	text-decoration: none;
}
a:focus-visible { text-decoration: underline; }

ul, ol { list-style: none; padding: 0; }

/* Container helper used by all page templates. */
.l-container {
	width: 100%;
	max-width: var(--container-width);
	margin-inline: auto;
	padding-inline: var(--space-4);
}
@media and (min-width: 1024px) and (max-width: 1320px) {
	.l-container { padding-inline: var(--container-gutter); }
}

/* Visually-hidden but screen-reader accessible. */
.u-sr-only {
	position: absolute;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0,0,0,0);
	white-space: nowrap;
	border: 0;
}

/* 3-up portrait row used on the home + magazine teaser. Collapses on mobile. */
.c-portrait-row {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--space-4);
}
@media (max-width: 768px) {
	.c-portrait-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
	.c-portrait-row { grid-template-columns: 1fr; }
}

/* Pagination (WP paginate_links output wrapped in .c-pagination). */
.c-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-2);
	margin-top: var(--space-8);
	justify-content: center;
}

.c-pagination a,
.c-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding-inline: var(--space-2);
	border-radius: var(--radius-sm);
	font-size: var(--fs-label-12);
	font-weight: var(--fw-semibold);
	line-height: 1;
	color: var(--c-fg);
	border: 1px solid var(--c-border);
	text-decoration: none;
	transition: background 150ms ease, border-color 150ms ease;
}

.c-pagination a:hover,
.c-pagination a:focus-visible {
	background: var(--c-bg-elev);
	border-color: var(--c-fg);
	text-decoration: none;
}

.c-pagination .current {
	background: var(--c-fg);
	color: var(--c-light);
	border-color: var(--c-fg);
}

.c-pagination .dots {
	border-color: transparent;
	background: transparent;
}

/* Content thumbnail zoom on hover (cards, heroes, media blocks). */
:where(
	[class*="__media"] img,
	[class*="__media"] [class*="__img"]:not([class*="--placeholder"])
) {
	transition: transform 250ms ease;
}

:where(
	[class*="__media"]:hover,
	[class*="__media"]:focus-visible,
	.c-card-vertical:hover,
	.c-card-vertical:focus-visible,
	.c-card-horizontal:hover,
	.c-card-horizontal:focus-visible,
	.c-biz-card:hover,
	.c-biz-card:focus-within,
	.c-reel:hover,
	.c-reel:focus-visible,
	.c-podcast:hover,
	.c-podcast:focus-visible,
	.c-feature-bleed:hover,
	.c-feature-bleed:focus-visible,
	.c-hero-half:hover,
	.c-hero-half:focus-visible,
	.c-hero-rotator__slide:hover,
	.c-hero-rotator__slide:focus-visible
) :where(
	[class*="__media"] img,
	[class*="__media"] [class*="__img"]:not([class*="--placeholder"])
) {
	transform: scale(1.05);
}

.c-single__content figure img {
	transition: transform 250ms ease;
}
.c-single__content figure:hover img,
.c-single__content figure:focus-within img {
	transform: scale(1.05);
}

@media (prefers-reduced-motion: reduce) {
	:where(
		[class*="__media"] img,
		[class*="__media"] [class*="__img"]:not([class*="--placeholder"]),
		.c-single__content figure img
	) {
		transition: none;
	}

	:where(
		[class*="__media"]:hover,
		[class*="__media"]:focus-visible,
		.c-card-vertical:hover,
		.c-card-vertical:focus-visible,
		.c-card-horizontal:hover,
		.c-card-horizontal:focus-visible,
		.c-biz-card:hover,
		.c-biz-card:focus-within,
		.c-reel:hover,
		.c-reel:focus-visible,
		.c-podcast:hover,
		.c-podcast:focus-visible,
		.c-feature-bleed:hover,
		.c-feature-bleed:focus-visible,
		.c-hero-half:hover,
		.c-hero-half:focus-visible,
		.c-hero-rotator__slide:hover,
		.c-hero-rotator__slide:focus-visible
	) :where(
		[class*="__media"] img,
		[class*="__media"] [class*="__img"]:not([class*="--placeholder"])
	),
	.c-single__content figure:hover img,
	.c-single__content figure:focus-within img {
		transform: none;
	}
}
