/* ========================================
   SOLARIS — Halloween Mode
   Loaded only when HALLOWEEN_MODE=true. Everything is scoped under
   [data-season="halloween"] on <html>, so this file is inert otherwise.
   ======================================== */

/* ---- Palette: pumpkin orange + witchy purple on near-black ---- */
[data-season="halloween"] {
    --primary: #f97316;
    --primary-light: #fb923c;
    --primary-dark: #c2410c;
    --secondary: #7e22ce;
    --secondary-light: #9333ea;
    --secondary-dark: #4c1d95;
    --season-colour: #f97316;

    --accent-warm: #f97316;
    --accent-green: #84cc16;

    --bg-primary: #0e0b10;
    --bg-secondary: #17111b;
    --bg-card: #1f1724;
    --bg-card-hover: #2a1f30;

    --border-color: #33253a;
    --border-color-hover: #4a3352;

    --shadow-card-hover: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(249, 115, 22, 0.2);
    --shadow-glow-blue: 0 4px 20px rgba(249, 115, 22, 0.35);
    --shadow-glow-purple: 0 4px 20px rgba(126, 34, 206, 0.35);

    --accent-section-blue: #9a3412;
    --accent-section-warm: #3b0f5c;

    --hw-slime: #65a30d;
    --hw-glow: rgba(249, 115, 22, 0.55);
}

[data-season="halloween"][data-theme="light"] {
    --bg-primary: #fbf3ea;
    --bg-secondary: #f4e6d6;
    --bg-card: #ffffff;
    --bg-card-hover: #fff8f1;
    --border-color: #ead5bf;
    --border-color-hover: #d9b998;
    --text-primary: #2b1d14;
    --text-secondary: #7a5f4c;
    --text-heading: #1a0f08;
    --accent-section-blue: #ea7a2c;
    --accent-section-warm: #8b5cc4;
    --hw-slime: #84cc16;
}

/* ---- Global accents ---- */
[data-season="halloween"] ::selection {
    background: #f97316;
    color: #120a04;
}

[data-season="halloween"] .btn-primary {
    background: linear-gradient(135deg, #fb923c, #ea580c);
    border-color: #c2410c;
}

[data-season="halloween"] .btn-primary:hover {
    background: linear-gradient(135deg, #fdba74, #f97316);
    box-shadow: 0 8px 30px var(--hw-glow);
}

[data-season="halloween"] .site-header.scrolled {
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(249, 115, 22, 0.25);
}

[data-season="halloween"] .section-title,
[data-season="halloween"] .section-title-link {
    color: var(--text-heading);
}

[data-season="halloween"] .section-title::after {
    background: linear-gradient(90deg, #f97316, #7e22ce);
}

/* Keep the white "Apply for Staff" pill white (the global gradient would hide its text) */
[data-season="halloween"] .apply-wny-action .btn-primary {
    background: #fff;
    border-color: #fff;
}

[data-season="halloween"] .apply-wny-action .btn-primary:hover {
    background: #fff7ed;
}

/* Lead copy sits on the orange band, so lift it off the default grey */
[data-season="halloween"] .identity-content .identity-lead {
    color: rgba(255, 237, 213, 0.85);
}

[data-season="halloween"][data-theme="light"] .identity-content .identity-lead {
    color: rgba(40, 16, 4, 0.8);
}

/* Slime-green cosmetics band instead of the default emerald */
[data-season="halloween"] .cosmetics-section,
[data-season="halloween"][data-theme="light"] .cosmetics-section,
[data-season="halloween"] .section-divider[style*="#10b981"] {
    background: var(--hw-slime) !important;
}

[data-season="halloween"] .section-divider path[fill="#10b981"] {
    fill: var(--hw-slime);
}

[data-season="halloween"] .stat-store i,
[data-season="halloween"] .news-slide-placeholder {
    background: rgba(249, 115, 22, 0.15);
    color: var(--primary);
}

/* ---- Hero ---- */
[data-season="halloween"] .hero-overlay {
    background:
        radial-gradient(ellipse at center, rgba(20, 6, 30, 0.15) 30%, rgba(10, 4, 14, 0.75) 100%),
        linear-gradient(180deg, rgba(76, 29, 149, 0.35) 0%, rgba(194, 65, 12, 0.25) 100%);
}

[data-season="halloween"] .hero-title,
[data-season="halloween"][data-theme="light"] .hero-title {
    background: linear-gradient(180deg, #fff7ed 0%, #fdba74 45%, #f97316 75%, #c2410c 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
    filter: drop-shadow(0 0 18px rgba(249, 115, 22, 0.55)) drop-shadow(0 4px 20px rgba(0, 0, 0, 0.6));
    animation: hw-flicker 6s ease-in-out infinite;
}

[data-season="halloween"] .hero-tagline {
    color: #fed7aa;
}

/* Effects layer: fog, drifting ghosts, a cobweb */
.hw-fx {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

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

.hw-ghost {
    position: absolute;
    color: rgba(255, 255, 255, 0.75);
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.5));
    animation: hw-float 7s ease-in-out infinite;
}

.hw-ghost:nth-child(2) { top: 22%; left: 10%; font-size: 2.6rem; }
.hw-ghost:nth-child(3) { top: 58%; left: 18%; font-size: 1.6rem; animation-delay: -2s; animation-duration: 9s; opacity: 0.7; }
.hw-ghost:nth-child(4) { top: 64%; right: 16%; font-size: 2.1rem; animation-delay: -4s; animation-duration: 8s; }

.hw-bat {
    position: absolute;
    width: 46px;
    height: 20px;
    color: #120a14;
    animation: hw-bat 14s linear infinite;
}

.hw-bat:nth-child(5) { top: 18%; animation-delay: 0s; }
.hw-bat:nth-child(6) { top: 30%; width: 32px; animation-delay: -5s; animation-duration: 17s; }
.hw-bat:nth-child(7) { top: 10%; width: 26px; animation-delay: -10s; animation-duration: 20s; }

.hw-web {
    position: absolute;
    top: 0;
    left: 0;
    width: 140px;
    height: 140px;
    opacity: 0.4;
}

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

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

@keyframes hw-bat {
    0% { left: -60px; transform: translateY(0) scaleY(1); }
    25% { transform: translateY(-30px) scaleY(0.6); }
    50% { transform: translateY(10px) scaleY(1); }
    75% { transform: translateY(-20px) scaleY(0.6); }
    100% { left: calc(100% + 60px); transform: translateY(0) scaleY(1); }
}

@keyframes hw-flicker {
    0%, 92%, 100% { opacity: 1; }
    93% { opacity: 0.75; }
    94% { opacity: 1; }
    96% { opacity: 0.85; }
}

@media (max-width: 768px) {
    .hw-web { display: none; }
    .hw-ghost:nth-child(3) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    [data-season="halloween"] .hero-title,
    .hw-fog,
    .hw-ghost { animation: none; }
    .hw-bat { display: none; }
}
