/* =========================================================
   PDF Tools — Tema de temporada: Halloween 🎃
   Solo aplica cuando <html> tiene la clase .halloween
   (la agrega halloween.js del 1 al 31 de octubre).
   ========================================================= */

html.halloween {
    --hw-pumpkin: #FF7A1A;
    --hw-ember: #FFB347;

    /* Portada y páginas de herramientas */
    --accent: #FF7A1A;
    --accent2: #A855F7;
    --accent3: #FFB347;
    --grad: linear-gradient(120deg, #7C3AED, #A855F7 45%, #FF7A1A);

    /* App */
    --accent-hover: #FF9142;
    --accent-dim: rgba(255, 122, 26, 0.12);
}
html.halloween.light-theme {
    --accent: #E8630A;
    --accent-hover: #C2410C;
    --accent-dim: rgba(232, 99, 10, 0.1);
}

html.halloween ::selection { background: rgba(255, 122, 26, 0.4); }

/* Logo: calabaza en lugar del rayo */
html.halloween .logo-bolt {
    box-shadow: 0 4px 18px rgba(255, 122, 26, 0.5);
}
.hw-logo-pumpkin {
    display: inline-block;
    animation: hw-bob 3.2s ease-in-out infinite;
}

/* Brillos que en el sitio están fijos en azul */
html.halloween .btn-primary { box-shadow: 0 8px 30px rgba(255, 122, 26, 0.35); }
html.halloween .btn-primary:hover { box-shadow: 0 12px 40px rgba(255, 122, 26, 0.5); }
html.halloween .btn-ghost:hover { background: rgba(255, 122, 26, 0.1); }
html.halloween .badge {
    background: rgba(255, 122, 26, 0.12);
    border-color: rgba(255, 122, 26, 0.35);
    color: var(--hw-ember);
}
html.halloween .mock-drop { border-color: rgba(255, 122, 26, 0.5); background: rgba(255, 122, 26, 0.06); }
html.halloween .tool-card:hover { box-shadow: 0 14px 40px rgba(255, 122, 26, 0.18); }
html.halloween .faq-item.open { border-color: rgba(255, 122, 26, 0.5); }
html.halloween .cta-box::before {
    background: radial-gradient(ellipse 60% 80% at 50% 0%, rgba(255, 122, 26, 0.22), transparent 70%);
}

/* Capa de niebla */
.hw-fog {
    position: fixed;
    inset: auto 0 0 0;
    height: 40vh;
    pointer-events: none;
    z-index: 1;
    opacity: 0.5;
    background:
        radial-gradient(ellipse 60% 40% at 20% 100%, rgba(168, 85, 247, 0.18), transparent 70%),
        radial-gradient(ellipse 50% 35% at 75% 100%, rgba(255, 122, 26, 0.12), transparent 70%),
        radial-gradient(ellipse 80% 30% at 50% 100%, rgba(232, 234, 246, 0.06), transparent 70%);
    background-size: 200% 100%;
    animation: hw-fog 28s linear infinite alternate;
}
html.halloween.light-theme .hw-fog { opacity: 0.3; }

/* Murciélagos */
.hw-bats {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}
.hw-bat {
    position: absolute;
    left: -60px;
    width: 44px;
    height: 22px;
    color: #120a1c;
    opacity: 0.85;
    filter: drop-shadow(0 0 4px rgba(255, 122, 26, 0.55)) drop-shadow(0 0 10px rgba(168, 85, 247, 0.35));
    animation: hw-fly linear infinite;
}
html.halloween.light-theme .hw-bat { color: #2a1840; filter: none; opacity: 0.7; }
.hw-bat svg { width: 100%; height: 100%; animation: hw-flap 0.28s ease-in-out infinite alternate; transform-origin: center; }

/* Telaraña en la esquina */
.hw-web {
    position: fixed;
    top: 64px;
    right: 0;
    width: 130px;
    height: 130px;
    pointer-events: none;
    z-index: 2;
    opacity: 0.16;
    color: var(--text);
}

@keyframes hw-fly {
    0%   { transform: translate(0, 0) scale(var(--s, 1)); }
    25%  { transform: translate(28vw, -6vh) scale(var(--s, 1)); }
    50%  { transform: translate(55vw, 4vh) scale(var(--s, 1)); }
    75%  { transform: translate(82vw, -8vh) scale(var(--s, 1)); }
    100% { transform: translate(calc(100vw + 120px), 2vh) scale(var(--s, 1)); }
}
@keyframes hw-flap { from { transform: scaleY(1); } to { transform: scaleY(0.55) translateY(8%); } }
@keyframes hw-bob { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-2px) rotate(6deg); } }
@keyframes hw-fog { from { background-position: 0% 0; } to { background-position: 100% 0; } }

@media (max-width: 768px) {
    .hw-web { width: 80px; height: 80px; top: 56px; }
}

@media (prefers-reduced-motion: reduce) {
    .hw-bats { display: none; }
    .hw-fog, .hw-logo-pumpkin { animation: none; }
}
