/* Global Scroll Behavior for Fixed Navbar */
:root {
    --navbar-height: 80px;
}

html {
    scroll-padding-top: var(--navbar-height);
    /* 60px header + 20px breathing room */
    scroll-behavior: auto;
}

.navbar-spacer {
    height: var(--navbar-height);
    width: 100%;
    display: block;
}

/* Navbar */
/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 28px 0;
    transition: var(--transition-fast);
}

.navbar.scrolled {
    background: #1a1a1a;
    border-bottom: 1px solid var(--glass-border);
    padding: 18px 0;
}

.navbar .container {
    padding: 0;
}

.nav-container {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    position: static;
    /* Changed from relative to static so mega menu positions relative to navbar */
    justify-content: flex-start;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
    /* margin-left: 50px; removed for microsoft layout alignment */
}

.brand-divider {
    color: var(--text-muted);
    font-weight: 300;
    font-size: 1.5rem;
    opacity: 0.5;
}

/* Brand Text Styling */
.brand-text-container {
    display: flex;
    align-items: center;
    padding-top: 14px;
}

.brand-divider {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
    font-size: 1.75rem;
    line-height: 1;
    white-space: pre;
    /* Preserve spaces in text */
}

.brand-name {
    font-family: 'Gayathri', sans-serif;
    font-weight: 700;
    font-size: 1.75rem;
    color: #fff;
    text-decoration: none;
    line-height: 1;
}

.nav-logo-text {
    margin-top: 14px;
}

.logo-img {
    height: 48px;
    /* Proper thumbnail sizing */
    width: auto;
    object-fit: contain;
}

.logo-icon {
    height: 48px;
    width: auto;
    object-fit: contain;
    align-self: center;
}

.nav-links {
    display: flex;
    gap: 24px;
    margin-left: 80px;
    flex-shrink: 0;
    position: relative;
    /* New Anchor */
}

.nav-actions {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-left: auto;
    margin-right: 50px;
    flex-shrink: 0;
}

/* Compact Navbar Buttons */
/* Liquid Glass Button */
.navbar .btn {
    padding: 6px 16px;
    font-size: 0.75rem;
    background: #333333 !important;
    border: 1px solid #444444 !important;
    color: #fff !important;
    transition: none !important;
    transform: none !important;
}

.navbar .btn:hover {
    background: #444444 !important;
    border-color: #555555 !important;
}

.navbar .btn:focus,
.navbar .btn:active {
    box-shadow: none !important;
}

/* Remove old pseudo-elements causing black shadow */
.navbar .btn::before,
.navbar .btn::after {
    display: none !important;
    content: none !important;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    margin-top: 10px;
    color: #ffffff;
}

.nav-link:hover {
    color: var(--primary);
}

/* Hero Section */
.hero {
    min-height: calc(100vh - var(--navbar-height));
    /* Avoid fixed 100vh height issue on mobile */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: var(--navbar-height);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    z-index: 1;
}

.hero-title {
    font-size: 5rem;
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1.1;
    font-family: 'Gayathri', sans-serif;
}

.hero-desc {
    font-size: 1.35rem;
    /* Larger, more confident text */
    color: var(--text-muted);
    margin-bottom: 50px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
    /* Lighter weight for elegance */
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

/* Default state: Hide items 7+ */
.features-grid:not(.expanded)>.feature-card:nth-child(n+7) {
    display: none;
}

.feature-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 50px 40px;
    border-radius: 30px;
    /* More rounded like IOS */
    transition: var(--transition-smooth);

    box-shadow: var(--glass-shadow);
    position: relative;
    overflow: hidden;
}



.feature-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 24px;
    color: var(--primary);
}

.feature-title {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.feature-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Comparison Table */
.comparison-table-wrapper {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 40px;
    overflow-x: auto;
    margin-top: 60px;

    box-shadow: var(--glass-shadow);
}



.comparison-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.comparison-table th,
.comparison-table td {
    padding: 20px;
    text-align: left;
    border-bottom: 1px solid var(--bg-card-border);
}

.comparison-table th {
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.comparison-table td:first-child {
    font-weight: 600;
    color: var(--text-main);
}

.comparison-table td:nth-child(2) {
    color: var(--primary);
    /* Highlight VayuOS Column */
    font-weight: 700;
}

/* Stats Section */
.stats-section {
    padding: 100px 0;
    background-image:
        linear-gradient(180deg, transparent, rgba(0, 229, 255, 0.03) 50%, transparent 100%);
}

.stats-grid {
    display: flex;
    justify-content: space-around;
    text-align: center;
    flex-wrap: wrap;
    gap: 40px;
}

.stat-item h3 {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.stat-item p {
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.85rem;
}

/* Ecosystem Section */
.ecosystem-section {
    padding: 100px 24px;
    background-image:
        /* url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.02'/%3E%3C/svg%3E"), */
        linear-gradient(180deg, rgba(0, 229, 255, 0.02) 0%, transparent 100%);
    border-radius: 30px;
    margin-top: 60px;
}

.ecosystem-header {
    text-align: center;
    margin-bottom: 60px;
}

.ecosystem-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.ecosystem-card {
    background: var(--glass-bg);
    padding: 40px;
    border-radius: 30px;
    border: 1px solid var(--glass-border);

    position: relative;
    overflow: hidden;
    transition: var(--transition-fast);
    box-shadow: var(--glass-shadow);
}



.ecosystem-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.ecosystem-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.ecosystem-text {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.ecosystem-list {
    color: var(--text-muted);
    line-height: 2;
}

.tags-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tech-tag {
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* CTA Section */
.cta-card {
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.1) 0%, rgba(123, 44, 191, 0.1) 100%);
    padding: 80px;
    border-radius: 40px;
    border: 1px solid var(--glass-border);

    position: relative;
    overflow: hidden;
    box-shadow: var(--glass-shadow);
}



.btn-large {
    font-size: 1.2rem;
    padding: 18px 40px;
    transition: none !important;
}

/* Footer */
footer {
    border-top: 1px solid var(--bg-card-border);
    padding: 80px 0 40px;
    margin-top: 120px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 20px;
    max-width: 300px;
}

.footer-col h4 {
    margin-bottom: 24px;
    font-size: 1.1rem;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-col ul li a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    padding-top: 40px;
    border-top: 1px solid var(--bg-card-border);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .section-title {
        font-size: 2.5rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .nav-links {
        display: none;
    }

    /* Mobile menu simplified for now */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px 20px;
    }

    .footer-brand {
        grid-column: 1 / -1;
        text-align: center;
        margin-bottom: 20px;
    }

    .footer-brand p {
        margin-left: auto;
        margin-right: auto;
        max-width: 100%;
    }

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

    .nav-actions {
        margin-right: 15px;
        gap: 5px;
    }

    .nav-actions .btn {
        margin-top: 7px;
        padding: 3px 12px;
        font-size: 0.7rem;
    }
}

/* Prevent horizontal scroll bleed from animated hero backgrounds */
body {
    overflow-x: hidden;
}



/* Accessibility: respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Infrastructure-Proof Utilities (Replacing inline styles) */
.section-padding {
    padding: 100px 24px;
}

.table-col-feature {
    width: 25%;
}

.table-col-os {
    width: 16%;
}

/* 18.75% * 4 = 75% roughly, user had 16*3 + 25 = 73? math was weird. Keeping user's intent: 25+25+16+16+16 = 98%. Close enough. */
.table-col-feature,
.table-col-vayuos {
    width: 25%;
}

.text-center-mt {
    text-align: center;
    margin-top: 40px;
}

.legal-text {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 20px;
}

.cta-container {
    padding: 100px 24px;
    text-align: center;
}

/* Responsive Mobile Menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-right: 16px;
    z-index: 1002;
}

.mobile-menu-toggle .bar {
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    border-radius: 1px;
    transition: all 0.3s ease;
}

/* Mobile Layout (< 1024px to match Microsoft/Tablet) */
@media (max-width: 1024px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: var(--navbar-height);
        left: -100%;
        width: 100%;
        max-width: 100%;
        height: calc(100vh - var(--navbar-height));
        background: #1a1a1a;
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 0;
        margin-left: 0;
        gap: 0;
        overflow-y: auto;
        transition: none;
        border-right: none;
        box-shadow: none;
    }

    .nav-links.mobile-open {
        left: 0;
        display: flex !important;
        /* Override default hidden state */
    }

    .nav-item-mega {
        width: 100%;
        display: block;
        height: auto !important;
        /* Fix stretching issue */
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-link {
        display: block;
        padding: 6px 24px;
        /* Reduced further to 6px */
        width: 100%;
        text-align: left;
        /* Ensure left alignment */
        font-size: 1.1rem;
        margin-top: 0;
    }

    /* Mobile Mega Menu Accordion */
    .mega-menu-container {
        position: static !important;
        width: 100% !important;
        margin-top: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        height: auto !important;
        display: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-item-mega.active .mega-menu-container {
        display: block;
        max-height: 2000px;
    }

    .mega-menu-content {
        max-width: 100% !important;
        box-shadow: none !important;
        border: none !important;
        background: rgba(0, 0, 0, 0.2) !important;
        border-radius: 0 !important;
        margin: 0 !important;
        padding: 10px 20px 20px !important;
    }

    .mega-grid {
        flex-direction: column;
        gap: 20px;
    }

    .mega-col {
        width: 100%;
        min-width: 0;
    }
}