/* ============================================================
   How it works (fifth section) — clone of fifth-section.tsx
   ============================================================ */

.how {
	position: relative;
	min-height: 100vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	padding-bottom: 3rem;
	background-color: var(--ciclic-dark);
}

@media (min-width: 768px) {
	.how {
		padding-bottom: 5rem;
	}
}

/* --- Background blobs ------------------------------------- */
.how__blob {
	position: absolute;
	border-radius: 9999px;
	background-color: var(--ciclic-blue);
	opacity: 0.2;
	filter: blur(100px);
	pointer-events: none;
}

.how__blob--top {
	top: 5%;
	left: 5%;
	width: 45vw;
	height: 45vw;
}

.how__blob--bottom {
	bottom: 10%;
	right: 0;
	width: 35vw;
	height: 35vw;
}

/* --- Head (title + subtitle + ctas) ----------------------- */
.how__head {
	position: relative;
	z-index: 10;
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 5rem 1.5rem 0;
}

@media (min-width: 768px) {
	.how__head {
		padding: 5rem 3rem 0;
	}
}

@media (min-width: 1024px) {
	.how__head {
		padding: 5rem 5rem 0;
	}
}

.how__title {
	font-weight: 300;
	color: var(--ciclic-cream);
	max-width: 56rem;
	margin: 0 auto 1.5rem;
	font-size: 2.2rem;
	line-height: 1.1;
	opacity: 0;
	transform: translateY(50px);
	transition:
		opacity 0.8s ease-out,
		transform 0.8s ease-out;
}

.how__title.is-visible {
	opacity: 1;
	transform: translateY(0);
}

@media (min-width: 768px) {
	.how__title {
		font-size: 4rem;
		margin-bottom: 2rem;
	}
}

@media (min-width: 1024px) {
	.how__title {
		line-height: 1;
	}
}

.how__subtitle {
	font-weight: 300;
	color: var(--ciclic-blue);
	max-width: 32rem;
	margin: 0 0 2rem;
	font-size: 1.2rem;
	line-height: 1.2;
	opacity: 0;
	transform: translateY(30px);
	transition:
		opacity 0.8s ease-out 0.2s,
		transform 0.8s ease-out 0.2s;
}

.how__subtitle.is-visible {
	opacity: 1;
	transform: translateY(0);
}

@media (min-width: 768px) {
	.how__subtitle {
		font-size: 2rem;
		margin-bottom: 3rem;
	}
}

@media (min-width: 1024px) {
	.how__subtitle {
		line-height: 1.35;
	}
}

/* --- CTAs ------------------------------------------------- */
.how__ctas {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin-bottom: 2rem;
	opacity: 0;
	transform: translateY(30px);
	transition:
		opacity 0.8s ease-out 0.4s,
		transform 0.8s ease-out 0.4s;
}

.how__ctas.is-visible {
	opacity: 1;
	transform: translateY(0);
}

@media (min-width: 640px) {
	.how__ctas {
		flex-direction: row;
	}
}

@media (min-width: 1024px) {
	.how__ctas {
		margin-bottom: 3rem;
	}
}

.how__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.75rem 2rem;
	border-radius: 9999px;
	font-weight: 500;
	font-size: 1rem;
	line-height: 1;
	transition: transform 0.2s ease-out;
	cursor: pointer;
}

.how__cta:hover {
	transform: scale(1.05);
}

.how__cta--primary {
	background-color: var(--ciclic-blue);
	color: var(--ciclic-dark);
	border: 1px solid transparent;
}

.how__cta--secondary {
	background-color: transparent;
	color: var(--ciclic-cream);
	border: 1px solid var(--ciclic-cream);
}

/* --- Mockup 3D container ---------------------------------- */
/* GSAP owns all transforms here. No initial transform in CSS —
   it would be read as a stale pixel `y` and combined with the
   scroll-driven yPercent, doubling the vertical offset. */
.how__mockup {
	position: relative;
	z-index: 10;
	width: 100%;
	max-width: 64rem;
	margin: 3rem auto 0;
	padding: 0 1rem;
	flex: 1;
	display: flex;
	align-items: flex-start;
	perspective: 2000px;
	opacity: 0;
}

.how__mockup-inner {
	position: relative;
	width: 100%;
	transform-style: preserve-3d;
}

.how__mockup-inner > * {
	display: block;
}

.how__face {
	backface-visibility: hidden;
}

.how__face img {
	width: 100%;
	height: auto;
	object-fit: contain;
}

.how__face--back {
	position: absolute;
	inset: 0;
	transform: rotateY(180deg) translateZ(3px);
	opacity: 0;
}

.how__face--side {
	position: absolute;
	inset: 0;
	opacity: 0;
}

.how__face--front {
	position: relative;
	transform: translateZ(3px);
	opacity: 1;
}
