/*
Theme Name: The Witness
Theme URI: https://the-witness.org/
Description: Photojournalism magazine + portfolio for Jerónimo Leal. Child theme of Twenty Twenty-Five: design in theme.json, templates, parts and this file.
Author: The Witness
Template: twentytwentyfive
Version: 1.0.0
Requires at least: 6.7
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: the-witness
*/

/* ---------- Base ---------------------------------------------------------------------------------- */
html { -webkit-text-size-adjust: 100%; }
body { text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
::selection { background: var(--wp--preset--color--accent); color: #fff; }
:where(a) { text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
img { height: auto; }

/* Small uppercase label (kicker) used above headlines and section titles */
.tw-kicker,
.tw-kicker a {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none;
}

/* Section heading with a full rule above it, newspaper style */
.tw-section-head {
	border-top: 3px solid currentColor;
	padding-top: 0.75rem;
}
.tw-section-head h2 {
	font-size: var(--wp--preset--font-size--large);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 700;
	margin: 0;
}
.tw-section-head a {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
}
.tw-section-head a:hover { color: var(--wp--preset--color--accent); }

/* ---------- Header ---------------------------------------------------------------------------------- */
.tw-header {
	border-bottom: 1px solid var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--base);
}
.tw-header .tw-header-row {
	display: grid !important;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 1rem;
}
.tw-header .tw-header-row > :first-child { justify-self: start; }
.tw-header .tw-header-row > :last-child { justify-self: end; }

/* Masthead: red block + name in condensed caps */
.tw-masthead .wp-block-site-title { margin: 0; }
.tw-masthead .wp-block-site-title a {
	display: inline-flex;
	align-items: center;
	gap: 0.55em;
	color: var(--wp--preset--color--contrast);
}
.tw-masthead .wp-block-site-title a::before {
	content: "";
	width: 0.62em;
	height: 0.62em;
	background: var(--wp--preset--color--accent);
	flex: none;
	transform: translateY(-0.04em);
}
.tw-masthead .wp-block-site-title a:hover { color: var(--wp--preset--color--contrast); }
.tw-masthead .wp-block-site-tagline {
	font-family: var(--wp--preset--font-family--display);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
	margin: 0.35rem 0 0;
	text-align: center;
}

.tw-header .wp-block-navigation a:hover,
.tw-footer .wp-block-navigation a:hover { color: var(--wp--preset--color--accent); }
.tw-header .wp-block-navigation .current-menu-item > a,
.tw-header .wp-block-navigation a[aria-current="page"] {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--accent);
	text-decoration-thickness: 2px;
	text-underline-offset: 0.45em;
}
/* Mobile overlay menu: big condensed links */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a {
	font-size: 2rem;
	letter-spacing: 0.04em;
}

/* Language switcher ([tw_languages]): EN · ES · DE as small caps */
.tw-langs-wrap { margin: 0; }
.tw-langs {
	display: inline-flex;
	gap: 0.1rem;
	font-family: var(--wp--preset--font-family--display);
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}
.tw-langs a {
	display: inline-block;
	padding: 0.25rem 0.4rem;
	text-decoration: none;
	color: var(--wp--preset--color--muted);
}
.tw-langs a:hover { color: var(--wp--preset--color--accent); }
.tw-langs a.is-current { color: var(--wp--preset--color--contrast); box-shadow: inset 0 -2px 0 var(--wp--preset--color--accent); }

.tw-header { padding-block: 1.1rem; }
.tw-header .wp-block-navigation { gap: 1.4rem; }

@media (max-width: 781px) {
	.tw-header .tw-header-row { grid-template-columns: auto 1fr auto; }
	.tw-masthead .wp-block-site-title { font-size: 1.5rem !important; }
	.tw-masthead .wp-block-site-tagline { display: none; }
	.tw-langs a { padding: 0.25rem 0.25rem; }
}

/* ---------- Language tag on articles shown outside their own language ----------------------------- */
[data-tw-lang]::before {
	content: attr(data-tw-lang);
	display: inline-block;
	vertical-align: 0.3em;
	margin-right: 0.45em;
	padding: 0.15em 0.4em 0.1em;
	font-family: var(--wp--preset--font-family--display);
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.1em;
	border: 1px solid currentColor;
	opacity: 0.75;
}
h1[data-tw-lang]::before { font-size: 0.875rem; vertical-align: 0.6em; }

/* ---------- Story cards (query loops) -------------------------------------------------------------- */
.tw-card .wp-block-post-featured-image { overflow: hidden; margin-bottom: 0.9rem; }
.tw-card .wp-block-post-featured-image img { transition: transform 0.6s cubic-bezier(.2,.7,.2,1); }
.tw-card:hover .wp-block-post-featured-image img { transform: scale(1.035); }
.tw-card .wp-block-post-title a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.35s; }
.tw-card:hover .wp-block-post-title a { background-size: 100% 1px; }
.tw-card .wp-block-post-excerpt__excerpt { margin: 0; }
.tw-card .wp-block-post-excerpt { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); line-height: 1.5; }

/* Lead story list on the right of the home hero, separated by rules */
.tw-rule-list > li + li { border-top: 1px solid var(--wp--preset--color--rule); padding-top: 1.25rem; }

/* Dark band (portfolio / video) */
.tw-dark a { color: inherit; }
.tw-dark .wp-block-post-title a:hover { color: #fff; }
.tw-dark .tw-section-head { border-top-color: #fff; }

/* Portfolio tiles: image with the title laid over the bottom */
.tw-tile { position: relative; }
.tw-tile .wp-block-post-featured-image { margin: 0; }
.tw-tile .wp-block-post-featured-image::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,0.72) 100%);
	pointer-events: none;
}
.tw-tile .wp-block-post-title {
	position: absolute;
	left: 1rem;
	right: 1rem;
	bottom: 0.9rem;
	z-index: 1;
	margin: 0;
	color: #fff;
}
.tw-tile .wp-block-post-title a { color: #fff; }
.tw-tile:hover .wp-block-post-featured-image img { transform: scale(1.035); }
.tw-tile .wp-block-post-featured-image { overflow: hidden; }
.tw-tile .wp-block-post-featured-image img { transition: transform 0.6s cubic-bezier(.2,.7,.2,1); }

/* ---------- Covers (home hero, featured story) ---------------------------------------------------- */
.tw-hero .wp-block-cover__inner-container { max-width: 1320px; width: 100%; margin-inline: auto; }
.tw-hero .wp-block-post-title,
.tw-hero h1, .tw-hero h2 { text-wrap: balance; max-width: 18ch; }
.tw-hero .wp-block-post-excerpt { max-width: 46ch; }
.tw-hero .wp-block-post-terms a,
.tw-hero .wp-block-post-terms { color: #fff; }
.tw-hero .wp-block-post-terms a {
	background: var(--wp--preset--color--accent);
	padding: 0.3em 0.55em 0.25em;
}
.tw-hero .wp-block-post-date { color: rgba(255,255,255,0.8); }
.tw-hero a:hover { color: #fff; text-decoration: underline; }

/* ---------- Single article ------------------------------------------------------------------------- */
.tw-article-head .wp-block-post-title { text-wrap: balance; }
.tw-standfirst { font-style: italic; color: #333; text-wrap: pretty; }
.tw-standfirst p { margin: 0; }
.tw-byline { font-family: var(--wp--preset--font-family--display); font-size: var(--wp--preset--font-size--small); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.tw-byline .wp-block-post-date { text-transform: none; letter-spacing: 0.02em; }

.tw-prose > p:first-of-type::first-letter {
	float: left;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: 4.6em;
	line-height: 0.8;
	padding: 0.08em 0.1em 0 0;
	color: var(--wp--preset--color--accent);
}
.tw-prose figure.wp-block-image figcaption,
.tw-prose figure.wp-block-gallery > figcaption,
.wp-block-post-featured-image + .tw-featured-caption {
	border-left: 2px solid var(--wp--preset--color--accent);
	padding-left: 0.6rem;
	margin-top: 0.6rem;
	text-align: left;
}
.tw-prose .wp-block-embed { margin-block: 2.5rem; }
.tw-prose .wp-block-embed figcaption { text-align: left; }
.tw-tags a { text-decoration: none; }
.tw-tags a::before { content: "#"; color: var(--wp--preset--color--accent); }

/* ---------- Photo series (portfolio pages) --------------------------------------------------------- */
.tw-series .wp-block-image img { width: 100%; }
.tw-series .wp-block-image.is-portrait img,
.tw-series .wp-block-image.alignwide img { max-height: 92vh; object-fit: contain; background: transparent; }
.tw-series .wp-block-image.is-portrait { max-width: min(100%, 860px) !important; margin-inline: auto !important; }
.tw-series figure.wp-block-image figcaption { text-align: left; max-width: 700px; }
.tw-series .wp-block-columns { gap: clamp(1rem, 2vw, 1.5rem); }
.tw-series .wp-block-columns .wp-block-image img { height: 100%; object-fit: cover; }

/* Lightbox: dark like a darkroom */
.wp-lightbox-overlay .scrim { background-color: #0c0c0c !important; opacity: 0.97; }
.wp-lightbox-overlay .close-button { color: #fff !important; }

/* ---------- CV timeline ------------------------------------------------------------------------------ */
.tw-cv .wp-block-group.tw-cv-item { border-top: 1px solid var(--wp--preset--color--rule); padding-top: 1.25rem; }
.tw-cv .tw-cv-when { font-family: var(--wp--preset--font-family--display); font-weight: 600; letter-spacing: 0.04em; color: var(--wp--preset--color--accent); text-transform: uppercase; font-size: var(--wp--preset--font-size--small); }
.tw-cv h3 { margin-bottom: 0.25rem; }
.tw-cv ul { padding-left: 1.1rem; margin-top: 0.5rem; }
.tw-cv li { margin-bottom: 0.2rem; }

/* ---------- Footer ----------------------------------------------------------------------------------- */
.tw-footer { color: #e9e6df; }
.tw-footer a { color: #fff; text-decoration: none; }
.tw-footer a:hover { color: #fff; text-decoration: underline; }
.tw-footer .wp-block-site-title a { color: #fff; }
.tw-footer .tw-masthead .wp-block-site-title a { color: #fff; }
.tw-footer .tw-langs a { color: #aaa; }
.tw-footer .tw-langs .current-lang a { color: #fff; }
.tw-footer .tw-small { color: #9a978f; font-size: var(--wp--preset--font-size--small); font-family: var(--wp--preset--font-family--display); letter-spacing: 0.04em; }
.tw-footer .wp-block-social-links .wp-social-link { color: #fff; }

/* ---------- Page structure ------------------------------------------------------------------------- */
.tw-main { padding-bottom: var(--wp--preset--spacing--60); }
.tw-front-main { padding-bottom: 0; }
.tw-front > * + * { margin-block-start: 0; }
.tw-section { padding-block: var(--wp--preset--spacing--60) 0; }
.tw-section .tw-section-head { margin-bottom: var(--wp--preset--spacing--40); }
.tw-band { padding-block: var(--wp--preset--spacing--60); margin-block-start: var(--wp--preset--spacing--60) !important; }
.tw-about-teaser { padding-block: var(--wp--preset--spacing--60); }
.tw-about-teaser h2 { font-size: var(--wp--preset--font-size--xx-large); margin-block: 0.2em 0.4em; }

.tw-page-head { padding-block: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40); }
.tw-page-head h1 { font-size: var(--wp--preset--font-size--huge); line-height: 0.95; text-transform: uppercase; letter-spacing: -0.005em; margin: 0; }
.tw-page-head .tw-lead { margin-top: 1rem; }
.tw-lead { font-size: var(--wp--preset--font-size--large); line-height: 1.45; color: #2a2a2a; max-width: 46ch; }
.tw-muted { color: var(--wp--preset--color--muted); }
.tw-small { font-size: var(--wp--preset--font-size--small); }
.tw-filter { font-family: var(--wp--preset--font-family--display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); }
.tw-filter a { text-decoration: none; color: var(--wp--preset--color--contrast); }
.tw-filter a:hover { color: var(--wp--preset--color--accent); }
.tw-page-content > .tw-lead:first-child { margin-top: 0; }
.tw-page-content h2 { margin-top: var(--wp--preset--spacing--50); }
.tw-page-content h3 { margin-top: var(--wp--preset--spacing--40); margin-bottom: 0.3rem; }

/* Home hero: featured photo full screen, headline over the bottom */
.tw-hero { position: relative; color: #fff; }
.tw-hero > .wp-block-post-featured-image,
.tw-hero > .wp-block-image { margin: 0; }
.tw-hero .wp-block-post-featured-image img { height: 86vh; min-height: 30rem; }
.tw-hero-static > .wp-block-image img { width: 100%; height: 86vh; min-height: 30rem; object-fit: cover; }
.tw-hero-static::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.75) 100%); pointer-events: none; }
.tw-hero-text {
	position: absolute;
	z-index: 2;
	left: 0;
	right: 0;
	bottom: 0;
	padding: var(--wp--preset--spacing--50) var(--wp--style--root--padding-right) var(--wp--preset--spacing--50) var(--wp--style--root--padding-left);
	max-width: calc(1320px + var(--wp--style--root--padding-left) + var(--wp--style--root--padding-right));
	margin-inline: auto;
	pointer-events: none;
}
.tw-hero-text a { pointer-events: auto; }
.tw-hero-text > * { margin-block: 0 0.9rem; }
.tw-hero-text .wp-block-post-title,
.tw-hero-text h2 { font-size: var(--wp--preset--font-size--huge); line-height: 0.92; text-transform: uppercase; margin-bottom: 1rem; text-shadow: 0 2px 30px rgba(0,0,0,.35); }
.tw-hero-text .wp-block-post-excerpt { font-size: var(--wp--preset--font-size--large); line-height: 1.4; color: rgba(255,255,255,.92); }
.tw-hero-text .tw-kicker { color: #fff; }
.tw-hero-text .tw-kicker::before { content: ""; display: inline-block; width: 0.7em; height: 0.7em; background: var(--wp--preset--color--accent); margin-right: 0.6em; vertical-align: -0.05em; }
.tw-hero-query { margin-block-start: 0 !important; }

/* Article */
.tw-article-head { padding-block: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40); }
.tw-article-head .wp-block-post-title { font-size: var(--wp--preset--font-size--xx-large); margin-block: 0.6rem 1.2rem; }
.tw-standfirst { font-size: var(--wp--preset--font-size--large); line-height: 1.45; max-width: 760px; margin-inline: auto !important; }
.tw-byline { margin-top: 1.4rem; gap: 0.9rem; }
.tw-byline .wp-block-post-author-name::after { content: "·"; margin-left: 0.9rem; color: var(--wp--preset--color--muted); }
.tw-lead-image { margin-bottom: var(--wp--preset--spacing--50); }
.tw-lead-image img { max-height: 88vh; object-fit: cover; }
.tw-prose { font-size: 1.1875rem; }
.tw-prose > .wp-block-image.alignwide:first-child { margin-top: 0; }
.tw-article-foot { margin-top: var(--wp--preset--spacing--40); }
.tw-more { border-top: 0; }

/* Pairs of photos side by side (series, articles) */
.tw-pairs { align-items: stretch !important; }
.tw-pairs .wp-block-column { display: flex; }
.tw-pairs .wp-block-image { margin: 0; width: 100%; }
.tw-pairs .wp-block-image img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 5; }

/* Contact */
.tw-contact-big { font-family: var(--wp--preset--font-family--display); font-size: var(--wp--preset--font-size--x-large); font-weight: 600; line-height: 1.1; word-break: break-word; }
.tw-contact-big a { text-decoration: none; }
.tw-contact-cols { border-top: 1px solid var(--wp--preset--color--rule); padding-top: 1.2rem; margin-top: var(--wp--preset--spacing--40) !important; }
.tw-contact-cols .tw-kicker { margin-bottom: 0.4rem; color: var(--wp--preset--color--accent); }
.tw-contact-cols p { margin-top: 0; }

/* About */
.tw-about-intro { margin-bottom: var(--wp--preset--spacing--40); }
.tw-about-intro p:first-child { font-size: var(--wp--preset--font-size--large); line-height: 1.45; }
.tw-cv { margin-top: var(--wp--preset--spacing--60) !important; border-top: 3px solid var(--wp--preset--color--contrast); }
.tw-cv > h2 { margin-top: 0.75rem !important; text-transform: uppercase; letter-spacing: 0.06em; }
.tw-cv .tw-cv-sub { color: var(--wp--preset--color--muted); text-transform: uppercase; letter-spacing: 0.1em; font-size: var(--wp--preset--font-size--small); margin-top: var(--wp--preset--spacing--40); }
.tw-cv .tw-cv-item > * { margin-block: 0.25rem; }

/* Footer layout */
.tw-footer { padding-block: var(--wp--preset--spacing--60) var(--wp--preset--spacing--40); margin-block-start: 0 !important; }
.tw-footer .tw-masthead .wp-block-site-title { font-size: 2.4rem; }
.tw-footer .tw-kicker { color: #9a978f; margin-bottom: 0.6rem; }
.tw-footer-top p { margin-block: 0 0.4rem; }
.tw-footer-bottom { border-top: 1px solid #2e2e2e; margin-top: var(--wp--preset--spacing--50) !important; padding-top: 1.2rem; }
.tw-footer-bottom p { margin: 0; }
.tw-foot-nav { font-size: 1.05rem; gap: 0.35rem !important; }
.tw-footer .tw-langs a.is-current { color: #fff; }
.tw-footer .tw-langs a { color: #8d8a83; }
.tw-footer .wp-block-social-links { margin-top: 0.8rem; }

@media (max-width: 781px) {
	.tw-hero .wp-block-post-featured-image img,
	.tw-hero-static > .wp-block-image img { height: 78vh; min-height: 26rem; }
	.tw-hero-text .wp-block-post-excerpt { display: none; }
	.tw-pairs .wp-block-image img { aspect-ratio: auto; }
	.tw-page-head h1 { font-size: 3rem; }
}

/* ---------- Misc ------------------------------------------------------------------------------------- */
.wp-block-query-pagination { border-top: 1px solid var(--wp--preset--color--rule); padding-top: 1.5rem; }
.wp-block-search__input { border: 1px solid var(--wp--preset--color--contrast); border-radius: 0; font-family: var(--wp--preset--font-family--serif); }
.wp-block-search__button { border-radius: 0; }
.wp-block-categories-list.tw-filter { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; list-style: none; padding: 0; margin: 0; font-family: var(--wp--preset--font-family--display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; font-size: var(--wp--preset--font-size--small); }
.wp-block-categories-list.tw-filter a { text-decoration: none; }
.wp-block-categories-list.tw-filter a:hover { color: var(--wp--preset--color--accent); }

@media (prefers-reduced-motion: reduce) {
	.tw-card .wp-block-post-featured-image img,
	.tw-tile .wp-block-post-featured-image img { transition: none; }
}

/* masthead: title + tagline close together */
.tw-masthead { gap: 0.3rem !important; }
.tw-header .tw-masthead .wp-block-site-tagline { margin: 0; }

/* no gap between header / main / footer (root block gap) */
.wp-site-blocks > * + * { margin-block-start: 0; }
.tw-footer .tw-masthead { align-items: flex-start !important; }
.tw-about-teaser .wp-block-image img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.tw-about-intro .wp-block-image img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }

/* tall photos never fill the whole wide column */
.wp-block-post-content .wp-block-image.alignwide.is-portrait { max-width: min(100%, 860px) !important; margin-inline: auto !important; }
.wp-block-post-content .wp-block-image.alignwide.is-portrait img { max-height: 92vh; width: auto; margin-inline: auto; display: block; }
/* left-aligned pages: wide blocks start at the same left edge as the text */
.tw-page-content.is-content-justification-left > .alignwide { margin-left: 0 !important; }

/* ===== Compact layout: less scrolling ===================================================================== */
/* sections closer together, smaller page titles */
.tw-section { padding-block: var(--wp--preset--spacing--50) 0; }
.tw-band { padding-block: var(--wp--preset--spacing--50); margin-block-start: var(--wp--preset--spacing--50) !important; }
.tw-about-teaser { padding-block: var(--wp--preset--spacing--50); }
.tw-main { padding-bottom: var(--wp--preset--spacing--50); }
.tw-page-head { padding-block: var(--wp--preset--spacing--40) var(--wp--preset--spacing--30); }
.tw-page-head h1 { font-size: var(--wp--preset--font-size--xx-large); }
.tw-article-head { padding-block: var(--wp--preset--spacing--40) var(--wp--preset--spacing--30); }
.tw-lead-image img { max-height: 78vh; }
.tw-hero .wp-block-post-featured-image img,
.tw-hero-static > .wp-block-image img { height: 78vh; min-height: 26rem; }

/* photo series: uncropped masonry gallery (click = full-screen viewer) */
.wp-block-gallery.tw-masonry.has-nested-images { display: block; columns: 3; column-gap: 1rem; }
.wp-block-gallery.tw-masonry.has-nested-images figure.wp-block-image {
	width: 100% !important;
	margin: 0 0 1rem !important;
	break-inside: avoid;
	display: block;
}
.wp-block-gallery.tw-masonry.has-nested-images figure.wp-block-image img { width: 100%; height: auto !important; object-fit: contain; }
.wp-block-gallery.tw-masonry.has-nested-images figure.wp-block-image figcaption {
	position: static;
	background: none;
	color: var(--wp--preset--color--muted);
	text-shadow: none;
	text-align: left;
	padding: 0.45rem 0 0;
	max-height: none;
	overflow: visible;
	font-size: var(--wp--preset--font-size--x-small);
	line-height: 1.35;
}
.wp-block-gallery.tw-masonry figure.wp-block-image:has(figcaption)::before { display: none; }
.wp-block-gallery.tw-masonry img { cursor: zoom-in; }

/* about: two text columns + compact CV */
.tw-about-cols { margin-top: var(--wp--preset--spacing--40) !important; }
.tw-about-cols h2 { margin-top: 0 !important; }
.tw-cv { margin-top: var(--wp--preset--spacing--50) !important; }
.tw-cv-duties { font-size: var(--wp--preset--font-size--small); line-height: 1.5; color: #333; }
.tw-cv .wp-block-columns { gap: var(--wp--preset--spacing--50); }
.tw-cv .tw-cv-item { padding-top: 0.9rem; }
.tw-cv .tw-cv-sub { margin-top: var(--wp--preset--spacing--30); }

/* contact: wide banner photo */
.wp-block-image.tw-banner img { aspect-ratio: 21 / 8; object-fit: cover; width: 100%; }

/* Dailymotion link shown as a poster with play button (see functions.php) */
.tw-video-poster { margin-block: 2rem; }
.tw-video-poster a { position: relative; display: block; aspect-ratio: 16 / 9; background: #000; overflow: hidden; color: #fff; text-decoration: none; }
.tw-video-poster img { width: 100%; height: 100%; object-fit: cover; opacity: 0.88; transition: transform 0.6s cubic-bezier(.2,.7,.2,1), opacity 0.3s; }
.tw-video-poster a:hover img { transform: scale(1.03); opacity: 1; }
.tw-play { position: absolute; left: 50%; top: 50%; width: 5.5rem; height: 5.5rem; margin: -2.75rem 0 0 -2.75rem; border-radius: 50%; background: var(--wp--preset--color--accent); box-shadow: 0 6px 30px rgba(0,0,0,.35); transition: transform 0.25s; }
.tw-play::after { content: ""; position: absolute; left: 39%; top: 29%; border-style: solid; border-width: 1.2rem 0 1.2rem 1.9rem; border-color: transparent transparent transparent #fff; }
.tw-video-poster a:hover .tw-play { transform: scale(1.08); }
.tw-video-badge { position: absolute; right: 0.9rem; bottom: 0.9rem; font-family: var(--wp--preset--font-family--display); font-size: var(--wp--preset--font-size--x-small); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; background: rgba(0,0,0,.65); padding: 0.35rem 0.6rem; }
.tw-video-title { position: absolute; inset: auto 1rem 3.5rem; font-family: var(--wp--preset--font-family--display); font-size: var(--wp--preset--font-size--large); }

@media (max-width: 781px) {
	.wp-block-gallery.tw-masonry.has-nested-images { columns: 2; column-gap: 0.6rem; }
	.wp-block-gallery.tw-masonry.has-nested-images figure.wp-block-image { margin-bottom: 0.6rem !important; }
	.tw-hero .wp-block-post-featured-image img,
	.tw-hero-static > .wp-block-image img { height: 70vh; min-height: 24rem; }
	/* cards: photo beside the text */
	.tw-card { display: grid; grid-template-columns: 38% 1fr; column-gap: 0.9rem; align-items: start; }
	.tw-card > .wp-block-post-featured-image { grid-row: 1 / span 4; margin: 0 !important; aspect-ratio: 1 !important; }
	.tw-card > .wp-block-post-featured-image img { aspect-ratio: 1 !important; height: 100% !important; }
	.tw-card > * { margin-block: 0 0.3rem !important; }
	.tw-card .wp-block-post-title { font-size: 1.2rem; }
	.tw-card .wp-block-post-excerpt { display: none; }
	.tw-tile .wp-block-post-title { font-size: 1rem; left: 0.6rem; right: 0.6rem; bottom: 0.5rem; }
	.tw-page-head h1 { font-size: 2.6rem; }
	.wp-block-image.tw-banner img { aspect-ratio: 16 / 9; }
}

/* left-justified pages: text starts exactly under the page title (same left edge as the wide column) */
.tw-page-content.is-content-justification-left {
	padding-left: max(var(--wp--style--root--padding-left), calc((100% - var(--wp--style--global--wide-size)) / 2)) !important;
	padding-right: max(var(--wp--style--root--padding-right), calc((100% - var(--wp--style--global--wide-size)) / 2)) !important;
}
.tw-page-content.is-content-justification-left > .alignwide { max-width: var(--wp--style--global--wide-size); }
@media (max-width: 781px) {
	.tw-about-teaser .wp-block-image img { aspect-ratio: 3 / 2; }
}

/* ===== Hero: the photo grows with its text, so the headline can never climb into the menu ================== */
.tw-hero { display: grid; }
.tw-hero > * { grid-area: 1 / 1; }
.tw-hero > .wp-block-post-featured-image,
.tw-hero > .wp-block-image { height: auto !important; min-height: 78vh; }
.tw-hero > .wp-block-post-featured-image img,
.tw-hero-static > .wp-block-image img { height: 100% !important; min-height: 0; position: absolute; inset: 0; }
.tw-hero > .wp-block-post-featured-image a,
.tw-hero > .wp-block-image { position: relative; display: block; height: 100%; }
.tw-hero > .wp-block-post-featured-image > a { position: absolute; inset: 0; }
.tw-hero-text { position: relative; align-self: end; padding-top: 7rem; }
.tw-hero-text .wp-block-post-title,
.tw-hero-text h2 { font-size: clamp(2.4rem, 5.2vw, 5.5rem); }
/* hero label: small white kicker with the red square, not a red button */
.tw-hero .wp-block-post-terms a { background: none; padding: 0; color: #fff; }
.tw-hero .wp-block-post-terms::before { content: ""; display: inline-block; width: 0.7em; height: 0.7em; background: var(--wp--preset--color--accent); margin-right: 0.6em; vertical-align: -0.05em; }
@media (max-width: 781px) {
	.tw-hero > .wp-block-post-featured-image,
	.tw-hero > .wp-block-image { min-height: 70vh; }
	.tw-hero-text { padding-top: 5rem; }
}

/* ===== Header between phone and desktop: menu button instead of a menu wrapping onto two lines ============ */
@media (min-width: 600px) and (max-width: 1023px) {
	.tw-header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.tw-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
	.tw-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close { display: flex; }
	.tw-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { flex-direction: column; align-items: flex-start; }
}
@media (min-width: 1024px) and (max-width: 1240px) {
	.tw-header .wp-block-navigation { gap: 1rem; font-size: 0.875rem; }
}
.tw-header .wp-block-navigation__container { flex-wrap: nowrap; }
/* hero text spans the full wide column (grid items with auto margins would shrink to their content) */
.tw-hero-text { width: 100%; justify-self: center; box-sizing: border-box; }
/* opened menu (phone + tablet): proper margins */
.tw-header .wp-block-navigation__responsive-container.is-menu-open { padding: 1.5rem clamp(1.25rem, 5vw, 3rem) 2rem !important; }
.tw-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 3.5rem; }
