:root {
    --mcf-header-height: 104px;
    --mcf-admin-offset: 0px;
    --mcf-ink: #080805;
    --mcf-ink-soft: #121008;
    --mcf-gold: #e7bd42;
    --mcf-gold-light: #ffe888;
    --mcf-orange: #ff8a00;
    --mcf-amber: #ffbd2e;
    --mcf-border: rgba(231, 189, 66, 0.48);
}

.admin-bar {
    --mcf-admin-offset: 32px;
}

body.mcf-menu-enabled {
    padding-top: var(--mcf-header-height) !important;
}

body.mcf-menu-open {
    overflow: hidden !important;
}

html.mcf-menu-enabled-html {
    scroll-padding-top: calc(var(--mcf-header-height) + 22px);
}

/* Astra / Astra Pro: replace its visual header while keeping the theme intact. */
body.mcf-menu-enabled #masthead,
body.mcf-menu-enabled header.site-header,
body.mcf-menu-enabled .ast-desktop-header,
body.mcf-menu-enabled .ast-mobile-header-wrap,
body.mcf-menu-enabled .ast-above-header-wrap,
body.mcf-menu-enabled .ast-below-header-wrap {
    display: none !important;
}

.mcf-halloween-header,
.mcf-halloween-header * {
    box-sizing: border-box;
}

.mcf-halloween-header {
    position: fixed;
    z-index: 999999;
    top: var(--mcf-admin-offset);
    right: 0;
    left: 0;
    height: var(--mcf-header-height);
    color: #f7e7ae;
    background:
        radial-gradient(circle at 12% 30%, rgba(255, 138, 0, 0.12), transparent 23%),
        radial-gradient(circle at 88% 30%, rgba(231, 189, 66, 0.09), transparent 20%),
        linear-gradient(180deg, rgba(19, 17, 9, 0.985), rgba(5, 5, 3, 0.99));
    border-bottom: 1px solid var(--mcf-border);
    box-shadow: 0 12px 38px rgba(0, 0, 0, 0.72), inset 0 -1px rgba(255, 223, 111, 0.08);
    isolation: isolate;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.mcf-halloween-header::before {
    content: "";
    position: absolute;
    z-index: 5;
    right: 0;
    bottom: -2px;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, #6c4512 8%, var(--mcf-gold) 35%, var(--mcf-orange) 50%, var(--mcf-gold) 65%, #6c4512 92%, transparent 100%);
    background-size: 220% 100%;
    box-shadow: 0 0 12px rgba(255, 149, 0, 0.72);
    animation: mcf-border-flow 7s linear infinite;
}

.mcf-halloween-header::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    opacity: 0.3;
    pointer-events: none;
    background-image:
        repeating-linear-gradient(115deg, transparent 0 36px, rgba(255,255,255,0.018) 37px 38px),
        radial-gradient(circle at 50% 100%, rgba(255, 115, 0, 0.13), transparent 40%);
}

.mcf-header-inner {
    position: relative;
    z-index: 3;
    width: min(100% - 38px, 1780px);
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: clamp(18px, 2vw, 34px);
}

.mcf-logo-link {
    position: relative;
    z-index: 4;
    display: flex;
    align-items: center;
    flex: 0 0 clamp(230px, 18vw, 310px);
    height: 92px;
    text-decoration: none !important;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.9));
}

.mcf-logo-link::before {
    content: "";
    position: absolute;
    inset: 22% 7%;
    z-index: -1;
    border-radius: 50%;
    background: rgba(255, 155, 0, 0.13);
    filter: blur(19px);
    opacity: 0.65;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.mcf-logo-link:hover::before,
.mcf-logo-link:focus-visible::before {
    opacity: 1;
    transform: scale(1.08);
}

.mcf-logo {
    display: block;
    width: 100%;
    max-height: 90px;
    object-fit: contain;
    object-position: left center;
    transform-origin: left center;
    animation: mcf-logo-breathe 4.8s ease-in-out infinite;
}

.mcf-navigation-panel {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(15px, 1.4vw, 26px);
}

.mcf-primary-nav {
    min-width: 0;
}

.mcf-nav-list {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(5px, 0.45vw, 11px);
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.mcf-nav-item {
    margin: 0 !important;
    padding: 0 !important;
}

.mcf-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 8px clamp(5px, 0.45vw, 10px);
    overflow: hidden;
    color: #eadca9 !important;
    border: 1px solid transparent;
    border-radius: 8px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(11px, 0.72vw, 13px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: 0.025em;
    text-align: center;
    text-decoration: none !important;
    text-shadow: 0 1px 2px #000;
    white-space: nowrap;
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.mcf-nav-link::before {
    content: "";
    position: absolute;
    right: 11px;
    bottom: 3px;
    left: 11px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--mcf-gold-light), var(--mcf-orange), transparent);
    box-shadow: 0 0 8px rgba(255, 164, 0, 0.8);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.28s ease;
}

.mcf-nav-link::after {
    content: "✦";
    position: absolute;
    top: 1px;
    right: 4px;
    color: var(--mcf-gold-light);
    font-size: 8px;
    opacity: 0;
    transform: translateY(5px) rotate(-30deg);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.mcf-nav-link:hover,
.mcf-nav-link:focus-visible,
.mcf-nav-link.is-current {
    color: #fff2b1 !important;
    border-color: rgba(231, 189, 66, 0.28);
    background: linear-gradient(180deg, rgba(255, 180, 25, 0.09), rgba(255, 119, 0, 0.025));
    box-shadow: inset 0 0 18px rgba(255, 164, 0, 0.06), 0 4px 17px rgba(0, 0, 0, 0.3);
    text-shadow: 0 0 8px rgba(255, 165, 0, 0.55), 0 1px 2px #000;
    transform: translateY(-2px);
    outline: none;
}

.mcf-nav-link:hover::before,
.mcf-nav-link:focus-visible::before,
.mcf-nav-link.is-current::before {
    transform: scaleX(1);
}

.mcf-nav-link:hover::after,
.mcf-nav-link:focus-visible::after,
.mcf-nav-link.is-current::after {
    opacity: 0.9;
    transform: translateY(0) rotate(0);
}

.mcf-buy-button {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 164px;
    min-height: 48px;
    padding: 11px 17px;
    overflow: hidden;
    color: #1c1100 !important;
    border: 1px solid #ffe890;
    border-radius: 10px;
    background: linear-gradient(135deg, #ffe073 0%, #eeb52d 35%, #ff8a00 72%, #e7b62f 100%);
    background-size: 220% 220%;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.65) inset, 0 0 22px rgba(255, 133, 0, 0.34), 0 8px 22px rgba(0,0,0,0.5);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: 0.025em;
    text-align: center;
    text-decoration: none !important;
    text-transform: uppercase;
    text-shadow: 0 1px rgba(255,255,255,0.3);
    animation: mcf-cta-shimmer 5.5s ease infinite, mcf-cta-pulse 2.8s ease-in-out infinite;
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.mcf-buy-button::before {
    content: "";
    position: absolute;
    top: -75%;
    left: -35%;
    width: 28%;
    height: 260%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.65), transparent);
    transform: rotate(22deg) translateX(-250%);
    animation: mcf-cta-glint 4.2s ease-in-out infinite;
}

.mcf-buy-button:hover,
.mcf-buy-button:focus-visible {
    color: #100900 !important;
    filter: saturate(1.18) brightness(1.08);
    transform: translateY(-3px) scale(1.025);
    box-shadow: 0 0 0 1px rgba(0,0,0,0.65) inset, 0 0 34px rgba(255, 149, 0, 0.56), 0 13px 27px rgba(0,0,0,0.55);
    outline: none;
}

.mcf-buy-icon {
    font-size: 12px;
    animation: mcf-star-spin 4.5s linear infinite;
}

.mcf-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-left: auto;
    min-width: 104px;
    min-height: 48px;
    padding: 8px 13px;
    color: var(--mcf-gold-light);
    border: 1px solid rgba(231, 189, 66, 0.58);
    border-radius: 9px;
    background: linear-gradient(180deg, rgba(255, 190, 45, 0.11), rgba(0, 0, 0, 0.14));
    box-shadow: inset 0 0 17px rgba(255, 150, 0, 0.05), 0 6px 17px rgba(0,0,0,0.35);
    font: 800 12px/1 Georgia, "Times New Roman", serif;
    letter-spacing: 0.11em;
    cursor: pointer;
}

.mcf-menu-toggle:focus-visible {
    outline: 2px solid var(--mcf-gold-light);
    outline-offset: 3px;
}

.mcf-toggle-lines {
    position: relative;
    display: block;
    width: 24px;
    height: 18px;
}

.mcf-toggle-lines span {
    position: absolute;
    left: 0;
    display: block;
    width: 24px;
    height: 2px;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--mcf-gold), #fff0a2);
    box-shadow: 0 0 7px rgba(255, 149, 0, 0.5);
    transition: transform 0.28s ease, top 0.28s ease, opacity 0.2s ease;
}

.mcf-toggle-lines span:nth-child(1) { top: 0; }
.mcf-toggle-lines span:nth-child(2) { top: 8px; }
.mcf-toggle-lines span:nth-child(3) { top: 16px; }

.mcf-menu-toggle[aria-expanded="true"] .mcf-toggle-lines span:nth-child(1) {
    top: 8px;
    transform: rotate(45deg);
}

.mcf-menu-toggle[aria-expanded="true"] .mcf-toggle-lines span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mcf-menu-toggle[aria-expanded="true"] .mcf-toggle-lines span:nth-child(3) {
    top: 8px;
    transform: rotate(-45deg);
}

.mcf-header-atmosphere,
.mcf-mist,
.mcf-glow-orb {
    position: absolute;
    pointer-events: none;
}

.mcf-header-atmosphere {
    z-index: 1;
    inset: 0;
    overflow: hidden;
}

.mcf-mist {
    width: 46%;
    height: 150%;
    top: -20%;
    opacity: 0.22;
    filter: blur(15px);
    background: radial-gradient(ellipse at center, rgba(255, 232, 170, 0.13), transparent 64%);
}

.mcf-mist-one {
    left: -9%;
    animation: mcf-mist-drift 11s ease-in-out infinite alternate;
}

.mcf-mist-two {
    right: -12%;
    animation: mcf-mist-drift-reverse 14s ease-in-out infinite alternate;
}

.mcf-glow-orb {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffd15c;
    box-shadow: 0 0 11px 4px rgba(255, 144, 0, 0.55);
    opacity: 0;
}

.mcf-glow-orb-one {
    left: 40%;
    bottom: 12px;
    animation: mcf-firefly 5.5s ease-in-out infinite;
}

.mcf-glow-orb-two {
    right: 22%;
    top: 19px;
    animation: mcf-firefly 7.2s 1.7s ease-in-out infinite;
}

@media (max-width: 1280px) {
    :root {
        --mcf-header-height: 92px;
    }

    .mcf-header-inner {
        width: min(100% - 28px, 1180px);
    }

    .mcf-logo-link {
        flex-basis: clamp(220px, 28vw, 310px);
        height: 82px;
    }

    .mcf-logo {
        max-height: 80px;
    }

    .mcf-menu-toggle {
        display: inline-flex;
    }

    .mcf-navigation-panel {
        position: absolute;
        top: calc(100% + 1px);
        right: -14px;
        left: -14px;
        max-height: 0;
        padding: 0 18px;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        border-bottom: 1px solid rgba(231, 189, 66, 0.52);
        background:
            radial-gradient(circle at 20% 0, rgba(255, 145, 0, 0.12), transparent 35%),
            linear-gradient(180deg, rgba(12, 11, 6, 0.995), rgba(3, 3, 2, 0.995));
        box-shadow: 0 24px 42px rgba(0,0,0,0.78);
        transform: translateY(-8px);
        transition: max-height 0.48s cubic-bezier(.2,.8,.2,1), opacity 0.3s ease, visibility 0.3s ease, transform 0.35s ease, padding 0.35s ease;
    }

    .mcf-halloween-header.is-open .mcf-navigation-panel {
        max-height: calc(100vh - var(--mcf-header-height) - var(--mcf-admin-offset));
        padding-top: 22px;
        padding-bottom: 25px;
        overflow-y: auto;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .mcf-primary-nav {
        width: 100%;
    }

    .mcf-nav-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .mcf-nav-item {
        opacity: 0;
        transform: translateY(-8px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .mcf-halloween-header.is-open .mcf-nav-item {
        opacity: 1;
        transform: translateY(0);
    }

    .mcf-halloween-header.is-open .mcf-nav-item:nth-child(1) { transition-delay: .04s; }
    .mcf-halloween-header.is-open .mcf-nav-item:nth-child(2) { transition-delay: .07s; }
    .mcf-halloween-header.is-open .mcf-nav-item:nth-child(3) { transition-delay: .10s; }
    .mcf-halloween-header.is-open .mcf-nav-item:nth-child(4) { transition-delay: .13s; }
    .mcf-halloween-header.is-open .mcf-nav-item:nth-child(5) { transition-delay: .16s; }
    .mcf-halloween-header.is-open .mcf-nav-item:nth-child(6) { transition-delay: .19s; }
    .mcf-halloween-header.is-open .mcf-nav-item:nth-child(7) { transition-delay: .22s; }
    .mcf-halloween-header.is-open .mcf-nav-item:nth-child(8) { transition-delay: .25s; }

    .mcf-nav-link {
        width: 100%;
        min-height: 48px;
        justify-content: center;
        padding: 11px 12px;
        border-color: rgba(231, 189, 66, 0.12);
        background: rgba(255,255,255,0.018);
        font-size: 14px;
        white-space: normal;
    }

    .mcf-buy-button {
        align-self: center;
        width: min(100%, 420px);
        min-height: 54px;
        font-size: 15px;
    }
}

@media (max-width: 782px) {
    .admin-bar {
        --mcf-admin-offset: 46px;
    }
}

@media (max-width: 640px) {
    :root {
        --mcf-header-height: 78px;
    }

    .mcf-header-inner {
        width: calc(100% - 18px);
        gap: 8px;
    }

    .mcf-logo-link {
        flex-basis: min(64vw, 244px);
        height: 69px;
    }

    .mcf-logo {
        max-height: 67px;
    }

    .mcf-menu-toggle {
        min-width: 52px;
        min-height: 44px;
        padding: 8px 12px;
    }

    .mcf-toggle-text {
        display: none;
    }

    .mcf-navigation-panel {
        right: -9px;
        left: -9px;
        padding-right: 12px;
        padding-left: 12px;
    }

    .mcf-nav-list {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .mcf-nav-link {
        min-height: 44px;
        font-size: 13px;
    }
}

@media (max-width: 360px) {
    .mcf-logo-link {
        flex-basis: 220px;
    }

    .mcf-menu-toggle {
        min-width: 46px;
        padding-right: 9px;
        padding-left: 9px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mcf-halloween-header *,
    .mcf-halloween-header *::before,
    .mcf-halloween-header *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
}

@keyframes mcf-border-flow {
    to { background-position: -220% 0; }
}

@keyframes mcf-logo-breathe {
    0%, 100% { transform: scale(1); filter: brightness(0.98); }
    50% { transform: scale(1.012); filter: brightness(1.07); }
}

@keyframes mcf-cta-shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes mcf-cta-pulse {
    0%, 100% { box-shadow: 0 0 0 1px rgba(0,0,0,0.65) inset, 0 0 18px rgba(255, 133, 0, 0.28), 0 8px 22px rgba(0,0,0,0.5); }
    50% { box-shadow: 0 0 0 1px rgba(0,0,0,0.65) inset, 0 0 31px rgba(255, 158, 0, 0.48), 0 8px 22px rgba(0,0,0,0.5); }
}

@keyframes mcf-cta-glint {
    0%, 38% { transform: rotate(22deg) translateX(-260%); }
    58%, 100% { transform: rotate(22deg) translateX(690%); }
}

@keyframes mcf-star-spin {
    0%, 74% { transform: rotate(0deg) scale(1); }
    86% { transform: rotate(180deg) scale(1.25); }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes mcf-mist-drift {
    from { transform: translateX(-4%) scaleX(0.92); }
    to { transform: translateX(24%) scaleX(1.13); }
}

@keyframes mcf-mist-drift-reverse {
    from { transform: translateX(6%) scaleX(1.08); }
    to { transform: translateX(-25%) scaleX(0.92); }
}

@keyframes mcf-firefly {
    0%, 100% { opacity: 0; transform: translate(0, 6px) scale(0.55); }
    17% { opacity: 0.8; }
    48% { opacity: 0.25; transform: translate(24px, -17px) scale(1); }
    72% { opacity: 0.75; }
    88% { opacity: 0; transform: translate(47px, 5px) scale(0.6); }
}
