/**
 * assets/css/oga-modern-highlight.css — Modern Text Highlight Effects
 * ============================================================================
 * A small, tasteful set of modern typographic highlight effects, themed to the
 * OGA deep-navy / deep-red / gold brand. Used two ways:
 *   1. Reusable classes + the [hl] shortcode (<mark class="oga-hl">).
 *   2. Auto-applied to key headlines across the magazine, feed shop and
 *      section labels.
 * Respects prefers-reduced-motion.
 * @since 2026-07-29
 */

:root {
	--hl-red:   var(--brand-red-600, #b01c2e);
	--hl-red2:  var(--brand-red-500, #d7273c);
	--hl-navy:  var(--brand-navy, #001D6C);
	--hl-navy2: var(--brand-blue-600, #0A2463);
	--hl-gold:  var(--brand-gold, #EAB308);
	--hl-gold2: var(--brand-gold2, #FDE047);
	--hl-ink:   var(--text-primary, #14181f);
}

/* ══════════════════════════════════════════════════════════════════════════
 * 1 · MARKER SWEEP — highlighter that sweeps in behind the text
 * ══════════════════════════════════════════════════════════════════════════ */
.oga-hl,
mark.oga-hl {
	position: relative;
	background: transparent;
	color: inherit;
	padding: 0 .12em;
	border-radius: .12em;
	white-space: nowrap;
	background-image: linear-gradient(104deg,
		color-mix(in srgb, var(--hl-gold) 62%, transparent) 0%,
		color-mix(in srgb, var(--hl-gold2) 70%, transparent) 100%);
	background-repeat: no-repeat;
	background-position: 0 88%;
	background-size: 0% 32%;
	transition: background-size .5s cubic-bezier(.2, .7, .2, 1);
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}
.oga-hl.is-in,
.oga-hl:hover,
mark.oga-hl { background-size: 100% 32%; }

/* Red marker variant */
.oga-hl--red {
	background-image: linear-gradient(104deg,
		color-mix(in srgb, var(--hl-red) 30%, transparent) 0%,
		color-mix(in srgb, var(--hl-red2) 40%, transparent) 100%);
}

/* Full solid pill highlight (for chips / labels) */
.oga-hl--pill {
	padding: .12em .5em;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--hl-navy), var(--hl-navy2));
	background-size: 100% 100%;
	color: #fff;
}

/* ══════════════════════════════════════════════════════════════════════════
 * 2 · GRADIENT TEXT — animated brand-gradient headline fill
 * ══════════════════════════════════════════════════════════════════════════ */
.oga-hl-gradient {
	background: linear-gradient(100deg, var(--hl-navy) 0%, var(--hl-red) 45%, var(--hl-gold) 100%);
	background-size: 220% auto;
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
	animation: oga-hl-pan 7s ease-in-out infinite;
}
@keyframes oga-hl-pan {
	0%, 100% { background-position: 0% 50%; }
	50%      { background-position: 100% 50%; }
}

/* ══════════════════════════════════════════════════════════════════════════
 * 3 · UNDERLINE SWEEP — animated gradient underline on hover / in-view
 * ══════════════════════════════════════════════════════════════════════════ */
.oga-hl-underline {
	position: relative;
	display: inline;
	background-image: linear-gradient(90deg, var(--hl-red), var(--hl-gold));
	background-repeat: no-repeat;
	background-position: 0 100%;
	background-size: 0% 2px;
	transition: background-size .4s ease;
	padding-bottom: 2px;
}
.oga-hl-underline.is-in,
.oga-hl-underline:hover { background-size: 100% 2px; }

/* ══════════════════════════════════════════════════════════════════════════
 * 4 · GLOW — soft brand glow for emphasis words
 * ══════════════════════════════════════════════════════════════════════════ */
.oga-hl-glow {
	color: var(--hl-red);
	font-weight: 700;
	text-shadow: 0 0 14px color-mix(in srgb, var(--hl-red) 45%, transparent);
}

/* ══════════════════════════════════════════════════════════════════════════
 * 5 · AUTO-APPLY to key surfaces
 *    Magazine feed titles + detail title get the marker sweep; section
 *    headlines get the gradient fill; feed-shop titles get the underline.
 * ══════════════════════════════════════════════════════════════════════════ */

/* Section headlines → animated gradient fill */
.oga-mag-section-head-title,
.oga-us-headline,
.oga-ps-headline {
	background: linear-gradient(100deg, var(--hl-navy) 0%, var(--hl-red) 55%, var(--hl-gold) 100%);
	background-size: 220% auto;
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
	animation: oga-hl-pan 8s ease-in-out infinite;
}

/* Magazine + feed titles → marker sweep on the leading clause */
.oga-feed-title,
.oga-detail-title {
	background-image: linear-gradient(104deg,
		color-mix(in srgb, var(--hl-gold) 0%, transparent) 0%,
		color-mix(in srgb, var(--hl-gold) 55%, transparent) 100%);
	background-repeat: no-repeat;
	background-position: 0 90%;
	background-size: 100% 30%;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
	transition: background-size .45s ease, background-image .45s ease;
}
.oga-feed-item:hover .oga-feed-title {
	background-image: linear-gradient(104deg,
		color-mix(in srgb, var(--hl-gold) 55%, transparent) 0%,
		color-mix(in srgb, var(--hl-gold2) 70%, transparent) 100%);
}

/* Section labels → subtle gold marker underline */
.oga-section-label {
	position: relative;
}

/* color-mix fallback */
@supports not (color: color-mix(in srgb, red 10%, transparent)) {
	.oga-hl, mark.oga-hl { background: rgba(234,179,8,.55); background-size: 100% 100%; }
	.oga-feed-title, .oga-detail-title { background: none; }
}

@media (prefers-reduced-motion: reduce) {
	.oga-hl-gradient,
	.oga-mag-section-head-title,
	.oga-us-headline,
	.oga-ps-headline { animation: none; }
	.oga-hl, .oga-hl-underline, .oga-feed-title, .oga-detail-title { transition: none; }
}
