/*
 * ULMi — home (front-page.php). Caricato solo sulla front page.
 */

.btn-lg {
	min-height: 48px;
	padding: 12px 24px;
	font-size: 0.9375rem;
}

/* ============ Hero ============ */

.home-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background:
		radial-gradient(ellipse 70% 90% at 85% 10%, rgba(228, 25, 43, 0.38), transparent 60%),
		radial-gradient(ellipse 50% 70% at 100% 100%, rgba(47, 191, 113, 0.14), transparent 60%),
		linear-gradient(160deg, var(--surf2) 0%, var(--ink) 65%);
	color: var(--txt);
}

.home-hero-photo {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 70% 40%;
}

.home-hero.has-photo::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(90deg, rgba(11, 11, 13, 0.92) 0%, rgba(11, 11, 13, 0.7) 45%, rgba(11, 11, 13, 0.25) 100%);
}

.home-hero-inner {
	padding-block: clamp(64px, 11vw, 140px);
}

.home-hero-title {
	display: flex;
	flex-direction: column;
	margin: 0;
	font-size: clamp(2.5rem, 1.6rem + 4.4vw, 4.75rem);
	font-weight: 800;
	line-height: 1.02;
	letter-spacing: -0.035em;
	color: #fff;
}

.home-hero-title .is-red {
	color: var(--red-hi);
}

.home-hero-lead {
	max-width: 34rem;
	margin: 24px 0 0;
	color: #D2D2DA;
	font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
	line-height: 1.55;
}

.home-hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 32px;
}

/* ============ Sezioni ============ */

.home-section {
	padding-block: clamp(48px, 7vw, 88px);
}

.home-section + .home-section {
	padding-top: 0;
}

.home-section-head {
	margin-bottom: 28px;
}

.home-section-head h2 {
	margin: 0;
	line-height: 1.15;
	font-size: var(--fs-h2);
	font-weight: 800;
	letter-spacing: -0.025em;
}

.home-section-head p {
	margin: 8px 0 0;
	color: var(--light-dim);
}

.home-section-head--row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 24px;
}

.home-more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--red-dk);
	font-size: 0.9375rem;
	font-weight: 700;
	text-decoration: none;
}

.home-more:hover {
	color: var(--red);
	text-decoration: underline;
}

.home-more .icon {
	width: 18px;
	height: 18px;
}

.home-empty {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 20px 22px;
	border: 1px dashed var(--light-line);
	border-radius: var(--r);
	background: var(--light-panel);
	color: var(--light-dim);
}

.home-empty .icon {
	flex: none;
	color: var(--red);
}

/* ============ Come funziona ============ */

.home-how {
	padding-top: clamp(48px, 7vw, 88px);
}

.how-steps {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: none;
}

.how-step {
	position: relative;
	padding: 24px 22px 26px;
	border: 1px solid var(--light-line);
	border-radius: var(--r);
	background: var(--light-panel);
}

.how-icon {
	position: relative;
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	border-radius: 14px;
	background: rgba(228, 25, 43, 0.09);
	color: var(--red);
}

.how-icon .icon {
	width: 26px;
	height: 26px;
}

.how-num {
	position: absolute;
	top: -8px;
	right: -8px;
	display: grid;
	place-items: center;
	width: 24px;
	height: 24px;
	border: 2px solid var(--light-panel);
	border-radius: 50%;
	background: var(--red);
	color: #fff;
	font-size: 0.75rem;
	font-weight: 800;
}

.how-step h3 {
	margin: 18px 0 6px;
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.3;
}

.how-soon {
	display: inline-block;
	margin-left: 6px;
	padding: 2px 8px;
	border-radius: 999px;
	background: rgba(227, 178, 60, 0.28); /* oro tenue: testo --light-txt a contrasto AA */
	color: var(--light-txt);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	vertical-align: 2px;
}

.how-step p {
	margin: 0;
	color: var(--light-dim);
	font-size: 0.9375rem;
	line-height: 1.5;
}

/* ============ Partite ============ */

.match-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
	gap: 16px;
}

.match {
	position: relative;
	padding: 16px 18px 14px;
	border: 1px solid var(--light-line);
	border-radius: var(--r);
	background: var(--light-panel);
	transition: box-shadow 0.15s;
}

.match:hover {
	box-shadow: 0 10px 26px rgba(23, 23, 28, 0.09);
}

.match-link {
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.match-link:focus-visible {
	box-shadow: var(--focus);
	outline: none;
}

.match-league {
	margin: 0 0 12px;
	overflow: hidden;
	color: var(--light-dim);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-overflow: ellipsis;
	text-transform: uppercase;
	white-space: nowrap;
}

.match-teams {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: start;
	gap: 10px;
}

.match-team {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	min-width: 0;
	text-align: center;
}

.match-logo {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
}

.match-logo img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.match-initial {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--light-bg);
	color: var(--light-dim);
	font-weight: 800;
}

.match-name {
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.25;
	overflow-wrap: anywhere;
}

.match-score {
	display: flex;
	align-items: center;
	gap: 6px;
	min-height: 48px;
	font-size: 1.625rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.02em;
}

.match-dash {
	color: var(--light-dim);
	font-weight: 400;
}

.match-time {
	padding: 4px 10px;
	border-radius: 8px;
	background: var(--ink);
	color: #fff;
	font-size: 1rem;
}

.match-meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 4px 16px;
	margin: 14px 0 0;
	padding-top: 12px;
	border-top: 1px solid var(--light-line);
	color: var(--light-dim);
	font-size: 0.8125rem;
}

.match-meta > span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.match-meta .icon {
	width: 15px;
	height: 15px;
}

.match-status {
	color: var(--red-dk);
	font-weight: 700;
}

/* ============ Fascia finale ============ */

.home-cta {
	background:
		radial-gradient(ellipse 60% 120% at 100% 50%, rgba(228, 25, 43, 0.3), transparent 60%),
		var(--ink);
	color: var(--txt);
}

.home-cta-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px 40px;
	padding-block: clamp(40px, 6vw, 64px);
}

.home-cta h2 {
	margin: 0;
	line-height: 1.15;
	color: #fff;
	font-size: var(--fs-h2);
	font-weight: 800;
	letter-spacing: -0.025em;
}

.home-cta p {
	margin: 8px 0 0;
	color: var(--dim);
}

/* ============ Responsive ============ */

@media (max-width: 960px) {
	.how-steps {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 560px) {
	.home-hero.has-photo::before {
		background: linear-gradient(180deg, rgba(11, 11, 13, 0.7) 0%, rgba(11, 11, 13, 0.85) 100%);
	}

	.how-steps {
		grid-template-columns: 1fr;
	}

	.how-step {
		display: grid;
		grid-template-columns: auto 1fr;
		column-gap: 16px;
		padding: 18px;
	}

	.how-icon {
		grid-row: span 2;
	}

	.how-step h3 {
		margin-top: 2px;
	}

	.home-hero-actions .btn {
		flex: 1 1 100%;
	}

	.home-cta-inner .btn {
		width: 100%;
	}
}
