/* IAM Hero Slider — shell (track, horizontal loop, dots, float, shared button, a11y).
   px units only: Bricks uses a non-standard root font size. */

.ihs-slider {
	/* Height matches the live BricksExtras hero (slider box, below the sticky
	   header): 852px at 1920, 831 at 1440, 806 at 1366, 617 at 390. Width-based,
	   so a short window doesn't squash it. The shortcode's height="" overrides. */
	--ihs-height: clamp(617px, calc(344px + 33.8vw), 852px);
	/* Slide transition: same as the old BricksExtras/Splide hero. */
	--ihs-speed: 400ms;
	--ihs-ease: cubic-bezier(0.25, 1, 0.5, 1);
	position: relative;
	isolation: isolate;
	width: 100%;
	max-width: none;
	margin: 0;
	letter-spacing: normal; /* the live page passes 0.7px down; slides set their own where the design needs it */
	padding: 0;
	overflow: hidden;
	background: #003087;
	outline: none;
}

.ihs-slider:focus-visible {
	outline: 3px solid #03c92b;
	outline-offset: -3px;
}

/* Horizontal track. JS moves it with translate3d; flex rows stretch, so every
   slide is as tall as the tallest one (no layout shift between slides). */
.ihs-track {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 0;
	touch-action: pan-y;
	will-change: transform;
	transition: transform var(--ihs-speed) var(--ihs-ease);
}

.ihs-track.is-jumping,
.ihs-slider.is-dragging .ihs-track {
	transition: none;
}

.ihs-slide {
	flex: 0 0 100%;
	position: relative;
	display: flex;
	align-items: center;
	gap: 0;
	box-sizing: border-box;
	min-width: 0;
	min-height: var(--ihs-height); /* content can still grow it: never clipped */
	overflow: hidden;
}

.ihs-slider.is-dragging {
	user-select: none;
	cursor: grabbing;
}

/* The one sanctioned max-width: there is no Bricks container inside the shortcode. */
.ihs-inner {
	position: relative;
	z-index: 2;
	box-sizing: border-box;
	width: 100%;
	max-width: 1600px;
	margin-inline: auto;
	padding-inline: 40px;
}

/* Pagination: square bars like the current hero. */
/* The bars are 50×15 like the current hero; each button's tap area is 44px
   tall (transparent padding, background clipped to the bar), and the row
   sits 14.5px lower so the bars stay exactly 60px from the bottom. */
.ihs-dots {
	position: absolute;
	left: 50%;
	bottom: calc(60px - 14.5px);
	z-index: 5;
	display: flex;
	gap: 10px;
	margin: 0;
	padding: 0;
	transform: translateX(-50%);
}

.ihs-dots[hidden],
.ihs-slider--static .ihs-dots {
	display: none;
}

button.ihs-dot {
	display: block;
	box-sizing: border-box;
	width: 50px;
	height: 44px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 14.5px 0;
	background-clip: content-box;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	background-color: rgba(183, 207, 250, 0.9);
	font-size: 0;
	line-height: 0;
	cursor: pointer;
	transition: background-color 200ms ease;
}

button.ihs-dot:hover {
	background-color: rgba(220, 232, 252, 0.95);
}

button.ihs-dot[aria-current="true"] {
	background-color: rgba(3, 201, 43, 0.5);
}

button.ihs-dot:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 2px;
}

/* Shared button base; each slide sets colours/size with a modifier class. */
a.ihs-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-sizing: border-box;
	margin: 0;
	padding: 0 24px;
	border: 0;
	font-family: "Roboto", "Segoe UI", Arial, sans-serif;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 200ms ease, color 200ms ease, box-shadow 200ms ease;
}

a.ihs-btn:hover,
a.ihs-btn:focus {
	text-decoration: none;
}

a.ihs-btn:focus-visible {
	outline: 3px solid #ffffff;
	outline-offset: 3px;
	box-shadow: 0 0 0 6px rgba(0, 48, 135, 0.6);
}

/* Absolutely positioned, full-cover background image. */
img.ihs-cover {
	position: absolute;
	inset: 0;
	z-index: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
	pointer-events: none;
}

/* Floating effect (replaces BricksExtras "floating effect"). Put it on a wrapper
   around the image, never on the <img> or anything the slider transforms, and
   set the three custom properties on that wrapper's own modifier class. */
@keyframes ihs-float {
	0%,
	100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(var(--ihs-float-distance));
	}
}

:where(.ihs-float) {
	--ihs-float-distance: -20px;
	--ihs-float-duration: 6s;
	--ihs-float-delay: 0s;
}

.ihs-float {
	animation: ihs-float var(--ihs-float-duration) ease-in-out var(--ihs-float-delay) infinite;
	will-change: transform;
}

/* Float that waits for its entrance: add data-ihs-float-after-enter and set
   --ihs-float-start to when the outer wrapper's entrance ends. */
.ihs-js .ihs-slide:not(.is-entered) .ihs-float[data-ihs-float-after-enter] {
	animation: none;
}

.ihs-js .ihs-slide.is-entered .ihs-float[data-ihs-float-after-enter] {
	animation-delay: calc(var(--ihs-float-start, 0ms) + var(--ihs-float-delay));
}

/* Shimmer sweep (opt-in, reusable): a soft highlight that travels around a
   ring. Put the highlight (an SVG arc with a gradient stroke that fades at both
   ends) inside <g class="ihs-shimmer"> in a viewBox="0 0 100 100" SVG; the <g>
   spins around the viewBox centre. Per element: --ihs-shimmer-duration,
   --ihs-shimmer-direction (normal = clockwise, reverse = counter-clockwise),
   --ihs-shimmer-start (usually when the rings' entrance ends). It only runs
   while its slide is active (.is-entered), so it restarts cleanly on every
   visit and stops once the slide has left. Hidden without JS and under
   prefers-reduced-motion. */
@keyframes ihs-shimmer-spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

@keyframes ihs-shimmer-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

.ihs-shimmer {
	opacity: 0;
	transform-box: view-box;
	transform-origin: 50% 50%;
}

.ihs-js .ihs-slide.is-entered .ihs-shimmer {
	animation:
		ihs-shimmer-spin var(--ihs-shimmer-duration, 10s) linear var(--ihs-shimmer-start, 0ms) infinite var(--ihs-shimmer-direction, normal),
		ihs-shimmer-in 600ms ease-out var(--ihs-shimmer-start, 0ms) both;
}

/* Entrance animations (opt-in, reusable)
   Put data-ihs-enter="<type>" on an element and set --ihs-enter-delay (and
   optionally --ihs-enter-duration / --ihs-enter-ease) inline. slider.js adds
   .ihs-js to the slider and .is-entered to a slide each time it becomes active
   (and removes it once the slide has left), so entrances replay every visit.
   Elements are only hidden when .ihs-js is present: if JS fails, nothing is
   ever invisible. Never put an entrance on an element that has its own
   transform (e.g. a floating image): wrap it and animate the wrapper. */
@keyframes ihs-enter-fade-up {
	from { opacity: 0; transform: translateY(20px); }
	to { opacity: 1; transform: none; }
}

@keyframes ihs-enter-draw-x {
	from { opacity: 1; transform: scaleX(0); }
	to { opacity: 1; transform: scaleX(1); }
}

@keyframes ihs-enter-slide-left {
	from { opacity: 0; transform: translateX(-40px); }
	to { opacity: 1; transform: none; }
}

@keyframes ihs-enter-scale-in {
	from { opacity: 0; transform: scale(0.9); }
	to { opacity: 1; transform: none; }
}

@keyframes ihs-enter-ring-in {
	from { opacity: 0; transform: scale(0.85); }
	to { opacity: 1; transform: none; }
}

[data-ihs-enter="fade-up"] { --ihs-enter-name: ihs-enter-fade-up; }
[data-ihs-enter="draw-x"] { --ihs-enter-name: ihs-enter-draw-x; transform-origin: left center; }
[data-ihs-enter="slide-left"] { --ihs-enter-name: ihs-enter-slide-left; }
[data-ihs-enter="scale-in"] { --ihs-enter-name: ihs-enter-scale-in; transform-origin: center; }
[data-ihs-enter="ring-in"] { --ihs-enter-name: ihs-enter-ring-in; transform-origin: center; }

.ihs-js [data-ihs-enter] {
	opacity: 0;
}

.ihs-js .ihs-slide.is-entered [data-ihs-enter] {
	animation: var(--ihs-enter-name) var(--ihs-enter-duration, 500ms) var(--ihs-enter-ease, ease-out) var(--ihs-enter-delay, 0ms) both;
}

/* Odometer: the last digit rolls up a vertical strip (e.g. 2026 → 2027).
   Markup: .ihs-odo[role=img][aria-label] > .ihs-odo__static + .ihs-odo__window >
   .ihs-odo__strip > .ihs-odo__digit × n (from, to, one past "to" for the
   overshoot). Rests on the second digit; without JS it simply shows it. */
.ihs-odo {
	display: inline-flex;
	align-items: flex-start;
	gap: 0;
	line-height: 1;
}

.ihs-odo__static,
.ihs-odo__window {
	display: block;
	height: 1em;
}

/* The window is the numeral (cap) height, not the 1em line box: at
   line-height 1, Metropolis caps sit ~0.15em below the top and the baseline
   ~0.15em above the bottom; the top is a little looser so the 0.06em
   overshoot never clips the digit. Sides aren't clipped, so wide glyphs stay whole.
   Override --ihs-odo-clip-top/bottom for a font with different metrics. */
.ihs-odo__window {
	clip-path: inset(var(--ihs-odo-clip-top, 0.08em) -0.5em var(--ihs-odo-clip-bottom, 0.12em) -0.5em);
}

.ihs-odo__strip {
	display: flex;
	flex-direction: column;
	transform: translateY(-1em);
}

.ihs-odo__digit {
	display: block;
	height: 1em;
	line-height: 1;
}

/* With JS the strip holds on the first digit ("2026") until it rolls. The
   roll is gated on .is-ready, which slider.js adds to the slider once the
   page has loaded, the tab is visible and the slider is on screen, so on
   first load --ihs-odo-delay counts from when the slide can actually be
   seen, not from script start. After that it counts from each arrival
   (.is-entered), every time the slide comes back. */
.ihs-js .ihs-odo__strip {
	transform: translateY(0);
}

.ihs-js.is-ready .ihs-slide.is-entered .ihs-odo__strip {
	animation: ihs-odo-roll var(--ihs-odo-duration, 1100ms) linear var(--ihs-odo-delay, 400ms) both;
}

@keyframes ihs-odo-roll {
	0% { transform: translateY(0); animation-timing-function: cubic-bezier(0.5, 0, 0.25, 1); }
	70% { transform: translateY(-1.06em); animation-timing-function: ease-in-out; }
	87% { transform: translateY(-0.985em); animation-timing-function: ease-in-out; }
	100% { transform: translateY(-1em); }
}

.ihs-sr-only {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

@media (max-width: 767px) {
	.ihs-slide {
		align-items: stretch;
	}

	.ihs-inner {
		padding-inline: 24px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ihs-slider {
		--ihs-speed: 0ms; /* instant slide change */
	}

	/* No floating, no entrances, no odometer roll: everything static and visible. */
	.ihs-float,
	.ihs-js .ihs-slide .ihs-float[data-ihs-float-after-enter] {
		animation: none !important;
	}

	.ihs-js [data-ihs-enter],
	.ihs-js .ihs-slide.is-entered [data-ihs-enter] {
		opacity: 1 !important;
		transform: none !important;
		animation: none !important;
	}

	.ihs-shimmer {
		display: none !important;
		animation: none !important;
	}

	.ihs-js .ihs-slide .ihs-odo__strip {
		transform: translateY(-1em) !important;
		animation: none !important;
	}
}
