:root {
    --bg-color: #0b0b0b;
    --text-color: #f5f5f7;
    --accent-color: #007aff;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.loader-content h1 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    font-weight: 400;
    letter-spacing: -0.02em;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 1rem;
}

#progress-fill {
    width: 0%;
    height: 100%;
    background-color: var(--text-color);
    transition: width 0.3s ease;
}

#loader-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

.scroll-container {
    height: 600vh; /* Controla la velocidad del scroll */
    position: relative;
    background-color: #000;
}

.sticky-wrapper {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

canvas {
    width: 100vw;
    height: 100vh;
    display: block;
}

.ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: 10;
}

.section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    padding: 2rem;
}

.section.active {
    pointer-events: all;
}

/* Hero Section */
.hero h1 {
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 3rem;
}

.scroll-arrow {
    position: absolute;
    bottom: 10vh;
    font-size: 2rem;
    animation: arrowPulse 2s infinite ease-in-out;
}

@keyframes arrowPulse {
    0%, 100% { transform: translateY(0) scale(1.1); opacity: 0.5; }
    50% { transform: translateY(15px) scale(0.9); opacity: 1; }
}

/* Gallery Section */
.gallery {
    justify-content: center;
    overflow: hidden;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    width: 90%;
    max-width: 1400px;
    padding: 20px;
}

.grid-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    background-color: rgba(255, 255, 255, 0.05);
    aspect-ratio: 9/16;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Since grid items match image ratio 9:16, cover is safe */
    display: block;
}

/* Staggered Desktop Layout */
.item-1 { transform: translateY(-30px); }
.item-2 { transform: translateY(30px); }
.item-3 { transform: translateY(-50px); }
.item-4 { transform: translateY(50px); }
.item-5 { transform: translateY(0); }

/* Tablet Layout (up to 1024px) */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        width: 80%;
    }
    .grid-item {
        transform: none !important;
    }
}

/* Mobile Layout (up to 600px) */
@media (max-width: 600px) {
    .gallery-grid .grid-item:not(:first-child) {
        display: none;
    }

    /* Opcional: ajustar la imagen única para que ocupe mejor el espacio */
    .gallery-grid {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        max-width: 300px; /* Ajusta según prefieras */
        margin: 0 auto;
    }

    .grid-item {
        width: 100%;
        transform: none !important;
        margin: 0 auto;
    }
    .hero h1 { font-size: 3rem; }
    .hero p { font-size: 1.1rem; }
    .footer h2 { font-size: 2.5rem; }
}

/* Footer Section */
.footer h2 {
    font-size: 4rem;
    margin-bottom: 2rem;
}

.shop-btn {
    padding: 1.2rem 3rem;
    background-color: var(--text-color);
    color: var(--bg-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
    border-radius: 50px;
    transition: transform 0.3s ease, background-color 0.3s ease;
    margin-bottom: 3rem;
}

.shop-btn:hover {
    transform: scale(1.05);
    background-color: var(--accent-color);
    color: #fff;
}

.social-links {
    display: flex;
    gap: 2rem;
}

.social-icon {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.social-icon:hover {
    color: #fff;
}
