/* Footer, contact overlay, and scroll-to-top controls. */
.site-footer {
    padding: 64px 0 40px;
    text-align: center;
    background: var(--bg);
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(214, 170, 77, .22) 30%,
        rgba(214, 170, 77, .30) 50%,
        rgba(111, 214, 209, .14) 75%,
        transparent 100%
    );
}

.site-footer__wave {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 32px;
    overflow: hidden;
    pointer-events: none;
}

.site-footer__wave svg {
    width: 100%;
    height: 100%;
    display: block;
}

.site-footer__brand-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.site-footer__brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: .72;
    transition: opacity var(--transition);
}

.site-footer__brand:hover {
    opacity: 1;
}

.site-footer__logo-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 0 8px rgba(214, 170, 77, .18));
}

.site-footer__tagline {
    font-family: var(--font-mono);
    font-size: .62rem;
    font-weight: 500;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: rgba(214, 170, 77, .42);
    margin: 0;
}

.site-footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.footer-social {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-social__link {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-bright);
    background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, 0));
    border: 1px solid rgba(214, 170, 77, .18);
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 12px 24px rgba(0, 0, 0, .18);
    transition: transform var(--transition), border-color var(--transition), color var(--transition), background var(--transition), box-shadow var(--transition);
}

.footer-social__link:hover,
.footer-social__link:focus-visible {
    transform: translateY(-2px);
    color: var(--bg);
    background: var(--gold-bright);
    border-color: rgba(240, 202, 115, .7);
    box-shadow: 0 0 0 1px rgba(214, 170, 77, .15), 0 16px 28px rgba(0, 0, 0, .22);
}

.footer-social__link:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 3px;
}

.footer-social__icon {
    width: 23px;
    height: 23px;
    display: block;
}

.site-footer p {
    font-size: .78rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.site-footer__separator {
    margin: 0 8px;
    color: rgba(184, 176, 162, .45);
}

.footer-contact-trigger {
    appearance: none;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    color: var(--gold);
    cursor: pointer;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    transition: color var(--transition);
}

.footer-contact-trigger:hover,
.footer-contact-trigger:focus-visible {
    color: var(--gold-bright);
}

.footer-contact-trigger:focus-visible {
    outline: 1px solid rgba(240, 202, 115, .7);
    outline-offset: 4px;
}

body.rdu-contact-lock {
    overflow: hidden;
}

.rdu-contact-overlay[hidden] {
    display: none;
}

.rdu-contact-overlay {
    position: fixed;
    inset: 0;
    z-index: 10020;
    display: grid;
    place-items: center;
    padding: clamp(24px, 5vw, 56px);
    background: rgba(0, 0, 0, .85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    transition: opacity .24s cubic-bezier(.2, .7, .2, 1), visibility .24s ease;
}

.rdu-contact-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.rdu-contact-overlay__panel {
    position: relative;
    width: min(100%, 660px);
    color: var(--text);
    background: linear-gradient(180deg, rgba(17, 17, 19, .98), rgba(9, 9, 11, .98));
    border: 1px solid rgba(214, 170, 77, .10);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .025);
    opacity: 0;
    transform: scale(.98);
    transform-origin: center;
    transition: opacity .24s cubic-bezier(.2, .7, .2, 1), transform .24s cubic-bezier(.2, .7, .2, 1);
    will-change: opacity, transform;
}

.rdu-contact-overlay.is-open .rdu-contact-overlay__panel {
    opacity: 1;
    transform: scale(1);
}

.rdu-contact-overlay__content {
    padding: clamp(50px, 6vw, 64px);
    color: var(--text);
    line-height: 1.7;
}

.rdu-contact-overlay__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--gold);
    font-family: var(--font-mono);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.4;
    text-transform: uppercase;
}

.rdu-contact-overlay__eyebrow::before {
    content: '';
    width: 28px;
    height: 1px;
    background: rgba(214, 170, 77, .42);
}

.rdu-contact-overlay__title {
    margin: 0;
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 2.65rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: .96;
    text-transform: uppercase;
    text-shadow: 0 0 12px rgba(214, 170, 77, .10);
}

.rdu-contact-overlay__text {
    max-width: 34rem;
    margin-top: 28px;
    color: #cbc3b6;
    font-size: 1.08rem;
    line-height: 1.75;
    opacity: .94;
}

.rdu-contact-overlay__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 36px;
}

.rdu-contact-overlay__email,
.rdu-contact-overlay__discord {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
    transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.rdu-contact-overlay__email {
    padding: 0 18px;
    color: var(--bg);
    background: var(--gold);
}

.rdu-contact-overlay__discord {
    padding: 0 16px;
    color: var(--gold);
    border: 1px solid rgba(214, 170, 77, .22);
    background: rgba(214, 170, 77, .035);
}

.rdu-contact-overlay__email:hover,
.rdu-contact-overlay__email:focus-visible {
    color: #0b0b0b;
    background: var(--gold-bright);
    transform: translateY(-1px);
}

.rdu-contact-overlay__discord:hover,
.rdu-contact-overlay__discord:focus-visible {
    color: var(--gold-bright);
    border-color: rgba(214, 170, 77, .42);
    background: rgba(214, 170, 77, .07);
    transform: translateY(-1px);
}

.rdu-contact-overlay__email:focus-visible,
.rdu-contact-overlay__discord:focus-visible {
    outline: 1px solid rgba(240, 202, 115, .75);
    outline-offset: 4px;
}

.rdu-contact-overlay__close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 1;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    opacity: .76;
    transition: opacity .2s ease, transform .2s ease;
}

.rdu-contact-overlay__close:hover,
.rdu-contact-overlay__close:focus-visible {
    opacity: 1;
    transform: scale(1.04);
}

.rdu-contact-overlay__close:focus-visible {
    outline: 1px solid rgba(240, 202, 115, .75);
    outline-offset: 3px;
}

.rdu-contact-overlay__close-line {
    position: absolute;
    width: 16px;
    height: 1px;
    background: currentColor;
}

.rdu-contact-overlay__close-line:first-child {
    transform: rotate(45deg);
}

.rdu-contact-overlay__close-line:last-child {
    transform: rotate(-45deg);
}

@media (max-width: 640px) {
    .rdu-contact-overlay {
        place-items: center;
        padding: 30px;
    }

    .rdu-contact-overlay__panel {
        width: 100%;
        max-height: calc(100dvh - 60px);
        overflow-y: auto;
    }

    .rdu-contact-overlay__content {
        padding: 44px 30px 30px;
    }

    .rdu-contact-overlay__title {
        font-size: 2.45rem;
    }

    .rdu-contact-overlay__text {
        font-size: 1rem;
    }

    .rdu-contact-overlay__actions {
        flex-direction: column;
    }

    .rdu-contact-overlay__email,
    .rdu-contact-overlay__discord {
        justify-content: center;
        width: 100%;
        max-width: 100%;
        overflow-wrap: anywhere;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rdu-contact-overlay,
    .rdu-contact-overlay__panel {
        transition: none;
    }
}

.scroll-top-btn {
    position: fixed;
    bottom: 100px;
    right: 24px;
    display: none;
    width: 50px;
    height: 50px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text);
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    z-index: 9999;
    transition: all .3s ease;
    opacity: 0;
    transform: scale(0.8);
}

.scroll-top-btn.visible {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transform: scale(1);
}

.scroll-top-btn:hover {
    background: var(--bg-card);
    border-color: var(--gold-dim);
    box-shadow: 0 0 16px var(--gold-glow);
    transform: scale(1.1) translateY(-4px);
}

.scroll-top-btn:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .scroll-top-btn {
        bottom: 90px;
        right: 20px;
        width: 48px;
        height: 48px;
        font-size: 18px;
    }
}
