/* Responsive Styles for SparkMailr Website */

/* Large Desktop (1440px and up) */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-title {
        font-size: 4.5rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .sdks-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Desktop (1024px to 1439px) */
@media (max-width: 1439px) {
    .hero-content {
        gap: var(--spacing-2xl);
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    /* SDKs - Ensure 4 columns for desktop */
    .sdks-grid {
        grid-template-columns: 1fr 1fr 1fr 1fr !important;
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 var(--spacing-lg);
    }
}

/* Tablet (768px to 1023px) */
@media (max-width: 1023px) {
    .container {
        padding: 0 var(--spacing-md);
    }
    
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 73px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: var(--spacing-xl);
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-normal);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Hero Section */
    .hero-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
        text-align: center;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-stats {
        justify-content: center;
        gap: var(--spacing-xl);
    }
    
    .hero-cta {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .code-preview {
        max-width: 600px;
    }
    
    /* Features */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-xl);
    }
    
    /* SDKs */
    .sdks-grid {
        grid-template-columns: 1fr 1fr 1fr 1fr !important;
        max-width: 100%;
        margin: 0 auto;
        padding: 0 var(--spacing-md);
    }
    
    .sdk-card {
        height: 280px;
    }
    
    .sdk-status-banner {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-xl);
    }
    
    .footer-legal {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }
}

/* Mobile Large (640px to 767px) */
@media (max-width: 767px) {
    /* Typography */
    h1 { font-size: var(--font-size-4xl); }
    h2 { font-size: var(--font-size-3xl); }
    h3 { font-size: var(--font-size-2xl); }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: var(--font-size-lg);
    }
    
    .section-title {
        font-size: var(--font-size-3xl);
    }
    
    .section-subtitle {
        font-size: var(--font-size-base);
    }
    
    /* Spacing */
    .hero {
        padding: var(--spacing-2xl) 0;
    }
    
    .features,
    .sdks {
        padding: var(--spacing-2xl) 0;
    }
    
    .section-header {
        margin-bottom: var(--spacing-2xl);
    }
    
    /* Hero Stats */
    .hero-stats {
        gap: var(--spacing-md);
    }
    
    .stat-number {
        font-size: var(--font-size-2xl);
    }
    
    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .feature-card {
        padding: var(--spacing-xl);
    }
    
    /* SDKs */
    .sdks-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        max-width: 100%;
        margin: 0 auto;
        padding: 0 var(--spacing-md);
    }
    
    .sdk-card {
        height: 280px;
    }
    
    .sdk-actions {
        flex-direction: column;
    }
    
    /* Code Preview */
    .code-tabs {
        overflow-x: auto;
    }
    
    .tab {
        white-space: nowrap;
        min-width: 80px;
    }
    
    .code-block {
        font-size: 0.8rem;
    }
    
    /* Footer */
    .footer {
        padding: var(--spacing-2xl) 0 var(--spacing-xl);
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
}

/* Mobile Small (480px to 639px) */
@media (max-width: 639px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    /* Navigation */
    .nav-container {
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .brand-text {
        font-size: var(--font-size-lg);
    }
    
    .by-skagway {
        display: none;
    }
    
    /* Hero */
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        justify-content: space-around;
    }
    
    .hero-cta .btn-large {
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: var(--font-size-base);
    }
    
    /* Buttons */
    .btn-large {
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: var(--font-size-base);
    }
    
    /* Trust badges */
    .trust-badges {
        flex-wrap: wrap;
    }
    
    /* Code Preview */
    .code-preview {
        margin: 0 -var(--spacing-sm);
        border-radius: var(--radius-lg);
    }
    
    /* Feature Cards */
    .feature-card {
        padding: var(--spacing-lg);
    }
    
    .feature-icon {
        width: 48px;
        height: 48px;
        font-size: var(--font-size-xl);
    }
    
    /* SDK Cards */
    .sdk-card {
        padding: var(--spacing-lg);
    }
    
    .sdk-header {
        gap: var(--spacing-sm);
    }
    
    .sdk-icon {
        width: 40px;
        height: 40px;
        font-size: var(--font-size-lg);
    }
    
    .sdk-features {
        gap: var(--spacing-xs);
    }
    
    .feature-tag {
        font-size: 0.7rem;
        padding: 2px var(--spacing-xs);
    }
}

/* Mobile Extra Small (up to 479px) */
@media (max-width: 479px) {
    /* Base font size adjustment */
    html {
        font-size: 14px;
    }
    
    /* Navigation */
    .logo {
        height: 24px;
    }
    
    .brand-text {
        font-size: var(--font-size-base);
    }
    
    /* Hero */
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: var(--font-size-base);
    }
    
    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-sm);
        text-align: center;
    }
    
    .stat-number {
        font-size: var(--font-size-xl);
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    /* Buttons */
    .hero-cta {
        gap: var(--spacing-sm);
    }
    
    .btn {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: var(--font-size-sm);
    }
    
    .btn-large {
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: var(--font-size-sm);
    }
    
    /* Code Preview */
    .code-header {
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .code-block {
        padding: var(--spacing-md);
        font-size: 0.75rem;
    }
    
    /* Sections */
    .section-title {
        font-size: var(--font-size-2xl);
    }
    
    /* Features */
    .feature-card {
        padding: var(--spacing-md);
    }
    
    .feature-icon {
        width: 40px;
        height: 40px;
        font-size: var(--font-size-lg);
        margin-bottom: var(--spacing-md);
    }
    
    .feature-title {
        font-size: var(--font-size-lg);
    }
    
    /* SDKs */
    .sdk-status-banner {
        padding: var(--spacing-md);
    }
    
    .status-text {
        font-size: 0.75rem;
    }
    
    .sdk-card {
        padding: var(--spacing-md);
    }
    
    .sdk-name {
        font-size: var(--font-size-base);
    }
    
    /* Footer */
    .social-links {
        justify-content: center;
    }
    
    .social-link {
        width: 36px;
        height: 36px;
    }
}

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

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .hero-particles {
        display: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    /* This could be expanded for full dark mode support */
    .navbar {
        background: rgba(15, 23, 42, 0.95);
        border-bottom-color: var(--gray-700);
    }
    
    .nav-link {
        color: var(--gray-300);
    }
    
    .nav-link:hover {
        color: var(--primary-light);
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hero-background,
    .hero-particles,
    .hamburger,
    .btn,
    .social-links {
        display: none !important;
    }
    
    .hero {
        background: var(--white) !important;
        color: var(--gray-900) !important;
        min-height: auto;
        padding: var(--spacing-lg) 0;
    }
    
    .hero-title,
    .section-title,
    .feature-title,
    .sdk-name {
        color: var(--gray-900) !important;
    }
    
    .code-preview {
        border: 1px solid var(--gray-300);
        box-shadow: none;
    }
    
    .feature-card,
    .sdk-card {
        border: 1px solid var(--gray-300);
        box-shadow: none;
        break-inside: avoid;
    }
    
    .footer {
        background: var(--white) !important;
        color: var(--gray-900) !important;
        border-top: 1px solid var(--gray-300);
    }
}
