/* ==========================================================================
   AM Devices - Hero Banner  [am_hero_banner]
   Full-bleed background image + dark overlay. The transparent site header sits on top
   (body.am-has-hero, see am-header.css). Left: rotating title + text (bottom-to-up),
   dots, one button, feature row.
   ========================================================================== */

.am-hero {
	--am-hero-accent: #38cff0; /* button + icons */
	--am-hero-ink: #06101f;    /* overlay / button text */
	position: relative;
	display: flex;
	align-items: center;
	/* Full width even inside an Elementor container. --am-sbw = scrollbar width (am-hero-banner.js),
	   so the banner lines up with the header on desktops with a visible scrollbar. */
	width: calc(100vw - var(--am-sbw, 0px));
	max-width: none;
	min-height: clamp(580px, 92vh, 860px);
	margin-inline: calc(50% - (100vw - var(--am-sbw, 0px)) / 2);
	padding-block: calc(var(--am-header-h, 80px) + 56px) 72px;
	overflow: hidden;
	isolation: isolate;
	background: var(--am-hero-ink);
	color: #fff;
}

/* ---------- Background image + overlay ---------- */

.am-hero__bg {
	position: absolute;
	inset: 0;
	z-index: -2;
}

/* ".am-hero" prefix outranks Elementor's ".elementor img" reset */
.am-hero .am-hero__bg-img {
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	border-radius: 0;
	object-fit: cover;
	object-position: right center;
}

/* Dark on the left (text), clear on the right (products); darker at the top for the header */
.am-hero__overlay {
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(180deg, rgba(6, 16, 31, 0.65) 0%, rgba(6, 16, 31, 0) 26%),
		linear-gradient(90deg, rgba(6, 16, 31, 0.95) 0%, rgba(6, 16, 31, 0.85) 30%, rgba(6, 16, 31, 0.4) 58%, rgba(6, 16, 31, 0.05) 100%);
}

.am-hero__inner {
	width: 100%;
}

.am-hero__content {
	max-width: 720px;
}

/* ---------- Slides (stacked in one grid cell = height never jumps) ---------- */

.am-hero__slides {
	display: grid;
	margin-bottom: 24px;
}

.am-hero__slide {
	grid-area: 1 / 1;
	visibility: hidden;
}

.am-hero__slide.is-active,
.am-hero__slide.is-leaving {
	visibility: visible;
}

.am-hero__title {
	margin: 0 0 20px;
	color: #fff;
	font-size: clamp(30px, 3.4vw, 50px);
	font-weight: 700;
	line-height: 1.12;
	letter-spacing: -0.02em;
}

.am-hero__text {
	max-width: 600px;
	margin: 0;
	color: rgba(255, 255, 255, 0.78);
	font-size: 17px;
	line-height: 1.75;
}

/* Animate IN (bottom to up) - only after the first change, so the first slide paints instantly */
.am-hero.is-animating .am-hero__slide.is-active > * {
	animation: am-hero-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.am-hero.is-animating .am-hero__slide.is-active > :nth-child(2) {
	animation-delay: 0.12s;
}

/* Animate OUT (upwards) - keep in sync with OUT_TIME in am-hero-banner.js */
.am-hero__slide.is-leaving > * {
	animation: am-hero-out 0.45s cubic-bezier(0.55, 0, 0.75, 0.2) both;
}

/* ---------- Slide dots (pill = active) ---------- */

.am-hero__dots {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 34px;
}

.am-hero__dot {
	position: relative;
	width: 10px;
	height: 10px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.35);
	cursor: pointer;
	transition: width 0.3s ease, background-color 0.3s ease;
}

/* Bigger tap target than the visible dot */
.am-hero__dot::before {
	content: "";
	position: absolute;
	inset: -8px -4px;
}

.am-hero__dot:hover {
	background: rgba(255, 255, 255, 0.65);
}

.am-hero__dot.is-active {
	width: 28px;
	background: var(--am-hero-accent);
}

/* ---------- Button: shine sweep + pulse ring + nudging arrow ---------- */

.am-hero__btn {
	position: relative;
	isolation: isolate; /* shine (z-index: -1) sits above the background, below the text */
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: 56px;
	padding: 0 32px;
	overflow: hidden;
	border-radius: 6px;
	background: var(--am-hero-accent);
	color: var(--am-hero-ink);
	font-family: var(--am-font-heading);
	font-size: 16px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	animation: am-hero-btn-pulse 2.4s ease-out infinite;
	transition: background-color 0.2s, color 0.2s, transform 0.25s ease;
}

.am-hero__btn::before {
	content: "";
	position: absolute;
	top: 0;
	left: -60%;
	z-index: -1;
	width: 45%;
	height: 100%;
	background: linear-gradient(110deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0));
	transform: skewX(-20deg);
	animation: am-hero-btn-shine 3.6s ease-in-out infinite;
}

.am-hero__btn:hover,
.am-hero__btn:focus-visible {
	background: #fff;
	color: var(--am-hero-ink);
	transform: translateY(-3px);
	animation-play-state: paused;
}

.am-hero__arrow {
	animation: am-hero-arrow 1.6s ease-in-out infinite;
}

.am-hero__btn:hover .am-hero__arrow {
	animation: none;
	transform: translateX(5px);
	transition: transform 0.2s;
}

/* ---------- Feature row ---------- */

.am-hero__features {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 0;
	margin: 44px 0 0;
	padding: 0;
	list-style: none;
}

.am-hero__feature {
	display: flex;
	align-items: center;
	gap: 12px;
	padding-inline: 22px;
	border-left: 1px solid rgba(255, 255, 255, 0.18);
	color: rgba(255, 255, 255, 0.88);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
}

.am-hero__feature:first-child {
	padding-left: 0;
	border-left: 0;
}

.am-hero__feature-icon {
	flex: 0 0 auto;
	color: var(--am-hero-accent);
}

/* ---------- Keyframes ---------- */

@keyframes am-hero-in {
	from {
		opacity: 0;
		transform: translateY(48px);
		filter: blur(6px);
	}

	to {
		opacity: 1;
		transform: none;
		filter: none;
	}
}

@keyframes am-hero-out {
	to {
		opacity: 0;
		transform: translateY(-32px);
		filter: blur(4px);
	}
}

@keyframes am-hero-btn-shine {
	0% {
		left: -60%;
	}

	35%,
	100% {
		left: 130%;
	}
}

@keyframes am-hero-btn-pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(56, 207, 240, 0.45);
	}

	70%,
	100% {
		box-shadow: 0 0 0 14px rgba(56, 207, 240, 0);
	}
}

@keyframes am-hero-arrow {
	50% {
		transform: translateX(4px);
	}
}

/* ---------- Responsive ---------- */

/* Tablet: overlay covers more of the image */
@media (max-width: 1024px) {
	.am-hero {
		min-height: clamp(540px, 80vh, 760px);
	}

	.am-hero__overlay {
		background:
			linear-gradient(180deg, rgba(6, 16, 31, 0.65) 0%, rgba(6, 16, 31, 0) 26%),
			linear-gradient(90deg, rgba(6, 16, 31, 0.95) 0%, rgba(6, 16, 31, 0.85) 45%, rgba(6, 16, 31, 0.5) 80%, rgba(6, 16, 31, 0.3) 100%);
	}
}

/* Mobile: even dark overlay over the whole image, products peek through */
@media (max-width: 767px) {
	.am-hero {
		min-height: 0;
		padding-block: calc(var(--am-header-h, 66px) + 40px) 56px;
	}

	.am-hero .am-hero__bg-img {
		object-position: 70% center;
	}

	.am-hero__overlay {
		background: linear-gradient(180deg, rgba(6, 16, 31, 0.8) 0%, rgba(6, 16, 31, 0.86) 55%, rgba(6, 16, 31, 0.94) 100%);
	}

	.am-hero__text {
		font-size: 16px;
	}

	.am-hero__dots {
		margin-bottom: 28px;
	}

	.am-hero__features {
		margin-top: 36px;
	}
}

@media (max-width: 575px) {
	.am-hero__btn {
		width: 100%;
	}

	/* One feature per line, no dividers */
	.am-hero__features {
		flex-direction: column;
		align-items: flex-start;
		gap: 14px;
	}

	.am-hero__feature {
		padding-inline: 0;
		border-left: 0;
	}
}

/* No movement: no auto-rotation (handled in JS), no button effects */
@media (prefers-reduced-motion: reduce) {
	.am-hero__slide > *,
	.am-hero__btn,
	.am-hero__btn::before,
	.am-hero__arrow {
		animation: none !important;
	}

	.am-hero__btn::before {
		display: none;
	}

	.am-hero__btn,
	.am-hero__dot {
		transition: none;
	}
}

/* Stops the 100vw breakout from adding a horizontal scrollbar (clip keeps the sticky header working) */
body {
	overflow-x: clip;
}
