/* =============================================
   Developer Landing — Sticky Section Navigation
   Mobile-first · Scrollspy · No dependencies
   ============================================= */

/* Initial estimates; JS overrides these after measuring the actual topbar */
:root {
	--dvl-topbar-h: 56px;
	--dvl-scroll-offset: 112px;
}

/* Override main.css scroll-padding-top so anchor/scrollIntoView navigation
   clears the fixed topbar + sticky section nav */
html {
	scroll-padding-top: var(--dvl-scroll-offset, 112px);
}

/* === Nav wrapper — sticky below fixed topbar === */
.dvl-section-nav {
	position: sticky;
	top: var(--dvl-topbar-h, 56px);
	left: 0;
	right: 0;
	z-index: 80; /* below topbar (100), FAB (95), bottom-nav (90); above content */
	background: #fffafb;
	border-bottom: 1px solid rgba(23, 35, 60, 0.08);
	box-shadow: 0 4px 16px rgba(23, 35, 60, 0.06);
	overflow: hidden; /* contain the scrollable track */
}

/* === Scrollable track === */
.dvl-section-nav__track {
	display: flex;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none; /* Firefox */
	max-width: var(--dvl-container, 1180px);
	margin: 0 auto;
	padding: 4px 0.25rem;
}

.dvl-section-nav__track::-webkit-scrollbar {
	display: none;
}

/* === Tab icon === */
.dvl-snav-icon {
	width: 15px;
	height: 15px;
	flex-shrink: 0;
	transition: color 0.2s ease;
}

/* === Individual tab === */
.dvl-section-nav__tab {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 0 14px;
	height: 36px;
	font-size: 0.875rem;
	font-weight: 500;
	color: #5f6673;
	text-decoration: none;
	white-space: nowrap;
	border-radius: 999px;
	transition: color 0.2s ease, background-color 0.2s ease;
}

.dvl-section-nav__tab:hover {
	background: #fff1f4;
	color: #17233c;
	text-decoration: none;
}

.dvl-section-nav__tab.is-active {
	background: #ff3b5c;
	color: #ffffff;
	font-weight: 600;
	box-shadow: 0 5px 14px rgba(255, 59, 92, 0.20);
}

/* === Per-section icon accent colors (inactive only; overridden to white when active) === */
[data-target="vouchers"]      .dvl-snav-icon { color: #ff3b5c; }
[data-target="dvl-countdown"] .dvl-snav-icon { color: #f59e0b; }
[data-target="products"]      .dvl-snav-icon { color: #3b82f6; }
[data-target="benefits"]      .dvl-snav-icon { color: #10b981; }
[data-target="proof"]         .dvl-snav-icon { color: #f59e0b; }
[data-target="faq"]           .dvl-snav-icon { color: #8b5cf6; }
[data-target="form"]          .dvl-snav-icon { color: #ef4444; }
/* Active pill overrides every per-section accent — higher specificity wins */
.dvl-section-nav__tab.is-active .dvl-snav-icon { color: #fff; }

/* Keyboard focus */
.dvl-section-nav__tab:focus-visible {
	outline: 2px solid #ff3b5c;
	outline-offset: 2px;
	border-radius: 999px;
}

.dvl-section-nav__tab:focus:not(:focus-visible) {
	outline: none;
}

/* === Desktop === */
@media (min-width: 768px) {
	.dvl-section-nav__tab {
		padding: 0 16px;
		font-size: 0.9375rem;
	}
}

/* === Reduced motion — disable tab transition === */
@media (prefers-reduced-motion: reduce) {
	.dvl-section-nav__tab,
	.dvl-snav-icon {
		transition: none;
	}
}
