/* =====================================================================
   HRI Hero — full-screen photo + bottom navigation.   v1.3

   Figma frame 2359 × 1066. On desktop every size is the Figma value
   divided by 2359 (pure vw), exactly like the Figma prototype scaling:
     links      22px   → 0.9326vw   (14.3px on a 1534px window, 17.9px at 1920)
     gap        74px   → 3.137vw
     bottom     82px   → 3.476vw    (line-box bottom; baseline sits at 86px)
     shade      44.94% black at the bottom → clear at 35.83% height
   Floors (12px text etc.) only touch windows narrower than ~1290px.

   Phones (≤767): the links fold under a thin plus in the middle; tap →
   the plus turns into × and the links rise up as a list. The plus stroke
   is the font's own stem (Inter Light "l" = 0.0632em), so it matches the
   letters. Without JS the phone layout falls back to a 2 × 2 grid.

   Scroll (v1.3, live page only — the editor keeps everything in place):
     - .hri-hero--dissolve: photo + a #FFF6EA veil are position: fixed; the
       veil fades in over the first 50% screen of scrolling (--hri-dissolve,
       written by hero.js), so the photo dissolves in place. Once fully
       covered the photo is hidden (.is-dissolved) to save the GPU.
     - The navigation + shade are position: fixed above every section
       (z-index 60), as in the Figma frames of the following sections.
     - Every Elementor container after the hero gets z-index 1 so it paints
       above the fixed photo/veil.

   Entrance (.hri-hero--anim, started by hero.js once the photo is ready):
     0s     photo rises out of white (2.6s) and settles from 1.07 (4.4s)
     1.1s   shade fades in
     1.5s   links (phones: the plus) rise from beneath the screen, 0.16s apart
   No JS by 2.6s → everything simply fades in (safety net).
   ===================================================================== */

.hri-hero {
	--hri-hero-ink: #ffe8ca;
	--hri-hero-ink-hover: #ffffff;
	--hri-hero-x: 50%;
	--hri-hero-y: 50%;
	--hri-hero-shade: 44.94;
	--hri-hero-shade-h: 35.83%;

	--hri-hero-fs: clamp(12px, 0.9326vw, 22px);
	--hri-hero-gap: clamp(24px, 3.137vw, 74px);
	--hri-hero-bottom: clamp(24px, 3.476vw, 82px);
	--hri-hero-rise: calc(var(--hri-hero-bottom) + 1.8em);

	--hri-hero-stem: 0.0632em;     /* Inter Light stem width */
	--hri-hero-plus: 22px;         /* plus/× size on phones */

	--hri-hero-ease: cubic-bezier(0.19, 1, 0.22, 1);
	--hri-hero-veil: #fff6ea;
	--hri-dissolve: 0;

	position: relative;
	display: block;
	width: 100%;
	height: 100vh;
	height: 100svh;
	margin: 0;
	padding: 0;
	overflow: hidden;
	background: #ffffff;
	/* No isolation / z-index here: the fixed navigation must be able to
	   sit above the sections that follow. */
}

/* Logged in: keep the whole hero on screen under the admin bar. */
.admin-bar .hri-hero {
	height: calc(100vh - 32px);
	height: calc(100svh - 32px);
}

@media (max-width: 782px) {
	.admin-bar .hri-hero {
		height: calc(100vh - 46px);
		height: calc(100svh - 46px);
	}
}

/* Hidden page heading (H1 for search engines / screen readers). */
.hri-hero__title {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* ---------------------------------------------------------------------
   Photo
   --------------------------------------------------------------------- */
.hri-hero__media {
	position: absolute;
	inset: 0;
	z-index: 0;
	transform-origin: 50% 50%;
	will-change: transform;
}

.hri-hero__img,
.hri-hero .hri-hero__media img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
	object-position: var(--hri-hero-x) var(--hri-hero-y);
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

/* Dissolve veil (only with .hri-hero--dissolve). */
.hri-hero__veil {
	position: absolute;
	inset: 0;
	z-index: 0;
	background: var(--hri-hero-veil);
	opacity: var(--hri-dissolve);
	pointer-events: none;
}

/* ---------------------------------------------------------------------
   Live page: fixed photo/veil, fixed navigation above every section
   --------------------------------------------------------------------- */
body:not(.elementor-editor-active) .hri-hero--dissolve .hri-hero__media,
body:not(.elementor-editor-active) .hri-hero--dissolve .hri-hero__veil {
	position: fixed;
	inset: 0;
}

body:not(.elementor-editor-active) .hri-hero.is-dissolved .hri-hero__media {
	visibility: hidden;
}

body:not(.elementor-editor-active) .hri-hero__nav-wrap {
	position: fixed;
	inset: 0;
	z-index: 60;
}

/* Sections after the hero paint above its fixed photo and veil. */
.e-con:has(> .elementor-widget-hri-hero) ~ .e-con,
.e-con:has(> .e-con-inner > .elementor-widget-hri-hero) ~ .e-con {
	position: relative;
	z-index: 1;
}

/* ---------------------------------------------------------------------
   Navigation + its shade (they travel together)
   --------------------------------------------------------------------- */
.hri-hero__nav-wrap {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
}

.hri-hero__shade {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: var(--hri-hero-shade-h);
	background: linear-gradient(
		to top,
		rgb(0 0 0 / calc(var(--hri-hero-shade) * 1%)) 0%,
		rgb(0 0 0 / 0) 100%
	);
	transition: height 0.9s var(--hri-hero-ease);
}

.hri-hero__nav {
	position: absolute;
	left: 0;
	right: 0;
	bottom: var(--hri-hero-bottom);
	padding: 0 24px;
	pointer-events: auto;
}

.hri-hero__list {
	display: flex;
	flex-wrap: nowrap;
	justify-content: center;
	align-items: flex-end;
	gap: var(--hri-hero-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.hri-hero__item {
	margin: 0;
	padding: 0;
	list-style: none;
}

.hri-hero .hri-hero__link {
	position: relative;
	display: inline-block;
	font-family: "HRI Inter", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size: var(--hri-hero-fs);
	font-weight: 300;
	font-style: normal;
	line-height: 1;
	letter-spacing: 0;
	text-transform: none;
	white-space: nowrap;
	color: var(--hri-hero-ink);
	text-decoration: none;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	transition: color 0.5s ease;
}

.hri-hero__label {
	display: inline-block;
}

@media (hover: hover) and (pointer: fine) {
	.hri-hero .hri-hero__link:hover {
		color: var(--hri-hero-ink-hover);
	}
}

.hri-hero .hri-hero__link:focus {
	outline: none;
}

.hri-hero .hri-hero__link:focus-visible {
	color: var(--hri-hero-ink-hover);
	outline: 1px solid currentColor;
	outline-offset: 8px;
	border-radius: 2px;
}

/* Plus button — phones only (shown in the phone block below). */
.hri-hero .hri-hero__toggle {
	display: none;
	position: relative;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	margin: 0 auto;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	color: var(--hri-hero-ink);
	font-size: var(--hri-hero-fs);
	line-height: 1;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	appearance: none;
}

.hri-hero .hri-hero__toggle:hover,
.hri-hero .hri-hero__toggle:focus,
.hri-hero .hri-hero__toggle:active {
	background: transparent;
	color: var(--hri-hero-ink);
	outline: none;
}

.hri-hero .hri-hero__toggle:focus-visible {
	outline: 1px solid currentColor;
	outline-offset: 2px;
}

.hri-hero__plus {
	position: relative;
	display: block;
	width: var(--hri-hero-plus);
	height: var(--hri-hero-plus);
	transition: transform 0.8s var(--hri-hero-ease);
}

.hri-hero__plus::before,
.hri-hero__plus::after {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	width: 100%;
	height: var(--hri-hero-stem);
	min-height: 1px;
	margin-top: calc(var(--hri-hero-stem) / -2);
	background: currentColor;
	border-radius: 1px;
}

.hri-hero__plus::after {
	transform: rotate(90deg);
}

.hri-hero.is-open .hri-hero__plus {
	transform: rotate(135deg); /* + → × with a little more travel */
}

/* ---------------------------------------------------------------------
   Entrance
   --------------------------------------------------------------------- */

/* Waiting state (before hero.js says "go"). Safety net: fade in at 2.6s. */
.hri-hero--anim:not(.is-in):not(.is-static) .hri-hero__img {
	opacity: 0;
	animation: hri-hero-safe 0.9s ease 2.6s forwards;
}

.hri-hero--anim:not(.is-in):not(.is-static) .hri-hero__media {
	transform: scale(1.07);
	animation: hri-hero-safe 0.9s ease 2.6s forwards;
}

.hri-hero--anim:not(.is-in):not(.is-static) .hri-hero__shade,
.hri-hero--anim:not(.is-in):not(.is-static) .hri-hero__label,
.hri-hero--anim:not(.is-in):not(.is-static) .hri-hero__plus {
	opacity: 0;
	animation: hri-hero-safe 0.9s ease 2.6s forwards;
}

.hri-hero--anim:not(.is-in):not(.is-static) .hri-hero__item,
.hri-hero--anim:not(.is-in):not(.is-static) .hri-hero__toggle {
	transform: translate3d(0, var(--hri-hero-rise), 0);
	animation: hri-hero-safe 0.9s ease 2.6s forwards;
}

@keyframes hri-hero-safe {
	to {
		opacity: 1;
		transform: none;
	}
}

/* Running. */
.hri-hero.is-in .hri-hero__img {
	animation: hri-hero-photo 2.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.hri-hero.is-in .hri-hero__media {
	animation: hri-hero-settle 4.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hri-hero.is-in .hri-hero__shade {
	animation: hri-hero-fade 1.8s ease 1.1s both;
}

.hri-hero.is-in .hri-hero__item,
.hri-hero.is-in .hri-hero__toggle {
	animation: hri-hero-rise 1.7s var(--hri-hero-ease) calc(1.5s + var(--i, 0) * 0.16s) both;
}

.hri-hero.is-in .hri-hero__label,
.hri-hero.is-in .hri-hero__plus {
	animation: hri-hero-fade 1.2s cubic-bezier(0.33, 0, 0.2, 1) calc(1.5s + var(--i, 0) * 0.16s) both;
}

@keyframes hri-hero-photo {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes hri-hero-settle {
	from { transform: scale(1.07); }
	to   { transform: scale(1); }
}

@keyframes hri-hero-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes hri-hero-rise {
	from { transform: translate3d(0, var(--hri-hero-rise), 0); }
	to   { transform: translate3d(0, 0, 0); }
}

/* Static: no animation (editor, reduced motion, JS too late). */
.hri-hero.is-static .hri-hero__img,
.hri-hero.is-static .hri-hero__media,
.hri-hero.is-static .hri-hero__shade,
.hri-hero.is-static .hri-hero__item,
.hri-hero.is-static .hri-hero__label,
.hri-hero.is-static .hri-hero__toggle,
.hri-hero.is-static .hri-hero__plus,
.elementor-editor-active .hri-hero .hri-hero__img,
.elementor-editor-active .hri-hero .hri-hero__media,
.elementor-editor-active .hri-hero .hri-hero__shade,
.elementor-editor-active .hri-hero .hri-hero__item,
.elementor-editor-active .hri-hero .hri-hero__label,
.elementor-editor-active .hri-hero .hri-hero__toggle,
.elementor-editor-active .hri-hero .hri-hero__plus {
	opacity: 1 !important;
	transform: none !important;
	animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
	.hri-hero .hri-hero__img,
	.hri-hero .hri-hero__media,
	.hri-hero .hri-hero__shade,
	.hri-hero .hri-hero__item,
	.hri-hero .hri-hero__label,
	.hri-hero .hri-hero__toggle {
		opacity: 1 !important;
		transform: none !important;
		animation: none !important;
	}
}

/* ---------------------------------------------------------------------
   Tablets (768–1024)
   --------------------------------------------------------------------- */
@media (max-width: 1024px) {
	.hri-hero {
		--hri-hero-x: 42%;
		--hri-hero-fs: 15px;
		--hri-hero-gap: 40px;
		--hri-hero-bottom: 44px;
	}
}

/* Landscape tablets / large phones on their side: one compact row. */
@media (min-width: 768px) and (max-width: 1024px) and (max-height: 500px) and (orientation: landscape) {
	.hri-hero {
		--hri-hero-x: 50%;
		--hri-hero-fs: 13px;
		--hri-hero-gap: 28px;
		--hri-hero-shade-h: 45%;
		--hri-hero-bottom: 20px;
	}
}

/* ---------------------------------------------------------------------
   Phones (≤767)
   --------------------------------------------------------------------- */
@media (max-width: 767px) {
	.hri-hero {
		--hri-hero-x: 41%;
		--hri-hero-fs: 16px;
		--hri-hero-shade-h: 24%; /* only the plus lives here; keeps text sections clean */
		--hri-hero-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
		--hri-hero-rise: calc(var(--hri-hero-bottom) + 64px);
	}

	.hri-hero__nav {
		padding: 0 20px;
	}

	/* No JS: balanced 2 × 2 grid. */
	.hri-hero__list {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 12px;
		row-gap: 18px;
		max-width: 360px;
		margin: 0 auto;
	}

	.hri-hero__item {
		text-align: center;
	}

	/* ---- With JS: plus in the middle, list folds out above it ---- */
	.hri-hero--js .hri-hero__toggle {
		display: flex;
	}

	.hri-hero--js .hri-hero__list {
		position: absolute;
		left: 0;
		right: 0;
		bottom: calc(100% + 10px);
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 0;
		max-width: none;
		margin: 0;
		visibility: hidden;
		pointer-events: none;
		transition: visibility 0s linear 0.7s;
	}

	.hri-hero--js .hri-hero__item {
		opacity: 0;
		transform: translate3d(0, 16px, 0);
		animation: none !important;
		/* Closing: top link leaves first. */
		transition:
			opacity 0.35s ease calc(var(--i, 0) * 0.04s),
			transform 0.5s var(--hri-hero-ease) calc(var(--i, 0) * 0.04s);
	}

	.hri-hero--js .hri-hero__label {
		animation: none !important;
		opacity: 1;
	}

	.hri-hero--js .hri-hero__link {
		padding: 11px 24px; /* 38px tap height per link */
	}

	.hri-hero--js.is-open {
		--hri-hero-shade-h: 62%;
	}

	.hri-hero--js.is-open .hri-hero__list {
		visibility: visible;
		pointer-events: auto;
		transition-delay: 0s;
	}

	/* Opening: the link nearest the plus rises first, then upwards. */
	.hri-hero--js.is-open .hri-hero__item {
		opacity: 1;
		transform: translate3d(0, 0, 0);
		transition:
			opacity 0.6s ease calc(0.08s + (var(--n, 4) - 1 - var(--i, 0)) * 0.07s),
			transform 0.9s var(--hri-hero-ease) calc(0.08s + (var(--n, 4) - 1 - var(--i, 0)) * 0.07s);
	}
}

/* Very narrow phones. */
@media (max-width: 359px) {
	.hri-hero {
		--hri-hero-fs: 15px;
	}
}

/* ---------------------------------------------------------------------
   Full-bleed, whatever the Elementor container settings are.
   (A boxed container or its default 10px padding would otherwise frame
   the hero with white edges.)
   --------------------------------------------------------------------- */
.e-con:has(> .elementor-widget-hri-hero),
.e-con:has(> .e-con-inner > .elementor-widget-hri-hero) {
	--content-width: 100% !important;
	width: 100% !important;
	max-width: none !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	gap: 0 !important;
	border: 0 !important;
}

.e-con:has(> .e-con-inner > .elementor-widget-hri-hero) > .e-con-inner {
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	gap: 0 !important;
}

.elementor-widget-hri-hero,
.elementor-widget-hri-hero > .elementor-widget-container {
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
}