/* Responsive Design - Mobile First Approach */

/* Small devices (landscape phones, 576px and up) */
@media (max-width: 600px) {
    .background-text {
        font-size: 1.5rem;
    }
    
    .hero__title {
        font-size: 1.5rem;
    }
    
    .hero__logo-container {
        margin-bottom: 0.7rem !important;
    }
    
    .hero__subtitle {
        font-size: 0.85rem;
    }
    
    .hero {
        padding: var(--spacing-xs);
    }
    
    .collection__grid {
        grid-template-columns: 1fr;
        gap: 0.7rem;
        padding: var(--spacing-xs);
    }
    
    .nft-card__image {
        height: 80px;
        font-size: 1rem;
    }
    
    .nft-card__title {
        font-size: 0.85rem;
    }
    
    .nft-card__description {
        font-size: 0.7rem;
    }
    
    .cta-button {
        font-size: 1rem;
        padding: 0.7rem 1.5rem;
    }
    
    .hero__symbol {
        font-size: 1.5rem;
    }
    
    #cult-logo {
        width: 180px;
    }
    
    .terminal {
        width: 95%;
        padding: var(--spacing-sm);
        max-height: 90vh;
    }
    
    .terminal__content {
        font-size: 0.8rem;
    }
    
    .ritual-text,
    .cult-text {
        font-size: 1rem;
    }
}

/* Extra small devices (portrait phones, less than 400px) */
@media (max-width: 400px) {
    .hero__title {
        font-size: 1.1rem;
    }
    
    .hero__subtitle {
        font-size: 0.7rem;
    }
    
    .cta-button {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }
    
    .background-text {
        font-size: 1rem;
    }
    
    #cult-logo {
        width: 140px;
    }
    
    .terminal {
        width: 98%;
        padding: var(--spacing-xs);
    }
    
    .terminal__title {
        font-size: 0.8rem;
    }
    
    .dot {
        width: 8px;
        height: 8px;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 601px) and (max-width: 900px) {
    .background-text {
        font-size: 3rem;
    }
    
    .hero__logo-container {
        margin-bottom: 1.2rem !important;
    }
    
    .hero__subtitle {
        font-size: 1rem;
    }
    
    .collection__grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-sm);
        padding: var(--spacing-sm);
    }
    
    .nft-card__image {
        height: 120px;
        font-size: 1.2rem;
    }
    
    .nft-card__title {
        font-size: 0.95rem;
    }
    
    .nft-card__description {
        font-size: 0.8rem;
    }
    
    .hero__title {
        font-size: 2rem;
    }
    
    .nav-menu {
        top: var(--spacing-sm);
        right: var(--spacing-sm);
        gap: var(--spacing-sm);
    }
    
    .nav-link {
        font-size: 0.8rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 901px) and (max-width: 1200px) {
    .background-text {
        font-size: 4rem;
    }
    
    .hero__title {
        font-size: 3rem;
    }
    
    .collection__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1201px) {
    .background-text {
        font-size: 7rem;
    }
    
    .hero__title {
        font-size: 5.5rem;
    }
    
    .collection__grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1400px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero__title,
    .background-text {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 600px) {
    .hero {
        min-height: auto;
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .hero__logo-container {
        margin-bottom: var(--spacing-sm);
    }
    
    .hero__subtitle {
        margin-bottom: var(--spacing-md);
    }
    
    .collection {
        min-height: auto;
        padding: var(--spacing-md);
    }
}

/* Print styles */
@media print {
    .background-text,
    .ritual-text,
    .cult-text,
    .glitch-overlay,
    #threejs-bg,
    .terminal-overlay,
    .terminal {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .hero__title {
        color: black !important;
        text-shadow: none !important;
        animation: none !important;
    }
    
    .hero__title::before,
    .hero__title::after {
        display: none;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .glitch-overlay {
        animation: none;
    }
    
    .hero__title::before,
    .hero__title::after {
        animation: none;
    }
    
    .symbol {
        animation: none;
    }
}

/* Dark mode support (if system preference changes) */
@media (prefers-color-scheme: light) {
    /* Keep dark theme regardless of system preference */
    :root {
        --color-bg: #000000;
        --color-primary: #98f5e1;
    }
}

/* Focus styles for keyboard navigation */
@media (any-hover: none) {
    .cta-button:focus,
    .nav-link:focus,
    .nft-card:focus {
        outline: 2px solid var(--color-accent-3);
        outline-offset: 2px;
    }
}