/*
 * Jersey Bulls FC — Player profile (single-sp_player.php)
 *
 * Juventus-style player page: a type-forward hero (massive stacked forename /
 * surname, large grey position, giant squad number + headline stats on near-
 * black), then a lower split — photo + bio facts + sponsor | "Player profile"
 * bio + career highlights. Dark editorial, sharp + flat, sparing red.
 *
 * Markup: single-sp_player.php · Tokens: css/tokens.css
 */

.bulls-player-profile {
	color: var(--t-fg);
}

/* ============================================================
 * Type-forward hero
 * ============================================================ */

.bulls-player-profile__hero {
	max-width: var(--content-full);
	margin: 0 auto;
	padding: var(--space-16) var(--gutter) var(--space-12);
	display: flex;
	flex-direction: column;
	gap: var(--space-10);
}

/* PSG-style photo hero: the cut-out rides large on the right over a giant ghost
   number; headline+figures keep their flow on the left. */
.bulls-player-profile__hero.has-photo {
	position: relative;
	isolation: isolate;
	min-height: clamp(480px, 72vh, 760px);
	justify-content: flex-end;
	overflow: hidden;
}
.bulls-player-profile__plate {
	position: absolute;
	inset: 0;
	/* z 0 (not -1): the figures-row border drew a line ACROSS the photo —
	   the plate now covers it while the text stacks above. */
	z-index: 0;
	pointer-events: none;
}
.bulls-player-profile__headline,
.bulls-player-profile__figures { position: relative; z-index: 1; }
.bulls-player-profile__ghost-number {
	position: absolute;
	top: 50%;
	right: clamp(8%, 18vw, 26%);
	transform: translateY(-54%);
	font-family: var(--ff-display);
	font-size: clamp(16rem, 38vw, 34rem);
	line-height: 1;
	color: var(--t-fg);
	opacity: 0.07;
}
.bulls-player-profile__photo {
	position: absolute;
	right: clamp(0px, 4vw, 72px);
	bottom: 0;
	height: min(92%, 680px);
	width: auto;
	object-fit: contain;
	object-position: bottom;
	filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.45));
}
/* Rectangular featured photos (a studio shot with its own background) read much
   heavier than the transparent cut-outs, so render them smaller to sit at the
   cut-out's visual scale — the cut-outs (e.g. Rai Dos Santos) are the reference.
   Cut-outs keep the full height above. (client 13 Jun) */
.bulls-player-profile__photo--photo { height: min(74%, 540px); }
@media (max-width: 860px) {
	/* Stack the photo plate ABOVE the headline (design/26 P1): the absolute
	   plate left ~60vh of dead canvas and set the surname across the player's
	   face. The plate becomes a normal block, photo bottom-anchored within it. */
	.bulls-player-profile__hero.has-photo { min-height: 0; }
	.bulls-player-profile__plate {
		position: relative;
		inset: auto;
		order: -1;
		z-index: 0;
		height: clamp(260px, 44vh, 420px);
	}
	.bulls-player-profile__photo { right: 50%; transform: translateX(50%); height: 100%; opacity: 1; }
	.bulls-player-profile__ghost-number { right: 50%; transform: translate(50%, -54%); }
}

.bulls-player-profile__name {
	margin: 0;
	font-family: var(--ff-display);
	text-transform: uppercase;
	line-height: 0.86;
	letter-spacing: var(--ls-tight);
}

.bulls-player-profile__forename {
	display: block;
	font-size: clamp(1.75rem, 4vw, 3.25rem);
	color: var(--t-fg-muted);
	/* Deliberate forename/surname weight contrast (mirrors player-card) — exception to uniform-bold (design/25). */
	font-weight: var(--fw-medium);
}

.bulls-player-profile__surname {
	display: block;
	font-size: clamp(3.5rem, 12vw, 9rem);
	color: var(--t-fg);
}

.bulls-player-profile__position {
	margin: var(--space-4) 0 0;
	font-family: var(--ff-display);
	font-size: clamp(1.5rem, 4vw, 3rem);
	text-transform: uppercase;
	letter-spacing: var(--ls-snug);
	line-height: 1;
	color: var(--t-border-strong);
}

/* Giant number + headline stats row. */
.bulls-player-profile__figures {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: clamp(var(--space-8), 6vw, var(--space-16));
	padding-top: var(--space-8);
	position: relative;
}
/* A short brand accent instead of a full-width hairline — the old border-top ran
   the full width and cut across the player photo (client, 13 Jun). */
.bulls-player-profile__figures::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 56px;
	height: 3px;
	background: var(--c-bulls-red);
}

.bulls-player-profile__number {
	font-family: var(--ff-display);
	font-size: clamp(5rem, 14vw, 11rem);
	line-height: 0.8;
	color: var(--c-bulls-red);
}

.bulls-player-profile__stats {
	display: flex;
	flex-wrap: wrap;
	gap: clamp(var(--space-6), 5vw, var(--space-12));
	margin: 0;
}

.bulls-player-profile__stat { display: flex; flex-direction: column; gap: var(--space-1); }

.bulls-player-profile__stat-num {
	margin: 0;
	font-family: var(--ff-display);
	font-size: clamp(3rem, 8vw, 5.5rem);
	line-height: 1;
	color: var(--t-fg);
}

.bulls-player-profile__stat-label {
	font-family: var(--ff-mono);
	font-size: var(--fs-50);
	letter-spacing: var(--ls-wide);
	text-transform: uppercase;
	color: var(--c-bulls-red-300);
}

/* ============================================================
 * Detail — photo + facts | bio
 * ============================================================ */

.bulls-player-profile__detail {
	max-width: var(--content-full);
	margin: 0 auto;
	padding: var(--space-12) var(--gutter) var(--space-16);
	display: grid;
	grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
	gap: clamp(var(--space-8), 6vw, var(--space-16));
	align-items: start;
}
/* Desktop corner gutters — full-width containers carry their own inset on the
   site-wide fullscreen canvas. */
@media (min-width: 1024px) {
	.bulls-player-profile__hero,
	.bulls-player-profile__detail { padding-inline: clamp(72px, 7vw, 132px); }
}

.bulls-player-profile__portrait {
	position: relative;
	overflow: hidden;
	aspect-ratio: 4 / 5;
	background:
		radial-gradient(120% 90% at 50% 100%, #5c0007 0%, transparent 60%),
		linear-gradient(180deg, var(--c-ink-900) 0%, var(--c-ink-800) 100%);
}

.bulls-player-profile__cutout {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 108%;
	object-fit: cover;
	object-position: center top;
	display: block;
	filter: saturate(1.12) brightness(1.14) contrast(1.02);   /* match player-card grade lift (brighter, 13 Jun) */
}

.bulls-player-profile__cutout--placeholder {
	background: url("../../images/crest.svg") no-repeat center 46% / 42% auto;
	opacity: 0.10;
}

.bulls-player-profile__facts {
	margin: var(--space-6) 0 0;
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
}
.bulls-player-profile__fact {
	display: flex;
	justify-content: space-between;
	gap: var(--space-4);
	padding-bottom: var(--space-3);
	border-bottom: 1px solid var(--c-white-08);
}
.bulls-player-profile__fact dt {
	font-family: var(--ff-mono);
	font-size: var(--fs-50);
	letter-spacing: var(--ls-wide);
	text-transform: uppercase;
	color: var(--t-fg-muted);
}
.bulls-player-profile__fact dd {
	margin: 0;
	font-family: var(--ff-sans);
	font-size: var(--fs-200);
	color: var(--t-fg);
}

.bulls-player-profile__sponsor {
	margin: var(--space-6) 0 0;
	display: flex;
	flex-direction: column;
	gap: var(--space-1);
	font-family: var(--ff-mono);
	font-size: var(--fs-75);
}
.bulls-player-profile__sponsor-label {
	font-size: var(--fs-50);
	letter-spacing: var(--ls-wider);
	text-transform: uppercase;
	color: var(--t-fg-muted);
}
.bulls-player-profile__sponsor a {
	color: var(--t-fg);
	text-transform: uppercase;
	letter-spacing: var(--ls-wide);
	text-decoration: none;
	border-bottom: 1px solid var(--c-bulls-red);
	align-self: flex-start;
}
.bulls-player-profile__sponsor a:hover,
.bulls-player-profile__sponsor a:focus-visible { color: var(--c-bulls-red-300); }

/* ----- About ----- */

.bulls-player-profile__h2 {
	margin: 0 0 var(--space-5);
	font-family: var(--ff-display);
	font-size: clamp(1.75rem, 4vw, 2.75rem);
	text-transform: uppercase;
	letter-spacing: var(--ls-tight);
	color: var(--t-fg);
}
.bulls-player-profile__h3 {
	margin: var(--space-10) 0 var(--space-4);
	font-family: var(--ff-display);
	font-size: clamp(1.25rem, 3vw, 1.75rem);
	text-transform: uppercase;
	letter-spacing: var(--ls-tight);
	color: var(--t-fg);
}

.bulls-player-profile__prose {
	font-family: var(--ff-sans);
	font-size: var(--fs-300);
	line-height: var(--lh-loose);
	color: var(--t-fg-body);
}
.bulls-player-profile__prose p { margin: 0 0 var(--space-4); }
.bulls-player-profile__prose p:last-child { margin-bottom: 0; }

.bulls-player-profile__placeholder {
	margin: 0;
	font-family: var(--ff-sans);
	font-size: var(--fs-300);
	color: var(--t-fg-muted);
	font-style: italic;
}

.bulls-player-profile__highlights {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
}
.bulls-player-profile__highlights li {
	position: relative;
	padding-left: var(--space-5);
	font-family: var(--ff-sans);
	font-size: var(--fs-200);
	color: var(--t-fg-body);
}
.bulls-player-profile__highlights li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.62em;
	width: 10px;
	height: 2px;
	background: var(--c-bulls-red);
}

.bulls-player-profile__back {
	margin: var(--space-10) 0 0;
}
.bulls-player-profile__back a {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	font-family: var(--ff-mono);
	font-size: var(--fs-75);
	letter-spacing: var(--ls-wide);
	text-transform: uppercase;
	color: var(--t-fg-muted);
	text-decoration: none;
	transition: color var(--motion-fast) var(--ease-out);
}
.bulls-player-profile__back a:hover,
.bulls-player-profile__back a:focus-visible { color: var(--t-fg); }

/* ============================================================
 * Responsive — detail stacks
 * ============================================================ */

@media (max-width: 768px) {
	.bulls-player-profile__detail { grid-template-columns: 1fr; }
	.bulls-player-profile__portrait { max-width: 420px; }
	.bulls-player-profile__hero { padding-top: var(--space-12); gap: var(--space-8); }
}

/* Sponsor logo on the profile facts column — rendered on a small white chip in
   natural colour (the imported marks are mixed JPEG/opaque PNG, so a white
   treatment turned them into solid blocks). Works in both themes. */
.bulls-player-profile__sponsor-logo {
	display: inline-block;
	box-sizing: content-box;
	max-height: 40px;
	max-width: 210px;
	vertical-align: middle;
	background: #fff;
	border-radius: var(--radius-sm);
	padding: 6px 10px;
}

/* ----- Prev / next player pager (squad-page alphabetical order, wraps) ----- */
.bulls-player-profile__pager {
	max-width: var(--content-full);
	margin: 0 auto;
	padding: var(--space-4) var(--gutter) 0;
	box-sizing: border-box;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: var(--space-4);
}
@media (min-width: 1024px) { .bulls-player-profile__pager { padding-inline: clamp(72px, 7vw, 132px); } }
.bulls-player-profile__pager-link {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	min-height: 44px;
	font-family: var(--ff-mono);
	font-size: var(--fs-50);
	letter-spacing: var(--ls-wide);
	text-transform: uppercase;
	color: var(--t-fg-muted);
	text-decoration: none;
	transition: color var(--motion-fast) var(--ease-out);
}
.bulls-player-profile__pager-link:hover,
.bulls-player-profile__pager-link:focus-visible { color: var(--c-bulls-red); }
.bulls-player-profile__pager-link--all { color: var(--t-fg-faint); }
@media (max-width: 600px) {
	.bulls-player-profile__pager-link--all { display: none; }   /* keep the row to prev/next on small screens */
}
