/* ============================================================
   RESET GENERAL
============================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    width: 100%;
    max-width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
}

body {
    background: #020202;
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    color: #fff;
}


/* ============================================================
   NAVBAR — LOGO
============================================================ */

.logo-recortado {

    width: 220px;
    height: 70px;

    object-fit: cover;

    clip-path: inset(10px 0 10px 0);

    display: block;
}


/* ============================================================
   NAVBAR — CELULAR
============================================================ */

@media (max-width: 768px) {

    .logo-recortado {

        width: 120px !important;
        height: 55px !important;

        object-fit: cover;

        clip-path: inset(8px 0 8px 0);

        display: block;
    }

}


/* ============================================================
   HERO
============================================================ */

.hero-section {

    position: relative;

    width: 100%;
    height: 100vh;
    min-height: 600px;

    display: flex;

    justify-content: center;
    align-items: center;

    background: #000;

    overflow: hidden;
    line-height: 0;
}


/* ============================================================
   VIDEO HERO
============================================================ */

.logo-video {

    width: 600px;
    max-width: 100vw;

    height: auto;

    object-fit: contain;

    display: block;

    transform: scale(1.01);

    clip-path: inset(0 0 6px 0);
}


/* ============================================================
   TABLETS
============================================================ */

@media (max-width: 992px) {

    .hero-section {

        width: 100%;

        height: 100vh;
        height: 100svh;

        min-height: 100svh;

        display: flex;

        align-items: center;
        justify-content: center;
    }

    .logo-video {

        width: min(520px, 90vw);

        max-width: 90vw;

        height: auto;
    }

}


/* ============================================================
   CELULARES
============================================================ */

@media (max-width: 768px) {

    .hero-section {

        width: 100%;

        height: 100vh;
        height: 100svh;

        min-height: 100svh;

        display: flex;

        align-items: center;
        justify-content: center;

        overflow: hidden;
    }

    .logo-video {

        width: 90vw;

        max-width: 90vw;

        height: auto;

        object-fit: contain;

        transform: scale(1.01);
    }

}


/* ============================================================
   CELULARES PEQUEÑOS
============================================================ */

@media (max-width: 480px) {

    .hero-section {

        width: 100%;

        height: 100vh;
        height: 100svh;

        min-height: 100svh;
    }

    .logo-video {

        width: 92vw;

        max-width: 92vw;

        height: auto;
    }

}


/* ============================================================
   CELULARES MUY PEQUEÑOS
============================================================ */

@media (max-width: 360px) {

    .hero-section {

        height: 100vh;
        height: 100svh;

        min-height: 100svh;
    }

    .logo-video {

        width: 94vw;

        max-width: 94vw;
    }

}


/* ============================================================
   PORTAFOLIO — SECTION
============================================================ */

.portfolio-section {

    width: 100%;
    max-width: 1600px;

    margin: auto;

    padding: 80px 20px;

    background:
        radial-gradient(
            circle at top,
            rgba(255, 196, 0, .08),
            transparent 30%
        ),
        #020202;
}


/* ============================================================
   HEADER
============================================================ */

.portfolio-header {

    padding-top: 30px;

    text-align: center;

    margin-bottom: 50px;
}

.portfolio-header span {

    color: #c8a84f;

    font-size: 13px;

    letter-spacing: 3px;

    font-weight: 700;
}

.portfolio-header h2 {

    font-size: 70px;

    font-weight: 900;

    line-height: 1;

    margin-top: 5px;
}

.portfolio-header p {

    margin-top: 10px;

    color: #b8b8b8;

    font-size: 15px;
}


/* ============================================================
   GRID
============================================================ */

.portfolio-grid {

    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 16px;

    max-width: 1400px;

    margin: 0 auto;

    padding: 0 40px;
}


/* ============================================================
   CARD
============================================================ */

.portfolio-card {

    position: relative;

    aspect-ratio: 3 / 4;

    overflow: hidden;

    cursor: pointer;

    background: #111;

    border-radius: 18px;
}

.portfolio-card img,
.portfolio-card video {

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: .4s;
}

.portfolio-card:hover img,
.portfolio-card:hover video {

    transform: scale(1.08);
}

.portfolio-card video {

    position: absolute;

    inset: 0;
}


/* ============================================================
   OVERLAY
============================================================ */

.overlay {

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            to top,
            rgba(0, 0, 0, .85),
            rgba(0, 0, 0, .15)
        );

    opacity: 0;

    transition: .3s;

    z-index: 1;
}

.portfolio-card:hover .overlay {

    opacity: 1;
}


/* ============================================================
   CONTENT
============================================================ */

.portfolio-content {

    position: absolute;

    bottom: 0;
    left: 0;

    width: 100%;

    padding: 15px;

    z-index: 2;

    opacity: 0;

    transform: translateY(15px);

    transition: .3s;
}

.portfolio-card:hover .portfolio-content {

    opacity: 1;

    transform: translateY(0);
}

.portfolio-content span {

    color: #d8b33c;

    font-size: 12px;

    font-weight: 600;
}

.bottom-content h3 {

    margin-top: 5px;

    font-size: 18px;

    line-height: 1.2;
}


/* ============================================================
   TABLET
============================================================ */

@media (max-width: 992px) {

    .portfolio-header h2 {

        font-size: 55px;
    }

    .portfolio-grid {

        grid-template-columns:
            repeat(3, 1fr);

        gap: 6px;
    }

}


/* ============================================================
   MÓVIL
============================================================ */

@media (max-width: 768px) {

    .portfolio-section {

        width: 100%;
        max-width: 100%;

        padding-top: 50px;
        padding-bottom: 30px;

        padding-left: 0 !important;
        padding-right: 0 !important;

        margin: 0 !important;
    }

    .portfolio-header {

        width: 100%;

        padding-left: 15px;
        padding-right: 15px;

        margin-bottom: 30px;
    }

    .portfolio-header h2 {

        font-size: 38px;
    }

    .portfolio-header p {

        font-size: 13px;
    }

    .portfolio-grid {

        display: grid;

        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        gap: 8px;

        width: 100%;

        max-width: 100%;

        margin: 0;

        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .portfolio-card {

        width: 100%;

        aspect-ratio: 3 / 4;

        border-radius: 12px;
    }

    .portfolio-card img,
    .portfolio-card video {

        width: 100%;
        height: 100%;

        object-fit: cover;
    }

    .overlay,
    .portfolio-content {

        display: none;
    }

}


/* ============================================================
   CELULAR PEQUEÑO
============================================================ */

@media (max-width: 480px) {

    .portfolio-header {

        padding-left: 12px;
        padding-right: 12px;
    }

    .portfolio-grid {

        padding-left: 12px !important;
        padding-right: 12px !important;
    }

}


/* ============================================================
   LIGHTBOX
============================================================ */

.portfolio-lightbox {

    position: fixed;

    inset: 0;

    width: 100%;
    height: 100%;

    background: rgba(0, 0, 0, .94);

    z-index: 99999;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 40px;

    opacity: 0;
    visibility: hidden;

    transition:
        opacity .35s ease,
        visibility .35s ease;
}

.portfolio-lightbox.active {

    opacity: 1;

    visibility: visible;
}


/* ============================================================
   LIGHTBOX CONTAINER
============================================================ */

.lightbox-container {

    width: min(1200px, 95vw);

    max-height: 85vh;

    display: grid;

    grid-template-columns:
        1.5fr
        1fr;

    background: #0b0b0b;

    border:
        1px solid
        rgba(255, 255, 255, .12);

    box-shadow:
        0 30px 100px
        rgba(0, 0, 0, .8);

    overflow: hidden;
}


/* ============================================================
   LIGHTBOX MEDIA
============================================================ */

.lightbox-media {

    min-height: 500px;

    background: #050505;

    display: flex;

    align-items: center;
    justify-content: center;

    overflow: hidden;
}

.lightbox-media video {

    width: 100%;
    height: auto;

    max-height: 85vh;

    object-fit: contain;

    display: block;
}

.lightbox-media img {

    width: 100%;
    height: 100%;

    max-height: 85vh;

    object-fit: contain;

    display: block;
}


/* ============================================================
   LIGHTBOX INFO
============================================================ */

.lightbox-info {

    padding: 55px 45px;

    display: flex;

    flex-direction: column;

    justify-content: center;

    color: #fff;
}

.lightbox-info span {

    color: #ffca36;

    font-size: 11px;

    font-weight: 600;

    letter-spacing: 3px;

    text-transform: uppercase;

    margin-bottom: 18px;
}

.lightbox-info h2 {

    color: #fff;

    font-size: clamp(30px, 4vw, 50px);

    line-height: 1.05;

    font-weight: 500;

    margin: 0 0 25px;
}

.lightbox-info p {

    color: #aaa;

    font-size: 15px;

    line-height: 1.8;

    margin: 0;
}


/* ============================================================
   BOTÓN CERRAR
============================================================ */

.close-lightbox {

    position: absolute;

    top: 25px;
    right: 35px;

    width: 45px;
    height: 45px;

    display: flex;

    align-items: center;
    justify-content: center;

    color: #fff;

    font-size: 36px;

    font-weight: 300;

    cursor: pointer;

    z-index: 100;

    transition:
        color .3s ease,
        transform .3s ease;
}

.close-lightbox:hover {

    color: #ffca36;

    transform: rotate(90deg);
}


/* ============================================================
   LIGHTBOX TABLET
============================================================ */

@media (max-width: 1000px) {

    .lightbox-container {

        grid-template-columns:
            1.2fr
            1fr;
    }

    .lightbox-info {

        padding: 35px 30px;
    }

    .lightbox-info h2 {

        font-size: 32px;
    }

}


/* ============================================================
   LIGHTBOX MÓVIL
============================================================ */

@media (max-width: 700px) {

    .portfolio-lightbox {

        padding: 20px;
    }

    .lightbox-container {

        width: 100%;

        max-height: 90vh;

        grid-template-columns: 1fr;

        overflow-y: auto;
    }

    .lightbox-media {

        height: 42vh;

        min-height: 0;
    }

    .lightbox-media img,
    .lightbox-media video {

        max-height: 42vh;
    }

    .lightbox-info {

        padding: 30px 25px;
    }

    .lightbox-info span {

        font-size: 10px;

        letter-spacing: 2px;

        margin-bottom: 12px;
    }

    .lightbox-info h2 {

        font-size: 30px;

        margin-bottom: 18px;
    }

    .lightbox-info p {

        font-size: 14px;

        line-height: 1.7;
    }

    .close-lightbox {

        top: 8px;

        right: 12px;

        width: 40px;
        height: 40px;

        font-size: 30px;
    }

}


/* ============================================================
   CELULAR MUY PEQUEÑO — LIGHTBOX
============================================================ */

@media (max-width: 400px) {

    .lightbox-info {

        padding: 25px 20px;
    }

    .lightbox-info h2 {

        font-size: 26px;
    }

}


/* ============================================================
   ANIMACIÓN DE CARGA
============================================================ */

body {

    animation: pageFade 1s ease forwards;
}

.portfolio-header {

    opacity: 0;

    transform: translateY(40px);

    animation:
        headerReveal 1s ease forwards;

    animation-delay: .2s;
}

.portfolio-card {

    opacity: 0;

    transform:
        translateY(80px)
        scale(.95);
}


/* ============================================================
   CARDS REVEAL
============================================================ */

.portfolio-card.show {

    opacity: 1;

    transform:
        translateY(0)
        scale(1);

    transition:
        .8s cubic-bezier(.22, 1, .36, 1);
}


/* ============================================================
   DELAYS
============================================================ */

.portfolio-card:nth-child(1) {
    transition-delay: .1s;
}

.portfolio-card:nth-child(2) {
    transition-delay: .2s;
}

.portfolio-card:nth-child(3) {
    transition-delay: .3s;
}

.portfolio-card:nth-child(4) {
    transition-delay: .4s;
}

.portfolio-card:nth-child(5) {
    transition-delay: .5s;
}

.portfolio-card:nth-child(6) {
    transition-delay: .6s;
}

.portfolio-card:nth-child(7) {
    transition-delay: .7s;
}

.portfolio-card:nth-child(8) {
    transition-delay: .8s;
}

.portfolio-card:nth-child(9) {
    transition-delay: .9s;
}


/* ============================================================
   KEYFRAMES
============================================================ */

@keyframes pageFade {

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes headerReveal {

    from {

        opacity: 0;

        filter: blur(10px);

        transform: translateY(50px);
    }

    to {

        opacity: 1;

        filter: blur(0);

        transform: translateY(0);
    }
}