/* ========================================
   Responsive Styles
   Mobile-first approach
======================================== */

/* ===== Tablet (max-width: 1024px) ===== */
@media screen and (max-width: 1024px) {
    :root {
        --font-size-6xl: 3rem;        /* 48px */
        --font-size-5xl: 2.5rem;      /* 40px */
        --font-size-4xl: 2rem;        /* 32px */
        --font-size-3xl: 1.75rem;     /* 28px */
    }
    
    .container {
        padding: 0 var(--spacing-md);
    }
    
    /* Hero Section */
    .hero-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
    }
    
    .hero-title {
        font-size: var(--font-size-5xl);
    }
    
    .hero-stats {
        gap: var(--spacing-md);
    }
    
    /* Verticals Grid */
    .verticals-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    /* Tech Grid */
    .tech-grid {
        grid-template-columns: 1fr;
    }
    
    .tech-visual {
        order: -1;
    }
    
    /* About Grid */
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    /* Contact Grid */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
    }
    
    /* Footer */
    .footer-main {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== Mobile (max-width: 768px) ===== */
@media screen and (max-width: 768px) {
    :root {
        --font-size-6xl: 2.5rem;      /* 40px */
        --font-size-5xl: 2rem;        /* 32px */
        --font-size-4xl: 1.75rem;     /* 28px */
        --font-size-3xl: 1.5rem;      /* 24px */
        --font-size-2xl: 1.25rem;     /* 20px */
        --spacing-3xl: 4rem;          /* 64px */
        --spacing-2xl: 3rem;          /* 48px */
    }
    
    /* Navigation */
    .navbar-content {
        padding: var(--spacing-sm) 0;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--color-secondary);
        flex-direction: column;
        align-items: flex-start;
        padding: var(--spacing-3xl) var(--spacing-lg);
        gap: var(--spacing-md);
        transition: var(--transition-base);
        box-shadow: var(--shadow-xl);
        z-index: 1001;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .menu-toggle {
        display: flex;
        z-index: 1002;
    }
    
    .menu-toggle.active .line:nth-child(1) {
        transform: rotate(45deg) translateY(10px);
    }
    
    .menu-toggle.active .line:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active .line:nth-child(3) {
        transform: rotate(-45deg) translateY(-10px);
    }
    
    .btn-contact {
        display: inline-flex;
        margin-top: var(--spacing-md);
        width: 100%;
    }
    
    /* Hero Section */
    .hero-section {
        padding-top: 80px;
        min-height: auto;
    }
    
    .hero-title {
        font-size: var(--font-size-4xl);
    }
    
    .hero-description {
        font-size: var(--font-size-base);
    }
    
    .hero-stats {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .stat-card {
        width: 100%;
    }
    
    /* Section Spacing */
    section {
        padding: var(--spacing-2xl) 0;
    }
    
    .section-header {
        margin-bottom: var(--spacing-2xl);
    }
    
    .section-title {
        font-size: var(--font-size-4xl);
    }
    
    .section-description {
        font-size: var(--font-size-base);
    }
    
    /* Verticals Grid */
    .verticals-grid {
        grid-template-columns: 1fr;
    }
    
    .vertical-image {
        height: 200px;
    }
    
    .vertical-content {
        padding: var(--spacing-lg);
    }
    
    /* Process Steps */
    .process-step {
        flex-direction: column;
        padding: var(--spacing-lg);
    }
    
    .step-number {
        font-size: var(--font-size-2xl);
    }
    
    /* Tech Features */
    .tech-features {
        margin: var(--spacing-lg) 0;
    }
    
    .tech-feature {
        flex-direction: column;
        padding: var(--spacing-md);
    }
    
    /* Scenarios Table */
    .scenarios-table {
        display: block;
    }
    
    .scenarios-table thead {
        display: none;
    }
    
    .scenarios-table tbody {
        display: block;
    }
    
    .scenarios-table tr {
        display: block;
        margin-bottom: var(--spacing-lg);
        border: 1px solid var(--color-border);
        border-radius: var(--radius-md);
        overflow: hidden;
    }
    
    .scenarios-table td {
        display: block;
        padding: var(--spacing-md);
        border-bottom: 1px solid var(--color-border);
    }
    
    .scenarios-table td:last-child {
        border-bottom: none;
    }
    
    .scenarios-table td::before {
        content: attr(data-label);
        display: block;
        font-weight: 600;
        margin-bottom: var(--spacing-xs);
        color: var(--color-text-primary);
    }
    
    /* About Values */
    .value-item {
        flex-direction: column;
        padding: var(--spacing-md);
    }
    
    /* Contact Form */
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .contact-form-wrapper {
        padding: var(--spacing-lg);
    }
    
    /* Footer */
    .footer {
        padding: var(--spacing-2xl) 0 var(--spacing-lg);
    }
    
    .footer-links {
        grid-template-columns: 1fr;
    }
    
    /* Buttons */
    .btn-large {
        padding: 1rem 2rem;
        font-size: var(--font-size-base);
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== Small Mobile (max-width: 480px) ===== */
@media screen and (max-width: 480px) {
    :root {
        --font-size-6xl: 2rem;        /* 32px */
        --font-size-5xl: 1.75rem;     /* 28px */
        --font-size-4xl: 1.5rem;      /* 24px */
        --spacing-lg: 1.5rem;         /* 24px */
        --spacing-xl: 2rem;           /* 32px */
        --spacing-2xl: 2.5rem;        /* 40px */
        --spacing-3xl: 3rem;          /* 48px */
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .navbar-logo .logo-text {
        font-size: var(--font-size-base);
    }
    
    .hero-title {
        font-size: var(--font-size-3xl);
    }
    
    .section-title {
        font-size: var(--font-size-3xl);
    }
    
    .vertical-image {
        height: 180px;
    }
    
    .vertical-content {
        padding: var(--spacing-md);
    }
    
    .process-step {
        padding: var(--spacing-md);
    }
    
    .tech-disclaimer,
    .contact-disclaimer {
        padding: var(--spacing-md);
        font-size: var(--font-size-xs);
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: var(--spacing-md);
        right: var(--spacing-md);
    }
}

/* ===== Landscape Mobile (max-height: 500px) ===== */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: var(--spacing-3xl) 0;
    }
    
    .hero-title {
        font-size: var(--font-size-4xl);
    }
    
    .hero-stats {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

/* ===== Print Styles ===== */
@media print {
    .navbar,
    .menu-toggle,
    .back-to-top,
    .contact-section {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
    }
    
    .hero-section,
    .technology-section {
        color: #000;
        background: #fff;
    }
    
    .section-title {
        page-break-after: avoid;
    }
    
    .vertical-card,
    .process-step,
    .faq-item {
        page-break-inside: avoid;
    }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== High Contrast Mode ===== */
@media (prefers-contrast: high) {
    :root {
        --color-primary: #FFD700;
        --color-border: #000;
    }
    
    .btn-primary {
        border: 2px solid #000;
    }
    
    .vertical-card,
    .process-step,
    .faq-item {
        border: 2px solid #000;
    }
}