/* Si el JS tarda más de 3 segundos, mostramos todo por seguridad */
.reveal,
#hero-title,
#hero-desc,
nav {
    animation: fallback-reveal 0.5s forwards;
    animation-delay: 0.3s;
}

@keyframes fallback-reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

:root {
    --black: #050505;
    --gray: #111111;
    --white: #ffffff;
    --accent: #888888;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--black);
    color: var(--white);
    font-family: 'Inter', Helvetica, Arial, sans-serif;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Canvas Geométrico */
#canvas-bg {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
    opacity: 0.3;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Navegación */
nav {
    padding: 2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    z-index: 100;
    background: rgba(5, 5, 5, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
}

.logo {
    font-weight: 600;
    letter-spacing: 3px;
    font-size: 1.2rem;
    font-family: 'Jost';
}

.btn-booking {
    font-weight: 300;
    border: 1px solid var(--white);
    padding: .5rem 1rem;
    text-decoration: none;
    color: var(--white);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: 0.3s;
    color: inherit;
    user-select: none;
    /* Evita selecciones en iOS */
}

.btn-booking:hover,
.btn-booking:active {
    /* Soporte touch */
    background: var(--white);
    color: var(--black);
}

/* Hero */
header {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 8%;
}

header h1 {
    font-family: 'Jost';
    font-size: clamp(2rem, 8vw, 5.5rem);
    font-weight: 100;
    letter-spacing: 8px;
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 25px;
    opacity: 0;
    transition: color 0.2s;
}

header h1:hover,
header h1:active {
    -webkit-text-stroke: 1px var(--white);
    color: transparent;
}

header p {
    color: var(--accent);
    max-width: 550px;
    font-weight: 300;
    font-size: clamp(0.9rem, 2vw, 1.05rem);
    opacity: 0;
}

/* scroll text */
.scroll-indicator {
    position: relative;
    margin-top: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    transition: opacity 0.5s ease;
}

.scroll-text {
    font-family: 'Jost', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 5px;
    color: #ffffff;
    /* Color sutil */
    text-transform: uppercase;
}

/* La línea animada */
.scroll-line {
    width: 1px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    /* Color del brillo que cae */
    animation: scroll-anim 2s cubic-bezier(0.76, 0, 0.3, 1) infinite;
}

@keyframes scroll-anim {
    0% {
        transform: translateY(-100%);
    }

    50% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(100%);
    }
}

/* Secciones Generales */
section {
    padding: 80px 5%;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.6rem;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 40px;

    opacity: 9.5;
}

/* Galería Responsiva */
.gallery-btn {
    font-size: 0.9rem;
    color: #ffffff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 1px solid var(--text-color);
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.gallery-btn:hover {
    background-color: var(--text-color);
    color: var(--accent);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.work-item {
    aspect-ratio: 1 / 1;
    background: var(--gray);
    overflow: hidden;
    opacity: 0;
}

.work-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

.work-item:hover img,
.work-item:active img {
    /* Soporte touch */
    filter: grayscale(0%) contrast(1.1);
    transform: scale(1.05);
}

/* Video Section */
#video-section {
    padding: 0;
    width: 100%;
    overflow: hidden;
}

.video-container {
    width: 100%;
    height: 450px;
    background: var(--gray);
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* About Section */
#about {
    max-width: 900px;
}

#about h2 {
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 200;
    margin-bottom: 20px;
}

#about p {
    color: var(--accent);
    font-size: 1.1rem;
    max-width: 700px;
}


footer {
    text-align: center;
    padding: 3rem;
    border-top: 1px solid var(--accent-color);
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Fallback CSS (si JS tarda más de 3 segundos) */
.reveal,
#hero-title,
#hero-desc,
nav {
    animation: fallback-reveal 0.5s forwards;
    animation-delay: 3s;
}

@keyframes fallback-reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Breakpoints Mejorados */
@media (max-width: 767px) {

    /* Móvil */
    nav {
        padding: 15px 5%;
        flex-direction: column;
        gap: 10px;
    }

    .logo {
        font-size: 0.8rem;
    }

    header {
        padding: 0 5%;
        height: 90vh;
    }

    header h1 {
        font-size: clamp(1.5rem, 10vw, 3rem);
        letter-spacing: 4px;
    }

    header p {
        font-size: 0.9rem;
    }

    section {
        padding: 50px 5%;
    }

    .section-title {
        margin-bottom: 30px;
    }

    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 10px;
    }

    .video-container {
        height: 250px;
    }

    #about h2 {
        font-size: 1.5rem;
    }

    footer {
        padding: 40px 5%;
        font-size: 0.6rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {

    /* Tablet */
    nav {
        padding: 25px 5%;
    }

    header {
        padding: 0 10%;
    }

    section {
        padding: 100px 8%;
    }

    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }

    .video-container {
        height: 350px;
    }
}

@media (min-width: 1024px) {

    /* Desktop */
    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    header {
        padding: 0 15%;
    }
}

/* FOOTER */
        footer {
            text-align: center;
            padding: 3rem;
            border-top: 1px solid var(--accent-color);
            font-size: 0.8rem;
            color: #666;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        /* RESPONSIVE */
        @media (max-width: 768px) {
            .gallery-grid {
                column-count: 2;
            }
            .gallery-title {
                font-size: 2rem;
            }
        }
        @media (max-width: 480px) {
            .gallery-grid {
                column-count: 1;
            }
        }