/*
Theme Name: Half Remembered Dreams
Description: Minimal dark portfolio theme. Uniform gallery grid, fullscreen shoot slider. Photos speak for themselves.
Version: 1.0.0
Author: Half Remembered Dreams
Text Domain: half-remembered-dreams
*/

/*
 * Montserrat (SIL Open Font License 1.1), self-hosted variable subsets.
 * Stands in for Gotham Bold — the Inception title face — which is a
 * commercial Hoefler & Co. typeface and cannot be self-hosted without a
 * licence. Montserrat is the closest open-licensed geometric grotesque.
 */
@font-face {
	font-family: "Montserrat";
	src: url("assets/fonts/montserrat-latin.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
	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: "Montserrat";
	src: url("assets/fonts/montserrat-latin-ext.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
	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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
	--font-display: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
	/* Film grain strength. The texture is sparse bright flecks on black (see
	   .grain), so this can run high without greying the background.
	   0 turns it off entirely. */
	--grain: 0.55;
	--bg: #0a0a0a;
	--fg: #f2f0ec;
	--fg-dim: rgba(242, 240, 236, 0.55);
	--overlay: rgba(10, 10, 10, 0.35);
	--ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Cross-fade between pages, and morph the clicked cover into the gallery's
   first photo where the browser supports it. */
@view-transition { navigation: auto; }

::view-transition-old(root),
::view-transition-new(root) { animation-duration: 0.4s; }

::view-transition-group(hrd-hero) {
	animation-duration: 0.6s;
	animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { background: var(--bg); }

body {
	/* No background here on purpose: html supplies the black. A background on
	   body paints above negative z-index children, which would bury the grain. */
	color: var(--fg);
	font-family: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

::selection { background: var(--fg); color: var(--bg); }

/* ---------- Home ---------- */

.site-title {
	width: 100%;
	font-family: var(--font-display);
	font-weight: 700; /* Gotham Bold equivalent — the Inception title weight */
	line-height: 1;
	text-transform: uppercase;
}

.site-title a { display: block; width: 100%; border: none; }

/* The monogram is baked SVG outlines, so its box is already tight to the ink —
   that exact width is what the wordmark below matches. */
.site-monogram { display: block; }

/* Scales with the cell, so the lockup can never outgrow it. */
.site-monogram svg {
	display: block;
	width: 100%;
	height: auto;
}

/* width:0 keeps the wordmark out of the header's intrinsic width, then
   min-width:100% stretches it to exactly the monogram's width. space-between
   spreads the words across that width. */
.site-wordmark {
	display: flex;
	justify-content: space-between;
	width: 0;
	min-width: 100%;
	margin-top: 0.5em;
	font-size: clamp(0.45rem, 1vw, 0.9rem);
	letter-spacing: 0.04em;
	white-space: nowrap;
}

.grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 0;
	min-height: 100vh;
	min-height: 100svh;
}

/* Empty first cell so the logo sits on black and stays readable. The spread
   box-shadow bleeds that black softly onto the photos around it, so the cell
   doesn't read as a hard rectangular hole in the grid. */
.grid-spacer {
	position: relative;
	z-index: 1;
	display: flex;
	/* column, or the byline sits beside the lockup instead of beneath it */
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: clamp(1.75rem, 3.2vw, 2.75rem);
	aspect-ratio: 4 / 5;
	/* Transparent so the grain shows in the logo cell; the shadow still bleeds
	   black onto the photos around it. */
	box-shadow: 0 0 clamp(50px, 7vw, 130px) clamp(28px, 4vw, 75px) var(--bg);
	color: var(--fg);
}

.grid-item {
	position: relative;
	display: block;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background: #141414;
	transition: opacity 0.45s ease;
}

/* Hovering one shoot steps the rest back, so the one you're looking at is the
   only thing at full strength. */
.grid:has(.grid-item:hover) .grid-item:not(:hover) { opacity: 0.4; }

/* ---------- Entrance ---------- */

/* Only active once JS has run, so the grid is never stuck invisible. */
html.hrd-anim .grid-item,
html.hrd-anim .grid-spacer { opacity: 0; }

html.hrd-anim.hrd-ready .grid-item,
html.hrd-anim.hrd-ready .grid-spacer {
	animation: hrd-rise 0.85s var(--ease) forwards;
	/* Capped, so the tail of a long grid doesn't crawl in. */
	animation-delay: calc(min(var(--i, 0), 22) * 45ms);
}

@keyframes hrd-rise {
	from { opacity: 0; transform: translateY(18px); }
	to { opacity: 1; transform: none; }
}

/* ---------- Film grain (home page only) ---------- */

/*
 * Sparse bright flecks over the whole page — photos included — like emulsion.
 *
 * The trick is that the tile is TRANSPARENT apart from the specks: feColorMatrix
 * forces RGB to white and moves the noise into the alpha channel, then the steep
 * transfer (slope 8, intercept -5.6) clears everything below ~0.7 and ramps the
 * top tail to opaque. So it needs no blend mode at all — it only ever adds
 * specks, and can never darken a photograph.
 *
 * That matters: the previous version was an opaque mostly-black tile, which only
 * worked sitting behind the photos (hence grain on the blank cell alone). On top
 * it would have dimmed every photo by the layer's opacity.
 *
 * color-interpolation-filters=sRGB keeps the maths in display space.
 * Dial --grain, or set it to 0 to remove.
 */
.grain {
	position: fixed;
	inset: 0;
	z-index: 40;
	pointer-events: none;
	opacity: var(--grain);
	background-repeat: repeat;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.55' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='8' intercept='-5.6'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
	/* steps(1) holds each keyframe then jumps to the next, so the grain boils
	   frame to frame rather than sliding. */
	animation: hrd-grain 0.8s steps(1) infinite;
}

/*
 * Shifts background-position, NOT transform. A transform would promote this to
 * its own compositing layer, and a blended element in a separate compositing
 * context from its backdrop can have mix-blend-mode silently dropped in
 * Chromium — the grain then paints with no blend at all, i.e. invisibly.
 */
@keyframes hrd-grain {
	0% { background-position: 0 0; }
	12.5% { background-position: -38px 22px; }
	25% { background-position: 41px -31px; }
	37.5% { background-position: -27px -44px; }
	50% { background-position: 33px 36px; }
	62.5% { background-position: -45px 12px; }
	75% { background-position: 19px -24px; }
	87.5% { background-position: -14px 40px; }
	100% { background-position: 0 0; }
}

/* Keep it still on phones — a full-screen blended layer is not worth the battery. */
@media (max-width: 700px) {
	.grain { animation: none; }
}

/* Sound toggle: quiet, bottom-left, remembered between visits. */
.hrd-sound {
	position: fixed;
	left: clamp(1.8rem, 3.5vw, 3.2rem);
	bottom: clamp(1.5rem, 4vh, 2.6rem);
	z-index: 45;
	display: inline-flex;
	align-items: center;
	gap: 0.7em;
	padding: 0;
	border: 0;
	background: none;
	color: var(--fg-dim);
	font-family: var(--font-display);
	font-size: 0.62rem;
	font-weight: 600;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	cursor: pointer;
	transition: color 0.3s ease;
}

.hrd-sound:hover { color: var(--fg); }

.hrd-sound::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: currentColor;
	opacity: 0.3;
	transition: opacity 0.3s ease;
}

.hrd-sound.is-on::before { opacity: 1; }

/* ---------- Profile ---------- */

.profile-page {
	position: fixed;
	inset: 0;
	z-index: 41; /* above the grain, as on gallery pages */
	display: flex;
	align-items: center;
	justify-content: flex-start;
	padding: clamp(2rem, 7vw, 6rem);
	text-align: left;
	background: var(--bg);
}

/*
 * The portrait sits to the right of its frame with open colour to the left, so
 * the type goes in that space and the scrim runs sideways rather than over the
 * whole picture. Keeps the subject at full strength.
 */
.profile-page.has-portrait::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: var(--portrait);
	background-size: cover;
	background-position: 72% center;
}

.profile-page.has-portrait::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to right,
		rgba(10, 10, 10, 0.72),
		rgba(10, 10, 10, 0.4) 42%,
		rgba(10, 10, 10, 0) 68%
	);
}

/* Wide enough for the name to read as the hero: the baked lettering is roughly
   12:1, so the column width sets its height. */
.profile-inner {
	position: relative;
	z-index: 2;
	width: min(88vw, 38rem);
}

/* Too narrow to hold type beside the subject — centre it and drop the scrim
   to the foot of the frame instead. */
@media (max-width: 700px) {
	.profile-page {
		justify-content: center;
		text-align: center;
	}

	.profile-page.has-portrait::before { background-position: 62% center; }

	.profile-page.has-portrait::after {
		background: linear-gradient(to bottom, rgba(10, 10, 10, 0.35), rgba(10, 10, 10, 0.85));
	}

	/* fit-content would otherwise leave it hanging left of centred text */
	.profile-page .profile-back { margin-left: auto; margin-right: auto; }
}

/* Baked outlines rather than type, so it scales to the column like the mark. */
.profile-name {
	filter: drop-shadow(0 2px 24px rgba(0, 0, 0, 0.65));
}

.profile-name svg {
	display: block;
	width: 100%;
	height: auto;
}

.profile-role {
	margin-top: 1.2rem;
	font-family: var(--font-display);
	font-size: clamp(0.6rem, 1.2vw, 0.8rem);
	font-weight: 500;
	letter-spacing: 0.34em;
	text-indent: 0.34em;
	text-transform: uppercase;
	color: var(--fg-dim);
}

.profile-social {
	display: inline-flex;
	align-items: center;
	gap: 0.9em;
	margin-top: 3rem;
	font-family: var(--font-display);
	font-size: 0.62rem;
	font-weight: 600;
	letter-spacing: 0.28em;
	text-transform: lowercase;
	color: var(--fg-dim);
	transition: color 0.3s ease;
}

.profile-social:hover { color: var(--fg); }

.profile-social svg {
	width: clamp(22px, 2.4vw, 28px);
	height: auto;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.5;
}

.profile-social svg .dot { fill: currentColor; stroke: none; }

/* Placement only — .shoot-back supplies the underline, size and hover. The
   extra class outranks it so the link takes its own line under the column. */
.profile-page .profile-back {
	display: flex;
	width: fit-content;
	margin-top: 2.8rem;
}

/*
 * A credit line, not part of the mark. Deliberately unlike the wordmark above
 * it — sentence case, barely tracked, dimmer — so the logo stays the logo.
 */
.site-byline {
	display: block;
	margin-top: 2.2em;
	font-family: var(--font-display);
	font-size: clamp(0.6rem, 0.75vw, 0.72rem);
	font-weight: 400;
	letter-spacing: 0.06em;
	color: rgba(242, 240, 236, 0.4);
	transition: color 0.3s ease;
}

.site-byline:hover { color: var(--fg); }

/* ---------- Contact ---------- */

.hrd-contact-open {
	position: fixed;
	right: clamp(1.8rem, 3.5vw, 3.2rem);
	bottom: clamp(1.5rem, 4vh, 2.6rem);
	z-index: 45;
	font-family: var(--font-display);
	font-size: 0.62rem;
	font-weight: 600;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	color: var(--fg-dim);
	transition: color 0.3s ease;
}

.hrd-contact-open:hover { color: var(--fg); }

/* Gallery pages already use the bottom-right for the counter. */
.single-shoot .hrd-contact-open { display: none; }

/* Opened by :target, so it works without JavaScript. */
.contact-panel {
	position: fixed;
	inset: 0;
	z-index: 150;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 2rem;
	background: rgba(10, 10, 10, 0.96);
}

.contact-panel:target { display: flex; }

.contact-close {
	position: absolute;
	top: clamp(1.5rem, 4vh, 2.6rem);
	right: clamp(1.8rem, 3.5vw, 3.2rem);
	font-size: 2rem;
	line-height: 1;
	color: var(--fg-dim);
	transition: color 0.3s ease;
}

.contact-close:hover { color: var(--fg); }

.contact-inner { width: min(100%, 30rem); }

.contact-heading {
	font-family: var(--font-display);
	font-size: clamp(1.1rem, 2.4vw, 1.6rem);
	font-weight: 700;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	margin-bottom: 1.8rem;
}

.contact-note {
	margin-bottom: 1.5rem;
	font-family: var(--font-display);
	font-size: 0.72rem;
	letter-spacing: 0.16em;
	color: var(--fg-dim);
}

.contact-form label {
	display: block;
	margin-bottom: 1.2rem;
}

.contact-form label span {
	display: block;
	margin-bottom: 0.5rem;
	font-family: var(--font-display);
	font-size: 0.6rem;
	font-weight: 600;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	color: var(--fg-dim);
}

.contact-form input,
.contact-form textarea {
	width: 100%;
	padding: 0.7rem 0;
	border: 0;
	border-bottom: 1px solid rgba(242, 240, 236, 0.25);
	background: none;
	color: var(--fg);
	font-family: inherit;
	font-size: 0.95rem;
	transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
	outline: none;
	border-bottom-color: var(--fg);
}

.contact-form textarea { resize: vertical; }

.contact-form button {
	margin-top: 0.6rem;
	padding: 0.9rem 2.4rem;
	border: 1px solid var(--fg);
	background: none;
	color: var(--fg);
	font-family: var(--font-display);
	font-size: 0.62rem;
	font-weight: 700;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.3s ease, color 0.3s ease;
}

.contact-form button:hover { background: var(--fg); color: var(--bg); }

/* Honeypot: off-screen rather than display:none, which bots skip. */
.contact-trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ---------- Locked gallery & not found ---------- */

.shoot-locked,
.error-page {
	position: fixed;
	inset: 0;
	z-index: 41;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem;
	text-align: center;
}

.locked-inner,
.error-inner { width: min(100%, 24rem); }

.locked-mark,
.error-mark {
	display: block;
	margin: 0 auto 2.5rem;
	width: min(60vw, 260px);
	color: var(--fg);
}

.locked-mark svg,
.error-mark svg { display: block; width: 100%; height: auto; }

.locked-title {
	font-family: var(--font-display);
	font-size: clamp(1rem, 2.2vw, 1.5rem);
	font-weight: 700;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	margin-bottom: 0.8rem;
}

.locked-note,
.error-note {
	margin-bottom: 2rem;
	font-family: var(--font-display);
	font-size: 0.65rem;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--fg-dim);
}

/* WordPress renders the password form itself, so style what it gives us. */
.shoot-locked form {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
}

.shoot-locked form p { font-size: 0; } /* hide core's explanatory copy */

.shoot-locked input[type="password"] {
	width: min(100%, 18rem);
	padding: 0.7rem 0;
	border: 0;
	border-bottom: 1px solid rgba(242, 240, 236, 0.25);
	background: none;
	color: var(--fg);
	font-family: inherit;
	font-size: 0.95rem;
	text-align: center;
}

.shoot-locked input[type="password"]:focus { outline: none; border-bottom-color: var(--fg); }

.shoot-locked input[type="submit"] {
	padding: 0.8rem 2.2rem;
	border: 1px solid var(--fg);
	background: none;
	color: var(--fg);
	font-family: var(--font-display);
	font-size: 0.62rem;
	font-weight: 700;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	cursor: pointer;
}

.locked-back,
.error-back {
	display: inline-flex;
	align-items: center;
	margin-top: 2.5rem;
	font-family: var(--font-display);
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	transition: opacity 0.3s ease;
}

.locked-back:hover,
.error-back:hover { opacity: 0.65; }

.locked-back .arrow,
.error-back .arrow { margin-right: 0.6em; font-size: 1.3em; line-height: 0.8; }

/* ---------- Returning visit: the short, silent version ---------- */

/*
 * No curtain and no sound. The grid is simply there, and the mark draws itself
 * in its own cell over about three seconds. Same wipe as the full intro, so the
 * two read as the same idea at different lengths.
 */
/* Matches the entrance rule's specificity (html + three classes) and comes
   later, so the grid is simply present rather than rising in. */
html.hrd-anim.hrd-short .grid-item,
html.hrd-anim.hrd-short .grid-spacer {
	opacity: 1;
	animation: none;
}

html.hrd-short .grid-spacer .site-monogram svg {
	clip-path: inset(0 100% 0 0);
	animation: hrd-wipe 1.5s var(--ease) 0.25s forwards;
}

html.hrd-short .grid-spacer .site-wordmark span {
	opacity: 0;
	animation: hrd-word-in 0.5s var(--ease) forwards;
}

html.hrd-short .grid-spacer .site-wordmark span:nth-child(1) { animation-delay: 1.75s; }
html.hrd-short .grid-spacer .site-wordmark span:nth-child(2) { animation-delay: 1.9s; }
html.hrd-short .grid-spacer .site-wordmark span:nth-child(3) { animation-delay: 2.05s; }

html.hrd-short .site-byline {
	opacity: 0;
	animation: hrd-word-in 0.5s ease 2.45s forwards; /* lands at ~2.95s */
}

/* ---------- Intro ---------- */

html.hrd-intro-pending body { overflow: hidden; }

/*
 * Five-act sequence, timings in seconds:
 *   0.15  a beam of light opens across the frame
 *   0.55  the monogram wipes in along it
 *   2.15  the three words land one after another
 *   2.60  the beam fades away
 *   4.20  the curtain lifts and the grid rises behind it
 */
.hrd-intro {
	position: fixed;
	inset: 0;
	z-index: 200;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--bg);
	color: var(--fg);
	transition: opacity 0.8s ease, transform 0.8s var(--ease);
}

.hrd-intro.is-done {
	opacity: 0;
	transform: scale(1.03);
	pointer-events: none;
}

.hrd-intro-inner {
	position: relative;
	width: min(62vw, 520px);
	animation: hrd-intro-breath 4.2s var(--ease) forwards;
}

.hrd-intro .site-title { width: 100%; }

/* The beam: a hairline that opens outward from the centre. */
.hrd-beam {
	position: absolute;
	top: 38%;
	left: 50%;
	width: 0;
	height: 1px;
	transform: translateX(-50%);
	background: var(--fg);
	opacity: 0.55;
	animation:
		hrd-beam-open 0.75s var(--ease) 0.15s forwards,
		hrd-beam-out 0.5s ease 2.6s forwards;
}

/* The monogram is filled outlines, so it reveals with a wipe. */
.hrd-intro .site-monogram svg {
	clip-path: inset(0 100% 0 0);
	animation: hrd-wipe 1.5s var(--ease) 0.55s forwards;
}

.hrd-intro .site-wordmark { opacity: 1; animation: none; }

.hrd-intro .site-wordmark span {
	opacity: 0;
	transform: translateY(8px);
	animation: hrd-word-in 0.5s var(--ease) forwards;
}

.hrd-intro .site-wordmark span:nth-child(1) { animation-delay: 2.15s; }
.hrd-intro .site-wordmark span:nth-child(2) { animation-delay: 2.35s; }
.hrd-intro .site-wordmark span:nth-child(3) { animation-delay: 2.55s; }

/* Shown only when the browser has refused audio. */
.hrd-intro-hint {
	position: absolute;
	left: 50%;
	bottom: clamp(2.5rem, 8vh, 5rem);
	transform: translateX(-50%);
	font-family: var(--font-display);
	font-size: 0.6rem;
	font-weight: 600;
	letter-spacing: 0.3em;
	text-indent: 0.3em;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--fg-dim);
	opacity: 0;
	animation: hrd-hint-in 0.6s ease 1.4s forwards, hrd-hint-pulse 2.4s ease 2s infinite;
}

@keyframes hrd-hint-in { to { opacity: 1; } }
@keyframes hrd-hint-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.45; }
}

@keyframes hrd-wipe { to { clip-path: inset(0 0 0 0); } }
@keyframes hrd-beam-open { to { width: 100%; } }
@keyframes hrd-beam-out { to { opacity: 0; } }
@keyframes hrd-word-in { to { opacity: 1; transform: none; } }

@keyframes hrd-intro-breath {
	from { transform: scale(0.97); }
	to { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
	html.hrd-anim .grid-item,
	html.hrd-anim .grid-spacer { opacity: 1; animation: none; }
	.hrd-intro { display: none; }
	.grid-item img { transition: none; }
	.grain { animation: none; }
}

.grid-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(1.001);
	/* Muted until hovered, so the one you're pointing at is the only one in
	   colour. */
	filter: grayscale(1) contrast(1.04);
	transition: transform 1.1s var(--ease), opacity 0.6s ease, filter 0.6s ease;
}

.grid-item:hover img,
.grid-item:focus-visible img { transform: scale(1.05); filter: none; }

.grid-item::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--overlay);
	opacity: 0;
	transition: opacity 0.5s ease;
}

.grid-item:hover::after,
.grid-item:focus-visible::after { opacity: 1; }

.grid-item .item-overlay {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.85em;
	padding: 1rem;
	text-align: center;
	opacity: 0;
	transform: scale(0.94);
	transition: opacity 0.4s ease, transform 0.55s var(--ease);
}

.grid-item .item-title {
	font-family: var(--font-display);
	font-size: clamp(0.9rem, 1.5vw, 1.15rem);
	font-weight: 700;
	letter-spacing: 0.3em;
	text-indent: 0.3em; /* optical centering: offsets trailing letter-space */
	text-transform: uppercase;
}

.grid-item .item-count {
	font-family: var(--font-display);
	font-size: clamp(0.55rem, 0.8vw, 0.7rem);
	font-weight: 500;
	letter-spacing: 0.28em;
	text-indent: 0.28em;
	text-transform: uppercase;
	color: var(--fg-dim);
}

.grid-item:hover .item-overlay,
.grid-item:focus-visible .item-overlay { opacity: 1; transform: scale(1); }

@media (hover: none) {
	.grid-item .item-overlay { opacity: 1; transform: none; }
	.grid-item::after { opacity: 1; background: rgba(10, 10, 10, 0.3); }
}

.site-footer {
	padding: 0 clamp(1.25rem, 4vw, 3.5rem) 3rem;
	font-size: 0.7rem;
	letter-spacing: 0.25em;
	text-transform: uppercase;
	color: var(--fg-dim);
}

/* ---------- Shoot slider ---------- */

/*
 * No background of its own: the page black comes from <html>, which lets the
 * grain layer beneath show through in the space around each photo.
 *
 * z-index 41 puts this whole surface ABOVE .grain (40) — that is what decouples
 * the two pages. On the grid the grain lies over the photos; here it lies under
 * them, so the photograph you are looking at is clean while the surround, and
 * the dimmed neighbours you can see through, still carry it. Raising the active
 * slide alone is not possible: .slider is transformed, so it forms a stacking
 * context its children cannot escape.
 */
.shoot-page { position: fixed; inset: 0; overflow: hidden; z-index: 41; }

/*
 * Ambient spill — a wash of the current photo's own colour bleeding into the
 * surround, like light coming off a screen. Sits above the grain (same z-index,
 * later in the DOM) and below every photo. background-color transitions
 * smoothly, which a gradient would not, so the shape comes from the mask.
 */
.shoot-spill {
	position: fixed;
	inset: -15%;
	z-index: -1;
	pointer-events: none;
	opacity: 0.42;
	background-color: transparent;
	transition: background-color 0.9s ease;
	-webkit-mask-image: radial-gradient(ellipse at center, #000 12%, transparent 66%);
	mask-image: radial-gradient(ellipse at center, #000 12%, transparent 66%);
}

/* Progress hairline along the foot of the slider. */
.slider-progress {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 20;
	height: 2px;
	background: rgba(242, 240, 236, 0.12);
}

.slider-progress span {
	display: block;
	width: 0;
	height: 100%;
	background: var(--fg);
	transition: width 0.5s var(--ease);
}

.shoot-header {
	position: fixed;
	/* Vertically centred on the left, opposite the counter in the far corner. */
	top: 50%;
	transform: translateY(-50%);
	left: clamp(2rem, 4.5vw, 3.6rem);
	z-index: 20;
	pointer-events: none;
	color: var(--fg);
	/* Plain white over the photo, with a soft shadow so it survives a bright
	   frame. Invisible against dark areas. */
	filter: drop-shadow(0 2px 20px rgba(0, 0, 0, 0.6));
}

.shoot-title {
	font-family: var(--font-display);
	font-size: clamp(1.8rem, 5vw, 3.8rem);
	font-weight: 700; /* Gotham Bold equivalent — the Inception title weight */
	letter-spacing: 0.28em;
	line-height: 1.1;
	text-transform: uppercase;
}

/* Baked Inception-face title art in place of text. */
.shoot-title.has-svg { letter-spacing: 0; }

.shoot-title svg {
	display: block;
	height: clamp(1.3rem, 3.5vw, 2.7rem);
	width: auto;
	max-width: min(70vw, 760px);
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.shoot-back {
	display: inline-flex;
	align-items: center;
	margin-top: 0.9rem;
	padding-bottom: 0.3rem;
	border-bottom: 2px solid currentColor;
	font-family: var(--font-display);
	font-size: clamp(0.95rem, 1.7vw, 1.3rem);
	font-weight: 700;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	pointer-events: auto;
	transition: opacity 0.3s ease;
}

.shoot-back:hover { opacity: 0.65; }

.shoot-back .arrow {
	display: inline-block;
	margin-right: 0.5em;
	font-size: 1.5em;
	line-height: 0.8;
	transition: transform 0.3s var(--ease);
}

.shoot-back:hover .arrow { transform: translateX(-7px); }

/* Horizontal filmstrip: every photo sits in one row, flush against its
   neighbours, and the track slides left. The photos either side of the current
   one stay fully visible, just dimmed. */
.slider {
	position: absolute;
	top: 0;
	left: 0;
	display: flex;
	align-items: center;
	height: 100vh;
	height: 100svh;
	transition: transform 0.75s var(--ease);
	/* Deliberately NO will-change: this track can be 60,000px+ wide, well past
	   the GPU's max texture size. Promoting it permanently forces the compositor
	   to tile it, and the tile edges show up as stray hairlines over the photos. */
}

.slide {
	position: relative;
	flex: 0 0 auto;
	margin: 0;
	overflow: hidden; /* keeps the blurred placeholder inside the frame */
	opacity: 0.35;
	transition: opacity 0.6s ease;
}

.slide.is-active { opacity: 1; }

/* Blur-up: the small rendition sits behind, blurred, until the full photo has
   decoded — the photo appears to develop rather than snap in from black. */
.slide::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: var(--thumb);
	background-position: center;
	background-size: cover;
	filter: blur(18px);
	transform: scale(1.08);
	transition: opacity 0.6s ease 0.1s;
}

.slide.is-loaded::before { opacity: 0; }

/* The figure already carries the photo's aspect ratio, so the image just fills it. */
.slide img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	opacity: 0;
	transition: opacity 0.6s ease;
}

.slide.is-loaded img { opacity: 1; }

/* Pairs with the clicked grid cover so the photo expands into the gallery. */
.slide[data-index="0"] img { view-transition-name: hrd-hero; }

@media (prefers-reduced-motion: reduce) {
	.slide img { transition: none; }
	.slide::before { transition: none; }
}

.slider-nav {
	position: fixed;
	top: 0;
	bottom: 0;
	width: 50%;
	z-index: 10;
	border: none;
	background: transparent;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

/* Chevron cursors, so the click zones explain themselves without any chrome.
   Older browsers that reject SVG cursors fall back to the resize keywords. */
.slider-nav.prev {
	left: 0;
	cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30'%3E%3Cpath d='M19 7l-8 8 8 8' fill='none' stroke='%23000' stroke-opacity='.45' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M19 7l-8 8 8 8' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 15 15, w-resize;
}

.slider-nav.next {
	right: 0;
	cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30'%3E%3Cpath d='M11 7l8 8-8 8' fill='none' stroke='%23000' stroke-opacity='.45' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M11 7l8 8-8 8' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 15 15, e-resize;
}

/* Dragging the strip: pinch-zoom still belongs to the browser. */
.shoot-page { touch-action: pinch-zoom; }
.shoot-page.is-dragging .slider-nav { cursor: grabbing; }
.shoot-page.is-dragging .slider { transition: none; }

/* Bottom-right, mirroring the title's size and padding in the opposite corner.
   Built from baked Inception-face glyphs, so it matches the title's face. */
.slider-counter {
	position: fixed;
	bottom: clamp(2rem, 5vh, 3.4rem);
	right: clamp(2rem, 4.5vw, 3.6rem);
	z-index: 20;
	color: var(--fg);
	filter: drop-shadow(0 2px 20px rgba(0, 0, 0, 0.6));
	transition: opacity 0.4s ease;
}

.counter-glyphs {
	display: flex;
	align-items: flex-end;
	gap: 0.12em;
	/* Same clamp as .shoot-title svg, so counter and title render at one size. */
	font-size: clamp(1.3rem, 3.5vw, 2.7rem);
}

/* Every glyph shares one box in the sprite, so one ratio sizes them all.
   Keep in step with the figure printed by scripts/make-digits.py. */
.counter-glyphs svg {
	display: block;
	height: 1em;
	width: auto;
	aspect-ratio: 629 / 932;
}

.counter-glyphs .sep { margin: 0 0.28em; }

.shoot-empty {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--font-display);
	color: var(--fg-dim);
	letter-spacing: 0.3em;
	text-transform: uppercase;
	font-size: 0.8rem;
}
