/**
 * Homepage — tabbed media carousel (style Onewheel, tokens Ride On).
 */

.tac-section {
	--tac-ink: var(--ink, #0b0b0b);
	--tac-muted: var(--ink-muted, #595959);
	--tac-surface: var(--surface, #f5f5f7);
	--tac-white: var(--white-pure, #fff);
	background: var(--tac-surface);
	color: var(--tac-ink);
	padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(3rem, 6vw, 5rem);
	overflow: hidden;
}

.tac-inner {
	width: min(1120px, calc(100% - 2rem));
	margin: 0 auto;
}

.tac-tabs {
	margin: 0 0 clamp(1.25rem, 3vw, 2rem);
}

.tac-tabs__track {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem 0.75rem;
}

.tac-tab {
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--tac-muted);
	cursor: pointer;
	font-family: "space-grotesk", "Space Grotesk", system-ui, sans-serif;
	font-size: clamp(0.82rem, 1.5vw, 1rem);
	font-weight: 600;
	letter-spacing: 0.01em;
	line-height: 1.2;
	padding: 0.55rem 0.9rem;
	border-radius: 999px;
	transition: color 0.2s ease, background 0.2s ease;
}

.tac-tab:hover,
.tac-tab:focus-visible {
	color: var(--tac-ink);
	outline: none;
}

.tac-tab.is-active {
	color: var(--tac-ink);
	background: var(--tac-white);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.tac-tab__label--mobile {
	display: none;
}

.tac-carousel-wrap {
	position: relative;
	width: 100%;
}

.tac-carousel {
	margin: 0;
}

.tac-carousel .slick-list {
	padding: 0 12% !important;
}

.tac-carousel .slick-track {
	display: flex;
	align-items: stretch;
}

.tac-slide {
	padding: 0 0.55rem;
	height: auto;
}

.tac-slide__inner {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	height: 100%;
}

.tac-slide__media {
	position: relative;
	border-radius: 1rem;
	overflow: hidden;
	background: #111;
	aspect-ratio: 16 / 11.2;
	isolation: isolate;
}

.tac-poster,
.tac-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tac-video {
	opacity: 0;
	transition: opacity 0.35s ease;
	z-index: 1;
}

.tac-video.is-ready,
.tac-video.is-playing {
	opacity: 1;
}

.tac-slide__content {
	padding: 0 0.35rem;
	min-height: 4.5rem;
}

.tac-slide__description {
	margin: 0;
	text-align: center;
	font-family: "space-grotesk", "Space Grotesk", system-ui, sans-serif;
	font-size: clamp(0.95rem, 1.7vw, 1.125rem);
	line-height: 1.45;
	color: var(--tac-ink);
	max-width: 42rem;
	margin-inline: auto;
	opacity: 0.35;
	transform: translateY(0.25rem);
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.tac-slide.slick-center .tac-slide__description,
.tac-slide.slick-current .tac-slide__description {
	opacity: 1;
	transform: none;
}

.tac-slide:not(.slick-center) .tac-slide__media {
	transform: scale(0.94);
	opacity: 0.72;
	transition: transform 0.35s ease, opacity 0.35s ease;
}

.tac-slide.slick-center .tac-slide__media,
.tac-slide.slick-current .tac-slide__media {
	transform: none;
	opacity: 1;
}

.tac-arrow {
	position: absolute;
	top: calc(50% - 3.5rem);
	z-index: 3;
	width: 2.75rem;
	height: 2.75rem;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	color: var(--tac-ink);
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease, background 0.2s ease;
}

.tac-arrow svg {
	width: 1.15rem;
	height: 1.15rem;
}

.tac-arrow:hover,
.tac-arrow:focus-visible {
	transform: scale(1.05);
	outline: none;
}

.tac-arrow--prev {
	left: max(0.75rem, 4vw);
}

.tac-arrow--next {
	right: max(0.75rem, 4vw);
}

.hide-small {
	display: block;
}

.show-small {
	display: none !important;
}

@media (max-width: 767px) {
	.tac-section {
		padding: 2rem 0 2.75rem;
	}

	.tac-tab {
		font-size: 0.8rem;
		padding: 0.45rem 0.7rem;
	}

	.tac-tab__label--desktop {
		display: none;
	}

	.tac-tab__label--mobile {
		display: inline;
	}

	.tac-carousel .slick-list {
		padding: 0 6% !important;
	}

	.tac-slide {
		padding: 0 0.35rem;
	}

	.tac-slide__media {
		border-radius: 0.75rem;
	}

	.hide-small {
		display: none !important;
	}

	.show-small {
		display: block !important;
	}

	.tac-video.show-small {
		display: block !important;
	}

	.tac-arrow {
		width: 2.35rem;
		height: 2.35rem;
		top: calc(42% - 1rem);
	}

	.tac-slide__description {
		font-size: 0.92rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tac-slide__media,
	.tac-slide__description,
	.tac-video,
	.tac-tab,
	.tac-arrow {
		transition: none !important;
	}
}
