/* eqx/hero — full-viewport homepage hero.
 *
 * Sits below the (solid) header. The navy panel dominates the left two-
 * thirds of the bg image, fading out to expose the photograph on the
 * right. The H1 is split into two spans by render.php:
 *   .eqx-hero__heading-main   — white Inter (bold)
 *   .eqx-hero__heading-accent — teal Inter (italic, lighter weight)
 */

.eqx-hero {
	position: relative;
	min-height: min(82vh, 780px);
	display: flex;
	align-items: center;
	color: var(--eqx-warm-white);
	overflow: hidden;
	background: var(--eqx-brand-dark); /* solid navy fallback while image loads */
}

.eqx-hero__bg,
.eqx-hero__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	background-size: cover;
	background-position: center right;
	z-index: 0;
}

/* Navy panel reads as a soft drape: solid out to `--eqx-hero-gradient-pos`,
 * then a soft fade across the next ~70% of the hero so the rider/horse
 * photograph reads on the right.
 *
 * The `gradient_position` ACF field on each block sets the variable; the
 * remaining stops are derived as offsets from it so the fade shape stays
 * consistent regardless of where the editor anchors the transition. */
.eqx-hero__overlay {
	--eqx-hero-gradient-pos: 22%;
	position: absolute;
	inset: 0;
	background: linear-gradient(
		90deg,
		var(--eqx-brand-dark)   0%,
		var(--eqx-brand-dark)  var(--eqx-hero-gradient-pos),
		rgba(var(--eqx-brand-dark-rgb), 0.78) calc(var(--eqx-hero-gradient-pos) + 16%),
		rgba(var(--eqx-brand-dark-rgb), 0.45) calc(var(--eqx-hero-gradient-pos) + 33%),
		rgba(var(--eqx-brand-dark-rgb), 0.15) calc(var(--eqx-hero-gradient-pos) + 53%),
		rgba(var(--eqx-brand-dark-rgb), 0)    calc(var(--eqx-hero-gradient-pos) + 70%)
	);
	z-index: 1;
	pointer-events: none;
}

.eqx-hero__content {
	position: relative;
	z-index: 2;
	width: 100%;
	padding-block: var(--spacing-2xl);
}
.eqx-hero__content-inner {
	text-align: left;
	max-width: 620px;
}

.eqx-hero__eyebrow {
	color: var(--eqx-brand-teal);
	margin-bottom: var(--spacing-sm);
}

/* Inter across the board — both halves of the heading. The accent half
 * is italic and teal so it still reads as a deliberate split. */
.eqx-hero__heading {
	font-family: var(--ff-body);
	font-weight: 700;
	color: var(--eqx-warm-white);
	letter-spacing: -0.02em;
	line-height: 1.05;
	margin-bottom: var(--spacing-md);
}
.eqx-hero__heading-main,
.eqx-hero__heading-accent {
	display: block;
	font-family: var(--ff-body);
}
.eqx-hero__heading-accent {
	font-style: italic;
	font-weight: 700;
	color: var(--eqx-brand-teal);
	margin-top: 0.05em;
}

/* Inline <em> inside the main heading reads as the same italic-teal
 * accent — lets editors keep the H1 in a single field if preferred. */
.eqx-hero__heading-main em {
	font-style: italic;
	font-weight: 700;
	color: var(--eqx-brand-teal);
}

.eqx-hero__subheading {
	font-size: 1.0625rem;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.88);
	margin-bottom: var(--spacing-lg);
	max-width: 46ch;
}

.eqx-hero__ctas {
	display: flex;
	gap: var(--spacing-sm);
	flex-wrap: wrap;
	align-items: center;
}

/* Hero CTAs lean on the brand teal rather than the default gold. */
.eqx-hero .eqx-button--primary {
	background: var(--eqx-brand-teal);
	border-color: var(--eqx-brand-teal);
	color: var(--eqx-warm-white);
}
.eqx-hero .eqx-button--primary:hover,
.eqx-hero .eqx-button--primary:focus {
	background: var(--eqx-brand-teal-dk);
	border-color: var(--eqx-brand-teal-dk);
	color: var(--eqx-warm-white);
}

/* Secondary CTA: outlined white with a trailing arrow. */
.eqx-hero .eqx-button--secondary::after {
	content: '\2192';
	display: inline-block;
	margin-left: 0.45em;
	font-size: 1.05em;
	line-height: 1;
	transition: transform var(--transition-base);
}
.eqx-hero .eqx-button--secondary:hover::after,
.eqx-hero .eqx-button--secondary:focus::after {
	transform: translateX(3px);
}

@media (max-width: 900px) {
	/* Tighter screens: shift the gradient further right so copy still has
	 * a navy backdrop, while keeping plenty of the photograph visible. */
	.eqx-hero__overlay {
		background: linear-gradient(
			90deg,
			var(--eqx-brand-dark)   0%,
			var(--eqx-brand-dark)  40%,
			rgba(var(--eqx-brand-dark-rgb), 0.70) 60%,
			rgba(var(--eqx-brand-dark-rgb), 0.25) 85%,
			rgba(var(--eqx-brand-dark-rgb), 0)   100%
		);
	}
}

@media (max-width: 640px) {
	/* Shorter on phones so the next section peeks above the fold and the
	 * page doesn't feel pushed down. */
	.eqx-hero { min-height: 56vh; }
	/* The scrim was 0.92 → 0.78 navy, which left the photograph barely
	 * readable on a phone (client, 11/08). Lightened so the rider shows
	 * through, with the darkest point held around the heading band rather
	 * than at the very top — white body copy still clears 4.5:1 against the
	 * lightest sampled point, and the teal eyebrow clears it too. */
	.eqx-hero__overlay {
		background: linear-gradient(
			180deg,
			rgba(var(--eqx-brand-dark-rgb), 0.55) 0%,
			rgba(var(--eqx-brand-dark-rgb), 0.72) 38%,
			rgba(var(--eqx-brand-dark-rgb), 0.70) 72%,
			rgba(var(--eqx-brand-dark-rgb), 0.52) 100%
		);
	}
	.eqx-hero__subheading { font-size: 1rem; }

	/* Brightening the scrim costs the teal its contrast — measured against
	 * the lightest point of the photograph, brand teal lands at 1.6:1 and
	 * would need the scrim back at ~0.86 alpha to reach even 3:1, which is
	 * the darkness we were asked to remove. So the teal moves instead:
	 *
	 *   eyebrow  14px/600 — small text, needs 4.5:1 → white, measures 5.9:1
	 *   "Success" 36px/700 — large text, needs 3:1  → lighter teal, 3.2:1
	 *
	 * Desktop is untouched; the brief was mobile only. */
	.eqx-hero__eyebrow { color: var(--eqx-warm-white); }
	.eqx-hero__heading-accent,
	.eqx-hero__heading-main em { color: #7dd3d0; }
}
