/* Agent Recruitment, Chapter 05 (The Sundance Vision) - staging only - 1.0.0-recruit-ch05-t6438u
   Cinematic chapter: NOT a gold-line timeline, NOT a card grid, no typewriter. One DOM, two presentations:
   - default (mobile, tablet, portrait, reduced motion, no script): stacked scenes, all copy and all four photos visible, static.
   - stage (script sets data-rc5-mode="stage" on wide landscape screens, motion allowed): the scene area is pinned (position: sticky) for a runway of scroll;
     scroll position picks the scene; photos crossfade in 600 ms, text reveals headline first then supporting sentence, restrained scroll-linked scale/shift (one motion system).
   Normal scrolling is never intercepted; after scene 4 the section simply ends. Hidden start states exist only when script has set a mode. */
.rc5 {
	overflow-x: clip;
	--navy: #0c263a;
	--ink: #071624;
	--brand: #274565;
	--ivory: #f6f2ea;
	--gold: #d5ae59;
	--gold-lt: #e8ca86;
	position: relative;
	color: var(--ivory);
	font-family: Inter, Helvetica, Arial, sans-serif;
	font-size: 17px;
	line-height: 1.65;
	background: var(--ink);
}
.rc5 *, .rc5 *::before, .rc5 *::after { box-sizing: border-box; }
.rc5 h2, .rc5 h3, .rc5 p, .rc5 figure { margin: 0; }
.rc5 img { max-width: 100%; display: block; }

/* Entry: Chapter 04 ends on its brand blue; this chapter opens from it into dark navy. */
.rc5-ch { position: relative; background: linear-gradient(180deg, #1f3b5a 0, #0f2338 140px, var(--ink) 340px, var(--ink) 100%); padding: 96px 0 0; }

/* ---------- Default: stacked ---------- */
.rc5-open { max-width: 780px; margin: 0 auto; padding: 0 24px; text-align: center; }
.rc5-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.18em; line-height: 1.4; color: var(--gold-lt); }
.rc5-title { margin-top: 12px; font-family: Cinzel, "Times New Roman", serif; font-weight: 500; font-size: clamp(20px, 5.4vw, 26px); letter-spacing: 0.06em; text-transform: none; color: var(--gold-lt); }
.rc5-open-h { margin-top: 22px; font-family: Cinzel, "Times New Roman", serif; font-weight: 500; font-size: clamp(30px, 8.4vw, 46px); line-height: 1.12; letter-spacing: 0.01em; color: #f7f4ee; text-wrap: balance; }
.rc5-open-p { margin-top: 20px; font-size: 18px; line-height: 1.6; color: rgba(246, 242, 234, 0.96); }

.rc5-scene { max-width: 760px; margin: 64px auto 0; padding: 0 24px; }
.rc5-fig { position: relative; width: 100%; aspect-ratio: 1672 / 941; border-radius: 10px; overflow: hidden; background: #0a1d2e; box-shadow: 0 18px 38px rgba(2, 10, 18, 0.5); }
.rc5-img { width: 100%; height: 100%; object-fit: cover; }
.rc5-txt { margin-top: 26px; }
.rc5-hd { font-family: Cinzel, "Times New Roman", serif; font-weight: 500; font-size: clamp(26px, 7vw, 34px); line-height: 1.18; letter-spacing: 0.01em; color: #f7f4ee; text-wrap: balance; }
.rc5-hd1, .rc5-hd2 { display: block; }
.rc5-hd2 { margin-top: 6px; color: var(--gold-lt); }
.rc5-sp { margin-top: 14px; font-size: 18px; line-height: 1.6; color: rgba(246, 242, 234, 0.96); }
.rc5-scene--final .rc5-txt { text-align: center; }
.rc5-exit { height: 96px; background: linear-gradient(180deg, var(--ink), #0a2036); }

@media (min-width: 561px) and (max-width: 900px) { .rc5-open, .rc5-scene { padding-left: 40px; padding-right: 40px; } }
@media (min-width: 901px) {
	.rc5-ch { padding-top: 120px; }
	.rc5-open-h { font-size: clamp(40px, 4.6vw, 64px); }
	.rc5-scene { max-width: 960px; margin-top: 80px; }
	.rc5-hd { font-size: clamp(30px, 3vw, 44px); }
}

/* Flow mode (script ready, stacked layout, motion allowed): gentle reveals as each part scrolls in. */
[data-rc5-mode="flow"] .rc5-rv { opacity: 0; transform: translate3d(0, 16px, 0); transition: opacity 0.7s ease, transform 0.7s ease; }
[data-rc5-mode="flow"] .rc5-rv.is-in { opacity: 1; transform: none; }
[data-rc5-mode="flow"] .rc5-sp.rc5-rv { transition-delay: 0.18s; }

/* ---------- Stage mode: pinned cinematic scene area ---------- */
[data-rc5-mode="stage"] .rc5-ch { padding: 0; background: var(--ink); }
[data-rc5-mode="stage"] .rc5-entry-fade { display: block; }
[data-rc5-mode="stage"] .rc5-track { position: relative; height: 620vh; height: 620svh; }
[data-rc5-mode="stage"] .rc5-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; isolation: isolate; background: linear-gradient(180deg, #1f3b5a 0, #0f2338 22%, var(--ink) 60%); }
[data-rc5-mode="stage"] .rc5-open { position: absolute; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; max-width: none; padding: 0 48px; margin: 0; }
[data-rc5-mode="stage"] .rc5-open > * { max-width: 980px; opacity: 0; transform: translate3d(0, 14px, 0); transition: opacity 0.3s ease, transform 0.3s ease; }
[data-rc5-mode="stage"] .rc5-open.is-on > * { opacity: 1; transform: none; transition: opacity 0.6s ease, transform 0.6s ease; }
[data-rc5-mode="stage"] .rc5-open.is-on > * { transition-delay: 0.3s; }   /* T6444U: the opening waits for scene 1's text (0.3 s fade-out) on reverse scroll */
[data-rc5-mode="stage"] .rc5-open.is-on > .rc5-title { transition-delay: 0.5s; }
[data-rc5-mode="stage"] .rc5-open.is-on > .rc5-open-h { transition-delay: 0.75s; }
[data-rc5-mode="stage"] .rc5-open.is-on > .rc5-open-p { transition-delay: 1.2s; }
[data-rc5-mode="stage"] .rc5-open-h { font-size: clamp(44px, 5.2vw, 84px); }
[data-rc5-mode="stage"] .rc5-open-p { font-size: clamp(18px, 1.5vw, 22px); }

[data-rc5-mode="stage"] .rc5-scene { position: absolute; inset: 0; max-width: none; margin: 0; padding: 0; pointer-events: none; }
[data-rc5-mode="stage"] .rc5-fig { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; box-shadow: none; opacity: 0; transform: none; transition: opacity 600ms ease; }
[data-rc5-mode="stage"] .rc5-scene[data-rc5-scene="2"] .rc5-fig { z-index: 2; }
[data-rc5-mode="stage"] .rc5-scene[data-rc5-scene="3"] .rc5-fig { z-index: 3; }
[data-rc5-mode="stage"] .rc5-scene[data-rc5-scene="4"] .rc5-fig { z-index: 4; }
[data-rc5-mode="stage"] .rc5-scene.is-on .rc5-fig, [data-rc5-mode="stage"] .rc5-scene.is-past .rc5-fig { opacity: 1; }
[data-rc5-mode="stage"] .rc5-fig picture { display: block; width: 100%; height: 100%; }
[data-rc5-mode="stage"] .rc5-img { width: 100%; height: 100%; object-fit: cover; transform: translate3d(0, calc(var(--k, 0) * -1.4%), 0) scale(calc(1.03 + 0.05 * var(--k, 0))); will-change: transform; }
/* Legibility: dark scrim at the foot of every photograph, where the text sits. */
[data-rc5-mode="stage"] .rc5-fig::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(4, 12, 20, 0.95) 0, rgba(4, 12, 20, 0.88) 28%, rgba(4, 12, 20, 0.58) 48%, rgba(4, 12, 20, 0) 72%), linear-gradient(90deg, rgba(4, 12, 20, 0.45) 0, rgba(4, 12, 20, 0) 55%); pointer-events: none; }
[data-rc5-mode="stage"] .rc5-txt { position: absolute; z-index: 20; left: max(48px, calc((100% - 1240px) / 2 + 48px)); right: 48px; bottom: 9vh; max-width: 680px; margin: 0; }
[data-rc5-mode="stage"] .rc5-scene[data-rc5-scene="2"] .rc5-txt { z-index: 21; }
[data-rc5-mode="stage"] .rc5-scene[data-rc5-scene="3"] .rc5-txt { z-index: 22; }
[data-rc5-mode="stage"] .rc5-scene[data-rc5-scene="4"] .rc5-txt { z-index: 23; }
[data-rc5-mode="stage"] .rc5-hd { font-size: clamp(34px, 3.8vw, 60px); text-shadow: 0 2px 18px rgba(2, 10, 18, 0.55); }
[data-rc5-mode="stage"] .rc5-sp { margin-top: 16px; font-size: clamp(18px, 1.5vw, 22px); text-shadow: 0 1px 12px rgba(2, 10, 18, 0.6); }
[data-rc5-mode="stage"] .rc5-hd, [data-rc5-mode="stage"] .rc5-sp, [data-rc5-mode="stage"] .rc5-hd2 { opacity: 0; transform: translate3d(0, 14px, 0); transition: opacity 0.3s ease, transform 0.3s ease; }
[data-rc5-mode="stage"] .rc5-hd .rc5-hd2 { opacity: 1; transform: none; transition: none; }
[data-rc5-mode="stage"] .rc5-scene.is-on .rc5-hd { opacity: 1; transform: none; transition: opacity 0.55s ease 0.3s, transform 0.55s ease 0.3s; }
[data-rc5-mode="stage"] .rc5-scene.is-on .rc5-sp { opacity: 1; transform: none; transition: opacity 0.55s ease 0.8s, transform 0.55s ease 0.8s; }
/* Final scene: stronger reveal - headline, then the gold line, then the supporting line. */
[data-rc5-mode="stage"] .rc5-scene--final .rc5-txt { left: 0; right: 0; max-width: none; padding: 0 48px; text-align: center; bottom: 12vh; }
[data-rc5-mode="stage"] .rc5-scene--final .rc5-hd { font-size: clamp(40px, 5vw, 80px); }
[data-rc5-mode="stage"] .rc5-scene--final .rc5-hd { opacity: 1; transform: none; transition: none; }
[data-rc5-mode="stage"] .rc5-scene--final .rc5-hd1, [data-rc5-mode="stage"] .rc5-scene--final .rc5-hd2 { opacity: 0; transform: translate3d(0, 18px, 0); transition: opacity 0.3s ease, transform 0.3s ease; }
[data-rc5-mode="stage"] .rc5-scene--final.is-on .rc5-hd1 { opacity: 1; transform: none; transition: opacity 0.8s ease 0.3s, transform 0.8s ease 0.3s; }
[data-rc5-mode="stage"] .rc5-scene--final.is-on .rc5-hd2 { opacity: 1; transform: none; transition: opacity 0.8s ease 1s, transform 0.8s ease 1s; }
[data-rc5-mode="stage"] .rc5-scene--final.is-on .rc5-sp { transition-delay: 1.6s; }
[data-rc5-mode="stage"] .rc5-exit { height: 140px; margin-top: -1px; }

@media (prefers-reduced-motion: reduce) {
	.rc5 .rc5-rv, .rc5 .rc5-fig, .rc5 .rc5-img, .rc5 .rc5-hd, .rc5 .rc5-sp, .rc5 .rc5-open > * { opacity: 1 !important; transform: none !important; transition: none !important; }
}
