.footer {
    position: relative;
    width: 100%;
    background-color: var(--bg-void);
    padding-inline: clamp(1rem, 4vw, 5.5rem);
    padding-block-start: 0;
    padding-block-end: clamp(3rem, 5vw, 5rem);
    overflow: hidden;
}

/* ===== TOP DECORATIVE RULE ===== */
.footer-rule {
    width: calc(100% - clamp(2rem, 8vw, 11rem));
    height: 1px;
    margin-inline: auto;
    margin-bottom: clamp(4rem, 6vw, 7rem);
    margin-top: 0;
    background: linear-gradient(
        to right,
        transparent,
        var(--gold-deep) 20%,
        var(--gold-core) 50%,
        var(--gold-deep) 80%,
        transparent
    );
    opacity: 0.5;
}

.footer-inner {
    max-width: 2560px;
    margin-inline: auto;
    display: grid;
    grid-template-columns: 1fr 1.8fr 1fr;
    gap: clamp(3rem, 6vw, 8rem);
    align-items: start;
}

/* ===== RIGHT ===== */
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    align-items: flex-end;
    text-align: right;
}

.footer-tagline,
.footer-copy {
    max-width: 34ch;
}

.footer-logo img {
    height: clamp(48px, 6vw, 100px);
    width: auto;
    object-fit: contain;
    filter: brightness(1.05);
    transition: transform 0.3s ease, filter 0.3s ease;
}

.footer-logo:hover img {
    transform: translateY(-2px);
    filter: brightness(1.15) drop-shadow(0 0 10px rgba(212, 169, 41, 0.2));
}

.footer-tagline {
    font-size: clamp(1rem, 1.2vw, 1.6rem);
    color: var(--text-muted);
    line-height: 1.5;
    opacity: 1;
}

.footer-copy {
    font-size: clamp(0.85rem, 1vw, 1.35rem);
    color: var(--text-muted);
    opacity: 0.65;
    letter-spacing: 0.04em;
}

/* ===== SHARED LABEL ===== */
.footer-nav-label {
    display: block;
    font-size: clamp(0.75rem, 0.9vw, 1.3rem);
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold-core);
    margin-bottom: clamp(1rem, 1.5vw, 2rem);
    opacity: 0.9;
}

/* ===== LEFT ===== */
.footer-nav ul {
    display: flex;
    flex-direction: column;
    gap: clamp(0.6rem, 0.9vw, 1.1rem);
    padding: 0;
    margin: 0;
}

.footer-nav ul li a {
    font-size: clamp(1.1rem, 1.5vw, 1.9rem);
    font-weight: 400;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    transition: color 0.25s ease, letter-spacing 0.25s ease;
    position: relative;
}

.footer-nav ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 0;
    height: 1px;
    background: var(--gradient-gold-text);
    transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.footer-nav ul li a:hover,
.footer-nav ul li a.active {
    background: var(--gradient-gold-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-nav ul li a:hover {
    letter-spacing: 0.08em;
}

.footer-nav ul li a:hover::after {
    width: 100%;
}

.footer-nav ul li a.active {
    font-weight: 600;
}

/* ===== CENTRE ===== */
.footer-contact {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-contact .footer-nav-label {
    align-self: center;
}

.footer-email {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    font-size: clamp(1rem, 1.2vw, 1.55rem);
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    margin-bottom: clamp(1.5rem, 2.5vw, 2.8rem);
    transition: color 0.25s ease;
    overflow-wrap: break-word;
}

.footer-email img {
    width: clamp(14px, 1.6vw, 22px);
    height: auto;
    filter: brightness(0) invert(0.55);
    flex-shrink: 0;
    transition: filter 0.25s ease;
}

.footer-email:hover {
    background: var(--gradient-gold-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-email:hover img {
    filter: brightness(0) saturate(100%) invert(79%) sepia(30%) saturate(600%) hue-rotate(10deg);
}

/* ===== SOCIAL ICONS ===== */
.footer-social {
    display: flex;
    gap: clamp(0.7rem, 1.2vw, 1.1rem);
}

.footer-social a {
    width: clamp(36px, 4vw, 54px);
    height: clamp(36px, 4vw, 54px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.5),
        0 6px 14px rgba(0, 0, 0, 0.3);
    transform: translateY(0) scale(1);
    will-change: transform;
    transition:
        transform 0.35s cubic-bezier(0.25, 1, 0.5, 1),
        box-shadow 0.35s cubic-bezier(0.25, 1, 0.5, 1),
        background 0.25s ease,
        border-color 0.25s ease;
}

.footer-social a img {
    max-height: clamp(16px, 2.2vw, 28px);
    width: auto;
    filter: brightness(0) invert(0.55);
    transition: filter 0.25s ease;
}

.footer-social a.tiktok img {
    max-height: clamp(20px, 2.8vw, 34px);
}

.footer-social a:hover {
    background: rgba(212, 169, 41, 0.10);
    border-color: var(--border-primary);
    transform: translateY(-2px) scale(1.08);
    box-shadow: var(--glow-gold);
}

.footer-social a:hover img {
    filter: brightness(0) saturate(100%) invert(79%) sepia(30%) saturate(600%) hue-rotate(10deg);
}

.footer-social a:active {
    transform: translateY(0) scale(0.96);
    transition: transform 0.1s ease;
}

/* ===== GLOW ===== */
.footer-glow {
    position: absolute;
    bottom: -10vh;
    left: 50%;
    transform: translateX(-50%);
    width: 60vw;
    height: 30vh;
    background: radial-gradient(ellipse, rgba(180, 130, 20, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

/* ===== CHANGELOG TRIGGER ===== */
.footer-version {
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: clamp(0.8rem, 0.95vw, 1.2rem);
    color: var(--text-muted);
    opacity: 0.6;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: opacity 0.25s ease, color 0.25s ease;
}

.footer-version:hover {
    opacity: 1;
    color: var(--gold-core);
}

/* ===== CHANGELOG MODAL ===== */
.changelog-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: clamp(1rem, 4vw, 3rem);
}

.changelog-modal-overlay.active {
    display: flex;
}

.changelog-modal {
    background: var(--bg-surface);
    border: 1px solid var(--border-primary);
    border-radius: 0.75rem;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    position: relative;
}

.changelog-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.25s ease;
}

.changelog-modal-close:hover {
    color: var(--gold-core);
}

.changelog-modal-title {
    color: var(--gold-core);
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: clamp(1.3rem, 1.8vw, 1.8rem);
}

.changelog-modal-body h2 {
    color: var(--text-primary);
    font-size: clamp(1.1rem, 1.4vw, 1.4rem);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.changelog-modal-body h2:first-child {
    margin-top: 0;
}

.changelog-modal-body ul {
    margin: 0 0 1rem 0;
    padding-left: 1.4rem;
    color: var(--text-secondary);
}

.changelog-modal-body li {
    margin-bottom: 0.4rem;
    line-height: 1.5;
}

.changelog-modal-body p {
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ===== RESPONSIVE: ≤1200px ===== */
@media (max-width: 1200px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
    }

    .footer-brand {
        grid-column: 1 / -1;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-end;
        gap: 2rem 4rem;
        text-align: right;
    }

    .footer-brand .footer-tagline,
    .footer-brand .footer-copy {
        flex-basis: 100%;
    }

    .footer-contact {
        align-items: center;
    }
}

/* ===== RESPONSIVE: ≤768px ===== */
@media (max-width: 768px) {
    .footer-inner {
        grid-template-columns: 1fr;
        gap: clamp(3rem, 5vw, 4.5rem);
    }

    .footer-brand {
        grid-column: auto;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        text-align: left;
        gap: 1.2rem;
    }

    .footer-contact {
        align-items: flex-start;
    }

    .footer-contact .footer-nav-label {
        align-self: flex-start;
    }

    .footer-rule {
        width: 100%;
    }
}