/* Christmas theme (seasonal). Brand colours stay (night purple + gold); winter only adds ice-white light,
   snow and a few pixel-art details. Pixel art: /img/navidad/ (tools/gen_art.py), always scaled by whole numbers
   with pixelated rendering. Motion is transform/opacity only and stops with prefers-reduced-motion. */
:root {
  --ice: 207, 232, 255;          /* frost highlights, for rgba() */
  --gold-rgb: 242, 193, 78;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --seal: polygon(67.86% 0%, 67.86% 7.14%, 82.14% 7.14%, 82.14% 14.29%, 89.29% 14.29%, 89.29% 21.43%, 92.86% 21.43%, 92.86% 28.57%, 96.43% 28.57%, 96.43% 35.71%, 100% 35.71%, 100% 64.29%, 96.43% 64.29%, 96.43% 71.43%, 92.86% 71.43%, 92.86% 78.57%, 89.29% 78.57%, 89.29% 85.71%, 82.14% 85.71%, 82.14% 92.86%, 67.86% 92.86%, 67.86% 100%, 32.14% 100%, 32.14% 92.86%, 17.86% 92.86%, 17.86% 85.71%, 10.71% 85.71%, 10.71% 78.57%, 7.14% 78.57%, 7.14% 71.43%, 3.57% 71.43%, 3.57% 64.29%, 0% 64.29%, 0% 35.71%, 3.57% 35.71%, 3.57% 28.57%, 7.14% 28.57%, 7.14% 21.43%, 10.71% 21.43%, 10.71% 14.29%, 17.86% 14.29%, 17.86% 7.14%, 32.14% 7.14%, 32.14% 0%);
}
.xm-sky, .xm-lights, .section-head::before, .site-footer::before, .pack.popular::after { image-rendering: pixelated; }

/* ---------- Hero: winter night in layers (cold tint, far snow, warm light, near snow, drift, lights) ---------- */
.hero-body { position: relative; z-index: 1; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; mix-blend-mode: multiply;
  background: linear-gradient(180deg, rgba(48, 58, 132, .58) 0%, rgba(80, 64, 150, .3) 46%, rgba(170, 190, 255, .06) 80%, rgba(255, 255, 255, 0) 100%);
}
.xm-sky { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.xm-snow { position: absolute; left: 0; right: 0; bottom: 0; background-repeat: repeat; will-change: transform; }
/* the snow thins out over the text column and near the bottom, so it never fights the headline */
.xm-sky .xm-snow {
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, .3) 0%, rgba(0, 0, 0, .3) 42%, #000 70%), linear-gradient(180deg, #000 60%, transparent 98%);
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, .3) 0%, rgba(0, 0, 0, .3) 42%, #000 70%), linear-gradient(180deg, #000 60%, transparent 98%);
  -webkit-mask-composite: source-in; mask-composite: intersect;
}
.xm-far { top: -320px; background-image: url(../img/navidad/nieve-lejos.png); background-size: 320px 320px; opacity: .55; animation: xm-fall-far 46s linear infinite; }
.xm-near { top: -320px; background-image: url(../img/navidad/nieve-cerca.png); background-size: 320px 320px; opacity: .8; animation: xm-fall-near 19s linear infinite; }
.xm-glow { position: absolute; left: -10%; bottom: -30%; width: 70%; height: 90%; mix-blend-mode: screen;
  background: radial-gradient(closest-side, rgba(var(--gold-rgb), .2), rgba(var(--gold-rgb), .07) 55%, transparent); }
.xm-drift { position: absolute; left: 0; right: 0; bottom: 0; height: 21px; background: url(../img/navidad/ventisquero.png) 0 100% / 144px 21px repeat-x; filter: drop-shadow(0 -2px 6px rgba(var(--ice), .25)); }

/* String lights: wire + bulbs, and two glow layers that breathe out of step */
.xm-lights { position: absolute; top: 0; left: 0; right: 0; height: 20px; z-index: 2; pointer-events: none; background: url(../img/navidad/luces.png) 0 0 / 48px 20px repeat-x; }
.xm-lights::before, .xm-lights::after { content: ""; position: absolute; inset: 0; background: url(../img/navidad/luces-a.png) 0 0 / 48px 20px repeat-x; opacity: .35; animation: xm-twinkle 3.4s ease-in-out infinite alternate; }
.xm-lights::after { background-image: url(../img/navidad/luces-b.png); animation-delay: -1.7s; }

/* ---------- Hero offer card: pixel seal, code, countdown to Reyes ---------- */
.xm-offer {
  display: flex; align-items: center; gap: 18px; width: fit-content; max-width: 620px; margin: 16px 0 0; padding: 14px 20px 14px 14px;
  border-radius: 14px; background: linear-gradient(100deg, rgba(18, 12, 32, .86), rgba(54, 26, 96, .74));
  box-shadow: inset 0 0 0 1px rgba(var(--gold-rgb), .5), inset 0 1px 0 rgba(var(--ice), .22), 0 18px 40px rgba(5, 3, 10, .45);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  animation: xm-rise .5s var(--ease-out) both;
}
.xm-offer-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.xm-offer-k { font: 800 13px/1.3 var(--display); color: var(--gold); letter-spacing: .08em; text-transform: uppercase; }
.xm-offer-t { font-size: 16px; line-height: 1.45; color: var(--text); }
.xm-offer-t .promo-code { margin-left: 2px; vertical-align: 1px; }
.xm-offer-when { font-size: 12.5px; line-height: 1.45; color: #cfc4dd; }
.xm-count { display: flex; gap: 6px; margin: 2px 0; }
.xm-unit { display: inline-flex; flex-direction: column; align-items: center; min-width: 54px; padding: 6px 8px 5px; border-radius: 8px;
  background: rgba(10, 7, 18, .62); box-shadow: inset 0 0 0 1px rgba(var(--ice), .16), inset 0 1px 0 rgba(var(--ice), .12); }
.xm-unit b { font: 400 21px/1.1 'Monocraft', ui-monospace, monospace; color: var(--text); font-variant-numeric: tabular-nums; }
.xm-unit small { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.xm-count-sm { margin: 0 0 14px; }
.xm-count-sm .xm-unit { flex: 1; min-width: 0; padding: 5px 4px 4px; }
.xm-count-sm .xm-unit b { font-size: 17px; }

/* The seal: a stepped pixel circle in gold, an inner ring and a slight tilt, like a wax stamp */
.xm-seal { position: relative; flex: none; display: grid; place-content: center; justify-items: center; width: 96px; aspect-ratio: 1;
  transform: rotate(-8deg); filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .5)); color: #1b1206; }
.xm-seal::before, .xm-seal::after, .xm-face { content: ""; position: absolute; clip-path: var(--seal); }
.xm-seal::before { inset: 0; z-index: -2; background: #ffd97a; }
.xm-seal::after { inset: 6%; z-index: -1; background: #a8741f; }
.xm-face { inset: 10%; background: radial-gradient(70% 70% at 35% 28%, #ffe7a3, var(--gold) 55%, #d9a23a); }
.xm-seal b, .xm-seal small { position: relative; z-index: 1; }
.xm-seal b { display: flex; align-items: flex-start; font: 400 27px/1 'Monocraft', var(--display); letter-spacing: -.04em; text-shadow: 1px 1px 0 rgba(255, 240, 200, .6); }
.xm-seal b i { font-style: normal; font-size: 14px; margin: 2px 0 0 1px; }
.xm-seal small { margin-top: 3px; font: 400 9px/1 'Monocraft', var(--display); letter-spacing: .12em; text-transform: uppercase; color: #5a3a0c; }
.xm-seal-sm { position: absolute; top: 12px; right: 12px; width: 62px; transform: rotate(8deg); z-index: 2; }
.xm-seal-sm b { font-size: 17px; }
.xm-seal-sm b i { font-size: 10px; margin-top: 1px; }
.pack-img { position: relative; }

/* ---------- Strip on top of every page ---------- */
.promo-strip { background: linear-gradient(90deg, #2c1655, #5a2596 50%, #2c1655); box-shadow: inset 0 -1px 0 rgba(var(--gold-rgb), .35); }

/* ---------- Packs: Christmas price, frost sheen on hover, icicles on the most chosen ---------- */
.price-was { font: 600 14px/1.2 var(--body); color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(237, 230, 214, .7); text-decoration-thickness: 1.5px; font-variant-numeric: tabular-nums; }
.price-xmas { color: var(--gold); }
.pack-price .price-promo { color: #d9cfe6; font-weight: 600; font-size: 12.5px; letter-spacing: .01em; }
.pack .price-wrap .price-local { margin-top: 1px; }
.pack.popular::after {
  content: ""; position: absolute; top: 2px; left: 2px; right: 2px; height: 12px; z-index: 2; pointer-events: none;
  background: url(../img/navidad/carambanos.png) 0 0 / 64px 12px repeat-x; border-radius: 14px 14px 0 0;
}
@media (hover: hover) and (pointer: fine) {
  .pack::before {
    content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; transform: translateX(-115%);
    background: linear-gradient(110deg, transparent 32%, rgba(var(--ice), .1) 44%, rgba(255, 255, 255, .2) 50%, rgba(var(--ice), .1) 56%, transparent 68%);
  }
  .pack:hover::before { transform: translateX(115%); transition: transform 1.1s var(--ease-out); }
  .pack:hover { box-shadow: inset 0 0 0 1px rgba(var(--ice), .55), var(--shadow), 0 0 44px rgba(var(--ice), .1); }
  .pack.popular:hover { box-shadow: inset 0 0 0 2px var(--gold), 0 0 0 6px rgba(var(--gold-rgb), .12), var(--shadow), 0 0 44px rgba(var(--ice), .12); }
}

/* ---------- Ornaments: a pixel motif between two thin gold lines, one per section ---------- */
.section-head::before {
  content: ""; display: block; width: 200px; height: 28px; margin: 0 auto 12px;
  background:
    url(../img/navidad/copo.png) center / 28px 28px no-repeat,
    linear-gradient(90deg, transparent, rgba(var(--gold-rgb), .6)) left center / 76px 2px no-repeat,
    linear-gradient(90deg, rgba(var(--gold-rgb), .6), transparent) right center / 76px 2px no-repeat;
}
#rangos .section-head::before { height: 21px; background-image: url(../img/navidad/acebo.png), linear-gradient(90deg, transparent, rgba(var(--gold-rgb), .6)), linear-gradient(90deg, rgba(var(--gold-rgb), .6), transparent); background-size: 39px 21px, 76px 2px, 76px 2px; }
#mascotas .section-head::before { height: 36px; background-image: url(../img/navidad/regalo.png), linear-gradient(90deg, transparent, rgba(var(--gold-rgb), .6)), linear-gradient(90deg, rgba(var(--gold-rgb), .6), transparent); background-size: 36px 36px, 76px 2px, 76px 2px; }
#preguntas .section-head::before { height: 30px; background-image: url(../img/navidad/arbol.png), linear-gradient(90deg, transparent, rgba(var(--gold-rgb), .6)), linear-gradient(90deg, rgba(var(--gold-rgb), .6), transparent); background-size: 22px 30px, 76px 2px, 76px 2px; }
.band { background: url(../img/scales.svg) center top / 40px 20px, radial-gradient(60% 40% at 50% 0%, rgba(var(--ice), .07), transparent 70%), linear-gradient(180deg, var(--bg-2), var(--bg)); }

/* ---------- Closing band and footer ---------- */
.join { box-shadow: inset 0 0 0 1px rgba(var(--gold-rgb), .3), 0 0 60px rgba(var(--ice), .05); }
.join .xm-lights { top: 0; }
.site-footer { position: relative; }
.site-footer::before {
  content: ""; position: absolute; bottom: calc(100% - 4px); right: max(24px, calc(50% - 560px)); width: 128px; height: 60px; pointer-events: none;
  filter: drop-shadow(0 0 12px rgba(var(--gold-rgb), .22));
  background: url(../img/navidad/arbol.png) 0 100% / 44px 60px no-repeat, url(../img/navidad/regalo.png) 52px 100% / 36px 36px no-repeat, url(../img/navidad/regalo.png) 96px 100% / 24px 24px no-repeat;
}

@keyframes xm-fall-far { to { transform: translate3d(0, 320px, 0); } }
@keyframes xm-fall-near { to { transform: translate3d(0, 320px, 0); } }
@keyframes xm-twinkle { from { opacity: .3; } to { opacity: 1; } }
@keyframes xm-rise { from { opacity: 0; transform: translateY(6px); } }

@media (min-width: 1200px) {
  .shell-main > .hero .hero-body { padding-top: 40px; padding-bottom: 52px; }
  .shell-main > .hero .emblem { width: 108px; margin-bottom: 14px; }
  .shell-main > .hero h1 { margin-top: 24px; }
  .shell-main > .hero .xm-lights { left: 12px; right: 12px; }
}
@media (max-width: 640px) {
  body.has-xm-offer .promo-strip { display: none; }
  .xm-offer { clear: both; width: 100%; gap: 14px; padding: 12px 14px 12px 10px; }
  .xm-seal { width: 74px; }
  .xm-seal b { font-size: 21px; }
  .xm-seal b i { font-size: 11px; }
  .xm-seal small { font-size: 7.5px; }
  .xm-offer-t { font-size: 15px; }
  .xm-unit { min-width: 0; flex: 1; padding: 5px 4px 4px; }
  .xm-unit b { font-size: 18px; }
  .xm-offer-when { font-size: 12px; }
  .xm-seal-sm { top: -10px; right: auto; left: -10px; width: 40px; transform: rotate(-8deg); }
  .xm-seal-sm b { font-size: 11px; }
  .xm-seal-sm b i { font-size: 7px; margin-top: 0; }
  .site-footer::before { right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .xm-snow, .xm-lights::before, .xm-lights::after, .xm-offer { animation: none !important; }
  .xm-lights::before, .xm-lights::after { opacity: .7; }
  .xm-near { opacity: .5; }
  .pack::before { display: none; }
}
