/* =============================================================================
 * Section — Three-product showcase (Accueil)
 * Editorial sage-on-cream grid. Three cards on desktop, stacks on mobile.
 * ========================================================================== */

.exspa-products {
	position: relative;
	background: var(--exspa-cream, #F5F1E8);
	color: var(--exspa-sage-deep, #2A3325);
	padding: clamp(96px, 12vw, 180px) clamp(24px, 5vw, 80px);
	font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* -----------------------------------------------------------------------------
 * Smooth text reveal — JS splits the heading/lede/name into .word spans with
 * a staggered --word-delay, then adds .is-text-revealed once the element
 * enters the viewport. Cascading fade-up replaces the old price counter.
 * -------------------------------------------------------------------------- */
.exspa-products__heading,
.exspa-products__lede,
.exspa-products__name {
	overflow: hidden;
	padding-bottom: 4px; /* room for translateY before reveal */
}
.exspa-products__heading .word,
.exspa-products__lede .word,
.exspa-products__name .word {
	display: inline-block;
	opacity: 0;
	transform: translateY(110%);
	transition: opacity 850ms cubic-bezier(0.22, 1, 0.36, 1),
	            transform 850ms cubic-bezier(0.22, 1, 0.36, 1);
	transition-delay: var(--word-delay, 0s);
	will-change: opacity, transform;
}
.exspa-products__lede .word { transform: translateY(20px); }
.exspa-products__heading.is-text-revealed .word,
.exspa-products__lede.is-text-revealed .word,
.exspa-products__name.is-text-revealed .word {
	opacity: 1;
	transform: translateY(0);
}

.exspa-products__header {
	max-width: 1320px;
	margin: 0 auto clamp(64px, 8vw, 120px);
	text-align: center;
}

.exspa-products__eyebrow {
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.32em;
	text-transform: uppercase;
	margin: 0 0 28px;
	color: var(--exspa-sage, #3F4D38);
	opacity: 0.85;
	display: inline-flex;
	align-items: center;
	gap: 14px;
}
.exspa-products__eyebrow::before {
	content: '';
	display: inline-block;
	width: 28px;
	height: 1px;
	background: var(--exspa-gold, #8B6F3D);
	opacity: 0.85;
	transform: translateY(-1px);
}

.exspa-products__heading {
	font-family: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
	font-size: clamp(32px, 5vw, 64px);
	font-weight: 400;
	line-height: 1.1;
	letter-spacing: -0.01em;
	margin: 0;
	color: var(--exspa-sage-deep, #2A3325);
	max-width: 18ch;
	margin-inline: auto;
}

.exspa-products__heading em {
	font-style: italic;
	color: var(--exspa-sage, #3F4D38);
}

.exspa-products__grid {
	max-width: 1320px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(24px, 4vw, 48px);
}

/* -----------------------------------------------------------------------------
 * Card
 * -------------------------------------------------------------------------- */
.exspa-products__card {
	display: flex;
	flex-direction: column;
	gap: 28px;
	background: transparent;
	transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
	will-change: transform;
}
.exspa-products__card:hover {
	transform: translateY(-4px);
}

.exspa-products__media {
	display: block;
	position: relative;
	width: 100%;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	background: var(--exspa-sage, #3F4D38);
}

.exspa-products__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 800ms cubic-bezier(0.22, 1, 0.36, 1);
}

.exspa-products__card:hover .exspa-products__media img {
	transform: scale(1.04);
}

/* -----------------------------------------------------------------------------
 * Body
 * -------------------------------------------------------------------------- */
.exspa-products__body {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.exspa-products__tag {
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	color: var(--exspa-sage, #3F4D38);
	margin: 0;
	opacity: 0.7;
}

.exspa-products__name {
	font-family: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
	font-size: clamp(26px, 2.4vw, 34px);
	font-weight: 400;
	line-height: 1.15;
	margin: 0;
	letter-spacing: -0.005em;
}

.exspa-products__name a {
	color: inherit;
	text-decoration: none;
	background-image: linear-gradient(currentColor, currentColor);
	background-position: 0 100%;
	background-size: 0 1px;
	background-repeat: no-repeat;
	transition: background-size 400ms ease;
}

.exspa-products__name a:hover {
	background-size: 100% 1px;
}

.exspa-products__lede {
	font-size: 17px;
	line-height: 1.6;
	color: var(--exspa-sage-deep, #2A3325);
	opacity: 0.78;
	margin: 0;
	max-width: 36ch;
}

/* -----------------------------------------------------------------------------
 * Specs (capacity + price)
 * -------------------------------------------------------------------------- */
.exspa-products__specs {
	margin: 12px 0 4px;
	padding: 20px 0 0;
	border-top: 1px solid rgba(42, 51, 37, 0.15);
	display: flex;
	justify-content: space-between;
	gap: 24px;
}

.exspa-products__spec dt {
	font-size: 10px;
	font-weight: 500;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--exspa-sage, #3F4D38);
	opacity: 0.6;
	margin: 0 0 6px;
}

.exspa-products__spec dd {
	margin: 0;
	font-size: 17px;
	font-weight: 500;
	color: var(--exspa-sage-deep, #2A3325);
}

.exspa-products__spec:last-child {
	text-align: right;
}

.exspa-products__price {
	font-family: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
	font-size: 24px;
	font-weight: 500;
	display: block;
	line-height: 1;
	color: var(--exspa-sage-deep, #2A3325);
}

.exspa-products__unit {
	display: block;
	font-size: 11px;
	font-weight: 400;
	letter-spacing: 0.04em;
	color: var(--exspa-sage, #3F4D38);
	opacity: 0.7;
	margin-top: 4px;
}

/* -----------------------------------------------------------------------------
 * Card CTA — editorial sweep-fill button
 *
 * Idle:  warm-black solid with cream type, hairline gold underline accent.
 * Hover: gold sweep wipes in from left-to-right beneath the type, the
 *        button lifts 2px, the arrow advances and its tail elongates,
 *        the shadow deepens to ground the lift.
 * Active: 0.99 scale for tactile press feel.
 * Focus: 2px gold outline (visible for keyboard users).
 *
 * Per ui-ux-pro-max: 56px height (≥44px target), transform/opacity-only
 * motion, 220-320ms timings, contrast cream-on-warm-black ≈ 13:1 (AAA),
 * `prefers-reduced-motion` collapses the sweep to a simple color change.
 * -------------------------------------------------------------------------- */
.exspa-products__cta {
	/* Layout */
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	min-height: 56px;
	padding: 18px 26px;
	margin-top: 12px;

	/* Typography */
	font-family: 'Inter', system-ui, -apple-system, sans-serif;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	text-decoration: none;

	/* Surface */
	background: var(--exspa-sage-deep, #2B2522);
	color: var(--exspa-cream, #EFE8DA);
	border: 1px solid var(--exspa-sage-deep, #2B2522);
	border-radius: 0; /* squared — editorial, not rounded SaaS */
	box-shadow: 0 1px 0 rgba(43, 37, 34, 0.06);
	cursor: pointer;

	/* Stacking context for the sweep pseudo */
	position: relative;
	overflow: hidden;
	isolation: isolate;

	/* Animations */
	transition:
		transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
		box-shadow 320ms cubic-bezier(0.22, 1, 0.36, 1),
		border-color 320ms ease,
		color 280ms ease;
	will-change: transform;
}

/* Gold sweep — sits beneath the text, wipes left → right on hover */
.exspa-products__cta::before {
	content: '';
	position: absolute;
	inset: 0;
	background: var(--exspa-gold, #8B6F3D);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 520ms cubic-bezier(0.65, 0, 0.35, 1);
	z-index: -1;
}

/* Hairline accent under the type — a tiny editorial signature */
.exspa-products__cta::after {
	content: '';
	position: absolute;
	left: 26px;
	bottom: 14px;
	width: 20px;
	height: 1px;
	background: var(--exspa-gold, #8B6F3D);
	opacity: 0.65;
	transition: width 420ms cubic-bezier(0.22, 1, 0.36, 1), opacity 220ms ease;
}

/* Label sits on its own row of the flex so the arrow can move freely */
.exspa-products__cta > :first-child,
.exspa-products__cta svg {
	position: relative;
	z-index: 1; /* above the sweep */
}

/* Arrow icon */
.exspa-products__cta svg {
	flex-shrink: 0;
	transition:
		transform 360ms cubic-bezier(0.22, 1, 0.36, 1),
		opacity 240ms ease;
	will-change: transform;
}

/* --- HOVER ----------------------------------------------------------------- */
.exspa-products__cta:hover {
	transform: translateY(-2px);
	border-color: var(--exspa-gold, #8B6F3D);
	color: var(--exspa-cream, #EFE8DA);
	box-shadow:
		0 10px 24px -12px rgba(43, 37, 34, 0.35),
		0 2px 6px -2px rgba(139, 111, 61, 0.25);
}
.exspa-products__cta:hover::before {
	transform: scaleX(1);
}
.exspa-products__cta:hover::after {
	width: 44px;
	opacity: 1;
	background: var(--exspa-cream, #EFE8DA);
}
.exspa-products__cta:hover svg {
	transform: translateX(6px);
}

/* --- ACTIVE (press) -------------------------------------------------------- */
.exspa-products__cta:active {
	transform: translateY(-1px) scale(0.99);
	transition-duration: 80ms;
}

/* --- FOCUS (keyboard only) ------------------------------------------------- */
.exspa-products__cta:focus-visible {
	outline: 2px solid var(--exspa-gold, #8B6F3D);
	outline-offset: 3px;
}

/* --- REDUCED MOTION -------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.exspa-products__cta,
	.exspa-products__cta::before,
	.exspa-products__cta::after,
	.exspa-products__cta svg {
		transition-duration: 60ms !important;
	}
	/* Skip the sweep entirely — flip background instantly instead */
	.exspa-products__cta:hover::before {
		transform: scaleX(1);
		transition: none;
	}
	.exspa-products__cta:hover {
		transform: none;
	}
}

/* --- MOBILE TUNING --------------------------------------------------------- */
@media (max-width: 540px) {
	.exspa-products__cta {
		min-height: 52px;
		padding: 16px 22px;
		font-size: 11.5px;
		letter-spacing: 0.2em;
	}
	.exspa-products__cta::after {
		left: 22px;
		bottom: 12px;
	}
}

/* -----------------------------------------------------------------------------
 * Mobile
 * -------------------------------------------------------------------------- */
@media (max-width: 900px) {
	.exspa-products__grid {
		grid-template-columns: 1fr;
		gap: 64px;
	}
	.exspa-products__heading {
		font-size: clamp(28px, 7vw, 40px);
	}
}

@media (max-width: 540px) {
	.exspa-products {
		padding: 80px 20px 96px;
	}
	.exspa-products__header {
		margin-bottom: 56px;
	}
	.exspa-products__media {
		aspect-ratio: 4 / 5;
	}
}

@media (prefers-reduced-motion: reduce) {
	.exspa-products__media img,
	.exspa-products__cta,
	.exspa-products__cta svg,
	.exspa-products__name a {
		transition: none;
	}
}
