/* ==========================================================================
   Archives Design
   ========================================================================== */

:root {
	--ink: #1a1a1a;
	--ink-soft: #555b66;
	--ink-faint: #9aa0aa;
	--paper: #ffffff;
	--wash: #eef2f8;          /* filter section background */
	--tab: #dfe4f0;           /* closed tab */
	--chip: #eef1f7;          /* option chip */
	--chip-hover: #e2e8f2;
	--accent: #0975b3;        /* selected chip / slider */
	--tile: #282c3d;          /* collection tile */
	--rule: #e6e8ec;

	--nav-red: #ed1c24;
	--nav-red-pale: #f6c3c5;
	--nav-blue: #0975b3;
	--nav-blue-pale: #b8ddf0;
	--nav-yellow: #ffd105;
	--nav-yellow-pale: #fbf0b2;

	--radius: 4px;
	--gutter: 48px;
	--grid-gap: 38px;

	/* Multiplies every font size on the site. 1.05 on desktop (see below). */
	--type-scale: 1;

	--font: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

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

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font);
	font-size: calc(16px * var(--type-scale));
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.container {
	width: 100%;
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 var(--gutter);
}

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

.skip-link {
	position: absolute;
	left: 16px; top: -100px;
	padding: 8px 12px;
	background: var(--ink);
	color: #fff;
	z-index: 10;
}
.skip-link:focus { top: 16px; }

/* Announcement bar --------------------------------------------------------- */

.announcement {
	background: var(--nav-blue);
	color: #fff;
}
.announcement__text {
	display: block;
	margin: 0;
	padding: 11px 0 10px;
	font-size: 8.5pt; /* exact size: not affected by the desktop type scale */
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0.1em;
	text-align: center;
	text-transform: uppercase;
	text-decoration: none;
}
a.announcement__text:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Header ------------------------------------------------------------------ */

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 98px;
	gap: 24px;
}

.logo {
	display: flex;
	flex: none;
	align-items: center;
	gap: 8px;
	text-decoration: none;
}

.site-nav {
	display: flex;
	gap: 25px;
	align-self: center;
	margin-top: 8px;
}

.site-nav__link {
	display: block;
	padding: 0 8px 12px;
	line-height: 1.2;
	font-size: calc(16px * var(--type-scale));
	text-decoration: none;
	border-bottom: 4px solid var(--line, transparent);
	transition: border-color .15s;
}
.site-nav__link--red    { --line: var(--nav-red-pale);    --line-on: var(--nav-red); }
.site-nav__link--blue   { --line: var(--nav-blue-pale);   --line-on: var(--nav-blue); }
.site-nav__link--yellow { --line: var(--nav-yellow-pale); --line-on: var(--nav-yellow); }
.site-nav__link:hover,
.site-nav__link[aria-current="page"] { border-bottom-color: var(--line-on); }

/* Filters ----------------------------------------------------------------- */

.filters {
	background: var(--wash);
	padding: 32px 0 40px;
}

.search {
	position: relative;
	margin: 0;
}

.search__input {
	width: 100%;
	height: 78px;
	padding: 0 72px 0 32px;
	border: 0;
	border-radius: var(--radius);
	background: var(--paper);
	font: inherit;
	font-size: calc(19px * var(--type-scale));
	letter-spacing: 0.01em;
	color: var(--ink);
	-webkit-appearance: none;
	appearance: none;
}
.search__input::placeholder { color: #a3a6ad; }
.search__input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.search__input:focus { outline: 2px solid var(--accent); outline-offset: -2px; }

.search__icon {
	position: absolute;
	right: 32px;
	top: 50%;
	transform: translateY(-50%);
	color: #a3a6ad;
	pointer-events: none;
}

.filter-tabs { margin-top: 13px; }

.filter-tabs__list {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 18px;
}

.filter-tab {
	display: flex;
	align-items: center;
	gap: 8px;
	height: 55px;
	padding: 0 25px;
	border: 0;
	border-radius: var(--radius) var(--radius) 0 0;
	background: var(--tab);
	font-size: calc(16px * var(--type-scale));
	letter-spacing: 0.01em;
	text-align: left;
	transition: background-color .15s;
}
.filter-tab > span:first-child { flex: 1; }
.filter-tab:hover { background: #d5dcea; }
.filter-tab[aria-expanded="true"] { background: var(--paper); }


/* + / – icon */
.filter-tab__icon {
	position: relative;
	width: 10px;
	height: 10px;
	flex: none;
}
.filter-tab__icon::before,
.filter-tab__icon::after {
	content: "";
	position: absolute;
	left: 0; top: 50%;
	width: 10px; height: 1.4px;
	margin-top: -0.7px;
	background: currentColor;
	transition: transform .2s;
}
.filter-tab__icon::after { transform: rotate(90deg); }
.filter-tab[aria-expanded="true"] .filter-tab__icon::after { transform: rotate(0deg); }

.filter-panels {
	background: var(--paper);
	min-height: 10px;
	border-radius: 0 0 var(--radius) var(--radius);
}

.filter-panel {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 8px;
}
.filter-panel[hidden] { display: none; }

.chip {
	height: 42px;
	padding: 0 25px;
	border: 0;
	border-radius: var(--radius);
	background: var(--chip);
	font-size: calc(15px * var(--type-scale));
	letter-spacing: 0.01em;
	transition: background-color .12s, color .12s;
}
.chip:hover { background: var(--chip-hover); }
.chip[aria-pressed="true"] { background: var(--accent); color: #fff; }

.filter-panel--swatches {
	display: grid;
	grid-template-columns: repeat(10, 1fr);
}

.swatch {
	position: relative;
	height: 42px;
	border: 0;
	border-radius: var(--radius);
	background: var(--swatch);
	transition: transform .12s;
}
.swatch:hover { transform: translateY(-2px); }
.swatch[aria-pressed="true"] {
	box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--accent);
}
.swatch[aria-pressed="true"]::after {
	content: "";
	position: absolute;
	left: 50%; top: 50%;
	width: 12px; height: 7px;
	border-left: 2px solid var(--swatch-ink);
	border-bottom: 2px solid var(--swatch-ink);
	transform: translate(-50%, -70%) rotate(-45deg);
}

/* Year range */

.filter-panel--range { padding: 18px 20px 22px; }

.range {
	display: flex;
	align-items: center;
	gap: 28px;
	width: 100%;
}

.range__number {
	width: 4.2ch;
	padding: 0 0 1px;
	border: 0;
	border-bottom: 1.5px dotted var(--ink);
	background: none;
	font: inherit;
	font-size: calc(13px * var(--type-scale));
	font-weight: 500;
	text-align: center;
	-moz-appearance: textfield;
	appearance: textfield;
}
.range__number::-webkit-inner-spin-button,
.range__number::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.range__track {
	position: relative;
	flex: 1;
	height: 30px;
	--from: 0%;
	--to: 100%;
}
.range__track::before,
.range__fill {
	content: "";
	position: absolute;
	top: 50%;
	height: 8px;
	margin-top: -4px;
	border-radius: 4px;
}
.range__track::before { left: 0; right: 0; background: var(--tab); }
.range__fill {
	left: var(--from);
	right: calc(100% - var(--to));
	background: var(--accent);
	border-radius: 0;
}

.range__input {
	position: absolute;
	inset: 0;
	width: 100%;
	margin: 0;
	background: none;
	pointer-events: none;
	-webkit-appearance: none;
	appearance: none;
}
.range__input:focus { outline: none; }
.range__input::-webkit-slider-runnable-track { background: none; height: 30px; }
.range__input::-moz-range-track { background: none; }
.range__input::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 26px; height: 26px;
	margin-top: 2px;
	border-radius: 50%;
	background: #fff;
	border: 1px solid #d9dde6;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
	pointer-events: auto;
	cursor: grab;
}
.range__input::-moz-range-thumb {
	width: 26px; height: 26px;
	border-radius: 50%;
	background: #fff;
	border: 1px solid #d9dde6;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
	pointer-events: auto;
	cursor: grab;
}
.range__input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--accent); }
.range__input:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px var(--accent); }

/* Active filter tags */

.active-filters {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	min-height: 34px;
	margin-top: 21px;
}

/* No filters or search active: drop the empty tag row so the band
   ends just below the filter tabs (the Reset button is hidden exactly then) */
.active-filters:has(.tag--reset[hidden]) { display: none; }
.filters:has(.tag--reset[hidden]) { padding-bottom: 32px; }

.active-filters__list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.tag {
	display: inline-flex;
	align-items: center;
	gap: 16px;
	height: 34px;
	padding: 0 18px;
	border: 0;
	border-radius: 3px;
	background: var(--paper);
	font-size: calc(13px * var(--type-scale));
	letter-spacing: 0.02em;
	white-space: nowrap;
	transition: background-color .12s;
}
.tag:hover { background: #f8f9fb; }
.tag__x { font-size: calc(12px * var(--type-scale)); }
.tag__dot {
	width: 9px; height: 9px;
	margin-right: -6px;
	border-radius: 50%;
	background: var(--dot);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
}
.tag--reset { flex: none; }
.tag[hidden] { display: none; }

/* Collection grid --------------------------------------------------------- */

.collection { padding-top: 48px; }

.grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: var(--grid-gap);
}

.card[hidden] { display: none; }

.card__link {
	position: relative;
	display: block;
	aspect-ratio: 412 / 416;
	overflow: hidden;
	background: var(--tile);
	text-decoration: none;
}

/* Full-bleed thumbnail (background + cover in one image, 412 × 416) */
.thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.card__link { container-type: inline-size; }

/* Hover overlay: frosted panel with title (top) and year (bottom) */
.card__caption {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 8px;
	padding: 9cqw 9cqw 8cqw;
	background: rgba(242, 244, 248, .9);
	-webkit-backdrop-filter: blur(18px) saturate(.85);
	backdrop-filter: blur(18px) saturate(.85);
	color: var(--ink);
	opacity: 0;
	transition: opacity .25s ease;
}
.card__link:hover .card__caption,
.card__link:focus-visible .card__caption { opacity: 1; }

.card__title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 5;
	overflow: hidden;
	font-size: calc(7cqw * var(--type-scale));
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: 0.01em;
}
.card__year {
	font-size: calc(6cqw * var(--type-scale));
	line-height: 1;
	letter-spacing: 0.01em;
}

/* Touch screens have no hover: keep the overlay off there */
/* Touch screens have no hover: hide the overlay visually, but keep the
   title in the page so screen readers can still name each tile */
@media (hover: none) {
	.card__caption {
		clip-path: inset(50%);
		opacity: 0;
	}
}

/* Infinite scroll trigger */
.load-more {
	display: flex;
	justify-content: center;
	padding-top: 48px;
}
.load-more[hidden] { display: none; }
.load-more__button { background: var(--wash); }
.load-more__button:hover { background: var(--tab); }

.empty {
	padding: 48px 0 24px;
	color: var(--ink-soft);
	text-align: center;
}
.empty[hidden] { display: none; }
.empty__title { margin: 0 0 4px; color: var(--ink); font-size: calc(18px * var(--type-scale)); }

.link-button {
	padding: 0;
	border: 0;
	background: none;
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Item page --------------------------------------------------------------- */

.item__hero {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 64px;
	padding-top: 48px;
	padding-bottom: 40px;
}

.item__image {
	flex: none;
	width: 387px;
	margin: 0 0 0 -9px; /* the image's built-in shadow sits on the right */
}
.item__image img { width: 100%; }

.item__intro {
	flex: 0 1 410px;
}

.item__title {
	margin: 0 0 18px;
	font-size: calc(22px * var(--type-scale));
	font-weight: 500;
	line-height: 1.25;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.item__credits {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 48px;
	margin: 4px 0 26px;
}
.item__credits dt {
	margin-bottom: 4px;
	font-size: calc(13px * var(--type-scale));
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}
.item__credits dd {
	margin: 0;
	font-size: calc(14px * var(--type-scale));
	letter-spacing: 0.02em;
}
.item__credits a { text-decoration: none; }
.item__credits a:hover { text-decoration: underline; text-underline-offset: 3px; }

.item__text {
	font-size: calc(16px * var(--type-scale));
	line-height: 1.58;
	letter-spacing: 0.01em;
}
.item__text p { margin: 0 0 1em; }

.item__button {
	display: inline-flex;
	align-items: center;
	height: 40px;
	margin-top: 4px;
	padding: 0 22px;
	border-radius: var(--radius);
	background: var(--wash);
	font-size: calc(14px * var(--type-scale));
	letter-spacing: 0.01em;
	text-decoration: none;
	transition: background-color .15s;
}
.item__button:hover { background: var(--tab); }

.item__meta {
	background: var(--wash);
	padding: 52px 0 44px;
}

.item__meta-list {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 24px 96px;
	margin: 0 auto;
}

.item__meta-group dt {
	margin-bottom: 12px;
	font-size: calc(13px * var(--type-scale));
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}
.item__meta-group dd {
	margin: 0;
	font-size: calc(13.5px * var(--type-scale));
	line-height: 1.65;
	letter-spacing: 0.02em;
}
.item__meta-group a { text-decoration: none; }
.item__swatch {
	display: inline-block;
	width: 12px;
	height: 12px;
	margin-right: 8px;
	border-radius: 3px;
	background: var(--swatch);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
	vertical-align: -1px;
}
.item__meta-group a:hover { text-decoration: underline; text-underline-offset: 3px; }



/* About page (reuses the item page hero + band) */

.about__hero {
	gap: 80px;
	padding-top: 56px;
	padding-bottom: 48px;
}
.about__intro { flex: 0 1 400px; }
.about__image {
	flex: 0 1 533px;
	margin: 0;
}
.about__image img { width: 100%; }
body:has(.about) .site-footer { margin-top: 48px; }

/* Extended article */

.item__article {
	padding-top: 72px;
}

.prose {
	max-width: 680px;
	margin: 0 auto;
	font-size: calc(17px * var(--type-scale));
	line-height: 1.65;
	letter-spacing: 0.005em;
}
.prose > * + * { margin-top: 1.1em; }
.prose p, .prose ul, .prose ol, .prose figure, .prose blockquote, .prose h2, .prose h3, .prose h4 { margin-bottom: 0; }
.prose h1, .prose h2, .prose h3, .prose h4 {
	margin-top: 2em;
	font-weight: 500;
	line-height: 1.25;
}
.prose h1, .prose h2 { font-size: calc(22px * var(--type-scale)); letter-spacing: 0.02em; text-transform: uppercase; }
.prose h3 { font-size: calc(19px * var(--type-scale)); }
.prose h4 { font-size: calc(17px * var(--type-scale)); }
.prose > :first-child { margin-top: 0; }
.prose a { text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose ul { list-style: disc; }
.prose li + li { margin-top: .3em; }
.prose figure { margin-left: 0; margin-right: 0; }
.prose figure img { width: 100%; }
.prose figcaption {
	margin-top: 10px;
	color: var(--ink-soft);
	font-size: calc(13.5px * var(--type-scale));
	line-height: 1.5;
}
.prose figure > ul { /* gallery block */
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.prose figure > ul li { margin: 0; }
.prose figure > ul img { width: 100%; height: 100%; object-fit: cover; }
.prose figure[data-crop="true"] > ul li { aspect-ratio: 1; }
.prose blockquote {
	margin-left: 0; margin-right: 0;
	padding: 4px 0 4px 24px;
	border-left: 3px solid var(--nav-red);
	font-size: calc(21px * var(--type-scale));
	line-height: 1.45;
}
.prose blockquote footer { margin-top: 10px; color: var(--ink-soft); font-size: calc(14px * var(--type-scale)); }
.prose hr { margin: 2.5em 0; border: 0; border-top: 1px solid var(--rule); }

/* You might also like */

.related {
	padding-top: 88px;
}
.related__title {
	margin: 0 0 28px;
	font-size: calc(22px * var(--type-scale));
	font-weight: 500;
	letter-spacing: 0.03em;
	text-align: center;
	text-transform: uppercase;
}
.grid--related {
	grid-template-columns: repeat(3, 1fr);
	max-width: 880px;
	margin: 0 auto;
}

/* Plain pages -------------------------------------------------------------- */

.page { padding-top: 56px; max-width: 820px; margin: 0 auto; }
.page__title { margin: 0 0 24px; font-size: calc(40px * var(--type-scale)); font-weight: 500; line-height: 1.1; }
.page__text { font-size: calc(18px * var(--type-scale)); line-height: 1.6; }
.page__text p { margin: 0 0 1em; }

/* Footer ------------------------------------------------------------------- */

.site-footer { margin-top: 96px; padding-bottom: 48px; }

.site-footer__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding-bottom: 28px;
	border-bottom: 1px solid var(--rule);
}
.site-footer__tagline { margin: 0; font-size: calc(16px * var(--type-scale)); letter-spacing: 0.01em; text-align: right; }

.site-footer__cols {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	padding-top: 28px;
	font-size: calc(13.5px * var(--type-scale));
	line-height: 1.65;
	letter-spacing: 0.02em;
}
.site-footer__cols a { text-decoration: none; }
.site-footer__cols a:hover { text-decoration: underline; }

/* Responsive --------------------------------------------------------------- */

/* Desktop only: type 5% larger */
@media (min-width: 1101px) {
	:root { --type-scale: 1.05; }
}

@media (max-width: 1100px) {
	:root { --grid-gap: 28px; }
	.grid { grid-template-columns: repeat(4, 1fr); }
	.filter-tabs__list { gap: 10px; }
	.filter-tab { padding: 0 16px; font-size: calc(15px * var(--type-scale)); }
	.filter-panel--swatches { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 860px) {
	:root { --gutter: 24px; --grid-gap: 20px; }
	.grid { grid-template-columns: repeat(3, 1fr); }
	.item__meta-list { gap: 24px 56px; }
}

@media (max-width: 720px) {
	:root { --gutter: 16px; --grid-gap: 12px; }

	.site-header__inner { min-height: 72px; }
	.site-nav { gap: 6px; }
	.site-nav__link { padding: 0 6px 10px; font-size: calc(14px * var(--type-scale)); }
	.logo img { width: auto; height: 36px; }
		.filters { padding: 16px 0 20px; }
	.search__input { height: 56px; padding: 0 52px 0 18px; font-size: calc(16px * var(--type-scale)); }
	.search__icon { right: 18px; }

	/* Tabs become a compact two-column grid; the open panel sits below */
	.filter-tabs__list { grid-template-columns: 1fr 1fr; gap: 6px; }
	.filter-tab { height: 44px; padding: 0 14px; border-radius: var(--radius); }
	.filter-tab[aria-expanded="true"] { background: var(--accent); color: #fff; }
	.filter-panels { margin-top: 6px; min-height: 0; border-radius: var(--radius); }
	.filter-panel { padding: 6px; gap: 6px; }
	.chip { height: 38px; padding: 0 14px; font-size: calc(14px * var(--type-scale)); }
	.range { gap: 14px; }

	.active-filters { flex-wrap: wrap; margin-top: 14px; }

	.collection { padding-top: 20px; }
	.grid { grid-template-columns: repeat(2, 1fr); }

	.item__hero { flex-direction: column; align-items: stretch; gap: 28px; padding-top: 24px; }
	.item__image { width: min(80%, 320px); margin: 0 auto; }
	.item__intro { flex: none; }
	.about__image { flex: none; width: 100%; max-width: 420px; margin: 0 auto; }
	.item__title { font-size: calc(19px * var(--type-scale)); }
	.item__meta { padding: 32px 0; }
	.item__meta-list { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 16px; }
	.item__article { padding-top: 44px; }
	.prose { font-size: calc(16px * var(--type-scale)); }
	.related { padding-top: 56px; }
	.related__title { font-size: calc(18px * var(--type-scale)); margin-bottom: 18px; }
	.grid--related { grid-template-columns: repeat(3, 1fr); }

	.site-footer { margin-top: 64px; }
	.site-footer__top { flex-direction: column; align-items: flex-start; }
	.site-footer__tagline { text-align: left; font-size: calc(14px * var(--type-scale)); }
	.site-footer__cols { grid-template-columns: 1fr; gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; }
}
