/* ============================================
   Responsive Design - Mobile First
   ============================================ */

/* --- Mobile (default, < 640px) --- */

/* Hamburger button */
.hamburger {
    display: flex;
}

/* Mobile nav: dropdown panel below header */
.nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(10, 10, 26, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    z-index: calc(var(--z-header) - 1);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.35s ease;
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
}

.nav-links.open {
    max-height: 320px;
    opacity: 1;
}

.nav-links .nav-link {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--text-primary);
    text-transform: uppercase;
    padding: var(--space-lg) var(--space-xl);
    border-left: 3px solid transparent;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease,
                color 0.15s ease, border-color 0.15s ease,
                background 0.15s ease;
}

/* Stagger the link animations when menu opens */
.nav-links.open .nav-link:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0.05s; }
.nav-links.open .nav-link:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.1s; }
.nav-links.open .nav-link:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.15s; }
.nav-links.open .nav-link:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.2s; }

.nav-links .nav-link.active,
.nav-links .nav-link:hover {
    color: var(--neon-cyan);
    text-shadow: 0 0 12px rgba(0, 255, 255, 0.4);
    border-left-color: var(--neon-cyan);
    background: rgba(0, 255, 255, 0.04);
}

/* Mobile title: prevent overflow */
.hero-title {
    word-break: break-word;
    overflow-wrap: break-word;
    padding: 0 var(--space-sm);
}

/* VR hero title - responsive on mobile */
.vr-hero-content h1 {
    font-size: clamp(1.6rem, 8vw, var(--text-4xl));
}

.vr-hero {
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
}

/* Page header titles — responsive on mobile */
.section h1 {
    font-size: clamp(1.5rem, 7vw, var(--text-4xl));
    word-break: break-word;
    overflow-wrap: break-word;
}

/* A&P Lab grid — single column on mobile */
.ap-labs-grid {
    grid-template-columns: 1fr !important;
}

/* Privacy page mobile */
.privacy-section h3 {
    font-size: var(--text-base);
}

.privacy-content .neon-card {
    padding: var(--space-xl) !important;
}

/* Visualizer mobile: slightly shorter */
.player-visualizer-row {
    height: 34px;
}

/* Mobile: larger tap targets for player buttons */
@media (max-width: 767px) {
    .player-btn {
        width: 36px;
        height: 36px;
    }
    .player-btn svg {
        width: 20px;
        height: 20px;
    }
    .player-btn-main {
        width: 38px;
        height: 38px;
    }
    .player-bar {
        gap: 2px;
        padding: 0 var(--space-sm);
    }
}

/* Contact widget mobile: full-width panel */
.contact-panel {
    width: calc(100vw - 2 * var(--space-lg));
    max-width: 320px;
}

/* Footer mobile: stack vertically */
.footer-top {
    flex-direction: column;
    gap: var(--space-lg);
}

.footer-main {
    text-align: center;
}

.footer-links {
    justify-content: center;
}

/* Subtitle links on mobile */
.hero-subtitle {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-xs);
}

/* Services grid - single column on mobile */
.services-grid,
.mission-grid,
.grid-3 {
    grid-template-columns: 1fr;
}

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

.split-section {
    grid-template-columns: 1fr;
}

.split-section.reverse {
    direction: ltr;
}

/* Featured banner mobile */
.featured-banner {
    min-height: 250px;
    padding: var(--space-xl);
}

/* AI platform card */
.ai-platform-card {
    flex-direction: column;
    text-align: center;
}

/* --- Small tablets (>= 640px) --- */

@media (min-width: 640px) {
    .services-grid,
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .mission-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .featured-banner {
        padding: var(--space-2xl);
    }
}

/* --- Tablets (>= 768px) --- */

@media (min-width: 768px) {
    .hamburger {
        display: none;
    }

    .nav-links {
        position: static;
        max-height: none;
        opacity: 1;
        overflow: visible;
        flex-direction: row;
        background: none;
        backdrop-filter: none;
        gap: var(--space-xl);
        border-bottom: none;
    }

    .nav-links .nav-link {
        font-family: var(--font-mono);
        font-size: var(--text-sm);
        font-weight: 400;
        opacity: 1;
        transform: none;
        transition: color var(--transition-fast);
        color: var(--text-secondary);
        padding: var(--space-sm) 0;
        border-left: none;
        background: none;
    }

    .split-section {
        grid-template-columns: 1fr 1fr;
    }

    .split-section.reverse {
        direction: rtl;
    }

    .ai-platform-card {
        flex-direction: row;
        text-align: left;
    }

    .player-visualizer-row {
        height: 40px;
    }

    .privacy-section h3 {
        font-size: var(--text-lg);
    }

    .privacy-content .neon-card {
        padding: var(--space-3xl) !important;
    }

    .footer-top {
        flex-direction: row;
    }

    .footer-main {
        text-align: left;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

/* --- Laptops (>= 1024px) --- */

@media (min-width: 1024px) {
    .services-grid,
    .mission-grid,
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .featured-banner {
        padding: var(--space-3xl);
        min-height: 350px;
    }

    h1 {
        font-size: var(--text-4xl);
    }
}

/* --- Desktops (>= 1280px) --- */

@media (min-width: 1280px) {
    .container {
        padding: 0 var(--space-2xl);
    }
}
