﻿/* ============================================================
   default.master.css (v2.4)
   - Root variables + shell
   - Footer (Desktop + Mobile overlay) with Trustpilot
   ============================================================ */

/* ============================================================
   1) ROOT THEME VARIABLES
   ============================================================ */
:root {
    /* Theme */
    --qn-bg: #0b1022;
    --qn-text: #eef2f7;
    --qn-muted: #93a4b5;
    /* Accents */
    --qn-primary: #A78BFA; /* purple */
    --qn-accent: #22D3EE; /* cyan */
    /* Surfaces */
    --qn-border: rgba(148,163,184,.24);
    --qn-card: rgba(15,22,38,.80);
    /* FX */
    --qn-shadow: 0 24px 62px rgba(0,0,0,.45);
    --qn-gradient: linear-gradient(135deg, var(--qn-primary), var(--qn-accent));
    /* Footer FX */
    --qn-ftr-bg: rgba(11, 16, 34, .62);
    --qn-ftr-glass: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.04));
    --qn-ftr-border: rgba(255,255,255,.14);
}

/* ============================================================
   2) BASE PAGE SHELL
   ============================================================ */
html, body {
    height: 100%;
    background: radial-gradient(1200px 900px at 90% -20%, rgba(34,211,238,.12), transparent 60%), radial-gradient(1000px 700px at 15% -20%, rgba(167,139,250,.12), transparent 60%), var(--qn-bg);
    color: var(--qn-text);
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.qn-body {
    min-height: 100%;
}

/* Main content leaves room for header/footer */
.qn-main {
    min-height: calc(100vh - 160px);
    z-index: 1;
}

/* Shared text logo style */
.qn-logo-text {
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: .3px;
}

/* ============================================================
   3) DESKTOP FOOTER (on page)
   ============================================================ */
.qn-footer.qn-footer-fantasy {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border-top: 1px solid var(--qn-border);
    background: var(--qn-ftr-bg);
    backdrop-filter: blur(10px) saturate(150%);
}

.qn-footer-inner.qn-footer-inner-fantasy {
    position: relative;
    z-index: 1;
    max-width: 1160px;
    margin: 0 auto;
    padding: 16px 16px;
    display: grid;
    grid-template-columns: 1.05fr 1.2fr .75fr;
    gap: 16px;
    align-items: center;
}

/* Brand column */
.qn-footer-brandlink {
    display: grid;
    gap: 6px;
    color: inherit;
    text-decoration: none;
}

.qn-footer-logo-text {
    font-weight: 900;
    letter-spacing: .5px;
    font-size: 1.12rem;
}

.qn-footer-tag {
    color: rgba(238,242,247,.84);
    font-size: .92rem;
    line-height: 1.35;
    max-width: 46ch;
}

.qn-footer-meta {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 6px;
}

.qn-footer-copy {
    color: var(--qn-muted);
}

.qn-footer-dot {
    opacity: .6;
}

.qn-footer-smalllink {
    color: rgba(238,242,247,.90);
    text-decoration: none;
    border-bottom: 1px solid rgba(148,163,184,.35);
}

    .qn-footer-smalllink:hover {
        color: #fff;
        border-bottom-color: rgba(34,211,238,.65);
    }

/* Links column */
.qn-footer-links.qn-footer-links-fantasy {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 14px;
}

    .qn-footer-links.qn-footer-links-fantasy a {
        color: rgba(238,242,247,.92);
        text-decoration: none;
        position: relative;
        padding-bottom: 2px;
    }

        .qn-footer-links.qn-footer-links-fantasy a::after {
            content: "";
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            height: 2px;
            border-radius: 999px;
            background: var(--qn-gradient);
            transform: scaleX(0);
            transform-origin: left;
            transition: transform .22s ease;
        }

        .qn-footer-links.qn-footer-links-fantasy a:hover {
            color: #fff;
        }

            .qn-footer-links.qn-footer-links-fantasy a:hover::after {
                transform: scaleX(1);
            }

/* ============================================================
   4) TRUSTPILOT “CRYSTAL DOCK” (used by desktop + mobile)
   ============================================================ */
.qn-ftr-crystal {
    width: 100%;
    border-radius: 18px;
    padding: 12px 12px 10px;
    border: 1px solid var(--qn-ftr-border);
    background: radial-gradient(120% 140% at 0% 0%, rgba(34,211,238,.14), transparent 55%), radial-gradient(120% 140% at 100% 100%, rgba(167,139,250,.14), transparent 55%), var(--qn-ftr-glass);
    box-shadow: 0 18px 70px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.06), 0 0 120px rgba(99,102,241,.14);
    backdrop-filter: blur(10px) saturate(160%);
    position: relative;
    overflow: hidden;
}

    .qn-ftr-crystal::before {
        content: "";
        position: absolute;
        inset: -45% -70%;
        background: radial-gradient(circle at 20% 35%, rgba(255,255,255,.22), transparent 58%);
        transform: rotate(12deg);
        opacity: .55;
        pointer-events: none;
    }

.qn-ftr-crystal-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 8px;
}

.qn-ftr-crystal-title {
    font-weight: 900;
    letter-spacing: .2px;
}

.qn-ftr-crystal-sub {
    color: rgba(238,242,247,.78);
    font-size: .9rem;
}

/* Make Trustpilot widget behave inside glass */
.qn-ftr-crystal .trustpilot-widget {
    width: 100%;
    display: block;
    overflow: hidden;
}

.qn-ftr-crystal iframe {
    max-width: 100% !important;
}

/* ============================================================
   5) FOOTER AMBIENT BACKGROUND + STARS (shared)
   ============================================================ */
.qn-ftr-ambient {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

/* Nebula layers are painted via pseudo-elements for performance */
.qn-footer.qn-footer-fantasy .qn-ftr-ambient::before,
.qn-footer.qn-footer-fantasy .qn-ftr-ambient::after {
    content: "";
    position: absolute;
    inset: -30%;
    filter: blur(52px);
    mix-blend-mode: screen;
    opacity: .85;
    animation: qnFooterNebula 22s ease-in-out infinite;
}

.qn-footer.qn-footer-fantasy .qn-ftr-ambient::before {
    background: radial-gradient(560px 280px at 18% 55%, rgba(34,211,238,.26), transparent 72%), radial-gradient(620px 300px at 48% 28%, rgba(167,139,250,.32), transparent 76%), radial-gradient(560px 280px at 85% 60%, rgba(255,213,128,.16), transparent 78%);
}

.qn-footer.qn-footer-fantasy .qn-ftr-ambient::after {
    background: radial-gradient(620px 320px at 22% 30%, rgba(99,102,241,.22), transparent 80%), radial-gradient(680px 340px at 78% 34%, rgba(34,211,238,.18), transparent 82%), radial-gradient(520px 260px at 60% 78%, rgba(244,114,182,.12), transparent 84%);
    animation-direction: reverse;
    opacity: .62;
}

@keyframes qnFooterNebula {
    0% {
        transform: translate3d(0,0,0) scale(1);
        opacity: .70;
    }

    50% {
        transform: translate3d(-1.2%, 1%, 0) scale(1.05);
        opacity: .95;
    }

    100% {
        transform: translate3d(0,0,0) scale(1.02);
        opacity: .78;
    }
}

/* Stars (created by JS) */
.qn-ftr-star {
    position: absolute;
    border-radius: 999px;
    background: radial-gradient(circle at 50% 50%, #fff, rgba(255,255,255,.55) 60%, rgba(255,255,255,0) 75%);
    animation: qnFooterStarFloat var(--dur, 9s) ease-in-out infinite;
    opacity: .78;
}

.qn-ftr-star--mobile {
    opacity: .72;
}

@keyframes qnFooterStarFloat {
    0% {
        transform: translate(0,0);
        opacity: .25;
    }

    50% {
        transform: translate(var(--dx), var(--dy));
        opacity: .95;
    }

    100% {
        transform: translate(0,0);
        opacity: .38;
    }
}

/* ============================================================
   6) MOBILE OVERLAY FOOTER (inside menu overlay)
   ============================================================ */
.qn-mobile-footer.qn-mobile-footer-fantasy {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border-top: 1px solid var(--qn-border);
    background: rgba(11, 16, 34, .70);
    backdrop-filter: blur(10px) saturate(150%);
}

    /* Mobile footer uses same ambient container; tune a bit */
    .qn-mobile-footer.qn-mobile-footer-fantasy .qn-ftr-ambient::before,
    .qn-mobile-footer.qn-mobile-footer-fantasy .qn-ftr-ambient::after {
        content: "";
        position: absolute;
        inset: -35%;
        filter: blur(44px);
        mix-blend-mode: screen;
        opacity: .85;
        animation: qnMFooterNebula 20s ease-in-out infinite;
    }

    .qn-mobile-footer.qn-mobile-footer-fantasy .qn-ftr-ambient::before {
        background: radial-gradient(520px 260px at 20% 60%, rgba(34,211,238,.22), transparent 72%), radial-gradient(540px 270px at 55% 30%, rgba(167,139,250,.26), transparent 76%);
    }

    .qn-mobile-footer.qn-mobile-footer-fantasy .qn-ftr-ambient::after {
        background: radial-gradient(560px 280px at 75% 35%, rgba(99,102,241,.18), transparent 80%), radial-gradient(520px 260px at 55% 75%, rgba(255,213,128,.12), transparent 84%);
        animation-direction: reverse;
        opacity: .62;
    }

@keyframes qnMFooterNebula {
    0% {
        transform: translate3d(0,0,0) scale(1);
        opacity: .70;
    }

    50% {
        transform: translate3d(-1%, 1%, 0) scale(1.05);
        opacity: .92;
    }

    100% {
        transform: translate3d(0,0,0) scale(1.02);
        opacity: .78;
    }
}

/* Mobile inner layout */
.qn-mobile-footer-inner.qn-mobile-footer-inner-fantasy {
    position: relative;
    z-index: 1;
    padding: 14px 14px 16px;
    display: grid;
    gap: 12px;
}

.qn-mfoot-brand {
    display: grid;
    gap: 4px;
    text-align: left;
}

.qn-mfoot-tag {
    color: rgba(238,242,247,.82);
    font-size: .9rem;
    line-height: 1.35;
}

.qn-ftr-crystal.qn-ftr-crystal--mobile {
    border-radius: 16px;
    padding: 10px 10px 9px;
    box-shadow: 0 16px 56px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.06), 0 0 90px rgba(99,102,241,.12);
}

.qn-mfoot-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
}

    .qn-mfoot-links a {
        color: rgba(238,242,247,.92);
        text-decoration: none;
        position: relative;
        padding-bottom: 2px;
    }

        .qn-mfoot-links a::after {
            content: "";
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            height: 2px;
            border-radius: 999px;
            background: var(--qn-gradient);
            transform: scaleX(0);
            transform-origin: left;
            transition: transform .22s ease;
        }

        .qn-mfoot-links a:hover {
            color: #fff;
        }

            .qn-mfoot-links a:hover::after {
                transform: scaleX(1);
            }

.qn-mfoot-copy {
    color: var(--qn-muted);
    font-size: .9rem;
}

/* ============================================================
   7) RESPONSIVE FOOTER LAYOUT (desktop -> stacked)
   ============================================================ */
@media (max-width: 900px) {
    .qn-footer-inner.qn-footer-inner-fantasy {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }

    .qn-footer-tag {
        max-width: 56ch;
    }

    .qn-footer-links.qn-footer-links-fantasy {
        justify-content: center;
    }

    .qn-ftr-crystal-head {
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }

    .qn-footer-meta {
        justify-content: center;
    }
}

/* ============================================================
   8) ACCESSIBILITY / REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .qn-footer.qn-footer-fantasy .qn-ftr-ambient::before,
    .qn-footer.qn-footer-fantasy .qn-ftr-ambient::after,
    .qn-mobile-footer.qn-mobile-footer-fantasy .qn-ftr-ambient::before,
    .qn-mobile-footer.qn-mobile-footer-fantasy .qn-ftr-ambient::after,
    .qn-ftr-star {
        animation: none !important;
    }
}
