/**
 * News bar marquee.
 */

.ss-newsbar {
	--nb-bg: var(--ss-champagne);
	--nb-fg: var(--ss-ink);
	position: relative;
	z-index: 2;
	overflow: hidden;
	background: var(--nb-bg);
	color: var(--nb-fg);
	border-block: 1px solid rgba(17, 17, 16, .08);
}

.ss-newsbar__viewport {
	overflow: hidden;
	mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}

.ss-newsbar__track {
	display: flex;
	width: max-content;
}

.ss-newsbar.is-running .ss-newsbar__track {
	animation: ss-newsbar var(--nb-duration, 60s) linear infinite;
}

.ss-newsbar--pausable:hover .ss-newsbar__track,
.ss-newsbar--pausable:focus-within .ss-newsbar__track {
	animation-play-state: paused;
}

@keyframes ss-newsbar {
	to {
		transform: translate3d(calc(var(--nb-distance, 50%) * -1), 0, 0);
	}
}

.ss-newsbar__list {
	display: flex;
	flex: none;
	align-items: center;
	list-style: none;
}

.ss-newsbar__item {
	display: inline-flex;
	flex: none;
	align-items: center;
	gap: 1.1rem;
	padding: 1.15rem 1.4rem 1.15rem 1.1rem;
	white-space: nowrap;
}

.ss-newsbar__icon {
	display: inline-flex;
	opacity: .8;
}

.ss-newsbar__text {
	font-family: var(--ss-font-display);
	font-size: clamp(1.25rem, 1.1rem + .5vw, 1.625rem);
	line-height: 1.2;
	letter-spacing: -.005em;
	color: inherit;
	text-decoration: none;
}

a.ss-newsbar__text {
	background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
	transition: background-size .45s var(--ss-ease);
}

a.ss-newsbar__text:hover,
a.ss-newsbar__text:focus-visible {
	background-size: 100% 1px;
}

.ss-newsbar__link {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	font-size: .7rem;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: inherit;
	text-decoration: none;
	border-bottom: 1px solid currentColor;
}

/* Reduced motion: a static, swipeable strip. */
@media (prefers-reduced-motion: reduce) {
	.ss-newsbar__viewport {
		overflow-x: auto;
		mask-image: none;
		scrollbar-width: none;
	}

	.ss-newsbar__viewport::-webkit-scrollbar {
		display: none;
	}

	.ss-newsbar.is-running .ss-newsbar__track {
		animation: none;
	}
}
