/*
 * Header and hero - Figma 30:207 (desktop, 1440) and 33:560 (phone, 390).
 *
 * Every value is read from those nodes. Paired values (phone, desktop) interpolate linearly from 390
 * to 1440; the layout switches to the desktop shape at 768px. The phone menu's open state is not
 * drawn: it is the intake's recommended panel (question 3), built in the frame's own values.
 *
 * U5 (operator request after launch, 2026-10-16, "make it look good and nice") departs from the
 * frames on purpose in three places, each marked U5 below: the navigation bar is bigger (96 tall at
 * 1440 and 72 at 390 instead of the drawn 80 / 65, logo 32 / 28 tall instead of 25, links Inter 500
 * 15 instead of 600 12), the hero band fills the screen instead of the drawn 747 / 680, and the copy
 * is anchored to the bottom of that taller band with the drawn 64 under it.
 */

.inv-hero {
	/* U5: logo height and the bar's padding above and below it, so the bar is logo + 2 x padding:
	   28 + 2 x 22 = 72 at 390, 32 + 2 x 32 = 96 at 1440. */
	--inv-bar-logo: clamp(28px, calc(28px + 4 * (100vw - 390px) / 1050), 32px);
	--inv-bar-pad: clamp(22px, calc(22px + 10 * (100vw - 390px) / 1050), 32px);
	/* The space between the bar and the headline when the screen is short (30:228 / 33:583 top padding). */
	--inv-intro-top: clamp(42px, calc(42px + 48 * (100vw - 390px) / 1050), 90px);
	margin: 0;
}

/* The band: photo d35d9dbb under a #000000 50% overlay (both frames). Phone min height 680 (33:560),
   desktop height 747 (30:207). The photo stays a cover (it fills whatever height the band takes).
   The band is a column: the bar at the top, the copy pushed to the bottom (U5, below). */
.inv-hero .inv-hero__band {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: flex-start;
	box-sizing: border-box;
	min-height: clamp(680px, calc(680px + 67 * (100vw - 390px) / 1050), 747px);
	padding: 0;
	color: var(--wp--preset--color--c-04);
}

/* U5: on the site itself the band is one screen tall, never less: the small viewport height (the
   phone's browser bars shown), with 100vh before it for browsers without svh, less a signed-in
   editor's admin bar. Content taller than that grows the band instead of being cut. The block
   editor's canvas (whose body is .editor-styles-wrapper) keeps the drawn height above, so a
   self-sizing preview frame can never chase its own height. */
body:not(.editor-styles-wrapper) .inv-hero .inv-hero__band {
	min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
	min-height: calc(100svh - var(--wp-admin--admin-bar--height, 0px));
}

.inv-hero .inv-hero__band > .wp-block-cover__inner-container {
	display: flex;
	flex: 1 0 auto;
	flex-direction: column;
	width: 100%;
	color: inherit;
}

/* Navigation bar. Drawn: 30:208 is 80 tall with its items centred, 33:561 pads 24 / 16. U5: the
   logo, links and toggle are centred in a bar of the logo plus --inv-bar-pad above and below. */
.inv-hero .inv-hero__nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	box-sizing: border-box;
	padding: var(--inv-bar-pad) var(--inv-inline);
}

/* Logo 30:209 / 33:562: 140 x 25, white, one SVG. U5: 28 tall at 390 to 32 at 1440, in its own
   140 : 25 proportion (156.8 x 28 to 179.2 x 32). */
.inv-hero .inv-hero__logo {
	flex: none;
	margin: 0;
	line-height: 0;
}

.inv-hero .inv-hero__logo a {
	display: block;
}

.inv-hero .inv-hero__logo img {
	display: block;
	width: calc(var(--inv-bar-logo) * 140 / 25);
	height: var(--inv-bar-logo);
}

/* Links 30:223, drawn Inter 600 12 / 14.52, white, 48 apart. U5: Inter 500 15 (preset s-06) with
   0.02em of tracking, 32 apart at 390 rising to 40 at 1440 (the drawn 48 apart is four times the
   12 size; four times 15 would spread the three words too far). Hidden in the phone bar (they live
   in the menu panel there), shown inline from 768. */
.inv-hero .inv-hero__links {
	display: none;
	align-items: center;
	gap: clamp(32px, calc(32px + 8 * (100vw - 390px) / 1050), 40px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.inv-hero .inv-hero__links li {
	margin: 0;
}

/* The 5px padding and -5px margin make each link a 24px-tall target (contract floor, WCAG 2.5.8)
   without moving the drawn text. */
.inv-hero .inv-hero__links a {
	display: block;
	margin: -5px 0;
	padding: 5px 0;
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--s-06);
	font-weight: 500;
	line-height: 1.21;
	letter-spacing: 0.02em;
	color: var(--wp--preset--color--c-04);
	text-decoration: none;
	transition: opacity 300ms var(--inv-ease);
}

/* U5: a quiet hover, the link dims a little. Only where a pointer can hover, so a tap on a touch
   screen does not leave a link dimmed. */
@media (hover: hover) {
	.inv-hero .inv-hero__links a:hover {
		opacity: 0.7;
	}
}

/* Hamburger 33:662: 24 x 18, three white 2px bars (one SVG), right edge on the gutter, centred on
   the logo. U5: scaled with the logo, keeping the drawn 24 : 25 width to logo height and 18 : 25
   height (26.9 x 20.2 at 390 for the 28 logo). The hit area is 44 x 44 around it without moving it. */
.inv-hero .inv-hero__menu {
	flex: none;
	gap: 0;
	margin: 0;
}

.inv-hero .inv-menu-toggle {
	--inv-burger-w: calc(var(--inv-bar-logo) * 24 / 25);
	--inv-burger-h: calc(var(--inv-bar-logo) * 18 / 25);
	--inv-burger-x: calc((44px - var(--inv-burger-w)) / 2);
	--inv-burger-y: calc((44px - var(--inv-burger-h)) / 2);
	margin: 0;
}

.inv-hero .inv-menu-toggle .wp-block-button__link {
	position: relative;
	display: block;
	box-sizing: content-box;
	width: var(--inv-burger-w);
	height: var(--inv-burger-h);
	margin: calc(var(--inv-burger-y) * -1) calc(var(--inv-burger-x) * -1);
	padding: var(--inv-burger-y) var(--inv-burger-x);
	border: 0;
	border-radius: 0;
	background: none;
	color: var(--wp--preset--color--c-04);
	font-size: 0;
	line-height: 0;
	cursor: pointer;
}

.inv-hero .inv-menu-toggle img {
	display: block;
	width: var(--inv-burger-w);
	height: var(--inv-burger-h);
}

/* Hero copy 30:228 / 33:583. U5: pushed to the bottom of the full-screen band (margin-top auto), so
   it keeps the drawn 64 below it on every screen and the photo opens up above it; on a screen too
   short for that, the drawn top padding is the least space between the bar and the headline. */
.inv-hero .inv-hero__intro {
	box-sizing: border-box;
	margin-top: auto;
	padding: var(--inv-intro-top) var(--inv-inline) 64px;
}

/* Headline 30:229 Helvetica Neue 500 96 / 96; 33:584 Inter 500 46 / 47.84. White. */
.inv-hero .inv-hero__headline {
	margin: 0;
	font-family: var(--wp--preset--font-family--inter);
	font-size: clamp(46px, calc(46px + 50 * (100vw - 390px) / 1050), 96px);
	font-weight: 500;
	line-height: clamp(47.84px, calc(47.84px + 48.16 * (100vw - 390px) / 1050), 96px);
	letter-spacing: 0;
	color: var(--wp--preset--color--c-04);
}

/* Supporting copy 30:231 (735 wide) / 33:583: 50 below the headline on desktop, 32 on the phone;
   32 between the description and the call to action in both. 30:235 beside it draws nothing. */
.inv-hero .inv-hero__support {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 32px;
	max-width: 735px;
	margin: clamp(32px, calc(32px + 18 * (100vw - 390px) / 1050), 50px) 0 0;
}

/* Description 30:232 Inter 500 22 / 37.4; 33:585 Inter 500 17 / 28.9 (both 170%). */
.inv-hero .inv-hero__support > p:first-child {
	margin: 0;
	font-family: var(--wp--preset--font-family--inter);
	font-size: clamp(17px, calc(17px + 5 * (100vw - 390px) / 1050), 22px);
	font-weight: 500;
	line-height: 1.7;
	letter-spacing: 0;
	color: var(--wp--preset--color--c-04);
}

.inv-hero .inv-hero__support > p:last-child {
	margin: 0;
	line-height: 0;
}

/* Call to action 30:233 / 33:586: Inter 500 16 / 19.36 (phone 13 / 15.73), uppercase, white, with
   the drawn 1px white bottom stroke. The stroke is INSIDE the 6px bottom padding, so 5px + 1px.
   The phone box is 22px tall as drawn; 3px of padding above, taken back by a -3px margin, makes it
   a 24px target (contract floor, WCAG 2.5.8) without moving the text or the stroke. */
.inv-hero .inv-hero__support > p:last-child a {
	display: inline-block;
	margin-top: -3px;
	padding: 3px 0 5px;
	border-bottom: 1px solid var(--wp--preset--color--c-04);
	font-family: var(--wp--preset--font-family--inter);
	font-size: clamp(13px, calc(13px + 3 * (100vw - 390px) / 1050), 16px);
	font-weight: 500;
	line-height: 1.21;
	text-transform: uppercase;
	color: var(--wp--preset--color--c-04);
	text-decoration: none;
}

/* Phone shape: everything below 768. Written as the exact complement of the desktop query, so no
   fractional width between the two shapes is left without rules. */
@media not all and (min-width: 768px) {
	/* The open menu (undrawn, intake question 3): the bar becomes a full-screen #0a0a09 panel. The
	   logo and the toggle stay exactly where the bar draws them; the toggle shows a close X made of
	   two of the hamburger's own white bars (its width, 2/25 of the logo height thick); the three
	   links wrap to a row of their own and stack the bar's bottom padding plus the drawn 42 (33:583
	   top padding) below the logo row, in Inter 500 48 / 48 (the phone frame's 33:592 heading size)
	   and 24 apart (33:561 item spacing). */
	.inv-hero.is-menu-open {
		position: relative;
		z-index: 1000;
	}

	/* A signed-in editor's admin bar (z-index 99999) would cover the panel's top, so it starts below it. */
	.inv-hero.is-menu-open .inv-hero__nav {
		position: fixed;
		inset: var(--wp-admin--admin-bar--height, 0px) 0 0;
		z-index: 1000;
		flex-wrap: wrap;
		align-content: flex-start;
		overflow-y: auto;
		background: var(--wp--preset--color--c-01);
	}

	.inv-hero.is-menu-open .inv-hero__links {
		display: flex;
		flex: 0 0 100%;
		flex-direction: column;
		align-items: flex-start;
		gap: 24px;
		margin-top: calc(var(--inv-bar-pad) + var(--inv-intro-top));
	}

	.inv-hero.is-menu-open .inv-hero__links a {
		font-size: 48px;
		font-weight: 500;
		line-height: 48px;
		letter-spacing: 0;
	}

	.inv-hero.is-menu-open .inv-menu-toggle img {
		visibility: hidden;
	}

	.inv-hero.is-menu-open .inv-menu-toggle .wp-block-button__link::before,
	.inv-hero.is-menu-open .inv-menu-toggle .wp-block-button__link::after {
		content: "";
		position: absolute;
		top: calc(22px - var(--inv-bar-logo) / 25);
		left: var(--inv-burger-x);
		width: var(--inv-burger-w);
		height: calc(var(--inv-bar-logo) * 2 / 25);
		background: var(--wp--preset--color--c-04);
	}

	.inv-hero.is-menu-open .inv-menu-toggle .wp-block-button__link::before {
		transform: rotate(45deg);
	}

	.inv-hero.is-menu-open .inv-menu-toggle .wp-block-button__link::after {
		transform: rotate(-45deg);
	}

	html.inv-menu-open {
		overflow: hidden;
	}
}

/* Desktop shape (768 and up): links inline, no toggle, headline in the drawn Helvetica Neue. */
@media (min-width: 768px) {
	.inv-hero .inv-hero__links {
		display: flex;
	}

	.inv-hero .inv-hero__menu {
		display: none;
	}

	.inv-hero .inv-hero__headline {
		font-family: var(--wp--preset--font-family--helvetica-neue);
	}
}
