/* ==========================================================================
   Startuds - Hero
   Loaded only on the front page, and only when the hero is enabled.
   ========================================================================== */

.st-hero {
	position: relative;
	overflow: hidden;
	background: var(--st-bg-alt);
}

.st-hero__track {
	position: relative;
	display: flex;
}

/* --- Slides --------------------------------------------------------------- */

.st-hero__slide {
	position: relative;
	flex: 0 0 100%;
	width: 100%;
	display: none;
}

.st-hero__slide.is-active {
	display: block;
}

/* Single-slide heroes need no slider machinery at all. */
.st-hero:not(.st-hero--slider) .st-hero__slide {
	display: block;
}

/* --- Background image and overlay ---------------------------------------- */

.st-hero__bg {
	position: absolute;
	inset: 0;
	z-index: 1;
}

.st-hero__bg .st-ratio,
.st-hero__bg .st-placeholder {
	width: 100%;
	height: 100%;
	padding-top: 0;
}

.st-hero__bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.st-hero__overlay {
	position: absolute;
	inset: 0;
	background: var(--st-hero-overlay, rgba(17, 20, 24, .2));
}

/* --- Content ------------------------------------------------------------- */

.st-hero__content {
	position: relative;
	z-index: 2;
	max-width: 620px;
}

.st-hero--align-center .st-hero__content {
	margin-inline: auto;
	text-align: center;
}

.st-hero--align-right .st-hero__content {
	margin-left: auto;
	text-align: right;
}

.st-hero__eyebrow {
	display: block;
	margin-bottom: 14px;
	font-family: var(--st-font-heading);
	font-size: var(--st-size-small);
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	opacity: .85;
}

.st-hero__heading {
	margin: 0 0 18px;
	font-size: var(--st-size-h1);
	line-height: 1.08;
}

.st-hero__subtext {
	margin: 0 0 28px;
	font-size: 17px;
	opacity: .9;
}

.st-hero__btn {
	margin-top: 4px;
}

/* --- Layout: split ------------------------------------------------------- */

.st-hero--split .st-hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 32px;
	align-items: center;
	padding-block: 46px;
}

.st-hero--split .st-hero__media .st-ratio {
	border-radius: var(--st-radius-card);
}

/* --- Layout: overlay ----------------------------------------------------- */

.st-hero--overlay .st-hero__slide {
	display: flex;
	align-items: center;
	min-height: var(--st-hero-height-mobile, 420px);
	padding-block: 50px;
}

.st-hero--overlay .st-hero__slide:not(.is-active) {
	display: none;
}

/* --- Layout: boxed ------------------------------------------------------- */

.st-hero--boxed .st-hero__slide {
	padding-block: 30px;
}

.st-hero--boxed .st-hero__box {
	position: relative;
	display: flex;
	align-items: center;
	min-height: var(--st-hero-height-mobile, 420px);
	padding: 40px 28px;
	overflow: hidden;
	border-radius: var(--st-radius-card);
}

/* --- Slider controls ----------------------------------------------------- */

.st-hero__arrow {
	position: absolute;
	top: 50%;
	z-index: 5;
	display: none;
	width: 46px;
	height: 46px;
	padding: 0;
	transform: translateY(-50%);
	border: 0;
	border-radius: 50%;
	background: var(--st-overlay-glass);
	color: var(--st-dark);
}

.st-hero__arrow:hover {
	background: var(--st-primary);
	color: var(--st-on-primary);
}

.st-hero__arrow--prev { left: 16px; }
.st-hero__arrow--next { right: 16px; }

.st-hero--slider .st-hero__arrow {
	display: flex;
	align-items: center;
	justify-content: center;
}

.st-hero__dots {
	position: absolute;
	bottom: 18px;
	left: 0;
	right: 0;
	z-index: 5;
	display: flex;
	gap: 10px;
	justify-content: center;
}

.st-hero__dot {
	width: 11px;
	height: 11px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--st-on-dark-faint);
	transition: background var(--st-transition), transform var(--st-transition);
}

.st-hero__dot.is-active {
	background: var(--st-primary);
	transform: scale(1.25);
}

/* --- Tablet and up ------------------------------------------------------- */

@media (min-width: 783px) {

	.st-hero--split .st-hero__grid {
		grid-template-columns: 1fr 1fr;
		gap: 50px;
		min-height: var(--st-hero-height, 620px);
		padding-block: 0;
	}

	.st-hero--split.st-hero--align-right .st-hero__media {
		order: -1;
	}

	.st-hero--overlay .st-hero__slide,
	.st-hero--boxed .st-hero__box {
		min-height: var(--st-hero-height, 620px);
	}

	.st-hero--boxed .st-hero__box {
		padding: 60px 56px;
	}

	.st-hero__subtext {
		font-size: 18px;
	}
}

/* --- Transparent header sits over the hero ------------------------------- */

.st-header.is-transparent {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	background: transparent;
	border-bottom-color: transparent;
}

.st-header.is-transparent .st-logo__text,
.st-header.is-transparent .st-menu > li > a,
.st-header.is-transparent .st-action,
.st-header.is-transparent .st-burger {
	color: var(--st-on-dark);
}

@media (prefers-reduced-motion: reduce) {
	.st-hero__dot,
	.st-hero__arrow {
		transition: none;
	}
}

/* ==========================================================================
   ROUND 2: hero placeholder + small-screen safety
   ==========================================================================
   The hero background slot uses the shared `.st-placeholder` empty state
   (styled in style.css section 11.5: token gradient, faint hatch, centred
   proportional icon, very slow shimmer). Here it only needs to fill the slot
   and keep its icon modest at hero scale, so a store with no hero image never
   shows a bare grey field behind the headline. ---------------------------- */

.st-hero__bg .st-placeholder,
.st-hero .st-hero__media .st-placeholder {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	padding-top: 0;
}

.st-hero__bg .st-placeholder svg,
.st-hero .st-hero__media .st-placeholder svg {
	width: clamp(40px, 9vw, 96px);
	max-width: 96px;
	opacity: .3;
}

/* The hero is the widest thing on the page, so it is the likeliest source of
   a horizontal scrollbar on a phone. */
.st-hero,
.st-hero__track,
.st-hero__slide,
.st-hero__content {
	max-width: 100%;
	min-width: 0;
}

@media (max-width: 767px) {

	.st-hero__content {
		width: 100%;
		max-width: 100%;
	}

	/* Hero controls must be real tap targets, and must not overlap the copy. */
	.st-hero__arrow,
	.st-hero__dot {
		min-width: var(--st-tap-target);
		min-height: var(--st-tap-target);
	}

	.st-hero__dots {
		display: flex;
		flex-wrap: wrap;
		gap: 6px;
		justify-content: center;
	}
}
