/* Mobile First Responsive Design */

/* Large screens (desktops) */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .hero-subtitle {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
}

/* Medium screens (tablets) */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--spacing-lg);
    }
    
    .hero-image {
        order: -1;
    }
    
    .phone-mockup {
        width: 250px;
        height: 500px;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .tech-grid {
        grid-template-columns: 1fr;
    }
    
    .screenshots-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .download-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--spacing-md);
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* Small screens (mobile) */
@media (max-width: 768px) {
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: var(--spacing-md);
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
    }
    
    .nav-menu.active {
        transform: translateY(0);
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .nav-link {
        padding: var(--spacing-sm) 0;
        border-bottom: 1px solid var(--background-color);
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    /* Hero Section */
    .hero {
        padding: 100px 0 var(--spacing-xl);
        min-height: auto;
    }
    
    .hero-title {
        font-size: var(--font-size-3xl);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-xl);
    }
    
    .hero-description {
        font-size: var(--font-size-base);
    }
    
    .hero-features {
        justify-content: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .btn {
        padding: var(--spacing-sm) var(--spacing-sm);
        font-size: var(--font-size-sm);
    }
    
    .phone-mockup {
        width: 200px;
        height: 400px;
    }
    
    /* Sections */
    section {
        padding: var(--spacing-lg) 0;
    }
    
    .section-title {
        font-size: var(--font-size-2xl);
    }
    
    .section-description {
        font-size: var(--font-size-base);
    }
    
    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .feature-card {
        padding: var(--spacing-md);
    }
    
    .feature-icon {
        font-size: var(--font-size-3xl);
    }
    
    .feature-title {
        font-size: var(--font-size-lg);
    }
    
    /* Technology */
    .tech-category {
        padding: var(--spacing-md);
    }
    
    .tech-title {
        font-size: var(--font-size-lg);
    }
    
    /* Screenshots */
    .screenshots-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }
    
    /* Download */
    .download-title {
        font-size: var(--font-size-2xl);
    }
    
    .download-features {
        justify-content: center;
    }
    
    .app-store-btn img {
        height: 50px;
    }
    
    .qr-code {
        width: 100px;
        height: 100px;
    }
    
    /* Contact */
    .contact-card {
        padding: var(--spacing-md);
    }
    
    .contact-title {
        font-size: var(--font-size-lg);
    }
    
    /* Footer */
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-text {
        text-align: center;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-xs);
    }
    
    .hero-title {
        font-size: var(--font-size-2xl);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-lg);
    }
    
    .hero-features {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-xs);
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .phone-mockup {
        width: 180px;
        height: 360px;
    }
    
    .section-title {
        font-size: var(--font-size-xl);
    }
    
    .feature-card {
        padding: var(--spacing-sm);
    }
    
    .screenshots-grid {
        grid-template-columns: 1fr;
    }
    
    .download-features {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .contact-label {
        min-width: auto;
        margin-bottom: 4px;
    }
}

/* Landscape orientation adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 80px 0 var(--spacing-md);
    }
    
    .hero-content {
        grid-template-columns: 1fr 1fr;
        text-align: left;
    }
    
    .hero-image {
        order: 1;
    }
    
    .phone-mockup {
        width: 150px;
        height: 300px;
    }
    
    section {
        padding: var(--spacing-md) 0;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo,
    .footer-logo-img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print styles */
@media print {
    .navbar,
    .hero-buttons,
    .download-buttons,
    .nav-toggle {
        display: none;
    }
    
    .hero-bg {
        background: white;
    }
    
    .hero-text {
        color: black;
    }
    
    .download {
        background: white;
        color: black;
    }
    
    .footer {
        background: white;
        color: black;
    }
    
    section {
        break-inside: avoid;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --background-color: #1a1a1a;
        --card-color: #2a2a2a;
        --text-primary: #ffffff;
        --text-secondary: #a0a0a0;
    }
    
    .navbar {
        background: rgba(42, 42, 42, 0.95);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-menu {
        background: var(--card-color);
    }
    
    .screenshot-placeholder {
        background: linear-gradient(45deg, #2a2a2a, #3a3a3a);
        color: var(--text-secondary);
    }
    
    .qr-code {
        background: var(--card-color);
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .parallax-bg {
        transform: none !important;
    }
    
    .hover-lift:hover,
    .hover-scale:hover {
        transform: none;
    }
}

/* Focus styles for keyboard navigation */
@media (any-hover: none) {
    .nav-link:focus,
    .btn:focus {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
}

/* Container queries support (modern browsers) */
@supports (container-type: inline-size) {
    .feature-card {
        container-type: inline-size;
    }
    
    @container (max-width: 300px) {
        .feature-icon {
            font-size: var(--font-size-2xl);
        }
        
        .feature-title {
            font-size: var(--font-size-base);
        }
    }
}

/* Grid fallback for older browsers */
@supports not (display: grid) {
    .hero-content {
        display: flex;
        flex-direction: column;
    }
    
    .features-grid,
    .tech-grid,
    .screenshots-grid,
    .contact-grid {
        display: flex;
        flex-direction: column;
    }
    
    .download-content {
        display: flex;
        flex-direction: column;
    }
}

/* Flexbox fallback */
@supports not (display: flex) {
    .nav-container,
    .hero-content,
    .hero-buttons,
    .hero-features,
    .download-features,
    .contact-item,
    .footer-content {
        display: block;
    }
    
    .nav-logo,
    .nav-menu {
        display: inline-block;
    }
} 