/**
 * Pagina Portfolio — hero scuro, filtri pill, griglia card verticali (accenti rosso brand).
 */

.site-main--portfolio {
	min-height: 70vh;
}

.page-portfolio {
	position: relative;
	padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 4vw, 2.5rem) clamp(4rem, 10vw, 6rem);
	background: #030303;
	color: #fafafa;
	overflow: hidden;
}

.page-portfolio__bg {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		radial-gradient(ellipse 55% 40% at 50% 12%, rgba(251, 54, 64, 0.16), transparent 70%),
		radial-gradient(ellipse 40% 35% at 85% 55%, rgba(255, 92, 100, 0.08), transparent 65%),
		#030303;
}

.page-portfolio__hero {
	position: relative;
	z-index: 1;
	text-align: center;
	padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(2rem, 5vw, 3.5rem);
}

.page-portfolio__eyebrow {
	margin: 0 0 1rem;
	font-size: clamp(0.65rem, 1.5vw, 0.75rem);
	font-weight: 700;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	opacity: 0.88;
}

.page-portfolio__title-wrap {
	position: relative;
	display: inline-block;
	max-width: 100%;
}

.page-portfolio__title-wrap::before {
	content: '';
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -48%);
	width: min(120%, 42rem);
	height: clamp(6rem, 22vw, 12rem);
	background: radial-gradient(ellipse closest-side, rgba(251, 54, 64, 0.42), rgba(255, 92, 100, 0.14) 55%, transparent 72%);
	filter: blur(2px);
	pointer-events: none;
	z-index: 0;
}

.page-portfolio__title {
	position: relative;
	z-index: 1;
	margin: 0;
	font-size: clamp(2.75rem, 11vw, 7.5rem);
	font-weight: 900;
	line-height: 0.95;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #fff;
	text-shadow:
		0 0 40px rgba(251, 54, 64, 0.38),
		0 0 80px rgba(255, 92, 100, 0.18);
}

.page-portfolio__filters {
	position: relative;
	z-index: 1;
	display: flex;
	justify-content: center;
	margin-bottom: clamp(2rem, 4vw, 3rem);
}

.page-portfolio__filter-list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.5rem 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
	max-width: 52rem;
}

.page-portfolio__filter-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.55rem 1.1rem;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(255, 255, 255, 0.03);
	color: #fafafa;
	font-family: inherit;
	font-size: clamp(0.75rem, 2vw, 0.875rem);
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: none;
	cursor: pointer;
	transition:
		box-shadow 0.25s ease,
		border-color 0.25s ease,
		background 0.25s ease,
		color 0.2s ease;
}

.page-portfolio__filter-btn:hover,
.page-portfolio__filter-btn:focus-visible {
	border-color: rgba(251, 54, 64, 0.5);
	color: #fff;
}

.page-portfolio__filter-btn:focus-visible {
	outline: 2px solid rgba(251, 54, 64, 0.85);
	outline-offset: 3px;
}

.page-portfolio__filter-btn.is-active {
	border-color: rgba(251, 54, 64, 0.65);
	background: rgba(251, 54, 64, 0.12);
	box-shadow:
		0 0 0 1px rgba(251, 54, 64, 0.28),
		0 0 28px rgba(251, 54, 64, 0.35),
		0 0 48px rgba(255, 92, 100, 0.12);
	color: #fff;
}

.page-portfolio__grid-wrap {
	position: relative;
	z-index: 1;
	max-width: min(94vw, 88rem);
	margin: 0 auto;
}

.page-portfolio__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr));
	gap: clamp(1rem, 2.5vw, 1.5rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

.page-portfolio__cell {
	margin: 0;
	padding: 0;
	min-width: 0;
}

.page-portfolio__cell[hidden] {
	display: none;
}

.page-portfolio__card {
	display: block;
	position: relative;
	height: 100%;
	border-radius: 1.35rem;
	overflow: hidden;
	text-decoration: none;
	color: #fff;
	background: #111;
	box-shadow:
		0 0 0 1px rgba(255, 255, 255, 0.06),
		0 12px 40px rgba(0, 0, 0, 0.45);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-portfolio__card:hover,
.page-portfolio__card:focus-visible {
	transform: translateY(-4px);
	box-shadow:
		0 0 0 1px rgba(251, 54, 64, 0.28),
		0 16px 48px rgba(0, 0, 0, 0.55),
		0 0 36px rgba(251, 54, 64, 0.2);
}

.page-portfolio__card:focus-visible {
	outline: 2px solid rgba(251, 54, 64, 0.9);
	outline-offset: 4px;
}

.page-portfolio__card-media {
	position: relative;
	aspect-ratio: 3 / 4;
	background: #0a0a0a;
}

.page-portfolio__card-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.page-portfolio__card-placeholder {
	width: 100%;
	height: 100%;
	background:
		linear-gradient(165deg, hsla(var(--portfolio-card-hue, 320), 42%, 22%, 0.95) 0%, hsl(220, 16%, 6%) 48%, hsl(350, 32%, 9%) 100%),
		radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1), transparent 45%),
		radial-gradient(ellipse 80% 60% at 80% 100%, rgba(251, 54, 64, 0.12), transparent 55%);
}

.page-portfolio__card-shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 52%);
	pointer-events: none;
}

.page-portfolio__card-brand {
	position: absolute;
	left: 50%;
	bottom: clamp(1rem, 3vw, 1.75rem);
	transform: translateX(-50%);
	width: max-content;
	max-width: calc(100% - 2rem);
	font-size: clamp(0.85rem, 2.2vw, 1.05rem);
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-align: center;
	text-shadow: 0 2px 24px rgba(0, 0, 0, 0.65);
	z-index: 2;
}

.page-portfolio__cta-row {
	position: relative;
	z-index: 1;
	margin: clamp(3rem, 6vw, 4.5rem) 0 0;
	text-align: center;
}

@media (prefers-reduced-motion: reduce) {
	.page-portfolio__card {
		transition: none;
	}

	.page-portfolio__card:hover,
	.page-portfolio__card:focus-visible {
		transform: none;
	}
}

@media (max-width: 47.99rem) {
	.page-portfolio__title-wrap::before {
		filter: none;
		opacity: 0.85;
	}
}
