/* Sololab redesign — Hero section (source: Figma "Solo Lab", frame 1440, node 923:2484) */

/* Registering --stack as a typed number is what makes it interpolate smoothly —
   an unregistered custom property jumps instantly, so transitions on calc(var(--stack)...)
   would otherwise snap instead of animating (this was the cause of the stack "jitter"). */
@property --stack {
	syntax: '<number>';
	inherits: true;
	initial-value: 0;
}

.sl-redesign-page {
	/* Shared by the card stack + photo crossfade so a slide change reads as
	   one coordinated move instead of two things animating at slightly
	   different speeds/curves. */
	--sl-transition-duration: 0.7s;
	--sl-transition-ease: cubic-bezier(0.16, 1, 0.3, 1);
	margin: 0;
	background: #ebebf1;
	font-family: 'Inter Tight', sans-serif;
	-webkit-font-smoothing: antialiased;
}

.sl-redesign * {
	box-sizing: border-box;
}

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

/* Photo sits in normal flow, right after the header content —
   never overlaps the title/subtitle regardless of how tall they wrap. */
.sl-hero__photo {
	position: relative;
	width: 100%;
	height: clamp(280px, 32vw, 500px);
	background: #ebebf1;
	overflow: hidden;
}

.sl-hero__bg-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	opacity: 0;
	transition: opacity var(--sl-transition-duration) var(--sl-transition-ease);
}

.sl-hero__bg-img.is-active {
	opacity: 1;
}

.sl-hero__topbar {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 32px 60px;
	backdrop-filter: blur(6px);
	background: rgba(17, 17, 17, 0.05);
}

.sl-pill {
	display: flex;
	align-items: center;
	gap: 16px;
	background: #fff;
	border-radius: 8px;
	padding: 12px 20px;
	text-decoration: none;
	opacity: 1;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sl-pill.is-hidden {
	opacity: 0;
	visibility: hidden;
}

.sl-pill.is-updating {
	opacity: 0;
}

.sl-pill__cat {
	color: rgba(31, 31, 31, 0.4);
	font-size: 16px;
	letter-spacing: -0.32px;
}

.sl-pill__name {
	color: #1f1f1f;
	font-size: 16px;
	font-weight: 500;
	letter-spacing: -0.32px;
	margin-left: 8px;
}

.sl-contacts {
	display: flex;
	align-items: center;
	gap: 24px;
}

.sl-contacts__status {
	display: flex;
	align-items: center;
	gap: 6px;
	color: rgba(255, 255, 255, 0.5);
	font-size: 16px;
	letter-spacing: -0.32px;
}

.sl-contacts__link {
	display: flex;
	align-items: center;
	gap: 6px;
	color: #fff;
	font-size: 16px;
	letter-spacing: -0.32px;
	text-decoration: none;
}

.sl-hero__inner {
	position: relative;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 40px;
	padding: 60px;
}

.sl-hero__left {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 40px;
	padding: 40px 0;
	max-width: 710px;
}

.sl-hero__logo {
	position: relative;
	width: 120px;
	height: 32.6px;
}

.sl-hero__logo-fallback {
	display: block;
	width: 100%;
	height: 100%;
}

/* Empty until lottie-web injects the animated SVG (hero.js) — sits on top of
   the static fallback so the logo stays visible even if the script fails. */
.sl-hero__logo-lottie {
	position: absolute;
	inset: 0;
}

.sl-hero__logo-lottie svg {
	display: block;
}

.sl-hero__title {
	margin: 0;
	color: #000;
	font-size: 64px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: -1.28px;
}

.sl-hero__title span {
	display: block;
}

.sl-hero__subtitle {
	margin: 12px 0 0;
	color: #111;
	opacity: 0.7;
	font-size: 20px;
	font-weight: 400;
	letter-spacing: -0.4px;
	line-height: 1.4;
}

.sl-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	border: 0;
	border-radius: 7px;
	font-family: inherit;
	font-weight: 600;
	font-size: 20px;
	letter-spacing: -0.4px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	cursor: pointer;
}

.sl-btn--dark {
	background: #1f1f1f;
	color: #fff;
	gap: 12px;
	padding-left: 16px;
}

.sl-btn--dark .sl-btn__arrow img {
	display: block;
	height: 60px;
	width: auto;
}

.sl-btn--light {
	background: #fff;
	color: #1f1f1f;
	padding: 16px 32px;
	width: 100%;
}

/* Secondary — used for the in-card CTA. Card body is light (#f5f5fb), so
   this needed to be its own variant rather than reusing --dark or --light:
   a mid grey reads clearly against the card without competing with the
   hero's black primary button. */
.sl-btn--secondary {
	background: #d1d1d8;
	color: #000;
	width: 100%;
	padding: 16px 32px;
}

.sl-hero__right {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	width: 100%;
	max-width: 542px;
	flex-shrink: 0;
}

.sl-slider {
	position: relative;
	width: 100%;
	height: 522px;
	perspective: 1400px;
}

/* Cards form a physical deck: --stack is each card's distance from the
   active one (0 = front), set in JS from a plain circular offset. Every
   card reacts to the same formula, so changing --stack alone animates
   the whole reshuffle — the outgoing card recedes to the back of the
   deck instead of just disappearing, the rest steps forward one slot. */
.sl-card {
	--stack: 0;
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	width: 100%;
	height: 522px;
	padding: 32px;
	border-radius: 10px;
	background: #f5f5fb;
	border: 1px solid rgba(255, 255, 255, 0.5);
	color: #1f1f1f;
	/* Anchored on the right edge so scale() shrinks the card toward its hidden
	   (left) side — the right edge, where the peek needs to show, stays put and
	   only moves by the translate below, instead of the shrink eating the peek. */
	transform-origin: 100% 50%;
	transform:
		translate(calc(var(--stack) * 8px), calc(var(--stack) * 3px))
		scale(calc(1 - var(--stack) * 0.035));
	box-shadow: 0 20px 32px rgba(0, 0, 0, 0.15);
	z-index: calc(20 - var(--stack));
	transition: transform var(--sl-transition-duration) var(--sl-transition-ease);
	pointer-events: none;
}

.sl-card.is-active {
	pointer-events: auto;
}

.sl-card__body {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.sl-card__eyebrow {
	margin: 0;
	opacity: 0.7;
	font-size: 20px;
	font-weight: 500;
	letter-spacing: -0.4px;
}

.sl-card__title {
	margin: 0;
	font-size: 40px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: -0.8px;
}

.sl-card__desc {
	margin: 0;
	opacity: 0.7;
	font-size: 16px;
	font-weight: 400;
	letter-spacing: -0.32px;
	line-height: 1.4;
}

.sl-card__index {
	position: absolute;
	top: 0;
	right: 0;
	opacity: 0.18;
	font-size: 20px;
	font-weight: 500;
	letter-spacing: -0.64px;
}

.sl-slider__controls {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 0 16px;
	gap: 16px;
}

.sl-slider__arrows {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-shrink: 0;
}

.sl-slider__arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 999px;
	background: #fff;
	padding: 0;
	cursor: pointer;
}

.sl-slider__arrow--next img {
	transform: scaleX(-1);
}

.sl-slider__nav {
	--sl-slide-duration: 3s;
	display: flex;
	gap: 4px;
	width: 100%;
	max-width: 250px;
}

/* White + mix-blend-mode:difference so the pagination stays readable
   over any photo/card content behind it, regardless of brightness. */
.sl-slider__dot {
	position: relative;
	flex: 1;
	height: 2px;
	border: 0;
	padding: 0;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.35);
	mix-blend-mode: difference;
	cursor: pointer;
	overflow: hidden;
}

.sl-slider__dot-fill {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	width: 0%;
	border-radius: 8px;
	background: #fff;
	mix-blend-mode: difference;
}

.sl-slider__dot.is-active .sl-slider__dot-fill {
	width: 100%;
}

.sl-slider__dot-fill.is-filling {
	animation: sl-fill var(--sl-slide-duration) linear forwards;
}

.sl-slider__nav.is-paused .sl-slider__dot-fill.is-filling {
	animation-play-state: paused;
}

@keyframes sl-fill {
	from { width: 0%; }
	to { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.sl-slider__dot-fill.is-filling {
		animation: none;
		width: 100%;
	}
	.sl-card,
	.sl-hero__bg-img,
	.sl-pill {
		transition-duration: 0.01ms;
	}
}

/* --- Responsive: 1024 still a placeholder, 375 matches Figma frame 923:2911 --- */
@media (max-width: 1023px) {
	.sl-hero__inner {
		flex-direction: column;
		align-items: stretch;
	}
	.sl-hero__left {
		max-width: none;
	}
	.sl-hero__right {
		max-width: none;
	}
}

@media (max-width: 599px) {
	/* Pill sits above the contacts strip (column, not the desktop row) and both
	   go tighter/smaller — matches frame 923:2911, not a scaled-down desktop. */
	.sl-hero__topbar {
		flex-direction: column;
		align-items: center;
		gap: 12px;
		padding: 16px 20px;
	}

	.sl-pill,
	.sl-pill__cat,
	.sl-pill__name {
		font-size: 14px;
	}

	.sl-contacts {
		width: 100%;
		justify-content: space-between;
		gap: 12px;
		padding: 12px 16px;
		border-radius: 8px;
		background: rgba(255, 255, 255, 0.1);
	}

	.sl-contacts__status,
	.sl-contacts__link {
		font-size: 14px;
	}

	/* flex/negative-margin combo turned out unreliable for "fill to the
	   bottom of the viewport" (photo rendered too short) — hero.js measures
	   the actual space instead and sets .sl-hero__photo's height directly,
	   redone on load/resize and on every card change (card text length
	   changes .sl-hero__inner's height, which is what was causing the photo
	   to jump). This min-height is just the pre-JS/no-JS fallback. */
	.sl-hero__photo {
		min-height: 500px;
	}

	/* Sits above the photo (z-index) so the negative margin below can pull the
	   photo up behind the card without the card itself getting covered. */
	.sl-hero__inner {
		position: relative;
		z-index: 2;
		padding: 20px;
		gap: 32px;
	}

	.sl-hero__left {
		gap: 24px;
		padding: 0;
	}

	.sl-hero__logo {
		width: 80px;
		height: 21.76px;
	}

	.sl-hero__title {
		font-size: 36px;
		letter-spacing: -0.72px;
	}

	.sl-hero__subtitle {
		margin-top: 8px;
		font-size: 16px;
	}

	.sl-hero__left .sl-btn--dark {
		font-size: 16px;
	}

	.sl-hero__left .sl-btn--dark .sl-btn__arrow img {
		height: 48px;
	}

	/* Overlaps up into the lower half of the card + nav row by a constant
	   pull-up (matches the 375 frame proportions — an estimate, nudge if it
	   doesn't quite land). Height itself is set by hero.js (syncMobilePhoto),
	   which measures the actual remaining viewport space — see the comment
	   on the min-height rule above for why this isn't done in pure CSS. */
	.sl-hero__photo {
		position: relative;
		z-index: 1;
		margin-top: -140px;
	}

	/* env() keeps the bar clear of the home-indicator / gesture-nav strip on
	   phones that have one, instead of sitting flush with the physical edge. */
	.sl-hero__topbar {
		padding-bottom: max(16px, env(safe-area-inset-bottom));
	}

	.sl-hero__right {
		gap: 8px;
	}

	/* Stack peek needs sideways room this width doesn't have, so cards stop
	   fanning and just swap in place — also switches off the fixed desktop
	   card height (522px) in favor of sizing to content, like the 375 frame. */
	.sl-slider {
		height: auto;
	}

	.sl-card {
		position: relative;
		inset: auto;
		display: none;
		height: auto;
		gap: 40px;
		transform: none;
		box-shadow: 0 20px 32px rgba(0, 0, 0, 0.15);
	}

	.sl-card.is-active {
		display: flex;
	}

	.sl-card__title {
		font-size: 24px;
		letter-spacing: -0.48px;
	}

	.sl-card .sl-btn--secondary {
		padding: 12px 24px;
		font-size: 16px;
	}

	.sl-slider__controls {
		padding: 0 8px;
	}

	.sl-slider__arrows {
		gap: 8px;
	}

	.sl-slider__nav {
		max-width: 200px;
	}
}
