/* Agent Recruitment, Chapter 03 (The Sundance Advantage) - staging only - 1.0.0-recruit-ch03-t6340u
   Continues Chapter 02 (same tokens: navy/ink/ivory/gold, Cinzel headings, Inter body, same gold line system). Scroll position drives the story (script sets --b / --f); the gold line
   is an SVG drawn by script from real layout positions. No animation library, no scroll lock. Hidden start states exist only when script runs (html.js-rc, set by the Chapter 01
   head flag, reduced motion off). Without script, with script blocked, or with reduced motion: all copy, all four images and the line are shown, static. */
.rc3 {
	overflow-x: clip;
	--navy: #0c263a;
	--ink: #071624;
	--ivory: #f6f2ea;
	--gold: #d5ae59;
	--gold-lt: #e8ca86;
	position: relative;
	background: var(--ink);
	color: var(--ivory);
	font-family: Inter, Helvetica, Arial, sans-serif;
	font-size: 17px;
	line-height: 1.65;
}
.rc3 *, .rc3 *::before, .rc3 *::after { box-sizing: border-box; }
:where(.rc3) :where(h2, h3, p, figure) { margin: 0; }
.rc3 img { max-width: 100%; display: block; }

.rc3-ch {
	position: relative;
	isolation: isolate;
	padding: 48px 0 0;
	background: linear-gradient(180deg, var(--ink) 0, var(--navy) 46%, var(--ink) 100%);
}

/* Static line (no script / script blocked): same x as the Chapter 01 / 02 fallback line, whole chapter height. Hidden once the script has drawn the real line. */
.rc3-fallback {
	display: block;
	position: absolute;
	z-index: 1;
	top: 0;
	bottom: 0;
	left: calc(max(0px, (100% - 1440px) / 2) + 24px);
	width: 2px;
	background: var(--gold);
	pointer-events: none;
}
.rc3[data-rc3-ready] .rc3-fallback { display: none; }
.rc3-lines { position: absolute; left: 0; top: 0; z-index: 1; display: block; overflow: visible; pointer-events: none; }
.rc3-lines path { fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: butt; stroke-linejoin: round; shape-rendering: geometricPrecision; }
.rc3-lines circle { fill: var(--gold); }

/* ---------- Head ---------- */
.rc3-head { position: relative; z-index: 2; max-width: 640px; margin: 0 auto; padding: 0 24px; }
.rc3-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.18em; line-height: 1.4; color: var(--gold-lt); }
.rc3-h {
	margin-top: 14px;
	font-family: Cinzel, "Times New Roman", serif;
	font-weight: 500;
	font-size: clamp(28px, 7.6vw, 42px);
	line-height: 1.12;
	letter-spacing: 0.01em;
	color: #f7f4ee;
	text-wrap: balance;
}
.rc3-intro { margin-top: 20px; font-size: 17px; line-height: 1.65; color: rgba(246, 242, 234, 0.95); }

/* ---------- Four moments (image + copy), stacked on narrow ---------- */
.rc3-moments { position: relative; z-index: 2; max-width: 640px; margin: 0 auto; padding: 0 24px; }
.rc3-m { display: block; }
.rc3-m + .rc3-m { margin-top: 64px; }
.rc3-moments { margin-top: 64px; }
.rc3-fig {
	position: relative;
	width: 100%;
	aspect-ratio: 1672 / 941;
	border-radius: 8px;
	overflow: hidden;
	background: #0a1d2e;
	outline: 1px solid rgba(213, 174, 89, 0.32);
	box-shadow: 0 16px 34px rgba(2, 10, 18, 0.5);
}
.rc3-img { width: 100%; height: auto; aspect-ratio: 1672 / 941; }
.rc3-txt { margin-top: 24px; }
.rc3-h3 {
	font-family: Cinzel, "Times New Roman", serif;
	font-weight: 500;
	font-size: clamp(22px, 6vw, 28px);
	line-height: 1.2;
	letter-spacing: 0.01em;
	color: var(--gold-lt);
	text-wrap: balance;
}
.rc3-sub { margin-top: 10px; font-size: 18px; font-weight: 600; line-height: 1.4; color: #f7f4ee; }
.rc3-body { margin-top: 12px; font-size: 17px; line-height: 1.65; color: rgba(246, 242, 234, 0.92); }

/* ---------- Closing statement ---------- */
.rc3-close { position: relative; z-index: 2; max-width: 640px; margin: 96px auto 0; padding: 0 24px; text-align: center; }
.rc3-c { font-family: Cinzel, "Times New Roman", serif; font-weight: 500; letter-spacing: 0.01em; text-wrap: balance; }
.rc3-c1 { display: block; font-size: clamp(24px, 6.4vw, 34px); line-height: 1.2; color: #f7f4ee; }
.rc3-c2 { display: block; margin-top: 12px; font-size: clamp(20px, 5.2vw, 26px); line-height: 1.3; color: var(--gold-lt); }
.rc3-end { height: 110px; }

/* ---------- Scroll-driven start states (only with script, reduced motion off) ---------- */
.js-rc .rc3 .rc3-r {
	opacity: var(--b, 0);
	transform: translate3d(0, calc((1 - var(--b, 0)) * 14px), 0);
}
.js-rc .rc3 .rc3-fig {
	opacity: var(--f, 0);
	transform: translate3d(calc(var(--side, -1) * (1 - var(--f, 0)) * var(--slide, 36px)), 0, 0);
	will-change: transform, opacity;
}
.rc3-m--L .rc3-fig { --side: -1; }
.rc3-m--R .rc3-fig { --side: 1; }
/* Fail-safe: if the script never starts, everything still appears (never permanently hidden). */
.js-rc .rc3:not([data-rc3-live]) .rc3-r,
.js-rc .rc3:not([data-rc3-live]) .rc3-fig { animation: rc3-failsafe 0.01s linear 4s forwards; }
@keyframes rc3-failsafe { to { opacity: 1; transform: none; } }

/* ---------- Gold line position for the no-script fallback: same breakpoints as Chapters 01 and 02 ---------- */
@media (max-width: 900px), (max-aspect-ratio: 1/1) {
	.rc3-fallback { left: 11px; }
}
@media (min-width: 560px) and (max-width: 900px), (min-width: 560px) and (max-aspect-ratio: 1/1) {
	.rc3-fallback { left: 19px; }
	.rc3-head, .rc3-moments, .rc3-close { padding-left: 40px; padding-right: 40px; }
}

/* ---------- Wide: alternating image / copy, line runs down the centre gap ---------- */
@media (min-width: 901px) {
	.rc3-ch { padding-top: 64px; }
	.rc3-head { max-width: 1440px; padding: 0 48px; }
	.rc3-head > * { max-width: 640px; }
	.rc3-h { font-size: clamp(36px, 3.4vw, 56px); }
	.rc3-intro { margin-top: 22px; font-size: 18px; max-width: 44ch; }
	.rc3-moments { max-width: 1240px; padding: 0 48px; margin-top: 88px; }
	.rc3-m {
		display: grid;
		grid-template-columns: 1fr 1fr;
		column-gap: clamp(80px, 8vw, 128px);
		align-items: center;
	}
	.rc3-m + .rc3-m { margin-top: 88px; }
	.rc3-m--L .rc3-fig { grid-column: 1; grid-row: 1; }
	.rc3-m--L .rc3-txt { grid-column: 2; grid-row: 1; }
	.rc3-m--R .rc3-fig { grid-column: 2; grid-row: 1; }
	.rc3-m--R .rc3-txt { grid-column: 1; grid-row: 1; }
	.rc3-txt { margin-top: 0; max-width: 460px; }
	.rc3-h3 { font-size: clamp(24px, 2.1vw, 32px); }
	.rc3-sub { font-size: 19px; }
	.rc3-body { max-width: 40ch; }
	.rc3-close { max-width: 900px; margin-top: 96px; }
	.rc3-c1 { font-size: clamp(26px, 2.3vw, 38px); }
	.rc3-c2 { font-size: clamp(21px, 1.9vw, 28px); }
	.rc3-end { height: 130px; }
	.rc3-fallback { left: calc(max(0px, (100% - 1440px) / 2) + 24px); }
	.js-rc .rc3 .rc3-fig { --slide: 56px; }
}
/* Wide but portrait (large tablet held upright): Chapters 01 and 02 are stacked there and the line sits at 19px. */
@media (min-width: 901px) and (max-aspect-ratio: 1/1) {
	.rc3-fallback { left: 19px; }
}

@media (prefers-reduced-motion: reduce) {
	.rc3 .rc3-r, .rc3 .rc3-fig { opacity: 1 !important; transform: none !important; animation: none !important; }
}
