/**
 * TICKER
 *
 * Gold ribbon above the footer. CSS-only marquee — the track holds the list
 * twice and slides exactly -50%, so the second pass lands where the first
 * started and the seam never shows.
 *
 * Measured: 74px band, Kaneda Bold 32px black, 0.9 line-height.
 */

@layer components {

	.ticker {
		overflow: hidden;
		background-color: var(--clr-accent);
		color: var(--black-1000);
		/* Measured 74px; shrinks with the type on small screens. */
		padding-block: clamp(0.75rem, 2.2vw, 1.3125rem);
		user-select: none;
	}

	.ticker__track {
		display: flex;
		align-items: center;
		gap: clamp(0.75rem, 1.4vw, 1.25rem);
		inline-size: max-content;
		animation: dl-ticker var(--ticker-duration, 40s) linear infinite;
	}

	.ticker__item,
	.ticker__sep {
		font-family: var(--font-display);
		font-weight: var(--weight-bold);
		font-size: clamp(1.25rem, 2.2vw, 2rem);      /* → 32px */
		line-height: 0.9;
		letter-spacing: 0.01em;
		text-transform: uppercase;
		white-space: nowrap;
	}

	/* Set solid so the separator does not read as part of the phrase. */
	.ticker__sep {
		font-size: 0.7em;
		transform: translateY(-0.12em);
	}

	@keyframes dl-ticker {
		from { transform: translate3d(0, 0, 0); }
		to   { transform: translate3d(-50%, 0, 0); }
	}

	/*
	 * A ribbon that never stops is hostile to anyone who needs to read it, or
	 * who gets motion sick. Hovering parks it, and reduced-motion stops it dead.
	 */
	.ticker:hover .ticker__track {
		animation-play-state: paused;
	}

	@media (prefers-reduced-motion: reduce) {
		.ticker__track {
			animation: none;
			/* One pass only — the duplicate is there to make a loop seamless
			   and is pure noise once nothing is moving. */
			inline-size: 100%;
			overflow: hidden;
			flex-wrap: wrap;
			justify-content: center;
		}
	}
}
