/*
Theme Name: Stanny in the Wild
Theme URI: https://stannyinthewild.com
Author: Hans Meeus
Description: Story platform for wildlife, macro and astro photography. Design row D ("Close encounter" + "Focus Lock"): a warm-black frame, one muted amber, and a ground colour per story taken from its opening photo.
Version: 0.6.8
Requires at least: 6.4
Requires PHP: 8.0
License: All rights reserved
Text Domain: stanny
*/

/* ---------- Design tokens (row D) ---------- */
:root {
	--frame: #12110F;        /* warm black: header, footer, lists */
	--ground-dark: #000000;  /* "Dark photo" stories only */
	--card: #1A1917;         /* one uniform card ground on the home page */
	--canopy: #1E3A2A;       /* about block, default story ground */
	--amber: #C8893F;        /* the only colour that is not the photo's */
	--bone: #F1EDE6;         /* text */
	--ash: #9C9387;          /* meta, captions */
	--ash-soft: #B9B3A9;
	--rule: #2E2B27;
	--rule-dark: #1C1C1C;    /* rules on a Dark photo page */

	--story-ground: var(--canopy); /* overridden per story (inline) */

	--font-display: 'Archivo', system-ui, sans-serif;
	--font-body: 'Archivo', system-ui, sans-serif;
	--font-mono: 'Space Mono', ui-monospace, monospace;

	--wrap: 1320px;
	--gutter: 28px;
}

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

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

body {
	margin: 0;
	overflow-x: hidden;
	background: var(--frame);
	color: var(--bone);
	font-family: var(--font-body);
	font-size: 18px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

/* A story page sits on its own ground; Dark photo on pure black. */
body.single-story { background: var(--story-ground); }
body.is-dark-photo { --story-ground: var(--ground-dark); --rule: var(--rule-dark); background: var(--ground-dark); }

img, video, iframe { max-width: 100%; height: auto; display: block; }

a { color: var(--amber); }
a:hover { color: var(--bone); }

h1, h2, h3 {
	font-family: var(--font-display);
	font-variation-settings: 'wdth' 118;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: -0.005em;
	line-height: 0.96;
	margin: 0;
}

.wrap {
	max-width: var(--wrap);
	margin: 0 auto;
	padding: 0 var(--gutter);
}

.screen-reader-text { position: absolute; left: -9999px; }

/* The logbook voice: numbers, meta lines, facts. */
.mono {
	font-family: var(--font-mono);
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	line-height: 1.4;
	margin: 0;
}
.accent { color: var(--amber); }
.muted  { color: var(--ash); }

@media (max-width: 640px) {
	:root { --gutter: 16px; }
	body { font-size: 17px; }
}

/* ---------- Header ---------- */
.site-header { background: var(--frame); }
.site-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 32px;
	padding-top: 20px;
	padding-bottom: 20px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	color: var(--bone);
	text-decoration: none;
}
.brand:hover { color: var(--bone); }
.brand svg { flex: 0 0 auto; }
.brand__name {
	font-family: var(--font-display);
	font-variation-settings: 'wdth' 118;
	font-weight: 800;
	font-size: 15px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	line-height: 1;
}

.menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 10px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.menu a {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 0 8px;
	color: var(--ash);
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}
.menu a:hover, .menu .current-menu-item > a { color: var(--bone); }
.menu .menu__follow > a,
.menu li:last-child > a[href$="#follow"] {
	margin-left: 8px;
	padding: 0 14px;
	border: 1.5px solid var(--amber);
	border-radius: 4px;
	background: var(--amber);
	color: var(--frame);
	font-weight: 700;
	font-size: 12px;
}
.menu .menu__follow > a:hover,
.menu li:last-child > a[href$="#follow"]:hover { background: var(--bone); border-color: var(--bone); }

@media (max-width: 640px) {
	.menu { gap: 4px; }
	.menu a { padding: 0 6px; font-size: 13px; }
}

/* ---------- Shared pieces ---------- */
.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 48px;
	padding: 0 22px;
	border: 1.5px solid var(--amber);
	border-radius: 4px;
	background: var(--amber);
	color: var(--frame);
	font-family: var(--font-body);
	font-weight: 700;
	font-size: 14px;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
}
.button:hover { background: var(--bone); border-color: var(--bone); color: var(--frame); }

.button--line {
	background: transparent;
	border-color: var(--ash);
	color: var(--bone);
}
.button--line:hover { background: transparent; border-color: var(--amber); color: var(--amber); }

.standfirst {
	margin: 0;
	max-width: 760px;
	font-size: 22px;
	line-height: 1.4;
	font-weight: 400;
}

/* ---------- Stanny mark on photos ----------
   Photos are uploaded without watermark; the mark sits on the visible frame. */
.photo-mark {
	position: absolute;
	right: 12px;
	bottom: 10px;
	z-index: 3;
	width: 26px;
	height: 26px;
	opacity: 0.9;
	pointer-events: none;
	filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.45));
}
.photo-mark svg { display: block; width: 100%; height: 100%; }
.fit > .photo-mark { width: 30px; height: 30px; right: 18px; bottom: 14px; }

/* A photo shown whole inside a fixed frame (hero, story opening).
   The frame keeps its shape; .fit gets the photo's own proportions (--r = width / height)
   and is centred in it, so the photo is never cropped and the mark sits on the photo. */
.fit-frame { container-type: size; }
.fit {
	position: absolute;
	inset: 0;
	margin: auto;
	width: min(100cqw, calc(100cqh * var(--r, 1.5)));
	height: min(100cqh, calc(100cqw / var(--r, 1.5)));
	display: block;
}
.fit__img { width: 100%; height: 100%; object-fit: cover; display: block; }

.photo-frame { position: relative; display: block; }
.photo-frame > img { display: block; width: 100%; }
.story-body .wp-block-gallery .photo-frame { height: 100%; }
.story-body .wp-block-gallery .photo-frame > .photo-mark { width: 20px; height: 20px; }

/* Detail → whole picture on hover (desktop) or focus. */
.has-detail { position: relative; overflow: hidden; }
.has-detail .card__img--detail,
.has-detail .fit--full {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	transition: opacity 0.35s ease;
}
.has-detail:hover .card__img--detail,
.has-detail:focus-visible .card__img--detail,
.card:hover .has-detail .card__img--detail,
.has-detail:hover .fit--full,
.has-detail:focus-visible .fit--full { opacity: 1; }
.has-detail .fit--full { width: min(100cqw, calc(100cqh * var(--r, 1.5))); height: min(100cqh, calc(100cqw / var(--r, 1.5))); inset: 0; margin: auto; }

/* ---------- Home: latest story ---------- */
.home-latest { background: var(--story-ground); transition: background-color 0.9s ease; }
.home-latest--dark { background: var(--ground-dark); }

.home-latest__media {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 3 / 2;
	max-height: 80vh;
	background: var(--story-ground);
	overflow: hidden;
}
.home-latest--dark .home-latest__media { background: var(--ground-dark); }
/* The whole photo, never cropped: letterboxed on the story's ground when the screen is wider.
   The hero is a slideshow (assets/hero.js): photos stack and crossfade; the newest sits on top. */
.home-latest__media .fit { opacity: 0; transition: opacity 0.9s ease; }
.home-latest__media .fit.is-current { opacity: 1; }
.home-latest__media { transition: background-color 0.9s ease; }
@media (prefers-reduced-motion: reduce) {
	.home-latest, .home-latest__media, .home-latest__media .fit { transition: none; }
}

.home-latest__text {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px 48px;
	padding-top: 36px;
	padding-bottom: 44px;
}
.home-latest__main {
	flex: 1 1 560px;
	max-width: 820px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.home-latest__title {
	font-size: clamp(40px, 6.4vw, 96px);
	overflow-wrap: break-word;
}
.home-latest__title a { color: var(--bone); text-decoration: none; }
.home-latest__title a:hover { color: var(--amber); }
.home-latest .standfirst { font-size: 20px; line-height: 1.45; max-width: 640px; }
.home-latest__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.home-latest__aside { display: flex; align-items: center; gap: 14px; max-width: 340px; }
.home-latest__thumb { width: 150px; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px; flex: 0 0 auto; }

@media (max-width: 900px) {
	.home-latest__media { aspect-ratio: 3 / 2; max-height: none; }
	.home-latest__text { padding-top: 24px; padding-bottom: 32px; }
	.home-latest__aside { display: none; }
}

/* ---------- Home: all stories ---------- */
.home-stories { padding-top: 72px; padding-bottom: 96px; }
.home-stories__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px 40px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--rule);
	margin-bottom: 24px;
}
.home-stories__intro { display: flex; flex-direction: column; gap: 10px; }
.home-heading { font-size: clamp(34px, 4.6vw, 64px); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 16px;
	border: 1.5px solid var(--rule);
	border-radius: 4px;
	color: var(--bone);
	font-weight: 600;
	font-size: 14px;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	text-decoration: none;
}
.filter__count { font-size: 11px; color: var(--ash); }
.filter:hover { border-color: var(--amber); color: var(--bone); }
.filter.is-active { background: var(--amber); border-color: var(--amber); color: var(--frame); }
.filter.is-active .filter__count { color: var(--frame); opacity: 0.75; }

.cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}
@media (max-width: 980px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
@media (max-width: 640px) { .cards { grid-template-columns: minmax(0, 1fr); gap: 14px; } }

.card {
	display: flex;
	flex-direction: column;
	border-radius: 6px;
	overflow: hidden;
	background: var(--card);
	color: var(--bone);
	text-decoration: none;
}
.card:hover { color: var(--bone); }
.card[hidden] { display: none; }

.card__media {
	position: relative;
	display: block;
	aspect-ratio: 3 / 2;
	background: var(--card);
	overflow: hidden;
}
.card--dark .card__media { background: var(--ground-dark); }
.card__img { width: 100%; height: 100%; object-fit: cover; }
.card--dark .card__img { object-fit: contain; }
.card__img--empty { display: block; }

.card__number {
	position: absolute;
	left: 0;
	bottom: 0;
	padding: 6px 12px 4px;
	background: var(--frame);
	color: var(--bone);
	font-family: var(--font-mono);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
}
.card__badge {
	position: absolute;
	left: 12px;
	top: 12px;
	padding: 6px 10px;
	border-radius: 3px;
	background: var(--amber);
	color: var(--frame);
	font-family: var(--font-mono);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.card__views {
	position: absolute;
	right: 12px;
	top: 12px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 10px;
	border-radius: 3px;
	background: rgba(18, 17, 15, 0.82);
	color: var(--bone);
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.04em;
}
.card__media > .photo-mark { right: 12px; bottom: 10px; }

.card__body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 18px 18px 22px;
}
.card__label { color: var(--amber); }
.card__title { font-family: var(--font-display); font-variation-settings: 'wdth' 118; font-weight: 800; font-size: clamp(22px, 1.9vw, 27px); line-height: 1; text-transform: uppercase; letter-spacing: -0.005em; }
.card:hover .card__title { color: var(--amber); }
.card__text { font-size: 14px; line-height: 1.5; color: var(--ash); }

/* ---------- Home: about ---------- */
.home-about { background: var(--canopy); border-top: 1px solid var(--rule); }
.home-about__inner {
	display: grid;
	grid-template-columns: 5fr 7fr;
	gap: 56px;
	align-items: center;
	padding-top: 80px;
	padding-bottom: 80px;
}
.home-about__media { position: relative; max-width: 420px; border-radius: 6px; overflow: hidden; }
.home-about__media img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.home-about__text { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.home-about__lead { margin: 0; font-size: 19px; line-height: 1.6; max-width: 640px; }
@media (max-width: 980px) {
	.home-about__inner { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 56px; padding-bottom: 56px; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--frame); color: var(--bone); border-top: 1px solid var(--rule); }
.is-dark-photo .site-footer { background: var(--ground-dark); }
.footer-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 40px;
	padding-top: 72px;
	padding-bottom: 40px;
}
.footer-col { display: flex; flex-direction: column; gap: 14px; }
.footer-title { margin: 0; font-family: var(--font-display); font-variation-settings: 'wdth' 118; font-weight: 800; font-size: 28px; line-height: 0.96; text-transform: uppercase; }
.footer-note { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ash); }
.footer-label { color: var(--amber); margin-bottom: 4px; }
.footer-socials { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.footer-socials a {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	color: var(--bone);
	text-decoration: none;
	font-size: 17px;
	font-weight: 600;
}
.footer-socials a .mono { color: var(--ash); }
.footer-socials a:hover { color: var(--amber); }
.newsletter__row { display: flex; flex-wrap: wrap; gap: 8px; }
.newsletter input[type="email"] {
	flex: 1 1 180px;
	min-height: 48px;
	padding: 0 16px;
	border: 1.5px solid var(--rule);
	border-radius: 4px;
	background: transparent;
	color: var(--bone);
	font: inherit;
	font-size: 15px;
}
.newsletter input[type="email"]:focus { outline: 2px solid var(--amber); outline-offset: 2px; }
.footer-colophon {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 24px;
	padding-top: 28px;
	padding-bottom: 28px;
	border-top: 1px solid var(--rule);
	color: var(--ash);
}
@media (max-width: 980px) { .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 56px; } }

/* ---------- Story: opening ---------- */
.story-opening {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 3 / 2;
	max-height: 80vh;
	background: var(--story-ground);
	overflow: hidden;
}
/* The whole photo, never cropped (see .fit): letterboxed on the story's ground. */
.story-opening--dark { background: var(--ground-dark); }
@media (max-width: 640px) {
	.story-opening { max-height: none; }
}

/* ---------- Story: title block ---------- */
.story-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px 64px;
	padding-top: 40px;
	padding-bottom: 48px;
}
.story-head__main { flex: 1 1 640px; max-width: 980px; display: flex; flex-direction: column; gap: 18px; }
.story-title {
	font-size: clamp(40px, 6.4vw, 96px);
	overflow-wrap: break-word;
	hyphens: manual;
}
/* Right-hand column of the title block: key numbers and/or the reel block. */
.story-head__aside { flex: 0 1 340px; display: flex; flex-direction: column; gap: 24px; }
.story-head__aside .story-numbers { flex: none; }

/* The reel: one block, the views large when filled in, one button. */
.reel-block {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 26px 28px 28px;
	border-radius: 6px;
	background: var(--frame);
}
.is-dark-photo .reel-block { background: #0F0F0E; border: 1px solid var(--rule-dark); }
.reel-block--plain { gap: 12px; padding-top: 22px; }
.reel-block__count { display: flex; flex-direction: column; gap: 2px; }
.reel-block__number {
	font-family: var(--font-display);
	font-variation-settings: 'wdth' 118;
	font-weight: 800;
	font-size: 76px;
	line-height: 0.9;
	letter-spacing: -0.005em;
	text-transform: uppercase;
	color: var(--amber);
}
.reel-block .mono { font-size: 13px; color: var(--bone); }
.reel-block__account { font-size: 14px; line-height: 1.45; color: var(--ash); }
.reel-block__button { width: 100%; }
.reel-block__also { margin: -4px 0 0; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; color: var(--ash) !important; }
.reel-block__also a { color: var(--bone); text-decoration: underline; text-decoration-color: var(--amber); text-underline-offset: 3px; }
.reel-block__also a:hover { color: var(--amber); }

/* Key numbers beside the title (Dark photo / any story that has them). */
.story-numbers {
	margin: 0;
	flex: 0 1 320px;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px 24px;
	padding-bottom: 6px;
}
.story-numbers > div { display: flex; flex-direction: column; gap: 4px; }
.story-numbers dd {
	margin: 0;
	font-family: var(--font-display);
	font-variation-settings: 'wdth' 118;
	font-weight: 800;
	font-size: 40px;
	line-height: 0.96;
	text-transform: uppercase;
}

/* The whole picture. */
.story-whole { padding-bottom: 56px; }
.story-whole .photo-frame { border-radius: 4px; overflow: hidden; }
.story-whole__img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.photo-frame--dark { background: var(--ground-dark); border-radius: 0; }
.photo-frame--dark .story-whole__img { aspect-ratio: auto; height: auto; object-fit: contain; }
.story-whole__caption { margin-top: 12px; }

/* ---------- Story: chapters ----------
   In the editor every H2 starts a chapter. Number + heading left, text right. */
.story-body {
	counter-reset: chapter;
	display: grid;
	grid-template-columns: 200px minmax(0, 680px) minmax(0, 1fr);
	column-gap: 48px;
	padding-top: 8px;
}

.story-body > * {
	grid-column: 2;
	margin: 0 0 1.1em;
}

.story-body > p,
.story-body > ul,
.story-body > ol {
	font-size: 19px;
	line-height: 1.6;
}

.story-body > h2 {
	grid-column: 1;
	counter-increment: chapter;
	margin: 0 0 24px;
	padding-top: 36px;
	border-top: 1px solid var(--rule);
	font-size: 28px;
	line-height: 1.05;
}
.story-body > h2::before {
	content: counter(chapter, decimal-leading-zero);
	display: block;
	margin-bottom: 8px;
	font-family: var(--font-mono);
	font-weight: 700;
	font-size: 14px;
	letter-spacing: 0.06em;
	color: var(--amber);
}
.story-body > h2 + * { padding-top: 36px; border-top: 1px solid var(--rule); }
.story-body > h2:not(:first-child) { margin-top: 48px; }
.story-body > h2:not(:first-child) + * { margin-top: 48px; }

.story-body > h3 { font-size: 22px; margin-top: 1em; }

.story-body figure,
.story-body .wp-block-image { margin: 0 0 1.4em; }
.story-body img { width: 100%; height: auto; border-radius: 4px; }
.story-body .video__poster { height: 100%; border-radius: 0; }

.story-body > .alignwide,
.story-body > .alignfull,
.story-body > .wp-block-gallery,
.story-body > .video {
	grid-column: 1 / -1;
	margin-top: 24px;
	margin-bottom: 56px;
}
.story-body > .alignfull {
	width: 100vw;
	max-width: none;
	margin-left: calc(50% - 50vw);
	margin-right: 0;
}
.story-body > .alignfull img { border-radius: 0; }

.story-body figcaption,
.story-body .wp-element-caption {
	margin-top: 10px;
	font-family: var(--font-mono);
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ash);
	text-align: left;
}
.story-body > .alignfull figcaption { padding: 0 var(--gutter); }

.story-body blockquote {
	margin: 0 0 1.2em;
	padding: 0;
	font-family: var(--font-display);
	font-variation-settings: 'wdth' 118;
	font-weight: 800;
	font-size: 32px;
	line-height: 1.05;
	text-transform: uppercase;
	color: var(--bone);
}

/* Galleries: no file-name captions on the photos. */
.story-body .wp-block-gallery .wp-block-image figcaption,
.story-body .wp-block-gallery .blocks-gallery-item figcaption { display: none; }
.story-body .wp-block-gallery .wp-block-image img { height: 100%; object-fit: cover; }

/* ---------- Video ---------- */
.video {
	display: grid;
	grid-template-columns: 5fr 7fr;
	gap: 40px;
	align-items: center;
	padding: 32px;
	border-radius: 6px;
	background: var(--frame);
}
.is-dark-photo .video { background: #0F0F0E; border: 1px solid var(--rule-dark); }

.video__frame {
	position: relative;
	width: 100%;
	margin: 0 auto;
	border-radius: 4px;
	background: var(--frame);
	overflow: hidden;
}
.video--vertical .video__frame   { max-width: 320px; aspect-ratio: 9 / 16; }
.video--horizontal .video__frame { max-width: none; aspect-ratio: 16 / 9; }

.video__poster {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.video__format {
	position: absolute;
	left: 12px;
	bottom: 12px;
	z-index: 3;
	padding: 6px 10px;
	border-radius: 3px;
	background: rgba(18, 17, 15, 0.82);
	color: var(--bone);
	font-size: 11px;
}

.video__play {
	position: absolute;
	left: 50%;
	top: 50%;
	z-index: 3;
	width: 72px;
	height: 72px;
	margin: -36px 0 0 -36px;
	border: 0;
	border-radius: 50%;
	background: var(--amber);
	color: var(--frame);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.video__play:hover { background: var(--bone); }

.video__player {
	position: absolute;
	inset: 0;
	z-index: 4;
	width: 100%;
	height: 100%;
	border: 0;
}
.video__frame.is-playing .video__play,
.video__frame.is-playing .video__format { display: none; }

.video__side { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.video__label { margin: 0; }
.video__title { font-size: 38px; }
.video__note { margin: 0; font-size: 17px; line-height: 1.55; color: var(--ash); }

@media (max-width: 980px) {
	.video { grid-template-columns: minmax(0, 1fr); padding: 20px; }
	.video--horizontal .video__frame { max-width: none; }
}

/* ---------- Story: details ---------- */
.story-facts {
	margin-top: 16px;
	padding-top: 24px;
	border-top: 2px solid var(--amber);
	display: flex;
	flex-direction: column;
	gap: 24px;
}
.story-facts__head { margin: 0; }
.story-facts__list {
	margin: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px 32px;
}
.story-facts__list > div { display: flex; flex-direction: column; gap: 4px; }
.story-facts__list dd { margin: 0; font-size: 17px; font-weight: 500; }
.story-facts__list dd a { color: var(--bone); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--amber); }
.story-facts__list dd a:hover { color: var(--amber); }
@media (max-width: 640px) { .story-facts__list { grid-template-columns: minmax(0, 1fr); gap: 16px; } }

/* ---------- Story: previous / next ---------- */
.story-nav {
	margin-top: 64px;
	margin-bottom: 72px;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}
.story-nav__link {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 22px;
	border-radius: 6px;
	background: var(--story-ground, var(--canopy));
	color: var(--bone);
	text-decoration: none;
}
.story-nav__link--next { text-align: right; align-items: flex-end; }
.story-nav__link--end { background: transparent; border: 1px dashed var(--rule); justify-content: center; }
.story-nav__title {
	font-family: var(--font-display);
	font-variation-settings: 'wdth' 118;
	font-weight: 800;
	font-size: 30px;
	line-height: 0.96;
	text-transform: uppercase;
}
.story-nav__title--small { font-size: 22px; }
.story-nav__sub { font-size: 14px; color: var(--ash); }
.story-nav__link:hover .story-nav__title { color: var(--amber); }
@media (max-width: 640px) {
	.story-nav { grid-template-columns: minmax(0, 1fr); margin-top: 40px; margin-bottom: 48px; }
	.story-nav__link--next { text-align: left; align-items: flex-start; }
}

/* ---------- Story: small screens ---------- */
@media (max-width: 900px) {
	.story-body { display: block; }
	.story-body > h2 { padding-top: 26px; }
	.story-body > h2 + * { border-top: 0; padding-top: 0; }
	.story-body > h2:not(:first-child) { margin-top: 32px; }
	.story-body > h2:not(:first-child) + * { margin-top: 0; }
	.story-body > .alignwide,
	.story-body > .wp-block-gallery,
	.story-body > .video { margin-top: 20px; margin-bottom: 40px; }
	.story-head { padding-top: 28px; padding-bottom: 36px; }
	.story-head__aside { flex-basis: 100%; }
	.story-numbers { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.reel-block { max-width: 420px; }
	.reel-block__number { font-size: 60px; }
	.story-numbers dd { font-size: 28px; }
}
@media (max-width: 640px) {
	.standfirst { font-size: 19px; }
	.story-body > p { font-size: 17px; }
	.story-numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Lightbox ---------- */
.story-body img.is-zoomable { cursor: zoom-in; }
.story-body img.is-zoomable:focus-visible,
a[data-lightbox]:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
a[data-lightbox] { cursor: zoom-in; }

.lightbox {
	width: 100vw;
	height: 100vh;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgba(0, 0, 0, 0.96);
	color: var(--bone);
}
.lightbox::backdrop { background: rgba(0, 0, 0, 0.96); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }

.lightbox__frame { position: relative; display: inline-block; line-height: 0; }
.lightbox__img {
	max-width: calc(100vw - 160px);
	max-height: calc(100vh - 64px);
	width: auto;
	height: auto;
	object-fit: contain;
}
.lightbox__count { position: absolute; left: 24px; top: 24px; color: var(--ash); }

.lightbox__btn {
	position: absolute;
	width: 56px;
	height: 56px;
	border: 1.5px solid var(--rule);
	border-radius: 50%;
	background: transparent;
	color: var(--bone);
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}
.lightbox__btn:hover,
.lightbox__btn:focus-visible { color: var(--amber); border-color: var(--amber); }
.lightbox__close { top: 16px; right: 16px; font-size: 36px; }
.lightbox__prev { left: 16px; top: 50%; margin-top: -28px; }
.lightbox__next { right: 16px; top: 50%; margin-top: -28px; }
.lightbox.is-single .lightbox__prev,
.lightbox.is-single .lightbox__next { display: none; }

@media (max-width: 640px) {
	.lightbox__img { max-width: 100vw; max-height: calc(100vh - 140px); }
	.lightbox__prev, .lightbox__next { top: auto; bottom: 16px; margin-top: 0; }
}

/* ---------- Archives (/stories/, /discover/...) ---------- */
.archive .home-stories, .post-type-archive .home-stories { padding-top: 40px; }
