/* ============================================================
   Sliding Stack Cards - Frontend Styles
   ============================================================ */

.ssc-section {
	--ssc-section-bg: #ffffff;
	background-color: var(--ssc-section-bg);
	position: relative;
	width: 100%;
	/* Height is overridden inline based on card count */
	height: 400vh;
	overflow: hidden;
	color: #111;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.ssc-sticky-wrapper {
	position: sticky;
	top: 0;
	height: 100vh;
	width: 100%;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ssc-content {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ---------- Large Background Text ---------- */
.ssc-bg-text {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	z-index: 1;
	overflow: hidden;
}

.ssc-bg-text-inner {
	font-size: clamp(6rem, 18vw, 16rem);
	font-weight: 800;
	line-height: 0.85;
	letter-spacing: -0.04em;
	color: #111;
	text-transform: uppercase;
	white-space: nowrap;
	transform-origin: center center;
	will-change: opacity, filter, transform;
	transition: none;
}

/* ---------- Intro (left side initially) ---------- */
.ssc-intro {
	position: absolute;
	left: 6%;
	top: 50%;
	transform: translateY(-50%);
	max-width: 340px;
	z-index: 5;
	opacity: 1;
	will-change: opacity, transform;
}

.ssc-intro-text {
	font-size: 1.05rem;
	line-height: 1.55;
	color: #222;
	margin: 0 0 1.5rem;
	font-weight: 400;
}

.ssc-button {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	background: #111;
	color: #fff;
	padding: 0.55rem 1rem;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-decoration: none;
	border-radius: 2px;
	text-transform: uppercase;
	transition: background 0.2s ease, transform 0.2s ease;
}

.ssc-button:hover {
	background: #333;
	transform: translateY(-1px);
}

.ssc-button-arrow {
	font-size: 0.9em;
}

/* ---------- Cards Container ---------- */
.ssc-cards-container {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: min(380px, 85vw);
	height: 480px;
	z-index: 10;
	perspective: 1200px;
	pointer-events: none;
}

/* Individual Card */
.ssc-card {
	position: absolute;
	inset: 0;
	background: var(--card-bg, #d9e2e8);
	border-radius: 8px;
	box-shadow:
		0 20px 50px rgba(0, 0, 0, 0.12),
		0 4px 12px rgba(0, 0, 0, 0.06);
	transform-origin: center bottom;
	will-change: transform, opacity;
	opacity: 0;
	/* Start below viewport */
	transform: translateY(120%) rotateX(8deg) scale(0.92);
	pointer-events: auto;
}

.ssc-card-inner {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	height: 100%;
	padding: 2rem 1.75rem 1.5rem;
	box-sizing: border-box;
}

.ssc-card-title {
	font-size: 1.65rem;
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.02em;
	margin: 0 0 0.85rem;
	color: #111;
	text-transform: uppercase;
}

.ssc-card-desc {
	font-size: 0.95rem;
	line-height: 1.45;
	color: #333;
	margin: 0;
	font-weight: 400;
}

.ssc-card-bottom {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	margin-top: auto;
}

.ssc-card-tags {
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 0.85rem;
	line-height: 1.4;
	color: #444;
}

.ssc-card-tags li {
	margin: 0;
}

.ssc-card-number {
	font-size: 2.4rem;
	font-weight: 700;
	color: #111;
	line-height: 1;
	letter-spacing: -0.03em;
}

/* ---------- Final Text Section ---------- */
.ssc-final {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	z-index: 20;
	opacity: 0;
	pointer-events: none;
	will-change: opacity, transform;
	padding: 2rem;
}

.ssc-final-text {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.15em;
}

.ssc-final-line {
	font-size: clamp(1.8rem, 5.5vw, 3.8rem);
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -0.03em;
	color: #111;
	text-transform: uppercase;
}

.ssc-final-accent {
	font-family: "Segoe Script", "Brush Script MT", cursive;
	font-size: clamp(2.8rem, 8vw, 5.5rem);
	color: #e31c23;
	font-weight: 400;
	margin-top: -0.15em;
	line-height: 1;
	transform: rotate(-6deg);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
	.ssc-section {
		/* keep the inline height, just ensure mobile cards look good */
	}

	.ssc-intro {
		left: 5%;
		right: 5%;
		max-width: none;
		top: 18%;
		transform: none;
		text-align: left;
	}

	.ssc-intro-text {
		font-size: 0.95rem;
	}

	.ssc-cards-container {
		width: min(320px, 88vw);
		height: 420px;
		top: 58%;
	}

	.ssc-card-title {
		font-size: 1.35rem;
	}

	.ssc-card-number {
		font-size: 2rem;
	}

	.ssc-bg-text-inner {
		font-size: clamp(4rem, 22vw, 8rem);
	}
}

@media (max-width: 480px) {
	.ssc-cards-container {
		height: 380px;
	}

	.ssc-card-inner {
		padding: 1.5rem 1.25rem 1.25rem;
	}
}
