@charset "utf-8";

/* WOOHU STUDIO — RESPONSIVE
   Importar DESPUÉS de styles.css.
   Mantiene desktop intacto; ajusta tablet, mobile y accesibilidad.
-------------------------------------------------- */

/* TABLETS Y ESCRITORIOS MEDIANOS (hasta 1199px)
-------------------------------------------------- */

@media (min-width: 768px) and (max-width: 1199px) {

    .brand-logo,
    .lightbox-logo {
        width: 14rem;
    }

    .story-copy {
        max-width: min(52rem, 48vw);
    }

    .story-copy h1 {
        font-size: clamp(6.4rem, 8vw, 9rem);
    }

    .story-copy h2 {
        font-size: clamp(5.4rem, 6.5vw, 7.2rem);
    }

    .story-copy p {
        font-size: 1.8rem;
        margin-top: 3.5rem;
    }

    /* Reservar el tercio superior para el texto sin invadir las cápsulas. */
    .services-copy {
        top: 30dvh;
        max-width: 42vw;
    }

    .services-cloud {
        --service-gap: 1.6rem;
        --service-size: min(15vw, calc((100dvh - 11rem - var(--service-gap) - var(--service-gap)) / 3));
    }

    .service-pill {
        font-size: clamp(1.65rem, 1.9vw, 2.3rem);
    }

    .portfolio-heading h2 {
        font-size: clamp(4.6rem, 5vw, 6rem);
    }

    .portfolio-heading p {
        font-size: 2.1rem;
    }

    .portfolio-content {
        padding-top: 12dvh;
    }

    .carousel-viewport {
        margin-top: 4rem;
    }

    .project-thumb {
        flex-basis: calc((100% - 2 * var(--thumb-gap)) / 2.15);
    }

    .contact-scene h2 {
        font-size: clamp(6rem, 7vw, 8rem);
    }

    .contact-card {
        padding: 3.8rem;
    }

    .contact-email {
        font-size: clamp(2.7rem, 3.4vw, 4rem);
    }

    .social-icons a {
        width: 5.5rem;
        height: 5.5rem;
        flex-basis: 5.5rem;
    }
}

/* MOBILE VERTICAL — hasta 767px
-------------------------------------------------- */

@media (max-width: 767px) {

    :root {
        --side: 5vw;
        --thumb-gap: 1.5rem;
    }

    /* La duración física del relato coincide con 100dvh en JS. */
    .story {
        height: 1120vh;
        height: 1120dvh;
    }

    .video-world {
        height: 175dvh;
    }

    .brand-logo {
        width: 12.5rem;
        top: 3.5dvh;
    }

    .story-copy {
        left: var(--side);
        right: var(--side);
        max-width: none;
    }

    .story-copy h1 {
        font-size: clamp(5.1rem, 12.4vw, 8.5rem);
    }

    .story-copy h2 {
        font-size: clamp(4.3rem, 10.8vw, 7rem);
    }

    .story-copy p {
        font-size: 1.7rem;
        line-height: 1.38;
        max-width: 90vw;
        margin-top: 2.5rem;
    }

    .hero-copy {
        top: 54dvh;
    }

    .about-copy {
        top: 40dvh;
    }

    /* Servicios: copy arriba y cápsulas en la zona inferior.
       Se conservan las 3 columnas escalonadas 2 / 3 / 2. */
    .services-copy {
        top: 16dvh;
    }

    .services-cloud {
        inset: auto var(--side) 5dvh var(--side);
        height: 43dvh;
        --service-gap: .8rem;
        --service-size: min(
            calc((90vw - var(--service-gap) - var(--service-gap)) / 3),
            calc((43dvh - var(--service-gap) - var(--service-gap)) / 3)
        );
        --service-step: calc(var(--service-size) + var(--service-gap));
        --service-span: calc(var(--service-size) * 3 + var(--service-gap) * 2);
        --service-left: calc((100% - var(--service-span)) / 2);
        --service-middle: calc(var(--service-left) + var(--service-step));
        --service-right: calc(var(--service-middle) + var(--service-step));
    }

    .service-pill {
        min-width: 0;
        border-radius: 25%;
        font-size: clamp(1.2rem, 3.5vw, 1.6rem);
        padding: .35rem;
        overflow-wrap: break-word;
    }

    .pill-editorial {
        top: 0;
    }

    .pill-packaging {
        top: var(--service-step);
    }

    .pill-motion {
        top: calc(var(--service-step) * 2);
    }

    .pill-web {
        top: 17%;
    }

    .pill-ux {
        top: calc(17% + var(--service-step));
    }

    .pill-branding {
        top: 30%;
    }

    .pill-logo {
        top: calc(30% + var(--service-step));
    }

    /* Portafolio: título, texto y flechas no se pisan. */
    .portfolio-content {
        padding-top: 12dvh;
    }

    .portfolio-heading {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 1.4rem;
    }

    .portfolio-heading h2 {
        font-size: clamp(3.5rem, 8.5vw, 5.6rem);
    }

    .portfolio-heading p {
        font-size: 1.7rem;
        line-height: 1.3;
        max-width: 90vw;
        margin-top: 1.8rem;
    }

    .carousel-controls {
        gap: .4rem;
        padding-top: 0;
        margin-left: auto;
    }

    .carousel-btn {
        width: 4.2rem;
        height: 4.2rem;
    }

    .carousel-btn img {
        width: 2.6rem;
        height: 2.6rem;
    }

    .carousel-viewport {
        margin-top: 3rem;
    }

    /* 1.25 imágenes visibles; márgenes laterales simétricos. */
    .project-thumb {
        flex-basis: calc((100% - var(--thumb-gap)) / 1.25);
        border-radius: 2rem;
          aspect-ratio: 1 / 1;
    }

    .thumb-title {
        font-size: 1.7rem;
    }

    .thumb-info {
        left: 1.5rem;
        right: 1.5rem;
        bottom: 1.2rem;
    }

    .thumb-actions {
        gap: .3rem;
    }

    /* Contacto: panel en dos bloques, sin solapes. */
    .contact-scene h2 {
        font-size: clamp(4.6rem, 10vw, 7rem);
        top: 27%;
        padding-inline: var(--side);
    }

    .contact-card {
        height: 46dvh;
        padding: 2.8rem 2.5rem 3rem;
        border-radius: 3rem 3rem 0 0;
    }

    .contact-top {
        font-size: 1.7rem;
        gap: 1.2rem;
    }

    .contact-mark {
        width: 4.6rem;
        min-width: 4.6rem;
    }

    .contact-bottom {
        margin-left: 0;
        align-items: flex-start;
        flex-direction: column;
        gap: 1.5rem;
    }

    .contact-email {
        font-size: clamp(2.1rem, 5.8vw, 3.2rem);
        overflow-wrap: anywhere;
    }

    .social-icons a {
        width: 5.3rem;
        height: 5.3rem;
        flex-basis: 5.3rem;
    }

    /* Lightbox y controles generales. */
    .lightbox-header {
        height: 8rem;
        padding-top: 2.7rem;
    }

    .lightbox-logo {
        width: 12.5rem;
    }

    .lightbox-close {
        width: 4.4rem;
        height: 4.4rem;
    }

    .lightbox-close img {
        width: 3rem;
        height: 3rem;
    }

    .scroll-cue {
        right: var(--side);
        bottom: 6dvh;
        width: 4.2rem;
        height: 4.2rem;
    }

    .scroll-cue img {
        width: 2.6rem;
        height: 2.6rem;
    }

    .page-progress {
        right: 1.2rem;
        height: 11rem;
        width: .3rem;
    }

    .loader-isotipo {
        width: 12rem;
    }
}

/* MÓVILES PEQUEÑOS — hasta 389px
-------------------------------------------------- */

@media (max-width: 389px) {

    .story-copy h1 {
        font-size: clamp(4.5rem, 12vw, 5.2rem);
    }

    .story-copy h2 {
        font-size: clamp(3.8rem, 10vw, 4.5rem);
    }

    .story-copy p {
        font-size: 1.55rem;
        margin-top: 2rem;
    }

    .portfolio-heading h2 {
        font-size: 3.4rem;
    }

    .portfolio-heading p {
        font-size: 1.55rem;
    }

    .contact-card {
        padding: 2.3rem 2rem 2.6rem;
    }

    .contact-top {
        font-size: 1.55rem;
    }

    .social-icons a {
        width: 4.8rem;
        height: 4.8rem;
        flex-basis: 4.8rem;
    }
}

/* ALTURAS REDUCIDAS Y MÓVILES EN HORIZONTAL
-------------------------------------------------- */

@media (max-width: 767px) and (max-height: 670px) {

    .about-copy {
        top: 34dvh;
    }

    .services-copy {
        top: 13dvh;
    }

    .services-copy p {
        margin-top: 1.5rem;
        font-size: 1.5rem;
    }

    .services-cloud {
        bottom: 3dvh;
        height: 42dvh;
        --service-size: min(
            calc((90vw - var(--service-gap) - var(--service-gap)) / 3),
            calc((42dvh - var(--service-gap) - var(--service-gap)) / 3)
        );
    }

    .portfolio-content {
        padding-top: 9dvh;
    }

    .portfolio-heading p {
        margin-top: 1.2rem;
    }

    .carousel-viewport {
        margin-top: 2rem;
    }

    .contact-scene h2 {
        top: 22%;
    }

    .contact-card {
        height: 50dvh;
        padding-top: 2.2rem;
        padding-bottom: 2.2rem;
    }
}

/* Tablet horizontal baja (no alterar teléfonos verticales). */
@media (min-width: 768px) and (max-height: 600px) {

    .portfolio-content {
        padding-top: 9dvh;
    }

    .carousel-viewport {
        margin-top: 2rem;
    }

    .contact-scene h2 {
        top: 22%;
    }
}

/* DISPOSITIVOS TÁCTILES: mostrar información sin hover
-------------------------------------------------- */

@media (hover: none), (pointer: coarse) {

     .project-thumb .thumb-overlay {
        opacity: 1;
    }

    .thumb-info {
        opacity: 1;
        transform: none;
    }
}

/* REDUCCIÓN DE MOVIMIENTO
-------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

    .scroll-cue img {
        animation: none;
        transform: rotate(90deg);
    }

    .site-loader {
        transition-duration: .12s;
    }

    .carousel-track,
    .thumb-info,
    .thumb-overlay,
    .thumb-placeholder {
        transition-duration: .01ms !important;
    }

    .social-icons a,
    .service-pill {
        transition: none;
    }
}


/* TARJETA FINAL DEL CARRUSEL: RESPONSIVE
-------------------------------------------------- */

@media (max-width: 767px) {
    .project-thumb-all {
        padding: 2rem;
    }

    .view-all-eyebrow {
        font-size: 1rem;
    }

    .view-all-title {
        font-size: clamp(2.6rem, 6.5vw, 4rem);
    }

    .view-all-arrow {
        flex-basis: 4rem;
        width: 4rem;
        height: 4rem;
    }

    .view-all-arrow img {
        width: 2.4rem;
        height: 2.4rem;
    }
}

@media (max-width: 389px) {
    .view-all-title {
        font-size: 2.4rem;
    }
}




/* DETALLE DE PROYECTOS - RESPONSIVE
-------------------------------------------------- */

@media (max-width: 767px) {

    .project-detail {
        padding: 12.5rem var(--side) 7rem;
    }

    .project-detail h1 {
        font-size: clamp(3.8rem, 9vw, 6rem);
    }

    .project-detail .category {
        font-size: 1.8rem;
        margin: 1.4rem 0 3.5rem;
    }

    .detail-content {
        gap: 1.5rem;
    }

    /* Las filas múltiples pasan a una columna */

    .detail-row--two,
    .detail-row--three,
    .detail-row--two-one,
    .detail-row--one-two {
        grid-template-columns: minmax(0, 1fr);
        aspect-ratio: auto;
        gap: 1.5rem;
    }

/* Imágenes en mobile: respetar su proporción natural */

.detail-row:not(.detail-row--full),
.detail-split {
    height: auto;
    aspect-ratio: auto;
}

.detail-row:not(.detail-row--full) .detail-media,
.detail-split .detail-media {
    height: auto;
    aspect-ratio: auto;
}

.project-detail .detail-media img,
.project-detail .detail-media video {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

    .detail-media {
        border-radius: 1.5rem;
    }

    /* Imagen + texto */

    .detail-split {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.5rem;
    }

    .detail-split__text {
        padding: 2rem 0;
        gap: 1.5rem;
    }

    .detail-split__text h2 {
        font-size: 3.5rem;
    }

    .detail-split__text p {
        font-size: 1.8rem;
    }

    /* Texto completo */

    .detail-text {
        padding: 3rem 0;
    }

    .detail-text h2 {
        font-size: 3.5rem;
        margin-bottom: 2rem;
    }

    .detail-text p {
        font-size: 1.9rem;
    }

    .project-detail .caption {
        font-size: 1.9rem;
        margin: 3rem 0;
    }

}


