/* ========================================
   INFINITE ZOOM SCROLL - LIGHT WAVES
   All images stacked, zoom on scroll
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    background: #000;
    color: #fff;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    overflow-x: hidden;
    cursor: default;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

/* Enable vertical scrolling */
body {
    overflow-y: scroll;
    overscroll-behavior: none;
}

/* Scroll container - creates scrollable height */
.scroll-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    pointer-events: none;
    /* Height set by JavaScript */
}

/* Viewport - fixed container that zooms */
.viewport {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: center center;
    transform: scale(1);
    will-change: auto; /* Let browser decide when to optimize */
    /* Removed transition - causes jank during scroll */
}

/* Each hero layer image - all stacked on top of each other */
.hero-layer,
.info-layer {
    position: absolute;
    top: 50%;
    left: 50%;
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
    object-fit: contain;
    will-change: transform, opacity;
    transform: translate3d(-50%, -50%, 0) scale(1);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
    contain: layout style paint;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -webkit-transform-style: preserve-3d;
    -webkit-perspective: 1000px;
}

/* INFO layers start visible but microscopic */
.info-layer {
    visibility: visible;
    opacity: 1;
    transform: translate3d(-50%, -50%, 0) scale(0.001);
}

/* lghtwvs 11 - true square that fills viewport */
.hero-layer:nth-child(1) {
    width: max(100vw, 100vh);
    height: max(100vw, 100vh);
    max-width: none;
    max-height: none;
    object-fit: cover;
}

/* lghtwvs 9 - positioned in center */
.hero-layer:nth-child(2) {
    max-width: 85%;
    max-height: 85%;
    transform: translate3d(-50%, -50%, 0);
}

/* lghtwvs 8 - positioned at bottom, OUTSIDE viewport for true fixed positioning */
.hero-layer-bottom {
    position: fixed !important;
    bottom: -20% !important;  /* Negative to compensate for transparent areas */
    left: 50% !important;
    top: auto !important;
    transform: translateX(-50%) scale(0.75);  /* Initial scale - JS will update with zoom */
    transform-origin: center bottom !important;
    z-index: 5;
    max-width: 90% !important;
    max-height: none !important;
}

/* Overlay text - always visible from start */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: none;
    opacity: 1;  /* Always visible */
    /* Removed transition - no longer needed */
}

/* No longer needed - overlay always visible
.overlay.visible {
    opacity: 1;
} */

.overlay h1 {
    font-size: clamp(2rem, 8vw, 5rem);
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;  /* Increased from 0.5rem to create more space before LIGHT WAVES */
    text-transform: uppercase;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    gap: 2em;  /* Space between DAVID and MORIN */
    color: #0f0;  /* Explicit green for desktop */
}

/* Name parts for curtain effect */
.name-part {
    display: inline-block;
    transition: transform 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    will-change: transform;
}

/* Curtain effect when info panel opens */
.overlay.curtain-open .name-left {
    transform: translateX(-200vw);  /* Slide DAVID off to the left */
}

.overlay.curtain-open .name-right {
    transform: translateX(200vw);  /* Slide MORIN off to the right */
}

.overlay .subtitle {
    font-size: clamp(1rem, 3vw, 2rem);
    font-weight: 300;
    letter-spacing: 0.2em;
    color: #0f0;
    text-shadow: 0 2px 10px rgba(0, 255, 0, 0.7);
}

/* Info panel - vaporwave cyberpunk style */
.info-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.info-panel.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Spinning LP Record */
.spinning-lp {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 700px;
    height: 700px;
    max-width: 90vw;
    max-height: 90vw;
    z-index: 0;
    animation: spinRecord 4s linear infinite;
    filter: drop-shadow(0 0 40px rgba(0, 255, 0, 0.4))
            drop-shadow(0 0 60px rgba(0, 255, 255, 0.3));
}

@keyframes spinRecord {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.info-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 650px;
    height: 650px;
    padding: 4rem;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.7) 100%);
    border-radius: 50%;
    color: #fff;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-family: 'Rajdhani', sans-serif;
    z-index: 1;  /* Above the spinning LP */
}

/* Old animated border removed - replaced with spinning LP record */

.artist-name-image {
    width: 70%;
    max-width: 250px;
    height: auto;
    margin: 0 auto 1rem auto;
    display: block;
    filter: drop-shadow(0 0 20px rgba(0, 255, 0, 0.8))
            drop-shadow(0 0 30px rgba(0, 255, 255, 0.6));
    animation: glitch 3s infinite;
}

@keyframes glitch {
    0%, 90%, 100% { transform: translate(0); }
    92% { transform: translate(-2px, 2px); }
    94% { transform: translate(2px, -2px); }
    96% { transform: translate(-2px, -2px); }
    98% { transform: translate(2px, 2px); }
}

.bio {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 300;
    color: #0ff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.links-section {
    margin-bottom: 1.5rem;
}

.links-section h3 {
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    margin-bottom: 0.6rem;
    color: #0f0;
    text-transform: uppercase;
    text-shadow: 0 0 15px rgba(0, 255, 0, 0.8);
}

.links {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
}

.links a {
    position: relative;
    color: #0ff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 1.2rem;
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid #0ff;
    clip-path: polygon(10% 0%, 100% 0%, 90% 100%, 0% 100%);
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.links a:hover,
.links a:focus {
    background: rgba(0, 255, 255, 0.2);
    color: #fff;
    border-color: #0f0;
    box-shadow:
        0 0 20px rgba(0, 255, 255, 0.6),
        inset 0 0 20px rgba(0, 255, 0, 0.2);
    transform: translateY(-2px);
    outline: none;
}

.links a:focus-visible {
    outline: 2px solid #0f0;
    outline-offset: 2px;
}

.store-link {
    margin-top: 2rem;
}

.store-button {
    position: relative;
    display: inline-block;
    padding: 1.2rem 3.5rem;
    background: linear-gradient(135deg, #0f0 0%, #0ff 100%);
    color: #000;
    text-decoration: none;
    font-family: 'Orbitron', monospace;
    font-size: 1.3rem;
    font-weight: 900;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    clip-path: polygon(5% 0%, 100% 0%, 95% 100%, 0% 100%);
    box-shadow:
        0 0 40px rgba(0, 255, 0, 0.7),
        0 0 60px rgba(0, 255, 255, 0.5),
        inset 0 0 20px rgba(255, 255, 255, 0.3);
    transition: all 0.4s ease;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow:
            0 0 40px rgba(0, 255, 0, 0.7),
            0 0 60px rgba(0, 255, 255, 0.5),
            inset 0 0 20px rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow:
            0 0 60px rgba(0, 255, 0, 0.9),
            0 0 80px rgba(0, 255, 255, 0.7),
            inset 0 0 30px rgba(255, 255, 255, 0.5);
    }
}

.store-button:hover,
.store-button:focus {
    background: linear-gradient(135deg, #f0f 0%, #0ff 100%);
    transform: scale(1.05) translateY(-3px);
    box-shadow:
        0 0 80px rgba(255, 0, 255, 0.9),
        0 0 100px rgba(0, 255, 255, 0.7),
        inset 0 0 40px rgba(255, 255, 255, 0.6);
    outline: none;
}

.store-button:focus-visible {
    outline: 3px solid #f0f;
    outline-offset: 4px;
}

/* Debug info */
.debug-info {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    color: #0f0;
    padding: 1rem;
    font-size: 0.75rem;
    font-family: 'Courier New', monospace;
    z-index: 999;
    border: 1px solid #0f0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.debug-info.visible {
    opacity: 0.8;
    pointer-events: auto;
}

.debug-info div {
    margin: 0.3rem 0;
}

/* Performance optimization for reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .hero-layer,
    .info-layer {
        will-change: auto !important;
    }

    .viewport {
        will-change: auto !important;
    }

    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Safari Mobile Specific Performance Fixes */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari specific styles */
    .hero-layer,
    .info-layer {
        -webkit-transform: translate3d(-50%, -50%, 0) scale(1);
        -webkit-backface-visibility: hidden;
        -webkit-perspective: 1000px;
    }

    .viewport {
        -webkit-transform: translateZ(0);
        -webkit-perspective: 1000px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-layer,
    .info-layer {
        max-width: 95%;
        max-height: 95%;
        /* Mobile performance hints */
        will-change: transform;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }

    /* lghtwvs 8 - position at bottom on mobile and increase size */
    .hero-layer-bottom {
        bottom: -30% !important;  /* Much more negative to actually reach the bottom */
        transform: translateX(-50%) scale(2.5) !important;  /* Much larger scale for better visibility */
    }

    .overlay h1 {
        font-size: 2.5rem;
        gap: 1.5em;  /* Slightly less gap on mobile */
        margin-bottom: 1.5rem;  /* Proportional spacing for mobile */
        color: #fff !important;  /* White text on mobile - force override green */
    }

    /* Curtain effect adjustments for mobile */
    .overlay.curtain-open .name-left {
        transform: translateX(-150vw);  /* Slightly less distance on mobile */
    }

    .overlay.curtain-open .name-right {
        transform: translateX(150vw);  /* Slightly less distance on mobile */
    }

    .overlay .subtitle {
        font-size: 0.65rem; /* Further reduced to prevent truncation on all mobile screens */
        letter-spacing: 0.12em; /* Tighter spacing to fit mobile width */
    }

    .info-content {
        width: 70vw;  /* Even smaller to give breathing room */
        height: 70vw;
        max-width: 350px;  /* Reduced for better fit */
        max-height: 350px;
        padding: 1rem;  /* Minimal padding to maximize space */
    }

    .artist-name-image {
        width: 50%;  /* Much smaller for better fit */
        max-width: 150px;  /* Reduced max width */
        margin: 0 auto 1rem auto;  /* Center with auto margins */
        display: block;  /* Ensure block display for centering */
        filter: brightness(0) invert(1);  /* Convert to white */
    }

    .bio {
        display: none;  /* Hide bio on mobile to save space */
    }

    .links-section {
        margin-bottom: 1rem;  /* Reduced spacing between sections */
    }

    .links-section h3 {
        font-size: 0.7rem;  /* Slightly smaller */
        margin-bottom: 0.4rem;  /* Reduced margin */
    }

    .links {
        gap: 0.6rem;  /* Reduced gap between links */
    }

    .links a {
        font-size: 0.7rem;  /* Smaller link text */
        padding: 0.25rem 0.6rem;  /* Smaller padding */
    }

    .store-link {
        margin-top: 1.5rem;  /* Reduced from 2rem */
    }

    .store-button {
        padding: 0.8rem 1.5rem;  /* Smaller button */
        font-size: 0.9rem;  /* Smaller text */
    }

    .spinning-lp {
        width: 90vw;
        height: 90vw;
        max-width: 500px;
        max-height: 500px;
    }
}
