/**
 * Hero rank + rating accent glow — loaded globally via k2_head.php.
 * Profile feast heroes: border + avatar glow fade in over 1.5s (not glance popover).
 * Repeat navigations between profile hero pages skip fade (html.k2-player-hero-glow-ready).
 * Leaving for a non-hero page clears warm; next hero visit fades in again.
 */

.k2-player-hero__stat-value--rank,
.k2-player-hero__stat-value--accent {
	color: var(--k2-link-star);
	text-shadow: 0 0 28px var(--k2-accent-glow);
}

/* Milestone tier counts — per-tier color + glow (hero + online glance popover) */
.k2-player-hero__stat-value--milestones {
	color: inherit;
	text-shadow: none;
}

body.k2-site .k2-player-hero.k2-player-hero--feast:not(.k2-amiga-player-glance__hero) .k2-player-hero__stat--milestones {
	margin-left: 20px;
	padding-right: 30px;
}

.k2-player-hero__ms-tiers {
	display: inline-flex;
	align-items: baseline;
	justify-content: center;
	gap: 0.65em;
}

.k2-player-hero__ms-tier {
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
	font-variant-numeric: tabular-nums;
	text-decoration: none;
	cursor: pointer;
}

/* Beat body.k2-site a { font-weight: 500 } — match hero stat value weight (600) */
body.k2-site a.k2-player-hero__ms-tier,
body.k2-site a.k2-player-hero__ms-tier:visited,
body.k2-site a.k2-player-hero__ms-tier:hover,
body.k2-site a.k2-player-hero__ms-tier:focus-visible,
body.k2-site a.k2-player-hero__ms-tier.k2-table-helped--pinned {
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
	text-decoration: none;
}

body.k2-site a.k2-player-hero__ms-tier--pitch,
body.k2-site a.k2-player-hero__ms-tier--pitch:visited {
	--k2-ms-hero-ink: var(--k2-pure-pitch);
}

body.k2-site a.k2-player-hero__ms-tier--chrome,
body.k2-site a.k2-player-hero__ms-tier--chrome:visited {
	--k2-ms-hero-ink: var(--k2-pure-chrome);
}

body.k2-site a.k2-player-hero__ms-tier--amber,
body.k2-site a.k2-player-hero__ms-tier--amber:visited {
	--k2-ms-hero-ink: var(--k2-pure-amber);
}

body.k2-site a.k2-player-hero__ms-tier--holo,
body.k2-site a.k2-player-hero__ms-tier--holo:visited {
	--k2-ms-hero-ink: var(--k2-ms-holo);
}

/* Tier ink stays pure; no text shadow */
body.k2-site a.k2-player-hero__ms-tier--pitch,
body.k2-site a.k2-player-hero__ms-tier--pitch:visited,
body.k2-site a.k2-player-hero__ms-tier--chrome,
body.k2-site a.k2-player-hero__ms-tier--chrome:visited,
body.k2-site a.k2-player-hero__ms-tier--amber,
body.k2-site a.k2-player-hero__ms-tier--amber:visited,
body.k2-site a.k2-player-hero__ms-tier--holo,
body.k2-site a.k2-player-hero__ms-tier--holo:visited {
	color: var(--k2-ms-hero-ink);
	text-shadow: none;
}

/* Atomic hero paint — html.k2-player-hero-parsing is added by an inline script just
   before the hero article and removed by the inline script just after it (both
   parser-synchronous). The shrink-wrapped (fit-content) hero paints fully laid out
   or not at all: mid-parse paints otherwise flash a narrow glowing border. */
html.k2-player-hero-parsing body.k2-site .k2-player-hero.k2-player-hero--feast:not(.k2-amiga-player-glance__hero) {
	visibility: hidden;
}

@keyframes k2-player-hero-border-glow-in {
	0% {
		box-shadow:
			0 0 12px color-mix(in srgb, var(--k2-player-hero-glow-side) 0%, transparent),
			0 0 28px color-mix(in srgb, var(--k2-player-hero-glow-side) 0%, transparent),
			0 0 52px color-mix(in srgb, var(--k2-player-hero-glow-side) 0%, transparent),
			0 0 20px color-mix(in srgb, var(--k2-player-hero-glow-side) 0%, transparent),
			inset 0 1px 0 color-mix(in srgb, var(--k2-player-hero-glow-side) 0%, transparent);
	}
	100% {
		box-shadow:
			0 0 12px color-mix(in srgb, var(--k2-player-hero-glow-side) 28%, transparent),
			0 0 28px color-mix(in srgb, var(--k2-player-hero-glow-side) 18%, transparent),
			0 0 52px color-mix(in srgb, var(--k2-player-hero-glow-side) 8%, transparent),
			0 0 20px color-mix(in srgb, var(--k2-player-hero-glow-side) 38%, transparent),
			inset 0 1px 0 color-mix(in srgb, var(--k2-player-hero-glow-side) 12%, transparent);
	}
}

@keyframes k2-player-hero-avatar-glow-in {
	0% {
		box-shadow:
			0 0 10px color-mix(in srgb, var(--k2-accent) 0%, transparent),
			0 0 22px color-mix(in srgb, var(--k2-accent) 0%, transparent),
			0 0 0 transparent;
	}
	100% {
		box-shadow:
			0 0 10px color-mix(in srgb, var(--k2-accent) 34%, transparent),
			0 0 22px color-mix(in srgb, var(--k2-accent) 15%, transparent),
			0 0 calc(var(--k2-accent-glow-blur) * var(--k2-glow-strength)) var(--k2-accent-glow);
	}
}

body.k2-site .k2-player-hero.k2-player-hero--feast:not(.k2-amiga-player-glance__hero) {
	animation: k2-player-hero-border-glow-in 1.5s ease-out forwards;
}

body.k2-site .k2-player-hero.k2-player-hero--feast:not(.k2-amiga-player-glance__hero) .k2-player-hero__avatar {
	animation: k2-player-hero-avatar-glow-in 1.5s ease-out forwards;
}

html.k2-player-hero-glow-ready body.k2-site .k2-player-hero.k2-player-hero--feast:not(.k2-amiga-player-glance__hero),
html.k2-player-hero-glow-ready body.k2-site .k2-player-hero.k2-player-hero--feast:not(.k2-amiga-player-glance__hero) .k2-player-hero__avatar {
	animation: none;
}

@media (prefers-reduced-motion: reduce) {
	body.k2-site .k2-player-hero.k2-player-hero--feast:not(.k2-amiga-player-glance__hero) {
		animation: none;
	}

	body.k2-site .k2-player-hero.k2-player-hero--feast:not(.k2-amiga-player-glance__hero) .k2-player-hero__avatar {
		animation: none;
	}
}
