/* ==========================================================================
   Ezeal Cinematic — /discover/
   Ported from the approved standalone build.
   Every rule scoped under .ezeal-cinematic-page. Loads only on this template.

   ARCHITECTURE NOTE
   The film stage is position:FIXED, not sticky. header.php opens
   <main id="main"> in the theme, so the stage sits inside a wrapper we do not
   control, and any ancestor with overflow or a transform silently kills
   position:sticky. Fixed is immune to that. The pin is a JS class toggle.
   Do not "simplify" this back to sticky.
   ========================================================================== */

.ezeal-cinematic-page {
	--ezc-navy: #071a3d;
	--ezc-deep: #04102a;
	--ezc-blue: #0b47d1;
	--ezc-gold: #f4b400;
	--ezc-paper: #f7f8fb;
	--ezc-ink: #0a1428;
	--ezc-muted: #3d4a63;
	--ezc-font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

	position: relative;
	background: var(--ezc-deep);
	color: var(--ezc-paper);
	font-family: var(--ezc-font);
	-webkit-font-smoothing: antialiased;
}

.ezeal-cinematic-page *,
.ezeal-cinematic-page *::before,
.ezeal-cinematic-page *::after { box-sizing: border-box; }

.ezeal-cinematic-page img,
.ezeal-cinematic-page video { display: block; max-width: 100%; }

.ezeal-cinematic-page .ezc-sr {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- skip ---------- */

.ezeal-cinematic-page .ezc-skip {
	position: absolute; left: -9999px; top: 0; z-index: 999;
	padding: .8rem 1.3rem; background: var(--ezc-gold); color: var(--ezc-deep);
	font-weight: 800; text-decoration: none;
}
.ezeal-cinematic-page .ezc-skip:focus { left: 0; }

/* ==========================================================================
   FIXED FILM STAGE
   ========================================================================== */

.ezeal-cinematic-page .ezc-stage {
	position: fixed; inset: 0; z-index: 0; overflow: hidden;
	opacity: 0; transition: opacity .6s ease;
}
.ezeal-cinematic-page .ezc-stage.is-on { opacity: 1; }

.ezeal-cinematic-page .ezc-plate {
	position: absolute; inset: 0; margin: 0;
	opacity: 0; transform: scale(1.08);
	transition: opacity 1.1s cubic-bezier(.4, 0, .2, 1),
	            transform 2.8s cubic-bezier(.22, 1, .36, 1);
	will-change: opacity, transform;
}
.ezeal-cinematic-page .ezc-plate.is-active { opacity: 1; transform: scale(1); }

.ezeal-cinematic-page .ezc-plate video {
	width: 100%; height: 100%; object-fit: cover; object-position: center;
}

.ezeal-cinematic-page .ezc-vig {
	position: absolute; inset: 0; pointer-events: none;
	background:
		linear-gradient(100deg, rgba(4,16,42,.88) 0%, rgba(4,16,42,.55) 32%, rgba(4,16,42,.06) 62%),
		radial-gradient(135% 105% at 50% 45%, transparent 42%, rgba(4,16,42,.62) 100%),
		linear-gradient(to bottom, rgba(4,16,42,.6) 0%, transparent 24%, transparent 70%, rgba(4,16,42,.75) 100%);
}

.ezeal-cinematic-page .ezc-grain {
	position: absolute; inset: -50%; pointer-events: none; opacity: .05;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
	animation: ezcGrain 700ms steps(2) infinite;
}
@keyframes ezcGrain {
	0% { transform: translate(0, 0); }
	50% { transform: translate(-2%, 1%); }
	100% { transform: translate(1%, -1%); }
}

/* ==========================================================================
   SCROLL TRACK
   ========================================================================== */

.ezeal-cinematic-page .ezc-track { position: relative; z-index: 2; }

.ezeal-cinematic-page .ezc-beat {
	min-height: 125vh; min-height: 125svh;
	display: flex; align-items: center;
	padding: 0 clamp(1.5rem, 7vw, 7rem);
}

.ezeal-cinematic-page .ezc-copy { max-width: 15ch; }

.ezeal-cinematic-page .ezc-line {
	margin: 0; font-weight: 800;
	font-size: clamp(2.5rem, 5.8vw, 5.2rem);
	line-height: 1; letter-spacing: -.042em; color: #fff;
	text-wrap: balance;
	text-shadow: 0 2px 60px rgba(4,16,42,.9), 0 1px 4px rgba(4,16,42,.7);
	opacity: 0; transform: translateY(26px);
	transition: opacity .9s ease, transform 1.1s cubic-bezier(.22, 1, .36, 1);
}

.ezeal-cinematic-page .ezc-line--soft {
	margin-top: .35em; font-weight: 400;
	font-size: clamp(1.5rem, 3.2vw, 2.7rem);
	letter-spacing: -.02em; color: rgba(255,255,255,.7);
}

.ezeal-cinematic-page .ezc-beat.is-lit .ezc-line { opacity: 1; transform: none; }
.ezeal-cinematic-page .ezc-beat.is-lit .ezc-line--soft { transition-delay: .34s; }

/* ---------- scroll hint ---------- */

.ezeal-cinematic-page .ezc-hint {
	position: fixed; left: 50%; bottom: 2.2rem; transform: translateX(-50%);
	z-index: 40; display: flex; flex-direction: column; align-items: center; gap: .6rem;
	font-size: .7rem; font-weight: 700; letter-spacing: .22em;
	color: rgba(255,255,255,.55); transition: opacity .5s ease;
}
.ezeal-cinematic-page .ezc-hint::after {
	content: ""; width: 1px; height: 34px;
	background: linear-gradient(to bottom, rgba(255,255,255,.55), transparent);
	animation: ezcDrop 1.9s ease-in-out infinite;
}
@keyframes ezcDrop {
	0% { opacity: 0; transform: scaleY(.3); transform-origin: top; }
	40% { opacity: 1; }
	100% { opacity: 0; transform: scaleY(1); transform-origin: top; }
}
.ezeal-cinematic-page .ezc-hint.is-gone { opacity: 0; pointer-events: none; }

/* ---------- reveal ---------- */

.ezeal-cinematic-page .ezc-beat--reveal {
	min-height: 108vh; min-height: 108svh;
	justify-content: center; text-align: center;
}
.ezeal-cinematic-page .ezc-reveal { max-width: 46rem; }

.ezeal-cinematic-page .ezc-reveal__mark {
	margin: 0 0 1.15rem; font-weight: 800;
	font-size: clamp(2.5rem, 6.6vw, 5rem);
	line-height: 1; letter-spacing: -.045em; color: #fff;
	text-shadow: 0 2px 60px rgba(4,16,42,.9);
}
.ezeal-cinematic-page .ezc-reveal__mark span {
	display: block; opacity: 0; transform: translateY(26px);
	transition: opacity .9s ease, transform 1.1s cubic-bezier(.22, 1, .36, 1);
}
.ezeal-cinematic-page .ezc-beat--reveal.is-lit .ezc-reveal__mark span:nth-child(1) { opacity: 1; transform: none; transition-delay: 0s; }
.ezeal-cinematic-page .ezc-beat--reveal.is-lit .ezc-reveal__mark span:nth-child(2) { opacity: 1; transform: none; transition-delay: .22s; }
.ezeal-cinematic-page .ezc-beat--reveal.is-lit .ezc-reveal__mark span:nth-child(3) { opacity: 1; transform: none; transition-delay: .44s; }

.ezeal-cinematic-page .ezc-reveal__sub {
	margin: 0 0 2.2rem; font-size: clamp(1rem, 2vw, 1.2rem); line-height: 1.5;
	color: rgba(247,248,251,.78); opacity: 0; transition: opacity .9s ease .68s;
}
.ezeal-cinematic-page .ezc-beat--reveal.is-lit .ezc-reveal__sub { opacity: 1; }

.ezeal-cinematic-page .ezc-reveal__cta {
	display: flex; flex-wrap: wrap; gap: .9rem; justify-content: center;
	opacity: 0; transition: opacity .9s ease .88s;
}
.ezeal-cinematic-page .ezc-beat--reveal.is-lit .ezc-reveal__cta { opacity: 1; }

/* ---------- buttons ---------- */

.ezeal-cinematic-page .ezc-btn {
	display: inline-flex; align-items: center; justify-content: center;
	padding: 1rem 2.1rem; border: 0; border-radius: 999px;
	font-family: var(--ezc-font); font-weight: 800; font-size: 1rem; line-height: 1;
	text-decoration: none; min-height: 48px; cursor: pointer;
	transition: transform .2s ease, box-shadow .2s ease;
}
.ezeal-cinematic-page .ezc-btn--primary {
	background: var(--ezc-gold); color: var(--ezc-deep);
	box-shadow: 0 10px 34px rgba(244,180,0,.3);
}
.ezeal-cinematic-page .ezc-btn--primary:hover {
	transform: translateY(-2px); box-shadow: 0 14px 44px rgba(244,180,0,.44);
	color: var(--ezc-deep);
}
.ezeal-cinematic-page .ezc-btn--ghost {
	background: transparent; color: #fff;
	box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.55);
}
.ezeal-cinematic-page .ezc-btn--ghost:hover {
	box-shadow: inset 0 0 0 1.5px #fff; transform: translateY(-2px); color: #fff;
}
.ezeal-cinematic-page .ezc-btn--sm { padding: .8rem 1.5rem; font-size: .92rem; min-height: 44px; }
.ezeal-cinematic-page .ezc-btn:focus-visible { outline: 3px solid var(--ezc-gold); outline-offset: 3px; }

/* ---------- chrome ---------- */

.ezeal-cinematic-page .ezc-rail {
	position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 55;
	background: rgba(255,255,255,.1); opacity: 0; transition: opacity .4s ease;
}
.ezeal-cinematic-page .ezc-rail.is-on { opacity: 1; }
.ezeal-cinematic-page .ezc-rail__bar {
	display: block; height: 100%; width: 0;
	background: linear-gradient(90deg, var(--ezc-blue), var(--ezc-gold));
}

.ezeal-cinematic-page .ezc-count {
	position: fixed; left: clamp(1.5rem, 7vw, 7rem); bottom: clamp(1.5rem, 5vh, 3rem);
	z-index: 40; font-size: .72rem; font-weight: 800; letter-spacing: .2em;
	color: rgba(255,255,255,.45); opacity: 0; transition: opacity .4s ease;
}
.ezeal-cinematic-page .ezc-count.is-on { opacity: 1; }

.ezeal-cinematic-page .ezc-float {
	position: fixed; right: clamp(1.25rem, 3vw, 2.25rem); bottom: clamp(1.25rem, 3vw, 2.25rem);
	z-index: 45; opacity: 0; transform: translateY(16px); pointer-events: none;
	transition: opacity .4s ease, transform .4s ease;
}
.ezeal-cinematic-page .ezc-float.is-on { opacity: 1; transform: none; pointer-events: auto; }

/* ==========================================================================
   POST-STORY
   ========================================================================== */

.ezeal-cinematic-page .ezc-details {
	position: relative; z-index: 5;
	background: var(--ezc-paper); color: var(--ezc-ink);
	padding: clamp(4rem, 10vw, 8rem) 0;
}

.ezeal-cinematic-page .ezc-wrap { width: min(72rem, 90vw); margin: 0 auto; }

.ezeal-cinematic-page .ezc-head { max-width: 40rem; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.ezeal-cinematic-page .ezc-head h2 {
	margin: 0 0 1rem; font-weight: 800; font-size: clamp(1.9rem, 4.4vw, 3rem);
	line-height: 1.08; letter-spacing: -.032em; color: var(--ezc-navy);
}
.ezeal-cinematic-page .ezc-head p {
	margin: 0; font-size: clamp(1rem, 1.8vw, 1.15rem); line-height: 1.65; color: var(--ezc-muted);
}

.ezeal-cinematic-page .ezc-steps {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
	gap: 1.5rem; margin-bottom: clamp(3rem, 7vw, 5rem);
}
.ezeal-cinematic-page .ezc-step {
	padding: 2rem 1.75rem; background: #fff; border: 1px solid #e4e8f0;
	border-radius: 14px; border-top: 3px solid var(--ezc-gold);
}
.ezeal-cinematic-page .ezc-step b {
	display: block; margin-bottom: .6rem; font-size: 1.4rem;
	letter-spacing: -.02em; color: var(--ezc-blue);
}
.ezeal-cinematic-page .ezc-step p { margin: 0; line-height: 1.6; color: var(--ezc-muted); }

.ezeal-cinematic-page .ezc-block { margin-bottom: clamp(3rem, 7vw, 5rem); max-width: 46rem; }
.ezeal-cinematic-page .ezc-block h3 {
	margin: 0 0 1.25rem; font-weight: 800; font-size: clamp(1.4rem, 3vw, 2rem);
	letter-spacing: -.028em; color: var(--ezc-navy);
}
.ezeal-cinematic-page .ezc-block p { line-height: 1.7; color: var(--ezc-muted); }
.ezeal-cinematic-page .ezc-block a { color: var(--ezc-blue); font-weight: 700; }

.ezeal-cinematic-page .ezc-block ul { margin: 0; padding: 0; list-style: none; }
.ezeal-cinematic-page .ezc-block li {
	position: relative; padding: 0 0 1.1rem 1.6rem; line-height: 1.65; color: var(--ezc-muted);
}
.ezeal-cinematic-page .ezc-block li::before {
	content: ""; position: absolute; left: 0; top: .62em;
	width: 7px; height: 7px; border-radius: 50%; background: var(--ezc-gold);
}

.ezeal-cinematic-page .ezc-details details {
	border-bottom: 1px solid #e4e8f0; padding: 1.15rem 0;
}
.ezeal-cinematic-page .ezc-details summary {
	cursor: pointer; font-weight: 800; color: var(--ezc-navy); list-style: none;
	position: relative; padding-right: 2rem; min-height: 24px;
}
.ezeal-cinematic-page .ezc-details summary::-webkit-details-marker { display: none; }
.ezeal-cinematic-page .ezc-details summary::after {
	content: "+"; position: absolute; right: 0; top: -3px;
	font-size: 1.5rem; line-height: 1; color: var(--ezc-blue);
}
.ezeal-cinematic-page .ezc-details details[open] summary::after { content: "\2013"; }
.ezeal-cinematic-page .ezc-details details p { margin: .75rem 0 0; }

.ezeal-cinematic-page .ezc-signup {
	padding: clamp(1.75rem, 4vw, 2.75rem); background: var(--ezc-navy);
	border-radius: 16px; color: #fff;
}
.ezeal-cinematic-page .ezc-signup h3 { color: #fff; }
.ezeal-cinematic-page .ezc-signup p { color: rgba(255,255,255,.84); }

.ezeal-cinematic-page .ezc-disclosure { margin: 0; font-size: .85rem; color: #7a869e; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 900px) {
	.ezeal-cinematic-page .ezc-beat { min-height: 112vh; min-height: 112svh; }
	.ezeal-cinematic-page .ezc-copy { max-width: 13ch; }
}

@media (max-width: 600px) {
	.ezeal-cinematic-page .ezc-beat {
		min-height: 100vh; min-height: 100svh;
		align-items: flex-end; padding-bottom: 20vh;
	}
	.ezeal-cinematic-page .ezc-copy { max-width: 11ch; }
	.ezeal-cinematic-page .ezc-line { font-size: clamp(2.1rem, 11vw, 3.1rem); }
	.ezeal-cinematic-page .ezc-line--soft { font-size: clamp(1.3rem, 6.5vw, 1.8rem); }
	.ezeal-cinematic-page .ezc-vig {
		background:
			linear-gradient(to top, rgba(4,16,42,.93) 0%, rgba(4,16,42,.55) 40%, rgba(4,16,42,.1) 72%),
			linear-gradient(to bottom, rgba(4,16,42,.55) 0%, transparent 28%);
	}
	.ezeal-cinematic-page .ezc-count { display: none; }
	.ezeal-cinematic-page .ezc-reveal__cta { flex-direction: column; }
	.ezeal-cinematic-page .ezc-reveal__cta .ezc-btn { width: 100%; }
	.ezeal-cinematic-page .ezc-float { left: 1rem; right: 1rem; }
	.ezeal-cinematic-page .ezc-float .ezc-btn { width: 100%; }
}

/* ==========================================================================
   REDUCED MOTION
   The script exits early, so nothing autoplays and each <video> renders its
   poster frame. Here we simply unpin the stage and stack the chapters.
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	.ezeal-cinematic-page .ezc-stage {
		position: relative; inset: auto; opacity: 1; height: auto;
	}
	.ezeal-cinematic-page .ezc-plate {
		position: relative; opacity: 1; transform: none; transition: none;
		aspect-ratio: 16 / 9;
	}
	.ezeal-cinematic-page .ezc-vig,
	.ezeal-cinematic-page .ezc-grain,
	.ezeal-cinematic-page .ezc-hint,
	.ezeal-cinematic-page .ezc-rail,
	.ezeal-cinematic-page .ezc-count,
	.ezeal-cinematic-page .ezc-float { display: none; }

	.ezeal-cinematic-page .ezc-beat {
		min-height: 0; padding: 3rem clamp(1.5rem, 7vw, 7rem); background: var(--ezc-deep);
	}
	.ezeal-cinematic-page .ezc-line,
	.ezeal-cinematic-page .ezc-reveal__mark span,
	.ezeal-cinematic-page .ezc-reveal__sub,
	.ezeal-cinematic-page .ezc-reveal__cta {
		opacity: 1; transform: none; transition: none;
	}
	.ezeal-cinematic-page .ezc-sr {
		position: static; width: auto; height: auto; margin: 0; clip: auto;
		white-space: normal; padding: 3rem clamp(1.5rem, 7vw, 7rem); background: var(--ezc-deep);
	}
}
