/* Hero: full-bleed photo, espresso veil, header laid over it. Mobile-first. */

.iw-hero {
	position: relative;
	isolation: isolate;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--iw-color-espresso);
	color: var(--iw-color-on-ink);
}

/* Photo and veil */
.iw-hero__media {
	position: absolute;
	inset: 0;
	z-index: -2;
}

.iw-hero__media picture,
.iw-hero__media img {
	display: block;
	width: 100%;
	height: 100%;
}

.iw-hero__media img {
	object-fit: cover;
	object-position: 72% center;
	animation: iw-hero-settle 2.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.iw-hero__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg,
			color-mix(in srgb, var(--iw-color-espresso) 70%, transparent) 0%,
			color-mix(in srgb, var(--iw-color-espresso) 55%, transparent) 40%,
			color-mix(in srgb, var(--iw-color-espresso) 92%, transparent) 100%);
}

/* Content */
.iw-hero__inner {
	position: relative;
	display: flex;
	flex: 1;
	align-items: center;
	width: 100%;
	max-width: var(--iw-container);
	margin: 0 auto;
	padding: calc(var(--iw-header-height) + var(--iw-space-12)) var(--iw-gutter) var(--iw-space-12);
}

.iw-hero__content {
	max-width: 52rem;
}

.iw-hero__content > * {
	animation: iw-hero-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.iw-hero__content > :nth-child(2) { animation-delay: 0.08s; }
.iw-hero__content > :nth-child(3) { animation-delay: 0.16s; }
.iw-hero__content > :nth-child(4) { animation-delay: 0.24s; }

.iw-hero__kicker {
	display: flex;
	align-items: center;
	gap: var(--iw-space-4);
	margin: 0 0 var(--iw-space-6);
	color: var(--iw-color-taupe-light);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.22em;
	text-transform: uppercase;
}

.iw-hero__kicker::before {
	content: "";
	flex: none;
	width: 40px;
	height: 2px;
	background: var(--iw-color-primary);
}

.iw-hero__title {
	margin: 0 0 var(--iw-space-8);
	color: var(--iw-color-on-ink);
	font-size: clamp(2.75rem, 1.4rem + 5.2vw, 6.25rem);
	line-height: var(--iw-leading-tight);
	letter-spacing: -0.025em;
}

.iw-hero__title-accent {
	display: block;
	color: var(--iw-color-taupe);
}

.iw-hero__lead {
	max-width: 34rem;
	margin: 0 0 var(--iw-space-10);
	color: rgb(255 255 255 / 78%);
	font-size: var(--iw-text-lg);
	line-height: 1.65;
}

.iw-hero__lead strong {
	display: block;
	margin-bottom: var(--iw-space-2);
	color: var(--iw-color-on-ink);
	font-weight: 600;
}

/* Calls to action as plain text links, no button shapes (client's choice).
   The primary link is underlined; the secondary one is dimmed. */
.iw-hero__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--iw-space-2) var(--iw-space-10);
}

.iw-hero__button {
	display: inline-block;
	padding: var(--iw-space-2) 0;
	font-size: 1.0625rem;
	line-height: 1.4;
	text-decoration: none;
	transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

/* Scoped under .iw-hero__actions so Elementor's ".elementor a { text-decoration: none }" does not win */
.iw-hero__actions .iw-hero__button--primary {
	color: var(--iw-color-on-ink);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: rgb(255 255 255 / 55%);
	text-decoration-thickness: 1px;
	text-underline-offset: 8px;
}

.iw-hero__actions .iw-hero__button--primary:hover {
	color: var(--iw-color-on-ink);
	text-decoration-color: var(--iw-color-on-ink);
}

.iw-hero__button--secondary {
	color: rgb(255 255 255 / 72%);
	font-weight: 500;
}

.iw-hero__button--secondary:hover {
	color: var(--iw-color-on-ink);
}

/* Key figures band along the bottom edge; numbers count up via script.js */
.iw-hero__stats {
	position: relative;
	border-top: 1px solid rgb(255 255 255 / 14%);
	background: color-mix(in srgb, var(--iw-color-espresso) 60%, transparent);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
}

.iw-hero__stats ul {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	max-width: var(--iw-container);
	margin: 0 auto;
	padding: 0;
	list-style: none;
}

.iw-hero__stats li {
	display: flex;
	flex-direction: column;
	gap: var(--iw-space-1);
	padding: var(--iw-space-6) var(--iw-gutter);
	border-bottom: 1px solid rgb(255 255 255 / 10%);
}

.iw-hero__stats li:nth-child(odd) {
	border-right: 1px solid rgb(255 255 255 / 10%);
}

.iw-hero__stats li:nth-last-child(-n + 2) {
	border-bottom: 0;
}

.iw-hero__stat-value {
	color: var(--iw-color-on-ink);
	font-family: var(--iw-font-heading);
	font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem);
	font-weight: 400;
	line-height: var(--iw-leading-tight);
	letter-spacing: -0.01em;
	font-variant-numeric: lining-nums tabular-nums;
	white-space: nowrap;
}

.iw-hero__stat-value--text {
	white-space: normal;
}

.iw-hero__stat-label {
	color: var(--iw-color-taupe-light);
	font-size: var(--iw-text-sm);
	line-height: 1.4;
}

@keyframes iw-hero-settle {
	from { transform: scale(1.06); }
	to { transform: scale(1); }
}

@keyframes iw-hero-rise {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@media (min-width: 1024px) {
	.iw-hero {
		min-height: max(680px, calc(100svh - var(--wp-admin--admin-bar--height, 0px)));
	}

	.iw-hero__media img {
		object-position: center;
	}

	.iw-hero__media::after {
		background:
			linear-gradient(90deg,
				color-mix(in srgb, var(--iw-color-espresso) 90%, transparent) 0%,
				color-mix(in srgb, var(--iw-color-espresso) 72%, transparent) 38%,
				color-mix(in srgb, var(--iw-color-espresso) 15%, transparent) 72%,
				transparent 100%),
			linear-gradient(180deg,
				color-mix(in srgb, var(--iw-color-espresso) 55%, transparent) 0%,
				transparent 22%,
				transparent 70%,
				color-mix(in srgb, var(--iw-color-espresso) 60%, transparent) 100%);
	}

	.iw-hero__inner {
		padding-top: calc(var(--iw-header-height) + var(--iw-space-16));
		padding-bottom: var(--iw-space-16);
	}


	.iw-hero__stats ul {
		grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.5fr);
		padding: 0 var(--iw-gutter);
	}

	.iw-hero__stats li,
	.iw-hero__stats li:nth-child(odd) {
		padding: var(--iw-space-8) var(--iw-space-6) var(--iw-space-10);
		border-right: 0;
		border-bottom: 0;
	}

	.iw-hero__stats li + li {
		border-left: 1px solid rgb(255 255 255 / 10%);
	}

	/* First column shares its left edge with the hero text */
	.iw-hero__stats li:first-child {
		padding-left: 0;
	}
}
