/* ========================================
   MidiBro Homepage - Responsive Styles
   Mobile-First Approach
   ======================================== */

/* ========================================
   Mobile Overrides (<768px)
   ======================================== */
@media (max-width: 767px) {
    /* Typography */
    :root {
        --text-3xl: 1.5rem;     /* 24px */
        --text-4xl: 1.875rem;   /* 30px */
        --text-5xl: 2.25rem;    /* 36px */
        --navbar-height: 60px;
    }

    .container {
        padding: 0 var(--space-4);
    }

    .section-title {
        font-size: var(--text-3xl);
        margin-bottom: var(--space-8);
    }

    /* Navigation */
    .navbar {
        height: 60px;
    }

    .navbar-menu,
    .navbar-cta {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .navbar-title {
        font-size: var(--text-lg);
    }

    .navbar-logo {
        width: 28px;
        height: 28px;
    }

    /* Hero Section */
    .hero {
        min-height: 80vh;
        padding-top: 60px;
    }

    .hero-logo {
        width: 80px;
        height: 80px;
        margin-bottom: var(--space-6);
    }

    .hero-title {
        font-size: var(--text-3xl);
        margin-bottom: var(--space-3);
    }

    .hero-subtitle {
        font-size: var(--text-xl);
        margin-bottom: var(--space-4);
    }

    .hero-description {
        font-size: var(--text-base);
        margin-bottom: var(--space-8);
    }

    .hero-description br {
        display: none;
    }

    .hero-buttons {
        flex-direction: column;
        gap: var(--space-3);
        width: 100%;
        max-width: 320px;
        margin: 0 auto var(--space-8);
    }

    .download-btn {
        width: 100%;
        justify-content: center;
    }

    .download-btn .btn-icon {
        width: 18px;
        height: 18px;
    }

    .hero-scroll-indicator {
        display: none;
    }

    /* Overview Section */
    .overview {
        padding: var(--space-16) 0;
    }

    .overview-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .overview-card {
        padding: var(--space-6);
    }

    .overview-icon {
        width: 48px;
        height: 48px;
        margin-bottom: var(--space-4);
    }

    .overview-card-title {
        font-size: var(--text-lg);
    }

    .overview-card-text {
        font-size: var(--text-sm);
    }

    /* Card Back - More compact on mobile */
    .card-back {
        padding: var(--space-4);
    }

    .card-back-list {
        margin: var(--space-3) 0;
    }

    .card-back-list li {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: var(--space-2);
        padding-left: var(--space-5);
    }

    .card-back-note {
        font-size: 0.75rem;
        padding-top: var(--space-2);
        margin-top: var(--space-3);
        line-height: 1.3;
    }

    .card-back .overview-card-title {
        font-size: var(--text-lg);
        margin-bottom: var(--space-3);
    }

    /* Features Section */
    .features {
        padding: var(--space-16) 0;
    }

    .feature-item {
        grid-template-columns: 1fr;
        gap: var(--space-8);
        margin-bottom: var(--space-16);
    }

    .feature-item-reverse {
        direction: ltr;
    }

    .feature-content {
        padding: 0;
    }

    .feature-title {
        font-size: var(--text-2xl);
        margin-bottom: var(--space-4);
    }

    .feature-list li {
        font-size: var(--text-sm);
        margin-bottom: var(--space-3);
    }

    .feature-panels {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    .panel-description h4 {
        font-size: var(--text-base);
    }

    .panel-description li {
        font-size: var(--text-sm);
    }

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

    .daw-item {
        padding: var(--space-2) var(--space-3);
        font-size: var(--text-xs);
    }

    .workflow-steps h4 {
        font-size: var(--text-base);
    }

    .workflow-steps li {
        font-size: var(--text-sm);
    }

    /* Gallery Section */
    .gallery {
        padding: var(--space-16) 0;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    /* Lightbox */
    .lightbox-close {
        top: var(--space-4);
        right: var(--space-4);
        width: 48px;
        height: 48px;
        font-size: 2rem;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 48px;
        height: 48px;
        font-size: 2rem;
    }

    .lightbox-prev {
        left: var(--space-4);
    }

    .lightbox-next {
        right: var(--space-4);
    }

    .lightbox-content {
        max-width: 95%;
        max-height: 80%;
    }

    /* Video Section */
    .video-section {
        padding: var(--space-16) 0;
    }

    .video-placeholder {
        padding: var(--space-6);
    }

    .video-icon {
        width: 60px;
        height: 60px;
    }

    .video-placeholder p {
        font-size: var(--text-base);
    }

    /* Testimonials Section */
    .testimonials {
        padding: var(--space-16) 0;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .testimonial-card {
        padding: var(--space-6);
    }

    .testimonial-quote p {
        font-size: var(--text-base);
    }

    /* Pricing Section */
    .pricing {
        padding: var(--space-16) 0;
    }

    .pricing-subtitle {
        font-size: var(--text-lg);
        margin-bottom: var(--space-8);
    }

    .pricing-card {
        padding: var(--space-8);
        margin-bottom: var(--space-12);
    }

    .pricing-title {
        font-size: var(--text-2xl);
        margin-bottom: var(--space-4);
    }

    .price-currency {
        font-size: var(--text-2xl);
    }

    .price-amount {
        font-size: 3.5rem;
    }

    .price-period {
        font-size: var(--text-lg);
    }

    .price-original .price-amount {
        font-size: 2rem;
    }

    .price-discount .price-amount {
        font-size: 3.5rem;
    }

    .price-label {
        font-size: var(--text-base);
    }

    .pricing-features li {
        font-size: var(--text-base);
        margin-bottom: var(--space-3);
    }

    .system-requirements {
        padding: var(--space-6);
    }

    .system-requirements h4 {
        font-size: var(--text-xl);
        margin-bottom: var(--space-4);
    }

    .requirements-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .requirement-icon {
        width: 28px;
        height: 28px;
    }

    .requirement-item strong {
        font-size: var(--text-base);
    }

    /* Story Section */
    .story {
        padding: var(--space-16) 0;
    }

    .story .section-subtitle {
        font-size: var(--text-lg);
        margin-bottom: var(--space-8);
    }

    .story-content {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .story-intro {
        font-size: var(--text-base);
    }

    .story-subheading {
        font-size: var(--text-lg);
    }

    .story-list li {
        font-size: var(--text-sm);
        padding-left: var(--space-6);
    }

    .story-final {
        font-size: var(--text-base);
    }

    /* Contact Section */
    .contact {
        padding: var(--space-16) 0;
    }

    .contact-subtitle {
        font-size: var(--text-lg);
        margin-bottom: var(--space-8);
    }

    .form-group input,
    .form-group textarea {
        padding: var(--space-3);
        font-size: var(--text-base);
    }

    .form-group textarea {
        min-height: 120px;
    }

    /* Footer */
    .footer {
        padding: var(--space-12) 0 var(--space-6);
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--space-8);
        margin-bottom: var(--space-8);
    }

    .footer-logo {
        width: 40px;
        height: 40px;
    }

    .footer-title {
        font-size: var(--text-xl);
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .footer-column h4 {
        font-size: var(--text-base);
        margin-bottom: var(--space-3);
    }

    /* Buttons */
    .btn-lg {
        padding: var(--space-3) var(--space-6);
        font-size: var(--text-base);
    }
}

/* ========================================
   Tablet (768px - 1023px)
   ======================================== */
@media (min-width: 768px) and (max-width: 1023px) {
    .container {
        padding: 0 var(--space-8);
    }

    /* Navigation */
    .navbar-menu {
        gap: var(--space-4);
        font-size: var(--text-sm);
    }

    .navbar-cta {
        padding: var(--space-2) var(--space-4);
        font-size: var(--text-sm);
    }

    /* Hero Section */
    .hero-logo {
        width: 100px;
        height: 100px;
    }

    .hero-title {
        font-size: var(--text-4xl);
    }

    .hero-subtitle {
        font-size: var(--text-2xl);
    }

    /* Overview Section */
    .overview-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-6);
    }

    /* Features Section */
    .feature-item {
        gap: var(--space-12);
    }

    .feature-panels {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

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

    /* Gallery Section */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }

    /* Testimonials Section */
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    /* Pricing Section */
    .requirements-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--space-12);
    }

    .footer-links {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========================================
   Small Desktop (1024px - 1279px)
   ======================================== */
@media (min-width: 1024px) and (max-width: 1279px) {
    .container {
        padding: 0 var(--space-10);
    }

    /* Overview Section */
    .overview-grid {
        gap: var(--space-6);
    }

    .overview-card {
        padding: var(--space-6);
    }

    /* Features Section */
    .feature-item {
        gap: var(--space-12);
    }
}

/* ========================================
   Large Desktop (≥1280px)
   ======================================== */
@media (min-width: 1280px) {
    /* Full desktop styles are already in main.css */
}

/* ========================================
   Extra Large Desktop (≥1536px)
   ======================================== */
@media (min-width: 1536px) {
    .container {
        max-width: 1600px;
    }

    .section-title {
        font-size: 3.5rem;
    }

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

    .hero-subtitle {
        font-size: 2.5rem;
    }

    .feature-title {
        font-size: 2.5rem;
    }
}

/* ========================================
   Landscape Mobile (max-height: 500px)
   ======================================== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: var(--space-16) 0 var(--space-12);
    }

    .hero-logo {
        width: 60px;
        height: 60px;
        margin-bottom: var(--space-4);
    }

    .hero-title {
        font-size: var(--text-2xl);
        margin-bottom: var(--space-2);
    }

    .hero-subtitle {
        font-size: var(--text-lg);
        margin-bottom: var(--space-3);
    }

    .hero-description {
        font-size: var(--text-sm);
        margin-bottom: var(--space-6);
    }

    .hero-buttons {
        flex-direction: row;
        gap: var(--space-3);
    }

    .btn-lg {
        padding: var(--space-2) var(--space-4);
        font-size: var(--text-sm);
    }

    .hero-buttons {
        flex-direction: row;
        gap: var(--space-3);
    }

    .hero-scroll-indicator {
        display: none;
    }
}

/* ========================================
   Touch Device Optimization
   ======================================== */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .btn {
        min-height: 44px;
        padding: var(--space-3) var(--space-6);
    }

    .nav-link {
        padding: var(--space-3) var(--space-2);
    }

    .form-group input,
    .form-group textarea {
        min-height: 44px;
        font-size: 16px; /* Prevents iOS zoom on focus */
    }

    /* Remove hover effects on touch devices */
    .overview-card:hover {
        transform: none;
    }

    .gallery-item:hover {
        transform: none;
    }

    .testimonial-card:hover {
        transform: none;
    }

    /* Simplify animations */
    .hero-background {
        animation: none;
        background: linear-gradient(135deg, #1a1a1a 0%, #2a4858 50%, #3d85c6 100%);
    }
}

/* ========================================
   High Resolution Displays
   ======================================== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize for retina displays */
    * {
        -webkit-font-smoothing: subpixel-antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    body {
        background: white;
        color: black;
    }

    .navbar,
    .mobile-menu-overlay,
    .hero-background,
    .hero-scroll-indicator,
    .lightbox,
    .contact-form,
    .footer {
        display: none;
    }

    .hero {
        min-height: auto;
        padding: 2rem 0;
    }

    section {
        page-break-inside: avoid;
    }

    .section-title {
        color: black;
    }

    .btn {
        display: none;
    }
}

/* ========================================
   Accessibility - Reduced Motion
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    .hero-background {
        animation: none !important;
    }

    .hero-scroll-indicator {
        animation: none !important;
    }

    .fade-in {
        transition: none !important;
    }

    * {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* ========================================
   Accessibility - High Contrast Mode
   ======================================== */
@media (prefers-contrast: high) {
    :root {
        --text-secondary: #d0d0d0;
        --text-muted: #a0a0a0;
    }

    .btn {
        border-width: 3px;
    }

    .overview-card,
    .feature-content,
    .testimonial-card {
        border-width: 2px;
    }
}

/* ========================================
   Dark Mode Override (if system preference)
   ======================================== */
@media (prefers-color-scheme: dark) {
    /* Already dark theme, but can add overrides if needed */
}

/* ========================================
   Keyboard Navigation Focus States
   ======================================== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--primary-blue);
    outline-offset: 2px;
}

/* ========================================
   Screen Reader Only
   ======================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
