:root { --guirnalda: 4.15rem; }

.nieve {
	position: fixed;
	inset: 0;
	z-index: 4;
	overflow: hidden;
	pointer-events: none;
}

.nieve span {
	position: absolute;
	top: -10px;
	color: #fff;
	text-shadow: 0 0 6px rgba(255, 255, 255, 0.45);
	animation: caer linear infinite;
	user-select: none;
}

@keyframes caer {
	to { transform: translate3d(var(--x, 30px), 105vh, 0) rotate(360deg); }
}

.guirnalda {
	position: sticky;
	top: 0;
	z-index: 6;
	height: var(--guirnalda);
	overflow: hidden;
	pointer-events: none;
	background: var(--cabecera, #1a3f22);
}

.guirnalda-cable {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.guirnalda-cable path {
	fill: none;
	stroke: #3a2a18;
	stroke-width: 2.4;
	stroke-linecap: round;
}

.luz {
	position: absolute;
	width: 12px;
	height: 16px;
	margin-left: -6px;
	border-radius: 45% 45% 50% 50%;
	transform-origin: center top;
	animation: parpadeo 1.5s ease-in-out infinite;
}

.luz::before {
	content: "";
	position: absolute;
	top: -5px;
	left: 50%;
	width: 6px;
	height: 6px;
	margin-left: -3px;
	border-radius: 2px 2px 1px 1px;
	background: #3a2e22;
}

.luz-roja { background: #ef4444; box-shadow: 0 0 8px #ef4444e6, 0 0 14px #ef444499; }
.luz-verde { background: #22c55e; box-shadow: 0 0 8px #22c55ee6, 0 0 14px #22c55e99; }
.luz-amarilla { background: #facc15; box-shadow: 0 0 8px #facc15e6, 0 0 14px #facc1599; }

@keyframes parpadeo {
	0%, 100% { opacity: 1; transform: scale(1); filter: brightness(1.2); }
	50% { opacity: 0.3; transform: scale(0.8); filter: brightness(0.5); }
}

.cabecera { top: var(--guirnalda); }

main section,
.ruta-elige { scroll-margin-top: calc(5.5rem + var(--guirnalda)); }

.banda-abierta.proxima {
	position: relative;
	z-index: 1;
	overflow: hidden;
	color: #fff;
	background: #c8102e;
}

.banda-abierta.proxima::before {
	content: "";
	position: absolute;
	z-index: -1;
	inset: -80% -10%;
	background: repeating-linear-gradient(-45deg, #c8102e 0 22px, #0f7a32 22px 44px);
	animation: cinta-navidad 0.9s linear infinite;
}

.banda-abierta.proxima strong,
.banda-abierta.proxima .banda-flecha { color: #fff; }

.banda-abierta.proxima:hover .banda-flecha { color: #fff; }

@keyframes cinta-navidad {
	to { transform: translate3d(62px, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
	.nieve { display: none; }
	.luz { animation: none; opacity: 1; }
	.banda-abierta.proxima::before { animation: none; }
}
