/* NUBE — Fiestas (Navidad y Año Nuevo).
   Lo activa assets/js/seasons.js (html.season-holiday + #season-lights). */

.season-fx {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.season-spark {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: #f4e3b4;
  box-shadow: 0 0 8px 1px rgba(244, 227, 180, .45);
  opacity: 0;
  animation: season-twinkle var(--dur) ease-in-out var(--delay) infinite;
}
.season-spark--1 { background: #8fd6bb; box-shadow: 0 0 8px 1px rgba(143, 214, 187, .4); }
.season-spark--2 { background: #f2a6bf; box-shadow: 0 0 8px 1px rgba(242, 166, 191, .4); }
@keyframes season-twinkle {
  0%, 100% { opacity: 0; transform: scale(.5); }
  50% { opacity: .75; transform: scale(1); }
}

/* Guirnalda: queda arriba del documento y se va con el scroll. */
.season-lights {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 22px;
  z-index: 705;
  display: flex;
  justify-content: space-around;
  pointer-events: none;
}
.season-lights::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 2px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(214, 184, 121, .4), transparent);
}
.season-bulb {
  position: relative;
  top: calc(2px + var(--drop, 0px));
  width: 5px;
  height: 8px;
  border-radius: 50% 50% 55% 55%;
  background: #f4e3b4;
  box-shadow: 0 0 8px 2px rgba(244, 227, 180, .45);
  animation: season-bulb-glow 3.4s ease-in-out var(--delay) infinite;
}
.season-bulb--1 { background: #f2a6bf; box-shadow: 0 0 8px 2px rgba(242, 166, 191, .4); }
.season-bulb--2 { background: #8fd6bb; box-shadow: 0 0 8px 2px rgba(143, 214, 187, .4); }
.season-bulb--3 { background: #9cc3f0; box-shadow: 0 0 8px 2px rgba(156, 195, 240, .4); }
@keyframes season-bulb-glow {
  0%, 100% { opacity: .5; }
  50% { opacity: 1; }
}

/* Ornamento dorado bajo títulos */
.season-ornament { display: block; margin: 2px 0 14px; line-height: 0; color: var(--text-muted, #8a93a6); }

/* ---------- Sección Fiestas: Navidad | Deseo NUBE | Año Nuevo ---------- */
.season-fiestas[hidden] { display: none; }
.season-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 1.12fr) minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
  margin: 26px 0 8px;
}

.season-count {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 18px 22px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, .14);
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
.season-count::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 50% 0%, var(--glow-a) 0%, transparent 62%),
    radial-gradient(ellipse at 50% 110%, var(--glow-b) 0%, transparent 65%),
    linear-gradient(170deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .015));
}
.season-count--xmas { --tone: #f2a6bf; --tone2: #e6c97f; --glow-a: rgba(232, 112, 138, .26); --glow-b: rgba(214, 184, 121, .22); border-color: rgba(242, 166, 191, .3); }
.season-count--ny { --tone: #9cc3f0; --tone2: #8fd6bb; --glow-a: rgba(156, 195, 240, .24); --glow-b: rgba(143, 214, 187, .18); border-color: rgba(156, 195, 240, .3); }

.season-count__deco { width: 100%; height: 38px; margin: -2px 0 6px; color: var(--tone); overflow: visible; }
.season-count--xmas .season-count__deco circle { animation: season-bulb-glow 3.2s ease-in-out infinite; }
.season-count--xmas .season-count__deco circle:nth-of-type(2) { animation-delay: -1s; }
.season-count--xmas .season-count__deco circle:nth-of-type(3) { animation-delay: -2s; }
.season-count--ny .season-count__deco g { animation: season-bulb-glow 4s ease-in-out infinite; }

.season-count__label {
  margin: 0 0 12px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--tone);
}
.season-count__live { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; }
.season-count__live[hidden] { display: none; }

.season-ring { position: relative; width: min(100%, 176px); aspect-ratio: 1; }
.season-ring svg { width: 100%; height: 100%; display: block; }
.season-ring__bg { fill: none; stroke: rgba(255, 255, 255, .1); stroke-width: 5; }
.season-ring__fg {
  fill: none;
  stroke: var(--tone);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 326.7;
  stroke-dashoffset: 326.7;
  filter: drop-shadow(0 0 6px var(--tone));
  transition: stroke-dashoffset 1.2s ease;
}
.season-ring__center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.season-ring__center b {
  font-family: "Marcellus", "Cormorant Garamond", serif;
  font-weight: 400;
  font-size: clamp(2.8rem, 6vw, 4rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.season-ring__center span { font-size: .6rem; letter-spacing: .24em; text-transform: uppercase; opacity: .7; margin-top: 2px; }

.season-count__units {
  display: flex;
  gap: 8px;
  width: 100%;
  justify-content: center;
}
.season-count__units div {
  flex: 1;
  max-width: 78px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
}
.season-count__units b {
  font-family: "Marcellus", "Cormorant Garamond", serif;
  font-weight: 400;
  font-size: 1.4rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.season-count__units span { font-size: .52rem; letter-spacing: .16em; text-transform: uppercase; opacity: .6; }
.season-count__date { margin: 14px 0 0; font-size: .64rem; letter-spacing: .2em; text-transform: uppercase; opacity: .55; }
.season-count__done {
  margin: 30px 0 0;
  font-family: "Marcellus", "Cormorant Garamond", serif;
  font-size: clamp(1.8rem, 4.6vw, 2.6rem);
  color: var(--tone);
}
.season-count__done[hidden] { display: none; }

/* Centro: llamado a dejar un deseo */
.season-wish {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 26px 24px 22px;
  border-radius: 26px;
  border: 1px solid rgba(214, 184, 121, .4);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(244, 227, 180, .2), transparent 62%),
    linear-gradient(170deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02));
  box-shadow: 0 0 44px rgba(214, 184, 121, .16);
  text-align: center;
}
.season-wish__eyebrow { margin: 0 0 6px; font-size: .64rem; letter-spacing: .3em; text-transform: uppercase; color: var(--accent, #d6b879); }
.season-wish__title { margin: 0 0 8px; font-family: "Marcellus", "Cormorant Garamond", serif; font-weight: 400; font-size: clamp(1.7rem, 3.6vw, 2.4rem); line-height: 1.1; }
.season-wish__lead { margin: 0 0 16px; font-size: .86rem; opacity: .75; }
.season-wish__form { display: grid; gap: 10px; }
.season-wish__form input[type="text"] {
  width: 100%; box-sizing: border-box; padding: 12px 16px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .06);
  color: inherit; font-family: inherit; font-size: .9rem; text-align: center;
}
.season-wish__form input[type="text"]:focus { outline: none; border-color: var(--accent, #d6b879); }
.season-wish__form input::placeholder { color: var(--text-muted, #8a93a6); }
.season-wish__submit {
  padding: 13px 22px; border: none; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent, #d6b879), var(--accent-hover, #e6c97f));
  color: var(--primary-dark, #121a33); font-family: inherit; font-size: .76rem; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase; cursor: pointer;
  box-shadow: 0 8px 24px rgba(214, 184, 121, .3);
}
.season-wish__submit:disabled { opacity: .55; cursor: default; }
.season-wish__meta { display: flex; justify-content: space-between; gap: 12px; margin: 0; font-size: .7rem; text-align: left; }
.season-wish__status { min-height: 1em; opacity: .85; }
.season-wish__status[data-status="ok"] { color: var(--accent, #d6b879); opacity: 1; }
.season-wish__status[data-status="error"] { color: #e28a8a; opacity: 1; }
.season-wish__counter { opacity: .6; white-space: nowrap; }
.season-wish__counter[data-low="1"] { color: #e6c46e; opacity: 1; }
.season-wish__honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Deseos de la comunidad (debajo) */
.season-wishes { margin-top: 34px; }
.season-wishes__title { margin: 0 0 4px; font-family: "Marcellus", "Cormorant Garamond", serif; font-weight: 400; font-size: clamp(1.3rem, 3vw, 1.7rem); }

.season-wish__chip {
  margin: 0; padding: 14px 16px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, .16);
  background: radial-gradient(ellipse at 20% 0, rgba(244, 227, 180, .14), rgba(255, 255, 255, .03));
  box-shadow: 0 0 22px rgba(214, 184, 121, .12); animation: season-wish-float 7s ease-in-out var(--delay, 0s) infinite;
}
.season-wish__chip[style*="--tone:1"] { background: radial-gradient(ellipse at 20% 0, rgba(242, 166, 191, .16), rgba(255, 255, 255, .03)); }
.season-wish__chip[style*="--tone:2"] { background: radial-gradient(ellipse at 20% 0, rgba(143, 214, 187, .15), rgba(255, 255, 255, .03)); }
.season-wish__chip blockquote { margin: 0; font-family: "Marcellus", "Cormorant Garamond", serif; font-size: .98rem; line-height: 1.35; overflow-wrap: anywhere; }
.season-wish__chip blockquote::before { content: "✦ "; color: var(--accent, #d6b879); font-size: .8em; }
.season-wish__chip figcaption { margin-top: 8px; font-size: .68rem; opacity: .6; text-align: right; }
.season-wish__reply { margin: 10px 0 0; padding: 6px 10px; border-left: 2px solid var(--accent, #d6b879); font-size: .78rem; line-height: 1.4; background: rgba(255, 255, 255, .05); border-radius: 0 8px 8px 0; overflow-wrap: anywhere; }
.season-wish__reply span { display: block; font-size: .56rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent, #d6b879); margin-bottom: 2px; }
.season-wish__empty { margin: 22px 0 0; font-size: .88rem; opacity: .7; }
.season-wish__empty[hidden] { display: none; }
@keyframes season-wish-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* Deseos como regalos: una pila de cajas envueltas; al abrir una aparece su tarjeta */
.season-wishes__hint { margin: 0; font-size: .8rem; opacity: .65; }
.season-wishes__hint[hidden] { display: none; }
.season-pile { position: relative; margin-top: 8px; }
.season-wish__sky {
  position: relative; isolation: isolate; display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end;
  gap: 0; margin: 0; padding: 96px 28px 18px; min-height: 230px;
}
.season-gift {
  --wrap: #b8324a; --wrap-dark: #8f2236; --ribbon: #e7c77e;
  position: relative; margin: 0;
}
.season-gift[data-tone="1"], .season-gift-reveal[data-tone="1"] { --wrap: #2e7a5c; --wrap-dark: #205a43; --ribbon: #e2566c; }
.season-gift[data-tone="2"], .season-gift-reveal[data-tone="2"] { --wrap: #2d4f93; --wrap-dark: #1f386b; --ribbon: #e3e9f4; }
.season-gift[data-tone="3"], .season-gift-reveal[data-tone="3"] { --wrap: #d6b879; --wrap-dark: #b39555; --ribbon: #b8324a; }

/* Regalos de los deseos: encimados, con tamaños y giros distintos */
.season-wish__sky > .season-gift {
  z-index: var(--z, 2); margin: -40px -18px 0; zoom: var(--s, 1);
  transform: translateY(calc(var(--y, 0px) * -1)) rotate(var(--r, 0deg)); transform-origin: 50% 100%;
  transition: transform .3s ease, filter .3s ease;
}
.season-wish__sky > .season-gift:hover, .season-wish__sky > .season-gift:focus-within { z-index: 30; }
.season-wish__sky.has-open > .season-gift:not(.is-open) { filter: brightness(.62) saturate(.85); }
.season-wish__sky > .season-gift.is-open { z-index: 31; }

.season-gift__box {
  position: relative; display: block; width: 132px; height: 158px; padding: 0;
  border: 0; background: none; cursor: pointer; color: inherit;
  transform-origin: 50% 100%;
  animation: season-gift-wiggle 7s ease-in-out var(--delay, 0s) infinite;
  transition: transform .25s ease;
}
button.season-gift__box:hover { transform: translateY(-6px) rotate(-1.5deg); animation-play-state: paused; }
.season-gift__box:focus-visible { outline: 2px solid var(--accent, #d6b879); outline-offset: 6px; border-radius: 10px; }
.season-gift__body, .season-gift__lid {
  position: absolute; left: 50%; transform: translateX(-50%);
  background:
    linear-gradient(90deg, transparent calc(50% - 9px), var(--ribbon) calc(50% - 9px), var(--ribbon) calc(50% + 9px), transparent calc(50% + 9px)),
    radial-gradient(rgba(255, 255, 255, .2) 1.4px, transparent 2px) 0 0 / 14px 14px,
    linear-gradient(160deg, var(--wrap), var(--wrap-dark));
  transition: transform .55s cubic-bezier(.2, .9, .3, 1.3), opacity .45s ease;
}
.season-gift__body {
  bottom: 0; width: 116px; height: 98px; border-radius: 4px 4px 8px 8px;
  box-shadow: inset 0 14px 12px -10px rgba(0, 0, 0, .35), 0 14px 24px rgba(0, 0, 0, .35);
}
.season-gift__lid {
  bottom: 94px; width: 132px; height: 30px; border-radius: 5px; z-index: 2;
  box-shadow: 0 4px 6px rgba(0, 0, 0, .25);
}
.season-gift__bow {
  position: absolute; left: 50%; top: -9px; width: 16px; height: 14px; margin-left: -8px;
  border-radius: 50%; background: var(--ribbon); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); z-index: 1;
}
.season-gift__bow::before, .season-gift__bow::after {
  content: ""; position: absolute; top: -14px; width: 26px; height: 22px;
  border: 7px solid var(--ribbon); box-sizing: border-box; border-radius: 60% 60% 10% 60%;
}
.season-gift__bow::before { right: 8px; transform: rotate(-28deg); }
.season-gift__bow::after { left: 8px; transform: scaleX(-1) rotate(-28deg); }
.season-gift__tag {
  position: absolute; right: -18px; bottom: 50px; z-index: 3; max-width: 104px;
  padding: 4px 9px 4px 14px; border-radius: 3px 4px 4px 3px;
  clip-path: polygon(9px 0, 100% 0, 100% 100%, 9px 100%, 0 50%);
  background: #f7f2e8; color: #3a2a1a; font-size: .64rem; font-weight: 700; letter-spacing: .02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transform: rotate(9deg); transform-origin: 0 50%; box-shadow: 0 3px 8px rgba(0, 0, 0, .3);
}
/* Al abrir: la tapa sale volando y de la caja sale un brillo cálido */
.season-gift::after {
  content: "✦  ✧  ✦"; position: absolute; left: 50%; bottom: 130px; transform: translateX(-50%);
  color: var(--accent, #d6b879); font-size: 1.1rem; letter-spacing: .3em; white-space: nowrap;
  opacity: 0; pointer-events: none;
}
.season-gift__body::after {
  content: ""; position: absolute; left: -12px; right: -12px; bottom: 100%; height: 70px;
  background: radial-gradient(ellipse at 50% 100%, rgba(255, 222, 150, .75), rgba(255, 222, 150, 0) 70%);
  opacity: 0; transition: opacity .5s ease .15s; pointer-events: none;
}
.season-gift.is-open .season-gift__box { animation: none; }
.season-gift.is-open .season-gift__lid { transform: translate(-30%, -84px) rotate(-26deg); opacity: 0; }
.season-gift.is-open .season-gift__body::after { opacity: 1; }
.season-gift.is-open::after { animation: season-gift-burst .9s ease-out .1s; }

/* Fondo: regalos vacíos, más oscuros y desenfocados, también amontonados */
.season-pile__bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 58% 62% at 50% 62%, #000 50%, transparent 100%);
  mask-image: radial-gradient(ellipse 58% 62% at 50% 62%, #000 50%, transparent 100%); }
.season-gift--bg {
  position: absolute; bottom: var(--y, 0px);
  transform: translateX(-50%) rotate(var(--r, 0deg)) scale(var(--s, .7)); transform-origin: 50% 100%;
  filter: blur(4px) brightness(.36) saturate(.7); opacity: .9;
}
.season-gift--bg .season-gift__box { animation: none; cursor: default; }

/* Tarjeta del regalo abierto: sale de la pila, justo debajo */
.season-gift-reveal {
  --wrap: #b8324a; --ribbon: #e7c77e;
  position: relative; z-index: 60; width: min(440px, 100%); margin: -6px auto 0;
}
.season-gift-reveal[hidden] { display: none; }
.season-gift-reveal__card {
  box-sizing: border-box; padding: 18px 18px 12px; border-radius: 18px; text-align: left;
  border: 1px solid color-mix(in srgb, var(--ribbon) 60%, transparent);
  background:
    radial-gradient(ellipse at 50% 0, color-mix(in srgb, var(--wrap) 42%, transparent), transparent 75%),
    rgba(18, 24, 44, .9);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .45), 0 0 34px color-mix(in srgb, var(--wrap) 35%, transparent);
  animation: season-gift-rise .5s cubic-bezier(.2, .9, .3, 1.2) .12s both;
}
.season-gift-reveal__card blockquote { margin: 0; font-family: "Marcellus", "Cormorant Garamond", serif; font-size: 1.05rem; line-height: 1.4; overflow-wrap: anywhere; }
.season-gift-reveal__card blockquote::before { content: "✦ "; color: var(--accent, #d6b879); font-size: .8em; }
.season-gift-reveal__card figcaption { margin-top: 8px; font-size: .72rem; opacity: .7; text-align: right; }
.season-gift__close {
  display: block; margin: 8px auto 0; padding: 4px 10px; border: 0; background: none; cursor: pointer;
  color: var(--accent, #d6b879); font: inherit; font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; opacity: .8;
}
.season-gift__close:hover, .season-gift__close:focus-visible { opacity: 1; text-decoration: underline; }

@keyframes season-gift-wiggle {
  0%, 86%, 100% { transform: rotate(0); }
  88% { transform: rotate(-5deg); } 90% { transform: rotate(4deg); }
  92% { transform: rotate(-3deg); } 94% { transform: rotate(2deg); }
}
@keyframes season-gift-burst {
  0% { opacity: 0; transform: translate(-50%, 20px) scale(.4); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -40px) scale(1.4); }
}
@keyframes season-gift-rise {
  from { opacity: 0; transform: translateY(-50px) scale(.5); }
  to { opacity: 1; transform: none; }
}
@media (max-width: 980px) {
  .season-stage { grid-template-columns: 1fr 1fr; }
  .season-wish { grid-column: 1 / -1; order: -1; }
}
@media (max-width: 560px) {
  .season-stage { grid-template-columns: 1fr; }
  .season-wish__sky { padding: 84px 4px 12px; min-height: 200px; }
  .season-wish__sky > .season-gift { zoom: calc(var(--s, 1) * .7); margin: -36px -16px 0; }
  .season-gift--bg { transform: translateX(-50%) rotate(var(--r, 0deg)) scale(calc(var(--s, .7) * .7)); }
}

@media (prefers-reduced-motion: reduce) {
  .season-spark, .season-bulb, .season-wish__chip, .season-count__deco circle, .season-count__deco g { animation: none; }
  .season-spark { opacity: .3; }
  .season-gift__box, .season-gift.is-open::after, .season-gift-reveal__card { animation: none; }
  .season-gift__lid, .season-gift__body, .season-gift__body::after, .season-wish__sky > .season-gift { transition-duration: .01s; }
}
