/**
 * Modules Section - WebGL Image Ring
 */

.section-modules {
    position: relative;
    overflow: hidden;
    background: #010101;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    max-height: 1200px;
}

.section-modules #sketch {
    width: 100%;
    height: 100%;
    background: #010101;
}

.section-modules .loader-screen {
    position: fixed;
    z-index: 5;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    transition: all 0.3s;
    background-color: #010101;
}

.section-modules .loader-screen.hollow {
    opacity: 0;
    pointer-events: none;
}

.section-modules .hv-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.section-modules .loading {
    font-size: clamp(1.25rem, 3vw, 1.875rem);
    letter-spacing: 0.1em;
    white-space: nowrap;
}

.section-modules .loading span {
    animation: modules-blur 1.5s calc(var(--i) / 5 * 1s) alternate infinite;
}

@keyframes modules-blur {
    to {
        filter: blur(5px);
    }
}

.section-modules .hero-dom {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.section-modules .hero-dom .hv-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.5rem;
}

.section-modules .hero-dom .hv-center > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: clamp(280px, 50vw, 600px);
    max-width: 90%;
}

.section-modules .hero-dom .text-8xl {
    font-size: clamp(2rem, 6vw, 6rem);
    color: white;
    text-align: center;
    font-family: 'Fira Sans', var(--font-primary), sans-serif;
    font-weight: 600;
}

.section-modules .hero-dom .text-xl {
    font-size: clamp(0.9rem, 2vw, 1.25rem);
    color: #8a8a8a;
    text-align: center;
    font-family: 'Fira Sans', var(--font-primary), sans-serif;
    font-weight: 500;
    max-width: 400px;
    white-space: normal;
    line-height: 1.5;
}

/* Tablet */
@media (max-width: 1024px) {
    .section-modules {
        min-height: 550px;
    }
}

@media (max-width: 900px) {
    .section-modules {
        min-height: 500px;
    }

    .section-modules .hero-dom .hv-center > div {
        width: clamp(280px, 70vw, 500px);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .section-modules {
        height: 100vh;
        height: 100dvh;
        min-height: 450px;
        max-height: none;
    }

    .section-modules .hero-dom .hv-center > div {
        width: 85vw;
        max-width: 85vw;
    }

    .section-modules .hero-dom .text-xl {
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    .section-modules {
        min-height: 400px;
    }

    .section-modules .hero-dom .hv-center > div {
        width: 90vw;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .section-modules .loading span {
        animation: none;
    }
}
