/*
Theme Name: Kuiske
Description: Kulttuurimedia Kuiskeen teema. Korvaa wpnousu-teeman.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: kuiske
*/

/* ==========================================================================
   Fonts
   Bentham (SIL OFL 1.1, see assets/fonts/OFL.txt), self-hosted so no visitor
   request goes to Google. One weight, no italic. Subsets as Google serves them.
   ========================================================================== */

@font-face {
	font-family: Bentham;
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("assets/fonts/bentham-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: Bentham;
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("assets/fonts/bentham-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ==========================================================================
   Tokens
   ========================================================================== */

:root {
	--paper: #faf8f4;
	--paper-2: #f0ece4;
	--ink: #16130f;
	--ink-2: #47423b;
	--muted: #6b645a;
	--line: #e0dbd1;
	--accent: #7a21b9;

	/* Section colours, from the old theme's category labels, darkened for contrast. */
	--c-kirjallisuus: #b0540d;
	--c-teatteri: #9b058f;
	--c-kuvataide: #4b7621;
	--c-musiikki: #bf1932;
	--c-elokuvat: #137469;
	--c-muu: var(--ink-2);

	--display: Bentham, "Iowan Old Style", Georgia, serif;
	--serif: "Iowan Old Style", "Palatino Linotype", Palatino, "URW Palladio L", P052, Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
	--sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

	--wrap: 76rem;
	--wide: 90rem;
	--measure: 42rem;
	--gutter: clamp(1rem, 4vw, 2.5rem);
	--gap: clamp(1rem, 2.2vw, 2rem);

	--surface: #fff;
	--on-sec: #fff;
	--mark-filter: none;
	--footer-bg: #16130f;
	--footer-text: #d9d3c8;
	--footer-strong: #fff;
	--footer-muted: #9e968a;
	--footer-link: #f3efe8;
	--footer-line: rgb(255 255 255 / .12);

	color-scheme: light;
}

/* Dark: follows the system unless the visitor picked a theme with the header
   toggle (html[data-theme], set before paint by an inline script). Every text
   colour here clears 5.5:1 on --paper and --paper-2. */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--paper: #14120f;
		--paper-2: #1e1b17;
		--surface: #1a1814;
		--ink: #ede8df;
		--ink-2: #c9c1b4;
		--muted: #9d9588;
		--line: #34302a;
		--accent: #c095f0;
		--c-kirjallisuus: #e8954f;
		--c-teatteri: #e070d6;
		--c-kuvataide: #94c463;
		--c-musiikki: #f2707c;
		--c-elokuvat: #4cc4b4;
		--on-sec: #14120f;
		--mark-filter: invert(1);
		--footer-bg: #0b0a08;
		--footer-text: #cfc8bc;
		--footer-muted: #8f877b;
		--footer-link: #ece7de;
		--footer-line: rgb(255 255 255 / .08);
		color-scheme: dark;
	}
}

:root[data-theme="dark"] {
	--paper: #14120f;
	--paper-2: #1e1b17;
	--surface: #1a1814;
	--ink: #ede8df;
	--ink-2: #c9c1b4;
	--muted: #9d9588;
	--line: #34302a;
	--accent: #c095f0;
	--c-kirjallisuus: #e8954f;
	--c-teatteri: #e070d6;
	--c-kuvataide: #94c463;
	--c-musiikki: #f2707c;
	--c-elokuvat: #4cc4b4;
	--on-sec: #14120f;
	--mark-filter: invert(1);
	--footer-bg: #0b0a08;
	--footer-text: #cfc8bc;
	--footer-muted: #8f877b;
	--footer-link: #ece7de;
	--footer-line: rgb(255 255 255 / .08);
	color-scheme: dark;
}

.is-kirjallisuus { --sec: var(--c-kirjallisuus); }
.is-teatteri     { --sec: var(--c-teatteri); }
.is-kuvataide    { --sec: var(--c-kuvataide); }
.is-musiikki     { --sec: var(--c-musiikki); }
.is-elokuvat     { --sec: var(--c-elokuvat); }
.is-muu          { --sec: var(--c-muu); }

/* ==========================================================================
   Base
   ========================================================================== */

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

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

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--serif);
	font-size: 1.0625rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

img,
svg,
video,
iframe {
	max-width: 100%;
}

img {
	height: auto;
	display: block;
}

a {
	color: inherit;
	text-decoration-thickness: 1px;
	text-underline-offset: .18em;
}

a:hover {
	color: var(--sec, var(--accent));
}

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

h1,
h2,
h3,
h4,
.writer__name,
.factbox__title {
	font-family: var(--display);
	font-weight: 400;
	line-height: 1.15;
	text-wrap: balance;
}

p {
	text-wrap: pretty;
}

.wrap {
	width: 100%;
	max-width: calc(var(--wrap) + 2 * var(--gutter));
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.wrap--wide {
	max-width: calc(var(--wide) + 2 * var(--gutter));
}

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

.skip-link {
	position: absolute;
	left: 1rem;
	top: -10rem;
	z-index: 100;
	padding: .75rem 1rem;
	background: var(--ink);
	color: var(--paper);
	font-family: var(--sans);
	font-weight: 600;
}

.skip-link:focus {
	top: 1rem;
	color: var(--paper);
}

/* ==========================================================================
   Masthead
   ========================================================================== */

.masthead {
	border-bottom: 1px solid var(--line);
}

.masthead__inner {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-block: clamp(.9rem, 2.5vw, 1.6rem);
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: clamp(.6rem, 1.5vw, 1rem);
	text-decoration: none;
	color: var(--ink);
}

.brand:hover {
	color: var(--ink);
}

.brand__mark {
	width: clamp(2.75rem, 6vw, 3.75rem);
	height: auto;
	filter: var(--mark-filter);
}

.masthead__tools {
	display: flex;
	align-items: center;
	gap: .5rem;
}

/* Light/dark toggle: shows the moon in light mode, the sun in dark mode. */
.theme-toggle {
	display: inline-grid;
	place-items: center;
	width: 2.6rem;
	height: 2.6rem;
	padding: 0;
	border: 1px solid var(--line);
	border-radius: 50%;
	background: var(--surface);
	color: var(--ink-2);
	cursor: pointer;
	transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}

.theme-toggle:hover {
	border-color: var(--ink);
	color: var(--ink);
}

.theme-toggle svg {
	width: 1.15rem;
	height: 1.15rem;
}

.theme-toggle .icon-sun {
	display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
	display: block;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
	display: none;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .theme-toggle .icon-sun {
		display: block;
	}

	:root:not([data-theme="light"]) .theme-toggle .icon-moon {
		display: none;
	}
}

/* Colours ease when the visitor switches theme (class set by theme-toggle.js). */
.theme-switching,
.theme-switching *,
.theme-switching *::before,
.theme-switching *::after {
	transition: background-color .35s ease, color .35s ease, border-color .35s ease, filter .35s ease !important;
}

.brand__text {
	display: flex;
	flex-direction: column;
	gap: .15rem;
}

.brand__name {
	font-family: var(--sans);
	font-weight: 500;
	font-size: clamp(1.15rem, 2.6vw, 1.6rem);
	letter-spacing: .38em;
	text-transform: uppercase;
	line-height: 1;
	margin-right: -.38em;
}

.brand__tagline {
	font-style: italic;
	font-size: clamp(.8rem, 1.6vw, .95rem);
	color: var(--muted);
	line-height: 1.2;
}

/* Search: a <details> toggle, so it works without JavaScript. */
.search-toggle summary {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	padding: .55rem .8rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	cursor: pointer;
	list-style: none;
	font-family: var(--sans);
	font-size: .875rem;
	font-weight: 500;
	color: var(--ink-2);
	background: var(--surface);
}

.search-toggle summary::-webkit-details-marker {
	display: none;
}

.search-toggle summary:hover,
.search-toggle[open] summary {
	border-color: var(--ink);
	color: var(--ink);
}

.search-toggle__panel {
	position: absolute;
	right: var(--gutter);
	top: calc(100% + .5rem);
	z-index: 20;
	width: min(30rem, calc(100vw - 2 * var(--gutter)));
	padding: 1rem;
	background: var(--surface);
	border: 1px solid var(--line);
	box-shadow: 0 18px 40px -18px rgb(22 19 15 / .35);
}

@media (max-width: 30em) {
	.search-toggle__label {
		display: none;
	}
}

/* Section navigation: one row that scrolls sideways on narrow screens. */
.nav {
	border-top: 1px solid var(--line);
}

.nav__list {
	display: flex;
	gap: clamp(1.1rem, 3vw, 2.25rem);
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	scrollbar-width: none;
	font-family: var(--sans);
	font-size: .8125rem;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	white-space: nowrap;
}

.nav__list::-webkit-scrollbar {
	display: none;
}

.nav__list a {
	display: block;
	padding-block: .9rem .8rem;
	text-decoration: none;
	color: var(--ink-2);
	border-bottom: 2px solid transparent;
}

.nav__list a:hover,
.nav__list .current-menu-item > a,
.nav__list .current-page-ancestor > a {
	color: var(--ink);
	border-bottom-color: var(--accent);
}

/* ==========================================================================
   Kicker, meta, stars
   ========================================================================== */

.kicker {
	position: relative;
	z-index: 2;
	display: inline-block;
	font-family: var(--sans);
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--sec, var(--accent));
}

a.kicker:hover {
	color: var(--ink);
}

.card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .35rem .9rem;
	margin: 0;
	font-family: var(--sans);
	font-size: .78rem;
	color: var(--muted);
}

.stars {
	display: inline-flex;
	gap: .1em;
	color: var(--sec, var(--accent));
	vertical-align: middle;
}

.star {
	width: 1em;
	height: 1em;
}

.star__bg {
	fill: currentColor;
	opacity: .2;
}

.star__fg {
	fill: currentColor;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: .8rem;
	min-width: 0;
}

.card__media {
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--paper-2);
}

.card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}

/* Book covers and posters stand on a tinted shelf instead of being cropped. */
.card__media.is-portrait img {
	object-fit: contain;
	padding-block: 7%;
	filter: drop-shadow(0 10px 14px rgb(22 19 15 / .22));
}

.card:hover .card__media img {
	transform: scale(1.035);
}

/* Grid and feature cards: a section-colour rule draws along the image, the
   photo dims slightly, book covers lift off the shelf, the title takes the
   section colour. Same on keyboard focus. */
.card:not(.card--lead) .card__media::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 4px;
	background: var(--sec, var(--accent));
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .45s cubic-bezier(.2, .7, .2, 1);
}

.card:not(.card--lead) .card__media::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(to top, rgb(22 19 15 / .28), rgb(22 19 15 / 0) 55%);
	opacity: 0;
	transition: opacity .35s ease;
	pointer-events: none;
}

.card:not(.card--lead) .card__media.is-portrait::before {
	display: none;
}

.card:not(.card--lead) .card__media.is-portrait img {
	transition: transform .45s cubic-bezier(.2, .7, .2, 1), filter .45s ease;
}

.card:not(.card--lead) .card__title {
	transition: color .25s ease;
}

.card:not(.card--lead):hover .card__media::after,
.card:not(.card--lead):focus-within .card__media::after {
	transform: scaleX(1);
}

.card:not(.card--lead):hover .card__media::before,
.card:not(.card--lead):focus-within .card__media::before {
	opacity: 1;
}

.card:not(.card--lead):hover .card__media img,
.card:not(.card--lead):focus-within .card__media img {
	transform: scale(1.06);
}

.card:not(.card--lead):hover .card__media.is-portrait img,
.card:not(.card--lead):focus-within .card__media.is-portrait img {
	transform: translateY(-5px);
	filter: drop-shadow(0 18px 18px rgb(22 19 15 / .3));
}

.card:not(.card--lead):hover .card__title,
.card:not(.card--lead):focus-within .card__title {
	color: var(--sec, var(--accent));
}

.card__body {
	display: flex;
	flex-direction: column;
	gap: .45rem;
}

.card__title {
	margin: 0;
	font-size: 1.3rem;
	line-height: 1.2;
}

.card__link {
	text-decoration: none;
}

/* The whole card is clickable; the kicker stays its own link above it. */
.card__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.card:hover .card__link {
	color: inherit;
}

.card__dek {
	margin: 0;
	font-style: italic;
	color: var(--ink-2);
	line-height: 1.4;
}

.card__excerpt {
	margin: 0;
	color: var(--ink-2);
}

/* Lead story */
.top {
	padding-block: clamp(1.5rem, 4vw, 3rem);
	border-bottom: 1px solid var(--line);
}

.card--lead {
	gap: 1.25rem;
}

.card--lead .card__media {
	aspect-ratio: 3 / 2;
}

.card--lead .card__title {
	font-size: clamp(1.9rem, 4.2vw, 3.3rem);
	line-height: 1.06;
}

.card--lead .card__dek {
	font-size: clamp(1.15rem, 2vw, 1.45rem);
}

.card--lead .card__body {
	gap: .8rem;
}

.card__button {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: .6rem;
	margin-top: .6rem;
	padding: .8rem 1.4rem;
	border: 1px solid var(--ink);
	font-family: var(--sans);
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--ink);
	transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.card__arrow {
	transition: transform .2s ease;
}

.card--lead:hover .card__button {
	background: var(--sec, var(--ink));
	border-color: var(--sec, var(--ink));
	color: var(--on-sec);
}

.card--lead:hover .card__arrow {
	transform: translateX(.25rem);
}

@media (min-width: 60em) {
	.card--lead {
		display: grid;
		grid-template-columns: 7fr 5fr;
		align-items: center;
		gap: clamp(2rem, 4vw, 3.5rem);
	}
}

/* Feature pair */
.features {
	display: grid;
	gap: 2.5rem var(--gap);
	padding-block: clamp(1.75rem, 4vw, 3rem);
	border-bottom: 1px solid var(--line);
}

.card--feature .card__media {
	aspect-ratio: 16 / 10;
}

.card--feature .card__title {
	font-size: clamp(1.4rem, 2.6vw, 1.85rem);
}

.card--feature .card__dek {
	font-size: 1.1rem;
}

@media (min-width: 48em) {
	.features {
		grid-template-columns: 1fr 1fr;
	}
}

/* Grid */
.grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 2.25rem var(--gap);
}

@media (max-width: 39.99em) {
	.grid .card__title {
		font-size: 1.1rem;
	}

	.grid .card__dek {
		font-size: .92rem;
	}
}

@media (min-width: 40em) {
	.grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 64em) {
	.grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
	margin-top: clamp(2.5rem, 6vw, 4rem);
}

.section__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.5rem;
	padding-top: .8rem;
	border-top: 3px solid var(--sec, var(--ink));
}

.section__title {
	margin: 0;
	font-family: var(--sans);
	font-size: .95rem;
	font-weight: 700;
	letter-spacing: .2em;
	text-transform: uppercase;
}

.section__title a {
	text-decoration: none;
}

.section__more {
	font-family: var(--sans);
	font-size: .85rem;
	font-weight: 500;
	text-decoration: none;
	color: var(--ink-2);
	white-space: nowrap;
}

.section__more:hover {
	text-decoration: underline;
}

.site-main {
	padding-bottom: clamp(3rem, 8vw, 6rem);
}

/* ==========================================================================
   Page heads (pages, landings, archives)
   ========================================================================== */

.page-head {
	padding-block: clamp(2rem, 6vw, 4rem) clamp(1.5rem, 4vw, 2.5rem);
}

.page-head__title {
	margin: .2rem 0 0;
	font-size: clamp(2.3rem, 6vw, 4.25rem);
	line-height: 1.05;
}

.landing .page-head__title::after,
.archive .page-head__title::after {
	content: "";
	display: block;
	width: 3.5rem;
	height: 4px;
	margin-top: 1.1rem;
	background: var(--sec, var(--accent));
}

.page-head__intro {
	max-width: var(--measure);
	margin-top: 1.25rem;
	font-size: 1.15rem;
	color: var(--ink-2);
}

.page-head__intro p {
	margin: 0 0 .8em;
}

.page-head__count {
	margin: 1rem 0 0;
	font-family: var(--sans);
	font-size: .9rem;
	color: var(--muted);
}

.page-head .search-form {
	max-width: 36rem;
	margin-top: 1.5rem;
}

.page-head--author {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1.5rem 2.5rem;
}

.page-head__photo {
	width: clamp(7rem, 16vw, 10rem);
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 50%;
}

.landing .top {
	padding-top: 0;
}

.empty {
	font-style: italic;
	color: var(--muted);
}

/* Archive toolbar: sub-category chips and the cards/list switch. */
.toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem 2rem;
	margin-top: 1.75rem;
}

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.chip {
	display: inline-flex;
	gap: .45rem;
	padding: .4rem .9rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface);
	font-family: var(--sans);
	font-size: .85rem;
	font-weight: 500;
	text-decoration: none;
}

.chip span {
	color: var(--muted);
}

.chip:hover {
	border-color: var(--sec, var(--ink));
}

.view-switch {
	display: inline-flex;
	border: 1px solid var(--ink);
	border-radius: 999px;
	overflow: hidden;
	font-family: var(--sans);
	font-size: .82rem;
	font-weight: 600;
}

.view-switch a {
	padding: .45rem 1rem;
	text-decoration: none;
}

.view-switch a[aria-current] {
	background: var(--ink);
	color: var(--paper);
}

/* A–Ö title list */
.title-list {
	margin: 0;
	padding: 0;
	list-style: none;
	columns: 1;
	column-gap: var(--gap);
}

@media (min-width: 48em) {
	.title-list {
		columns: 2;
	}
}

@media (min-width: 72em) {
	.title-list {
		columns: 3;
	}
}

.title-list li {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	padding-block: .55rem;
	border-bottom: 1px solid var(--line);
	break-inside: avoid;
}

.title-list a {
	text-decoration: none;
	line-height: 1.35;
}

.title-list a:hover {
	text-decoration: underline;
}

.title-list time {
	flex: none;
	font-family: var(--sans);
	font-size: .78rem;
	color: var(--muted);
}

/* Search results */
.results {
	max-width: 52rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.result {
	display: grid;
	grid-template-columns: 6.5rem 1fr;
	gap: 1.25rem;
	align-items: start;
	padding-block: 1.4rem;
	border-bottom: 1px solid var(--line);
}

.result:not(:has(.result__media)) {
	grid-template-columns: 1fr;
}

.result__media {
	aspect-ratio: 1;
	overflow: hidden;
	background: var(--paper-2);
}

.result__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.result__media.is-portrait img {
	object-fit: contain;
	padding-block: 6%;
}

.result__title {
	margin: .3rem 0 .35rem;
	font-size: 1.3rem;
}

.result__title a {
	text-decoration: none;
}

.result__title a:hover {
	text-decoration: underline;
}

.result__dek {
	margin: 0 0 .5rem;
	font-style: italic;
	color: var(--ink-2);
}

/* Pagination */
.pagination {
	margin-top: 3.5rem;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .4rem;
	font-family: var(--sans);
	font-size: .9rem;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.6rem;
	padding: .55rem .9rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	text-decoration: none;
	background: var(--surface);
}

.pagination .page-numbers.current {
	background: var(--ink);
	border-color: var(--ink);
	color: var(--paper);
}

.pagination .page-numbers.dots {
	border: 0;
	background: none;
}

/* ==========================================================================
   Article
   ========================================================================== */

.entry__head {
	padding-block: clamp(2rem, 6vw, 4rem) clamp(1.5rem, 4vw, 2.5rem);
}

.entry--hero .entry__titles {
	max-width: 54rem;
	margin-inline: auto;
	text-align: center;
}

.entry__title {
	margin: .6rem 0 0;
	font-size: clamp(2.1rem, 5.4vw, 4rem);
	line-height: 1.08;
}

.entry__dek {
	margin: 1rem 0 0;
	font-size: clamp(1.2rem, 2.4vw, 1.6rem);
	font-style: italic;
	line-height: 1.35;
	color: var(--ink-2);
}

.entry__credits {
	display: flex;
	flex-wrap: wrap;
	gap: .9rem 2.25rem;
	margin: 1.75rem 0 0;
	font-family: var(--sans);
	font-size: .9rem;
}

.entry--hero .entry__credits {
	justify-content: center;
}

.entry__credits dt {
	font-size: .68rem;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--muted);
}

.entry__credits dd {
	margin: .15rem 0 0;
	font-weight: 500;
}

.entry__credits a {
	text-decoration: none;
}

.entry__credits a:hover {
	text-decoration: underline;
}

/* Cover layout: headline beside a book cover or poster. */
.entry--cover .entry__head {
	display: grid;
	gap: 2rem;
	align-items: center;
}

.entry__cover {
	margin: 0;
	justify-self: center;
	width: min(100%, 22rem);
}

.entry__cover img {
	width: 100%;
	box-shadow: 0 24px 40px -22px rgb(22 19 15 / .55), 0 2px 6px rgb(22 19 15 / .12);
}

@media (min-width: 48em) {
	.entry--cover .entry__head {
		grid-template-columns: minmax(0, 1fr) minmax(14rem, 22rem);
		gap: clamp(2.5rem, 6vw, 5rem);
	}

	.entry--cover .entry__cover {
		order: 2;
	}
}

@media (max-width: 47.99em) {
	.entry__cover {
		order: -1;
		width: min(70%, 16rem);
	}
}

.entry__hero {
	margin: 0 auto;
}

.entry__hero img {
	width: 100%;
	aspect-ratio: 16 / 9;
	max-height: 82vh;
	object-fit: cover;
}

.entry__hero figcaption,
.entry__cover figcaption {
	margin-top: .6rem;
	font-family: var(--sans);
	font-size: .8rem;
	color: var(--muted);
}

.entry__body {
	max-width: calc(var(--measure) + 2 * var(--gutter));
	padding-top: clamp(1.75rem, 4vw, 3rem);
}

.entry__foot {
	margin-top: 2.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--line);
	font-family: var(--sans);
	font-size: .85rem;
	color: var(--muted);
}

.entry__terms {
	margin: 0 0 .4rem;
}

.entry__terms span {
	font-weight: 600;
	color: var(--ink-2);
}

.related {
	margin-top: clamp(2rem, 5vw, 3.5rem);
}

/* Review facts */
.factbox {
	margin: 2.5rem 0 0;
	padding: 1.5rem 1.6rem;
	background: var(--paper-2);
	border-top: 3px solid var(--sec, var(--accent));
	font-family: var(--sans);
	font-size: .95rem;
}

.factbox p {
	margin: 0;
}

.factbox__title {
	font-size: 1.5rem;
	line-height: 1.2;
}

.factbox__maker {
	margin-top: .25rem !important;
	font-weight: 600;
}

.factbox__list {
	margin: .9rem 0 0;
	padding: 0;
	list-style: none;
	color: var(--ink-2);
}

.factbox__list li + li {
	margin-top: .2rem;
}

.factbox__verdict {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .6rem 1.25rem;
	margin-top: 1.1rem;
	padding-top: 1rem;
	border-top: 1px solid var(--line);
}

.factbox__verdict .stars {
	font-size: 1.35rem;
}

.factbox__mood {
	font-family: var(--serif);
	font-size: 1.15rem;
	font-style: italic;
}

.factbox__mood span {
	margin-right: .35rem;
	font-family: var(--sans);
	font-size: .68rem;
	font-style: normal;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--muted);
}

/* ==========================================================================
   Prose (Classic Editor content)
   ========================================================================== */

.prose {
	font-size: clamp(1.0625rem, 1.2vw + .7rem, 1.1875rem);
	line-height: 1.72;
}

.prose > :first-child {
	margin-top: 0;
}

.prose p,
.prose ul,
.prose ol {
	margin: 0 0 1.25em;
}

.prose h2,
.prose h3,
.prose h4 {
	margin: 2em 0 .6em;
}

.prose h2 {
	font-size: 2em;
}

.prose h3 {
	font-size: 1.25em;
}

.prose h4 {
	font-size: 1.05em;
}

.prose a {
	color: var(--accent);
}

.prose a:hover {
	color: var(--ink);
}

.prose blockquote {
	margin: 1.75em 0;
	padding: .2em 0 .2em 1.25em;
	border-left: 3px solid var(--sec, var(--accent));
	font-size: 1.12em;
	font-style: italic;
	color: var(--ink-2);
}

.prose blockquote p:last-child {
	margin-bottom: 0;
}

.prose hr {
	margin: 2.5em auto;
	width: 5rem;
	border: 0;
	border-top: 1px solid var(--line);
}

.prose img {
	margin-block: 1.5em;
}

.prose figure,
.prose .wp-caption {
	max-width: 100%;
	margin: 1.75em 0;
}

.prose figure img,
.prose .wp-caption img {
	margin: 0;
}

.prose figcaption,
.prose .wp-caption-text {
	margin-top: .55rem;
	font-family: var(--sans);
	font-size: .8rem;
	line-height: 1.45;
	color: var(--muted);
}

.prose .aligncenter {
	margin-inline: auto;
}

@media (min-width: 40em) {
	.prose .alignleft {
		float: left;
		max-width: 50%;
		margin: .35em 1.5em 1em 0;
	}

	.prose .alignright {
		float: right;
		max-width: 50%;
		margin: .35em 0 1em 1.5em;
	}
}

.prose::after {
	content: "";
	display: table;
	clear: both;
}

/* Drop cap on the opening paragraph of an article. */
@supports (initial-letter: 3) or (-webkit-initial-letter: 3) {
	.entry__content > p:first-of-type::first-letter {
		-webkit-initial-letter: 3;
		initial-letter: 3;
		margin-right: .35rem;
		font-family: var(--display);
		color: var(--sec, var(--accent));
	}
}

.embed,
.prose iframe[src*="youtube"],
.prose iframe[src*="vimeo"] {
	margin: 1.75em 0;
}

.embed iframe,
.prose iframe[src*="youtube"],
.prose iframe[src*="vimeo"] {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
}

/* Plain pages (about, privacy) */
.page-entry__content {
	max-width: var(--measure);
}

.page-entry .page-head__title::after {
	content: "";
	display: block;
	width: 3.5rem;
	height: 4px;
	margin-top: 1.1rem;
	background: var(--accent);
}

/* ==========================================================================
   Writers (toimitus)
   ========================================================================== */

.writers {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
	gap: 2.5rem var(--gap);
	margin: clamp(2rem, 5vw, 3rem) 0 0;
	padding: 0;
	list-style: none;
}

.writer__link {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .2rem;
	text-align: center;
	text-decoration: none;
}

.writer__photo {
	display: grid;
	place-items: center;
	width: 100%;
	max-width: 9rem;
	aspect-ratio: 1;
	margin-bottom: .8rem;
	overflow: hidden;
	border-radius: 50%;
	background: var(--paper-2);
}

.writer__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: grayscale(.15);
	transition: transform .4s ease;
}

.writer__link:hover img {
	transform: scale(1.05);
}

.writer__initials {
	font-size: 3rem;
	font-style: italic;
	color: var(--muted);
}

.writer__name {
	font-size: 1.2rem;
	line-height: 1.25;
}

.writer__link:hover .writer__name {
	text-decoration: underline;
}

.writer__count {
	font-family: var(--sans);
	font-size: .8rem;
	color: var(--muted);
}

/* ==========================================================================
   Forms
   ========================================================================== */

.search-form {
	display: flex;
	gap: .5rem;
}

.search-form__input {
	flex: 1;
	min-width: 0;
	padding: .75rem .9rem;
	border: 1px solid var(--ink-2);
	border-radius: 0;
	background: var(--surface);
	color: var(--ink);
	font: 1rem/1.3 var(--sans);
}

.search-form__button {
	padding: .75rem 1.25rem;
	border: 0;
	background: var(--ink);
	color: var(--paper);
	font: 600 .95rem/1.3 var(--sans);
	cursor: pointer;
}

.search-form__button:hover {
	background: var(--accent);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
	background: var(--footer-bg);
	color: var(--footer-text);
	font-family: var(--sans);
	font-size: .9rem;
}

.footer__inner {
	display: grid;
	gap: 2.5rem var(--gap);
	padding-block: clamp(2.5rem, 6vw, 4rem);
}

@media (min-width: 48em) {
	.footer__inner {
		grid-template-columns: 2fr repeat(3, 1fr);
	}
}

.footer__brand {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.footer__brand img {
	width: 4.5rem;
	filter: invert(1);
}

.footer__name {
	margin: 0;
	font-size: 1.2rem;
	font-weight: 500;
	letter-spacing: .38em;
	text-transform: uppercase;
	color: var(--footer-strong);
}

.footer__tagline {
	margin: .25rem 0 0;
	font-family: var(--serif);
	font-style: italic;
}

.footer__heading {
	margin: 0 0 .9rem;
	font-family: var(--sans);
	font-size: .7rem;
	font-weight: 700;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--footer-muted);
}

.footer__links {
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer__links li + li {
	margin-top: .45rem;
}

.footer a {
	color: var(--footer-link);
	text-decoration: none;
}

.footer a:hover {
	color: var(--footer-strong);
	text-decoration: underline;
}

.footer__legal {
	padding-block: 1.25rem;
	border-top: 1px solid var(--footer-line);
	color: var(--footer-muted);
}

/* ==========================================================================
   Plugins
   ========================================================================== */

/* Responsive Lightbox (Nivo) centres the image as inline content; the theme's
   global img { display: block } would push it to the left edge. */
.nivo-lightbox-image img {
	display: inline-block;
	margin: 0 auto;
}

/* ==========================================================================
   Motion
   ========================================================================== */

/* Cross-fade between pages (Chrome, Edge, Safari 18.2+; others just load). */
@view-transition {
	navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
	animation-duration: .28s;
}

@keyframes kuiske-rise {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
}

@keyframes kuiske-fade {
	from {
		opacity: 0;
	}
}

@keyframes kuiske-settle {
	from {
		opacity: 0;
		transform: scale(1.04);
	}
}

/* On load: the opening of each page rises in, line by line. */
.card--lead .card__body > *,
.entry__titles > *,
.page-head > *,
.page-head--author > div > * {
	animation: kuiske-rise .7s cubic-bezier(.2, .7, .2, 1) backwards;
}

.card--lead .card__body > :nth-child(2),
.entry__titles > :nth-child(2),
.page-head > :nth-child(2),
.page-head--author > div > :nth-child(2) {
	animation-delay: .08s;
}

.card--lead .card__body > :nth-child(3),
.entry__titles > :nth-child(3),
.page-head > :nth-child(3),
.page-head--author > div > :nth-child(3) {
	animation-delay: .16s;
}

.card--lead .card__body > :nth-child(n + 4),
.entry__titles > :nth-child(n + 4),
.page-head > :nth-child(n + 4),
.page-head--author > div > :nth-child(n + 4) {
	animation-delay: .24s;
}

.card--lead .card__media img,
.entry__hero img {
	animation: kuiske-settle 1.1s cubic-bezier(.2, .7, .2, 1) backwards;
}

.entry__cover,
.page-head__photo {
	animation: kuiske-rise .8s .12s cubic-bezier(.2, .7, .2, 1) backwards;
}

/* Title underline bars under page headings draw in. */
.landing .page-head__title::after,
.archive .page-head__title::after,
.page-entry .page-head__title::after {
	transform-origin: left;
	animation: kuiske-draw .7s .35s cubic-bezier(.2, .7, .2, 1) backwards;
}

@keyframes kuiske-draw {
	from {
		transform: scaleX(0);
	}
}

/* Scroll reveal (reveal.js adds .reveal to below-the-fold items only). */
.reveal {
	opacity: 0;
	transform: translateY(22px);
	transition: opacity .6s ease, transform .75s cubic-bezier(.2, .7, .2, 1);
	transition-delay: calc(var(--reveal-i, 0) * 80ms);
}

.reveal.is-in {
	opacity: 1;
	transform: none;
}

/* Small interface motion. */
.nav__list a,
.chip,
.view-switch a,
.search-toggle summary,
.pagination .page-numbers,
.search-form__button {
	transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}

.section__more span {
	display: inline-block;
	transition: transform .2s ease;
}

.section__more:hover span {
	transform: translateX(.25rem);
}

.search-toggle[open] .search-toggle__panel {
	animation: kuiske-rise .25s cubic-bezier(.2, .7, .2, 1) backwards;
}

@media (prefers-reduced-motion: reduce) {
	@view-transition {
		navigation: none;
	}

	.reveal {
		opacity: 1;
		transform: none;
	}
}

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