/*
 * Magister Digital - Homepage Journey ("The Maestro's Ledger")
 * ---------------------------------------------------------------------------
 * Scene styles for the 10-scene editorial-chaptering homepage. Built on the
 * --md-* token system (vm50-reference + magister-light-overrides). No raw hex
 * where a token exists. Big legible type (body >= 17px). Reserved media
 * dimensions to avoid CLS. Mobile-first. >= 44px tap targets.
 *
 * Motion is cosmetic ONLY. The full sale, answer block, and schema live in
 * server-rendered HTML on first paint (AEO law). prefers-reduced-motion shows
 * every reveal and kills transforms.
 *
 * Enqueued front-page only by functions.php:magister_enqueue_homepage_journey_assets().
 * Created: 2026-05-29 (Slice 1 - homepage proof slice).
 */

/* ===========================================================================
   REVEAL SAFETY NET (homepage). The shared .js .reveal { opacity:0 } rule in
   magister-light-overrides hides .reveal content until IntersectionObserver
   adds .is-revealed. That observer only fires for elements that actually enter
   the live viewport, so on a tall page anything far below the fold can stay
   hidden if the user never scrolls there (and a full-page screenshot capture
   never scrolls at all). This CSS fallback guarantees every .reveal element
   resolves to visible on its own, independent of JS: a short scoped keyframe
   fades/rises it in on load. Elements the observer reaches first still get the
   snappy .is-revealed transition; this only rescues the ones it never reaches.
   Reduced-motion shows everything instantly with no transform (handled below).
   =========================================================================== */
.js .md-scene .reveal,
.js .md-journey-progress ~ * .reveal {
	animation: md-reveal-failsafe 0.5s 0.15s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
/* When the observer wins (element scrolled into view), .is-revealed cancels the
   need for the failsafe by setting final state immediately via its own rule. */
.js .md-scene .reveal.is-revealed {
	animation: none;
}
@keyframes md-reveal-failsafe {
	to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	.js .md-scene .reveal,
	.js .md-journey-progress ~ * .reveal {
		animation: none !important;
		opacity: 1 !important;
		transform: none !important;
	}
}

/* ===========================================================================
   SCROLL-PROGRESS BAR (journey-scoped). Thin gold bar pinned to viewport top.
   JS sets --md-journey-scroll (0->1); a CSS fallback keeps it harmless no-JS.
   =========================================================================== */
.md-journey-progress {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	z-index: 120;
	background: transparent;
	pointer-events: none;
}
.md-journey-progress__fill {
	display: block;
	height: 100%;
	width: 100%;
	transform-origin: 0 50%;
	transform: scaleX(var(--md-journey-scroll, 0));
	background: linear-gradient(90deg, var(--md-accent), var(--md-accent-hi));
}
@media (prefers-reduced-motion: reduce) {
	.md-journey-progress { display: none; }
}

/* ===========================================================================
   SCENE SHELL - shared chapter rhythm. Each scene is one full chapter band.
   --soft = bone-soft canvas, --deep = deep teal. Generous vertical rhythm.
   =========================================================================== */
.md-scene {
	padding-block: var(--md-section-y);
	position: relative;
}
.md-scene--hero { padding-block: clamp(56px, 8vw, 104px) clamp(40px, 6vw, 72px); background: var(--md-bg-deep); }
.md-scene--marquee { padding-block: clamp(28px, 4vw, 48px); background: var(--md-bg-deep); border-top: 1px solid rgba(212, 175, 55, 0.20); }

/* Shared in-flow CTA row that closes every scene. */
.md-scene__cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--md-space-4);
	margin-top: var(--md-space-8);
}
.md-scene__cta-aside {
	font-family: var(--md-font-sans);
	font-size: 15px;
	color: var(--md-fg-muted);
}
.md-section--deep .md-scene__cta-aside { color: rgba(247, 247, 245, 0.82); }
.md-scene__cta-aside .md-link { white-space: nowrap; }

/* ===========================================================================
   SCENE 1 - FOUNDER-LED HERO. Asymmetric: copy ~55% / visual ~45%.
   H1 = LCP text element (no image LCP competition).
   =========================================================================== */
.md-scene-hero__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--md-space-8);
	align-items: center;
}
@media (min-width: 980px) {
	/* Rebalanced from 55/45 toward the visual so the hero is not lopsided-left.
	   The figure column gets more weight and the gap tightens; the figure itself
	   bleeds toward the right viewport edge below for a dominant, editorial hero. */
	.md-scene-hero__grid { grid-template-columns: 51fr 49fr; gap: var(--md-space-8); align-items: center; }
}
/* Let the hero figure bleed past the container's right padding so the image is
   dominant and closer to edge-bleed (award-tier). Clipped to viewport, no CLS:
   it only widens to the right, never pushes layout. */
@media (min-width: 1200px) {
	.md-scene--hero .md-container { overflow: visible; }
	.md-scene-hero__visual {
		margin-right: calc(50% - 50vw + var(--md-space-7, 40px));
	}
}
.md-scene-hero__copy {
	display: flex;
	flex-direction: column;
	gap: var(--md-space-5);
	max-width: 660px;
}
.md-scene-hero__h1 {
	font-family: var(--md-font-display);
	font-weight: 800;
	color: #F7F7F5;
	font-size: clamp(2.75rem, 6vw + 1rem, 6rem);
	line-height: 1.03;
	letter-spacing: -0.02em;
	margin: 0;
}
.md-scene-hero__h1 em {
	font-style: italic;
	color: var(--md-accent-hi);
}
.md-scene-hero__sub {
	color: rgba(247, 247, 245, 0.90);
	font-size: clamp(1.0625rem, 0.4vw + 1rem, 1.25rem);
	line-height: 1.6;
	margin: 0;
	max-width: 60ch;
}
.md-scene-hero__scan {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 10px;
}
.md-scene-hero__scan li {
	position: relative;
	padding-left: 26px;
	color: rgba(247, 247, 245, 0.92);
	font-size: 17px;
	line-height: 1.55;
}
.md-scene-hero__scan li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.55em;
	width: 9px;
	height: 9px;
	border-radius: 2px;
	background: var(--md-accent-hi);
}
.md-scene-hero__answer {
	color: rgba(247, 247, 245, 0.82);
	font-size: 17px;
	line-height: 1.62;
	margin: 0;
	max-width: 64ch;
	padding-left: var(--md-space-4);
	border-left: 2px solid rgba(212, 175, 55, 0.45);
}
.md-scene-hero__cta-row {
	display: flex;
	flex-wrap: wrap;
	/* Baseline-align the phone link with the button text, and share the button's
	   left edge so the CTA block reads as one column (was center-aligned, which
	   floated the bordered phone link off the button baseline). */
	align-items: baseline;
	gap: var(--md-space-3) var(--md-space-5);
	margin-top: var(--md-space-2);
}
.md-scene-hero__cta-row .md-hero__cta { align-self: flex-start; }
.md-scene-hero__call {
	display: inline-flex;
	align-items: baseline;
	gap: var(--md-space-2);
	font-family: var(--md-font-sans);
	font-size: 16px;
	font-weight: 600;
	color: #F7F7F5;
	/* tighten the underline to the text baseline so it lines up with the button row */
	padding-bottom: 2px;
	border-bottom: 1px solid rgba(247, 247, 245, 0.35);
	transition: color var(--md-dur-base) var(--md-ease), border-color var(--md-dur-base) var(--md-ease);
}
.md-scene-hero__call svg { align-self: center; }
.md-scene-hero__call:hover { color: var(--md-accent-hi); border-bottom-color: var(--md-accent-hi); }
.md-scene-hero__call svg { flex: none; }
/* Deep-section scene heroes (e.g. /brian-hong/) are graphite; a deep-section
   anchor rule was overriding the base bone call link to graphite-on-graphite.
   Re-assert bone at matching specificity (loads after the overrides sheet). */
.md-section--deep .md-scene-hero__call { color: #F7F7F5; }
.md-section--deep .md-scene-hero__call:hover { color: var(--md-accent-hi); }
.md-scene-hero__naked {
	font-family: var(--md-font-mono);
	font-size: 14px;            /* legible floor (was 13px) */
	letter-spacing: 0.03em;
	color: rgba(247, 247, 245, 0.74);   /* lifted from 0.66 for AA at the larger size */
	margin: 4px 0 0;
}
/* Hero visual column */
.md-scene-hero__figure { margin: 0; }
.md-scene-hero__figure img {
	width: 100%;
	height: auto;
	/* Taller, more dominant crop on desktop (was 3/2). Fills the rebalanced,
	   edge-bleeding visual column so the hero feels balanced, not copy-heavy. */
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 12px 0 0 12px;
	display: block;
	box-shadow: 0 28px 72px rgba(15, 17, 21, 0.5);
}
@media (max-width: 1199px) {
	.md-scene-hero__figure img { border-radius: 12px; }
}
.md-scene-hero__cap {
	margin-top: var(--md-space-3);
	font-family: var(--md-font-sans);
	font-size: 13px;
	line-height: 1.5;
	color: rgba(247, 247, 245, 0.74);
	padding-left: var(--md-space-3);
	border-left: 2px solid var(--md-accent-hi);
}
@media (max-width: 979px) {
	.md-scene-hero__visual { order: -1; }
	.md-scene-hero__figure img { aspect-ratio: 16 / 10; }
}

/* ===========================================================================
   SCENE 2 - TURNKEY MARQUEE. Single large founder-signed line, gold rule.
   =========================================================================== */
.md-marquee__line {
	display: block;
	font-family: var(--md-font-display);
	font-weight: 600;
	color: #F7F7F5;
	font-size: clamp(1.375rem, 1.6vw + 1rem, 2rem);
	line-height: 1.3;
	margin: 0;
	max-width: 70ch;
}
.md-marquee__rule {
	display: block;
	width: 48px;
	height: 2px;
	background: var(--md-accent-hi);
	margin-bottom: var(--md-space-4);
	transform: scaleX(1);
	transform-origin: 0 50%;
}
.md-marquee__prefix {
	color: var(--md-accent-hi);
	font-family: var(--md-font-mono);
	margin-right: 8px;
}
.md-marquee__attr {
	margin-top: var(--md-space-4);
	font-family: var(--md-font-mono);
	font-size: 13px;
	letter-spacing: 0.06em;
	color: rgba(247, 247, 245, 0.70);
}
.js .md-marquee__rule { animation: md-rule-grow 0.7s 0.1s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes md-rule-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .js .md-marquee__rule { animation: none; } }

/* ===========================================================================
   SCENE 3 - ACCUSATION AUDIT. Numbered concede list on bone-soft.
   =========================================================================== */
.md-audit__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--md-space-5);
}
.md-audit__item {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: var(--md-space-5);
	align-items: start;
	padding: var(--md-space-6);
	background: var(--md-bg-card);
	border: 1px solid var(--md-rule);
	border-left: 3px solid var(--md-accent);
	border-radius: 10px;
}
.md-audit__num {
	font-family: var(--md-font-mono);
	font-size: clamp(28px, 4vw, 44px);
	font-weight: 600;
	line-height: 1;
	color: var(--md-gold-ink);
}
.md-audit__q {
	font-family: var(--md-font-display);
	font-size: clamp(1.25rem, 1.4vw + 0.75rem, 1.625rem);
	line-height: 1.25;
	margin: 0 0 8px;
	color: var(--md-fg);
}
.md-audit__a {
	font-size: 17px;
	line-height: 1.6;
	color: var(--md-fg-soft);
	margin: 0;
	max-width: 62ch;
}
@media (min-width: 720px) {
	.md-audit__list { grid-template-columns: repeat(3, 1fr); }
	.md-audit__item { grid-template-columns: 1fr; gap: var(--md-space-3); }
}

/* ===========================================================================
   SCENE 4 - ATTRIBUTION-BLINDNESS. Centered-measure narrative beat, big whitespace.
   =========================================================================== */
.md-scene-blind__inner {
	max-width: 820px;
	display: flex;
	flex-direction: column;
	gap: var(--md-space-5);
}
.md-scene-blind__lead {
	font-family: var(--md-font-display);
	font-weight: 500;
	font-size: clamp(1.375rem, 1.8vw + 1rem, 2.125rem);
	line-height: 1.32;
	color: var(--md-fg);
	margin: 0;
}
.md-scene-blind__label {
	font-size: clamp(1.125rem, 0.6vw + 1rem, 1.375rem);
	line-height: 1.5;
	color: var(--md-fg-soft);
	margin: 0;
	padding-left: var(--md-space-4);
	border-left: 3px solid var(--md-accent);
}

/* ===========================================================================
   SCENE 5 - THREE PILLARS. Equal cards on deep teal, founder-signed.
   =========================================================================== */
.md-pillars__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--md-space-5);
}
@media (min-width: 860px) { .md-pillars__grid { grid-template-columns: repeat(3, 1fr); gap: var(--md-space-6); } }
.md-pillars__card {
	display: flex;
	flex-direction: column;
	gap: var(--md-space-3);
	padding: var(--md-space-6);
	background: rgba(247, 247, 245, 0.05);
	border: 1px solid rgba(212, 175, 55, 0.30);
	border-radius: 12px;
}
.md-pillars__num {
	font-family: var(--md-font-mono);
	font-size: 14px;
	letter-spacing: 0.12em;
	color: var(--md-accent-hi);
}
.md-pillars__title {
	font-family: var(--md-font-display);
	font-size: clamp(1.375rem, 1.4vw + 0.75rem, 1.75rem);
	line-height: 1.2;
	margin: 0;
	color: #F7F7F5;
}
.md-pillars__body {
	font-size: 17px;
	line-height: 1.6;
	color: rgba(247, 247, 245, 0.86);
	margin: 0;
	flex: 1 1 auto;
}
.md-pillars__attr {
	margin: 0;
	padding-top: var(--md-space-3);
	border-top: 1px solid rgba(212, 175, 55, 0.25);
	font-family: var(--md-font-mono);
	font-size: 12px;
	letter-spacing: 0.04em;
	color: var(--md-accent-hi);
}

/* ===========================================================================
   SCENE 6 - WHO THIS IS FOR. Twin equal-weight columns. "No" column = exclusivity.
   =========================================================================== */
.md-qualify__cols {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--md-space-5);
}
@media (min-width: 760px) { .md-qualify__cols { grid-template-columns: 1fr 1fr; gap: var(--md-space-6); } }
.md-qualify__col {
	padding: var(--md-space-6);
	background: var(--md-bg-card);
	border: 1px solid var(--md-rule);
	border-radius: 12px;
}
.md-qualify__col--yes { border-top: 4px solid var(--md-accent); }
.md-qualify__col--no { border-top: 4px solid var(--md-fg-muted); }
.md-qualify__head {
	font-family: var(--md-font-display);
	font-size: clamp(1.25rem, 1.2vw + 0.75rem, 1.5rem);
	margin: 0 0 var(--md-space-4);
	color: var(--md-fg);
}
.md-qualify__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 14px;
}
.md-qualify__list li {
	position: relative;
	padding-left: 28px;
	font-size: 17px;
	line-height: 1.55;
	color: var(--md-fg-soft);
}
.md-qualify__col--yes .md-qualify__list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.5em;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--md-accent);
}
.md-qualify__col--no .md-qualify__list li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 0.62em;
	width: 12px;
	height: 2px;
	background: var(--md-fg-muted);
}

/* ===========================================================================
   SCENE 7 - VERTICAL SELECTOR. 3 equal proof cards, image + scrim, on deep teal.
   =========================================================================== */
.md-verticals__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--md-space-5);
}
@media (min-width: 860px) { .md-verticals__grid { grid-template-columns: repeat(3, 1fr); gap: var(--md-space-6); } }
.md-verticals__card {
	display: flex;
	flex-direction: column;
	gap: var(--md-space-3);
	padding: 0 0 var(--md-space-6);
	/* Solid graphite card (was a 5%-bone wash that composited to near-white on
	   LIGHT sections, making the bone title/body invisible). As a self-contained
	   dark panel the bone text + gold number always read, on any section tone. */
	background: #16171A;
	border: 1px solid rgba(212, 175, 55, 0.28);
	border-radius: 12px;
	overflow: hidden;
	transition: border-color var(--md-dur-base) var(--md-ease), transform var(--md-dur-base) var(--md-ease);
}
.md-verticals__card:hover { border-color: var(--md-accent-hi); transform: translateY(-4px); }
.md-verticals__media {
	position: relative;
	margin: 0;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	/* Charcoal poster: the media zone reads as an intentional dark panel
	   before/if the photo loads, never an empty bone void. */
	background-color: var(--md-bg-deep, #0F1115);
}
.md-verticals__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.md-verticals__num {
	margin: var(--md-space-5) var(--md-space-5) 0;
	font-family: var(--md-font-mono);
	font-size: 12px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--md-accent-hi);
}
.md-verticals__title {
	margin: 0 var(--md-space-5);
	font-family: var(--md-font-display);
	font-size: clamp(1.375rem, 1.3vw + 0.75rem, 1.625rem);
	line-height: 1.2;
	color: #F7F7F5;
}
.md-verticals__body {
	margin: 0 var(--md-space-5);
	font-size: 16px;
	line-height: 1.58;
	color: rgba(247, 247, 245, 0.84);
	flex: 1 1 auto;
}
.md-verticals__link {
	margin: var(--md-space-2) var(--md-space-5) 0;
	font-family: var(--md-font-sans);
	font-size: 15px;
	font-weight: 600;
	color: var(--md-accent-hi);
}

/* ===========================================================================
   SCENE 8 - STRATEGY-CALL OFFER. The ONE pinned-proof moment (position:sticky).
   Sticky offer panel left; checkmarked stack reveals line by line right.
   =========================================================================== */
.md-offer__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--md-space-7);
	align-items: start;
}
@media (min-width: 900px) {
	.md-offer__grid { grid-template-columns: 5fr 7fr; gap: var(--md-space-10); }
	.md-offer__sticky { position: sticky; top: 96px; }
}
.md-offer__lead { margin: 0 0 var(--md-space-4); color: var(--md-fg); }
.md-offer__refusal {
	margin: 0 0 var(--md-space-5);
	font-family: var(--md-font-display);
	font-style: italic;
	font-size: clamp(1.125rem, 0.6vw + 1rem, 1.375rem);
	line-height: 1.4;
	color: var(--md-fg);
	padding-left: var(--md-space-4);
	border-left: 3px solid var(--md-accent);
}
.md-offer__call { margin-top: var(--md-space-4); color: var(--md-fg-muted); }
.md-offer__stack {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--md-space-5);
}
.md-offer__item {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: var(--md-space-4);
	align-items: start;
	padding: var(--md-space-6);
	background: var(--md-bg-card);
	border: 1px solid var(--md-rule);
	border-radius: 12px;
}
.md-offer__check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--md-accent-tint-strong);
	color: var(--md-gold-ink);
	flex: none;
}
.md-offer__item-title {
	font-family: var(--md-font-display);
	font-size: clamp(1.25rem, 1.2vw + 0.75rem, 1.5rem);
	line-height: 1.2;
	margin: 0 0 6px;
	color: var(--md-fg);
}
.md-offer__item-body {
	font-size: 17px;
	line-height: 1.6;
	color: var(--md-fg-soft);
	margin: 0;
	max-width: 64ch;
}

/* ===========================================================================
   SCENE 10 - FINAL CTA + FOUNDERS (deep teal).
   =========================================================================== */
.md-final__founders {
	list-style: none;
	margin: 0 0 var(--md-space-8);
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--md-space-4);
}
@media (min-width: 720px) { .md-final__founders { grid-template-columns: repeat(3, 1fr); gap: var(--md-space-6); } }
.md-final__founder {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: var(--md-space-5);
	background: rgba(247, 247, 245, 0.05);
	border: 1px solid rgba(212, 175, 55, 0.25);
	border-radius: 10px;
}
.md-final__founder-name {
	font-family: var(--md-font-display);
	font-size: clamp(1.25rem, 1vw + 0.75rem, 1.5rem);
	color: #F7F7F5;
}
.md-final__founder-role {
	font-family: var(--md-font-mono);
	font-size: 12px;
	letter-spacing: 0.04em;
	color: var(--md-accent-hi);
}
.md-final__cta-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--md-space-5);
}
.md-final__naked {
	margin-top: var(--md-space-4);
	font-family: var(--md-font-mono);
	font-size: 13px;
	letter-spacing: 0.04em;
	color: rgba(247, 247, 245, 0.66);
}

/* ===========================================================================
   MOBILE LAYOUT GUARDS - single column stacks, generous tap, no cramped gutters.
   =========================================================================== */
@media (max-width: 767px) {
	.md-scene-hero__grid,
	.md-offer__grid,
	.md-qualify__cols { grid-template-columns: 1fr !important; gap: var(--md-space-7) !important; }
	.md-offer__sticky { position: static; }
	.md-scene__cta .md-hero__cta,
	.md-scene-hero__cta-row .md-hero__cta,
	.md-final__cta-row .md-hero__cta { width: 100%; }
	.md-scene-hero__h1 { font-size: clamp(2.25rem, 9vw, 3rem); }
}

/* Reserve the mobile sticky call-bar's height so the last scene is never hidden. */
@media (max-width: 767px) {
	.md-scene--final { padding-bottom: calc(var(--md-section-y) + 72px); }
}

/* ===========================================================================
   DEEP-SECTION BLUE ACCENT FIX (Ink·Signal·Ember).
   The small blue accents (nums, prefixes, links, attributions, roles) default
   to --md-accent-hi (#E3C24E bright cobalt). On the charcoal scene cards that
   is only ~2.8-3.0:1. Inside any .md-section--deep scene, route them to
   blue-on-dark #D4AF37 (~6:1 on #0F1115). Descendant specificity (0,2,0/0,2,1)
   beats the bare element rules above. The hero <em> stays accent for large
   display weight but blue-on-dark still reads premium on charcoal. */
.md-section--deep .md-scene-hero__h1 em,
.md-section--deep .md-marquee__prefix,
.md-section--deep .md-pillars__num,
.md-section--deep .md-pillars__attr,
.md-section--deep .md-verticals__num,
.md-section--deep .md-verticals__link,
.md-section--deep .md-final__founder-role {
	color: var(--md-blue-on-dark);
}
