/*
Theme Name: Forward Motion Productions
Theme URI: https://forwardmotionproductions.org/
Description: Custom classic theme for Forward Motion Productions — a film and music production studio. Dark cinematic surface, single cyan brand accent, Fraunces (display) + Inter (body). Built with ACF for structured film content. Ported from the twentytwentyfive-fmp block theme; this is now the canonical FMP theme.
Author: Forward Motion Productions
Author URI: https://forwardmotionproductions.org/
Version: 0.3.3
Requires at least: 6.7
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fmp
*/

/* ============================================================
   Forward Motion Productions — Brand Tokens
   Locked via ui-ux-pro-max + taste. Do not modify without
   re-running both skills and reconciling against the live
   CLAUDE.md Brand System.
   ============================================================ */

:root {
	--fmp-bg:               #0A0B0E;
	--fmp-surface:          #13151A;
	--fmp-surface-elevated: #1B1E25;
	--fmp-fg:               #F5F7FA;
	--fmp-fg-muted:         #9AA3B2;
	--fmp-fg-subtle:        #5C6473;
	--fmp-border:           rgba(245, 247, 250, 0.08);
	--fmp-border-strong:    rgba(245, 247, 250, 0.16);
	/* Light-surface counterparts to --fmp-border* — for the white header/footer
	   chrome, where the light-on-dark hairlines above are invisible. Neutral
	   dark-alpha, no new hue. */
	--fmp-border-light:        rgba(10, 11, 14, 0.08);
	--fmp-border-light-strong: rgba(10, 11, 14, 0.14);
	--fmp-cyan:             #7CD5EC;
	--fmp-cyan-deep:        #4EBBDA;
	--fmp-cyan-glow:        rgba(124, 213, 236, 0.18);
	--fmp-peach:            #F4C9B5;
	--fmp-overlay:          rgba(10, 11, 14, 0.72);

	--fmp-ease:             cubic-bezier(0.2, 0, 0, 1);
	/* Entrance easing for scroll reveals + hero choreography (ease-out-expo:
	   fast arrival, long cinematic settle). Micro-interactions keep --fmp-ease. */
	--fmp-ease-out-expo:    cubic-bezier(0.19, 1, 0.22, 1);
	--fmp-dur-fast:         160ms;
	--fmp-dur-base:         220ms;
	--fmp-dur-slow:         320ms;
	--fmp-dur-reveal:       700ms;

	--fmp-maxw:             1280px;
	--fmp-font-display:     "Fraunces", Georgia, "Times New Roman", serif;
	--fmp-font-body:        "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ============================================================
   Reset / global surface
   (classic theme — no parent stylesheet, so these are owned here)
   ============================================================ */

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

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

html, body {
	margin: 0;
	padding: 0;
	background: var(--fmp-bg);
	color: var(--fmp-fg);
	font-family: var(--fmp-font-body);
	font-size: 16px;
	line-height: 1.55;
	font-feature-settings: "ss01", "cv11";
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

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

h1, h2, h3, h4, h5, h6 {
	font-family: var(--fmp-font-display);
	font-weight: 400;
	line-height: 1.15;
	letter-spacing: -0.01em;
	color: var(--fmp-fg);
}

p {
	line-height: 1.55;
}

a {
	color: var(--fmp-cyan);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
	text-decoration-color: var(--fmp-cyan);
	transition: text-decoration-thickness var(--fmp-dur-fast) var(--fmp-ease);
}

a:hover {
	text-decoration-thickness: 2px;
}

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

/* Keyboard skip link */
.fmp-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	padding: 0.75rem 1.25rem;
	background: var(--fmp-cyan);
	color: var(--fmp-bg);
	font-family: var(--fmp-font-body);
	font-weight: 600;
	text-decoration: none;
}

.fmp-skip-link:focus {
	left: 1rem;
	top: 1rem;
}

/* Tabular numerals on data fields */
.fmp-tabular,
.fmp-meta time,
.fmp-runtime,
.fmp-year {
	font-feature-settings: "tnum", "lnum";
	font-variant-numeric: tabular-nums lining-nums;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
}

/* ============================================================
   Preloader — full-screen logo intro, once per browser session
   ============================================================ */

.fmp-preload-lock, .fmp-preload-lock body { overflow: hidden; }

.fmp-preloader {
	position: fixed; inset: 0; z-index: 9999;
	display: grid; place-items: center;
	background: #FDFEFE; /* matches the logo video's canvas white so the frame blends seamlessly */
	opacity: 1; transition: opacity .45s cubic-bezier(0.2, 0, 0, 1);
}
/* The class sets display:grid, which would otherwise beat the UA [hidden]
   rule — keep [hidden] authoritative so no-JS / gated visitors see nothing. */
.fmp-preloader[hidden] { display: none; }
/* First-paint curtain: the head gate adds .fmp-preload-pending before paint on
   first visits, so the page never flashes before deferred preload.js takes
   over. Must out-rank the [hidden] rule above. */
html.fmp-preload-pending .fmp-preloader[hidden] { display: grid; }
html.fmp-preload-pending { overflow: hidden; }
.fmp-preloader.is-done { opacity: 0; pointer-events: none; }
.fmp-preloader-video {
	height: min(82vh, 760px);
	width: auto;
	max-width: 90vw;
	object-fit: contain;
	display: block;
	background: #FDFEFE; /* video elements default to black; keep any decode/letterbox gap white */
	/* Invisible until the video is actually rendering frames (.is-playing) — the
	   first frame held as a buffering still reads as the video loading twice. */
	opacity: 0;
	transition: opacity .2s cubic-bezier(0.215, 0.61, 0.355, 1);
}
.fmp-preloader.is-playing .fmp-preloader-video { opacity: 1; }
.fmp-preloader-skip {
	position: absolute; bottom: 2rem; right: 2rem;
	background: transparent; color: var(--fmp-fg-subtle);
	border: 1px solid var(--fmp-border-light-strong);
	font: 600 0.875rem/1 "Inter", sans-serif;
	letter-spacing: 0.06em; text-transform: uppercase;
	padding: 0.625rem 1.25rem; border-radius: 2px; cursor: pointer;
	transition: color .2s, border-color .2s;
}
.fmp-preloader-skip:hover, .fmp-preloader-skip:focus-visible {
	color: var(--fmp-surface); border-color: var(--fmp-cyan-deep);
}
@media (prefers-reduced-motion: reduce) { .fmp-preloader { display: none; } }

/* ============================================================
   Hero video
   ============================================================ */

.fmp-hero {
	position: relative;
	width: 100%;
	min-height: 88vh;
	min-height: 88dvh;
	overflow: hidden;
	background: var(--fmp-bg);
	display: flex;
	align-items: flex-end;
}

/* The hero loops live film-set footage (bright daylight café shoot as of
   0.3.1), so the dimming treatment lives on the BASE rules — the old
   .is-revealed variants were dead code once hero.js was retired. A firm
   brightness trim + the bottom-weighted scrim below hold the white copy at
   WCAG AA over the footage's brightest frames. */
.fmp-hero-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 0;
	pointer-events: none;
	filter: brightness(0.55) contrast(1.05) saturate(0.95);
	transition: opacity var(--fmp-dur-slow) var(--fmp-ease),
	            filter var(--fmp-dur-slow) var(--fmp-ease);
}

/* Bottom-weighted scrim: the copy sits at the foot of the hero, so the
   gradient ramps to near-opaque there to hold white text at WCAG AA over the
   busiest, brightest frames, while the top stays cinematic and open. */
.fmp-hero-scrim {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(10,11,14,0.60) 0%, rgba(10,11,14,0.45) 28%, rgba(10,11,14,0.82) 68%, rgba(10,11,14,0.95) 100%);
	z-index: 1;
	pointer-events: none;
	transition: background var(--fmp-dur-slow) var(--fmp-ease);
}

.fmp-hero-content {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: var(--fmp-maxw);
	margin: 0 auto;
	padding: 0 clamp(1.25rem, 4vw, 3rem) clamp(3rem, 8vw, 6rem);
}

/* Copy is hidden only when JS confirms the video will play through.
   No-JS, reduced-motion, and error paths leave it visible. */
.fmp-hero.is-pending .fmp-hero-content {
	opacity: 0;
	transform: translateY(14px);
}

.fmp-hero .fmp-hero-content {
	transition: opacity var(--fmp-dur-slow) var(--fmp-ease),
	            transform var(--fmp-dur-slow) var(--fmp-ease);
}

.fmp-hero.is-revealed .fmp-hero-content {
	opacity: 1;
	transform: none;
}

/* Keep white copy readable over the hero video. Scoped to the hero so the
   shared .fmp-hero-title class can be reused on plain dark pages (About) without
   dragging a muddy text-shadow box onto a flat background. */
.fmp-hero .fmp-hero-title,
.fmp-hero .fmp-hero-sub,
.fmp-hero .fmp-hero-eyebrow {
	text-shadow: 0 1px 24px rgba(10, 11, 14, 0.6);
}

.fmp-hero-eyebrow {
	font-family: var(--fmp-font-body);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--fmp-cyan);
	margin: 0 0 1rem;
}

.fmp-hero-title {
	font-family: var(--fmp-font-display);
	font-weight: 400;
	font-size: clamp(2.5rem, 7vw, 5.96rem);
	line-height: 1.05;
	letter-spacing: -0.015em;
	color: var(--fmp-fg);
	margin: 0;
	max-width: 18ch;
	text-wrap: balance;
}

.fmp-hero-title em {
	font-style: italic;
	color: var(--fmp-cyan);
}

/* Cyan glow on the italic accent only inside the actual hero (over video).
   Reused titles on flat dark pages (About) skip the glow so it can't read as a
   halo box. */
.fmp-hero .fmp-hero-title em {
	text-shadow: 0 0 32px var(--fmp-cyan-glow);
}

.fmp-hero-sub {
	font-family: var(--fmp-font-body);
	font-size: clamp(1rem, 1.4vw, 1.25rem);
	color: var(--fmp-fg-muted);
	margin: 1.5rem 0 0;
	max-width: 52ch;
	line-height: 1.55;
}

/* ============================================================
   Buttons (primary cyan, secondary ghost)
   ============================================================ */

.fmp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.875rem 1.5rem;
	min-height: 44px;
	font-family: var(--fmp-font-body);
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	border: 1px solid transparent;
	border-radius: 2px;
	cursor: pointer;
	transition: background-color var(--fmp-dur-base) var(--fmp-ease),
	            border-color var(--fmp-dur-base) var(--fmp-ease),
	            color var(--fmp-dur-base) var(--fmp-ease),
	            transform var(--fmp-dur-base) var(--fmp-ease);
}

.fmp-btn-primary {
	background: var(--fmp-cyan);
	color: var(--fmp-bg);
}

.fmp-btn-primary:hover {
	background: var(--fmp-cyan-deep);
	text-decoration: none;
}

.fmp-btn-primary:active {
	transform: translateY(1px);
}

.fmp-btn-ghost {
	background: transparent;
	color: var(--fmp-fg);
	border-color: var(--fmp-border-strong);
}

.fmp-btn-ghost:hover {
	border-color: var(--fmp-cyan);
	color: var(--fmp-cyan);
	text-decoration: none;
}

.fmp-btn-ghost:active {
	transform: translateY(1px);
}

.fmp-btn-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 2rem;
}

/* ============================================================
   Back link — "Back to [previous page]" pill below the header
   (revealed + positioned by assets/js/back-nav.js)
   ============================================================ */

/* The author display rule below would otherwise defeat the UA [hidden] rule. */
.fmp-back-link[hidden] {
	display: none;
}

.fmp-back-link {
	position: absolute;
	top: 6rem; /* refined to the real header height by back-nav.js */
	left: clamp(1.25rem, 4vw, 3rem);
	z-index: 40;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 44px;
	padding: 0.625rem 1.125rem 0.625rem 0.875rem;
	max-width: min(70vw, 22rem);
	background: var(--fmp-surface);
	border: 1px solid var(--fmp-border-strong);
	border-radius: 999px;
	font-family: var(--fmp-font-body);
	font-size: 0.8125rem;
	font-weight: 500;
	letter-spacing: 0.02em;
	color: var(--fmp-fg);
	text-decoration: none;
	transition: border-color var(--fmp-dur-base) var(--fmp-ease),
	            color var(--fmp-dur-base) var(--fmp-ease);
}

.fmp-back-link [data-fmp-back-label] {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.fmp-back-link-arrow {
	flex: none;
}

.fmp-back-link:hover,
.fmp-back-link:focus-visible {
	border-color: var(--fmp-cyan);
	color: var(--fmp-cyan);
	text-decoration: none;
}

.fmp-back-link:active {
	transform: translateY(1px);
}

/* Mobile: a compact pill — the full-size one overlapped the page's opening
   content (section eyebrow on About/Films, poster top on film singles).
   back-nav.js also tightens its header gap to 8px below 768px. */
@media (max-width: 767px) {
	.fmp-back-link {
		min-height: 32px;
		padding: 0.3125rem 0.875rem 0.3125rem 0.625rem;
		gap: 0.375rem;
		font-size: 0.75rem;
		max-width: 60vw;
	}

	/* Keep the effective touch target ≥44px despite the smaller visual. */
	.fmp-back-link::after {
		content: "";
		position: absolute;
		inset: -6px;
	}
}

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

.fmp-section {
	padding: clamp(4rem, 9vw, 6rem) clamp(1.25rem, 4vw, 3rem);
	max-width: var(--fmp-maxw);
	margin: 0 auto;
}

.fmp-section-header {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 2rem;
	margin-bottom: 3rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid var(--fmp-border);
}

.fmp-section-title {
	font-family: var(--fmp-font-display);
	font-weight: 400;
	font-size: clamp(1.75rem, 3.5vw, 2.441rem);
	line-height: 1.15;
	letter-spacing: -0.01em;
	color: var(--fmp-fg);
	margin: 0;
}

.fmp-section-eyebrow {
	font-family: var(--fmp-font-body);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--fmp-cyan);
	margin: 0 0 0.5rem;
}

.fmp-section-lede {
	margin: 1rem 0 0;
	max-width: 52ch;
	color: var(--fmp-fg-muted);
	font-family: var(--fmp-font-body);
	font-size: 1rem;
	line-height: 1.55;
}

.fmp-section-lede p {
	margin: 0;
}

.fmp-section-link {
	font-family: var(--fmp-font-body);
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--fmp-fg-muted);
	text-decoration: none;
	white-space: nowrap;
}

.fmp-section-link:hover {
	color: var(--fmp-cyan);
}

/* ============================================================
   Featured films grid
   ============================================================ */

.fmp-films-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: clamp(1rem, 2vw, 1.5rem);
}

@media (min-width: 768px) {
	.fmp-films-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (min-width: 1024px) {
	.fmp-films-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

.fmp-film-card {
	position: relative;
	display: block;
	background: var(--fmp-surface);
	color: var(--fmp-fg);
	text-decoration: none;
	overflow: hidden;
	transition: transform var(--fmp-dur-slow) var(--fmp-ease),
	            box-shadow var(--fmp-dur-slow) var(--fmp-ease);
}

.fmp-film-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 32px -12px rgba(124, 213, 236, 0.25);
	text-decoration: none;
}

.fmp-film-poster {
	position: relative;
	width: 100%;
	aspect-ratio: 2 / 3;
	background: var(--fmp-surface-elevated);
	overflow: hidden;
}

.fmp-film-poster img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform var(--fmp-dur-slow) var(--fmp-ease);
}

.fmp-film-card:hover .fmp-film-poster img {
	transform: scale(1.04);
}

.fmp-film-meta {
	padding: 1rem 1.25rem 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
}

.fmp-film-title {
	font-family: var(--fmp-font-display);
	font-weight: 400;
	font-size: 1.25rem;
	line-height: 1.2;
	letter-spacing: -0.005em;
	color: var(--fmp-fg);
	margin: 0;
}

.fmp-film-submeta {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	font-family: var(--fmp-font-body);
	font-size: 0.75rem;
	color: var(--fmp-fg-muted);
}

.fmp-coming-soon {
	font-family: var(--fmp-font-body);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.04em;
	color: var(--fmp-cyan);
}

.fmp-status-pill {
	display: inline-block;
	padding: 0.125rem 0.5rem;
	font-size: 0.6875rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	border: 1px solid var(--fmp-border-strong);
	border-radius: 999px;
	color: var(--fmp-fg-muted);
}

.fmp-status-pill[data-status="released"] {
	color: var(--fmp-cyan);
	border-color: rgba(124, 213, 236, 0.4);
}

.fmp-status-pill[data-status="in-development"] {
	color: var(--fmp-peach);
	border-color: rgba(244, 201, 181, 0.4);
}

/* ============================================================
   Studio CTA strip
   ============================================================ */

.fmp-studio-cta {
	padding: clamp(4rem, 8vw, 6rem) clamp(1.25rem, 4vw, 3rem);
	background: var(--fmp-surface);
	border-top: 1px solid var(--fmp-border);
	border-bottom: 1px solid var(--fmp-border);
}

.fmp-studio-cta-inner {
	max-width: 960px;
	margin: 0 auto;
	display: grid;
	gap: 2rem;
	grid-template-columns: 1fr;
}

@media (min-width: 768px) {
	.fmp-studio-cta-inner {
		grid-template-columns: 1fr auto;
		align-items: center;
	}
}

.fmp-studio-cta-title {
	font-family: var(--fmp-font-display);
	font-weight: 400;
	font-size: clamp(1.5rem, 3vw, 2.441rem);
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var(--fmp-fg);
	margin: 0 0 0.75rem;
}

.fmp-studio-cta-body {
	font-family: var(--fmp-font-body);
	color: var(--fmp-fg-muted);
	max-width: 56ch;
	line-height: 1.6;
	margin: 0;
}

.fmp-studio-cta-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

/* ============================================================
   Music banner (full-width "Coming soon" band)
   ============================================================ */

.fmp-music-banner {
	margin: 0;
	padding: clamp(6rem, 12vw, 9rem) clamp(1.25rem, 4vw, 3rem);
	/* Base background (not surface) so this band reads as distinct from the
	   adjacent Studio CTA surface strip instead of merging into one block. */
	background: var(--fmp-bg);
	border-top: 1px solid var(--fmp-border);
	text-align: center;
}

.fmp-music-banner-inner {
	max-width: 960px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.fmp-music-banner-inner .fmp-section-eyebrow {
	margin: 0 0 0.75rem;
}

.fmp-music-banner-title {
	font-family: var(--fmp-font-display);
	font-weight: 300;
	font-size: clamp(3.815rem, 9vw, 5.96rem);
	line-height: 1.05;
	letter-spacing: -0.01em;
	color: var(--fmp-fg);
	margin: 0;
}

.fmp-music-banner-title::after {
	content: "";
	display: block;
	width: 3rem;
	height: 1px;
	margin: 1.5rem auto 1.25rem;
	background: var(--fmp-cyan);
	opacity: 0.5;
}

.fmp-music-banner-status {
	font-family: var(--fmp-font-body);
	font-weight: 500;
	font-size: 1.25rem;
	line-height: 1.4;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--fmp-cyan);
	margin: 0;
}

/* ============================================================
   Single film layout
   ============================================================ */

.fmp-single {
	max-width: 1100px;
	margin: 0 auto;
	padding: clamp(3rem, 6vw, 5rem) clamp(1.25rem, 4vw, 3rem);
	display: grid;
	gap: clamp(2rem, 4vw, 3rem);
	grid-template-columns: 1fr;
}

@media (min-width: 900px) {
	.fmp-single {
		grid-template-columns: minmax(280px, 360px) 1fr;
		align-items: start;
	}
}

.fmp-single-poster img {
	width: 100%;
	height: auto;
	display: block;
	background: var(--fmp-surface);
}

.fmp-single-title {
	font-family: var(--fmp-font-display);
	font-weight: 400;
	font-size: clamp(2rem, 4.5vw, 3.815rem);
	line-height: 1.1;
	letter-spacing: -0.015em;
	margin: 0 0 1rem;
	text-wrap: balance;
}

.fmp-single-logline {
	font-family: var(--fmp-font-display);
	font-style: italic;
	font-size: clamp(1.125rem, 1.6vw, 1.375rem);
	line-height: 1.45;
	color: var(--fmp-fg-muted);
	max-width: 56ch;
	margin: 0 0 2rem;
}

.fmp-single-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 1.25rem 2rem;
	padding: 1.25rem 0;
	border-top: 1px solid var(--fmp-border);
	border-bottom: 1px solid var(--fmp-border);
	margin: 0 0 2rem;
	font-family: var(--fmp-font-body);
	font-size: 0.875rem;
	color: var(--fmp-fg-muted);
}

.fmp-single-meta dt {
	font-size: 0.6875rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--fmp-fg-subtle);
	margin-bottom: 0.25rem;
}

.fmp-single-meta dd {
	margin: 0;
	color: var(--fmp-fg);
}

.fmp-single-trailer {
	aspect-ratio: 16 / 9;
	background: var(--fmp-surface);
	margin: 2rem 0;
}

.fmp-single-trailer iframe {
	width: 100%;
	height: 100%;
	border: 0;
}

/* Long-form body copy (single + page content) */
.fmp-prose {
	font-family: var(--fmp-font-body);
	color: var(--fmp-fg);
	line-height: 1.7;
	max-width: 68ch;
}

.fmp-prose p {
	margin: 0 0 1.25rem;
	color: var(--fmp-fg-muted);
}

.fmp-prose h2,
.fmp-prose h3 {
	margin: 2.5rem 0 1rem;
}

.fmp-prose h2 {
	font-size: clamp(1.5rem, 3vw, 2.441rem);
}

.fmp-prose h3 {
	font-size: 1.563rem;
}

.fmp-prose img {
	margin: 2rem 0;
}

/* ============================================================
   Header / Nav
   ============================================================ */

.fmp-header {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 50;
	padding: clamp(1rem, 2.5vw, 1.5rem) clamp(1.25rem, 4vw, 3rem);
	/* Solid white chrome at all scroll positions (no transparent-over-hero). */
	background: #FFFFFF;
	border-bottom: 1px solid var(--fmp-border-light);
	transition: background var(--fmp-dur-base) var(--fmp-ease),
	            border-color var(--fmp-dur-base) var(--fmp-ease);
}

.fmp-header-inner {
	max-width: var(--fmp-maxw);
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
}

.fmp-logo {
	display: inline-flex;
	align-items: center;
	gap: 0.625rem;
	/* Dark wordmark on the white header/footer chrome (#0A0B0E ≈ 19.7:1 on #FFF). */
	color: var(--fmp-bg);
	text-decoration: none;
	font-family: var(--fmp-font-body);
	font-weight: 600;
	letter-spacing: 0.1em;
	font-size: 0.875rem;
	text-transform: uppercase;
}

.fmp-logo img {
	height: clamp(46px, 6vw, 56px);
	width: auto;
	/* No cyan glow on the white chrome — the figure's white field blends into
	   the bar (intended), and a glow would read as a muddy halo on white. */
}

.fmp-footer .fmp-logo img {
	height: 47px;
}

.fmp-nav {
	display: flex;
	align-items: center;
	gap: clamp(1.25rem, 3vw, 2.5rem);
}

.fmp-nav ul {
	display: flex;
	align-items: center;
	gap: clamp(1.25rem, 3vw, 2.5rem);
	list-style: none;
	margin: 0;
	padding: 0;
}

.fmp-nav a {
	font-family: var(--fmp-font-body);
	font-size: 0.8125rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	/* Dark nav text on the white bar (#13151A ≈ 18.3:1 on #FFF). Light cyan as
	   TEXT fails AA on white, so the cyan accent is carried by an underline. */
	color: var(--fmp-surface);
	text-decoration: none;
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	border-bottom: 2px solid transparent;
	transition: border-color var(--fmp-dur-fast) var(--fmp-ease);
}

.fmp-nav a:hover,
.fmp-nav a[aria-current="page"],
.fmp-nav .current-menu-item > a {
	color: var(--fmp-surface);
	border-bottom-color: var(--fmp-cyan-deep);
}

/* The donate CTA in the header keeps button styling even inside the nav.
   On the white bar the cyan fill stays legible (dark text on cyan), with a
   hairline + soft tinted shadow so it separates cleanly from the white. */
.fmp-nav-donate {
	min-height: 40px;
	padding: 0.625rem 1.25rem;
	border-color: var(--fmp-cyan-deep);
	box-shadow: 0 2px 10px -4px rgba(78, 187, 218, 0.5);
}

.fmp-header-actions {
	display: flex;
	align-items: center;
	gap: 1.25rem;
}

/* ============================================================
   Mobile overlay menu
   Desktop keeps the inline nav; below 768px the inline links +
   header donate collapse into a full-screen overlay opened by the
   toggle (no slide-in drawer). Behavior in assets/js/nav.js.
   ============================================================ */

.fmp-nav-toggle {
	display: none; /* desktop: inline nav is used instead */
	align-items: center;
	gap: 0.5rem;
	min-height: 44px;
	padding: 0.5rem 0.5rem;
	margin-right: -0.5rem; /* optical alignment to the edge */
	background: none;
	border: 0;
	/* Dark toggle on the white header (bars use currentColor). */
	color: var(--fmp-surface);
	font-family: var(--fmp-font-body);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
}

.fmp-nav-toggle:focus-visible {
	outline: 2px solid var(--fmp-cyan);
	outline-offset: 3px;
	border-radius: 2px;
}

.fmp-nav-toggle-bars {
	position: relative;
	display: inline-block;
	width: 22px;
	height: 11px;
}

.fmp-nav-toggle-bars span {
	position: absolute;
	left: 0;
	width: 100%;
	height: 1.5px;
	background: currentColor;
	transition: transform var(--fmp-dur-base) var(--fmp-ease),
	            opacity var(--fmp-dur-fast) var(--fmp-ease);
}

.fmp-nav-toggle-bars span:nth-child(1) { top: 0; }
.fmp-nav-toggle-bars span:nth-child(2) { bottom: 0; }

.fmp-nav-toggle[aria-expanded="true"] .fmp-nav-toggle-bars span:nth-child(1) {
	transform: translateY(4.75px) rotate(45deg);
}

.fmp-nav-toggle[aria-expanded="true"] .fmp-nav-toggle-bars span:nth-child(2) {
	transform: translateY(-4.75px) rotate(-45deg);
}

.fmp-nav-overlay {
	position: fixed;
	inset: 0;
	z-index: 110;
	display: none; /* desktop: never rendered */
	flex-direction: column;
	justify-content: center;
	gap: clamp(2rem, 7vw, 3rem);
	padding: clamp(6rem, 22vw, 9rem) clamp(1.5rem, 8vw, 3rem) clamp(3rem, 12vw, 5rem);
	background: var(--fmp-bg);
	overflow-y: auto;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity var(--fmp-dur-base) var(--fmp-ease),
	            transform var(--fmp-dur-base) var(--fmp-ease),
	            visibility 0s linear var(--fmp-dur-base);
}

.fmp-nav-overlay.is-open {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition: opacity var(--fmp-dur-base) var(--fmp-ease),
	            transform var(--fmp-dur-base) var(--fmp-ease);
}

.fmp-nav-overlay-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: clamp(1rem, 4vw, 1.75rem);
}

.fmp-nav-overlay-nav a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	font-family: var(--fmp-font-display);
	font-weight: 400;
	font-size: clamp(2.25rem, 11vw, 3.25rem);
	line-height: 1.1;
	letter-spacing: -0.01em;
	color: var(--fmp-fg);
	text-decoration: none;
	opacity: 0;
	transform: translateY(14px);
	transition: opacity var(--fmp-dur-base) var(--fmp-ease),
	            transform var(--fmp-dur-base) var(--fmp-ease),
	            color var(--fmp-dur-fast) var(--fmp-ease);
}

.fmp-nav-overlay-nav a:hover,
.fmp-nav-overlay-nav a[aria-current="page"],
.fmp-nav-overlay-nav .current-menu-item > a {
	color: var(--fmp-cyan);
}

.fmp-nav-overlay-donate {
	align-self: flex-start;
	opacity: 0;
	transform: translateY(14px);
	transition: opacity var(--fmp-dur-base) var(--fmp-ease),
	            transform var(--fmp-dur-base) var(--fmp-ease);
}

/* Staggered entrance once the overlay opens */
.fmp-nav-overlay.is-open .fmp-nav-overlay-nav a,
.fmp-nav-overlay.is-open .fmp-nav-overlay-donate {
	opacity: 1;
	transform: none;
}

.fmp-nav-overlay.is-open .fmp-nav-overlay-nav li:nth-child(1) a { transition-delay: 70ms; }
.fmp-nav-overlay.is-open .fmp-nav-overlay-nav li:nth-child(2) a { transition-delay: 120ms; }
.fmp-nav-overlay.is-open .fmp-nav-overlay-nav li:nth-child(3) a { transition-delay: 170ms; }
.fmp-nav-overlay.is-open .fmp-nav-overlay-nav li:nth-child(4) a { transition-delay: 220ms; }
.fmp-nav-overlay.is-open .fmp-nav-overlay-donate { transition-delay: 260ms; }

body.fmp-menu-open { overflow: hidden; }

@media (max-width: 767px) {
	/* Fixed so the toggle stays reachable. The header is solid white at ALL
	   scroll positions (the .is-scrolled state no longer swaps to a dark
	   surface) — white before and after scroll. */
	.fmp-header { position: fixed; }

	.fmp-header.is-scrolled {
		background: #FFFFFF;
		border-bottom: 1px solid var(--fmp-border-light);
	}

	.fmp-nav,
	.fmp-nav-donate { display: none; }

	.fmp-nav-toggle { display: inline-flex; }

	.fmp-nav-overlay { display: flex; }

	/* The full "Forward Motion Productions" wordmark must fit beside the logo
	   and the Menu toggle at 375px without ugly wrapping. Tighten the lockup:
	   shrink the wordmark, tighten tracking, and let it wrap to two tidy lines
	   only if truly needed (never truncated/abbreviated). */
	.fmp-header .fmp-logo {
		gap: 0.5rem;
		font-size: 0.6875rem;
		letter-spacing: 0.06em;
		line-height: 1.15;
		min-width: 0;
	}

	.fmp-header .fmp-logo span {
		max-width: 9.5em;
	}

	.fmp-header .fmp-logo img {
		height: 40px;
	}

	/* Keep logo + toggle above the overlay so the morphed X can close it */
	body.fmp-menu-open .fmp-header { z-index: 120; }
}

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

.fmp-footer {
	/* White footer chrome to mirror the white header. Dark, AA-legible text. */
	background: #FFFFFF;
	border-top: 1px solid var(--fmp-border-light);
	padding: clamp(3rem, 6vw, 4rem) clamp(1.25rem, 4vw, 3rem) 2rem;
	color: var(--fmp-fg-subtle);
}

.fmp-footer-inner {
	max-width: var(--fmp-maxw);
	margin: 0 auto;
	display: grid;
	gap: 2.5rem;
	grid-template-columns: 1fr;
}

@media (min-width: 768px) {
	.fmp-footer-inner {
		grid-template-columns: 1.8fr repeat(4, 1fr);
	}
}

.fmp-footer-blurb {
	margin-top: 1rem;
	max-width: 32ch;
	/* #5C6473 ≈ 5.96:1 on white — AA. */
	color: var(--fmp-fg-subtle);
	font-size: 0.875rem;
	line-height: 1.55;
}

.fmp-footer h4 {
	font-family: var(--fmp-font-body);
	font-size: 0.6875rem;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	/* Near-black heading on white (#13151A ≈ 18.3:1) — AA. */
	color: var(--fmp-surface);
	margin: 0 0 1rem;
}

.fmp-footer ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.fmp-footer a {
	/* Dark footer links on white (#13151A ≈ 18.3:1) — AA. The cyan accent is
	   carried by an underline on hover, not cyan text (which fails AA on white). */
	color: var(--fmp-surface);
	text-decoration: none;
	font-family: var(--fmp-font-body);
	font-size: 0.875rem;
	text-decoration-color: transparent;
	text-decoration-line: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
	transition: text-decoration-color var(--fmp-dur-fast) var(--fmp-ease);
}

.fmp-footer a:hover {
	color: var(--fmp-surface);
	text-decoration-color: var(--fmp-cyan-deep);
	text-decoration-thickness: 2px;
}

.fmp-footer-bottom {
	max-width: var(--fmp-maxw);
	margin: 3rem auto 0;
	padding-top: 1.5rem;
	border-top: 1px solid var(--fmp-border-light);
	font-size: 0.75rem;
	/* #5C6473 ≈ 5.96:1 on white — AA. */
	color: var(--fmp-fg-subtle);
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 1rem;
}

/* ============================================================
   Generic page / index fallback scaffolding
   ============================================================ */

.fmp-page {
	max-width: var(--fmp-maxw);
	margin: 0 auto;
	padding: clamp(8rem, 14vw, 12rem) clamp(1.25rem, 4vw, 3rem) clamp(4rem, 9vw, 6rem);
}

.fmp-page-title {
	font-family: var(--fmp-font-display);
	font-weight: 400;
	font-size: clamp(2rem, 4.5vw, 3.815rem);
	line-height: 1.1;
	letter-spacing: -0.015em;
	margin: 0 0 2rem;
	text-wrap: balance;
}

.fmp-post-list {
	display: grid;
	gap: 2rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.fmp-post-list-item {
	padding-bottom: 2rem;
	border-bottom: 1px solid var(--fmp-border);
}

.fmp-post-list-item h2 {
	margin: 0 0 0.5rem;
	font-size: 1.563rem;
}

.fmp-post-list-item a {
	text-decoration: none;
}

.fmp-empty {
	color: var(--fmp-fg-muted);
	font-family: var(--fmp-font-body);
}

/* ============================================================
   Scroll motion — reveal states + front-page hero choreography
   (engine: assets/js/motion.js)

   Everything here is gated behind `html.fmp-motion`, which only
   motion.js adds — and only when JS is available AND the visitor
   does not prefer reduced motion. No JS → nothing is ever hidden.
   motion.js removes the `data-fmp-reveal` attribute shortly after
   each reveal lands, returning elements to their author baseline
   (so e.g. film-card hover transitions are untouched afterwards).
   Transform/opacity only — no layout properties are animated.
   ============================================================ */

/* --- Scroll reveals: rise + fade, expo settle --- */

html.fmp-motion [data-fmp-reveal] {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity var(--fmp-dur-reveal) var(--fmp-ease-out-expo),
	            transform var(--fmp-dur-reveal) var(--fmp-ease-out-expo);
}

html.fmp-motion [data-fmp-reveal="fade"] {
	transform: none;
}

html.fmp-motion [data-fmp-reveal].is-inview {
	opacity: 1;
	transform: translateY(0);
}

/* Group children are tagged by motion.js (deferred — AFTER first paint), so
   hide them in pure CSS from the very first frame. The :not() guards hand off
   seamlessly: once tagged they match [data-fmp-reveal] above (same values);
   once revealed/settled, .is-inview keeps them excluded here forever. */
html.fmp-motion [data-fmp-reveal-group] > :not([data-fmp-reveal]):not(.is-inview) {
	opacity: 0;
	transform: translateY(28px);
}

/* --- Section header: the hairline rule draws itself in --- */

html.fmp-motion .fmp-section-header[data-fmp-reveal] {
	position: relative;
	border-bottom-color: transparent;
}

html.fmp-motion .fmp-section-header[data-fmp-reveal]::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 1px;
	background: var(--fmp-border);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 1100ms var(--fmp-ease-out-expo) 150ms;
}

html.fmp-motion .fmp-section-header[data-fmp-reveal].is-inview::after {
	transform: scaleX(1);
}

/* --- Music banner: the cyan divider under the title draws in --- */

html.fmp-motion .fmp-music-banner-title[data-fmp-reveal]::after {
	transform: scaleX(0);
	transition: transform 900ms var(--fmp-ease-out-expo) 200ms;
}

html.fmp-motion .fmp-music-banner-title[data-fmp-reveal].is-inview::after {
	transform: scaleX(1);
}

/* --- Film-detail poster: slow cinematic scale-settle on reveal --- */

html.fmp-motion .fmp-single-poster[data-fmp-reveal] img {
	transform: scale(1.06);
	transition: transform 1200ms var(--fmp-ease-out-expo);
}

html.fmp-motion .fmp-single-poster[data-fmp-reveal].is-inview img {
	transform: scale(1);
}

/* NOTE: there is deliberately NO whole-page (#fmp-main) entrance animation.
   A container fade/rise stacked on top of the content reveals played as two
   distinct events — users read it as the page loading twice. The page
   entrance IS the single content cascade above; the chrome (section
   surfaces, hairlines) paints instantly. */

/* --- Front-page hero choreography (runs once, on html.fmp-enter) --- */

@keyframes fmp-rise {
	from {
		opacity: 0;
		transform: translateY(26px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes fmp-hero-settle {
	from {
		transform: scale(1.07);
	}
	to {
		transform: scale(1);
	}
}

/* Held until motion.js flips .fmp-enter (immediately, or when the
   preloader curtain lifts on a first visit). Scoped to .fmp-hero so the
   reused .fmp-hero-title on flat pages (About) is unaffected. */
html.fmp-motion .fmp-hero .fmp-hero-eyebrow,
html.fmp-motion .fmp-hero .fmp-hero-title,
html.fmp-motion .fmp-hero .fmp-hero-sub,
html.fmp-motion .fmp-hero .fmp-btn-row {
	opacity: 0;
}

html.fmp-motion .fmp-hero .fmp-hero-video {
	transform: scale(1.07);
}

/* When iOS blocks autoplay (Low Power Mode / data-saver), WebKit paints a
   large native play button over the paused video. Hide it — the poster frame
   under the scrim reads as an intentional still, and hero-play.js starts
   playback on the visitor's first touch. */
.fmp-hero-video::-webkit-media-controls,
.fmp-hero-video::-webkit-media-controls-start-playback-button {
	display: none !important;
	-webkit-appearance: none;
}

html.fmp-motion.fmp-enter .fmp-hero .fmp-hero-eyebrow {
	animation: fmp-rise var(--fmp-dur-reveal) var(--fmp-ease-out-expo) 80ms both;
}

html.fmp-motion.fmp-enter .fmp-hero .fmp-hero-title {
	animation: fmp-rise var(--fmp-dur-reveal) var(--fmp-ease-out-expo) 170ms both;
}

html.fmp-motion.fmp-enter .fmp-hero .fmp-hero-sub {
	animation: fmp-rise var(--fmp-dur-reveal) var(--fmp-ease-out-expo) 260ms both;
}

html.fmp-motion.fmp-enter .fmp-hero .fmp-btn-row {
	animation: fmp-rise var(--fmp-dur-reveal) var(--fmp-ease-out-expo) 350ms both;
}

html.fmp-motion.fmp-enter .fmp-hero .fmp-hero-video {
	animation: fmp-hero-settle 1600ms var(--fmp-ease-out-expo) both;
}

/* ============================================================
   Reduced motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}

	/* Belt-and-braces: motion.js never adds .fmp-motion under reduced motion,
	   but if the preference flips mid-session nothing may stay hidden. */
	html.fmp-motion [data-fmp-reveal-group] > *,
	html.fmp-motion [data-fmp-reveal],
	html.fmp-motion [data-fmp-reveal]::after,
	html.fmp-motion .fmp-hero .fmp-hero-eyebrow,
	html.fmp-motion .fmp-hero .fmp-hero-title,
	html.fmp-motion .fmp-hero .fmp-hero-sub,
	html.fmp-motion .fmp-hero .fmp-btn-row {
		opacity: 1 !important;
		transform: none !important;
	}

	.fmp-film-card:hover {
		transform: none;
	}

	.fmp-film-card:hover .fmp-film-poster img {
		transform: none;
	}

	.fmp-hero-video {
		display: none;
	}

	/* Overlay menu opens instantly, no slide/stagger */
	.fmp-nav-overlay,
	.fmp-nav-overlay-nav a,
	.fmp-nav-overlay-donate {
		transform: none !important;
	}

	.fmp-nav-overlay.is-open .fmp-nav-overlay-nav a,
	.fmp-nav-overlay.is-open .fmp-nav-overlay-donate {
		transition-delay: 0ms !important;
	}
}
