/* 
   LOADER STYLES 
   Matches core portfolio visual identity
*/



/* Lock scrolling and interactions while loading */
html.loading-active,
body.loading-active {
    overflow: hidden !important;
    height: 100% !important;
    pointer-events: none !important;
}

#loader {
    pointer-events: auto !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #f5f5f7;
    z-index: 9998; /* Under the global TV static (9999), over all other content */
    display: none;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 60px 8%; /* Matches hero/body padding */
    transition: opacity 1.5s cubic-bezier(0.22, 1, 0.36, 1),
            visibility 1.5s;
}

#loader.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-wave-container {
    width: 60px;
    height: 10px;
    overflow: hidden;
    position: relative;
    margin-bottom: 24px;
}

.loader-wave {
    width: 200%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 10'%3E%3Cpath d='M0,5 Q10,0 20,5 T40,5' fill='none' stroke='%23000000' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-size: 40px 10px;
    background-repeat: repeat-x;
    animation: waveMove 0.8s linear infinite;
}

@keyframes waveMove {
    0% { transform: translateX(0); }
    100% { transform: translateX(-40px); }
}

.loader-label {
    font-family: 'Mynor', sans-serif;
    font-size: 11px;
    letter-spacing: 3px;
    color: rgba(0, 0, 0, 0.6); /* Accent color matching hero intro label */
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 8px;
}

.loader-percent {
    font-family: 'PixelOperator', monospace;
    font-size: 80px;
    line-height: 1.1;
    color: #000000;
    letter-spacing: -2px;
    display: inline-flex;
    align-items: center;
    height: 1.1em;
}

.lock-wheel {
    height: 1.1em;
    width: 0.72em;
    overflow: hidden;
    position: relative;
    display: inline-block;
    background: #18181b;
    border-radius: 0.08em;
    box-shadow: inset 0 0.1em 0.2em rgba(0,0,0,0.85), inset 0 -0.1em 0.2em rgba(0,0,0,0.85);
    margin-right: 0.06em;
    border: 1px solid #27272a;
    vertical-align: middle;
}

.lock-strip {
    display: flex;
    flex-direction: column;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.lock-strip span {
    height: 1.1em;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.9em;
    font-family: 'PixelOperator', monospace;
    line-height: 1.1em;
}

.lock-percent {
    font-family: 'PixelOperator', monospace;
    font-size: 0.9em;
    color: #000000;
    margin-left: 0.05em;
    vertical-align: middle;
}

.loader-notice {
    display: none;
    font-family: 'Mynor', sans-serif;
    font-size: 11px;
    letter-spacing: 2px;
    color: rgba(0, 0, 0, 0.5);
    text-transform: uppercase;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: auto; /* Pushes the rest of the loader to the bottom */
    margin-top: 10px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

@media (max-width: 768px) {
    .loader-notice {
        display: block;
    }
}

/* Responsive constraints */
@media (max-width: 900px) {
    #loader {
        padding: 40px 8%;
    }
}

@media (max-width: 600px) {
    #loader {
        padding: 40px;
    }
    .loader-percent {
        font-size: 56px;
    }
}

@media (max-width: 600px) {
    #loader {
        justify-content: flex-end;
        padding-bottom: 100px;
        padding-left: 24px;
        padding-right: 24px;
    }

    .loader-percent {
        font-size: 56px;
    }
}