/* Main Layout & Sections */

/* Header / Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition-base);
    background: var(--navbar-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 3rem;
    /* Controls overall nav height */
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
    transition: color 0.2s;
}

.nav-logo:hover {
    color: var(--text-primary);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu a:not(.btn) {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-menu a:not(.btn):hover {
    color: var(--text-primary);
}

.nav-menu a.active {
    color: var(--accent-cyan);
}

/* Hero Section */
.hero {
    position: relative;
    padding-top: 8rem;
    /* Account for navbar */
    padding-bottom: 6rem;
    min-height: 80vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: radial-gradient(circle at 50% 0%, var(--hero-gradient-start) 0%, var(--bg-void) 50%);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.6;
    pointer-events: none;
    background-image: var(--hero-bg-image);
    background-size: cover;
    background-position: center;
}

:root.light .hero-bg {
    opacity: 0.15;
    filter: brightness(0.8);
}

.hero-container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: var(--text-hero);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: var(--hero-title-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

/* Browser Mockup Frame */
.browser-mockup {
    background: var(--browser-mockup-bg);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    position: relative;
}

.browser-header {
    background: var(--browser-header-bg);
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--browser-header-border);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.browser-content img {
    width: 100%;
    height: auto;
    display: block;
}

/* Value Props (3 Columns) */
.value-props {
    padding: 4rem 0;
    background: var(--bg-void);
}

.value-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* Bento Grid Features */
.features {
    padding: 6rem 0;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, minmax(280px, auto));
    gap: 1.5rem;
}

.bento-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition-base);
}

.bento-card:hover {
    border-color: var(--primary-500);
}

/* Bento Spans */
.span-2 {
    grid-column: span 2;
}

.span-row-2 {
    grid-row: span 2;
}

/* Providers Grid (Infinite Scroll) */
.providers-marquee {
    overflow: hidden;
    padding: 4rem 0;
    position: relative;
}

.marquee-content {
    display: flex;
    gap: 3rem;
    animation: scroll 30s linear infinite;
    width: max-content;
}

.provider-logo {
    height: 48px;
    opacity: 0.6;
    transition: opacity 0.3s;
    filter: grayscale(100%);
}

.provider-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
}

@keyframes scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* Footer */
.footer {
    background: var(--footer-bg);
    border-top: 1px solid var(--border-light);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

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

.copyright {
    text-align: center;
    color: var(--text-secondary);
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.footer a {
    color: var(--text-secondary);
    transition: color 0.2s, text-decoration-color 0.2s;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 3px;
}

.footer a:hover {
    color: var(--primary-500);
    text-decoration-color: var(--primary-500);
}

/* Responsive */
@media (max-width: 1200px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .bento-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Mobile Menu Toggle Button - Base state (hidden on desktop) */
.mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-primary);
    transition: var(--transition-base);
}

.mobile-menu-toggle:hover {
    background: var(--btn-secondary-bg);
    border-color: var(--primary-500);
}

.mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 768px) {

    /* Mobile Navigation */
    .nav-menu {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--bg-surface);
        border-bottom: 1px solid var(--border-light);
        padding: 1.5rem;
        flex-direction: column;
        gap: 1rem;
        z-index: 999;
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: flex !important;
    }

    /* Hero Responsive */
    .hero-content h1 {
        font-size: var(--text-hero);
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    /* Grids */
    .value-grid {
        grid-template-columns: 1fr;
    }

    .bento-grid,
    .pricing-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .bento-card,
    .card {
        padding: var(--space-card);
    }

    .span-2,
    .span-row-2 {
        grid-column: auto;
        grid-row: auto;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    /* Sections */
    .features,
    .pricing {
        padding: var(--space-section) 0;
    }
}

.theme-toggle:hover {
    color: var(--primary-500) !important;
}

/* Pricing Grid Layout */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Logo Cloud / Trust Section */
.providers {
    position: relative;
    padding: 4rem 0;
    border-top: 1px solid var(--providers-border);
    border-bottom: 1px solid var(--providers-border);
    background: var(--providers-bg);
    scroll-margin-top: 5rem;
    /* Fix navbar overlap */
}

.trust-title {
    text-align: center;
    /* Removed specific font-size to inherit default H2 or match specific override if needed */
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3rem;
    letter-spacing: -0.02em;
}

.providers-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 3rem 5rem;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    /* Ensure full width for centering */
}

.provider-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    cursor: default;
    min-width: 100px;
}

.provider-name {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    opacity: 0.6;
    transition: all 0.3s ease;
    text-align: center;
}

.provider-item:hover .provider-name {
    opacity: 1;
    color: var(--text-primary);
    transform: translateY(-2px);
}

.provider-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
    opacity: 0.5;
    filter: var(--provider-logo-filter);
    transition: all 0.3s ease;
}

.provider-item:hover .provider-logo {
    opacity: 1;
    transform: scale(1.05);
    filter: var(--provider-logo-filter) drop-shadow(0 0 8px var(--text-muted));
}

/* Theme-specific logos */
.logo-light {
    display: none;
}

.logo-dark {
    display: block;
}

:root.light .logo-light {
    display: block;
}

:root.light .logo-dark {
    display: none;
}

/* Small Mobile (≤480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .providers-grid {
        gap: 2rem 3rem;
    }

    .provider-logo {
        height: 36px;
    }

    .hero {
        padding-top: 6rem;
        padding-bottom: 3rem;
    }
}