/* ==========================================================================
   Pura Vida Distribution — seasons.css
   Decoración festiva (solo estética). Todo cuelga de html[data-season], que
   js/seasons.js pone/quita; sin ese atributo este archivo no hace nada.
   Variables que fija el JS: --season-1/2/3 (+ -rgb) y --season-accent.
   Las ilustraciones las dibuja js/seasons-art.js.
   ========================================================================== */

html[data-season] {
  --gold-500: var(--season-accent);   /* el acento dorado de la marca toma el color del tema */
  --season-strip-h: 40px;
  --season-scene-h: clamp(110px, min(20vw, 26vh), 280px);   /* alto del paisaje al pie del hero */
}
html[data-season].season-strip-off { --season-strip-h: 0px; }

/* ----- Franja de saludo (sobre el header) ----- */
.season-strip {
  position: relative; z-index: 101; overflow: hidden;
  min-height: 40px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 7px 46px;
  background: linear-gradient(95deg, var(--season-1), var(--season-2) 55%, var(--season-1));
  background-size: 200% 100%;
  animation: seasonFlow 14s linear infinite;
  color: #fff;
  font: 600 0.9rem/1.3 var(--font-body); letter-spacing: 0.01em; text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.18);
}
.season-strip::after {          /* brillo que cruza la franja */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.28) 50%, transparent 65%);
  transform: translateX(-120%); animation: seasonShine 7s ease-in-out infinite;
}
.season-strip-icon { display: grid; place-items: center; width: 24px; height: 24px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35)); animation: seasonBob 2.8s ease-in-out infinite; }
.season-strip-icon:last-of-type { animation-delay: -1.4s; }
.season-strip-icon svg { width: 100%; height: 100%; }
.season-strip-text { text-wrap: balance; position: relative; z-index: 1; }
.season-strip-close {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 26px; height: 26px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, 0.2); color: #fff;
  font-size: 1.1rem; line-height: 1; cursor: pointer; transition: background 0.2s;
}
.season-strip-close:hover { background: rgba(255, 255, 255, 0.36); }
@keyframes seasonFlow { to { background-position: -200% 0; } }
@keyframes seasonShine { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
@keyframes seasonBob { 0%, 100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-3px) rotate(8deg); } }

/* El hero sigue ocupando la pantalla completa aunque haya franja arriba */
/* (en pantallas bajas el hero crece lo justo para que texto y botones no choquen con la guirnalda ni el paisaje) */
html[data-season] .carousel-track { min-height: max(calc(100svh - var(--header-h) - var(--season-strip-h)), calc(var(--season-scene-h) + 500px)); }

/* ----- Header con cinta de color ----- */
html[data-season] .site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; pointer-events: none;
  background: linear-gradient(90deg, var(--season-1), var(--season-3) 50%, var(--season-2));
}

/* ----- Hero: tinte, luces, paisaje y guirnalda ----- */
html[data-season] .carousel::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(var(--season-1-rgb), 0.36), transparent 62%),
    linear-gradient(0deg, rgba(var(--season-2-rgb), 0.3), transparent 46%),
    linear-gradient(135deg, rgba(var(--season-1-rgb), 0.18), rgba(var(--season-2-rgb), 0.12));
}
.season-hero { isolation: isolate; }

.season-orbs { position: absolute; inset: 0; z-index: 3; overflow: hidden; pointer-events: none; mix-blend-mode: screen; opacity: 0.55; }
.season-orbs span { position: absolute; border-radius: 50%; filter: blur(22px); animation: seasonOrb ease-in-out infinite alternate; }
@keyframes seasonOrb { from { transform: translate3d(-26px, 18px, 0) scale(0.92); opacity: 0.5; } to { transform: translate3d(30px, -26px, 0) scale(1.12); opacity: 1; } }

.season-scene { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; height: var(--season-scene-h); pointer-events: none; }
/* El texto y los botones del hero quedan SIEMPRE por encima del paisaje (no se tapan) */
html[data-season] .slide-content { padding-bottom: calc(var(--season-scene-h) * 0.85 + 28px); }
.season-scene-svg { display: block; width: 100%; height: 100%; }

.season-bunting { position: absolute; top: 0; left: 0; right: 0; z-index: 4; height: 86px; pointer-events: none; overflow: hidden; filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.28)); }
.season-bunting-svg { display: block; }

/* animaciones dentro de los SVG */
.bn { transform-box: fill-box; transform-origin: 50% 0; animation: seasonSwing 3.8s ease-in-out infinite; }
@keyframes seasonSwing { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
.glow { animation: seasonTwinkle 2.4s ease-in-out infinite; }
.bn:nth-child(odd) .glow { animation-delay: -1.2s; }
.sw { transform-box: fill-box; transform-origin: 50% 100%; animation: seasonSway 4.5s ease-in-out infinite; }
@keyframes seasonSway { 0%, 100% { transform: rotate(-3.5deg); } 50% { transform: rotate(3.5deg); } }
.tw { animation: seasonTwinkle 3.2s ease-in-out infinite; }
@keyframes seasonTwinkle { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
.wv { animation: seasonWave linear infinite; }
@keyframes seasonWave { to { transform: translateX(-1600px); } }
.bat-fly { animation: seasonBat 15s linear infinite; }
@keyframes seasonBat {
  0% { transform: translate(-80px, 40px); } 25% { transform: translate(380px, 0); }
  50% { transform: translate(820px, 46px); } 75% { transform: translate(1240px, 6px); } 100% { transform: translate(1700px, 36px); }
}

/* ----- Partículas con profundidad ----- */
.season-fx { position: fixed; inset: 0; z-index: 90; overflow: hidden; pointer-events: none; }
.season-fx > span { position: absolute; top: -40px; will-change: transform; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.22)); }
.season-fx > span svg { width: 100%; height: 100%; display: block; animation: seasonSpin var(--sp, 6s) ease-in-out infinite alternate; }
.season-fx > span.d0 { filter: blur(0.8px); }
.season-fx-fall > span { animation-name: seasonFall; animation-timing-function: linear; animation-iteration-count: infinite; }
.season-fx-rise > span { top: auto; bottom: -40px; animation-name: seasonRise; animation-timing-function: ease-in; animation-iteration-count: infinite; }
@keyframes seasonFall {
  0%   { transform: translate3d(0, 0, 0); }
  50%  { transform: translate3d(var(--dx), 55vh, 0); }
  100% { transform: translate3d(calc(var(--dx) * -0.6), 112vh, 0); }
}
@keyframes seasonRise {
  0%   { transform: translate3d(0, 0, 0); }
  50%  { transform: translate3d(var(--dx), -55vh, 0); }
  100% { transform: translate3d(calc(var(--dx) * -0.6), -112vh, 0); }
}
@keyframes seasonSpin { from { transform: rotate(-35deg) scaleX(1); } to { transform: rotate(35deg) scaleX(0.7); } }

/* ----- Fuegos artificiales ----- */
.season-burst { position: absolute; width: 0; height: 0; }
.season-burst span {
  position: absolute; left: -2.5px; top: -2.5px; width: 5px; height: 5px; border-radius: 50%;
  background: var(--bc); box-shadow: 0 0 8px 1px var(--bc);
  animation: seasonBurst 1.6s cubic-bezier(0.12, 0.7, 0.3, 1) forwards;
}
.season-burst i { position: absolute; left: -26px; top: -26px; width: 52px; height: 52px; border-radius: 50%; background: radial-gradient(circle, var(--bc), transparent 70%); animation: seasonFlash 0.7s ease-out forwards; }
@keyframes seasonBurst {
  0%   { transform: rotate(var(--a)) translateX(0) scale(1.2); opacity: 1; }
  65%  { opacity: 1; }
  100% { transform: rotate(var(--a)) translateX(var(--d)) translateY(24px) scale(0.2); opacity: 0; }
}
@keyframes seasonFlash { from { transform: scale(0.2); opacity: 0.9; } to { transform: scale(2.2); opacity: 0; } }

/* ----- Resplandor en las esquinas ----- */
.season-glow {
  position: fixed; inset: 0; z-index: 89; pointer-events: none;
  background:
    radial-gradient(60% 45% at 0% 0%, rgba(var(--season-1-rgb), 0.16), transparent 70%),
    radial-gradient(60% 45% at 100% 100%, rgba(var(--season-2-rgb), 0.16), transparent 70%);
}

/* ----- Footer con ola de color ----- */
html[data-season] .site-footer { position: relative; }
.season-footer-wave { position: absolute; left: 0; right: 0; bottom: 100%; height: 30px; pointer-events: none; line-height: 0; }
.season-footer-wave svg { width: 100%; height: 100%; display: block; }
.season-footer-wave .w1 { fill: var(--green-950); }
.season-footer-wave .w2 { fill: var(--green-950); }
.season-footer-wave::before {   /* hilo de color detrás de la ola */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 100%;
  background: linear-gradient(90deg, var(--season-1), var(--season-3), var(--season-2));
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'><path d='M0 18C120 0 240 0 360 14s240 20 360 6 240-22 360-8 240 18 360 6V40H0z'/></svg>") center/100% 100% no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'><path d='M0 18C120 0 240 0 360 14s240 20 360 6 240-22 360-8 240 18 360 6V40H0z'/></svg>") center/100% 100% no-repeat;
}

@media (max-width: 700px) {
  .season-strip { padding: 7px 40px; font-size: 0.82rem; }
  html[data-season] { --season-scene-h: clamp(100px, 30vw, 170px); }
  .season-strip-icon:last-of-type { display: none; }
  .season-bunting { height: 70px; }
}
@media (prefers-reduced-motion: reduce) {
  .season-strip, .season-strip::after, .season-strip-icon, .season-orbs span,
  .bn, .glow, .sw, .tw, .wv, .bat-fly { animation: none; }
}
