/**
 * Responsive Styles Part 2 - Tablets and Desktops
 * The Heart of Gold
 * Covers: md (640-767px), lg (768-1023px), xl (1024-1279px), 2xl (1280px+)
 */

/* ==================== */
/* Medium (md) - 640px to 767px */
/* ==================== */

@media (min-width: 640px) and (max-width: 767px) {
    .main-nav {
        padding: var(--space-md) var(--space-lg);
    }
    
    .nav-links {
        gap: var(--space-md);
    }
    
    .nav-link {
        font-size: 0.7rem;
    }
    
    .loading-corner {
        gap: var(--space-lg);
    }
    
    .loading-text {
        font-size: 2rem;
    }
    
    .loading-gif {
        width: 140px;
    }
    
    .logo-wrapper {
        width: 85vw;
    }
    
    .home-subtitle {
        font-size: 1.5rem;
    }
    
    .carousel-gallery {
        height: 400px;
    }
    
    .carousel-cards {
        left: 10%;
        width: 300px;
        height: 380px;
    }
    
    .news-panel {
        width: 300px;
        height: 380px;
    }
}

/* ==================== */
/* Large (lg) - 768px to 1023px */
/* ==================== */

@media (min-width: 768px) and (max-width: 1023px) {
    .main-nav {
        padding: var(--space-md) var(--space-xl);
    }
    
    .nav-links {
        gap: var(--space-lg);
    }
    
    .nav-link {
        font-size: 0.8rem;
    }
    
    .loading-corner {
        gap: var(--space-xl);
    }
    
    .loading-text {
        font-size: 2.5rem;
    }
    
    .loading-gif {
        width: 180px;
    }
    
    .logo-wrapper {
        width: 75vw;
        max-width: 550px;
    }
    
    .home-subtitle {
        font-size: 1.8rem;
    }
    
    .carousel-gallery {
        height: 450px;
    }
    
    .carousel-cards {
        left: 15%;
        width: 320px;
        height: 420px;
    }
    
    .news-panel {
        width: 320px;
        height: 420px;
    }
    
    .carousel-nav {
        width: 60px;
        height: 60px;
    }
}

/* ==================== */
/* Extra Large (xl) - 1024px to 1279px */
/* ==================== */

@media (min-width: 1024px) and (max-width: 1279px) {
    .nav-links {
        gap: var(--space-xl);
    }
    
    .nav-link {
        font-size: 0.85rem;
    }
    
    .logo-wrapper {
        width: 70vw;
        max-width: 580px;
    }
    
    .home-subtitle {
        font-size: 2rem;
    }
    
    .carousel-gallery {
        height: 480px;
    }
    
    .carousel-cards {
        left: 22%;
        width: 350px;
        height: 450px;
    }
    
    .news-panel {
        width: 350px;
        height: 450px;
    }
}

/* ==================== */
/* 2XL (2xl) - 1280px and up */
/* ==================== */

@media (min-width: 1280px) {
    .logo-wrapper {
        width: min(65vw, 650px);
    }
    
    .shooting-star {
        width: 80px;
        height: 80px;
    }
    
    .home-subtitle {
        font-size: 2.5rem;
    }
    
    .carousel-gallery {
        height: 520px;
    }
    
    .carousel-cards {
        left: 20%;
        width: 380px;
        height: 480px;
    }
    
    .news-panel {
        width: 380px;
        height: 480px;
    }
}

/* ==================== */
/* Height-based - Landscape phones */
/* ==================== */

@media (max-height: 600px) and (orientation: landscape) {
    .home-hero {
        min-height: 150vh;
    }
    
    .home-content {
        padding-top: 80px;
    }
    
    .logo-wrapper {
        width: min(50vw, 400px);
    }
    
    .home-subtitle {
        font-size: 1rem;
    }
    
    .loading-corner {
        bottom: var(--space-md);
        right: var(--space-md);
    }
}

/* ==================== */
/* High DPI / Retina */
/* ==================== */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .pixel-art {
        image-rendering: pixelated;
        image-rendering: -moz-crisp-edges;
        image-rendering: crisp-edges;
    }
}

/* ==================== */
/* Reduced Motion */
/* ==================== */

@media (prefers-reduced-motion: reduce) {
    .logo-shimmer,
    .panel-shimmer {
        display: none;
    }
    
    .loading-bg-pattern {
        animation: none;
    }
    
    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* ==================== */
/* Print Styles */
/* ==================== */

@media print {
    .main-nav,
    .custom-cursor,
    .particle-container,
    .audio-toggle,
    .loading-screen,
    .splash-screen,
    .transition-overlay,
    .section-nav,
    #sakura-canvas {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* ==================== */
/* iOS Safari Specific */
/* ==================== */

@supports (-webkit-touch-callout: none) {
    .home-scroll-container {
        -webkit-overflow-scrolling: touch;
    }
    
    .home-screen,
    .loading-screen,
    .splash-screen {
        min-height: -webkit-fill-available;
    }
}

/* ==================== */
/* Safe Areas (Notch Support) */
/* ==================== */

@supports (padding-top: env(safe-area-inset-top)) {
    .main-nav {
        padding-top: calc(var(--space-lg) + env(safe-area-inset-top));
        padding-left: calc(var(--space-xl) + env(safe-area-inset-left));
        padding-right: calc(var(--space-xl) + env(safe-area-inset-right));
    }
    
    .home-audio-toggles {
        padding-top: calc(env(safe-area-inset-top) + 60px);
        padding-left: env(safe-area-inset-left);
    }
}
