/* Festividades de FTCel. Todo cuelga de html[data-fest]: fuera de fecha no se aplica nada.
   Los adornos nunca reciben clics y no pueden ensanchar la página (la trampa del menú en Android). */

.fest-cinta[hidden] { display: none; }
.fest-cinta {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  overflow: hidden;
  padding: 7px var(--sp-4);
  font-size: .8125rem; font-weight: var(--w-semi); letter-spacing: .01em; line-height: 1.35; text-align: center;
}
/* Un símbolo a cada lado de la frase, como máscara: toma el color de la cinta */
html[data-fest] .fest-cinta::before,
html[data-fest] .fest-cinta::after {
  content: ""; flex: none; width: 11px; height: 11px;
  background: currentColor;
  -webkit-mask: var(--fest-simbolo) center / contain no-repeat;
  mask: var(--fest-simbolo) center / contain no-repeat;
}
html[data-fest="nostalgia"] .fest-cinta::before, html[data-fest="nostalgia"] .fest-cinta::after,
html[data-fest="independencia"] .fest-cinta::before, html[data-fest="independencia"] .fest-cinta::after { display: none; }

.fest-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.fest-colgante, .fest-fondo, .fest-tela, .fest-esquina, .fest-gorro, .fest-pie, .fest-paisaje, .fest-luna, .fest-arania-capa { pointer-events: none; }

html[data-fest] .hero-inner { position: relative; z-index: 1; }
html[data-fest] .hero-panel { position: relative; }
html[data-fest] .brand { position: relative; }
html[data-fest] .site-footer { position: relative; }

/* Lo que cuelga del menú */
.fest-colgante { position: absolute; top: 100%; left: 0; right: 0; overflow: hidden; filter: drop-shadow(0 2px 2px rgba(20, 40, 70, .16)); }
.fest-colgante svg, .fest-pie svg, .fest-paisaje svg { position: absolute; left: 50%; transform: translateX(-50%); max-width: none; }
.fest-colgante svg, .fest-pie svg { top: 0; }
.fest-paisaje svg { bottom: -16px; }
/* En el celular lo que cuelga se achica y la portada baja un poco, para no pegarse a la dirección */
@media (max-width: 899px) {
  .fest-colgante svg { transform: translateX(-50%) scale(.74); transform-origin: 50% 0; }
  html[data-fest="navidad"] .hero, html[data-fest="anio-nuevo"] .hero, html[data-fest="carnaval"] .hero { padding-top: calc(var(--pad-hero) + 14px); }
}
@media (max-width: 480px) {
  .fest-cinta { font-size: .75rem; padding-inline: var(--sp-2); }
  html[data-fest] .fest-cinta::before, html[data-fest] .fest-cinta::after { display: none; }
}
body.nav-open .fest-colgante, body.nav-open .fest-arania-capa { display: none; }

.f-luz { animation: fest-foco 3s ease-in-out infinite; }
.f-halo { animation: fest-halo 3s ease-in-out infinite; }
@keyframes fest-foco { 0%, 100% { opacity: 1; } 50% { opacity: .66; } }
@keyframes fest-halo { 0%, 100% { opacity: .95; } 50% { opacity: .12; } }
.f-d1 .f-luz, .f-d1 .f-halo, .f-d1.fest-pieza, .f-d1.f-pendulo, .f-d1.f-bandera { animation-delay: -1s; }
.f-d2 .f-luz, .f-d2 .f-halo, .f-d2.fest-pieza, .f-d2.f-pendulo, .f-d2.f-bandera { animation-delay: -2s; }

.f-pendulo { animation: fest-pendulo 4.2s ease-in-out infinite alternate; }
@keyframes fest-pendulo { from { transform: rotate(-3.5deg); } to { transform: rotate(3.5deg); } }
.f-bandera { animation: fest-bandera 2.6s ease-in-out infinite alternate; }
@keyframes fest-bandera { from { transform: rotate(-4deg) skewX(2deg); } to { transform: rotate(4deg) skewX(-2deg); } }

/* Fondo de la portada */
.fest-fondo { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.fest-pieza { position: absolute; line-height: 0; }
.fest-pieza svg, .fest-esquina svg, .fest-gorro svg, .fest-tela svg, .fest-luna svg { display: block; width: 100%; height: auto; overflow: visible; }
@media (max-width: 899px) { .fest-pieza--extra { display: none; } }

.fest-paisaje { position: absolute; left: 0; right: 0; bottom: -1px; height: 104px; z-index: 0; overflow: hidden; }
.f-suelo { fill: var(--bg); }
@media (max-width: 899px) { .fest-paisaje { opacity: .7; } }

.fest-esquina { position: absolute; z-index: 2; filter: drop-shadow(0 4px 6px rgba(30, 30, 60, .22)); }
.fest-pie { position: absolute; top: 0; left: 0; right: 0; z-index: 1; overflow: hidden; }

/* Navidad */
html[data-fest="navidad"] { --fest-simbolo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 1 3.4 7.1 7.8 1-5.7 5.4 1.4 7.7-6.9-3.8-6.9 3.8 1.4-7.7L.8 9.1l7.8-1z'/%3E%3C/svg%3E"); }
html[data-fest="navidad"] .fest-cinta { background: linear-gradient(90deg, #7f0f20, #b81c31 50%, #7f0f20); color: #fff; box-shadow: inset 0 -1px 0 #e8bb56; }
html[data-fest="navidad"] .hero { background: radial-gradient(1000px 460px at 80% -10%, #dbe9fc 0%, transparent 62%), linear-gradient(180deg, #dfecfc 0%, var(--bg) 100%); }
.fest-fondo--copos { color: #a9c9ee; }
.fest-fondo--copos .fest-pieza { animation: fest-copo 9s ease-in-out infinite alternate; }
@keyframes fest-copo { from { transform: translateY(-5px) rotate(-10deg); } to { transform: translateY(7px) rotate(14deg); } }
html[data-fest="navidad"] .hero-badges svg { color: #c8233a; }
html[data-fest="navidad"] ::selection { background: #c8233a; color: #fff; }
.fest-esquina--monio { top: -28px; right: 20px; width: 76px; }
.fest-gorro { position: absolute; top: -12px; left: -10px; width: 29px; transform: rotate(-14deg); filter: drop-shadow(0 1px 1px rgba(20, 30, 60, .3)); }
.f-colina { fill: #d3e4f8; }
.f-pino path, .f-pino rect { fill: #a9c6e8; }
.f-pino--claro path, .f-pino--claro rect { fill: #bdd4ee; }
.fest-pie--nieve { height: 34px; }

/* Año Nuevo */
html[data-fest="anio-nuevo"] { --fest-simbolo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1c1 7 4 10 11 11-7 1-10 4-11 11-1-7-4-10-11-11 7-1 10-4 11-11z'/%3E%3C/svg%3E"); }
html[data-fest="anio-nuevo"] .fest-cinta { background: linear-gradient(90deg, #081a33, #14335e 50%, #081a33); color: #ffe2a0; box-shadow: inset 0 -1px 0 #d9a63f; }
html[data-fest="anio-nuevo"] .fest-pieza { animation: fest-destello 3.4s ease-in-out infinite; }
@keyframes fest-destello { 0%, 100% { opacity: 1; transform: scale(1) rotate(0); } 50% { opacity: .45; transform: scale(.78) rotate(18deg); } }
html[data-fest="anio-nuevo"] .hero-badges svg { color: #a9791c; }
html[data-fest="anio-nuevo"] ::selection { background: #e8bb56; color: #0e2545; }
.fest-esquina--chapa { top: -14px; right: 20px; }
.fest-chapa {
  display: block; position: relative; overflow: hidden;
  padding: 4px 14px; border-radius: var(--r-pill);
  background: linear-gradient(135deg, #fff0bf, #e0ae47 55%, #b5842a); color: #2a1b05;
  font-size: var(--text-xs); font-weight: var(--w-bold); letter-spacing: .06em;
  box-shadow: 0 0 0 1px rgba(150, 105, 25, .55), inset 0 1px 0 rgba(255, 255, 255, .7);
}
.fest-chapa::after { content: ""; position: absolute; top: -40%; bottom: -40%; left: -40%; width: 30%; background: rgba(255, 255, 255, .65); transform: skewX(-20deg); animation: fest-brillo 4.5s ease-in-out infinite; }
@keyframes fest-brillo { 0%, 62% { left: -40%; } 100% { left: 130%; } }
.fest-pie--oro { height: 3px; background: linear-gradient(90deg, transparent, #e8bb56 25%, #fff0bf 50%, #e8bb56 75%, transparent); }

/* Halloween */
html[data-fest="halloween"] { --fest-simbolo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15 2a10.5 10.5 0 1 0 7.4 17.2A9.5 9.5 0 0 1 15 2z'/%3E%3C/svg%3E"); }
html[data-fest="halloween"] .fest-cinta { background: linear-gradient(90deg, #120a22, #2c1a4b 50%, #120a22); color: #ffbd6b; box-shadow: inset 0 -1px 0 #e8791f; }
html[data-fest="halloween"] .site-header { border-bottom-color: #e8791f; }
html[data-fest="halloween"] .hero { background: radial-gradient(900px 440px at 78% -10%, #d9c8ee 0%, transparent 64%), linear-gradient(180deg, #e7dcf3 0%, var(--bg) 100%); }
html[data-fest="halloween"] .hero-badges svg { color: #c9590d; }
html[data-fest="halloween"] ::selection { background: #e8791f; color: #1b1030; }
.fest-luna { position: absolute; z-index: 0; top: 14px; right: 7%; width: clamp(110px, 17vw, 230px); opacity: .85; filter: drop-shadow(0 0 26px rgba(255, 236, 170, .75)); }
@media (max-width: 899px) { .fest-luna { display: none; } }
.fest-fondo--noche { color: #3f2f5c; }
.fest-fondo--noche .fest-pieza { animation: fest-vuelo 6s ease-in-out infinite alternate; }
@keyframes fest-vuelo { from { transform: translate(-8px, 5px); } to { transform: translate(10px, -7px); } }
@media (max-width: 899px) { .fest-fondo--noche { display: none; } }   /* en el celular el título ocupa todo el ancho */
.f-ala { transform-box: view-box; transform-origin: 56px 28px; animation: fest-aleteo .34s ease-in-out infinite alternate; }
@keyframes fest-aleteo { from { transform: rotate(-9deg) scaleY(1); } to { transform: rotate(13deg) scaleY(.72); } }
.fest-tela { position: absolute; top: 0; z-index: 0; width: clamp(76px, 13vw, 190px); color: #5a4778; opacity: .5; }
.fest-tela--izq { left: 0; }
.fest-tela--der { right: 0; transform: scaleX(-1); }
.fest-esquina--calabaza { top: -32px; right: 16px; width: 68px; }
.f-brasa { animation: fest-brasa 1.9s steps(7, end) infinite; }
@keyframes fest-brasa { 0%, 100% { opacity: 1; } 22% { opacity: .78; } 48% { opacity: .94; } 70% { opacity: .7; } }
.f-colina--noche { fill: #d4c5e8; }
.f-silueta, .f-silueta path { fill: #a491c2; stroke: #a491c2; stroke-width: 0; }
.f-silueta path[fill="none"] { fill: none; stroke-width: revert-layer; }
.fest-pie--naranja { height: 3px; background: linear-gradient(90deg, #e8791f, #6b3fa0 50%, #e8791f); }

/* La araña camina por encima de todo, menú incluido */
.fest-arania-capa { position: fixed; inset: 0; z-index: 110; overflow: hidden; }
.fest-arania { position: absolute; top: 0; left: 0; width: 44px; height: 44px; opacity: 0; will-change: transform; filter: drop-shadow(0 0 .7px rgba(255, 255, 255, .8)) drop-shadow(1px 3px 2px rgba(25, 15, 45, .38)); }
.fest-arania svg { display: block; width: 100%; height: 100%; overflow: visible; }
.fest-hilo { position: absolute; top: 0; left: 0; width: 1px; height: 1px; background: rgba(90, 80, 110, .7); opacity: 0; transform-origin: 0 0; }
.f-fem { stroke-width: 2.7; }
.f-tib { stroke-width: 1.7; }
.f-abdomen { transform-box: fill-box; transform-origin: 50% 12%; animation: fest-respira 2.3s ease-in-out infinite; }
@keyframes fest-respira { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05, 1.03); } }

/* Los otros personajes: una capa fija que no recibe clics ni ensancha la página */
.fest-capa { position: fixed; inset: 0; z-index: 110; overflow: hidden; pointer-events: none; }
.fest-capa--bajo { z-index: 90; }   /* el tero vuela por debajo del menú */
body.nav-open .fest-capa { display: none; }
.fest-bicho { position: absolute; top: 0; left: 0; opacity: 0; will-change: transform; filter: drop-shadow(0 1px 1px rgba(20, 25, 50, .3)); }
.fest-bicho svg { display: block; width: 100%; height: 100%; overflow: visible; }
.fest-part { position: absolute; top: 0; left: 0; display: block; will-change: transform, opacity; }
.fest-part--e4 { clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); }
.fest-part--e5 { clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.fest-esquina--sidra { bottom: calc(100% - 23px); left: 18px; width: 32px; }
.fest-esquina--sidra svg { transform-origin: 50% 100%; }
.f-corcho { transform-box: fill-box; }
.fest-corcho-suelto { position: absolute; top: 0; left: 0; width: 16px; }
.fest-corcho-suelto svg { display: block; width: 100%; height: auto; overflow: visible; }
@media (max-width: 899px) { .fest-esquina--sidra { width: 28px; } }

/* Carnaval */
html[data-fest="carnaval"] { --fest-simbolo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1 23 12 12 23 1 12z'/%3E%3C/svg%3E"); }
html[data-fest="carnaval"] .fest-cinta { position: relative; background: linear-gradient(90deg, #6d0d42, #a4176a 50%, #6d0d42); color: #fff; box-shadow: inset 0 -2px 0 #f5b82e; }
.fest-fondo--color .fest-pieza { animation: fest-copo 8s ease-in-out infinite alternate; }
@media (max-width: 899px) { .fest-fondo--color { display: none; } }   /* en el celular el papel picado caería sobre el texto */
.fest-fondo--color .fest-pieza:nth-child(3n + 1) { color: #e23b3b; }
.fest-fondo--color .fest-pieza:nth-child(3n + 2) { color: #2f8cf0; }
.fest-fondo--color .fest-pieza:nth-child(3n) { color: #a855c7; }
html[data-fest="carnaval"] .hero-badges svg { color: #b0186b; }
.fest-esquina--tambor { top: -48px; right: 16px; width: 62px; transform-origin: 50% 100%; animation: fest-llamada 1.5s ease-in-out infinite; }
.f-sonido { animation: fest-sonido 1.5s ease-out infinite; }
.f-palo { transform-box: view-box; transform-origin: 102px 6px; animation: fest-palo 1.5s ease-in-out infinite; }
@keyframes fest-llamada { 0%, 18%, 36%, 100% { transform: scale(1); } 9%, 27% { transform: scale(1.05, .96); } }
@keyframes fest-sonido { 0%, 8%, 26%, 100% { opacity: 0; } 12%, 30% { opacity: 1; } }
@keyframes fest-palo { 0%, 18%, 36%, 100% { transform: rotate(-9deg); } 9%, 27% { transform: rotate(0); } }
.fest-pie--color { height: 4px; background: linear-gradient(90deg, #e23b3b, #f5b82e, #1fa363, #2f8cf0, #a855c7); }

/* 25 de agosto: sobrio a propósito */
html[data-fest="independencia"] .fest-cinta { background: linear-gradient(90deg, #cfe2f6, #f6fafe 50%, #cfe2f6); color: #0c2c52; box-shadow: inset 0 -1px 0 #75aadb; letter-spacing: .03em; }
html[data-fest="independencia"] .site-header { border-bottom-color: #75aadb; }
.fest-pie--patria {
  height: 9px;
  background: repeating-linear-gradient(180deg, #f4f8fc 0 1px, #75aadb 1px 2px);
  -webkit-mask: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
  mask: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
}

/* Noche de la Nostalgia: la misma web con la ropa de 2003. La estructura y el teléfono 3D no cambian. */
html[data-fest="nostalgia"] {
  --font: Verdana, Tahoma, Geneva, "DejaVu Sans", sans-serif;
  --bg: #d4d0c8; --bg-alt: #c8c4bc; --surface: #f4f2ea;
  --line: #808080; --line-soft: #a8a49c;
  --ink: #000; --ink-soft: #1c1c1c; --muted: #3a3a3a;
  --blue-900: #000066; --blue-800: #000080; --blue-700: #0000cc; --blue-600: #0000ee; --blue-500: #3a5fcd; --blue-100: #9aa6c4; --blue-50: #e4e4ee;
  --r-xs: 0px; --r-sm: 0px; --r-md: 0px; --r-lg: 0px; --r-pill: 0px;
  --shadow-sm: none; --shadow: none; --shadow-lg: none;
}
html[data-fest="nostalgia"] .fest-cinta { display: block; background: #000080; color: #ffff33; padding-inline: 0; text-align: left; }
.fest-cinta__pista { display: inline-flex; width: max-content; animation: fest-marquesina 34s linear infinite; }
.fest-cinta__pista > span { flex: none; padding-right: .35em; white-space: nowrap; }
@keyframes fest-marquesina { to { transform: translateX(-50%); } }
html[data-fest="nostalgia"] h1, html[data-fest="nostalgia"] h2, html[data-fest="nostalgia"] h3 { font-family: "Trebuchet MS", Verdana, sans-serif; letter-spacing: 0; }
html[data-fest="nostalgia"] .hero { background: #d4d0c8 repeating-conic-gradient(#cfcbc2 0% 25%, #d4d0c8 0% 50%) 0 0 / 4px 4px; }
html[data-fest="nostalgia"] .hero-panel { background: #ece9d8; border: 2px outset #fff; padding-top: 0; overflow: hidden; }
html[data-fest="nostalgia"] .pillar, html[data-fest="nostalgia"] .card { border: 2px outset #fff; }
.fest-ventana {
  display: flex; align-items: center; gap: 3px;
  margin: 0 calc(var(--sp-6) * -1);
  padding: 3px 4px 3px 8px;
  background: linear-gradient(90deg, #0a246a, #a6caf0); color: #fff;
  font: 700 .75rem Tahoma, Verdana, sans-serif;
}
.fest-ventana span { margin-right: auto; }
.fest-ventana i { display: grid; place-items: center; width: 16px; height: 14px; background: #d4d0c8; border: 1px outset #fff; color: #000; font: 700 .625rem/1 Tahoma, sans-serif; }
html[data-fest="nostalgia"] .site-header::before { background: linear-gradient(90deg, #0a246a, #3a6ea5); backdrop-filter: none; }
html[data-fest="nostalgia"] .site-header::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 6px; background: repeating-linear-gradient(-45deg, #ffcc00 0 10px, #111 10px 20px); }
html[data-fest="nostalgia"] .site-header .brand-logo,
html[data-fest="nostalgia"] .site-header .brand-text strong,
html[data-fest="nostalgia"] .site-header .brand-text small { color: #fff; }
html[data-fest="nostalgia"] .nav-toggle { background: #d4d0c8; border: 2px outset #eee; }
html[data-fest="nostalgia"] .nav-toggle-bars i { background: #000; }
@media (max-width: 899px) { html[data-fest="nostalgia"] .eyebrow { font-size: .6875rem; letter-spacing: 0; } }
@media (min-width: 900px) {
  html[data-fest="nostalgia"] .site-header .site-nav ul a { color: #fff; }
  html[data-fest="nostalgia"] .site-header .site-nav ul a:hover { background: rgba(255, 255, 255, .18); }
}
html[data-fest="nostalgia"] .btn { border: 2px outset #eee; box-shadow: none; }
html[data-fest="nostalgia"] .btn:active { border-style: inset; }
html[data-fest="nostalgia"] .btn-outline { background: #d4d0c8; color: #000; }
html[data-fest="nostalgia"] .band--deep { background: #000080; }
html[data-fest="nostalgia"] .site-footer { background: #000066; }
html[data-fest="nostalgia"] main a:not(.btn) { text-decoration: underline; }
.fest-retro { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; width: 100%; }
.fest-contador { display: inline-flex; align-items: center; gap: 1px; padding: 2px 4px; background: #000; border: 2px inset #999; }
.fest-contador b { margin-right: 5px; color: #9f9; font: 700 .5625rem Tahoma, sans-serif; }
.fest-contador i { width: 11px; color: #39ff14; font: 700 .875rem/1.1 "Courier New", monospace; text-align: center; }
.fest-sello { padding: 3px 8px; background: #d4d0c8; border: 2px outset #fff; color: #000; font: 700 .625rem Tahoma, sans-serif; }
.fest-sello--b { background: #ffcc00; }
.fest-actualizado { color: #ffff33; font-size: var(--text-2xs); }

@media (prefers-reduced-motion: reduce) {
  html[data-fest] .f-luz, html[data-fest] .f-halo, html[data-fest] .f-pendulo, html[data-fest] .f-bandera, html[data-fest] .fest-pieza,
  html[data-fest] .f-ala, html[data-fest] .f-brasa, html[data-fest] .f-sonido, html[data-fest] .f-palo, html[data-fest] .fest-esquina, html[data-fest] .fest-chapa::after { animation: none !important; }
  .fest-cinta__pista { width: auto; animation: none; }
  .fest-cinta__pista > span { white-space: normal; }
  .fest-cinta__copia { display: none; }
  html[data-fest="nostalgia"] .fest-cinta { padding-inline: var(--sp-4); text-align: center; }
}
@media print { .fest-capa, .fest-cinta, .fest-colgante, .fest-fondo, .fest-tela, .fest-esquina, .fest-gorro, .fest-pie, .fest-paisaje, .fest-luna, .fest-arania-capa { display: none; } }
