/*------------------------------------------------------------------
[ AB Home v2 — Hero ]
Figma: 976:9625 (top area) · design canvas 1440 × 761

Decorative layers are positioned from the horizontal CENTER of the
section using the design coordinates (--x, --y, --w in px of the 1440
canvas) multiplied by the scale factor --s. So the layer always stays
centred and the waves always reach both edges, on any screen width.
*/

.ab-hv2-hero {
	--s: 1;
	min-height: 761px;
	padding: 326px 0 127px;
	overflow: hidden;
	text-align: center;
}

/* ── Decorative layer ──────────────────────────────── */
.ab-hv2-hero__fx {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.ab-hv2-hero__fx img {
	position: absolute;
	display: block;
	max-width: none;
	height: auto;
	left: calc(50% + (var(--x) - 720) * var(--s) * 1px);
	top: calc(var(--y) * var(--s) * 1px);
	width: calc(var(--w) * var(--s) * 1px);
}

/* Waves: centred on the design centre (758.5, 409), at least as wide as the screen + 120px */
.ab-hv2-section .ab-hv2-hero__waves {
	left: 50%;
	top: calc(409px * var(--s));
	width: max(calc(1957px * var(--s)), calc(100% + 120px));
	--wx: calc(-50% + 38.5px * var(--s));
	transform: translate(var(--wx), -50%);
	transform-origin: 50% 50%;
	z-index: 1;
}

/* Code version: full-section canvas (drawn by js/ab-hv2-hero-waves.js) */
.ab-hv2-hero__canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
	z-index: 1;
	pointer-events: none;
}

/* Dark soft spot behind the title/button so the text reads over the waves
   (design: ribbons fade out in the centre). Sits above the waves, below the content. */
.ab-hv2-hero__fx::after {
	content: "";
	position: absolute;
	left: 50%;
	top: calc(440px * var(--s));
	width: max(calc(1100px * var(--s)), 560px);
	height: max(calc(520px * var(--s)), 380px);
	transform: translate(-50%, -50%);
	background: radial-gradient(closest-side, rgba(35, 35, 35, .94) 0%, rgba(35, 35, 35, .82) 40%, rgba(35, 35, 35, .45) 70%, rgba(35, 35, 35, 0) 100%);
	z-index: 2;
	pointer-events: none;
}

/* ── Content ───────────────────────────────────────── */
.ab-hv2-hero__inner {
	z-index: 5;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.ab-hv2-section .ab-hv2-hero__title {
	max-width: 760px;
	margin: 0 auto;
	font-family: var(--hv2-font-display);
	font-weight: 700;
	font-size: 68px;
	line-height: 1;
	letter-spacing: 0;
	color: #fff;
	text-align: center;
}

.ab-hv2-section .ab-hv2-hero__subtitle {
	max-width: 720px;
	margin: 24px auto 0;
	font-family: var(--hv2-font-regular);
	font-size: 32px;
	line-height: 1.2;
	color: #fff;
}

.ab-hv2-hero__actions {
	margin-top: 41px;
}

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 1199px) {
	.ab-hv2-hero { --s: .85; }
}

@media (max-width: 991px) {
	.ab-hv2-hero {
		--s: .7;
		min-height: 620px;
		padding: 230px 0 90px;
	}
	.ab-hv2-section .ab-hv2-hero__title { font-size: 54px; max-width: 620px; }
	.ab-hv2-section .ab-hv2-hero__subtitle { font-size: 24px; }
	.ab-hv2-hero__actions { margin-top: 40px; }
}

@media (max-width: 575px) {
	.ab-hv2-hero {
		--s: .5;
		min-height: 0;
		padding: 170px 0 70px;
	}
	.ab-hv2-section .ab-hv2-hero__title { font-size: 40px; }
	.ab-hv2-section .ab-hv2-hero__subtitle { font-size: 20px; }
	.ab-hv2-hero__actions { margin-top: 32px; }
}

/* ── Entrance (on page load, same motion as WPBakery fadeInUp) ── */
@keyframes ab-hv2-fade-in-up {
	from { opacity: 0; transform: translate3d(0, 40px, 0); }
	to   { opacity: 1; transform: none; }
}

.ab-hv2-hero__title,
.ab-hv2-hero__subtitle,
.ab-hv2-hero__actions {
	animation: ab-hv2-fade-in-up 1s ease both;
}

.ab-hv2-hero__subtitle { animation-delay: .15s; }
.ab-hv2-hero__actions  { animation-delay: .3s; }

@media (prefers-reduced-motion: reduce) {
	.ab-hv2-hero__title,
	.ab-hv2-hero__subtitle,
	.ab-hv2-hero__actions { animation: none; }
}
