

@import url("nav-premium.css");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: clip;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--dark-bg);
    color: var(--light-text);
    line-height: 1.6;
    overflow-x: clip;
}

:root {
    --primary-gold: #b3a17d;
    --secondary-gold: #E2CFB5;
    --dark-bg: #080B0F;
    --darker-bg: #050810;
    --light-text: #FFFFFF;
    --gray-text: #A0A0A0;
    --field-bg: rgba(26, 31, 46, 0.7);
    --success-green: #2a571f;
    --danger-red: #FF3B3B;
}

nav {
    --nav-dropdown-drop: 1.65rem;
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 2rem);
    max-width: 1060px;
    z-index: 1000;
    height: 74px;
    display: flex;
    align-items: center;
    border-radius: 60px;
    box-sizing: border-box;
    overflow: visible;
}

.nav-container {
    width: 100%;
    margin: 0 auto;
    padding: 0 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.logo,
.logo-nav {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1100;
}

.logo img,
.logo-nav img,
.nav-brand img,
.nav-logo {
    width: 62px;
    height: 62px;
    max-height: 62px;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: drop-shadow(0 2px 6px rgba(201, 176, 55, 0.2));
}

.logo img:hover,
.logo-nav img:hover,
.nav-brand img:hover,
.nav-logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--light-text);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary-gold);
    transition: width 0.35s ease;
}

.nav-links a:hover {
    color: var(--primary-gold);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links .nav-auth-chip::after,
.nav-links .login-btn::after,
.nav-links .logout-btn::after {
    display: none;
}

.nav-dashboard-link {
    color: var(--primary-gold) !important;
    font-weight: 600;
}

/* Auth chip styles live in nav-premium.css (.nav-auth-chip) */

.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
    position: relative;
    z-index: 1100;
}

.hamburger-menu .bar {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--primary-gold);
    border-radius: 2px;
    transition: transform 0.35s ease, opacity 0.35s ease;
    transform-origin: center;
}

@media screen and (max-width: 768px) {


    nav {
        top: 8px;
        width: calc(100% - 1rem);
        padding: 0.4rem 1rem;
        border-radius: 50px;
    }


    nav.menu-open {
        border-color: transparent;
        box-shadow: none;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }


    .hamburger-menu {
        display: flex;
    }


    .nav-container {
        position: relative;
    }

    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }


    .nav-links {
        position: fixed;
        top: calc(-30px - env(safe-area-inset-top, 0px));
        left: calc(-30px - env(safe-area-inset-left, 0px));
        right: calc(-30px - env(safe-area-inset-right, 0px));
        bottom: calc(-30px - env(safe-area-inset-bottom, 0px));
        min-width: 100vw;
        min-height: 100vh;
        width: calc(100vw + 60px);
        height: calc(100vh + 60px);
        background: #050810;
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        padding: 6rem 2.5rem 3rem;
        gap: 0;
        list-style: none;
        z-index: 1060;

        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.4s ease, visibility 0s linear 0.4s;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        pointer-events: all;
        transition: opacity 0.4s ease, visibility 0s linear 0s;
    }


    .nav-links > li {
        width: 100%;
        opacity: 0;
        transform: translateY(28px);
        transition: opacity 0.45s ease, transform 0.45s ease;
    }

    .nav-links.active > li:nth-child(1) { opacity: 1; transform: none; transition-delay: 0.04s; }
    .nav-links.active > li:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.09s; }
    .nav-links.active > li:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.14s; }
    .nav-links.active > li:nth-child(4) { opacity: 1; transform: none; transition-delay: 0.19s; }
    .nav-links.active > li:nth-child(5) { opacity: 1; transform: none; transition-delay: 0.24s; }
    .nav-links.active > li:nth-child(6) { opacity: 1; transform: none; transition-delay: 0.29s; }
    .nav-links.active > li:nth-child(7) { opacity: 1; transform: none; transition-delay: 0.34s; }
    .nav-links.active > li:nth-child(8) { opacity: 1; transform: none; transition-delay: 0.39s; }
    .nav-links.active > li:nth-child(9) { opacity: 1; transform: none; transition-delay: 0.44s; }
    .nav-links.active > li:nth-child(10) { opacity: 1; transform: none; transition-delay: 0.49s; }
    .nav-links.active > li:nth-child(11) { opacity: 1; transform: none; transition-delay: 0.54s; }
    .nav-links.active > li:nth-child(12) { opacity: 1; transform: none; transition-delay: 0.59s; }


    .nav-links > li > a {
        display: block;
        font-size: clamp(1.05rem, 4.5vw, 1.3rem);
        font-weight: 600;
        letter-spacing: 0.02em;
        text-transform: uppercase;
        color: var(--light-text);
        padding: 0.45rem 0;
        border: none;
        line-height: 1.2;
        transition: color 0.25s ease;
    }

    .nav-links > li > a:hover,
    .nav-links > li > a:active {
        color: var(--primary-gold);
    }


    .nav-links > li > a::after {
        display: none;
    }


    .nav-links > li:last-child {
        margin-top: 1.8rem;
    }

    .nav-links > li:last-child .nav-auth-chip,
    .nav-links > li:last-child .login-btn,
    .nav-links > li:last-child .logout-btn {
        display: inline-block;
        width: auto;
        padding: 0.8rem 2.4rem;
        border-radius: 50px;
        font-size: 0.95rem;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }


    .hamburger-menu.is-open .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger-menu.is-open .bar:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }

    .hamburger-menu.is-open .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

@media screen and (max-width: 600px) {
    .nav-container {
        padding: 0 1rem;
    }

    .logo img,
    .logo-nav img,
    .nav-brand img,
    .nav-logo {
        width: 62px;
        height: 62px;
    }
}

@media screen and (max-width: 375px) {
    .nav-container {
        padding: 0 0.5rem;
    }
}

footer {
    padding: 2rem 1rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(201, 176, 55, 0.1);
    color: var(--gray-text);
    font-size: 0.9rem;
}

.footer-shell {
    width: min(1180px, 100%);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem 2rem;
    text-align: left;
}

.footer-shell .footer-copy {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    line-height: 1.6;
}

.footer-shell .footer-copy a {
    color: var(--primary-gold);
    text-decoration: none;
}

.footer-shell .footer-copy a:hover {
    color: var(--secondary-gold);
    text-decoration: underline;
}

.footer-separator {
    color: rgba(255, 255, 255, 0.22);
}

.footer-shell .footer-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-shell .footer-social {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    position: static;
    right: auto;
    top: auto;
    transform: none;
    margin-top: 0;
}

.footer-shell .footer-social a {
    color: var(--primary-gold);
    font-size: 1.35rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    position: static;
    overflow: visible;
    border-radius: 0;
    background: none;
    border: none;
    box-shadow: none;
    transition: color 0.3s, transform 0.3s;
}

.footer-shell .footer-social a:hover {
    color: var(--secondary-gold);
    transform: translateY(-1px);
    box-shadow: none;
}

.footer-shell .footer-social svg,
.footer-shell .footer-trust svg {
    width: 1em;
    height: 1em;
    display: block;
}

.footer-shell .footer-trust {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding-left: 1rem;
    border-left: 1px solid rgba(201, 176, 55, 0.16);
}

.footer-shell .footer-trust-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(201, 176, 55, 0.16);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(216, 196, 154, 0.88);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
    transition: border-color 0.3s, background 0.3s, color 0.3s, transform 0.3s;
}

.footer-shell .footer-trust-link:hover {
    color: var(--light-text);
    border-color: rgba(201, 176, 55, 0.3);
    background: rgba(201, 176, 55, 0.07);
    transform: translateY(-1px);
}

.footer-shell .footer-trust-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.95rem;
    height: 0.95rem;
    color: var(--primary-gold);
}

.footer-shell .footer-trustpilot-icon {
    color: var(--primary-gold);
}

.footer-shell .footer-badge {
    display: flex;
    align-items: center;
}

.footer-shell .footer-badge a {
    display: inline-flex;
    align-items: center;
    opacity: 0.9;
    transition: opacity 0.3s, transform 0.3s;
}

.footer-shell .footer-badge a:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.footer-shell .footer-badge img {
    display: block;
    max-width: min(156px, 100%);
    height: auto;
}

@media screen and (max-width: 900px) {
    .footer-shell {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1rem;
        text-align: center;
    }

    .footer-shell .footer-copy,
    .footer-shell .footer-actions,
    .footer-shell .footer-trust {
        justify-content: center;
    }

    .footer-shell .footer-trust {
        padding-left: 0;
        border-left: none;
    }
}

@media screen and (max-width: 560px) {
    .footer-shell .footer-actions {
        flex-direction: column;
        gap: 0.85rem;
    }

    .footer-shell .footer-trust {
        flex-wrap: wrap;
    }
}

.nav-stocks-dropdown,
.nav-about-dropdown {
    display: none;
}

.nav-sub-panel {
    display: none;
}

@media screen and (min-width: 769px) {
    .nav-stocks-item,
    .nav-about-item {
        position: relative;
    }


    .nav-stocks-mobile-li,
    .nav-about-mobile-li {
        display: none;
    }

    .nav-stocks-mobile-btn {
        display: none;
    }

    .nav-stocks-trigger,
    .nav-about-trigger {
        display: flex;
        align-items: center;
        gap: 0.3rem;
        cursor: default;
    }

    .stocks-caret {
        font-size: 0.6rem;
        opacity: 0.7;
        transition: transform 0.25s ease;
    }

    .nav-stocks-item:hover .stocks-caret,
    .nav-about-item:hover .stocks-caret {
        transform: rotate(180deg);
    }

    .nav-stocks-dropdown,
    .nav-about-dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        transform: none;
        min-width: max-content;
        margin: 0;
        padding: 0.5rem 0 0;
        list-style: none;
        background: transparent;
        border: none;
        border-radius: 0;
        box-shadow: none;
        z-index: 3000;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.15rem;
        pointer-events: none;
    }

    /* Invisible bridge so the cursor path from trigger to menu never breaks hover */
    .nav-stocks-dropdown::before,
    .nav-about-dropdown::before {
        content: '';
        position: absolute;
        top: -14px;
        left: -8px;
        right: -8px;
        height: 16px;
    }

    .nav-stocks-item:hover .nav-stocks-dropdown,
    .nav-about-item:hover .nav-about-dropdown,
    .nav-stocks-item:focus-within .nav-stocks-dropdown,
    .nav-about-item:focus-within .nav-about-dropdown,
    .nav-stocks-item.is-open .nav-stocks-dropdown,
    .nav-about-item.is-open .nav-about-dropdown,
    .magnetic-dropdown.is-open .magnetic-dropdown__menu {
        display: flex;
        pointer-events: auto;
    }

    .magnetic-dropdown__link,
    .nav-stocks-dropdown li a,
    .nav-about-dropdown li a {
        display: inline-block;
        padding: 0.42rem 0.2rem;
        color: var(--light-text);
        text-transform: none;
        font-size: 0.9rem;
        font-weight: 500;
        letter-spacing: 0.05em;
        text-decoration: none;
        white-space: nowrap;
        background: transparent;
        transform: translate3d(0, 0, 0) scale(1);
        transition:
            color 0.3s ease,
            transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
            text-shadow 0.3s ease;
        will-change: transform;
        outline: none;
    }

    .nav-stocks-dropdown li a::after,
    .nav-about-dropdown li a::after {
        display: none;
    }

    .magnetic-dropdown__link:hover,
    .magnetic-dropdown__link:focus-visible,
    .magnetic-dropdown__link.is-magnetic,
    .nav-stocks-dropdown li a:hover,
    .nav-stocks-dropdown li a:focus-visible,
    .nav-about-dropdown li a:hover,
    .nav-about-dropdown li a:focus-visible {
        background: transparent;
        color: var(--primary-gold);
        text-shadow: 0 0 14px rgba(179, 161, 125, 0.42);
    }

    .magnetic-dropdown__link:focus-visible,
    .nav-stocks-dropdown li a:focus-visible,
    .nav-about-dropdown li a:focus-visible {
        outline: 1px solid rgba(179, 161, 125, 0.55);
        outline-offset: 3px;
    }

    /* Nav dropdowns — sequential reveal (SPY first, then next; no stack overlap) */
    .nav-stocks-dropdown.magnetic-dropdown--deck,
    .nav-about-dropdown.magnetic-dropdown--deck {
        position: absolute;
        top: calc(100% + 0.12rem);
        left: 0;
        padding-top: 0;
        gap: 0.08rem;
    }

    .magnetic-dropdown--deck {
        --deck-reveal-duration: 0.62s;
        --deck-reveal-step: 0.14s;
    }

    .magnetic-dropdown--deck li {
        opacity: 0;
        pointer-events: none;
        transform: translate3d(0, -8px, 0);
    }

    .magnetic-dropdown--deck li:nth-child(1) { --deck-slot: 0; }
    .magnetic-dropdown--deck li:nth-child(2) { --deck-slot: 1; }
    .magnetic-dropdown--deck li:nth-child(3) { --deck-slot: 2; }
    .magnetic-dropdown--deck li:nth-child(4) { --deck-slot: 3; }
    .magnetic-dropdown--deck li:nth-child(5) { --deck-slot: 4; }
    .magnetic-dropdown--deck li:nth-child(6) { --deck-slot: 5; }

    .nav-stocks-item:hover .magnetic-dropdown--deck li,
    .nav-stocks-item:focus-within .magnetic-dropdown--deck li,
    .nav-stocks-item.is-open .magnetic-dropdown--deck li,
    .nav-about-item:hover .magnetic-dropdown--deck li,
    .nav-about-item:focus-within .magnetic-dropdown--deck li,
    .nav-about-item.is-open .magnetic-dropdown--deck li {
        pointer-events: auto;
        animation: bcs-deck-reveal var(--deck-reveal-duration) cubic-bezier(0.16, 1, 0.3, 1) both;
        animation-delay: calc(var(--deck-slot) * var(--deck-reveal-step));
    }

    @keyframes bcs-deck-reveal {
        0% {
            opacity: 0;
            transform: translate3d(0, -8px, 0);
        }
        100% {
            opacity: 1;
            transform: translate3d(0, 0, 0);
        }
    }

}

@media screen and (max-width: 768px) {

    .nav-stocks-item,
    .nav-about-item {
        display: none;
    }

    .nav-about-mobile-li {
        display: list-item;
    }

    .nav-stocks-mobile-btn {
        background: none;
        border: none;
        cursor: pointer;
        color: var(--light-text);
        font-size: clamp(1.05rem, 4.5vw, 1.3rem);
        font-weight: 600;
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 0.45rem 0;
        font-family: inherit;
    }

    .nav-stocks-mobile-btn span {
        font-size: 1.4rem;
        color: var(--primary-gold);
        line-height: 1;
    }

    .nav-about-mobile-btn {
        background: none;
        border: none;
        cursor: pointer;
        color: var(--light-text);
        font-size: clamp(1.05rem, 4.5vw, 1.3rem);
        font-weight: 600;
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 0.45rem 0;
        font-family: inherit;
    }

    .nav-about-mobile-btn span {
        font-size: 1.4rem;
        color: var(--primary-gold);
        line-height: 1;
    }


    .nav-links.stocks-open > li,
    .nav-links.active.stocks-open > li,
    .nav-links.about-open > li,
    .nav-links.active.about-open > li {
        opacity: 0 !important;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }


    .nav-sub-panel {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1070;
        background: rgba(5, 8, 16, 0.97);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        padding: 5rem 2.5rem 3rem;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.35s ease, visibility 0s linear 0.35s;
    }

    .nav-sub-panel.active {
        opacity: 1;
        visibility: visible;
        pointer-events: all;
        transition: opacity 0.35s ease, visibility 0s linear 0s;
    }

    .sub-panel-back {
        background: none;
        border: none;
        color: var(--primary-gold);
        font-size: 1rem;
        font-family: inherit;
        cursor: pointer;
        margin-bottom: 2rem;
        padding: 0;
        display: flex;
        align-items: center;
        gap: 0.4rem;
        letter-spacing: 0.03em;
    }

    .sub-panel-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .sub-panel-list li a {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 0.85rem 0;
        border-bottom: 1px solid rgba(201, 176, 55, 0.1);
        color: var(--light-text);
        text-decoration: none;
        transition: color 0.2s;
    }

    .sub-panel-list li a:hover {
        color: var(--primary-gold);
    }
}

.sd-ticker {
    color: inherit;
    font-weight: inherit;
    font-size: inherit;
    letter-spacing: inherit;
}

.sd-name {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .magnetic-dropdown__link,
    .nav-stocks-dropdown li a,
    .nav-about-dropdown li a {
        transition: color 0.2s ease, text-shadow 0.2s ease;
    }

    .magnetic-dropdown--deck li {
        opacity: 1;
        pointer-events: auto;
        animation: none !important;
        transform: none;
    }
}

#bcs-pt-iris {
    position: fixed;
    z-index: 99999;
    inset: 0;
    background: #050810;
    opacity: 0;
    pointer-events: none;
    transition: opacity 240ms ease;
    will-change: opacity;
}

/* Enter: page arrived from an in-site click — start dark, fade out to reveal it.
   Pure CSS (class added by nav-component.js before first paint) so a slow or failed
   page-transitions.js can never trap the page under the overlay. */
#bcs-pt-iris.bcs-pt-entering {
    animation: bcs-pt-fade-out 460ms ease forwards;
}

@keyframes bcs-pt-fade-out {
    from { opacity: 1; }
    to   { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    #bcs-pt-iris { display: none !important; }
}

/* Mobile scroll-perf: the sticky nav repaints every scroll frame, so its
   backdrop blur is sampled continuously on the GPU. Backgrounds here are
   92-100% opaque, so the heavy blur is barely visible. Cap it on small
   screens to cut per-frame paint cost without changing the look. Desktop
   values (blur 14px / 24px) are untouched above. */
@media (max-width: 768px) {
    nav {
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }
    .nav-sub-panel {
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
}
