@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* --- 1. THE PRODUCTION RESET --- */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

html, body {
    background-color: var(--an-paper);
    font-family: var(--an-font-display);
    color: var(--an-ink);
    overflow-x: hidden;
    width: 100%;
    -webkit-font-smoothing: antialiased;
}

/* --- 2. THE NUCLEAR BACKGROUND ENGINE --- */
#hero-visual-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    background-image: url('https://images.unsplash.com/photo-1455390582262-044cdead277a?q=80&w=2046');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: grayscale(100%) contrast(110%) blur(1px);
    opacity: 0.15;
}

/* --- PLATFORM PAGE LOADER --- */
#an-page-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: var(--an-dark-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.55s;
}
#an-page-loader.an-loader-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
#an-page-loader .an-loader-mark {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
#an-page-loader .an-loader-top {
    font-size: 0.55rem;
    font-weight: 900;
    letter-spacing: 4px;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    font-family: var(--an-font-display);
}
#an-page-loader .an-loader-glyph {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -2px;
    color: var(--an-surface);
    font-family: var(--an-font-display);
    line-height: 1;
}
#an-page-loader .an-loader-bar {
    width: 48px;
    height: 2px;
    background: rgba(255,255,255,0.12);
    border-radius: 99px;
    overflow: hidden;
    margin-top: 12px;
}
#an-page-loader .an-loader-bar-fill {
    height: 100%;
    width: 0%;
    background: rgba(255,255,255,0.7);
    border-radius: 99px;
    animation: an-loader-sweep 1.1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes an-loader-sweep {
    0%   { width: 0%;   margin-left: 0%; }
    50%  { width: 60%;  margin-left: 20%; }
    100% { width: 0%;   margin-left: 100%; }
}

/* --- 3. HIGH-FIDELITY NAVIGATION --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 100px;
    background: rgba(250, 249, 246, 0.85);
    backdrop-filter: blur(30px);
    z-index: 2000;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-content {
    width: 90%;
    max-width: 1600px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #000;
    gap: 15px;
}

/* Increased logo size from 35px to 48px */
.logo-img { width: 78px; height: 48px; } 

/* Increased text size to match the larger logo */
.logo-text { font-weight: 800; font-size: 1.6rem; letter-spacing: -1.5px; }

.nav-links { display: flex; align-items: center; gap: 45px; }
.nav-links a {
    text-decoration: none;
    color: var(--an-ink);
    font-weight: 600;
    font-size: 1.05rem;
    opacity: 0.5;
    transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.nav-links a:hover { opacity: 1; transform: translateY(-1px); }

.nav-btn {
    background: var(--an-ink);
    color: var(--an-surface) !important;
    padding: 14px 30px;
    border-radius: 100px;
    opacity: 1 !important;
    font-weight: 700;
}

/* --- 4. HERO SECTION (TYPOGRAPHY & BUTTON FIX) --- */
.section { padding: 180px 10%; position: relative; width: 100%; }
.hero { padding-top: 260px; text-align: center; }

.overline {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 5px;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 30px;
}

/* FIXED: Spacing changed to -3px so letters don't overlap and crush each other */
.hero-title { font-size: 7.2rem; font-weight: 800; letter-spacing: -3px; line-height: 0.9; margin-left: -5px; }
.hero-gray { font-size: 7.2rem; font-weight: 800; letter-spacing: -3px; color: var(--an-grey-400); line-height: 0.9; margin-bottom: 50px; }
.hero-sub { max-width: 750px; margin: 0 auto 60px auto; font-size: 1.5rem; line-height: 1.5; opacity: 0.5; font-weight: 500; }

/* FIXED: Added inline-flex and smooth 4px hover so text doesn't hide/glitch */
.cta-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 16px 30px;
    background: var(--an-ink);
    color: var(--an-surface);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1.2rem;
    transition: all 0.4s ease;
    border: 1px solid var(--an-ink);
    box-sizing: border-box;
    cursor: pointer;
}

.cta-button:hover { 
    transform: translateY(-4px); 
    box-shadow: 0 20px 40px rgba(0,0,0,0.15); 
    color: var(--an-surface);
}

/* --- 5. THE BLACK SUITE (EDGE-TO-EDGE ZERO BEZELS) --- */
.sec-black { 
    background: #000; 
    color: var(--an-surface); 
    width: 100%; 
    margin: 0; 
    border-radius: 0; /* Ensures flat edges against the browser wall */
    padding: 160px 10%;
}

.sec-title { font-size: 4rem; font-weight: 800; letter-spacing: -2px; margin-bottom: 80px; }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
}

.editorial-card {
    padding: 80px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 40px;
    transition: 0.4s ease;
}

.editorial-card:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.3); transform: translateY(-5px); }
.editorial-card h3 { font-size: 2.2rem; margin-bottom: 25px; letter-spacing: -1px; }
.editorial-card p { opacity: 0.5; line-height: 1.8; font-size: 1.1rem; }

/* --- 6. DUO SECTION --- */
.sec-white { background: var(--an-surface); width: 100%; }
.duo-container { display: flex; gap: 140px; align-items: flex-start; flex-wrap: wrap; }
.duo-left { flex: 1.3; min-width: 400px; }
.duo-title { font-size: 5.5rem; font-weight: 800; letter-spacing: -3px; line-height: 0.95; margin-bottom: 40px; }
.duo-title span { color: var(--an-grey-300); }
.duo-text { font-size: 1.8rem; opacity: 0.5; line-height: 1.5; font-weight: 500; }

.duo-right { flex: 1; padding-top: 30px; min-width: 300px; }
.feat { margin-bottom: 60px; }
.feat h4 { font-size: 1.6rem; font-weight: 800; margin-bottom: 15px; letter-spacing: -0.5px; }
.feat p { opacity: 0.5; line-height: 1.7; font-size: 1.1rem; }

.cta-final-block { margin-top: 150px; text-align: center; border-top: 1px solid var(--an-line); padding-top: 120px; }
.cta-title { font-size: 4.5rem; font-weight: 800; margin-bottom: 30px; letter-spacing: -2px; }

/* --- 7. THE PRICING ARCHITECTURE (FIXED RESPONSIVENESS) --- */
/* FIXED: Converted to a responsive grid so cards don't overlap or break layout */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 100px auto 0 auto;
}

.price-card {
    background: var(--an-surface);
    padding: 85px 50px;
    border-radius: 50px;
    width: 100%; /* Adapts perfectly to the grid instead of overflowing */
    text-align: left;
    border: 1px solid rgba(0,0,0,0.05);
    transition: 0.4s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.price-card:hover { transform: translateY(-8px); box-shadow: 0 40px 100px rgba(0,0,0,0.08); }
.price-card.featured { background: var(--an-ink); color: var(--an-surface); border: none; }
.price-card.featured:hover { transform: translateY(-8px); box-shadow: 0 40px 100px rgba(0,0,0,0.25); }

.price-card h3 { font-size: 2.6rem; font-weight: 800; margin-bottom: 10px; letter-spacing: -1px; }
.amount { font-size: 5rem; font-weight: 800; letter-spacing: -4px; margin: 30px 0; }
.amount span { font-size: 1.4rem; letter-spacing: 0; opacity: 0.5; font-weight: 600; margin-left: 5px; }

.price-card ul { list-style: none; margin-bottom: 50px; flex: 1; }
.price-card li { margin-bottom: 22px; opacity: 0.7; font-weight: 600; font-size: 1.1rem; display: flex; align-items: center; gap: 12px; }
.price-card li::before { content: "—"; color: var(--an-text-muted); font-weight: 800; }

.price-card.featured .cta-button { background: var(--an-surface); color: var(--an-ink); border-color: var(--an-surface); }
.price-card.featured .cta-button:hover { background: var(--an-line-faint); transform: translateY(-4px); color: #000; }

/* --- 8. STUDIO TERMINAL WORKSPACE --- */
.studio-workspace {
    display: flex;
    height: 100vh;
    padding: 130px 40px 40px 40px;
    gap: 30px;
}

.panel {
    flex: 1;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(40px);
    border-radius: 40px;
    border: 1px solid rgba(255,255,255,0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0,0,0,0.05);
}

.panel-header {
    padding: 35px 55px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 15px;
}

.status-dot { width: 12px; height: 12px; background: #00ff00; border-radius: 50%; box-shadow: 0 0 15px #00ff00; }
.studio-content, .feed-content { padding: 60px; overflow-y: auto; flex: 1; }

.studio-title { font-size: 3.2rem; font-weight: 800; letter-spacing: -2px; margin-bottom: 40px; }
.gray-text { color: var(--an-grey-500); }

.input-row { margin-bottom: 35px; }
.input-row label { display: block; font-weight: 800; font-size: 0.8rem; color: #999; text-transform: uppercase; margin-bottom: 15px; letter-spacing: 2px; }

.sleek-input, .sleek-area {
    width: 100%;
    padding: 24px;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 20px;
    background: rgba(255,255,255,0.9);
    font-family: inherit;
    font-size: 1.1rem;
    transition: 0.3s;
}

.sleek-input:focus, .sleek-area:focus { border-color: var(--an-ink); outline: none; background: var(--an-surface); }
.sleek-area { height: 160px; resize: none; }

.studio-btn {
    background: var(--an-ink);
    color: var(--an-surface);
    border: none;
    padding: 28px;
    width: 100%;
    border-radius: 100px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.4s ease;
    font-size: 1.1rem;
}

.studio-btn:hover { background: #000; transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0,0,0,0.2); }

/* --- 9. THE INDUSTRIAL FOOTER (EDGE-TO-EDGE ZERO BEZELS) --- */
.black-footer {
    background: #000;
    color: var(--an-surface);
    padding: 160px 10%;
    margin-top: 150px;
    width: 100%;
    border-radius: 0; /* Ensures completely flat right-angles */
}

.footer-grid { display: flex; justify-content: space-between; gap: 120px; flex-wrap: wrap; }
.footer-brand { flex: 2.5; min-width: 300px; }
.footer-brand h4 { font-size: 2.6rem; margin-bottom: 30px; font-weight: 800; letter-spacing: -2px; }
.footer-brand p { opacity: 0.65; max-width: 400px; line-height: 1.8; font-size: 1.2rem; }

.footer-links { flex: 1; min-width: 150px; }
.footer-links h5 { font-size: 0.85rem; letter-spacing: 4px; margin-bottom: 45px; color: var(--an-text-muted); text-transform: uppercase; font-weight: 800; }
.footer-links a { display: block; color: var(--an-surface); text-decoration: none; margin-bottom: 20px; opacity: 0.7; transition: 0.4s; font-size: 1.1rem; font-weight: 600; }
.footer-links a:hover { opacity: 1; transform: translateX(8px); }

.footer-bottom {
    margin-top: 140px;
    padding-top: 60px;
    border-top: 1px solid var(--an-dark-elev);
    display: flex;
    justify-content: space-between;
    opacity: 0.6;
    font-size: 0.95rem;
    font-weight: 600;
}

/* --- 10. ANIMATIONS & AUTH CARDS --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(60px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in { animation: fadeInUp 1.2s cubic-bezier(0.165, 0.84, 0.44, 1) forwards; }

.signin-card {
    background: var(--an-surface); padding: 80px; border-radius: 50px;
    width: 100%; max-width: 550px; border: 1px solid var(--an-line);
    box-shadow: 0 40px 100px rgba(0,0,0,0.05); margin: auto;
}
.input-group { margin-bottom: 25px; }
.input-group label { display: block; font-weight: 800; font-size: 0.75rem; color: var(--an-text-muted); margin-bottom: 12px; letter-spacing: 1.5px; text-transform: uppercase; }
.input-group input { 
    width: 100%; padding: 22px; border-radius: 16px; border: 1px solid var(--an-line); 
    background: #fcfcfc; font-family: inherit; font-size: 1.05rem; transition: 0.3s;
}
.input-group input:focus { border-color: var(--an-ink); background: var(--an-surface); outline: none; }

/* --- 11. THE MOBILE OVERRIDE LAYER --- */

/* Desktop & Tablet: Hide the hamburger, keep navbar horizontal */
@media (min-width: 769px) {
    .menu-toggle { display: none !important; }
    .nav-links { display: flex !important; }
}

/* Phones Only: Transform to Hamburger + Drawer */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex !important; /* Show 3 lines */
        flex-direction: column;
        gap: 5px;
        z-index: 2000;
    }

    .menu-toggle span {
        width: 25px;
        height: 3px;
        background: var(--an-ink);
        transition: 0.3s;
        border-radius: 5px;
    }

    /* Transform lines to 'X' when open */
    .menu-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%; /* Off-screen by default */
        width: 80%;
        height: 100vh;
        background: var(--an-paper);
        flex-direction: column !important;
        justify-content: center;
        align-items: center;
        gap: 30px !important;
        box-shadow: -20px 0 60px rgba(0,0,0,0.1);
        transition: 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
        z-index: 1500;
        display: flex !important;
    }

    .nav-links.active {
        right: 0; /* Slide in menu */
    }

    .nav-links a {
        font-size: 1.5rem !important;
        font-weight: 800;
        opacity: 1 !important;
    }

    /* Layout Fixes: Ensure text doesn't cut off */
    .section, .studio-workspace { height: auto !important; display: block !important; padding-top: 100px !important; }
    .hero-title, .hero-gray { font-size: 3rem !important; line-height: 1 !important; letter-spacing: -2px !important; }
    .panel { width: 100% !important; margin-bottom: 20px; }
}

/* --- USER AVATAR DROPDOWN STYLES --- */
.nav-user-menu {
    position: relative;
    display: inline-block;
    margin-left: 20px;
}
.nav-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--an-ink);
    color: var(--an-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    cursor: pointer;
    border: 2px solid var(--an-line);
    object-fit: cover;
    transition: border-color 0.2s;
}
.nav-avatar:hover {
    border-color: var(--an-ink);
}
.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 55px;
    background-color: var(--an-surface);
    min-width: 220px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    border-radius: 12px;
    overflow: hidden;
    z-index: 1000;
    border: 1px solid var(--an-line);
}
.nav-user-menu:hover .dropdown-content {
    display: block;
}
.dropdown-content a {
    color: var(--an-ink-mid);
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}
.dropdown-content a:hover {
    background-color: var(--an-paper);
    color: var(--an-ink);
}
.dropdown-divider {
    height: 1px;
    background-color: var(--an-line);
    margin: 0;
}

/* --- PREMIUM NAVIGATION LINKS --- */
.nav-link {
    text-decoration: none;
    color: #4a4949; /* Elegant Grey */
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s ease, transform 0.2s ease;
    padding: 5px 10px;
}

.nav-link:hover {
    color: var(--an-ink); /* Transitions to Deep Black on hover */
}


/* --- GLOBAL RESET (Add this to make sure the font looks right) --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* =========================================
   MOBILE HAMBURGER MENU (NEW ADDITIONS)
   ========================================= */

/* Desktop Rules (Hidden by default) */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--an-ink);
}

.mobile-nav {
    display: none; 
}

/* Mobile Rules */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block !important;
        margin-right: 15px; 
    }

    .mobile-nav {
        display: none; /* Hidden until button is clicked */
        position: fixed;
        top: 76px; /* Pops out just below your navbar */
        left: 0;
        width: 100%;
        background: var(--an-surface);
        border-bottom: 1px solid var(--an-line);
        box-shadow: 0 15px 30px rgba(0,0,0,0.05);
        padding: 20px 30px;
        flex-direction: column;
        gap: 20px;
        z-index: 998; /* Just under the navbar */
    }

    .mobile-nav.active {
        display: flex !important;
        animation: slideDown 0.3s ease forwards;
    }

    .mobile-nav a {
        text-decoration: none;
        color: var(--an-ink);
        font-weight: 600;
        font-size: 1.1rem;
        padding-bottom: 10px;
        border-bottom: 1px solid #f5f5f5;
    }

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

/* =========================================
   COMPREHENSIVE MOBILE RESPONSIVE SYSTEM
   ========================================= */

/* --- Tablet (max 900px) --- */
@media (max-width: 900px) {
    .hero-title, .hero-gray { font-size: 4.5rem !important; }
    .duo-title { font-size: 3.5rem !important; }
    .sec-title { font-size: 2.8rem !important; }
    .cta-title { font-size: 3rem !important; }
    .duo-container { gap: 60px !important; }
    .duo-left { min-width: unset !important; }
    .editorial-card { padding: 50px !important; }
    .section, .sec-black { padding: 100px 6% !important; }
}

/* --- Phone (max 768px) --- */
@media (max-width: 768px) {

    /* NAV: hide desktop links, show only logo + hamburger + avatar */
    .nav-links { display: none !important; }
    .mobile-menu-btn { display: block !important; }

    /* HERO */
    .hero { padding-top: 140px !important; }
    .hero-title, .hero-gray { font-size: 3rem !important; letter-spacing: -1px !important; line-height: 1.05 !important; }
    .hero-sub { font-size: 1.1rem !important; margin-bottom: 40px !important; padding: 0 5% !important; }
    .overline { font-size: 0.7rem !important; letter-spacing: 3px !important; }

    /* SECTIONS */
    .section, .sec-black, .sec-white { padding: 80px 6% !important; }
    .sec-title { font-size: 2.2rem !important; letter-spacing: -1px !important; margin-bottom: 50px !important; }

    /* DUO SECTION */
    .duo-container { flex-direction: column !important; gap: 40px !important; }
    .duo-left, .duo-right { min-width: unset !important; width: 100% !important; }
    .duo-title { font-size: 2.6rem !important; letter-spacing: -1px !important; }
    .duo-text { font-size: 1.2rem !important; }
    .feat h4 { font-size: 1.2rem !important; }

    /* CARDS */
    .card-grid { grid-template-columns: 1fr !important; }
    .editorial-card { padding: 35px !important; border-radius: 24px !important; }
    .editorial-card h3 { font-size: 1.6rem !important; }

    /* PRICING */
    .pricing-grid { grid-template-columns: 1fr !important; margin-top: 50px !important; }
    .price-card { padding: 50px 35px !important; border-radius: 32px !important; }
    .amount { font-size: 3.5rem !important; }

    /* CTA BLOCK */
    .cta-final-block { margin-top: 80px !important; padding-top: 60px !important; }
    .cta-title { font-size: 2.2rem !important; letter-spacing: -1px !important; }

    /* AUTH CARDS */
    .signin-card { padding: 40px 28px !important; border-radius: 28px !important; margin: 0 !important; width: 100% !important; }

    /* FOOTER */
    .black-footer { padding: 80px 6% !important; margin-top: 60px !important; }
    .footer-grid { flex-direction: column !important; gap: 50px !important; }
    .footer-brand h4 { font-size: 1.8rem !important; }
    .footer-bottom { flex-direction: column !important; gap: 12px !important; margin-top: 60px !important; text-align: center !important; }

    /* STUDIO / WRITE PAGE */
    .studio-workspace {
        flex-direction: column !important;
        height: auto !important;
        padding: 100px 16px 40px !important;
        gap: 20px !important;
    }
    .vault-sidebar {
        flex: unset !important;
        width: 100% !important;
        max-height: 280px !important;
        border-radius: 24px !important;
    }
    .editor-main {
        flex: unset !important;
        width: 100% !important;
        max-height: unset !important;
        border-radius: 24px !important;
    }
    .panel-header { padding: 20px 24px !important; }
    .studio-content { padding: 24px !important; }

    /* NEURAL CHAT */
    .neural-chat-container { height: 500px !important; border-radius: 16px !important; }

    /* DROPDOWN on mobile: show on tap */
    .nav-user-menu:hover .dropdown-content { display: none; }
    .nav-user-menu.open .dropdown-content { display: block; }
}

/* --- Small Phone (max 480px) --- */
@media (max-width: 480px) {
    .hero-title, .hero-gray { font-size: 2.4rem !important; }
    .cta-button { font-size: 1rem !important; padding: 14px 22px !important; }
    .price-card { padding: 40px 24px !important; }
    .signin-card { padding: 32px 20px !important; }
    .vault-sidebar { max-height: 220px !important; }
}

/* =========================================
   Bulletproof Hover Gap Fix
   ========================================= */
.nav-user-menu::after {
    content: "";
    position: absolute;
    top: 100%; /* Starts exactly at the bottom edge of the avatar */
    left: -20px; /* Gives you a wider margin of error left/right */
    right: -20px;
    height: 60px; /* Plunges deep enough to reach any menu */
    background: transparent; 
}
/* =========================================
   NEURAL CHAT INTERFACE
   ========================================= */
.neural-chat-container {
    display: flex;
    flex-direction: column;
    height: 600px; /* Adjust based on your layout */
    background: var(--an-surface);
    border: 1px solid var(--an-line);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
    overflow: hidden;
}

.chat-header {
    padding: 20px;
    border-bottom: 1px solid var(--an-line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--an-paper);
}

.chat-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.status-indicator {
    font-size: 0.8rem;
    color: #00cc00;
    font-weight: 600;
}

.chat-history {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Chat Bubbles */
.message {
    display: flex;
    gap: 15px;
    max-width: 85%;
}

.message.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--an-ink);
    color: var(--an-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.ai-message .avatar {
    background: var(--an-line-faint);
    color: var(--an-ink);
    border: 1px solid var(--an-line-mid);
}

.bubble {
    padding: 15px 20px;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.ai-message .bubble {
    background: var(--an-paper);
    border: 1px solid var(--an-line);
    color: var(--an-ink);
    border-top-left-radius: 4px;
}

.user-message .bubble {
    background: var(--an-ink);
    color: var(--an-surface);
    border-top-right-radius: 4px;
}

/* Input Area */
.chat-input-area {
    padding: 20px;
    background: var(--an-surface);
    border-top: 1px solid var(--an-line);
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.chat-input-area textarea {
    flex: 1;
    border: 1px solid var(--an-grey-300);
    border-radius: 12px;
    padding: 15px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: none;
    outline: none;
    transition: border-color 0.2s;
    max-height: 150px; /* Prevents it from getting too tall */
}

.chat-input-area textarea:focus {
    border-color: var(--an-ink);
}

.send-button {
    background: var(--an-ink);
    color: var(--an-surface);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
}

.send-button:hover {
    background: var(--an-ink-soft);
    transform: scale(1.05);
}

/* =========================================
   SITE NAV — NEW STRUCTURE
   ========================================= */
.site-nav {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    padding: 0 40px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    z-index: 999;
    border-bottom: 1px solid transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
}
.site-nav.nav-scrolled {
    background: rgba(250,249,246,0.88);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(0,0,0,0.07);
    box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
    margin-right: auto;
}
.nav-center {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-right: 24px;
}
.nav-center .nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
}
.nav-center .nav-link {
    padding: 6px 14px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0;
    white-space: nowrap;
    color: var(--an-text-subtle);
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}
.nav-center .nav-link:hover {
    color: var(--an-ink);
    background: rgba(0,0,0,0.05);
}
.nav-right {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--an-ink);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}
.nav-brand-img { height: 36px; width: auto; border-radius: 4px; }
.nav-brand-text { transition: opacity 0.2s; }
.nav-brand-text span { color: #999; }

.nav-logo-mobile {
    display: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}
.nav-logo-mobile img { height: 36px; width: auto; border-radius: 4px; }

.nav-auth {
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-signin {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--an-text-subtle);
    padding: 7px 14px;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
    text-decoration: none;
}
.nav-signin:hover { color: var(--an-ink); background: rgba(0,0,0,0.05); }
.nav-cta-btn {
    padding: 8px 18px !important;
    font-size: 0.875rem !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    letter-spacing: -0.1px !important;
}

.nav-user-menu {
    position: relative;
    cursor: pointer;
}
.nav-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 2px solid var(--an-line);
    object-fit: cover;
    transition: border-color 0.2s;
    background: var(--an-line-faint);
}
.nav-avatar-initial {
    background: var(--an-ink);
    color: var(--an-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
}
.nav-avatar:hover, .nav-avatar-initial:hover { border-color: var(--an-ink); }

.dropdown-content {
    display: none;
    position: absolute;
    right: 0; top: 52px;
    background: var(--an-surface);
    min-width: 220px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.12);
    border-radius: 16px;
    overflow: hidden;
    z-index: 1000;
    border: 1px solid var(--an-line);
    animation: dropDown 0.2s ease forwards;
}
@keyframes dropDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.nav-user-menu:hover .dropdown-content,
.nav-user-menu.open .dropdown-content { display: block; }
.nav-user-menu::after {
    content: "";
    position: absolute;
    top: 100%; left: -20px; right: -20px;
    height: 60px;
    background: transparent;
}
.dropdown-header {
    padding: 14px 18px;
    background: var(--an-paper);
    border-bottom: 1px solid var(--an-line);
}
.dropdown-header strong { display: block; color: var(--an-ink); font-size: 0.9rem; }
.dropdown-header small { color: var(--an-text-muted); font-size: 0.7rem; }
.dropdown-content a {
    display: block;
    padding: 11px 18px;
    color: var(--an-ink-mid);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: background 0.15s, color 0.15s;
}
.dropdown-content a:hover { background: var(--an-paper); color: var(--an-ink); }
.dropdown-divider { height: 1px; background: var(--an-line); }
.admin-link { color: #b8860b !important; }
.logout-link { color: var(--an-danger) !important; }

.main-container { min-height: 80vh; padding-top: 72px; position: relative; z-index: 1; }

/* =========================================
   ANIMATION SYSTEM
   ========================================= */

/* Base hidden states */
.reveal-up, .reveal-left, .reveal-right, .reveal {
    opacity: 0;
    transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1);
    will-change: opacity, transform;
}
.reveal-up    { transform: translateY(40px); }
.reveal-left  { transform: translateX(-40px); }
.reveal-right { transform: translateX(40px); }
.reveal       { transform: translateY(20px); }

.stagger-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1), transform 0.6s cubic-bezier(0.16,1,0.3,1);
    will-change: opacity, transform;
}

/* Visible state */
.is-visible {
    opacity: 1 !important;
    transform: translate(0,0) !important;
}

/* Pulse animation on CTA buttons */
@keyframes subtlePulse {
    0%   { box-shadow: 0 0 0 0 rgba(17,17,17,0.25); }
    70%  { box-shadow: 0 0 0 14px rgba(17,17,17,0); }
    100% { box-shadow: 0 0 0 0 rgba(17,17,17,0); }
}
.btn-pulse { animation: subtlePulse 2.8s ease-out 1.5s infinite; }

/* =========================================
   NEW CTA SECTION (Standalone)
   ========================================= */
.cta-section {
    background: var(--an-dark-bg);
    padding: 140px 10%;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-section-inner {
    position: relative;
    z-index: 2;
}
.cta-glow {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
    pointer-events: none;
    animation: glowPulse 4s ease-in-out infinite;
}
@keyframes glowPulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%,-50%) scale(1); }
    50%       { opacity: 1;   transform: translate(-50%,-50%) scale(1.1); }
}
.cta-label {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 5px;
    color: var(--an-text-subtle);
    margin-bottom: 24px;
    text-transform: uppercase;
}
.cta-section-title {
    font-size: 5rem;
    font-weight: 800;
    letter-spacing: -3px;
    color: var(--an-surface);
    margin-bottom: 20px;
    line-height: 1;
}
.cta-section-sub {
    font-size: 1.3rem;
    color: var(--an-text-dim);
    margin-bottom: 48px;
    font-weight: 500;
}
.cta-white {
    background: var(--an-surface) !important;
    color: var(--an-ink) !important;
    border-color: var(--an-surface) !important;
}
.cta-white:hover {
    background: var(--an-line-faint) !important;
    color: #000 !important;
    transform: translateY(-4px) !important;
}
@keyframes subtlePulseLight {
    0%   { box-shadow: 0 0 0 0 rgba(255,255,255,0.3); }
    70%  { box-shadow: 0 0 0 14px rgba(255,255,255,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}
.cta-section .btn-pulse { animation: subtlePulseLight 2.8s ease-out 1.5s infinite; }

/* =========================================
   FEATURE NUMBERS & CARD ICONS
   ========================================= */
.feat-number {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--an-grey-400);
    margin-bottom: 10px;
    font-variant-numeric: tabular-nums;
}
.feat { margin-bottom: 50px; transition: transform 0.3s ease; }
.feat:hover { transform: translateX(6px); }
.feat:last-child { margin-bottom: 0; }

.card-icon {
    font-size: 1.8rem;
    margin-bottom: 24px;
    opacity: 0.5;
    transition: opacity 0.3s, transform 0.3s;
}
.editorial-card:hover .card-icon { opacity: 1; transform: scale(1.15); }

/* =========================================
   MOBILE NAV OVERRIDE (NEW STRUCTURE)
   ========================================= */
@media (max-width: 768px) {
    .site-nav { padding: 0 20px; }

    /* Hide desktop brand text and center nav links */
    .nav-brand-text { display: none; }
    .nav-center { display: none; }

    /* Show centered logo-only link */
    .nav-logo-mobile { display: block; }

    /* Left: hamburger + mini logo stacked */
    .nav-left { flex: 0 0 auto; gap: 0; }
    .nav-brand-img { display: none; }

    /* Right: sign-in only (no "Get Started" text on very small) */
    .nav-cta-btn { display: none !important; }
    .nav-auth { gap: 0; }
    .nav-signin { font-size: 0.9rem; font-weight: 700; color: var(--an-ink); }

    /* CTA section */
    .cta-section { padding: 90px 6%; }
    .cta-section-title { font-size: 2.8rem !important; letter-spacing: -1px !important; }
    .cta-section-sub { font-size: 1rem !important; }
    .cta-label { font-size: 0.65rem !important; }

    /* Feat */
    .feat:hover { transform: none; }
}

@media (max-width: 480px) {
    .cta-section-title { font-size: 2.2rem !important; }
    .nav-signin { font-size: 0.85rem; }
}

/* =========================================
   PAGE ENTRY ANIMATION (all pages)
   ========================================= */
@keyframes pageEnter {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
.page-enter {
    animation: pageEnter 0.52s cubic-bezier(0.16,1,0.3,1) both;
}

/* =========================================
   NAV ACTIVE INDICATOR
   ========================================= */
.nav-link-active {
    color: var(--an-ink) !important;
    position: relative;
}
.nav-link-active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 14px;
    right: 14px;
    height: 2px;
    background: var(--an-ink);
    border-radius: 99px;
}

/* =========================================
   NAV DIVIDER (between links & auth)
   ========================================= */
.nav-divider {
    display: block;
    width: 1px;
    height: 18px;
    background: rgba(0,0,0,0.12);
    margin-right: 20px;
    flex-shrink: 0;
    align-self: center;
}
@media (max-width: 768px) { .nav-divider { display: none; } }

/* =========================================
   CONSISTENT CARD RADII
   ========================================= */
.editorial-card,
.stat-card,
.feat-card,
.price-card { border-radius: 16px !important; }


/* =========================================
   NOTIFICATION BELL
   ========================================= */
.nav-bell-wrap {
    position: relative;
    margin-right: 8px;
}
.nav-bell-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
    color: var(--an-text-subtle);
    display: flex;
    align-items: center;
    transition: background 0.15s, color 0.15s;
}
.nav-bell-btn:hover { background: #f0efe9; color: var(--an-ink); }
.nav-bell-badge {
    position: absolute;
    top: 2px; right: 2px;
    background: var(--an-danger);
    color: var(--an-surface);
    font-size: 0.55rem;
    font-weight: 900;
    min-width: 14px;
    height: 14px;
    border-radius: 99px;
    padding: 0 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    pointer-events: none;
}
.nav-notif-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    background: var(--an-surface);
    border: 1px solid #e8e8e8;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    z-index: 1000;
    display: none;
    overflow: hidden;
}
.nav-notif-dropdown.open { display: block; }
.nav-notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--an-line-faint);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--an-grey-600);
}
.nav-notif-clear {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--an-text-muted);
    padding: 3px 7px;
    border-radius: 6px;
    font-family: inherit;
    transition: background 0.15s;
}
.nav-notif-clear:hover { background: #f5f5f5; color: var(--an-ink); }
.nav-notif-list { max-height: 340px; overflow-y: auto; }
.nav-notif-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f8f8f8;
    transition: background 0.12s;
}
.nav-notif-item:last-child { border-bottom: none; }
.nav-notif-item:hover { background: var(--an-paper); }
.nav-notif-item.unread { border-left: 3px solid var(--an-ink); }
.nav-notif-msg { font-size: 0.8rem; color: var(--an-ink-soft); line-height: 1.45; margin-bottom: 4px; }
.nav-notif-time { font-size: 0.68rem; color: var(--an-grey-500); font-weight: 600; }
.nav-notif-empty {
    padding: 28px 16px;
    text-align: center;
    font-size: 0.78rem;
    color: var(--an-grey-500);
}

/* ── Dark mode: navbar always stays light ─────────────────────────────── */
body.dark-mode .site-nav,
html.dark-mode .site-nav {
    background: rgba(250,249,246,0.96) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border-bottom: 1px solid rgba(0,0,0,0.07) !important;
    box-shadow: 0 2px 20px rgba(0,0,0,0.06) !important;
}
body.dark-mode .site-nav.nav-scrolled,
html.dark-mode .site-nav.nav-scrolled {
    background: rgba(250,249,246,0.96) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border-bottom: 1px solid rgba(0,0,0,0.07) !important;
    box-shadow: 0 2px 20px rgba(0,0,0,0.06) !important;
}
body.dark-mode .site-nav .nav-brand-text,
html.dark-mode .site-nav .nav-brand-text { color: var(--an-ink) !important; }
body.dark-mode .site-nav .nav-brand-text span,
html.dark-mode .site-nav .nav-brand-text span { color: #999 !important; }
body.dark-mode .site-nav .nav-center .nav-link,
html.dark-mode .site-nav .nav-center .nav-link { color: var(--an-text-subtle) !important; }
body.dark-mode .site-nav .nav-center .nav-link:hover,
html.dark-mode .site-nav .nav-center .nav-link:hover { color: var(--an-ink) !important; }
body.dark-mode .site-nav .nav-avatar,
html.dark-mode .site-nav .nav-avatar { border-color: #e0ddd7 !important; }
body.dark-mode .site-nav .dropdown-content,
html.dark-mode .site-nav .dropdown-content {
    background: var(--an-surface) !important;
    border-color: #e8e6e1 !important;
    color: var(--an-ink) !important;
}
body.dark-mode .site-nav .dropdown-content a,
html.dark-mode .site-nav .dropdown-content a { color: var(--an-ink-soft) !important; }
body.dark-mode .site-nav .dropdown-content a:hover,
html.dark-mode .site-nav .dropdown-content a:hover { background: #f5f4f0 !important; color: var(--an-ink) !important; }
