@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;700&display=swap");
@import url("https://fonts.cdnfonts.com/css/thegoodmonolith");

#inpal-wrapper {
    --color-offwhite: #ffffff;
    --color-offblack: #000000;
    --color-offblack-transparent: rgba(48, 43, 39, 0.2);
    --color-overlay-dark: rgba(0, 0, 0, 0.4);
    --font-main: "Inter", sans-serif;
    --font-mono: "TheGoodMonolith", sans-serif;
    --transition-smooth: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-elastic: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* RESET MEJORADO - SIN FORZAR COLOR ÚNICO */
#inpal-wrapper *,
#inpal-wrapper *::before,
#inpal-wrapper *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
}

/* COLOR BASE PARA TEXTOS */
#inpal-wrapper {
    color: #000000;

    /* Color por defecto, pero modificable */
}

/* Estilos específicos para cada tipo de texto */
#inpal-wrapper .title {
    color: #000000;

    /* Ahora puedes cambiar solo esto */
}

#inpal-wrapper .subtitle {
    color: #000000;

    /* Ahora puedes cambiar solo esto */
}

#inpal-wrapper .date {
    color: #000000;

    /* Ahora puedes cambiar solo esto */
}

#inpal-wrapper .credits {
    color: #000000;

    /* Ahora puedes cambiar solo esto */
}

#inpal-wrapper .credits p {
    color: inherit;

    /* Hereda el color de .credits */
}

/* CORREGIR ESPACIADO DEL TEXTO DEL FOOTER */
#inpal-wrapper .footer-content .credits p:first-child {
    margin-bottom: 0.1rem !important;
    text-align: center;
}

/* SEPARAR SOLO EL TEXTO Back to Work */
#inpal-wrapper .credits p:first-child {
    margin-bottom: 5rem;

    /* ← Cambia este valor para más/menos espacio */
    display: block;
}

/* Margen extra */
#inpal-wrapper .credits p:not(:first-child) {
    margin-bottom: 0.1rem;

    /* Espacio normal entre botones */
}

#inpal-wrapper .quote {
    color: #000000;

    /* Ahora puedes cambiar solo esto */
}

#inpal-wrapper .quote p {
    color: inherit;

    /* Hereda el color de .quote */
}

#inpal-wrapper .header-credits p:first-child {
    margin-bottom: 5rem;
}

#inpal-wrapper .footer-text p:first-child {
    margin-bottom: 3px;
}

#inpal-wrapper .footer-text p:nth-child(2) {
    margin-bottom: 1.5rem;
}

#inpal-wrapper .caption {
    color: #ffffff;

    /* Este ya es diferente para el overlay */
}

#inpal-wrapper .video-overlay .content p {
    color: #ffffff;

    /* Blanco para el overlay */
}

#inpal-wrapper .video-overlay .content h2 {
    color: #ffffff;

    /* Blanco para el overlay */
}

/* Enlaces y botones */
#inpal-wrapper a {
    color: #000000;
    text-decoration: none;
    font-size: 17px;
}

/* Puedes cambiar este color */
#inpal-wrapper button {
    color: #000000;
}

/* BOTÓN SOLO PARA "Back to work HEAD" */
#inpal-wrapper .credits .btn-back-to-work {
    display: block;
    padding: 12px 30px;
    border: 1px solid #000000;
    background: transparent;
    color: #000000;
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s var(--transition-smooth);
}

#inpal-wrapper .credits .btn-back-to-work:hover {
    background: #000000;
    color: #f8f6f2;
    transform: translateY(-2px);
}

/* FIN BOTÓN */
/* BTN FOOTER BACK TO WORK */
#inpal-wrapper .footer-text .btn-back-to-work {
    display: block;
    text-align: center;
    margin-top: 3rem;

    /* Espacio arriba del botón */
}

#inpal-wrapper {
    font-family: var(--font-main);
    background-color: var(--color-offwhite);
    color: var(--color-offblack);
    overflow-x: hidden;
    letter-spacing: -0.02em;
    font-weight: 700;
}

#inpal-wrapper::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    /* Texture Backgroud */
    /* background-image: url("https://traumaxp.com/v3good/img/texture-portafolio.png"); */
    background-repeat: repeat;
    opacity: 0.5;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 999;
}

#inpal-wrapper .grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
    padding: 0 2rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

#inpal-wrapper .container {
    height: 100vh;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
    padding: 2rem;
    align-items: center;
    justify-items: center;
    perspective: 800px;
}

#inpal-wrapper .header-content {
    grid-column: 4 / span 6;
    text-align: center;
    transform-style: preserve-3d;
}

#inpal-wrapper .header-content > * {
    transform-style: preserve-3d;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform-origin: center top;
}

/* ESTILOS PARA EL LOGO */
#inpal-wrapper .logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
}

#inpal-wrapper .logo-image {
    width: 300px;

    /* Tamaño inicial - MODIFICA ESTE VALOR */
    height: auto;

    /* Mantiene proporción */
    max-width: 100%;

    /* Responsive */
}

/* TAMAÑOS RESPONSIVE */
@media (max-width: 768px) {
    #inpal-wrapper .logo-image {
        width: 150px;

        /* Más pequeño en móviles */
    }
}

@media (max-width: 480px) {
    #inpal-wrapper .logo-image {
        width: 120px;

        /* Móviles muy pequeños */
    }
}

#inpal-wrapper .subtitle {
    margin-bottom: 3rem;
    font-size: 1.5rem;
    text-transform: uppercase;
}

#inpal-wrapper .date {
    margin: 3rem 0;
    font-size: 1rem;
    font-family: var(--font-main);
}

#inpal-wrapper .credits {
    margin-top: 3rem;
    text-transform: uppercase;
    font-size: 0.8rem;
    font-family: 'poppins-bold',;
    grid-column: 4 / span 6;
}

#inpal-wrapper .scroll-container {
    position: relative;
    height: 120vh;

    /* antes era 300vh */
}

#inpal-wrapper .video-wrapper {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

#inpal-wrapper #video-container {
    width: 300px;
    height: 300px;
    overflow: hidden;
    background-color: var(--color-offblack);
    position: relative;
    transition: border-radius 0.3s ease;
    filter: blur(0px);
    -webkit-clip-path: inset(0 0 0 0);
    clip-path: inset(0 0 0 0);
}

#inpal-wrapper #video-container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    transition: background-color 0.3s ease;
    pointer-events: none;
}

#inpal-wrapper video {
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
    object-fit: cover;
    position: relative;
    z-index: 0;
}

#inpal-wrapper .video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-offblack-transparent);
    color: var(--color-offwhite);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    -webkit-clip-path: inset(100% 0 0 0);
    clip-path: inset(100% 0 0 0);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    z-index: 2;
}

#inpal-wrapper .video-overlay .caption {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
    transform: translateY(30px);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: absolute;
    top: 2rem;
    left: 0;
    width: 100%;
    text-align: center;
}

#inpal-wrapper .video-overlay .content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    filter: blur(10px);
    transform: scale(1.1);
    opacity: 1;
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
}

#inpal-wrapper .video-overlay h2 {
    font-size: 2.4rem;
    margin-bottom: 0.5rem;
    transform: translateY(30px);
    text-transform: uppercase;
}

#inpal-wrapper .video-overlay p {
    font-size: 1.2rem;
    line-height: 1.8;
    max-width: 32ch;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
    transform: translateY(30px);
}

/* /////////////////////////////////////////////// */
/* Spacer de enmedio - con ID único */
#middle-spacer {
    height: 10vh;
}

/* Spacer del footer */
.footer.spacer {
    height: 5vh;
}

/* /////////////////////////////////////////////// */
#inpal-wrapper .case-footer {
    padding: 10rem 0;
    text-align: center;
    margin: 0 auto;
}

#inpal-wrapper .quote {
    margin-bottom: 3rem;
    line-height: 1.8;
    grid-column: 4 / span 6;
}

#inpal-wrapper .quote p {
    margin-bottom: 1.5rem;
    max-width: 32ch;
    margin-left: auto;
    margin-right: auto;
}

#inpal-wrapper .divider {
    width: 1px;
    height: 80px;
    background-color: var(--color-offblack);
    margin: 4rem auto;
    grid-column: 6 / span 2;
}

#portfolio-wrapper .portfolio-showcase {
    height: 50vh;
    position: relative;
    -webkit-clip-path: inset(100% 0 0 0);
    clip-path: inset(100% 0 0 0);
    overflow: hidden;
}

#portfolio-wrapper .portfolio-showcase video {
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
    object-fit: cover;
}

#portfolio-wrapper .portfolio-showcase .contact-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
    color: var(--color-offwhite);
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: auto;
}

#portfolio-wrapper .portfolio-showcase .contact-btn .label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    letter-spacing: 0.05em;
}

#portfolio-wrapper .portfolio-showcase .contact-btn .email-container {
    position: relative;
    display: inline-block;
}

#portfolio-wrapper .portfolio-showcase .contact-btn .email {
    font-size: 0.9rem;
    padding: 0 0.6em;
    position: relative;
    display: inline-block;
}

#portfolio-wrapper .portfolio-showcase .contact-btn .left-bracket,
#portfolio-wrapper .portfolio-showcase .contact-btn .right-bracket {
    transition: opacity 0.3s var(--transition-elastic),
    transform 0.3s var(--transition-elastic);
}

#portfolio-wrapper .portfolio-showcase .contact-btn .left-bracket {
    margin-right: 3px;
}

#portfolio-wrapper .portfolio-showcase .contact-btn .right-bracket {
    margin-left: 3px;
    transition-delay: 0.15s;
}

/* Ajustes del texto de inicio en mobile */
@media (max-width: 768px) {
    #inpal-wrapper .header-content .title {
        font-size: clamp(2.4rem, 7vw, 3.2rem);
        line-height: 1.1;
    }

    #inpal-wrapper .header-content .subtitle {
        font-size: clamp(1.3rem, 4.5vw, 2rem);
        line-height: 1.3;
    }

    #inpal-wrapper .header-content .date {
        font-size: clamp(1rem, 3.5vw, 1.3rem);
        margin-top: 0.6rem;
    }

    #inpal-wrapper .header-content .credits p {
        font-size: clamp(0.9rem, 3vw, 1.2rem);
        line-height: 1.2;
    }
}

/* Footer Video */
#portfolio-wrapper {
    width: 100%;
    height: 550px;
    overflow: hidden;
}

/* Páginas sin video */
#portfolio-wrapper.no-video {
    height: auto;

    /* ajustar altura */
    overflow: visible;
}

/* Para imsgen del footer */
#portfolio-wrapper img,
#portfolio-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* QR TEKA HEADER */
#inpal-wrapper .header-content .credits img {
    width: 130px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* QR TEKA FOOTER */
.qr-link {
    display: block;
    text-align: center;
}

.qr-teka {
    width: 180px;
    height: auto;
}