@charset "UTF-8";
/* =============================================================================
   Page hero. [figma] homepage 1440x800; inner pages 500–700 tall.

   The header is STICKY, so it occupies flow space. The hero pulls itself up by
   the header height so the image runs behind the bar exactly as drawn, while
   the bar keeps sticking as the page scrolls. The news ticker is absolutely
   placed inside the hero, so it scrolls away.
   ========================================================================== */

.hero {
	position: relative;
	margin-block-start: calc(-1 * var(--header-height));
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 32.5rem;                /* 520 mobile */
	padding-block: calc(var(--header-height) + var(--ticker-height) + var(--space-12)) var(--space-16);
	color: var(--color-on-dark);
	overflow: hidden;
	isolation: isolate;
}

@media (min-width: 64em) {
	.hero {
		min-height: 50rem;              /* 800 [figma] */
	}
}

/* Layer order inside .hero's isolated context: slides 0, scrim 1, body 2,
   ticker/dots 3.

   Everything here stacks with POSITIVE z-index inside .hero's isolated context:
   image 0, scrim 1, body 2, ticker 3. Negative z-index worked equally well —
   this is just explicit about the order rather than relying on "behind the
   background". (An earlier note here blamed backdrop-filter for the image not
   painting; that was wrong. It is a Claude Code browser-pane invalidation bug —
   a forced repaint shows the image with the blur fully active.) */
/* [figma] node 199:788 — TWO stacked gradients, both diagonal. An earlier
   version of this file invented a vertical three-stop scrim instead.

   VERIFIED 2026-09-04, after the contact hero proved the MCP's report can be
   wrong. Method: render the node, pull the node's OWN image asset, place it at
   the reported geometry (107.16% x 128.56% at -0.54% / -21.14%), composite these
   gradients over it and diff against the render — sampling only smooth patches,
   where a few pixels of misalignment cannot masquerade as a colour difference.

   Mean absolute error 8.56/255, and every variant tried was worse: raising the
   navy layer's end alpha (0.4 -> 8.83, 0.5 -> 9.59, 0.6 -> 10.61), moving its
   start stop (10.40-10.96), and reversing the stacking order (11.83). Nudging
   the crop 6px up drops the error to 6.96 with the gradients untouched, which is
   what identifies the remainder as residual alignment rather than colour.

   So this transcription is right. Do not "fix" it on a visual impression — that
   is exactly what went wrong on the Lux scrim. */
.hero__scrim {
	position: absolute;
	inset: 0;
	z-index: 1;
	background-image:
		linear-gradient(62.16deg, rgb(0 0 0 / 0.7) 17.04%, rgb(0 0 0 / 0) 52.47%),
		linear-gradient(119.05deg, rgb(5 48 79 / 0.6) 46.15%, rgb(9 75 123 / 0.3) 100%);
}

/* [figma] node 747:3763 — MEASURED, not transcribed.

   The MCP reports this scrim as three stacked layers: a 118.96deg #002138 fade
   to 118.97%, a 49.8deg black diagonal at 70%, and a flat 30% #094b7b. Built
   literally that blacks out the left two thirds of the photograph; the render of
   the node shows the city clear across the whole frame under an even blue wash.
   Hard rule 18, third time.

   So it was solved from the render instead: for each column, regress our copy of
   the photograph against the rendered pixels. Slope gives 1 - alpha, intercept
   gives the premultiplied overlay. The result is unambiguous —

     alpha       1.00 at x=0, falling LINEARLY to 0.50 at x=1440
     premult     constant (0, 33, 56) across the whole frame
     variation with y   none, at any x

   Constant premultiplied value with falling alpha is one horizontal gradient
   between two stops that share it: opaque #002138 and #004066 at HALF alpha.
   (Not "#004066 fully transparent at 200%" — that has the same alpha ramp but a
   falling premultiplied value, and comes out visibly lighter.) No diagonal, no
   black layer, no separate flat wash. */
.hero__scrim--contact {
	background-image: linear-gradient(90deg, #002138 0%, rgb(0 64 102 / 0.5) 100%);
}

/* --- Static media ----------------------------------------------------------
   Inner pages carry one photograph rather than a slider. The contact hero is
   drawn full-width and pinned to the TOP of the band (the file scales the photo
   to 127.87% of the 500px frame at top 0), so the crop is top-anchored, not
   centred. */

.hero__media {
	position: absolute;
	inset: 0;
	z-index: 0;
}

/* Centre-anchored (Domagoj, 2026-09-05). The contact hero's own [figma] frame
   pins its photo to the TOP of the band, which is what `50% 0` reproduced — but
   that crop only suits that one photograph, and every other inner page reusing
   this hero lost its subject off the bottom. Centre is the better default; a
   page that needs the top anchor can override it. */
.hero__media picture,
.hero__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

/* --- Slider ----------------------------------------------------------------
   [figma] the hero carries a 78x12 dot group at (681, 746) — four 12px dots on
   a 22px pitch. It is a slider, not a static image. */

.hero__slides {
	position: absolute;
	inset: 0;
	z-index: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hero__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity var(--duration-slow) var(--ease);
	/* Safari: keep every slide on its own layer for good. Otherwise WebKit
	   creates the fading slide's layer when the fade starts and drops it when
	   it ends, and the ticker above repaints late — it flashed transparent at
	   each slide change (Domagoj, 2026-09-25; Chrome was fine). */
	will-change: opacity;
}

.hero__slide[aria-hidden='false'] { opacity: 1; }

.hero__slide picture,
.hero__slide img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hero__dots {
	position: absolute;
	z-index: 3;
	bottom: 1rem;                       /* 16 at every width (Domagoj, 2026-09-25; Figma had 54) */
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 0.625rem;                      /* 10 [figma] */
	margin: 0;
	padding: 0;
	list-style: none;
}

/* --- Phones ------------------------------------------------------------------
   (Domagoj, 2026-09-25.) The drawn gradients above are left exactly as
   measured; phones get one extra layer on top, because at 390 the headline and
   lead run the full width of the photo instead of sitting in the dark left
   third the desktop scrim was drawn for. The slider is also taller, and its
   dots move to the foot of the band — at 520 they landed on the lead. */
@media (max-width: 47.99em) {
	.hero {
		padding-block: calc(var(--header-height) + var(--ticker-height) + var(--space-8)) var(--space-16);
	}

	.hero:not(.hero--inner) {
		min-height: 34.375rem;              /* 550 (Domagoj, 2026-09-25) */
		padding-block-end: var(--space-16);
	}

	.hero__scrim::after {
		content: '';
		position: absolute;
		inset: 0;
		background-image: linear-gradient(
			to bottom,
			color-mix(in srgb, var(--color-navy-abyss) 30%, transparent) 0%,
			color-mix(in srgb, var(--color-navy-abyss) 45%, transparent) 50%,
			color-mix(in srgb, var(--color-navy-abyss) 65%, transparent) 100%
		);
	}
}

.hero__dot {
	width: 0.75rem;                     /* 12 [figma] */
	height: 0.75rem;
	border-radius: var(--radius-full);
	background-color: var(--color-on-dark-faint);
	transition: background-color var(--duration) var(--ease);
}

.hero__dot[aria-current='true'] {
	background-color: var(--color-crimson);
}

/* Ticker sits directly beneath the fixed header, over the hero image, and
   scrolls away with the page. */
.hero .news-ticker {
	position: absolute;
	inset-inline: 0;
	top: var(--header-height);
	z-index: 3;
	/* Safari: its own layer, so its background never waits on the slides'. */
	transform: translateZ(0);
	backface-visibility: hidden;
}

.hero__body {
	position: relative;
	z-index: 2;
}

.hero__title {
	color: var(--color-on-dark);
	max-width: 20ch;
}

.hero__lead {
	margin-block-start: var(--space-8);
	max-width: 52ch;
	color: var(--color-on-dark);
}

/* Inner-page hero — centred, shorter. [figma] News & Updates, Contact. */
.hero--inner {
	min-height: 25rem;
	text-align: center;
}

@media (min-width: 64em) {
	.hero--inner {
		min-height: 31.25rem;           /* 500 [figma] */
	}
}

.hero--inner .hero__title,
.hero--inner .hero__lead {
	margin-inline: auto;
}

/* [figma] node 747:3768 — the lead runs to 800px and wraps to two lines, and is
   drawn at 80% white rather than solid. */
.hero--inner .hero__lead {
	max-width: 50rem;                   /* 800 [figma] */
	color: var(--color-on-dark-soft);
}

/* [figma] 747:3196 frames the About photo on the students on the pavement.
   At 1440x700 the image fills the slot exactly, so any position looks the same;
   on a wider, shorter band the crop has to choose. Bottom showed only legs and
   pavement at 2560x500, the centre shows buildings — the people sit in the
   50–88% band of the photo, so 80% keeps them in frame (2026-09-14). The class
   comes from page-hero.php's `variant` argument. */
.hero--about .hero__media img { object-position: center 80%; }

/* Share your story: the photo's faces sit at the top, so the crop keeps the
   top edge (Domagoj, 2026-09-27). */
.hero--story .hero__media picture,
.hero--story .hero__media img { object-position: center top; }

/* [figma] 747:3208 / 747:3209 — the About hero's two buttons, 37 below the
   lead and 20 apart: 52 tall, 32 side padding, Geist Regular 16. The outlined
   one is drawn at 55% white, not the ghost button's usual 24%. */
.hero__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--space-5);
	margin-block-start: var(--space-9);
}

.hero__btn {
	min-height: 3.25rem;                /* 52 [figma] */
	padding-inline: var(--space-8);     /* 32 [figma] */
	font-size: var(--fs-ui-base);       /* 16 [figma] */
	font-weight: var(--fw-regular);
}

.hero__btn.btn--ghost { border-color: rgb(255 255 255 / 0.55); }

/* [figma] 747:3196 — the About hero is drawn 700 tall, not the 500 the other
   inner pages use. */
@media (min-width: 64em) {
	.hero--about { min-height: 43.75rem; }   /* 700 [figma] */
}
