/*--------------------------------------------------
	Showcase Portfolio
---------------------------------------------------*/


body {
    background-color: #171717;
    font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
}




.container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    overflow: hidden;
}

.box_head {
    background-color: #171717;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: absolute;
    inset: 0;
    z-index: 2;
}

/* Titulo y Subtitulo */
.hero {
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
}

/* Fondo imagen */
.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.dynamic-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* filter: grayscale(60%); */
    /* opacity: 0.02; */
}

/* Cada palabra como “caja” controlable */
.hero-word {
    display: block;
    width: fit-content;
    /* la caja se adapta al texto */
    max-width: 100%;
}

/* Escalonado tipo MAGG*/
.w1 {
    padding-left: 5%;
    font-weight: 700;
    line-height: 0.92;
    font-size: 140px;
    color: #5a5a5a;
    text-transform: uppercase;
    z-index: 4;
}

.w2 {
    padding-left: 20%;
    font-weight: 200;
    line-height: 0.92;
    font-size: 140px;
    color: #5a5a5a;
    text-transform: uppercase;
    z-index: 4;
}

.w3 {
    /* padding-left: 15%; */
    align-self: center;
    margin-top: 6%;
    font-weight: 600;
    font-size: 240px;
    line-height: 250px;
    color: #ffffff;
}

.hero-headline {
    margin-top: 20%;
    width: 100%;
    height: 100vh;
    padding-left: 0;
    /* mueve el conjunto a la izquierda con margen cómodo */
    display: flex;
    flex-direction: column;
    gap: 0.18em;
}

.hero-tagline {
    align-self: center;
    margin-top: 0;
    max-width: 50%;
    text-align: center;
    font-size: 24px;
    font-weight: 300;
    line-height: 1.35;
    color: rgba(255, 255, 255, .78);
    letter-spacing: 0.04em;
}

.tagline-mask {
    display: block;
    overflow: hidden;
}

.slog_line {
    display: inline-block;
    transform: translateY(120%);
    opacity: 0;
    animation: taglineRevealMagg 1.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.tagline-mask:nth-child(1) .slog_line {
    animation-delay: 0.45s;
}

.tagline-mask:nth-child(2) .slog_line {
    animation-delay: 0.68s;
}

.tagline-mask:nth-child(3) .slog_line {
    animation-delay: 0.81s;
    font-family: "PPEditorial_New", sans-serif;
    font-weight: 200;
    letter-spacing: 3px;
}

@keyframes taglineRevealMagg {
    from {
        transform: translateY(120%);
        opacity: 0;
    }

    to {
        transform: translateY(0%);
        opacity: 1;
    }
}

.slog_sub2 {
    font-family: "PPEditorial_New", sans-serif;
    font-weight: 200;
    letter-spacing: 2px;
}

.hero-word .char {
    display: inline-block;
    will-change: transform, filter, opacity;
}

/* =========================================
   MEDIA QUERY <= 1200px
   (tablets / laptops pequeños)
========================================= */
@media (max-width: 1640px) {

    .hero {
        height: 100%;
        align-items: center;
    }

    .hero-headline {
        margin-top: 0;
        height: auto;
        /* evita “doble 100vh” raro */
        gap: 0.14em;
    }

    .w1 {
        padding-left: 4%;
        font-size: 76px;
    }

    .w2 {
        padding-left: 14%;
        font-size: 76px;
    }

    .w3 {
        margin-top: 3%;
        font-size: 150px;
        line-height: 1;
    }

    .hero-tagline {
        margin-top: 16px;
        max-width: 760px;
        font-size: 18px;
        line-height: 1.35;
        letter-spacing: 0.03em;
    }

    .slog_sub2 {
        letter-spacing: 1.5px;
    }
}


/* =========================================
   MEDIA QUERY <= 420px
   (móvil)
========================================= */
@media (max-width: 420px) {

    .hero {
        height: 100%;
        align-items: center;
    }

    .hero-headline {
        margin-top: 100px;
        /* en móvil, mejor centrado real */
        height: 60vh;
        gap: 0.10em;
    }

    /* Mantén el look “escalonado” pero sin irse de pantalla */
    .w1 {
        padding-left: 6%;
        font-size: 42px;
        line-height: 0.98;
    }

    .w2 {
        padding-left: 12%;
        font-size: 42px;
        line-height: 0.98;
    }

    .w3 {
        align-self: center;
        margin-top: 20px;
        font-size: 60px;
        line-height: 0.98;
    }

    .hero-tagline {
        margin-top: 60px;
        max-width: 92%;
        font-size: 12px;
        line-height: 1.45;
        /* letter-spacing: 0.02em; */
    }

    .slog_sub2 {
        letter-spacing: 1px;
    }
}

/* --- */


/* ======================================
AJAX 
========================================*/

.portfolio-grid {
    background-color: #1a1c1e;
    border-top: 1px solid #2a2a2b;
    display: grid;
    grid-template-columns: repeat(14, 1fr);
    gap: clamp(40px, 6vw, 110px) clamp(24px, 4vw, 70px);
    padding: 8vw 10vw 12vh;
    align-items: start;
}

/* CAJA GENERAL DE CADA PROYECTO */

.box_ajax {
    position: relative;
    display: block;
}

/* POSICIONES INDIVIDUALES */

.box_ajax:nth-child(1) {
    grid-column: 1 / span 8;
}

.box_ajax:nth-child(1) .project-item {
    height: 800px;
}

.box_ajax:nth-child(2) {
    grid-column: 10 / span 5;
    margin-top: 230px;
}

.box_ajax:nth-child(2) .project-item {
    height: 350px;
}

.box_ajax:nth-child(3) {
    grid-column: 3 / span 10;
    margin-top: 0;
}

.box_ajax:nth-child(3) .project-item {
    height: 500px;
}

.box_ajax:nth-child(4) {
    grid-column: 1 / span 4;
    margin-top: 300px;
}

.box_ajax:nth-child(4) .project-item {
    height: 300px;
}

.box_ajax:nth-child(5) {
    grid-column: 6 / span 9;
    margin-top: 40px;
}

.box_ajax:nth-child(5) .project-item {
    height: 800px;
}

.box_ajax:nth-child(6) {
    grid-column: 1 / span 14;
    margin-top: 40px;
}

.box_ajax:nth-child(6) .project-item {
    height: 500px;
}

/* CONTENEDOR DE IMAGEN */

.project-item {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #1b1c1d;
}

/* ENLACE / CARD */

.project-card {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    color: white;
    text-decoration: none;
    background: #111;
    isolation: isolate;
}

/* IMAGEN */

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;

    filter: brightness(.72);

    transform: scale(1.130);
    transform-origin: center center;

    transition:
        transform 1s cubic-bezier(0.16, 1, 0.3, 1),
        filter .75s ease;

    will-change: transform, filter;
    backface-visibility: hidden;
}

/* HOVER */

.project-card:hover img {
    transform: scale(1.07);
    filter: brightness(.9);
}

/* OVERLAY OSCURO */

.project-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to top, rgba(0, 0, 0, .62), transparent 60%);
    pointer-events: none;
}

/* ===================================================== */
/* PROJECT INFO */
/* ===================================================== */

.project-info {
    position: relative;
    width: 100%;
    margin-top: 14px;
    z-index: 2;

    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.project-title-line {
    position: relative;
    display: flex;
    align-items: center;
    overflow: visible;
}

/* FLECHA */

.project-arrow {
    position: absolute;
    left: 0;
    top: 50%;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 50px;
    line-height: 1;
    color: #fff;

    opacity: 0;
    transform: translate(-26px, -50%) scale(.65) rotate(-8deg);
    transform-origin: center;

    pointer-events: none;

    transition:
        opacity .35s ease,
        transform .95s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-arrow img {
    width: 16px;
    height: 16px;
    display: block;
    object-fit: contain;
}

/* TITULO */

.project-title-line h2 {
    margin: 0;
    padding: 0;

    font-size: 24px;
    /* text-transform: uppercase; */
    line-height: 50px;
    font-weight: 200;
    color: #aaaaaa;

    transform: translateX(0);

    transition:
        transform .85s cubic-bezier(0.16, 1, 0.3, 1),
        color .45s ease;
}

/* HOVER IZQUIERDA */

.box_ajax:hover .project-arrow {
    opacity: 1;
    transform: translate(0, -50%) scale(1) rotate(0deg);
}

.box_ajax:hover .project-title-line h2 {
    transform: translateX(36px);
    color: #d0d0d0;
}

/* DERECHA */

.project-category {
    position: relative;
    top: 15px;
    height: 22px;
    min-width: 160px;
    overflow: hidden;
    text-align: right;
}

.project-category span {
    position: absolute;
    top: 0;
    right: 0;

    display: block;
    width: 100%;

    font-size: 14px;
    line-height: 18px;
    text-transform: uppercase;
    text-align: right;

    transition:
        transform .75s cubic-bezier(0.16, 1, 0.3, 1),
        opacity .45s ease;
}

.category-default {
    font-weight: 300;
    color: #858585;
    transform: translateY(0);
    letter-spacing: 1px;
    opacity: 1;
}

.category-hover {
    font-weight: 300;
    color: #F3BC44;
    transform: translateY(100%);
    letter-spacing: 1px;
    opacity: 0;
}

.box_ajax:hover .category-default {
    transform: translateY(-100%);
    opacity: 0;
}

.box_ajax:hover .category-hover {
    transform: translateY(0);
    opacity: 1;
}

/* ====================================== */

/* TRANSICIÓN AJAX */

.transition-frame {
    position: fixed;
    overflow: hidden;
    pointer-events: none;
    z-index: 9999;
    background: #111;
    will-change: top, left, width, height, opacity;
}

.transition-frame img {
    will-change: transform, filter;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.project-card.is-active-card {
    pointer-events: none;
}

.transition-mask {
    position: fixed;
    inset: 0;
    background: #070707;
    z-index: 9998;
    pointer-events: none;
    opacity: 0;
}

/* HERO PROYECTO */

.project-hero {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 0 5vw 10vh;
}

.project-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(.48);
    transform: scale(1.02);
    transform-origin: center center;
    z-index: 0;
}

.project-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to top, rgba(7, 7, 7, .9), rgba(7, 7, 7, .14), transparent);
}

/* ========================================
Esto es para la parte del video cargado
========================================= */
.video-wrapper {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.video-wrapper video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.project-hero-content {
    position: relative;
    z-index: 2;
}

/* ====================================== */

/* RESPONSIVE */

@media (max-width: 1200px) {
    .portfolio-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 40px;
        row-gap: 70px;
        padding: 10vw 8vw 10vh;
        align-items: start;
    }

    /* Reset limpio: todas las cards vuelven al flujo normal */
    .box_ajax:nth-child(n) {
        grid-column: auto;
        margin-top: 0;
    }

    /* Altura uniforme de todas las cards */
    .box_ajax:nth-child(n) .project-item {
        height: 330px;
    }

    /* Tipografía */
    .project-title-line h2 {
        font-size: 18px;
        line-height: 40px;
    }

    .project-info {
        margin-top: 14px;
    }

    .project-arrow img {
        width: 18px;
        height: 18px;
    }

}

@media (max-width: 420px) {

    .portfolio-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 60px;
        padding: 10vw 6vw 10vh;
        align-items: start;
    }

    /* Todas las cards vuelven al flujo normal */
    .box_ajax:nth-child(n) {
        grid-column: auto;
        margin-top: 5%;
    }

    /* Las dos primeras sin separación superior */
    .box_ajax:nth-child(1),
    .box_ajax:nth-child(2) {
        margin-top: 0;
    }

    /* Altura uniforme */
    .box_ajax:nth-child(n) .project-item {
        height: 400px;
    }

    /* Evita posibles desbordamientos */
    .project-item {
        overflow: hidden;
    }

    .project-card img,
    .project-card video {
        width: 100%;
        max-width: 100%;
    }

    /* Tipografía */
    .project-title-line h2 {
        font-size: 18px;
        line-height: 20px;
        font-weight: 400;
        letter-spacing: 0.02em;
    }

    .project-info {
        margin-top: 14px;
    }

    .project-arrow img {
        width: 14px;
        height: 14px;
    }

    .project-category {
        font-size: 14px;
        top: 0;
    }

    .box_ajax:hover .project-title-line h2 {
        transform: translateX(26px);
    }

}

/* ===============================
//AJAX 
=================================*/