/* templates/header.css — Navbar & Mobile Menu (Light Mode) */

/* ── Preloader ─────────────────────────────── */
#preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #0e0e0e;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.55s ease, visibility 0.55s ease;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.tq-pre-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    animation: tq-pre-enter 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes tq-pre-enter {
    from { opacity: 0; transform: translateY(12px) scale(0.94); }
    to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

.tq-pre-logo {
    width: 56px; height: 56px;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tq-pre-logo img {
    width: 38px; height: 38px;
    display: block;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.tq-pre-wordmark {
    display: block;
    font-size: 0.5625rem;
    font-weight: 900;
    letter-spacing: 0.42em;
    color: rgba(255,255,255,0.28);
    padding-right: 0.42em;
}

/* Bar sits at the very bottom of the screen */
.tq-pre-bar-track {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 3px;
    background: rgba(255,255,255,0.05);
}

.tq-pre-bar {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, #4d61f4 0%, #cb89ff 55%, #d7fe7c 100%);
    transition: width 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 0 2px 2px 0;
}

/* ── Navbar shell ──────────────────────────── */
#navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    padding: 0 1.5rem;
    transition: padding 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

#nav-pill {
    max-width: 80rem;
    margin: 0 auto;
    padding: 1.375rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Scrolled: floating glass pill ────────── */
#navbar.nav-scrolled { padding: 0.75rem 1rem 0; }
#navbar.nav-scrolled #nav-pill {
    max-width: 900px;
    padding: 0.625rem 1.375rem;
    background: rgba(246, 245, 242, 0.92);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(35, 35, 35, 0.08);
    border-radius: 1rem;
    box-shadow: 0 4px 28px rgba(35, 35, 35, 0.09),
                inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

/* ── Logo ──────────────────────────────────── */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    color: #232323;
    flex-shrink: 0;
}
.nav-logo img  { width: 2rem; height: 2rem; }
.nav-logo span { font-size: 1rem; font-weight: 900; letter-spacing: 0.04em; }

/* ── Desktop links ─────────────────────────── */
#nav-links {
    display: none;
    list-style: none;
    align-items: center;
    gap: 2rem;
    margin: 0; padding: 0;
}
@media (min-width: 1024px) { #nav-links { display: flex; } }

.nav-link {
    position: relative;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #232323;
    text-decoration: none;
    padding-bottom: 0.125rem;
    transition: color 0.2s ease;
}
.nav-link::after {
    content: '';
    position: absolute;
    left: 0; bottom: -3px;
    width: 100%; height: 2px;
    background: #4d61f4;
    border-radius: 999px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link:hover,
.nav-link.active         { color: #4d61f4; }
.nav-link:hover::after,
.nav-link.active::after  { transform: scaleX(1); }

/* ── Nav actions ───────────────────────────── */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.375rem;
    background: #4d61f4;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.nav-cta:hover {
    background: #3a4edf;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(77, 97, 244, 0.28);
}

.nav-hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem; height: 2.25rem;
    background: transparent;
    border: none;
    color: #232323;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: background 0.2s ease;
}
.nav-hamburger:hover { background: rgba(35, 35, 35, 0.06); }
@media (min-width: 1024px) { .nav-hamburger { display: none; } }

/* ── Mobile menu ───────────────────────────── */
.mobile-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(35, 35, 35, 0.35);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 100;
}

.mobile-panel {
    position: fixed;
    top: 0; right: 0;
    height: 100%;
    width: min(380px, 92vw);
    background: #f6f5f2;
    border-left: 1px solid rgba(35, 35, 35, 0.07);
    z-index: 101;
    padding: 1.5rem;
    overflow-y: auto;
    animation: slideInRight 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -8px 0 48px rgba(35, 35, 35, 0.12);
}
@keyframes slideInRight {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}

.mobile-panel-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem; height: 2.25rem;
    background: rgba(35, 35, 35, 0.06);
    border: none;
    border-radius: 0.625rem;
    color: #232323;
    cursor: pointer;
    margin-bottom: 2rem;
    transition: background 0.2s ease;
}
.mobile-panel-close:hover { background: rgba(35, 35, 35, 0.1); }

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mobile-link {
    display: block;
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    color: #232323;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}
.mobile-link:hover { background: rgba(77, 97, 244, 0.06); color: #4d61f4; }

.mobile-link-cta {
    margin-top: 1rem;
    background: #4d61f4;
    color: #fff !important;
    text-align: center;
}
.mobile-link-cta:hover { background: #3a4edf !important; }
