/* TEMA HALLOWEEN (temporário) — ativo só com html.halloween; remover = tirar halloween.js do index.html */
html.halloween {
    --accent: #ff7a1a;
    --hw-orange: #ff7a1a;
    --hw-orange-hi: #ff9a3d;
    --hw-purple: #8b3dff;
}

html.halloween body {
    background-image:
        linear-gradient(180deg, rgba(8, 4, 12, .55) 0%, rgba(12, 5, 18, .74) 42%, rgba(9, 7, 12, .97) 82%, #09070c 100%),
        linear-gradient(110deg, rgba(120, 40, 4, .55), rgba(110, 40, 200, .22) 55%, rgba(10, 5, 14, .6)),
        url("assets/images/Gemini_Generated_Image_wds59awds59awds5.jpg");
}

html.halloween .particle {
    background: var(--hw-orange);
    filter: drop-shadow(0 0 6px rgba(255, 122, 26, .8));
}

html.halloween .particle:nth-child(3n) {
    background: var(--hw-purple);
    filter: drop-shadow(0 0 6px rgba(139, 61, 255, .8));
}

html.halloween .site-header {
    border-bottom-color: rgba(255, 122, 26, .3);
}

html.halloween nav a:hover,
html.halloween .card-link:hover h2 {
    color: var(--hw-orange-hi);
}

html.halloween .section-kicker,
html.halloween .tax-warning strong {
    color: var(--hw-orange-hi);
}

html.halloween .hero-eyebrow {
    border-color: rgba(255, 122, 26, .55);
    background: rgba(40, 14, 2, .55);
    color: #ffd2a8;
    box-shadow: 0 0 22px rgba(255, 122, 26, .25);
}

html.halloween .hero h1 {
    color: #fff3e6;
    text-shadow: 0 0 18px rgba(255, 122, 26, .55), 0 0 42px rgba(139, 61, 255, .35);
}

html.halloween nav a.current,
html.halloween .button-primary,
html.halloween .card button,
html.halloween .tabs button.is-active {
    border-color: var(--hw-orange);
    background: linear-gradient(180deg, var(--hw-orange-hi), #e85d00);
    color: #1a0b02;
}

html.halloween .button-primary:hover,
html.halloween .card button:hover {
    background: linear-gradient(180deg, #ffb062, var(--hw-orange));
}

html.halloween .tabs button:hover,
html.halloween .button-secondary:hover,
html.halloween .pkg-details:hover {
    border-color: rgba(255, 122, 26, .6);
    background: rgba(255, 122, 26, .12);
}

html.halloween .card.pkg {
    background: linear-gradient(180deg, rgba(30, 14, 34, .95), rgba(10, 7, 12, .96));
}

html.halloween .card.pkg:hover {
    border-color: rgba(255, 122, 26, .75);
    box-shadow: 0 22px 60px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 122, 26, .3), 0 0 44px rgba(139, 61, 255, .3);
}

html.halloween .card.pkg {
    position: relative;
}

html.halloween .card.pkg::before {
    content: "🎃";
    position: absolute;
    z-index: 2;
    top: 10px;
    right: 12px;
    font-size: 26px;
    filter: drop-shadow(0 0 10px rgba(255, 122, 26, .8));
    animation: hw-bob 3.2s ease-in-out infinite;
    pointer-events: none;
}

html.halloween .card.pkg:nth-child(2n)::before {
    content: "👻";
    animation-delay: -1.4s;
}

html.halloween .pkg-price .tax-note {
    background: rgba(255, 122, 26, .14);
    color: #ffc08a;
}

html.halloween .card.pkg .pkg-price strong,
html.halloween .package-breakdown .is-total dd,
html.halloween .package-price {
    color: #ffd2a8;
}

html.halloween .tax-warning {
    border-color: rgba(255, 122, 26, .5);
    background: rgba(255, 122, 26, .08);
}

/* Decoração */
.hw-layer {
    position: fixed;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.hw-web {
    position: absolute;
    top: 76px;
    width: 170px;
    height: 170px;
    opacity: .5;
}

.hw-web.left { left: 0; }
.hw-web.right { right: 0; transform: scaleX(-1); }

.hw-spider {
    position: absolute;
    top: 76px;
    right: 64px;
    width: 1px;
    height: 120px;
    background: rgba(255, 255, 255, .35);
    transform-origin: top;
    animation: hw-drop 7s ease-in-out infinite;
}

.hw-spider::after {
    content: "🕷️";
    position: absolute;
    bottom: -14px;
    left: -11px;
    font-size: 22px;
}

.hw-bat {
    position: absolute;
    left: -80px;
    width: 46px;
    color: #0b0710;
    filter: drop-shadow(0 0 6px rgba(255, 122, 26, .45));
    animation: hw-fly linear infinite;
}

.hw-bat svg {
    display: block;
    width: 100%;
    animation: hw-flap .28s ease-in-out infinite alternate;
}

.hw-fog {
    position: absolute;
    left: -10%;
    right: -10%;
    bottom: -40px;
    height: 220px;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(170, 150, 200, .16), transparent 60%),
        radial-gradient(ellipse at 70% 90%, rgba(170, 150, 200, .14), transparent 55%);
    filter: blur(14px);
    animation: hw-fog 18s ease-in-out infinite alternate;
}

.hw-flash {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(220, 210, 255, .5);
    opacity: 0;
    pointer-events: none;
}

.hw-flash.on {
    animation: hw-lightning .9s ease-out;
}

.hw-sound {
    position: fixed;
    z-index: 60;
    left: 16px;
    bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(255, 122, 26, .5);
    border-radius: 999px;
    background: rgba(14, 7, 18, .85);
    color: #ffd2a8;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(255, 122, 26, .2);
}

.hw-sound:hover {
    border-color: var(--hw-orange);
}

.hw-sound:focus-visible {
    outline: 2px solid var(--hw-orange);
    outline-offset: 3px;
}

html.halloween main,
html.halloween .site-header {
    position: relative;
    z-index: 2;
}

@keyframes hw-fly {
    0% { transform: translate(0, 0); }
    25% { transform: translate(30vw, -40px); }
    50% { transform: translate(60vw, 30px); }
    75% { transform: translate(90vw, -20px); }
    100% { transform: translate(115vw, 10px); }
}

@keyframes hw-flap {
    from { transform: scaleY(1); }
    to { transform: scaleY(.45); }
}

@keyframes hw-bob {
    0%, 100% { transform: translateY(0) rotate(-6deg); }
    50% { transform: translateY(-6px) rotate(6deg); }
}

@keyframes hw-drop {
    0%, 100% { transform: scaleY(.35); }
    50% { transform: scaleY(1); }
}

@keyframes hw-fog {
    from { transform: translateX(-4%); }
    to { transform: translateX(4%); }
}

@keyframes hw-lightning {
    0% { opacity: 0; }
    8% { opacity: 1; }
    16% { opacity: .1; }
    24% { opacity: .8; }
    100% { opacity: 0; }
}

@media (max-width: 700px) {
    .hw-web { width: 110px; height: 110px; top: 64px; }
    .hw-spider { display: none; }
    .hw-sound { left: 10px; bottom: 10px; width: 40px; padding: 0; justify-content: center; font-size: 17px; }
    .hw-sound-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .hw-bat, .hw-spider, .hw-fog, .hw-flash { display: none; }
    html.halloween .card.pkg::before { animation: none; }
}

/* Cursor bruxa na vassoura (ponta do cabo = ponto do clique) */
html.halloween,
html.halloween * {
    cursor: url("assets/images/cursor-bruxa.svg") 3 5, url("assets/images/cursor-bruxa.png") 3 5, auto !important;
}

/* Feedback de clique: faíscas + botão a afundar */
.hw-burst {
    position: fixed;
    z-index: 70;
    width: 0;
    height: 0;
    pointer-events: none;
}

.hw-ring {
    position: absolute;
    left: -14px;
    top: -14px;
    width: 28px;
    height: 28px;
    border: 2px solid #ff9a3d;
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(255, 122, 26, .8), inset 0 0 8px rgba(139, 61, 255, .6);
    animation: hw-ring .5s ease-out forwards;
}

.hw-spark {
    position: absolute;
    left: -4px;
    top: -4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--c);
    box-shadow: 0 0 8px var(--c);
    animation: hw-spark .65s cubic-bezier(.2, .7, .3, 1) forwards;
}

.hw-spark.star {
    left: -7px;
    top: -7px;
    width: 14px;
    height: 14px;
    border-radius: 0;
    clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

html.halloween button:active,
html.halloween a.button-primary:active,
html.halloween a.button-secondary:active,
html.halloween .pkg-details:active {
    transform: scale(.95) !important;
    filter: brightness(1.25);
    transition-duration: .05s;
}

@keyframes hw-ring {
    from { transform: scale(.3); opacity: 1; }
    to { transform: scale(1.8); opacity: 0; }
}

@keyframes hw-spark {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--x), var(--y)) scale(.2) rotate(180deg); opacity: 0; }
}
