@import url('../../../resource/font/google-fonts.css');

:root {
    --bg-void: #02030a;
    --bg-midnight: #050a1f;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-tertiary: #475569;
    --accent-cobalt: #0047ff;
    --accent-amber: #ffb800;
    --font-sans: "Inter", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", monospace;
    --container-w: 1280px;
    --nav-height: 72px;
}

header {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    background: linear-gradient(180deg, rgba(2, 3, 10, 0.94) 0%, rgba(2, 3, 10, 0.72) 100%);
    backdrop-filter: blur(20px) saturate(1.15);
    -webkit-backdrop-filter: blur(20px) saturate(1.15);
    
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
    transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

header.scrolled {
    background: rgba(2, 3, 10, 0.92);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    gap: 1.25rem;
}

.logo {
    font-size: 1.35rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    letter-spacing: -0.04em;
    text-decoration: none;
    flex-shrink: 0;
    transition: opacity 0.25s ease;
}

.site-logo-mark {
    flex-shrink: 0;
    display: block;
}

.logo svg,
.logo .site-logo-mark {
    filter: drop-shadow(0 0 14px rgba(255, 184, 0, 0.22));
}

.logo:hover {
    opacity: 0.92;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2.5vw, 2.25rem);
    flex: 1;
    justify-content: center;
    min-width: 0;
}

@media (min-width: 769px) {
    .nav-inner {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 1.25rem;
    }

    .nav-inner .logo {
        justify-self: start;
    }

    .nav-links {
        flex: unset;
        justify-self: center;
        width: fit-content;
        max-width: 100%;
        padding: 6px 10px;
        background: rgba(255, 255, 255, 0.035);
        border: 1px solid rgba(255, 255, 255, 0.07);
        border-radius: 999px;
    }

    .nav-inner .actions {
        justify-self: end;
    }
}

.nav-links a {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-decoration: none;
    white-space: nowrap;
    padding: 0.35rem 0;
    position: relative;
    transition: color 0.25s ease;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--accent-amber);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease;
}

.nav-links a:hover {
    color: #fff;
}

.nav-links a:hover::after {
    transform: scaleX(1);
}

.nav-links a.active {
    color: var(--accent-amber);
}

.nav-links a.active::after {
    transform: scaleX(1);
}

.actions {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    flex-shrink: 0;
}

.actions-trail {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    flex-shrink: 0;
}

.header-mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    flex-shrink: 0;
}

.header-mobile-menu-btn-bar {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.82);
}

@media (max-width: 768px) {
    .header-mobile-menu-btn {
        display: inline-flex;
    }
}

.lang-dropdown {
    position: relative;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 10px 0 12px;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.lang-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 184, 0, 0.35);
}

.lang-btn:focus-visible {
    outline: 2px solid rgba(255, 184, 0, 0.45);
    outline-offset: 2px;
}

.lang-btn .lang-btn-chevron {
    width: 14px;
    height: 14px;
    opacity: 0.45;
    flex-shrink: 0;
}

.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 260px;
    padding: 4px;
    background: rgba(8, 12, 28, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    z-index: 1001;
    transform-origin: top right;
    animation: siteChromeMenuIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.lang-dropdown.active .lang-menu {
    display: grid;
}

.lang-menu a {
    padding: 9px 11px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.lang-menu a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.lang-menu a.active {
    color: var(--accent-amber);
    background: rgba(255, 184, 0, 0.08);
}

@keyframes siteChromeMenuIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    height: 40px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s;
    border: none;
    font-family: inherit;
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--accent-cobalt);
    color: #fff;
}

.btn-outline:hover {
    background: var(--accent-cobalt);
}

.btn-amber {
    background: var(--accent-amber);
    color: var(--bg-void);
    border: none;
    box-shadow: 0 5px 15px rgba(255, 184, 0, 0.3);
}

.btn-amber:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 184, 0, 0.5);
}

.container {
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 0 24px;
}

footer.site-footer {
    margin-top: var(--footer-margin-top, clamp(3rem, 12vw, 8rem));
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #03050f 0%, #010208 45%, #000208 100%);
    padding: 100px 0 44px;
    border-top: 1px solid rgba(0, 71, 255, 0.2);
}

footer.site-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 184, 0, 0.35) 45%, rgba(0, 71, 255, 0.45) 55%, transparent);
    opacity: 0.7;
    pointer-events: none;
}

footer.site-footer::after {
    content: "";
    position: absolute;
    right: -15%;
    top: -30%;
    width: 55%;
    height: 70%;
    background: radial-gradient(ellipse at center, rgba(0, 71, 255, 0.1) 0%, transparent 65%);
    pointer-events: none;
}

.footer-inner {
    position: relative;
    z-index: 1;
}

.footer-brand {
    position: relative;
    padding-left: 1rem;
    max-width: 300px;
}

.footer-brand::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.2rem;
    bottom: 0.2rem;
    width: 3px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--accent-amber), rgba(0, 71, 255, 0.85));
}

.footer-brand .logo {
    margin-bottom: 1rem;
}

.footer-brand .footer-tagline {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-grid h5 {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: rgba(255, 184, 0, 0.9);
    margin-bottom: 1.25rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-transform: uppercase;
}

.footer-grid ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-grid ul li {
    margin-bottom: 0.65rem;
}

.footer-grid ul a {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

.footer-grid ul a:hover {
    color: var(--accent-amber);
    transform: translateX(2px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    color: var(--text-tertiary);
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-bottom a:hover {
    color: var(--accent-amber);
}

@media (max-width: 380px) {
    .lang-menu {
        grid-template-columns: 1fr;
        min-width: 188px;
    }
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    
    :root {
        --nav-height: calc(168px + env(safe-area-inset-top, 0px)) !important;
    }

    
    header#site-header {
        height: auto !important;
        min-height: 56px;
        padding-top: 0;
        box-sizing: border-box;
    }

    header#site-header .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    
    header#site-header .nav-inner {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        align-items: center;
        column-gap: 10px;
        row-gap: 10px;
        min-height: 56px;
        padding-top: calc(10px + env(safe-area-inset-top, 0px));
        padding-bottom: 12px;
        height: auto !important;
    }

    header#site-header .nav-inner > .logo {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 1.05rem;
        gap: 8px;
    }

    header#site-header .nav-inner > .logo svg,
    header#site-header .nav-inner > .logo .site-logo-mark {
        width: 22px;
        height: 22px;
        flex-shrink: 0;
    }

    header#site-header .nav-inner > .nav-links {
        display: none !important;
    }

    header#site-header .nav-inner > .actions {
        display: contents;
    }

    header#site-header .nav-inner .lang-dropdown {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        max-width: 100%;
    }

    header#site-header .nav-inner .lang-btn {
        width: 100%;
        max-width: 100%;
        height: 38px;
        justify-content: space-between;
        padding: 0 12px 0 14px;
        font-size: 0.8125rem;
    }

    header#site-header .nav-inner .lang-menu {
        left: 0;
        right: 0;
        min-width: 0;
        width: 100%;
        transform-origin: top center;
    }

    header#site-header .nav-inner .actions-trail {
        grid-column: 2;
        grid-row: 1;
        display: flex !important;
        align-items: center;
        gap: 6px;
        justify-content: flex-end;
        flex-shrink: 0;
    }

    header#site-header .nav-inner .actions-trail .btn {
        height: 34px;
        padding: 0 12px;
        font-size: 0.75rem;
    }

    
    body.site-mobile-drawer header#site-header .nav-inner .actions-trail #nav-login-btn,
    body.site-mobile-drawer header#site-header .nav-inner .actions-trail > a.btn-amber {
        display: none !important;
    }

    
    html {
        overflow-x: hidden;
        max-width: 100%;
    }

    body {
        overflow-x: hidden;
        max-width: 100%;
        position: relative;
        touch-action: pan-y pinch-zoom;
    }

    
    main.container.checkout-wrap {
        max-width: 100%;
        min-width: 0;
        overflow-x: visible;
        overscroll-behavior-x: auto;
    }

    main.container.checkout-wrap .config-panel,
    main.container.checkout-wrap .summary-panel {
        min-width: 0;
        max-width: 100%;
    }

    
    body[data-page-id="index"] section#hero.hero.container,
    body[data-page-id="index"] section#hero.hero {
        padding-top: max(calc(var(--nav-height) + 100px), calc(env(safe-area-inset-top, 0px) + 252px)) !important;
    }

    body[data-page-id="pricing"] section#hero.hero.container,
    body[data-page-id="pricing"] #hero.hero.container {
        padding-top: max(calc(var(--nav-height) + 60px), calc(env(safe-area-inset-top, 0px) + 232px)) !important;
    }

    body[data-page-id="about"] .hero {
        padding-top: max(calc(var(--nav-height) + 60px), calc(env(safe-area-inset-top, 0px) + 232px)) !important;
    }

    body[data-page-id="help"] .page-header,
    body[data-page-id="privacy"] .page-header,
    body[data-page-id="terms"] .page-header {
        padding-top: max(calc(var(--nav-height) + 80px), calc(env(safe-area-inset-top, 0px) + 252px)) !important;
    }

    body[data-page-id="buy"] main.container.checkout-wrap {
        padding-top: max(var(--checkout-below-nav), calc(env(safe-area-inset-top, 0px) + 220px)) !important;
    }

    body[data-page-id="console"] .console-below-header {
        padding-top: max(calc(var(--nav-height) + 12px), calc(env(safe-area-inset-top, 0px) + 184px)) !important;
    }

    main .container:not(.checkout-wrap),
    section.container,
    main.container:not(.checkout-wrap),
    main.main-board {
        max-width: 100%;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
    }

    main .container img,
    section.container img,
    main.container img {
        max-width: 100%;
        height: auto;
    }

    footer.site-footer {
        padding: 72px 0 36px;
    }

    
    footer.site-footer .footer-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        column-gap: 1.5rem;
        row-gap: 2.25rem;
        margin-bottom: 2.5rem !important;
        align-items: start;
    }

    footer.site-footer .footer-grid > .footer-brand {
        grid-column: 1 / -1;
        grid-row: 1;
        max-width: none;
        width: 100%;
    }

    footer.site-footer .footer-grid > div:nth-child(2),
    footer.site-footer .footer-grid .footer-col--products {
        grid-column: 1;
        grid-row: 2;
        width: 100%;
        min-width: 0;
    }

    footer.site-footer .footer-grid > div:nth-child(4),
    footer.site-footer .footer-grid .footer-col--company {
        grid-column: 2;
        grid-row: 2;
        width: 100%;
        min-width: 0;
    }

    footer.site-footer .footer-grid > div:nth-child(3),
    footer.site-footer .footer-grid .footer-col--support {
        grid-column: 1 / -1;
        grid-row: 3;
        width: 100%;
    }

    footer.site-footer .footer-grid > div:nth-child(3) > ul,
    footer.site-footer .footer-grid .footer-col--support > ul {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        column-gap: 1.5rem;
        row-gap: 0.65rem;
    }

    footer.site-footer .footer-grid > div:nth-child(3) > ul > li,
    footer.site-footer .footer-grid .footer-col--support > ul > li {
        margin-bottom: 0 !important;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}
