/* ============================================
   Responsive Design - Mobile First
   ============================================ */

/* Mobile (320px and up) - Base styles already mobile-first */

/* Small mobile adjustments */
@media (max-width: 480px) {
    .hero-visual {
        flex-direction: column;
        gap: var(--spacing-md);
        margin-top: var(--spacing-xl);
    }

    .phone-2 {
        transform: perspective(1000px) rotateY(0deg) translateX(0);
        margin-top: -30px;
    }

    .phone-mockup {
        --phone-width: 240px;
        --phone-height: 490px;
    }

    .hero-headline {
        font-size: 2rem;
        margin-bottom: var(--spacing-md);
    }

    .hero-subheadline {
        font-size: 1.125rem;
        margin-bottom: var(--spacing-md);
    }

    .featured-in-section,
    .metrics-strip-section,
    .how-it-works-section,
    .feature-section,
    .cta-section,
    .social-proof-section {
        padding: var(--spacing-xl) 0;
    }

    .section-header {
        margin-bottom: var(--spacing-lg);
    }

    .dashboard-widgets {
        grid-template-columns: 1fr;
    }

    .how-step {
        padding: var(--spacing-md);
    }

    .step-title {
        font-size: 1.125rem;
    }

    .step-icon {
        width: 48px;
        height: 48px;
    }
}

/* Tablet (768px and up) */
@media (min-width: 768px) {
    :root {
        --container-padding: 2rem;
        --phone-width: 300px;
        --phone-height: 610px;
    }

    .hero-headline {
        font-size: clamp(2.5rem, 5vw, 3.5rem);
    }

    .hero-subheadline {
        font-size: clamp(1.125rem, 2vw, 1.375rem);
    }

    .feature-content {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-2xl);
    }

    .featured-in-section,
    .metrics-strip-section {
        padding: var(--spacing-2xl) 0;
    }

    .how-it-works-section,
    .feature-section {
        padding: var(--spacing-3xl) 0;
    }

    .feature-text {
        max-width: none;
    }

    .hero-cta {
        flex-wrap: nowrap;
    }

    .cta-buttons {
        flex-wrap: nowrap;
    }

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

    .calendar-grid {
        gap: var(--spacing-sm);
    }

    .weather-calendar {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Desktop (1024px and up) */
@media (min-width: 1024px) {
    :root {
        --container-padding: 3rem;
        --phone-width: 320px;
        --phone-height: 650px;
    }

    .hero-visual {
        margin-top: var(--spacing-3xl);
    }

    .phone-mockup {
        width: var(--phone-width);
        height: var(--phone-height);
    }

    .hero-section {
        min-height: 90vh;
    }

    .feature-section {
        padding: var(--spacing-3xl) 0;
    }

    .feature-content {
        gap: var(--spacing-3xl);
    }

    .section-headline {
        font-size: var(--font-size-h2);
    }

    .mockup-calendar,
    .mockup-tasks,
    .mockup-contact,
    .mockup-birthday,
    .mockup-weather {
        max-width: 450px;
    }

    .mockup-dashboard {
        max-width: 600px;
    }

    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-lg);
    }

    .weather-calendar {
        grid-template-columns: repeat(5, 1fr);
    }

    .birthday-calendar {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Large Desktop (1280px and up) */
@media (min-width: 1280px) {
    .container {
        max-width: var(--container-max-width);
    }

    .hero-content {
        max-width: 900px;
    }

    .feature-content {
        gap: var(--spacing-3xl);
    }

    .mockup-calendar,
    .mockup-tasks,
    .mockup-contact,
    .mockup-birthday,
    .mockup-weather {
        max-width: 500px;
    }

    .mockup-dashboard {
        max-width: 700px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
        min-width: 44px;
    }

    .task-checkbox {
        min-width: 44px;
        min-height: 44px;
    }

    .toggle-switch {
        min-width: 44px;
        min-height: 44px;
    }

    /* Disable hover effects on touch devices */
    .mockup-calendar:hover,
    .mockup-tasks:hover,
    .mockup-contact:hover,
    .mockup-birthday:hover,
    .mockup-weather:hover,
    .mockup-dashboard:hover {
        transform: none;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

    .hero-headline,
    .section-headline {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Landscape Mobile */
@media (max-width: 767px) and (orientation: landscape) {

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

    .feature-section {
        padding: var(--spacing-xl) 0;
    }
}

/* Print Styles */
@media print {

    .hero-background,
    .animated-ui,
    .confetti-container {
        display: none;
    }

    .btn {
        border: 1px solid var(--color-text-primary);
        color: var(--color-text-primary);
    }

    .feature-section {
        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;
    }

    .confetti {
        animation: none !important;
    }

    .animated-ui {
        animation: none !important;
    }

    .btn {
        animation: none !important;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles here if needed */
}

/* Container Adjustments for Small Screens */
@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
    }

    .hero-section {
        padding-top: calc(var(--spacing-4xl) - 20px);
    }

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

    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .cta-buttons .btn {
        width: 100%;
    }

    .hero-badge,
    .cta-stats-badge {
        font-size: 0.8125rem;
        padding: 0.5rem 1rem;
    }

    .hero-trust {
        font-size: 0.8125rem;
    }

    .calendar-grid {
        gap: 0.25rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .weather-calendar {
        grid-template-columns: repeat(2, 1fr);
    }

    .birthday-calendar {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-links {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
}