/*
 * Skinshare Home Hero: rotator + promo slide.
 *
 * Everything is scoped under .ss-hero / .ss-promo. Typography comes from the theme
 * (Lato, loaded at 400 and 700 only, so nothing here asks for a heavier weight).
 * The promo slide mirrors the existing Spectra hero's measurements: 30px vertical
 * padding, a 1024px inner width, 50/50 columns, stacking at 767px and below.
 */

/* ---------- Rotator ---------- */

.ss-hero {
	position: relative;
	width: 100%;
}

.ss-hero *,
.ss-hero *::before,
.ss-hero *::after {
	box-sizing: border-box;
}

/* All slides share one grid cell, so the box takes the tallest slide's height. */
.ss-hero__track {
	display: grid;
}

.ss-hero__slide {
	grid-area: 1 / 1;
	display: flex;
	min-width: 0;
	transition: opacity 0.6s ease, visibility 0.6s ease;
}

/* Each slide's own background fills the shared height. */
.ss-hero__slide > * {
	flex: 1 1 auto;
	min-width: 0;
}

.ss-hero__slide:not(.is-active) {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

/* Controls sit in the slides' bottom padding. */
.ss-hero__controls {
	position: absolute;
	left: 50%;
	bottom: 4px;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	gap: 2px;
	z-index: 2;
}

.ss-hero__controls[hidden] {
	display: none;
}

.ss-hero__dots {
	display: flex;
	gap: 2px;
}

.ss-hero button.ss-hero__dot,
.ss-hero button.ss-hero__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	color: #37322e;
	line-height: 1;
	cursor: pointer;
}

.ss-hero__dot span {
	display: block;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	border: 1.5px solid #37322e;
	background: transparent;
	transition: background-color 0.2s ease;
}

.ss-hero__dot[aria-current="true"] span {
	background: #37322e;
}

.ss-hero__toggle svg {
	width: 11px;
	height: 11px;
	fill: currentColor;
}

.ss-hero__icon-play,
.ss-hero.is-paused .ss-hero__icon-pause {
	display: none;
}

.ss-hero.is-paused .ss-hero__icon-play {
	display: block;
}

.ss-hero button.ss-hero__dot:focus-visible,
.ss-hero button.ss-hero__toggle:focus-visible {
	outline: 2px solid #37322e;
	outline-offset: 1px;
}

.ss-hero.is-static .ss-hero__slide {
	transition: none;
}

@media (prefers-reduced-motion: reduce) {
	.ss-hero__slide {
		transition: none;
	}
}

/* ---------- Promo slide ---------- */

.ss-promo {
	--ss-promo-red: #a44135;
	--ss-promo-ink: #37322e;
	--ss-promo-gold: #d89a2e;
	--ss-promo-bg: #f2ede5;

	display: flex;
	align-items: center;
	justify-content: center;
	padding: 30px 10px;
	background-color: var(--ss-promo-bg);
	color: var(--ss-promo-ink);
}

.ss-promo__inner {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 20px;
	width: 100%;
	max-width: 1024px;
}

.ss-promo__copy,
.ss-promo__media {
	width: 100%;
	max-width: 50%;
	padding: 8px;
}

.ss-promo__media {
	padding: 10px;
}

.ss-promo__copy {
	text-align: center;
}

.ss-promo .ss-promo__eyebrow {
	margin: 0 0 6px;
	font-size: var(--wp--preset--font-size--small, 13px);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.ss-promo .ss-promo__title {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 0;
	padding: 0;
	font-weight: 700;
	line-height: 1;
	color: var(--ss-promo-ink);
}

.ss-promo__headline {
	font-size: clamp(64px, 9.2vw, 104px);
	letter-spacing: -0.02em;
	color: var(--ss-promo-red);
}

.ss-promo__offer {
	margin-top: 0.12em;
	font-size: clamp(30px, 4.1vw, 46px);
	letter-spacing: 0.01em;
}

.ss-promo .ss-promo__terms {
	margin: 10px 0 18px;
	font-size: var(--wp--preset--font-size--medium, 20px);
}

.ss-promo__actions {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 12px;
}

/* Dark text on the banner's mustard: white on #d89a2e is only ~2.4:1 contrast. */
.ss-promo button.ss-promo__code {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	margin: 0;
	padding: 8px 10px 8px 20px;
	border: 0;
	border-radius: 999px;
	background: var(--ss-promo-gold);
	box-shadow: none;
	color: var(--ss-promo-ink);
	font-family: inherit;
	font-size: 17px;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	cursor: pointer;
}

.ss-promo button.ss-promo__code strong {
	font-weight: 700;
	letter-spacing: 0.03em;
}

.ss-promo__code-hint {
	padding: 4px 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.55);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.ss-promo button.ss-promo__code:hover .ss-promo__code-hint,
.ss-promo button.ss-promo__code.is-copied .ss-promo__code-hint {
	background: #fff;
}

.ss-promo button.ss-promo__code:focus-visible {
	outline: 2px solid var(--ss-promo-ink);
	outline-offset: 2px;
}

.ss-promo .ss-promo__buttons {
	margin: 0;
}

.ss-promo .ss-promo__buttons .wp-block-button__link {
	text-transform: uppercase;
}

.ss-promo__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.ss-promo picture {
	display: block;
}

.ss-promo img.ss-promo__img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 10px;
}

/* Stack at the same breakpoint as the Spectra hero. */
@media (max-width: 767px) {
	.ss-promo__inner {
		flex-wrap: wrap;
		max-width: 767px;
	}

	.ss-promo__copy,
	.ss-promo__media {
		max-width: 100%;
	}

	/* The existing hero is the taller slide when stacked; bigger type uses that room. */
	.ss-promo__headline {
		font-size: clamp(76px, 24vw, 104px);
	}

	.ss-promo__offer {
		font-size: clamp(34px, 10vw, 44px);
	}

	.ss-promo .ss-promo__terms {
		margin: 12px 0 20px;
		font-size: 18px;
	}
}
