/**
 * Bark or Woof — cinematic experience layer ("on steroids").
 *
 * Adds motion, video, and depth ON TOP of premium.css without changing the
 * approved navy/gold/cream system. Everything here is progressive: if JS does
 * not run, nothing is hidden and the site renders exactly as before. Motion is
 * fully disabled under prefers-reduced-motion.
 */

:root {
	--bow-fx-ease: cubic-bezier(0.16, 1, 0.3, 1);
	--bow-fx-gold: #ffcf2f;
	--bow-fx-gold-deep: #d8ad3f;
	--bow-fx-navy: #082d50;
}

/* ---------------------------------------------------------------------------
 * 1. Scroll reveal. Base hidden state ONLY applies to elements JS has opted in
 *    (.bow-reveal) AND only once <html> is marked ready — so a JS failure or a
 *    crawler never sees hidden content.
 * ------------------------------------------------------------------------- */
html.bow-fx-ready .bow-reveal {
	opacity: 0;
	transform: translate3d(0, 22px, 0);
	transition:
		opacity 0.7s var(--bow-fx-ease),
		transform 0.7s var(--bow-fx-ease);
	will-change: opacity, transform;
}

html.bow-fx-ready .bow-reveal.bow-in {
	opacity: 1;
	transform: none;
}

/* Stagger children of a revealed group (cards, trust items, gallery). */
html.bow-fx-ready .bow-reveal-stagger > * {
	opacity: 0;
	transform: translateY(20px);
	transition:
		opacity 0.6s var(--bow-fx-ease),
		transform 0.6s var(--bow-fx-ease);
	transition-delay: calc(var(--bow-i, 0) * 90ms);
}

html.bow-fx-ready .bow-reveal-stagger.bow-in > * {
	opacity: 1;
	transform: none;
}

/* ---------------------------------------------------------------------------
 * 2. Scroll progress bar + sticky-header shrink.
 * ------------------------------------------------------------------------- */
.bow-fx-progress {
	position: fixed;
	inset: 0 auto auto 0;
	z-index: 999;
	width: 100%;
	height: 3px;
	transform: scaleX(var(--bow-progress, 0));
	transform-origin: 0 50%;
	background: linear-gradient(90deg, var(--bow-fx-gold-deep), var(--bow-fx-gold));
	pointer-events: none;
}

.bow-lux-header {
	transition:
		padding 0.3s var(--bow-fx-ease),
		box-shadow 0.3s var(--bow-fx-ease),
		background-color 0.3s var(--bow-fx-ease);
}

.bow-lux-header.bow-fx-shrunk {
	background: rgba(255, 255, 255, 0.97);
	box-shadow: 0 10px 30px rgba(8, 45, 80, 0.12);
}

.bow-lux-header.bow-fx-shrunk .bow-lux-brand-mark img {
	max-height: 52px;
	transition: max-height 0.3s var(--bow-fx-ease);
}

/* ---------------------------------------------------------------------------
 * 3. Cinematic hero. An animated aurora glow sits behind the existing gradient;
 *    the framed hero photo can host a muted, poster-first background video.
 * ------------------------------------------------------------------------- */
.bow-lux-hero::before {
	position: absolute;
	inset: -40% -10% auto -10%;
	z-index: 0;
	height: 150%;
	background:
		radial-gradient(38% 55% at 78% 18%, rgba(216, 173, 63, 0.28), transparent 70%),
		radial-gradient(42% 60% at 12% 88%, rgba(64, 132, 200, 0.22), transparent 72%);
	background-repeat: no-repeat;
	content: "";
	pointer-events: none;
	animation: bow-fx-aurora 16s var(--bow-fx-ease) infinite alternate;
}

@keyframes bow-fx-aurora {
	0%   { transform: translate3d(0, 0, 0) scale(1); opacity: 0.85; }
	100% { transform: translate3d(0, -3%, 0) scale(1.08); opacity: 1; }
}

/* Video inside any media frame (hero photo, showcase). Image stays as the
 * instant-painting poster; video fades in only once it can actually play. */
.bow-lux-media-frame {
	isolation: isolate;
}

.bow-fx-video,
.bow-fx-hero-video {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity 0.9s var(--bow-fx-ease);
	pointer-events: none;
}

.bow-fx-video.is-playing,
.bow-fx-hero-video.is-playing {
	opacity: 1;
}

.bow-fx-hero-video {
	width: 100%;
	height: 100%;
}

/* Soft "live" badge so viewers read the motion as intentional craft. */
.bow-fx-live-badge {
	position: absolute;
	top: 16px;
	left: 16px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 7px 13px 7px 11px;
	border-radius: 999px;
	background: rgba(8, 45, 80, 0.55);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: #fff;
	font-family: "DM Sans", sans-serif;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	opacity: 0;
	transition: opacity 0.6s ease;
}

.bow-fx-video.is-playing ~ .bow-fx-live-badge,
.bow-fx-hero-video.is-playing ~ .bow-fx-live-badge {
	opacity: 1;
}

.bow-fx-live-badge::before {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--bow-fx-gold);
	box-shadow: 0 0 0 0 rgba(255, 207, 47, 0.7);
	animation: bow-fx-pulse 2s ease-out infinite;
	content: "";
}

@keyframes bow-fx-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(255, 207, 47, 0.7); }
	70%  { box-shadow: 0 0 0 9px rgba(255, 207, 47, 0); }
	100% { box-shadow: 0 0 0 0 rgba(255, 207, 47, 0); }
}

/* ---------------------------------------------------------------------------
 * 4. Full-width cinematic video band (injected before the footer, or via the
 *    [bow_video_band] shortcode). Lifestyle footage + overlaid message.
 * ------------------------------------------------------------------------- */
.bow-fx-band {
	position: relative;
	display: grid;
	place-items: center;
	min-height: clamp(340px, 45vh, 460px);
	overflow: hidden;
	background: var(--bow-fx-navy);
	color: #fff;
	text-align: center;
}

.bow-fx-band__video,
.bow-fx-band__poster {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.bow-fx-band__video {
	opacity: 0;
	transition: opacity 1s var(--bow-fx-ease);
}

.bow-fx-band__video.is-playing {
	opacity: 1;
}

.bow-fx-band::after {
	position: absolute;
	inset: 0;
	z-index: 1;
	background:
		radial-gradient(circle at 50% 40%, rgba(6, 40, 68, 0.35), rgba(4, 24, 42, 0.82)),
		linear-gradient(180deg, rgba(4, 24, 42, 0.55) 0%, rgba(4, 24, 42, 0.5) 100%);
	content: "";
}

.bow-fx-band__inner {
	position: relative;
	z-index: 2;
	width: min(calc(100% - 48px), 720px);
	padding-block: 52px;
}

.bow-fx-band__eyebrow {
	margin: 0 0 14px;
	color: #f2cb67;
	font-family: "DM Sans", sans-serif;
	font-size: 14px;
	font-weight: 900;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.bow-fx-band__title {
	margin: 0 0 18px;
	font-family: "Playfair Display", Georgia, serif;
	font-size: clamp(34px, 4vw, 48px);
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 1.08;
	text-wrap: balance;
}

.bow-fx-band__text {
	margin: 0 auto 30px;
	max-width: 560px;
	color: rgba(255, 255, 255, 0.85);
	font-size: clamp(17px, 2vw, 20px);
	line-height: 1.6;
}

.bow-fx-band .bow-fx-cta {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 54px;
	padding: 16px 30px;
	border-radius: 999px;
	background: var(--bow-fx-gold);
	box-shadow: 0 16px 34px rgba(216, 173, 63, 0.34);
	color: var(--bow-fx-navy);
	font-family: "DM Sans", sans-serif;
	font-weight: 900;
	letter-spacing: 0.01em;
	text-decoration: none;
	transition: transform 0.2s var(--bow-fx-ease), box-shadow 0.2s var(--bow-fx-ease);
}

.bow-fx-band .bow-fx-cta:hover {
	transform: translateY(-2px);
	box-shadow: 0 22px 40px rgba(216, 173, 63, 0.42);
}

/* The Pack product uses the approved portrait film as its single editorial
 * visual. The native gallery stays in the document until video enhancement
 * succeeds, then retires without touching any commerce controls. */
.bow-pack-product-video {
	position: relative;
	width: min(100%, 620px);
	aspect-ratio: 2 / 3;
	overflow: hidden;
	border: 1px solid rgba(216, 173, 63, 0.34);
	border-radius: clamp(20px, 3vw, 32px);
	background: linear-gradient(145deg, #e8eef2, #fbf8f1);
	box-shadow: 0 28px 74px rgba(8, 45, 80, 0.16);
	isolation: isolate;
}

.bow-pack-product-video::after {
	position: absolute;
	inset: 0;
	z-index: 1;
	border: 1px solid rgba(255, 255, 255, 0.45);
	border-radius: inherit;
	box-shadow: inset 0 -90px 100px rgba(5, 28, 49, 0.12);
	content: "";
	pointer-events: none;
}

.bow-pack-product-video__media {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity 0.9s var(--bow-fx-ease);
}

.bow-pack-product-video__media.is-playing {
	opacity: 1;
}

.woocommerce-product-gallery.bow-pack-product-gallery--retired {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
}

@media (min-width: 1025px) {
	body.postid-123.single-product div.product {
		display: grid;
		grid-template-columns: minmax(0, 0.94fr) minmax(480px, 1.06fr);
		column-gap: clamp(48px, 6vw, 76px);
		align-items: start;
	}

	body.postid-123.single-product div.product > .bow-pack-product-video {
		position: relative;
		top: auto;
		grid-column: 1;
		grid-row: 1;
		width: 100%;
	}

	body.postid-123.single-product div.product > .summary {
		float: none !important;
		grid-column: 2;
		grid-row: 1;
		width: auto !important;
		margin: 0 !important;
	}

	body.postid-123.single-product div.product > :is(
		.woocommerce-tabs,
		.related,
		.upsells,
		.bow-pack-intro,
		.product_meta + *
	) {
		grid-column: 1 / -1;
	}
}

/* ---------------------------------------------------------------------------
 * 6. Richer card interaction — a soft sheen sweep + deeper lift.
 * ------------------------------------------------------------------------- */
.bow-lux-card {
	position: relative;
	overflow: hidden;
}

.bow-lux-card::after {
	position: absolute;
	inset: 0;
	background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.5) 48%, transparent 66%);
	transform: translateX(-120%);
	content: "";
	pointer-events: none;
}

.bow-lux-card:hover::after {
	transform: translateX(120%);
	transition: transform 0.9s var(--bow-fx-ease);
}

/* Count-up stats must not reflow while animating. */
.bow-fx-count {
	font-variant-numeric: tabular-nums;
}

/* Gradient-text utility for a single hero accent word, opt-in via class. */
.bow-fx-gradient-text {
	background: linear-gradient(100deg, var(--bow-fx-gold) 0%, #ffe89a 55%, var(--bow-fx-gold-deep) 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

/* ---------------------------------------------------------------------------
 * 6. FULL-BLEED CINEMATIC HERO.
 *
 * The photograph becomes the banner itself: one continuous navy-tinted
 * cinematic band with the dog living inside it, replacing the flat navy slab
 * that had a small photo card bolted onto the right.
 *
 * Tinting is done purely with stacked background layers — no filter and no new
 * pseudo-element — because .bow-lux-hero::before (aurora) and ::after (bottom
 * fade) are both already in use, and a filter would tint the text too.
 *
 * Layer order (top to bottom):
 *   A. Art-directed horizontal scrim — dense over the text column, opening up
 *      across the dog so the animal stays clearly readable.
 *   B. Vertical unifier — tames the bright sky, seats the band into the section
 *      below, and adds the shared navy cast that makes it read as ONE banner.
 *   C. The photograph.
 *   D. Navy base colour, so the band is never bare while the image loads.
 * ------------------------------------------------------------------------- */

.bow-lux-hero {
	min-height: clamp(580px, 76vh, 790px);
	background-color: var(--bow-lux-navy);

	/* Fallback for engines without image-set(). */
	background-image:
		linear-gradient(100deg, rgba(5, 28, 49, 0.9) 0%, rgba(5, 28, 49, 0.8) 28%, rgba(5, 29, 51, 0.58) 54%, rgba(6, 32, 55, 0.4) 76%, rgba(6, 32, 55, 0.46) 100%),
		linear-gradient(180deg, rgba(6, 32, 55, 0.44) 0%, rgba(8, 45, 80, 0.18) 40%, rgba(4, 24, 43, 0.52) 100%),
		url("../images/hero-banner-1440.webp");
	background-image:
		linear-gradient(100deg, rgba(5, 28, 49, 0.9) 0%, rgba(5, 28, 49, 0.8) 28%, rgba(5, 29, 51, 0.58) 54%, rgba(6, 32, 55, 0.4) 76%, rgba(6, 32, 55, 0.46) 100%),
		linear-gradient(180deg, rgba(6, 32, 55, 0.44) 0%, rgba(8, 45, 80, 0.18) 40%, rgba(4, 24, 43, 0.52) 100%),
		image-set(
			url("../images/hero-banner-1440.webp") 1x,
			url("../images/hero-banner-1920.webp") 2x
		);
	background-repeat: no-repeat;
	background-size: cover;

	/* The dog's face sits near 60% / 38% of the frame — keep it in shot. */
	background-position: center, center, 62% 40%;
}

@media (min-width: 1441px) {
	.bow-lux-hero {
		background-image:
			linear-gradient(100deg, rgba(5, 28, 49, 0.9) 0%, rgba(5, 28, 49, 0.8) 28%, rgba(5, 29, 51, 0.58) 54%, rgba(6, 32, 55, 0.4) 76%, rgba(6, 32, 55, 0.46) 100%),
			linear-gradient(180deg, rgba(6, 32, 55, 0.44) 0%, rgba(8, 45, 80, 0.18) 40%, rgba(4, 24, 43, 0.52) 100%),
			image-set(url("../images/hero-banner-1920.webp") 1x);
	}
}

/* The photograph is the banner now, so the hero's own image card is redundant.
 * Scoped to the hero: the same class is reused elsewhere on the page.
 * experience.js also removes the node so it cannot fetch or hold layout. */
.bow-lux-hero .bow-lux-media-frame {
	display: none !important;
}

/* A photographic backdrop needs a little more separation than flat navy did.
 * This buys enough perceptual contrast to keep the scrim light enough that the
 * dog stays visible behind the text column instead of being blacked out. */
.bow-lux-hero .bow-lux-display,
.bow-lux-hero .bow-lux-display .elementor-heading-title {
	text-shadow: 0 2px 26px rgba(3, 18, 33, 0.5);
}

.bow-lux-hero .bow-lux-lead,
.bow-lux-hero .bow-lux-lead .elementor-widget-container {
	text-shadow: 0 1px 14px rgba(3, 18, 33, 0.55);
}

.bow-lux-hero .bow-lux-eyebrow,
.bow-lux-hero .bow-lux-eyebrow .elementor-heading-title {
	text-shadow: 0 1px 12px rgba(3, 18, 33, 0.65);
}

/* Keep the aurora as a subtle warm bloom over the photo rather than a fog. */
.bow-lux-hero::before {
	z-index: 1;
	opacity: 0.5;
}

/* Keep the hero copy as readable over motion as it is over the lower reveal
 * banner. The video is an atmospheric background, never the content layer. */
.bow-lux-hero::after {
	inset: 0;
	z-index: 1;
	height: auto;
	background:
		linear-gradient(100deg, rgba(5, 28, 49, 0.82) 0%, rgba(5, 28, 49, 0.73) 34%, rgba(5, 29, 51, 0.47) 56%, rgba(6, 32, 55, 0.25) 76%, rgba(6, 32, 55, 0.31) 100%),
		linear-gradient(180deg, rgba(6, 32, 55, 0.3) 0%, rgba(4, 24, 43, 0.43) 100%);
}

.bow-lux-hero > .e-con,
.bow-lux-hero > .e-con-inner,
.bow-lux-hero > .elementor-container {
	position: relative;
	z-index: 2;
}

.bow-lux-hero .bow-fx-live-badge {
	z-index: 3;
}

/* First paint stays intentionally navy until the approved clip starts. */
.bow-lux-hero {
	background-image:
		linear-gradient(100deg, rgba(5, 28, 49, 0.9) 0%, rgba(5, 28, 49, 0.8) 28%, rgba(5, 29, 51, 0.58) 54%, rgba(6, 32, 55, 0.4) 76%, rgba(6, 32, 55, 0.46) 100%),
		linear-gradient(180deg, rgba(6, 32, 55, 0.44) 0%, rgba(8, 45, 80, 0.18) 40%, rgba(4, 24, 43, 0.52) 100%);
	background-position: center;
}

@media (max-width: 1024px) {
	.bow-lux-hero {
		min-height: 640px;
		background-image:
			linear-gradient(100deg, rgba(5, 28, 49, 0.92) 0%, rgba(5, 28, 49, 0.82) 34%, rgba(5, 29, 51, 0.6) 62%, rgba(6, 32, 55, 0.46) 100%),
			linear-gradient(180deg, rgba(6, 32, 55, 0.46) 0%, rgba(8, 45, 80, 0.2) 40%, rgba(4, 24, 43, 0.56) 100%),
			image-set(
				url("../images/hero-banner-960.webp") 1x,
				url("../images/hero-banner-1440.webp") 2x
			);
		background-position: center, center, 60% 38%;
	}
}

@media (max-width: 767px) {
	.bow-lux-hero {
		min-height: auto;
		/* Text now sits over the full width of the photo, so the tint becomes
		 * vertical and denser toward the copy while the dog stays legible up top. */
		background-image:
			linear-gradient(180deg, rgba(5, 28, 49, 0.6) 0%, rgba(5, 28, 49, 0.82) 42%, rgba(4, 24, 43, 0.94) 100%),
			linear-gradient(0deg, rgba(8, 45, 80, 0.16), rgba(8, 45, 80, 0.16)),
			image-set(
				url("../images/hero-banner-960.webp") 1x,
				url("../images/hero-banner-1440.webp") 2x
			);
		background-size: cover;
		background-position: center, center, 62% 24%;
	}

	.bow-lux-hero::after {
		background:
			linear-gradient(180deg, rgba(5, 28, 49, 0.42) 0%, rgba(5, 28, 49, 0.7) 42%, rgba(4, 24, 43, 0.9) 100%),
			linear-gradient(0deg, rgba(8, 45, 80, 0.1), rgba(8, 45, 80, 0.1));
	}

	.bow-lux-hero {
		background-image:
			linear-gradient(180deg, rgba(5, 28, 49, 0.63) 0%, rgba(5, 28, 49, 0.84) 42%, rgba(4, 24, 43, 0.96) 100%),
			linear-gradient(0deg, rgba(8, 45, 80, 0.18), rgba(8, 45, 80, 0.18));
		background-position: center;
	}
}

/* ---------------------------------------------------------------------------
 * 7. Responsive + motion safety.
 * ------------------------------------------------------------------------- */
@media (max-width: 767px) {
	.bow-fx-band {
		min-height: 360px;
	}

	.bow-fx-band__inner {
		width: min(calc(100% - 36px), 720px);
		padding-block: 42px;
	}

	.bow-pack-product-video {
		width: 100%;
		max-height: 720px;
		margin-inline: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	html.bow-fx-ready .bow-reveal,
	html.bow-fx-ready .bow-reveal-stagger > * {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}

	.bow-lux-hero::before,
	.bow-fx-live-badge::before {
		animation: none !important;
	}

	.bow-fx-video,
	.bow-fx-band__video {
		display: none !important;
	}

	.bow-lux-card:hover::after {
		transition: none;
		transform: translateX(-120%);
	}
}
