/* ═══════════════════════════════════════════════════════════
   Landing Header / Navigation
   ═══════════════════════════════════════════════════════════ */

/* Body-scoped selector matches/beats the `.landing-page > *:not(...)` rule
   in base.css (specificity 0,2,0) — keep them aligned. */
body.landing-page .lp-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 14px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(2, 8, 16, 0.55);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(6, 182, 212, 0.08);
    transition: background .3s ease, border-color .3s ease;
}
.lp-header.is-scrolled {
    background: rgba(2, 8, 16, 0.9);
    border-bottom-color: rgba(6, 182, 212, 0.2);
}

.lp-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-cyan);
    letter-spacing: -0.01em;
}
.lp-logo__icon {
    font-size: 24px;
    filter: drop-shadow(0 0 12px rgba(0, 212, 255, 0.5));
}

.lp-nav {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
    margin: 0;
}
.lp-nav a {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: color .2s;
    position: relative;
    padding: 4px 0;
}
.lp-nav a:hover { color: var(--accent-cyan); }
.lp-nav a::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -4px;
    height: 2px;
    background: var(--accent-cyan);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .25s ease;
}
.lp-nav a:hover::after { transform: scaleX(1); }

.lp-header__actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* ═══════════════════════════════════════════════════════════
   Language switcher (landing-specific).
   Visual goals:
     • same height as .lp-btn (padding 12px 24px → ~44px tall)
     • full native name + flag (not 2-letter codes)
     • glow/lift on hover, same cyan family as the rest of the page
     • inline drop-down (no portal in body) so positioning can't drift
   ═══════════════════════════════════════════════════════════ */

.lp-lang {
    position: relative;
}

.lp-lang__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;              /* matches .lp-btn vertical padding */
    border-radius: 8px;               /* matches .lp-btn */
    font: 600 14px/1 'Inter', sans-serif;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.2);
    cursor: pointer;
    transition: all .22s ease;
    white-space: nowrap;
    font-family: inherit;
    height: 42px;                     /* locked to match .lp-btn computed height */
}
.lp-lang__btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.06);
    box-shadow: 0 0 18px rgba(6, 182, 212, 0.12);
}
.lp-lang__btn:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 2px;
}

.lp-lang__flag {
    font-size: 18px;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
}
.lp-lang__name {
    letter-spacing: 0.2px;
}
.lp-lang__arrow {
    width: 10px; height: 7px;
    opacity: 0.7;
    transition: transform .25s ease, opacity .2s;
    margin-left: 2px;
}
.lp-lang.is-open .lp-lang__btn {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.08);
}
.lp-lang.is-open .lp-lang__arrow {
    transform: rotate(180deg);
    opacity: 1;
}
.lp-lang__btn.is-loading {
    opacity: 0.7;
    pointer-events: none;
}
.lp-lang__btn.is-loading .lp-lang__flag {
    animation: lp-lang-pulse 0.6s ease-in-out infinite alternate;
}
@keyframes lp-lang-pulse {
    from { opacity: 0.4; }
    to   { opacity: 1; }
}

/* Inline dropdown (not a body portal) — positioned relative to .lp-lang */
.lp-lang__menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    list-style: none;
    margin: 0;
    padding: 6px;
    background: linear-gradient(180deg, rgba(13,33,55,0.98) 0%, rgba(10,25,41,0.98) 100%);
    border: 1px solid rgba(6, 182, 212, 0.35);
    border-radius: 12px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.05) inset,
        0 24px 50px rgba(0, 0, 0, 0.55),
        0 8px 20px rgba(0, 0, 0, 0.35),
        0 0 40px rgba(6, 182, 212, 0.15);
    backdrop-filter: blur(14px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
    z-index: 1100;
    pointer-events: none;
}
.lp-lang.is-open .lp-lang__menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.lp-lang__menu li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.lp-lang__menu li:hover {
    background: rgba(6, 182, 212, 0.12);
    color: var(--accent-cyan);
}
.lp-lang__menu li.is-active {
    background: rgba(6, 182, 212, 0.18);
    color: var(--accent-cyan);
}
.lp-lang__menu li .lp-lang__flag {
    font-size: 20px;
}

@media (max-width: 900px) {
    /* On mobile the desktop "Sign in" is hidden; keep language button visible
       but shrink it slightly so burger + demo button still fit. */
    .lp-lang__btn { padding: 10px 12px; height: 38px; }
    .lp-lang__name { display: none; }
    .lp-lang__arrow { display: none; }
}

.lp-burger {
    display: none;
    width: 36px; height: 36px;
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    position: relative;
}
.lp-burger span {
    position: absolute;
    left: 8px; right: 8px;
    height: 2px;
    background: var(--text-primary);
    transition: transform .25s, opacity .25s;
}
.lp-burger span:nth-child(1) { top: 11px; }
.lp-burger span:nth-child(2) { top: 17px; }
.lp-burger span:nth-child(3) { top: 23px; }
.lp-burger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.lp-burger.is-open span:nth-child(2) { opacity: 0; }
.lp-burger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
    .lp-header { padding: 12px 20px; }
    .lp-nav {
        position: fixed;
        top: 62px; left: 0; right: 0;
        flex-direction: column;
        gap: 0;
        background: rgba(2, 8, 16, 0.98);
        backdrop-filter: blur(20px);
        padding: 16px 20px;
        border-bottom: 1px solid rgba(6, 182, 212, 0.15);
        transform: translateY(-120%);
        transition: transform .3s ease;
    }
    .lp-nav.is-open { transform: translateY(0); }
    .lp-nav a { padding: 14px 0; border-bottom: 1px solid rgba(148, 163, 184, 0.08); width: 100%; }
    .lp-nav a::after { display: none; }

    .lp-header__actions .lp-btn--ghost { display: none; }
    .lp-burger { display: block; }
}
