/* ==========================================================================
   HIMPEL About "why ventilation matters" — heading row, icon list, figure
   --------------------------------------------------------------------------
   Everything is scoped under .himpel-awhy. Nothing targets the theme or any
   global element.
   ========================================================================== */

.himpel-awhy {
	/* Brand tokens, overridden inline when global colours are bound. */
	--himpel-primary: #0b7347;
	--himpel-primary-dark: #095c39;
	--himpel-secondary: #f3f4ea;
	--himpel-white: #ffffff;
	--himpel-dark: #121212;

	position: relative;
	z-index: 2;
	width: 100%;
	background-color: var(--haw-bg, var(--himpel-secondary));
	box-sizing: border-box;
}

.himpel-awhy *,
.himpel-awhy *::before,
.himpel-awhy *::after {
	box-sizing: border-box;
}

.himpel-awhy__inner {
	width: 100%;
	max-width: var(--haw-max, 1340px);
	margin: 0 auto;
	padding: var(--haw-py-d, 80px) var(--haw-px-d, 40px);
}

/* ==========================================================================
   Top row — heading left, copy and button right
   ========================================================================== */
.himpel-awhy__head {
	display: grid;
	grid-template-columns: var(--haw-head-cols, 1fr 1fr);
	gap: var(--haw-col-gap, 48px);
	align-items: start;
}

.himpel-awhy__head-left,
.himpel-awhy__head-right {
	/* A grid item's automatic minimum size is its content's; without this a
	   long word could widen the column past its share. */
	min-width: 0;
}

/* The <h2> is the pill itself. */
.himpel-awhy__eyebrow {
	display: inline-flex;
	align-items: center;
	margin: 0 0 var(--haw-gap-eyebrow, 20px);
	padding: 8px 18px;
	border: 1px solid var(--haw-pill-border, rgba(18, 18, 18, 0.18));
	border-radius: 100px;
	color: var(--haw-pill-color, var(--himpel-dark));
	font-size: var(--haw-eyebrow-d, 14px);
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.02em;
}

.himpel-awhy__eyebrow::before {
	content: "";
	width: 7px;
	height: 7px;
	margin-right: 9px;
	border-radius: 50%;
	background-color: var(--himpel-primary);
	flex: 0 0 auto;
}

.himpel-awhy__title {
	margin: 0;
	padding: 0;
	max-width: var(--haw-title-mw, 16ch);
	/* Inherits the Liquid theme's H3 typography; only scale and colour here. */
	color: var(--haw-title-color, var(--himpel-dark));
	font-size: var(--haw-title-d, 42px);
	font-weight: 600;
	line-height: 1.14;
	letter-spacing: -0.4px;
}

.himpel-awhy__desc {
	margin: 0;
	padding: 0;
	color: var(--haw-desc-color, rgba(18, 18, 18, 0.72));
	font-size: var(--haw-desc-d, 16px);
	font-weight: 400;
	line-height: 1.75;
}

/* --------------------------------------------------------------------------
   Button
   Deliberately identical to the home page's green button (.himpel-prod__btn):
   same metrics, same badge, same hover, down to the arrow's small diagonal
   nudge. Copied rather than shared because the About page never loads the
   products stylesheet.
   -------------------------------------------------------------------------- */
.himpel-awhy__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	align-self: flex-start;
	margin-top: var(--haw-btn-gap, 26px);
	padding: var(--haw-btn-pad, 8px 8px 8px 26px);
	border: 1px solid var(--himpel-primary);
	border-radius: 100px;
	background-color: var(--himpel-primary);
	color: var(--himpel-white);
	font-size: var(--haw-btn-d, 16px);
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.25s ease, border-color 0.25s ease,
		transform 0.25s ease;
}

/* Without the badge there is no round element to balance the right side, so
   the padding evens up. */
.himpel-awhy__btn:not(.himpel-awhy__btn--has-icon) {
	padding: var(--haw-btn-pad-plain, 14px 26px);
}

.himpel-awhy__btn:hover,
.himpel-awhy__btn:focus-visible {
	background-color: var(--himpel-primary-dark);
	border-color: var(--himpel-primary-dark);
	color: var(--himpel-white);
	text-decoration: none;
	transform: translateY(-2px);
}

.himpel-awhy__btn:focus-visible {
	outline: 2px solid var(--himpel-primary);
	outline-offset: 3px;
}

.himpel-awhy__btn-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: var(--haw-btn-icon, 34px);
	height: var(--haw-btn-icon, 34px);
	border-radius: 50%;
	background-color: var(--himpel-white);
	color: var(--himpel-primary);
	transition: transform 0.25s ease;
}

.himpel-awhy__btn-icon svg {
	display: block;
	width: 56%;
	height: 56%;
	stroke: currentColor;
	fill: none;
}

.himpel-awhy__btn:hover .himpel-awhy__btn-icon,
.himpel-awhy__btn:focus-visible .himpel-awhy__btn-icon {
	transform: translate(2px, -2px);
}

/* ==========================================================================
   Bottom row — icon list left, figure right
   ========================================================================== */
.himpel-awhy__bottom {
	display: grid;
	grid-template-columns: var(--haw-cols, 0.72fr 1.28fr);
	gap: var(--haw-col-gap, 48px);
	/* Stretch, not start: the left column has to reach the full height of the
	   image beside it before space-between has anything to distribute. */
	align-items: stretch;
	margin-top: var(--haw-row-gap, 64px);
}

/* --------------------------------------------------------------------------
   The icon list
   -------------------------------------------------------------------------- */
/*
 * The left column: the icon points, with the brand panel beneath them.
 *
 * space-between pushes the panel to the foot of the column, which the grid has
 * stretched to the image's height — so the two columns end level. The gap is
 * still there as a floor, for when the content is tall enough to fill the
 * height on its own and there is no slack left to share.
 */
.himpel-awhy__col {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: var(--haw-panel-gap, 36px);
	min-width: 0;
}

.himpel-awhy__list {
	min-width: 0;
}

/*
 * Spacing between points is padding on each item rather than a flex gap, so
 * the connecting thread below can run from the bottom of one icon to exactly
 * the top of the next with `bottom: 0` — a gap would leave it short by that
 * much, and the line would break between every pair.
 */
.himpel-awhy__item {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: var(--haw-item-inner-gap, 16px);
	padding-bottom: var(--haw-item-gap, 34px);
}

.himpel-awhy__item:last-child {
	padding-bottom: 0;
}

/* The thread: a grey track under every item but the last... */
.himpel-awhy__item:not(:last-child)::before,
.himpel-awhy__item:not(:last-child)::after {
	content: "";
	position: absolute;
	top: var(--haw-icon, 48px);
	bottom: 0;
	left: calc(var(--haw-icon, 48px) / 2 - 1px);
	width: 2px;
}

.himpel-awhy__item:not(:last-child)::before {
	background-color: var(--haw-thread, rgba(18, 18, 18, 0.13));
}

/* ...and the brand-coloured length that draws down over it as the point
   lights up. Scaled rather than sized, so it animates on the compositor. */
.himpel-awhy__item:not(:last-child)::after {
	background-color: var(--himpel-primary);
	transform: scaleY(0);
	transform-origin: top center;
	transition: transform 0.5s ease;
}

.himpel-awhy__item.is-active:not(:last-child)::after {
	transform: scaleY(1);
}

/* --- The icon badge: border, then fill, then the glyph --- */
.himpel-awhy__icon {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: var(--haw-icon, 48px);
	height: var(--haw-icon, 48px);
	border: 1px solid var(--haw-icon-border, rgba(18, 18, 18, 0.16));
	border-radius: 50%;
	background-color: var(--haw-icon-bg, var(--himpel-white));
	transition: background-color 0.4s ease, border-color 0.4s ease;
}

.himpel-awhy__item.is-active .himpel-awhy__icon {
	border-color: var(--himpel-primary);
	background-color: var(--himpel-primary);
}

.himpel-awhy__glyph {
	display: block;
	width: var(--haw-glyph, 50%);
	height: var(--haw-glyph, 50%);
	/* A mask rather than an <img>, so the glyph takes its colour from CSS and
	   can flip to white on the filled badge. */
	background-color: var(--haw-glyph-color, var(--himpel-dark));
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: contain;
	mask-size: contain;
	transition: background-color 0.4s ease;
}

.himpel-awhy__item.is-active .himpel-awhy__glyph {
	background-color: var(--himpel-white);
}

/* Without mask support the glyph would paint as a solid square, so drop the
   fill and show nothing rather than a block. */
@supports not ((-webkit-mask-image: url("")) or (mask-image: url(""))) {
	.himpel-awhy__glyph {
		background-color: transparent;
	}
}

.himpel-awhy__item-body {
	/* Takes the rest of the row rather than sizing to its longest line, so the
	   copy wraps to the column instead of leaving a ragged short measure. */
	flex: 1 1 auto;
	min-width: 0;
	padding-top: 2px;
}

.himpel-awhy__item-title {
	margin: 0 0 5px;
	padding: 0;
	color: var(--haw-ititle-color, var(--himpel-dark));
	font-size: var(--haw-ititle-d, 17px);
	font-weight: 600;
	line-height: 1.3;
	transition: color 0.4s ease;
}

.himpel-awhy__item.is-active .himpel-awhy__item-title {
	color: var(--himpel-primary);
}

.himpel-awhy__item-text {
	margin: 0;
	padding: 0;
	color: var(--haw-itext-color, rgba(18, 18, 18, 0.62));
	font-size: var(--haw-itext-d, 14px);
	font-weight: 400;
	line-height: 1.55;
}

/* --------------------------------------------------------------------------
   The figure — image with the brand panel floating over its top edge
   -------------------------------------------------------------------------- */
.himpel-awhy__figure {
	min-width: 0;
}

.himpel-awhy__media {
	min-height: var(--haw-media-h, 520px);
	border-radius: var(--haw-radius, 20px);
	/* Shows through while the image loads, so the panel never floats over a
	   blank hole in the layout. */
	background-color: rgba(18, 18, 18, 0.06);
	background-position: var(--haw-media-pos, center center);
	background-repeat: no-repeat;
	background-size: cover;
	overflow: hidden;
}

/*
 * The panel sits under the icon points, in the same column, rather than
 * floating over the photograph.
 */
.himpel-awhy__panel {
	padding: var(--haw-panel-pad, 26px 28px);
	border-radius: var(--haw-panel-radius, 16px);
	background-color: var(--haw-panel-bg, var(--himpel-primary));
}

.himpel-awhy__panel-title {
	margin: 0 0 10px;
	padding: 0;
	color: var(--himpel-white);
	font-size: var(--haw-ptitle-d, 13px);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.08em;
}

.himpel-awhy__panel-text {
	margin: 0;
	padding: 0;
	color: var(--himpel-white);
	font-size: var(--haw-ptext-d, 15px);
	font-weight: 400;
	line-height: 1.65;
	opacity: 0.9;
}

/* ==========================================================================
   Scroll-in animation
   .is-revealing is printed server-side so the pre-animation state exists in
   the first paint; the script removes it once GSAP has seeded the tween.
   ========================================================================== */
.himpel-awhy.is-revealing .himpel-awhy__eyebrow,
.himpel-awhy.is-revealing .himpel-awhy__title,
.himpel-awhy.is-revealing .himpel-awhy__desc,
.himpel-awhy.is-revealing .himpel-awhy__btn,
.himpel-awhy.is-revealing .himpel-awhy__item,
.himpel-awhy.is-revealing .himpel-awhy__figure {
	opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
	.himpel-awhy.is-revealing .himpel-awhy__eyebrow,
	.himpel-awhy.is-revealing .himpel-awhy__title,
	.himpel-awhy.is-revealing .himpel-awhy__desc,
	.himpel-awhy.is-revealing .himpel-awhy__btn,
	.himpel-awhy.is-revealing .himpel-awhy__item,
	.himpel-awhy.is-revealing .himpel-awhy__figure {
		opacity: 1;
	}

	.himpel-awhy__icon,
	.himpel-awhy__glyph,
	.himpel-awhy__item-title,
	.himpel-awhy__item::after,
	.himpel-awhy__btn {
		transition: none;
	}

	.himpel-awhy__btn:hover {
		transform: none;
	}
}

/* ==========================================================================
   Responsive — breakpoints mirror Elementor's defaults
   ========================================================================== */

/* --- Tablet: up to 1024px --- */
@media (max-width: 1024px) {
	.himpel-awhy__inner {
		padding: var(--haw-py-t, 60px) var(--haw-px-t, 20px);
	}

	.himpel-awhy__head,
	.himpel-awhy__bottom {
		gap: var(--haw-col-gap-t, 32px);
	}

	.himpel-awhy__bottom {
		margin-top: var(--haw-row-gap-t, 44px);
	}

	.himpel-awhy__title {
		font-size: var(--haw-title-t, 32px);
		max-width: 100%;
	}

	/*
	 * At this width the copy in the left column runs taller than the image's
	 * 400px, so the row is sized by the column and the photo was ending well
	 * short of it.
	 *
	 * The figure is already stretched to the row by the grid — it is the image
	 * inside it that was not filling it, having only a min-height to go on.
	 * Making the figure a flex container lets the image take the height it has
	 * been given, with the min-height staying on as a floor for when the column
	 * is the shorter of the two.
	 */
	.himpel-awhy__figure {
		display: flex;
	}

	.himpel-awhy__media {
		flex: 1 1 auto;
		min-height: var(--haw-media-h-t, 400px);
		background-position: var(--haw-media-pos-t, center center);
	}

	.himpel-awhy__panel {
		padding: var(--haw-panel-pad-t, 20px 22px);
	}
}

/* --- Mobile: up to 767px --- */
@media (max-width: 767px) {
	.himpel-awhy__inner {
		padding: var(--haw-py-m, 40px) var(--haw-px-m, 15px);
	}

	/*
	 * One column throughout. minmax(0, 1fr) rather than 1fr: the plain keyword
	 * is minmax(auto, 1fr), and an auto floor lets a wide child push the column
	 * past the screen.
	 */
	.himpel-awhy__head,
	.himpel-awhy__bottom {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--haw-row-gap-m, 32px);
	}

	.himpel-awhy__bottom {
		margin-top: var(--haw-row-gap-m, 32px);
	}

	.himpel-awhy__eyebrow {
		margin-bottom: var(--haw-gap-eyebrow-m, 14px);
		font-size: var(--haw-eyebrow-m, 13px);
	}

	.himpel-awhy__title {
		font-size: var(--haw-title-m, 26px);
		line-height: 1.2;
	}

	.himpel-awhy__desc {
		font-size: var(--haw-desc-m, 15px);
		line-height: 1.7;
	}

	.himpel-awhy__icon {
		width: var(--haw-icon-m, 42px);
		height: var(--haw-icon-m, 42px);
	}

	/* The thread has to follow the smaller badge, or it runs down beside the
	   icons instead of through their centres. */
	.himpel-awhy__item:not(:last-child)::before,
	.himpel-awhy__item:not(:last-child)::after {
		top: var(--haw-icon-m, 42px);
		left: calc(var(--haw-icon-m, 42px) / 2 - 1px);
	}

	.himpel-awhy__panel {
		padding: var(--haw-panel-pad-m, 20px);
	}

	.himpel-awhy__panel-text {
		font-size: var(--haw-ptext-m, 14px);
	}

	.himpel-awhy__media {
		min-height: var(--haw-media-h-m, 260px);
		border-radius: var(--haw-radius-m, 14px);
		background-position: var(--haw-media-pos-m, center center);
	}
}
