/* ==========================================================================
   Soulimous
   Warm beige studio backdrop, dark brown text, one ochre accent for interactive elements only.
   Images dominate; the UI stays quiet. Motion: slow fades only.
   ========================================================================== */

/* ---------- Fonts (self-hosted, SIL OFL; see assets/fonts/OFL-*.txt) ---------- */
@font-face {
	font-family: "Inter";
	src: url("../fonts/inter-latin-wght.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "IBM Plex Mono";
	src: url("../fonts/ibm-plex-mono-latin-400.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "IBM Plex Mono";
	src: url("../fonts/ibm-plex-mono-latin-500.woff2") format("woff2");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
	/* "Gallery greige". Editable in WP Admin → Settings → Soulimous colours (printed after this file). */
	--backdrop: #c9bfb2;
	--ink: #1e1c1a;
	--ink-soft: #6b6257;
	--accent: #8a6f45;         /* interactive states only */
	--accent-2: #e6dfd4;
	--line: color-mix(in srgb, var(--ink) 18%, transparent);
	--tint: color-mix(in srgb, var(--ink) 8%, transparent);   /* image placeholders */

	--sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

	--gutter: clamp(16px, 4vw, 48px);
	--header-h: 88px;
	--fade: .6s ease;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}
html {
	-webkit-text-size-adjust: 100%;
}
body {
	margin: 0;
	min-height: 100svh;
	display: flex;
	flex-direction: column;
	background: var(--backdrop);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
img,
video,
svg {
	display: block;
	max-width: 100%;
	height: auto;
}
a {
	color: inherit;
	text-decoration-thickness: 1px;
	text-underline-offset: .2em;
	transition: color var(--fade);
}
a:hover {
	color: var(--accent);
}
:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}
h1, h2, h3 {
	margin: 0;
	font-weight: 500;
	line-height: 1.15;
	letter-spacing: -.01em;
}
.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}
.skip-link {
	position: absolute;
	left: var(--gutter);
	top: -100px;
	z-index: 10;
	padding: 8px 12px;
	background: var(--ink);
	color: var(--backdrop);
}
.skip-link:focus {
	top: 8px;
	color: var(--backdrop);
}

/* ---------- Header ---------- */
.site-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px 32px;
	min-height: var(--header-h);
	padding: 14px var(--gutter);
}
.site-logo {
	flex: none;
	width: 50px;
	color: var(--ink);
}
.site-logo svg {
	width: 100%;
}
.site-nav__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 6px clamp(18px, 3vw, 40px);
	margin: 0;
	padding: 0;
	list-style: none;
}
.site-nav a {
	display: inline-block;
	padding: 6px 0;
	font-size: 15px;
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: color var(--fade), border-color var(--fade);
}
.site-nav .current-menu-item > a,
.site-nav .current-page-ancestor > a {
	border-bottom-color: var(--ink);
}

/* ---------- Main + footer ---------- */
.site-main {
	flex: 1;
	display: flex;
	flex-direction: column;
}
.site-footer {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 32px;
	padding: 28px var(--gutter);
	color: var(--ink-soft);
	font-size: 13px;
}
.site-footer p {
	margin: 0;
}
.soul-social {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.site-footer a {
	text-decoration: none;
}

/* ---------- Default page ---------- */
.site-main .page {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: clamp(32px, 6vw, 80px) var(--gutter);
}
.page__title {
	margin-bottom: 1em;
	font-size: clamp(30px, 4vw, 48px);
}
.prose {
	max-width: 38em;
}

/* ==========================================================================
   Home: TV still-life (layout first; no animation, no screens yet)
   The centre picture is never scaled by window height: it keeps its size and the window's spare
   height becomes top/bottom padding in the backdrop colour (picture edges feathered with an eased mask on `.tv__col img`). It only shrinks when the
   window is too short to hold it, so there is never a scrollbar. Spare width repeats the picture's outer pixel columns
   sideways (placeholder: Matin will supply left/right padding pictures).
   Largest size: --tv-max = 1400px, or 70% of the window width on bigger screens.
   ========================================================================== */
@media (min-width: 721px) {
	html:has(body.home),
	body.home {
		height: 100svh;
		overflow: hidden;
	}
	body.home .site-header,
	body.home .site-footer {
		position: relative;
		z-index: 2;
		flex: none;
	}
	body.home .site-main {
		min-height: 0;
	}
}
.tv {
	--tv-max: max(1400px, 70vw); /* grows on big monitors; height still wins */
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
}
.tv__scene {
	position: relative;
	flex: 1;
	min-height: 0;
	container-type: size;
}
.tv__col,
.tv__side {
	--w: min(100cqw, var(--tv-max), calc(100cqh * var(--tv-iw) / var(--tv-ih)));
	position: absolute;
	/* Reach under the header and footer so the edge colour continues behind them. */
	top: -300px;
	bottom: -300px;
	left: calc(50% - var(--w) / 2 + var(--k) * var(--w));
	width: var(--w);
	padding: 300px 0;
	display: flex;
	align-items: center;
}
.tv__side {
	/* Spare width: the picture's outermost pixel column repeated sideways (placeholder for Matin's padding pictures). */
	display: block;
}
.tv__side--left {
	left: 0;
	width: calc(50% - var(--w) / 2);
}
.tv__side--right {
	right: 0;
	left: auto;
	width: calc(50% - var(--w) / 2);
}
.tv__scene .tv__side span {
	display: block;
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	height: calc(var(--w) * var(--tv-ih) / var(--tv-iw));
	transform: translateY(-50%);
	background-size: 100% 100%;
}
/* Spare width beside the centre picture: the left / right EXTENSION pictures (same height and scale as the centre picture, joined to its edges;
   tools/home_images.py). Behind them the outermost pixel columns as a plain fill, for windows wider than the extension. */
/* (the selectors start with .tv__scene so they outrank the generic `.tv__scene .tv__side span { background-size: 100% 100% }` above: the extension must keep its own proportions, never be squeezed into the spare width) */
.tv__scene .tv__side--left span { background-image: var(--side-l, none), var(--edge-l); background-size: auto 100%, 100% 100%; background-position: right center, center; background-repeat: no-repeat; }
.tv__scene .tv__side--right span { background-image: var(--side-r, none), var(--edge-r); background-size: auto 100%, 100% 100%; background-position: left center, center; background-repeat: no-repeat; }
.tv__pic {
	position: relative;
	width: 100%;
}
.tv__col img,
.tv__side span {
	width: 100%;
	height: auto;
	/* Feather the picture's top and bottom edges into the page backdrop (the padding is plain --backdrop). */
	-webkit-mask-image: linear-gradient(to bottom, transparent 0, rgba(0,0,0,.08) 6%, rgba(0,0,0,.3) 14%, rgba(0,0,0,.65) 24%, rgba(0,0,0,.9) 33%, #000 42%, #000 82%, rgba(0,0,0,.7) 90%, rgba(0,0,0,.25) 96%, transparent 100%);
	mask-image: linear-gradient(to bottom, transparent 0, rgba(0,0,0,.08) 6%, rgba(0,0,0,.3) 14%, rgba(0,0,0,.65) 24%, rgba(0,0,0,.9) 33%, #000 42%, #000 82%, rgba(0,0,0,.7) 90%, rgba(0,0,0,.25) 96%, transparent 100%);
}
.tv__list {
	display: none;
	margin: 0;
	padding: 0;
	list-style: none;
}
.tv__slogan {
	position: relative;
	z-index: 2;
	flex: none;
	margin: 0;
	padding: 8px var(--gutter) 14px;
	font-family: var(--mono);
	font-size: clamp(16px, 1.35vw, 20px);   /* regular weight, larger than before (was 13px); same grey as on the phone */
	font-weight: 400;
	letter-spacing: .06em;
	color: var(--ink-soft);
	text-align: center;
}

/* ---------- Phone ---------- */
@media (max-width: 720px) {
	:root {
		--header-h: 76px;
	}
	.site-logo {
		width: 42px;
	}
	.site-nav a {
		font-size: 14px;
	}
	/* The picture is sized so that all the monitors (from the first one's left edge to the last one's right edge: --mon-s / --mon-e, fractions of
	   the picture width, set from $mon_start_px / $mon_end_px in inc/home.php) fill the window width between the side gutters. */
	.tv__scene {
		--w-phone: calc((100vw - 2 * var(--gutter)) / (var(--mon-e) - var(--mon-s)));
		container-type: normal;
		overflow: hidden;
		height: calc(var(--w-phone) * var(--tv-ih) / var(--tv-iw));
		flex: none;
	}
	.tv__side {
		display: none;
	}
	.tv__col {
		--w: var(--w-phone);
		top: 0;
		bottom: 0;
		padding: 0;
		left: calc(var(--gutter) - var(--mon-s) * var(--w));
	}
	.tv__list {
		display: grid;
		width: 100%;
		padding: 20px var(--gutter) 12px;
	}
	.tv__list a {
		display: flex;
		justify-content: space-between;
		padding: 15px 0;
		border-top: 1px solid var(--line);
		font-size: 20px;
		text-decoration: none;
	}
	.tv__list a::after {
		content: "\2192";
		color: var(--ink-soft);
	}
	.tv__list li:last-child a {
		border-bottom: 1px solid var(--line);
	}
	/* Phone: the slogan keeps its old size and sits right under the monitors, above the section list. */
	.tv__slogan {
		order: 1;
		padding-top: 14px;
		padding-bottom: 4px;
		font-size: 13px;
		letter-spacing: .04em;
		color: var(--ink-soft);
	}
	.tv__list {
		order: 2;
	}
	.site-footer {
		flex-direction: column;
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		transition: none !important;
		animation: none !important;
	}
}

/* ==========================================================================
   Inner pages
   ========================================================================== */
.site-main .page {
	max-width: 1400px;
}
.page__title {
	font-family: var(--mono);
	font-size: 14px;
	font-weight: 400;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--ink-soft);
	margin-bottom: clamp(20px, 3vw, 40px);
}
.crumb {
	margin: 0 0 20px;
	font-size: 14px;
}
.crumb a {
	text-decoration: none;
	color: var(--ink-soft);
}

/* Editor content: text keeps a readable measure, media can run wide. */
.flow > * {
	margin-top: 0;
	margin-bottom: 1.2em;
}
.flow > p,
.flow > ul,
.flow > ol,
.flow > h2,
.flow > h3,
.flow > blockquote {
	max-width: 40em;
}
/* Lead paragraph: chosen per paragraph in the editor (Paragraph block → Styles → "Lead paragraph"). */
.is-style-lead {
	font-size: clamp(19px, 1.7vw, 23px);
	line-height: 1.5;
}
.flow h2,
.flow h3 {
	margin-top: 2.2em;
	font-size: 15px;
	font-family: var(--mono);
	font-weight: 500;
	letter-spacing: .1em;
	text-transform: uppercase;
}
.flow figure {
	margin-left: 0;
	margin-right: 0;
}
.flow .wp-block-embed,
.flow .wp-block-video {
	margin-bottom: clamp(24px, 4vw, 48px);
}
.flow .wp-block-embed__wrapper {
	background: var(--ink);
}
.flow iframe {
	display: block;
	width: 100%;
}
.flow figcaption,
.flow .wp-element-caption {
	margin-top: 8px;
	font-size: 13px;
	color: var(--ink-soft);
	text-align: left;
}
.flow--gallery .wp-block-gallery {
	gap: clamp(8px, 1.2vw, 16px);
}

.section {
	margin-top: clamp(56px, 8vw, 112px);
}
.section--first {
	margin-top: 0;
}
.section__title {
	margin-bottom: clamp(18px, 2.4vw, 32px);
	padding-top: 14px;
	border-top: 1px solid var(--line);
	font-family: var(--mono);
	font-size: 14px;
	font-weight: 400;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--ink-soft);
}

/* ---------- Grids ---------- */
.cards {
	display: grid;
	margin: 0;
	padding: 0;
	list-style: none;
}
.card__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.contact-line {
	margin: clamp(48px, 7vw, 96px) 0 0;
	font-size: clamp(18px, 1.6vw, 22px);
}

/* ---------- Page cards (Photography series, Studio works, any group of pages) ---------- */
.cards {
	grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
	gap: clamp(28px, 4vw, 56px) clamp(16px, 2.4vw, 32px);
}
.card__link {
	display: block;
	text-decoration: none;
}
.card__img {
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: var(--tint);
}
.card__img img {
	transition: opacity var(--fade);
}
.card__link:hover img {
	opacity: .86;
}
.card__title {
	margin-top: 14px;
	font-size: clamp(20px, 1.8vw, 26px);
}
.card__text {
	margin: 6px 0 0;
	max-width: 34em;
	font-size: 15px;
	color: var(--ink-soft);
}

@media (max-width: 1000px) {
	.cards { grid-template-columns: repeat(min(var(--cols, 3), 2), minmax(0, 1fr)); }
}
@media (max-width: 560px) {
	.cards { grid-template-columns: minmax(0, 1fr); }
}
.flow > ul.cards { max-width: none; }
.cards--square .card__img { aspect-ratio: 1; }
.cards--portrait .card__img { aspect-ratio: 4 / 5; }

/* ---------- About + contact ---------- */
.about {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
	gap: clamp(24px, 5vw, 72px);
	align-items: start;
}
.about > .flow:only-child {
	grid-column: 1 / -1;
}
.slogan {
	margin: clamp(48px, 7vw, 96px) 0 0;
	font-family: var(--mono);
	font-size: clamp(18px, 2vw, 26px);
	letter-spacing: .02em;
}
.contact__grid {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
	gap: clamp(24px, 5vw, 72px);
}
.contact__intro p {
	margin: 0 0 8px;
	font-size: clamp(18px, 1.6vw, 22px);
}
.contact__form {
	max-width: 560px;
}
.contact__form p {
	margin: 0 0 18px;
}
.contact__form label {
	display: block;
	font-size: 13px;
	color: var(--ink-soft);
}
.contact__form input[type="text"],
.contact__form input[type="email"],
.contact__form textarea {
	display: block;
	width: 100%;
	margin-top: 6px;
	padding: 10px 0;
	border: 0;
	border-bottom: 1px solid var(--ink-soft);
	border-radius: 0;
	background: transparent;
	color: var(--ink);
	font: inherit;
}
.contact__form textarea {
	min-height: 140px;
	resize: vertical;
}
.contact__form input:focus,
.contact__form textarea:focus {
	outline: none;
	border-bottom-color: var(--accent);
	box-shadow: 0 1px 0 var(--accent);
}
.contact__form input[type="submit"] {
	padding: 12px 28px;
	border: 1px solid var(--ink);
	background: transparent;
	color: var(--ink);
	font: inherit;
	font-size: 15px;
	cursor: pointer;
	transition: background-color var(--fade), color var(--fade), border-color var(--fade);
}
.contact__form input[type="submit"]:hover {
	background: var(--accent);
	border-color: var(--accent);
	color: var(--backdrop);
}
.wpcf7-not-valid-tip,
.wpcf7-response-output {
	font-size: 13px;
}
.wpcf7 form .wpcf7-response-output {
	margin: 12px 0 0;
	padding: 10px 12px;
	border: 1px solid var(--ink-soft);
}

@media (max-width: 720px) {
	.about,
	.contact__grid {
		grid-template-columns: 1fr;
	}
}

/* "Contact" is a jump link into About: never mark it as the current page. */
.site-nav .menu-item-type-custom.current-menu-item > a {
	border-bottom-color: transparent;
}

/* ---------- About: portrait beside the bio ---------- */
.about {
	display: block;
}
.about--portrait {
	display: grid;
	grid-template-columns: minmax(0, 38fr) minmax(0, 62fr);
	gap: clamp(28px, 6vw, 96px);
	align-items: start;
}
.about__portrait {
	margin: 0;
}
/* Fixed 4:5 frame, so the page keeps its shape whichever photo is set. */
.about__frame {
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background: var(--tint);
}
.about__frame img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 30%;
}
.about__portrait figcaption {
	margin-top: 10px;
	font-family: var(--mono);
	font-size: 12px;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--ink-soft);
}
.about__text .slogan {
	margin-top: clamp(28px, 4vw, 56px);
	padding-top: clamp(20px, 2.4vw, 32px);
	border-top: 1px solid var(--line);
	max-width: 40em;
}

/* ---------- Logo: inverts on hover (dark fill, letters in the backdrop colour) ---------- */
.site-logo {
	transition: background-color var(--fade), color var(--fade);
}
.site-logo:hover,
.site-logo:focus-visible {
	background-color: var(--ink);
	color: var(--backdrop);
}

@media (max-width: 720px) {
	.about--portrait {
		grid-template-columns: 1fr;
	}
}

/* ==========================================================================
   Type voices (Matin, 2026-11-11: "mono leads")
   Mono  = the label voice: navigation, footer, buttons, form labels, meta lines, captions.
   Inter = text you read (bio, statements, descriptions) and the names of works.
   ========================================================================== */
.site-nav a {
	font-family: var(--mono);
	font-size: 12px;
	letter-spacing: .12em;
	text-transform: uppercase;
}
.site-footer,
.site-footer a {
	font-family: var(--mono);
	font-size: 12px;
	letter-spacing: .04em;
}
.skip-link,
.crumb,
.crumb a {
	font-family: var(--mono);
	font-size: 12px;
	letter-spacing: .12em;
	text-transform: uppercase;
}
.tv__list a {
	font-family: var(--mono);
	font-size: 15px;
	letter-spacing: .12em;
	text-transform: uppercase;
}


/* Contact form: labels and button are label-voice; typed text stays Inter */
.contact__form label,
.wpcf7-not-valid-tip,
.wpcf7 form .wpcf7-response-output {
	font-family: var(--mono);
	font-size: 12px;
	letter-spacing: .08em;
	text-transform: uppercase;
}
.contact__form input[type="submit"] {
	font-family: var(--mono);
	font-size: 12px;
	letter-spacing: .12em;
	text-transform: uppercase;
}

@media (max-width: 720px) {
	.site-nav__list {
		gap: 6px 16px;
	}
	.site-nav a {
		font-size: 11px;
		letter-spacing: .1em;
	}
}

/* Footer breathes at the bottom like the header does at the top. */
.site-footer {
	min-height: var(--header-h);
	align-items: center;
	padding-top: 20px;
	padding-bottom: clamp(24px, 3vw, 36px);
}

/* TV screens (assets/home/masks, assets/js/home-tv.js): per TV, a masked screen (noise canvas) and an edge-light
   piece drawn with "screen" blending above it. The light's opacity is driven by the noise, so it flickers.
   States: idle = random noise, hover/focus = digital glitch, click = switched off (.is-off).
   Review view: see "Preview mode" at the end of this block (Home URL + ?soulpreview=1, local site only). */
.tv__tv {
	position: absolute;
	inset: 0;
	pointer-events: none;
}
.tv__screen {
	position: absolute;
	-webkit-mask: var(--mask) center / 100% 100% no-repeat;
	mask: var(--mask) center / 100% 100% no-repeat;
	border-radius: 12% / 16%;
	/* Blend: the content (idle noise and hover glitch) is ADDED onto the glass (plus-lighter), so the picture's painted
	   reflections stay visible through it. Alternatives: screen (softer add)
	   (stronger) or soft-light/overlay (gentler) by changing --screen-blend. The blend must sit on this masked
	   element: a mask isolates its children, so it would not reach the picture from the canvas. */
	mix-blend-mode: var(--screen-blend, plus-lighter);
	pointer-events: auto;
	cursor: pointer;
	outline: none;   /* no fill: a switched-off screen shows the picture's own glass */
}
.tv__noise {
	display: block;
	width: 100%;
	height: 100%;
	opacity: var(--snow-opacity, .55);   /* snow strength (WP Admin → Home TVs); it is ADDED onto the glass, so lower = more of the glass shows */
	filter: brightness(var(--lum, 1));   /* constant level, different for each TV (set in home-tv.js) */
}
.tv__eye {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	filter: brightness(var(--lum, 1));   /* same per-TV level as this TV's noise (--lum, set in home-tv.js) */
	pointer-events: none;   /* drawn by home-tv.js; added onto the glass with the rest of the content */
}
.tv__media {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: var(--content-opacity, .8);
	filter: brightness(var(--lum, 1));   /* same per-TV level as this TV's snow and eye */
	pointer-events: none;   /* top-menu hover contents, drawn by home-tv.js */
}
.tv__tv.is-off .tv__media {
	opacity: 0;
}
.tv__vids {
	position: fixed;
	left: 0;
	top: 0;
	width: 2px;
	height: 2px;
	opacity: 0;
	overflow: hidden;
	pointer-events: none;
}
.tv--preview.pv-no-eye .tv__eye {
	display: none;
}
.tv__tv.is-off .tv__eye {
	opacity: 0;
}
.tv__screen:focus-visible::after {
	content: "";
	position: absolute;
	inset: 0;
	border: 4px solid var(--accent);
	border-radius: inherit;
}
.tv__light {
	position: absolute;
	background-size: 100% 100%;
	background-repeat: no-repeat;
	mix-blend-mode: screen;
	opacity: calc(var(--glow, .13) * var(--gain, 1));   /* --glow: shared flicker (home-tv.js); --gain: this region's strength */
	transition: opacity .04s linear;
	pointer-events: none;
}
.tv__light[data-region="ground"] {
	opacity: calc(var(--glow, .13) * var(--glow, .13) * 2.5 * var(--gain, 1));   /* floor glow: nearly off at idle, full on hover (square of the shared flicker) */
}
.tv__tv.is-off .tv__noise {
	opacity: 0;
}
/* Optional dark glass under the content (--glass-base 0..1, off at the moment: Matin wants the painted glass
   reflections to show through the added content). On switch-off it would stay until the picture has collapsed. */
.tv__base {
	position: absolute;
	-webkit-mask: var(--mask) center / 100% 100% no-repeat;
	mask: var(--mask) center / 100% 100% no-repeat;
	background: rgb(8 9 8 / var(--glass-base, 0));   /* 0 = off: the content is added onto the picture's own glass and its reflections */
	pointer-events: none;
	transition: opacity .12s linear;
}
.tv__tv.is-off .tv__base {
	opacity: 0;
	transition: opacity .3s ease .45s;
}
.tv__tv.is-switching .tv__light {
	transition-duration: .5s;
}
.tv__tv.is-off .tv__light {
	opacity: 0;
}

/* ---------- Preview mode (review tool, local only; ?soulpreview=1 or option soul_preview_mode) ---------- */
/* Each layer has a toggle (legend panel, home-preview.js): classes pv-no-<layer> on .tv switch it off. */
.tv--preview .tv__screen::after {
	content: "";
	position: absolute;
	inset: 0;
	background: color-mix(in srgb, var(--c) 70%, transparent);   /* screen mask, over the noise */
}
.tv--preview.pv-no-screenmask .tv__screen::after {
	display: none;
}
.tv--preview.pv-no-light .tv__light {
	opacity: 0 !important;                                         /* real edge light off */
}
.tv--preview:not(.pv-no-lightmask) .tv__light {
	background-color: var(--c);                                   /* edge-light mask: the light piece, coloured */
	background-blend-mode: multiply;
	filter: brightness(3.2);
	opacity: 1 !important;
	outline: 1px dashed var(--c);
}
.tv--preview:not(.pv-no-lightmask) .tv__light:not([data-region="face"]) {
	outline-style: dotted;   /* extra regions (ground etc.) */
}
.tv--preview.pv-no-letters .tv__tag {
	display: none;
}
.tv--preview.pv-no-snow .tv__noise,
.tv--preview.pv-no-snow .tv__base {
	visibility: hidden;                                            /* idle snow off: the picture's own glass */
}
.tv__tag {
	position: absolute;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	font: 700 min(4cqw, 56px) / 1 var(--mono);
	color: #fff;
	text-shadow: 0 0 3px #000, 0 0 8px #000, 0 0 14px #000;
}
.tv__legend {
	position: fixed;
	left: 12px;
	bottom: 12px;
	z-index: 50;
	display: grid;
	gap: 4px;
	max-width: 260px;
	padding: 10px 12px;
	background: rgb(20 20 20 / .86);
	color: #eee;
	font: 12px / 1.4 var(--mono);
}
.tv__legend span {
	opacity: .75;
}
.tv__toggles {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 3px 12px;
	margin: 2px 0;
}
.tv__toggles label {
	display: flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
}
.tv__toggles input {
	margin: 0;
	accent-color: var(--accent);
}
.tv__legend ul {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2px 12px;
	margin: 4px 0 0;
	padding: 0;
	list-style: none;
}
.tv__legend li b {
	display: inline-block;
	width: 1.6em;
	text-align: center;
	background: var(--c);
	color: #000;
}

/* Live view inside WP Admin → Home TVs: no legend (the admin page has the controls) */
.tv--embed .tv__legend {
	display: none;
}

/* Film grain and vintage look (home-film.js; WP Admin → Home TVs → Film look): a fixed layer over the whole visible window.
   It sits above the TVs and everything on them, below the header and footer text (those are z-index 2). */
body.home .site-header,
body.home .site-footer {
	position: relative;
	z-index: 2;
}
.tv__film {
	position: fixed;
	inset: 0;
	z-index: 1;
	overflow: hidden;
	pointer-events: none;
}
.tv__film > div {
	position: absolute;
	inset: 0;
	display: none;                 /* home-film.js switches each effect on */
}
.tv__film-grain,
.tv__film-dust {
	background-repeat: repeat;
}

/* VFX page intro: the text on the left, the portrait with its caption on the right (a Columns block with the class "vfx-intro";
   it stacks on narrow screens). The first paragraph keeps the larger lead size it has elsewhere. */
.vfx-intro {
	align-items: flex-start;   /* text starts level with the top of the photo */
	gap: clamp(28px, 5vw, 80px);
	margin-bottom: clamp(36px, 5vw, 72px);
}
.vfx-intro .wp-block-column > p {
	max-width: 36em;
	margin: 0 0 1.2em;
}
.vfx-intro .wp-block-column > p:last-child {
	margin-bottom: 0;
}
.vfx-intro .wp-block-image {
	margin: 0;
}
.vfx-intro .wp-block-image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
}
.vfx-intro figcaption {
	margin: 10px 0 0;
	font-family: var(--mono);
	font-size: 12px;
	line-height: 1.5;
	letter-spacing: .02em;
	text-align: left;
	color: var(--ink-soft);
}

/* Section titles with a delicate rule: the title, then a hairline that runs to the end of the width (class "section-line" on a Heading block;
   used for "Demoreel" and "Films and series" on the VFX page). */
.site-main h2.wp-block-heading,
.flow h2.section-line {
	display: flex;
	align-items: center;
	gap: 18px;
	max-width: none;
	margin-bottom: clamp(18px, 2.4vw, 32px);
	padding-top: 0;
	border-top: 0;
	font-family: var(--mono);
	font-size: 14px;
	font-weight: 400;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--ink-soft);
}
/* RULE for the whole site: every Heading block set to level 2 gets the title + hairline. Level 3 stays a plain small heading. */
.site-main h2.wp-block-heading::after,
.flow h2.section-line::after {
	content: "";
	flex: 1 1 auto;
	height: 1px;
	background: var(--line);
}

/* Header and footer: the same on every page, Home included.
   A hairline runs the full width of the screen, from the left edge to the right edge: under the header, above the footer.
   Logo, menu and footer text sit on the same left and right margins as the page content (the content column is 1400px wide at most). */
.site-header,
.site-footer {
	--edge: max(var(--gutter), calc((100% - 1400px) / 2 + var(--gutter)));
	padding-left: var(--edge);
	padding-right: var(--edge);
}
.site-header {
	border-bottom: 1px solid var(--line);
}
.site-footer {
	border-top: 1px solid var(--line);
}

/* ---------- Page texts live in the page content (edited in the page editor) ---------- */
/* VFX contact line: a paragraph at the end of the page content */
.flow > p.contact-line {
	max-width: none;
	margin: clamp(48px, 7vw, 96px) 0 0;
	font-size: clamp(18px, 1.6vw, 22px);
	line-height: 1.4;
}
/* section titles with a top rule (Photography "Series" / "Selected Work", About "Contact") span the whole width */
.flow > h2.section__title {
	max-width: none;
}
/* About: the portrait is an Image block inside the group "about__portrait" (fixed 4:5 frame, caption under it) */
.about__portrait .wp-block-image {
	margin: 0;
}
.about__portrait .wp-block-image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	object-position: 50% 30%;
	background: var(--tint);
}
/* About: the bio paragraphs sit directly in the group "about__text" */
.about__text > p {
	max-width: 40em;
	margin: 0 0 1.2em;
}
/* About: the contact blocks are groups too */
.contact__intro > p,
.contact__form > p {
	margin-top: 0;
}

/* ---------- About portrait, Image style "Soft blend with line" in the editor (really: the frame crop) ----------
   The left column is a thin-line frame as tall as the bio, down to the divider above the slogan (about-frame.js sets the height; 4:5 without it).
   The photo is the actual crop (black and white, cut to the hand-to-hair width, full height of the picture), as wide as the frame and anchored to
   the bottom. If the frame is taller than the photo, the empty top is filled with the same tone, shaded like the photo's own top row (sampled for THIS photo:
   249 on the left to 237 on the right, as the black-percent stops below). Another photo needs new numbers. Without the style the
   Image block is the plain hard 4:5 crop. */
.about__portrait:has(.is-style-blend) {
	position: relative;
	aspect-ratio: 4 / 5;
	align-self: start;
	overflow: hidden;
	container-type: inline-size;
	/* the photo's white becomes a lighter tone of the page colour (the photo is multiplied onto it); the grey above the photo matches it */
	--frame-tint: color-mix(in srgb, var(--backdrop) 60%, #fff);
	background: var(--frame-tint);
}
.about__portrait:has(.is-style-blend)::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	bottom: var(--ph, calc(100cqw * 1333 / 980));   /* above the photo (its height) */
	background: linear-gradient(to right, color-mix(in srgb, var(--frame-tint) 97.6%, #000), color-mix(in srgb, var(--frame-tint) 97.3%, #000), color-mix(in srgb, var(--frame-tint) 96.9%, #000), color-mix(in srgb, var(--frame-tint) 96.1%, #000), color-mix(in srgb, var(--frame-tint) 95.3%, #000), color-mix(in srgb, var(--frame-tint) 94.5%, #000), color-mix(in srgb, var(--frame-tint) 92.9%, #000));
}
.about__portrait:has(.is-style-blend)::after {
	content: "";
	position: absolute;
	inset: 0;
	/* no outline for now (was: border: 1px solid var(--ink)); the frame is shown by the photo and its tint alone */
	pointer-events: none;
	z-index: 2;
}
.about__portrait .wp-block-image.is-style-blend {
	margin: 0;
}
.about__portrait .wp-block-image.is-style-blend img {
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	max-width: none;
	height: auto;
	aspect-ratio: auto;
	object-fit: contain;
	background: none;
	mix-blend-mode: multiply;
}
.is-fitted .about__portrait:has(.is-style-blend) {
	aspect-ratio: auto;
}
.is-fitted .about__portrait .wp-block-image.is-style-blend img {
	width: var(--pw);
	left: var(--px);
}
/* Narrower than 1000px (JS stops fitting at the same width): the portrait goes on top of the bio and the bio takes the full width.
   The frame spans the full width; the photo is anchored to its bottom right, the empty part is on the left (the photo's own wall tone, matching its
   left edge: grey 249). about-frame.js sets the frame height and the photo width: wide and short at 1000px (about half empty), growing taller
   as the window narrows until the photo fills the width (portrait, about 4:5) on a phone. The values here are the fallback without the script. */
@media (max-width: 1000px) {
	.about--portrait:has(.is-style-blend) {
		grid-template-columns: minmax(0, 1fr);
	}
	.about__portrait:has(.is-style-blend) {
		--stack-h: clamp(300px, 64vw, 600px);
		max-width: none;
		height: var(--stack-h);
		aspect-ratio: auto;
	}
	.about__portrait:has(.is-style-blend)::before {
		top: 0;
		bottom: 0;
		left: 0;
		right: var(--pw, calc(var(--stack-h) * 980 / 1333));
		background: color-mix(in srgb, var(--frame-tint) 97.6%, #000);
	}
	.about__portrait .wp-block-image.is-style-blend img {
		left: auto;
		right: 0;
		bottom: 0;
		width: var(--pw, auto);
		height: auto;
		aspect-ratio: 980 / 1333;
	}
	.about--portrait:has(.is-style-blend) .about__text > p {
		max-width: none;
	}
	.about--portrait:has(.is-style-blend) .about__text .slogan {
		max-width: none;
	}
}

/* ---------- Photography: the intro text in two columns at full width ----------
   Group "photo-intro" > group "photo-intro__text" (the heading and paragraphs). The heading spans both columns; under 1000px it is one column. */
.photo-intro {
	margin-bottom: clamp(40px, 6vw, 80px);
}
.photo-intro__text {
	column-count: 2;
	column-gap: clamp(32px, 6vw, 96px);
}
.photo-intro__text > h3 {
	column-span: all;
	margin: 0 0 1.2em;
}
.photo-intro__text > p {
	max-width: none;
	margin: 0 0 1.2em;
	break-inside: avoid;
}
/* the first paragraph is the left column; from the second paragraph on, the text is the right column */
.photo-intro__text > p:nth-of-type(2) {
	break-before: column;
}
@media (max-width: 1000px) {
	.photo-intro__text {
		column-count: 1;
	}
	.photo-intro__text > p:nth-of-type(2) {
		break-before: auto;
	}
}
