/* =====================================================
   FuseLidar.com - Responsive Stylesheet
   Mobile and Tablet Optimizations
   ===================================================== */

/* =====================================================
   Tablet Styles (max-width: 1024px)
   ===================================================== */

@media screen and (max-width: 1024px) {
    /* Container */
    .container {
        padding: 0 1.5rem;
    }

    /* Hero */
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1.125rem;
    }

    .hero-stats-center {
        gap: 2rem;
    }

    /* Grid Adjustments */
    .value-grid,
    .app-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Network Domains */
    .network-domains {
        grid-template-columns: 1fr;
    }

    /* Fusion Visualization */
    .fusion-visualization {
        height: 350px;
    }

    .sensor-input {
        font-size: 0.875rem;
    }

    /* Resources */
    .resource-tabs {
        max-width: 100%;
    }

    /* CTA Features */
    .cta-features {
        flex-direction: column;
        align-items: center;
    }
}

/* =====================================================
   Small Tablet Styles (max-width: 768px)
   ===================================================== */

@media screen and (max-width: 768px) {
    /* Navigation */
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: block;
        padding: 0.75rem 1rem;
        border-radius: var(--radius-md);
    }

    .nav-menu a:hover {
        background: var(--bg-hover);
    }

    .btn-nav-cta {
        margin-top: 1rem;
        width: 100%;
        text-align: center;
    }

    /* Mobile Menu Toggle Animation */
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    /* Hero */
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero-cta {
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero-cta .btn {
        width: 100%;
    }

    .hero-stats-center {
        flex-direction: column;
        gap: 1.5rem;
    }

    /* Sections */
    section {
        padding: 3rem 0;
    }

    .section-title {
        font-size: 1.75rem;
    }

    /* Grids */
    .value-grid,
    .app-grid,
    .result-grid {
        grid-template-columns: 1fr;
    }

    /* Tech Accordion */
    .accordion-header h3 {
        font-size: 1.25rem;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links ul,
    .footer-legal ul,
    .footer-network ul {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    /* Tab Buttons */
    .tab-buttons {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    /* Calculator Widget */
    .calculator-widget {
        padding: 1.5rem;
    }

    /* Sensor Controls */
    .sensor-controls {
        flex-direction: column;
        width: 100%;
    }

    .sensor-toggle {
        width: 100%;
        justify-content: center;
    }

    /* Visualizer Canvas */
    #fusionCanvas,
    #kalmanCanvas,
    #coverageCanvas {
        max-width: 100%;
        height: auto;
    }
}

/* =====================================================
   Mobile Styles (max-width: 640px)
   ===================================================== */

@media screen and (max-width: 640px) {
    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.125rem; }
    
    /* Container */
    .container {
        padding: 0 1rem;
    }

    /* Hero */
    .hero {
        padding: 3rem 0;
    }

    .hero-title {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }

    .hero-description {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .hero-visual-full {
        margin: 2rem 0;
    }

    .fusion-visualization {
        height: 300px;
        padding: 1rem;
    }

    .fusion-core {
        width: 80px;
        height: 80px;
    }

    .core-center {
        width: 40px;
        height: 40px;
    }

    /* Hide sensor labels on mobile */
    .sensor-label {
        display: none;
    }

    .fusion-status {
        position: static;
        margin-top: 1rem;
        width: 100%;
    }

    .status-metrics {
        flex-direction: column;
        gap: 0.5rem;
    }

    /* Stat Values */
    .stat-value {
        font-size: 1.5rem;
    }

    /* Value Cards */
    .value-card {
        padding: 1.5rem;
    }

    /* Tech Accordion */
    .tech-accordion {
        margin: 0 -1rem;
    }

    .accordion-item {
        border-radius: 0;
        margin-bottom: 0;
        border-left: none;
        border-right: none;
    }

    .accordion-header {
        padding: 1rem;
    }

    .tech-detail {
        padding: 1rem;
    }

    /* Calculator Section */
    .calculator-widget {
        padding: 1rem;
        border-radius: var(--radius-md);
    }

    .calc-inputs,
    .calc-results {
        padding: 1rem;
    }

    /* Input Groups */
    .input-group label {
        font-size: 0.875rem;
    }

    /* Result Grid */
    .result-grid {
        gap: 0.75rem;
    }

    .result-item {
        padding: 0.75rem;
    }

    .result-value {
        font-size: 1.25rem;
    }

    /* Buttons */
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9375rem;
    }

    .btn-generate,
    .btn-calculate,
    .btn-submit {
        width: 100%;
        padding: 0.75rem;
    }

    /* App Cards */
    .app-card {
        padding: 1.25rem;
    }

    /* Resource List */
    .resource-list li {
        padding: 1rem;
    }

    /* CTA Section */
    .cta-section {
        padding: 3rem 0;
    }

    .cta-content {
        padding: 0 1rem;
    }

    .btn-cta {
        width: 100%;
        padding: 0.875rem;
        font-size: 1rem;
    }

    /* Network Box */
    .network-box {
        padding: 2rem 1.5rem;
        margin: 2rem 0;
    }

    .domain-card {
        padding: 1.25rem;
    }

    /* Footer */
    .footer {
        padding: 2rem 0 1rem;
    }

    .footer-brand p {
        font-size: 0.8125rem;
    }

    .footer-bottom p {
        font-size: 0.75rem;
        padding: 0 1rem;
    }

    /* Forms */
    .contact-form-wrapper {
        padding: 1.5rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    /* Legal Content */
    .legal-content {
        padding: 1.5rem;
    }

    .toc {
        padding: 1rem;
    }

    /* Alert Boxes */
    .alert-box {
        padding: 0.75rem;
        font-size: 0.875rem;
    }

    /* FAQ Items */
    .faq-item {
        padding: 1.25rem;
    }

    .faq-item h4 {
        font-size: 1rem;
    }

    /* Info Items */
    .info-item {
        flex-direction: column;
        text-align: center;
    }

    .info-icon {
        margin: 0 auto 1rem;
    }

    /* Page Hero */
    .page-hero {
        padding: 2rem 0;
    }

    .page-title {
        font-size: 1.75rem;
    }

    .page-subtitle {
        font-size: 1rem;
    }

    /* Breadcrumb */
    .breadcrumb {
        padding: 0.75rem 0;
        font-size: 0.8125rem;
    }

    /* Coverage Map */
    .coverage-display {
        padding: 0.75rem;
    }

    .sensor-specs {
        margin-top: 1rem;
    }

    .specs-list {
        font-size: 0.875rem;
    }

    /* Confidence Bar */
    .confidence-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .confidence-meter {
        height: 15px;
    }

    /* Demo Descriptions */
    .demo-desc {
        font-size: 0.875rem;
        padding: 0 0.5rem;
    }
}

/* =====================================================
   Small Mobile Styles (max-width: 480px)
   ===================================================== */

@media screen and (max-width: 480px) {
    /* Hero Title */
    .hero-title {
        font-size: 1.5rem;
    }

    /* Section Titles */
    .section-title {
        font-size: 1.5rem;
    }

    .section-subtitle {
        font-size: 0.9375rem;
    }

    /* Navigation Brand */
    .brand-text {
        font-size: 1.25rem;
    }

    .nav-brand .logo {
        width: 32px;
        height: 32px;
    }

    /* Fusion Visualization */
    .fusion-visualization {
        height: 250px;
    }

    /* Hide complex animations on very small screens */
    .data-stream,
    .fusion-indicator {
        display: none;
    }

    /* Stat Cards */
    .stat {
        padding: 1rem;
        background: var(--bg-card);
        border-radius: var(--radius-md);
        border: 1px solid var(--border-color);
    }

    /* Tab Buttons */
    .tab-btn {
        padding: 0.625rem 0.875rem;
        font-size: 0.8125rem;
    }

    /* Domain Cards */
    .domain-icon {
        width: 48px;
        height: 48px;
    }

    .domain-icon img {
        width: 24px;
        height: 24px;
    }

    /* CTA Features */
    .cta-feature {
        font-size: 0.875rem;
    }

    /* Quick Facts */
    .quick-facts {
        padding: 1.25rem;
    }

    .quick-facts li {
        font-size: 0.875rem;
    }

    /* Contact Wrapper */
    .contact-wrapper {
        padding: 0;
    }

    /* Legal Container */
    .legal-container {
        padding: 0;
    }

    .legal-content h2 {
        font-size: 1.25rem;
    }

    .legal-content h3 {
        font-size: 1.125rem;
    }
}

/* =====================================================
   Print Styles
   ===================================================== */

@media print {
    /* Hide navigation and non-essential elements */
    .nav-header,
    .mobile-menu-toggle,
    .hero-visual-full,
    .fusion-visualization,
    .btn,
    .tab-buttons,
    .footer {
        display: none !important;
    }

    /* Reset colors for printing */
    body {
        background: white;
        color: black;
    }

    .container {
        max-width: 100%;
    }

    /* Ensure text is readable */
    h1, h2, h3, h4, h5, h6 {
        color: black;
        page-break-after: avoid;
    }

    p, ul, ol {
        color: black;
    }

    /* Avoid page breaks inside elements */
    .value-card,
    .app-card,
    .faq-item {
        page-break-inside: avoid;
    }
}

/* =====================================================
   High DPI Display Optimizations
   ===================================================== */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Sharper borders */
    .value-card,
    .app-card,
    .calculator-widget,
    .domain-card {
        border-width: 0.5px;
    }

    /* Smoother gradients */
    .gradient-text,
    .btn-primary,
    .domain-icon {
        image-rendering: optimizeQuality;
    }
}

/* =====================================================
   Accessibility - Reduced Motion
   ===================================================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }

    .data-stream,
    .core-pulse,
    .status-dot {
        animation: none !important;
    }
}

/* =====================================================
   Dark Mode Override (System Preference)
   ===================================================== */

@media (prefers-color-scheme: light) {
    /* Keep dark theme regardless of system preference */
    /* This ensures consistent branding */
}