/**
 * fanorate/key-players-v2 — V2 redesign key players roster.
 *
 * Section head (red kicker + display headline), then per squad a roster
 * header (flag chip + team name + trailing hairline) above a full row of
 * player trading cards — team-color gradient top (bound via inline
 * --kp2-from/--kp2-to vars) with a giant ghost jersey number, position
 * eyebrow and Anton display name over a short editorial take. All players
 * visible at once on desktop; the row becomes a scroll-snap swipe rail on
 * mobile. Closed by a red-spined rising-stars callout in the reading column.
 */

.section-key-players-v2 {
	padding-block: clamp(40px, 6vw, 72px);
}

.section-key-players-v2 .key-players-v2__wrap {
	width: 100%;
	max-width: 1200px;
	margin-inline: auto;
	padding-inline: clamp(20px, 5vw, 48px);
}

.section-key-players-v2 .key-players-v2__col {
	width: 100%;
	max-width: 1200px;
	margin-inline: auto;
	padding-inline: clamp(20px, 5vw, 48px);
}

/* ---------- Section head ---------- */
.section-key-players-v2 .key-players-v2__rail-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--space-md);
}

.section-key-players-v2 .key-players-v2__kicker {
	display: inline-flex;
	align-items: center;
	gap: var(--space-sm);
	font: var(--eyebrow);
	letter-spacing: var(--ls-eyebrow);
	text-transform: uppercase;
	color: var(--color-primary);
}

.section-key-players-v2 .key-players-v2__kicker::before {
	content: "";
	width: 5px;
	height: 5px;
	border-radius: 100px;
	background: currentColor;
	display: inline-block;
}

.section-key-players-v2 .key-players-v2__title {
	color: var(--color-accent);
	margin: 12px 0 0;
}

/* Swipe hint only matters where the roster actually swipes (mobile). */
.section-key-players-v2 .key-players-v2__hint {
	display: none;
	font: var(--caption);
	font-family: var(--font-ui);
	color: var(--text-tertiary);
	text-transform: uppercase;
	letter-spacing: .08em;
	white-space: nowrap;
}

/* ---------- Roster header: flag + team name + trailing rule ---------- */
.section-key-players-v2 .key-players-v2__squad-label {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: var(--space-xl) 0 0;
	font: var(--h4);
	font-family: var(--font-ui);
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--color-accent);
}

.section-key-players-v2 .key-players-v2__squad-label::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--border-subtle);
	margin-left: var(--space-sm);
}

.section-key-players-v2 .key-players-v2__chip {
	width: 26px;
	height: 17px;
	border-radius: 3px;
	object-fit: cover;
}

.section-key-players-v2 .key-players-v2__chip--text {
	width: auto;
	height: auto;
	font-size: 18px;
	line-height: 1;
	border-radius: 0;
}

/* ---------- Roster row: every player visible on desktop ---------- */
/* Wrapping flex — cards grow to share each row, so any squad size
   composes edge-to-edge with no orphaned blank slots. */
.section-key-players-v2 .key-players-v2__rail {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-md);
	padding: var(--space-lg) 0 0;
}

/* ---------- Player trading cards ---------- */
.section-key-players-v2 .key-players-v2__card {
	flex: 1 1 200px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-md);
	overflow: hidden;
	background: var(--surface-page);
	transition: box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}

.section-key-players-v2 .key-players-v2__card:hover {
	box-shadow: var(--shadow-lg);
	transform: translateY(-3px);
}

.section-key-players-v2 .key-players-v2__card-top {
	position: relative;
	padding: var(--space-lg);
	color: var(--text-inverse);
	background: linear-gradient(160deg, var(--kp2-from, var(--color-accent-light)) 0%, var(--kp2-to, var(--color-accent-dark)) 100%);
}

.section-key-players-v2 .key-players-v2__num {
	position: absolute;
	top: 8px;
	right: 14px;
	font-family: var(--font-display);
	font-weight: 400;
	font-size: 56px;
	color: rgba(255, 255, 255, .16);
	line-height: 1;
	pointer-events: none;
	user-select: none;
}

.section-key-players-v2 .key-players-v2__pos {
	font: var(--caption);
	font-family: var(--font-ui);
	text-transform: uppercase;
	letter-spacing: .1em;
	color: rgba(255, 255, 255, .85);
}

.section-key-players-v2 .key-players-v2__name {
	
	letter-spacing: 0.005em;
    line-height: 1.03;
    margin: 0;
color: rgba(255, 255, 255);
    overflow-wrap: anywhere;
    font-family: 'Inter';
    font-size: 18px;
    font-weight: 800;
	
}

.section-key-players-v2 .key-players-v2__card-body {
	padding: var(--space-md) var(--space-lg) var(--space-lg);
}

.section-key-players-v2 .key-players-v2__card-body p {
	font: var(--body-sm);
	font-family: var(--font-ui);
	color: var(--text-secondary);
	margin: 0;
}

/* ---------- Rising-stars box-out ---------- */
/* Print-style sidebar: heavy red opening rule, small-caps slugline,
   prose, hairline close — no fill, no radius, no card. */
.section-key-players-v2 .key-players-v2__callout {
	margin-top: clamp(40px, 5vw, 56px);
	padding: var(--space-lg) 0;
	border-top: 3px solid var(--color-primary);
	border-bottom: 1px solid var(--border-subtle);
}

.section-key-players-v2 .key-players-v2__callout h4 {
	display: inline-flex;
	align-items: center;
	gap: var(--space-sm);
	font: var(--eyebrow);
	letter-spacing: var(--ls-eyebrow);
	text-transform: uppercase;
	color: var(--color-primary);
	margin: 0 0 14px;
}

.section-key-players-v2 .key-players-v2__callout h4::before {
	content: "";
	width: 5px;
	height: 5px;
	border-radius: 100px;
	background: currentColor;
	display: inline-block;
}

.section-key-players-v2 .key-players-v2__callout-body p {
	font-family: var(--font-ui);
	color: var(--text-secondary);
	margin: 0 0 var(--space-md);
}

.section-key-players-v2 .key-players-v2__callout-body p:last-child {
	margin-bottom: 0;
}

.section-key-players-v2 .key-players-v2__callout-body strong {
	color: var(--color-accent);
}

/* ---------- Reveal-on-scroll (armed by view.js) ---------- */
.section-key-players-v2 [data-reveal] {
	transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
	/* cards stagger in roster order via their inline --i */
	transition-delay: calc((var(--i, 0)) * 55ms);
}

.section-key-players-v2.is-reveal-armed [data-reveal]:not(.is-in) {
	opacity: 0;
	transform: translateY(18px);
}

@media (prefers-reduced-motion: reduce) {
	.section-key-players-v2.is-reveal-armed [data-reveal]:not(.is-in) {
		opacity: 1;
		transform: none;
	}

	.section-key-players-v2 [data-reveal] {
		transition-delay: 0s;
	}
}

/* ---------- Mobile: roster rows become scroll-snap swipe rails ---------- */
@media (max-width: 720px) {
	.section-key-players-v2 .key-players-v2__rail-head {
		flex-direction: row;
		align-items: flex-end;
	}

	.section-key-players-v2 .key-players-v2__hint {
		display: inline-block;
	}

	.section-key-players-v2 .key-players-v2__rail {
		flex-wrap: nowrap;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
		/* bleed to the viewport edge while staying aligned to the wrap */
		margin-inline: calc(-1 * clamp(20px, 5vw, 48px));
		padding: var(--space-lg) clamp(20px, 5vw, 48px) var(--space-sm);
		scroll-padding-left: clamp(20px, 5vw, 48px);
	}

	.section-key-players-v2 .key-players-v2__rail::-webkit-scrollbar {
		display: none;
	}

	.section-key-players-v2 .key-players-v2__card {
		flex: 0 0 auto;
		scroll-snap-align: start;
		width: min(280px, 72vw);
	}

	.section-key-players-v2 .key-players-v2__callout {
		padding: var(--space-md) 0;
	}

	/* stagger reads as noise once cards swipe — reveal together */
	.section-key-players-v2 [data-reveal] {
		transition-delay: 0s;
	}
}
