/**
 * Home — carosello “reel”: 3 card su desktop/tablet grandi, 1 card su mobile (vedi main.js).
 */

.home-portfolio {
	padding: clamp(3.5rem, 10vw, 6rem) clamp(1rem, 5vw, 4rem);
	background-color: #0a0b0f;
	background-image: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(127, 198, 229, 0.06), transparent 55%);
	color: #fff8f0;
	color: var(--color-text, #fff8f0);
}

.home-portfolio__inner {
	max-width: min(96vw, 92rem);
	margin: 0 auto;
}

.home-portfolio__header {
	margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
	max-width: 40rem;
}

.home-portfolio__title {
	margin: 0 0 0.65rem;
	font-size: clamp(1.65rem, 3vw + 0.5vmin, 2.5rem);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.02em;
}

.home-portfolio__subtitle {
	margin: 0;
	font-size: clamp(1rem, 1.45vw, 1.125rem);
	line-height: 1.55;
	color: #fff8f0;
	color: var(--color-text, #fff8f0);
	opacity: 0.92;
}

.home-portfolio__carousel {
	position: relative;
	padding: 0 clamp(2.75rem, 8vw, 4rem) 2.75rem;
}

.home-portfolio__carousel:focus-visible {
	outline: 2px solid #7fc6e5;
	outline: 2px solid var(--color-accent-cool, #7fc6e5);
	outline-offset: 4px;
}

.home-portfolio__viewport {
	overflow: hidden;
	width: 100%;
	border-radius: 0.5rem;
	/* Swipe orizzontale gestito in JS; evita che il browser “rubi” il gesto come scroll pagina */
	touch-action: pan-y;
}

.home-portfolio__track {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	gap: clamp(0.85rem, 2.5vw, 1.25rem);
	padding: 0.25rem 0 0.5rem;
	will-change: transform;
	transition: transform 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-portfolio__slide {
	--slide-h: 210;
	position: relative;
	flex: 0 0 auto;
	width: 200px;
	aspect-ratio: 9 / 16;
	border-radius: clamp(1.15rem, 2.5vw, 1.75rem);
	overflow: hidden;
	background: linear-gradient(
		165deg,
		hsl(var(--slide-h) 42% 22%) 0%,
		hsl(calc(var(--slide-h) + 18) 38% 12%) 48%,
		#060708 100%
	);
	border: 1px solid rgba(255, 248, 240, 0.1);
	box-shadow:
		0 0 0 1px rgba(0, 0, 0, 0.35),
		0 18px 40px rgba(0, 0, 0, 0.45);
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}

@media (hover: hover) {
	.home-portfolio__slide:hover {
		transform: translateY(-4px) scale(1.02);
		box-shadow:
			0 0 0 1px rgba(127, 198, 229, 0.2),
			0 22px 48px rgba(0, 0, 0, 0.5);
	}
}

.home-portfolio__media {
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: 0.55;
	background-image:
		radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.12), transparent 42%),
		radial-gradient(circle at 80% 60%, hsl(var(--slide-h) 55% 45% / 0.25), transparent 50%);
}

.home-portfolio__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 1;
	pointer-events: none;
}

.home-portfolio__caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 2.25rem;
	padding: 0 clamp(0.85rem, 3vw, 1.15rem);
	text-align: center;
	z-index: 1;
}

.home-portfolio__tagline {
	margin: 0 0 0.35rem;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(255, 248, 240, 0.92);
}

.home-portfolio__brand {
	margin: 0;
	font-size: clamp(1.15rem, 2.8vw, 1.45rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.15;
	text-shadow: 0 2px 16px rgba(0, 0, 0, 0.65);
}

.home-portfolio__fixture {
	position: absolute;
	left: 50%;
	bottom: 0.65rem;
	transform: translateX(-50%);
	width: 32%;
	max-width: 5.5rem;
	height: 4px;
	border-radius: 999px;
	background: rgba(255, 248, 240, 0.35);
	box-shadow: 0 0 12px rgba(255, 248, 240, 0.15);
	z-index: 1;
}

.home-portfolio__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.35rem;
	height: 2.35rem;
	padding: 0;
	border: 1px solid rgba(255, 248, 240, 0.12);
	border-radius: 0.45rem;
	background: rgba(18, 20, 28, 0.92);
	color: #fff8f0;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.home-portfolio__nav:hover,
.home-portfolio__nav:focus-visible {
	background: rgba(35, 38, 50, 0.98);
	border-color: rgba(127, 198, 229, 0.35);
	color: #7fc6e5;
	color: var(--color-accent-cool, #7fc6e5);
}

.home-portfolio__nav:focus-visible {
	outline: 2px solid #7fc6e5;
	outline-offset: 2px;
}

.home-portfolio__nav--prev {
	left: 0.15rem;
}

.home-portfolio__nav--next {
	right: 0.15rem;
}

.home-portfolio__nav-icon {
	display: block;
}

.home-portfolio__dots {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.55rem;
	margin-top: 1.25rem;
	padding: 0;
}

.home-portfolio__dot {
	width: 0.55rem;
	height: 0.55rem;
	padding: 0;
	border: 1px solid rgba(255, 248, 240, 0.45);
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
	transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.home-portfolio__dot:hover,
.home-portfolio__dot:focus-visible {
	border-color: rgba(127, 198, 229, 0.75);
}

.home-portfolio__dot.is-active {
	background: linear-gradient(135deg, #7fc6e5, #b87fd4);
	border-color: transparent;
	transform: scale(1.15);
}

.home-portfolio__dot:focus-visible {
	outline: 2px solid #7fc6e5;
	outline-offset: 3px;
}

.home-portfolio__foot {
	margin: clamp(1.75rem, 4vw, 2.25rem) 0 0;
	text-align: center;
}

@media (max-width: 47.99rem) {
	.home-portfolio__carousel {
		padding-left: clamp(2.25rem, 10vw, 3rem);
		padding-right: clamp(2.25rem, 10vw, 3rem);
	}
}

@media (prefers-reduced-motion: reduce) {
	.home-portfolio__track {
		transition: none;
	}

	.home-portfolio__slide {
		transition: none;
	}

	.home-portfolio__slide:hover {
		transform: none;
	}
}
