/**
 * Variant CSS: hero--cinema-letterbox-bars
 * Layer 2 — Variants Library (Path B Recipes architecture).
 *
 * Concept: a FILM STILL — the whole hero is one dark composed frame (a paused
 *   movie frame with letterbox bars):
 *     TOP BAR    — slim SOLID near-black bar holding the centered kicker, like
 *                  a film title card.
 *     STILL      — a HUGE 21:9 landscape photo strip running edge-to-edge
 *                  across the full viewport (real wp:image; the recipe pipeline
 *                  overrides the first <img src> per industry).
 *     BOTTOM BAR — solid near-black bar holding H1 + deck + the single CTA in
 *                  light text.
 *   The bars are SOLID surfaces owned by the section, NOT overlays on the
 *   photo — nothing rides on the still. Thin "projection gate" keylines frame
 *   the photo where the bars meet it.
 *
 * Distinct from hero--full-photo-lower-third-band: THERE the photo is the
 *   full-bleed BACKGROUND of the entire section and a dark band rides ON the
 *   photo's bottom edge. HERE the photo is a middle strip BETWEEN two solid
 *   bars and never sits under any copy. Distinct from
 *   hero--panoramic-strip-headline-over: THERE the H1 is overlaid ON the
 *   panorama over a scrim; HERE no text touches the photo at all. Distinct
 *   from gallery--cinematic-letterbox-band: that is a GALLERY-role band, not
 *   a hero frame. Distinct from hero--headline-top-photo-band-bottom: THERE
 *   the statement sits on the LIGHT page surface above the band; HERE the
 *   entire section is a dark film frame.
 *
 * AA strategy: both bars are ALWAYS-dark surfaces painted by the section
 *   itself (near-black tinted toward the accent), so the light text
 *   (--on-dark) never depends on photo pixels (KI-020 safe; --bg-main is never
 *   used as a foreground). The section background is declared TWICE on
 *   purpose: `var(--background-dark)` first (fallback for engines without
 *   color-mix() AND the self-dark marker the recipe-loader scans for —
 *   variant_is_self_dark() excludes this section from the light ABAB
 *   alternation so .aiss-bg--base/--alt can never repaint the frame light
 *   under white text), then the final color-mix(in srgb, #000 92%, --accent)
 *   near-black. The CTA is a SOLID accent fill → its text is --on-accent
 *   (NEVER --on-dark, which is invisible on light accents like lime/butter).
 *   The kicker mixes the accent with a 45% white floor so it clears AA on the
 *   near-black bar for every theme accent.
 *
 * Centering rule (A8/A9): every centered child of the full-width constrained
 *   section keeps horizontal auto margins (margin: 0 auto …) so it never
 *   sticks to the left edge.
 *
 * Scope rule: EVERY selector starts with
 *   body.aibt-universal .universal-hero--cinema-letterbox-bars
 * because the theme loads ALL variant CSS globally (role-level selectors leak).
 * Only @media / @keyframes are left unscoped.
 *
 * @package AI_Base_Theme
 * @since 2026-06-11 (Path B Variants Library — cinema letterbox bars)
 *
 * Default photo: photo-1469474968028-56623f02e42e — mountain lake at first
 * light, ultra-wide cinematic landscape (travel / photography mood, crops
 * cleanly to 21:9). The recipe pipeline can swap the still per industry.
 * Pool alternatives: photo-1481833761820-0509d3217039 (coastal road — travel /
 * automotive), photo-1486406146926-c627a92ad1ab (glass skyscrapers —
 * architecture), photo-1517248135467-4c7edcad34c4 (restaurant interior),
 * photo-1534438327276-14e5300c3a48 (premium interior / hotel fitness).
 */

/* === Section shell — the dark film frame ==================================
   The section paints the letterbox surface; the bars are padded areas of this
   same solid frame, separated by the edge-to-edge still. */
body.aibt-universal .universal-hero--cinema-letterbox-bars {
	/* Fallback for engines without color-mix() — ALSO the self-dark marker for
	   the recipe-loader ABAB exclusion (variant_is_self_dark scans background
	   declarations for --background-dark). Do NOT remove. */
	background: var(--background-dark, #141414);
	/* Final surface: theme-agnostic near-black, tinted 8% toward the accent. */
	background: color-mix(in srgb, #000 92%, var(--accent, #000));
	color: var(--on-dark, #fff);
	padding: 0 !important;
	overflow: hidden;
}

/* === Letterbox bars ========================================================
   Solid surfaces above and below the still. margin:0 kills the constrained
   layout block-gap so the bars sit flush against the photo (no seams in the
   frame). Box-border padding keeps 375px free of horizontal overflow. */
body.aibt-universal .universal-hero--cinema-letterbox-bars .universal-hero__bar {
	width: 100%;
	margin: 0 !important;
	box-sizing: border-box;
	padding-inline: clamp(var(--space-4, 16px), 5vw, var(--space-7, 48px));
}

/* Slim top bar — the title card. A hairline keyline frames the still's top
   edge like a projection gate. */
body.aibt-universal .universal-hero--cinema-letterbox-bars .universal-hero__bar--top {
	padding-block: calc(clamp(var(--space-4, 16px), 3vh, var(--space-6, 32px)) * var(--density, 1));
	border-bottom: var(--decor-border-width, 1px) solid color-mix(in srgb, var(--on-dark, #fff) 14%, transparent);
}

/* Roomy bottom bar — holds the whole statement (H1 + deck + CTA). */
body.aibt-universal .universal-hero--cinema-letterbox-bars .universal-hero__bar--bottom {
	padding-block: calc(clamp(var(--space-7, 48px), 8vh, var(--space-9, 96px)) * var(--density, 1));
	border-top: var(--decor-border-width, 1px) solid color-mix(in srgb, var(--on-dark, #fff) 14%, transparent);
}

/* === Kicker — film title card line ========================================
   Centered child of a full-width section → horizontal auto margins (A8/A9).
   Accent brightened with a 45% white floor = AA on the near-black bar for
   every theme accent. */
body.aibt-universal .universal-hero--cinema-letterbox-bars .universal-hero__kicker {
	display: block;
	width: 100%;
	max-width: var(--max-wide, 1280px);
	margin: 0 auto !important;
	font-family: var(--font-body) !important;
	font-size: var(--text-xs, 12px) !important;
	font-weight: 600 !important;
	letter-spacing: var(--tracking-widest, 0.2em) !important;
	text-transform: uppercase !important;
	line-height: 1.4 !important;
	color: color-mix(in srgb, var(--accent, #fff) 55%, #fff) !important;
}

/* === The still — 21:9 panorama, edge-to-edge ============================== */
body.aibt-universal .universal-hero--cinema-letterbox-bars figure.universal-hero__photo {
	width: 100%;
	margin: 0 !important;
}

body.aibt-universal .universal-hero--cinema-letterbox-bars .universal-hero__photo img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 21 / 9;
	/* Keep the still cinematic on huge screens without ballooning the hero
	   past the fold (rem-based bound, not a spacing value). */
	max-height: clamp(20rem, 58vh, 38rem);
	object-fit: cover;
	object-position: center;
	/* The still "projects in" — opacity only, so the frame never shifts (CLS-safe). */
	animation: aiss-hero-film-still-in var(--duration-slow, 500ms) var(--ease-standard, ease) both;
}

/* === Headline — light on the always-dark bottom bar (KI-020: correct here) =
   Centered → horizontal auto margins (A8/A9). Size/tracking come from the
   block's inline style; this sets family + colour + measure only. */
body.aibt-universal .universal-hero--cinema-letterbox-bars h1.universal-hero__headline,
body.aibt-universal .universal-hero--cinema-letterbox-bars .universal-hero__headline {
	font-family: var(--font-display) !important;
	color: var(--on-dark, #fff) !important;
	margin: 0 auto var(--space-5, 24px) auto !important;
	max-width: 26ch;
	text-wrap: balance;
}

body.aibt-universal .universal-hero--cinema-letterbox-bars .universal-hero__headline em {
	font-style: italic;
	color: color-mix(in srgb, var(--accent, #fff) 70%, #fff);
	font-weight: inherit;
}

/* === Deck — muted light, never below AA on the near-black bar ============= */
body.aibt-universal .universal-hero--cinema-letterbox-bars .universal-hero__deck {
	font-family: var(--font-body) !important;
	font-size: var(--text-lg, 20px) !important;
	line-height: var(--leading-relaxed, 1.6) !important;
	color: color-mix(in srgb, var(--on-dark, #fff) 80%, transparent) !important;
	margin: 0 auto var(--space-6, 32px) auto !important;
	max-width: 56ch;
}

/* === CTA — solid accent fill, self-contained AA ===========================
   Text on the --accent surface MUST be --on-accent (NEVER --on-dark — white
   text is invisible on light accents). --accent / --on-accent are guaranteed
   by QC-theme-token-parity in all themes. */
body.aibt-universal .universal-hero--cinema-letterbox-bars .universal-hero__actions {
	margin: 0 auto !important;
	justify-content: center;
}

body.aibt-universal .universal-hero--cinema-letterbox-bars .wp-block-button.universal-hero__cta .wp-block-button__link {
	font-family: var(--font-body);
	font-weight: 600;
	font-size: var(--text-base, 16px);
	letter-spacing: var(--tracking-wide, 0.02em);
	padding: 1.1rem 2.6rem;
	color: var(--on-accent, #fff);
	background: var(--accent);
	border: var(--decor-border-width, 1px) solid var(--accent);
	border-radius: var(--decor-radius, 0);
	min-height: var(--target-min, 44px);
	display: inline-flex;
	align-items: center;
	white-space: nowrap;
	transition:
		background var(--duration-fast, 150ms) var(--ease-standard, ease),
		border-color var(--duration-fast, 150ms) var(--ease-standard, ease),
		transform var(--duration-fast, 150ms) var(--ease-standard, ease);
}

body.aibt-universal .universal-hero--cinema-letterbox-bars .wp-block-button.universal-hero__cta .wp-block-button__link:hover {
	/* Brighten toward white on the dark frame (fallback when the theme has no
	   --accent-hover); text stays --on-accent. */
	background: var(--accent-hover, color-mix(in srgb, var(--accent) 84%, #fff));
	border-color: var(--accent-hover, color-mix(in srgb, var(--accent) 84%, #fff));
	color: var(--on-accent, #fff);
	transform: translateY(-2px);
}

body.aibt-universal .universal-hero--cinema-letterbox-bars .wp-block-button.universal-hero__cta .wp-block-button__link:focus-visible {
	outline: 2px solid var(--on-dark, #fff);
	outline-offset: var(--focus-offset, 4px);
}

/* === Tablet ================================================================
   Relax the letterbox a touch so the still keeps presence at mid widths. */
@media (max-width: 781px) {
	body.aibt-universal .universal-hero--cinema-letterbox-bars .universal-hero__photo img {
		/* Override the block's inline aspect-ratio style. */
		aspect-ratio: 16 / 9 !important;
	}
}

/* === Mobile ================================================================
   Bars stack comfortably, CTA goes full-width, nothing overflows 375px. */
@media (max-width: 640px) {
	body.aibt-universal .universal-hero--cinema-letterbox-bars .universal-hero__bar--bottom {
		padding-block: calc(clamp(var(--space-6, 32px), 6vh, var(--space-7, 48px)) * var(--density, 1));
	}

	/* Drop uppercase kicker tracking on the smallest screens (KI-003). */
	body.aibt-universal .universal-hero--cinema-letterbox-bars .universal-hero__kicker {
		letter-spacing: 0.08em !important;
	}

	body.aibt-universal .universal-hero--cinema-letterbox-bars .universal-hero__headline {
		font-size: clamp(1.9rem, 8vw, 2.4rem) !important;
		letter-spacing: -0.015em !important;
		max-width: 100%;
	}

	body.aibt-universal .universal-hero--cinema-letterbox-bars .universal-hero__deck {
		font-size: var(--text-base, 16px) !important;
		max-width: 100%;
	}

	/* CTA becomes a full-width action under the copy. */
	body.aibt-universal .universal-hero--cinema-letterbox-bars .universal-hero__actions {
		width: 100%;
	}

	body.aibt-universal .universal-hero--cinema-letterbox-bars .universal-hero__actions .wp-block-button,
	body.aibt-universal .universal-hero--cinema-letterbox-bars .universal-hero__actions .wp-block-button__link {
		width: 100%;
		justify-content: center;
		white-space: normal;
	}
}

/* === Motion ================================================================ */
@keyframes aiss-hero-film-still-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.aibt-universal .universal-hero--cinema-letterbox-bars .universal-hero__photo img {
		animation: none;
	}

	body.aibt-universal .universal-hero--cinema-letterbox-bars .wp-block-button.universal-hero__cta .wp-block-button__link {
		transition: none;
	}

	body.aibt-universal .universal-hero--cinema-letterbox-bars .wp-block-button.universal-hero__cta .wp-block-button__link:hover {
		transform: none;
	}
}

/* === Editor wrapper — the editor canvas doesn't run the reveal; keep the
   still visible instead of stuck at opacity:0. ============================== */
.editor-styles-wrapper .universal-hero--cinema-letterbox-bars .universal-hero__photo img {
	animation: none;
}
