/* ==========================================================================
   RC5.1 — Seven-frame homepage, correction pass.
   See RC5.1_CORRECTION_REPORT.md for the full account. Summary: RC5
   rendered a visible live "second layout" on top of every master;
   RC5.1 removes all of that. The approved masters are now the entire
   visible page for each frame. The only visible things this
   stylesheet adds are: (a) small transparent CTA hit-areas on Frames
   01/07 (no visible content of their own — the master's own button
   graphic is what's seen), and (b) atmospheric-only animation (light
   sweep, Frame 04 pulse) that carries no information and so cannot
   duplicate anything. Everything else RC5 rendered visibly is now
   .sr-only.
   ========================================================================== */

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

/* ----------------------------------------------------------------------
   Header duplication fix. The approved masters bake in their own
   complete header/nav/logo/CTA at the top of Frames 01, 04 and 07 in
   particular. The theme's own live sticky header (header.php,
   #heron-header) rendered a SECOND header directly above it, so two
   navigation systems appeared to compete, exactly as reported.

   Fix: visually hide the live header specifically on the front page
   (WordPress adds the `home` body class there automatically — no
   change to header.php itself, which still renders normally, visibly,
   on every other page: assessment, reports, Flight Deck, wp-admin).
   The live header is hidden with the same accessible technique as
   .sr-only, not display:none — real keyboard/screen-reader navigation
   to Home/Problem/Approach/Platform/Insights/Flight Review still
   exists in the DOM, it's just not visually duplicating the master's
   own baked header on screen.
   ---------------------------------------------------------------------- */
body.home #heron-header {
	position: absolute;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
	z-index: -1; /* explicit — the original .heron-header rule sets z-index:500; this removes any residual stacking priority once collapsed to 1x1px, defense-in-depth alongside the width/height/clip collapse */
}
body.home #heron-header:focus-within {
	position: static;
	width: auto; height: auto;
	padding: inherit; margin: 0;
	overflow: visible;
	clip: auto;
	white-space: normal;
	z-index: 500;
}

/* ----------------------------------------------------------------------
   Frame containment. RC5.5 note: overflow:hidden is kept here purely
   as a defensive no-op against sub-pixel rounding — it is NOT used to
   crop anything. Nothing in this stylesheet is sized to be larger
   than its box any more, so nothing should ever actually hit this
   boundary.
   ---------------------------------------------------------------------- */
.heron-frame {
	position: relative;
	overflow: hidden;
	background: var(--heron-navy);
	color: var(--heron-text);
	margin: 0;
	display: block;
	line-height: 0;
}

/* ----------------------------------------------------------------------
   RC5.5 — RESET TO MASTER-INTEGRITY RENDERING.

   Every previous technique in this file that constrained a frame's
   box to less than the master image's own full height — the fixed
   1536:1024 aspect-ratio box combined with object-fit:cover (RC5.1-
   RC5.3), and RC5.4's geometric 10% top-crop — is removed. Testing
   confirmed the crop approach removed genuine content (headings, the
   nine organisational-condition icons, edge copy) on Frames 03-06.

   ONE method now, used identically for every frame with a baked
   master (01, 03, 04, 05, 06, 07 — Frame 02 is handled separately
   below since its native ratio genuinely differs):

     .heron-frame__media has NO aspect-ratio and NO fixed height — it
     sizes itself naturally to whatever its content (the image)
     renders at.

     .heron-frame__img is width:100%, height:auto, position:static —
     the browser computes its height directly from the image's own
     intrinsic aspect ratio, so the full image is always shown, at
     its true proportions, with mathematical certainty: there is no
     mechanism left in this ruleset that COULD crop it, horizontally
     or vertically, because nothing constrains the box to be smaller
     than the image any more.

   This intentionally and knowingly restores the baked navigation/
   footer strips on Frames 03-06 — accepted per this round's explicit
   priority order (content integrity first; the strips will be
   resolved by replacing those masters with clean versions later, not
   by CSS).
   ---------------------------------------------------------------------- */
.heron-frame__media {
	position: relative;
	width: 100%;
	display: block;
	line-height: 0;
}

.heron-frame__picture,
.heron-frame__img {
	position: static;
	display: block;
	width: 100%;
	height: auto;
}

/* Frame 02 — left exactly at native aspect ratio, per explicit
   instruction not to make any further CSS attempt here. Uses the same
   universal width:100%/height:auto rule above; no override needed. */

/* ----------------------------------------------------------------------
   RC5.5 §1/§4/§5 — Frame 01 and Frame 07 render completely static:
   zero scale, zero translate, zero animation, from any source. Kept
   as an explicit, mechanically-checkable rule even though the master-
   integrity rendering above no longer has any transform-based
   mechanism left that could move these images in the first place —
   this line exists so "no motion on 01/07" is something you can grep
   for and confirm directly, not just infer from the absence of other
   rules. The light-sweep atmospheric overlay is kept on these two
   frames — a separate, non-scaling gradient layer that never touches
   the master image itself.
   ---------------------------------------------------------------------- */
.heron-frame--01 .heron-frame__img,
.heron-frame--07 .heron-frame__img {
	animation: none;
	transform: none;
	translate: none;
}

.heron-frame__light-sweep {
	position: absolute;
	inset: 0;
	pointer-events: none;
	/* background-size larger than the box is required for
	   background-position to have any visible effect at all — a
	   gradient sized to exactly fill its box (the default) has nowhere
	   to pan to, so animating background-position on it is a no-op.
	   This was a real bug: the "sweep" was running but invisible. */
	background: radial-gradient(ellipse 60% 45% at 72% 30%, rgba(244,239,228,0.12), transparent 70%);
	background-size: 145% 145%;
	background-position: 0% 0%;
	opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
	.heron-frame__light-sweep { animation: heron-light-sweep 11s ease-in-out infinite; opacity: 1; }
	.heron-frame__light-sweep--07 { animation-duration: 15s; }
}
@keyframes heron-light-sweep {
	0%, 100% { background-position: 0% 0%; opacity: 0.4; }
	50%      { background-position: 26% -16%; opacity: 0.85; }
}

.heron-frame__pulse {
	position: absolute;
	left: 40%; top: 32%; width: 24%; height: 38%;
	pointer-events: none;
	background: radial-gradient(circle, rgba(176,141,87,0.22), transparent 65%);
	opacity: 0.4;
}
@media (prefers-reduced-motion: no-preference) {
	.heron-frame__pulse { animation: heron-engine-pulse 5.5s ease-in-out infinite; }
}
@keyframes heron-engine-pulse {
	0%, 100% { opacity: 0.3; transform: scale(0.96); }
	50%      { opacity: 0.5; transform: scale(1.03); }
}

.heron-frame__cta-zone {
	position: absolute;
	inset: 0;
	z-index: 30; /* explicit stacking above media/light-sweep/pulse layers, not relying solely on DOM order */
	pointer-events: none;
	line-height: normal;
}
.heron-frame__cta-hit {
	position: absolute;
	display: block;
	z-index: 1;
	pointer-events: auto !important; /* defensive: guarantees this can never inherit pointer-events:none from an ancestor */
	cursor: pointer;
	border-radius: var(--heron-radius-btn);
	outline-offset: 3px;
}
.heron-frame__cta-hit:focus-visible {
	outline: 2px solid var(--heron-gold);
}
/* RC5.6: "START YOUR FLIGHT READINESS ASSESSMENT™" needed to read as
   unmistakably clickable, not just on hover. Given a persistent
   visible gold outline via the transparent hit area itself — the
   master image's own text underneath is untouched, nothing was added
   to the artwork. Deliberately restrained relative to the boxed
   "BOOK A FLIGHT REVIEW™" button beside it: a thinner border (1px vs
   that button's ~1.5-2px baked outline), no fill, smaller footprint —
   reads as the secondary action it is, not a second competing button.
   Coordinates are unchanged from RC5.2/RC5.3/RC5.4/RC5.5 — this only
   changes the persistent visual styling, not the hit area's position
   or size. */
.heron-frame__cta-zone--07 .heron-frame__cta-hit--primary {
	border: 1px solid rgba(176, 141, 87, 0.65);
	border-radius: var(--heron-radius-btn);
	box-sizing: border-box;
	transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.heron-frame__cta-zone--07 .heron-frame__cta-hit--primary:hover,
.heron-frame__cta-zone--07 .heron-frame__cta-hit--primary:focus-visible {
	border-color: var(--heron-gold);
	background-color: rgba(244, 239, 228, 0.05);
	transform: translateX(3px);
}
/* RC5.2: coordinates re-measured directly against the actual master
   pixels (previous values were visual estimates that turned out to be
   materially wrong — Frame 01's buttons were positioned ~11 percentage
   points too high, meaning clicks on the real visible button landed
   on non-interactive space above it). These are measured, not guessed.
   RC5.6: coordinates below are byte-identical to every prior round for
   Frame 01 and Frame 07's secondary CTA — only Frame 07's primary CTA
   styling changed above; its coordinates are also unchanged. */
.heron-frame__cta-zone--01 .heron-frame__cta-hit--primary   { left: 3.2%;  top: 65.3%; width: 27.5%; height: 4.6%; }
.heron-frame__cta-zone--01 .heron-frame__cta-hit--secondary { left: 31.8%; top: 65.3%; width: 17.5%; height: 4.6%; }
.heron-frame__cta-zone--07 .heron-frame__cta-hit--primary   { left: 3.12%; top: 64.45%; width: 44.08%; height: 3.03%; } /* RC5.7: re-measured directly against master pixels — the RC5.6 box (left:9.5%) started too far right, clipping "ST" of START; new bounds drawn and visually verified against the actual text+arrow with breathing margin on both sides */
.heron-frame__cta-zone--07 .heron-frame__cta-hit--secondary { left: 4.2%;  top: 67.8%; width: 40%;   height: 8.8%; }

@media (max-width: 900px) {
	.heron-frame__cta-zone {
		position: static;
		display: flex; flex-direction: column; gap: var(--heron-space-2);
		padding: var(--heron-space-3);
		line-height: normal;
	}
	.heron-frame__cta-hit { position: static; width: 100%; height: auto; }
	.heron-frame__cta-hit .sr-only {
		position: static; width: auto; height: auto; padding: 14px 20px; margin: 0;
		clip: auto; white-space: normal; overflow: visible;
		display: block; text-align: center; border-radius: var(--heron-radius-btn);
		font-family: var(--heron-font-body); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.85rem;
	}
	.heron-frame__cta-zone--01 .heron-frame__cta-hit--primary .sr-only,
	.heron-frame__cta-zone--07 .heron-frame__cta-hit--primary .sr-only {
		background: var(--heron-gold); color: var(--heron-navy);
	}
	.heron-frame__cta-zone--07 .heron-frame__cta-hit--secondary .sr-only,
	.heron-frame__cta-zone--01 .heron-frame__cta-hit--secondary .sr-only {
		border: 1px solid var(--heron-gold); color: var(--heron-gold);
	}
}
