/* BWD Hero Motion: WebGL liquid-light background, glass slider panel, motion. */
:root {
	--bwdhm-ink: #14181d;
	--bwdhm-orange: #f97d0a;
	--bwdhm-glass: rgba(255, 255, 255, .26);
	--bwdhm-glass-edge: rgba(255, 255, 255, .62);
	--bwdhm-spring: cubic-bezier(.22, 1.2, .36, 1);
}

/* Warm ivory fallback until (or instead of) WebGL: layered radial light, no grey. */
.bwd-hero2__bg {
	background:
		radial-gradient(60% 70% at 82% 38%, rgba(249, 125, 10, .20), transparent 62%),
		radial-gradient(45% 55% at 64% 78%, rgba(255, 106, 61, .14), transparent 60%),
		radial-gradient(70% 80% at 12% 10%, #fffaf3, transparent 70%),
		linear-gradient(160deg, #f8f2ea 0%, #f1e7da 55%, #ecdfcf 100%) !important;
	overflow: hidden;
}

/* The theme's multiply noise layer greys the whole hero; the shader has its own fine grain. */
.bwd-hero2__bg::after { display: none !important; }

.bwdhm-canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
	opacity: 0;
	transition: opacity 1.2s ease;
	pointer-events: none;
}
.bwdhm-ready .bwdhm-canvas { opacity: 1; }

/* Frosted glass stage behind the cube slider: base -> elevated -> floating. */
.bwd-hero-slider { isolation: isolate; perspective: 1200px; }
.bwdhm-glass {
	position: absolute;
	inset: 4% 2% 8% 6%;
	z-index: -1;
	border-radius: 36px;
	background:
		linear-gradient(135deg, rgba(255, 255, 255, .48), rgba(255, 255, 255, .10) 55%, rgba(249, 125, 10, .08)),
		var(--bwdhm-glass);
	border: 1px solid var(--bwdhm-glass-edge);
	-webkit-backdrop-filter: blur(22px) saturate(150%);
	backdrop-filter: blur(22px) saturate(150%);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, .7),
		0 2px 6px rgba(187, 82, 12, .06),
		0 24px 60px -18px rgba(187, 82, 12, .28),
		0 60px 120px -40px rgba(20, 24, 29, .22);
	transform-style: preserve-3d;
	will-change: transform;
}
.bwdhm-glass::after { /* moving specular highlight */
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: radial-gradient(40% 50% at var(--bwdhm-mx, 70%) var(--bwdhm-my, 20%), rgba(255, 255, 255, .55), transparent 70%);
	mix-blend-mode: soft-light;
	pointer-events: none;
}

/* Glass chips and secondary CTA. */
.bwd-hero-slide__kicker {
	background: rgba(255, 255, 255, .55) !important;
	-webkit-backdrop-filter: blur(12px) saturate(140%);
	backdrop-filter: blur(12px) saturate(140%);
	border: 1px solid rgba(255, 255, 255, .7);
	box-shadow: 0 8px 24px -12px rgba(187, 82, 12, .35);
}
.bwd-hero2__ghost {
	background: rgba(255, 255, 255, .55) !important;
	-webkit-backdrop-filter: blur(14px) saturate(140%);
	backdrop-filter: blur(14px) saturate(140%);
	border: 1px solid rgba(255, 255, 255, .75) !important;
	box-shadow: 0 10px 30px -14px rgba(20, 24, 29, .30);
	transition: transform .5s var(--bwdhm-spring), box-shadow .5s ease;
}
.bwd-hero2__ghost:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -14px rgba(20, 24, 29, .38); }
.bwd-hero2__ghost:active { transform: translateY(0) scale(.98); }
.bwd-hero2__ghost:focus-visible { outline: 2px solid var(--bwdhm-orange); outline-offset: 3px; }

.bwd-hero2__ctas .bwd-btn-primary { transition: transform .5s var(--bwdhm-spring), box-shadow .5s ease; will-change: transform; }
.bwd-hero2__ctas .bwd-btn-primary:hover { box-shadow: 0 18px 40px -14px rgba(249, 125, 10, .65); }
.bwd-hero2__ctas .bwd-btn-primary:active { transform: scale(.97); }
.bwd-hero2__ctas .bwd-btn-primary:focus-visible { outline: 2px solid var(--bwdhm-ink); outline-offset: 3px; }

/* Entrance: transform only on the H1 so it paints immediately (LCP-safe). */
.bwdhm-pre .bwd-hero2__line { transform: translateY(26px); }
.bwdhm-pre .bwd-hero2__kicker,
.bwdhm-pre .bwd-hero2__sub,
.bwdhm-pre .bwd-hero2__intro,
.bwdhm-pre .bwd-hero2__ctas,
.bwdhm-pre .bwdhm-glass { opacity: 0; }

/* On phones the theme shows the slider as an 18%-opacity backdrop behind the copy,
   so no glass box there, and a softer light field keeps the text crisp. */
@media (max-width: 1023px) {
	.bwdhm-glass { display: none; }
	.bwdhm-ready .bwdhm-canvas { opacity: .6; }
}

@media (prefers-reduced-motion: reduce) {
	.bwdhm-pre .bwd-hero2__line,
	.bwdhm-pre .bwd-hero2__kicker,
	.bwdhm-pre .bwd-hero2__sub,
	.bwdhm-pre .bwd-hero2__intro,
	.bwdhm-pre .bwd-hero2__ctas,
	.bwdhm-pre .bwdhm-glass { transform: none; opacity: 1; }
	.bwdhm-canvas { transition: none; }
}
