/* =========================================================
   TRACEHAUS — CASE
========================================================= */


/* =========================================================
   RESET
========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    background: #f5f5f3;
    color: #111;
    font-family: Arial, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
}

img,
video {
    display: block;
    width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}


/* =========================================================
   VARIABLES
========================================================= */

:root {

    --case-bg: #f5f5f3;
    --case-black: #111;
    --case-gray: #888;

    --case-padding: 64px;

    --case-gap: 4px;


    --site-max-width: 1920px;

}


.case-container {

    width: 100%;

    max-width: var(--site-max-width);

    margin: 0 auto;

}


/* =========================================================
   CASE HEADER
========================================================= */

.case-header {

    width: 100%;

    background: var(--case-bg);

}


.case-header-inner {

    width: 100%;

    max-width: var(--site-max-width);

    height: 70px;

    margin: 0 auto;

    padding:
        0 var(--case-padding);

    display: flex;

    align-items: center;

    justify-content: space-between;

}


/* =========================================================
   LOGO
========================================================= */

.case-header .header-logo {

    display: block;

    width: 115px;

    line-height: 0;

}


.case-header .header-logo img {

    display: block;

    width: 100%;

    height: auto;

}


/* =========================================================
   HEADER MARK
========================================================= */

.case-header .header-mark {

    position: relative;

    display: block;

    width: 28px;

    height: 28px;

    line-height: 0;

}


.case-header .header-mark>img {

    display: block;

    width: 100%;

    height: 100%;

    object-fit: contain;

}


/* =========================================================
   TOOLTIP
========================================================= */

.case-header .header-mark-tooltip {

    position: absolute;

    top: calc(100% + 12px);

    right: 0;

    z-index: 20;

    width: max-content;

    min-width: 145px;

    padding: 10px 12px;

    display: flex;

    flex-direction: column;

    gap: 3px;

    background: #111;

    color: #fff;

    font-size: 9px;

    line-height: 1.1;

    letter-spacing: 0.02em;

    opacity: 0;

    visibility: hidden;

    transform: translateY(-5px);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        visibility 0.25s ease;

}


/* =========================================================
   TOOLTIP HOVER
========================================================= */

.case-header .header-mark:hover .header-mark-tooltip {

    opacity: 1;

    visibility: visible;

    transform: translateY(0);

}

/* =========================================================
   CASE
========================================================= */

.case {
    width: 100%;
}


/* =========================================================
   INTRO
========================================================= */

.case-intro {

    height: 245px;

    padding: 18px var(--case-padding) 32px;

    display: flex;
    flex-direction: column;
}


.case-intro-top {
    flex-shrink: 0;

    margin-bottom: auto;
}

.case-number {
    display: flex;
    align-items: baseline;
    gap: 4px;

    font-size: 10px;
    line-height: 1;
}

.case-number-current {
    color: #ff0a6c;
    font-size: 13px;
    font-weight: 500;
}


.case-number::first-letter {
    color: #e84c5b;
}

.case-number {
    display: inline-flex;

    align-items: baseline;

    gap: 4px;

    position: relative;

    padding-bottom: 10px;

    font-size: 10px;
    line-height: 1;
}

.case-number::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: 0;

    width: 30px;
    height: 2px;

    background: #ff0a6c;
}

.case-number-current {
    color: #ff0a6c;

    font-size: 13px;

    font-weight: 500;
}


/* =========================================================
   INTRO CONTENT
========================================================= */

.case-intro-content {

    width: 100%;

    display: grid;

    grid-template-columns: 1fr 220px;

    align-items: end;

    gap: 40px;
}


/* =========================================================
   TITLE
========================================================= */

.case-title h1 {

    margin: 0;

    font-size: clamp(68px,
            8.5vw,
            110px);

    line-height: 0.82;

    font-weight: 400;

    letter-spacing: -0.075em;
}


.case-title h2 {

    margin: 10px 0 0;

    font-size: 24px;

    line-height: 1;

    font-weight: 400;

    letter-spacing: -0.04em;
}


/* =========================================================
   CATEGORIES
========================================================= */

.case-categories {

    margin-top: 10px;

    display: flex;
    flex-direction: column;

    gap: 2px;
}


.case-categories span {

    font-size: 11px;

    line-height: 1.1;

    letter-spacing: 0;
}


/* =========================================================
   NEXT PROJECT — INTRO
========================================================= */

.case-next-project {

    align-self: end;

    display: flex;
    flex-direction: column;

    gap: 6px;

    padding-bottom: 2px;
}


.case-next-project span:first-child {

    margin-bottom: 5px;

    font-size: 8px;

    line-height: 1;

    text-transform: uppercase;
}


.case-next-project strong {

    max-width: 100px;

    font-size: 12px;

    line-height: 1.15;

    font-weight: 500;

}


.case-next-project span:last-child {

    margin-top: 5px;

    font-size: 20px;

    line-height: 1;
}


/* =========================================================
   SECTIONS
========================================================= */

.case-sections {

    width: 100%;

    display: flex;
    flex-direction: column;

    gap: var(--case-gap);
}


/* =========================================================
   HERO
========================================================= */
.case-hero {
    width: 100%;
    display: block;
    background: transparent;
}

.case-hero .case-section-label {
    display: block;

    width: 100%;

    padding-left: 64px;
    padding-bottom: 10px;

    background: var(--case-bg);
}

.case-hero .case-section-label::after {
    content: "";

    display: block;

    width: 18px;
    height: 2px;

    margin-top: 8px;

    background: #ff0a6c;
}

.case-hero .case-hero-media {
    display: block;

    width: 100%;
    height: auto;

    margin: 0;

    position: relative;
}

/* =========================================================
   PROJECT DESCRIPTION
========================================================= */

.case-text {

    width: 100%;

    height: 250px;

    padding: 42px var(--case-padding);

    display: flex;
    flex-direction: column;

    align-items: flex-start;

    background: var(--case-bg);
}


.case-text .case-section-label {

    margin-bottom: 27px;
}


.case-section-label {

    font-size: 12px;

    line-height: 1;

    font-weight: 600;

    margin: 15px 0;

    text-transform: uppercase;

    letter-spacing: -0.02em;
}

.case-section-label::after {
    content: "";

    display: block;

    width: 30px;
    height: 2px;

    margin-top: 9px;

    background: #ff0a6c;
}


.case-text-content {

    width: 100%;

    max-width: 300px;

    margin: 0;

    font-size: 15px;

    line-height: 1.48;

    letter-spacing: -0.025em;
}


/* =========================================================
   TEXT + MEDIA
========================================================= */

.case-text-media {

    width: 100%;

    min-height: 400px;

    display: grid;

    grid-template-columns: 1fr 2fr;

    gap: var(--case-gap);

    background: var(--case-bg);
}



.case-text-media-content {

    padding: 60px var(--case-padding);

    display: flex;
    flex-direction: column;

    justify-content: flex-start;
}


.case-text-media-content .case-section-label {

    margin-bottom: 30px;
}


.case-text-media-image {

    width: 100%;
    height: 100%;

    overflow: hidden;
}


.case-text-media-image img,
.case-text-media-image video {

    width: 100%;
    height: 100%;

    object-fit: cover;
}


/* =========================================================
   TEXT + MEDIA — LEFT / RIGHT
========================================================= */

.case-text-media--left {

    direction: rtl;
}


.case-text-media--left .case-text-media-content {

    direction: ltr;
}


/* =========================================================
   CASE GALLERY
========================================================= */

.case-gallery {
    width: 100%;
    max-width: 1920px;

    margin: 0 auto;

    background: var(--case-bg);
}


/* =========================================================
   GALLERY TITLE
========================================================= */

.case-gallery .case-section-label {
    display: block;

    width: 100%;

    margin: 15px 0;
    margin-left: 64px;

    padding:
        0 var(--case-content-padding) 14px;

    background: var(--case-bg);
}


/* =========================================================
   GALLERY GRID — DESKTOP
========================================================= */

.case-gallery-grid {
    width: 100%;

    display: grid;

    grid-template-columns:
        repeat(var(--gallery-count),
            minmax(0, 1fr));

    gap: 3px;

    overflow: hidden;
}


/* =========================================================
   GALLERY ITEM
========================================================= */

.case-gallery-item {
    min-width: 0;
    width: 100%;
    overflow: hidden;
    background: #111;
}


.case-gallery-item img,
.case-gallery-item video {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}


/* =========================================================
   VIDEO
========================================================= */

.case-gallery-item video {

    pointer-events: none;

}


/* =========================================================
   HOVER
========================================================= */

.case-gallery-item img,
.case-gallery-item video {

    transition:
        transform 0.6s ease;

}

.case-gallery-item:hover img,
.case-gallery-item:hover video {

    transform: scale(1.02);

}


/* =========================================================
   MOBILE GALLERY
========================================================= */

.case-gallery-mobile {

    display: none;

}


@media (max-width: 600px) {

    .case-gallery-grid {
        display: none;
    }

    .case-gallery-mobile {
        display: block;
        width: 100%;
    }

    .case-gallery-mobile-track {
        display: flex;

        width: 100%;

        overflow-x: auto;

        scroll-snap-type: x mandatory;

        scrollbar-width: none;

        -webkit-overflow-scrolling: touch;
    }

    .case-gallery-mobile-track::-webkit-scrollbar {
        display: none;
    }

    .case-gallery .case-section-label {

        margin-left: 15px;

    }


    /* =====================================================
       SLIDE
    ====================================================== */

    .case-gallery-mobile-item {
        display: block;

        flex: 0 0 100%;

        width: 100%;

        height: 80vw;

        min-height: 280px;
        max-height: 600px;

        overflow: hidden;

        scroll-snap-align: start;

        background: #111;
    }


    /* =====================================================
       IMAGE / VIDEO
    ====================================================== */

    .case-gallery-mobile-item img,
    .case-gallery-mobile-item video {
        display: block;

        width: 100%;
        height: 100%;

        max-width: none;

        object-fit: cover;
    }


    .case-gallery-pagination {
        padding: 10px 0;
    }


    /* =====================================================
       DOTS
    ====================================================== */

    .case-gallery-dots {
        display: flex;

        align-items: center;
        justify-content: center;

        gap: 6px;

        padding-top: 16px;
    }

    .case-gallery-dot {
        display: block;

        width: 5px;
        height: 5px;

        border-radius: 50%;

        background: #c8c8c8;
    }

    .case-gallery-dot.is-active {
        background: #ff0a6c;

        transform: scale(1.25);
    }

}

/* =========================================================
   TECHNICAL
========================================================= */

.case-technical {

    width: 100%;

    min-height: 150px;

    padding: 30px var(--case-padding);

    display: grid;

    grid-template-columns:
        1.15fr 1.15fr 1.5fr 0.5fr;

    gap: 0;

    border-top: 1px solid rgba(0, 0, 0, 0.12);

    background: var(--case-bg);
}


.technical-item {

    min-height: 80px;

    padding-right: 35px;

    display: flex;
    flex-direction: column;

    gap: 18px;

}


.technical-item+.technical-item {

    padding-left: 35px;

    border-left: 1px solid rgba(0, 0, 0, 0.12);

}


.technical-label {

    font-size: 9px;

    line-height: 1;

    font-weight: 600;

    text-transform: uppercase;
}


.technical-value {

    font-size: 11px;

    line-height: 1.4;

    letter-spacing: -0.01em;
}


/* =========================================================
   CASE FOOTER
========================================================= */

.case-footer {

    width: 100%;

    border-top: 1px solid rgba(0, 0, 0, 0.12);

    background: var(--case-bg);

}


.case-footer-inner {

    width: 100%;

    max-width: var(--site-max-width);

    min-height: 125px;

    margin: 0 auto;

    padding:
        25px var(--case-padding);

    display: grid;

    grid-template-columns:
        1fr auto 1fr;

    align-items: center;

}


/* =========================================================
   PROJECT LINKS
========================================================= */

.case-footer-project {

    display: flex;

    align-items: center;

    gap: 28px;

}


.case-footer-previous {

    justify-self: start;

}


.case-footer-next {

    justify-self: end;

    text-align: right;

}


.case-footer-project-info {

    display: flex;

    flex-direction: column;

    gap: 8px;

}


.case-footer-project-info small {

    font-size: 8px;

    line-height: 1;

    font-weight: 500;

    text-transform: uppercase;

}


.case-footer-project-info strong {

    font-size: 12px;

    line-height: 1;

    font-weight: 400;

}


/* =========================================================
   ARROWS
========================================================= */

.case-footer-arrow {

    font-size: 25px;

    line-height: 1;

    font-weight: 300;

}


/* =========================================================
   INDEX
========================================================= */

.case-footer-index {

    width: 30px;

    height: 30px;

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    grid-template-rows:
        repeat(2, 1fr);

    gap: 3px;

}


.case-footer-index span {

    display: block;

    border: 1px solid #111;

}


/* =========================================================
   HOVER
========================================================= */

.case-footer-project,
.case-footer-index {

    transition:
        opacity 0.25s ease;

}


.case-footer-project:hover,
.case-footer-index:hover {

    opacity: 0.45;

}

/* =========================================================
   MOBILE FOOTER
========================================================= */
@media (max-width: 600px) {

    .case-footer-inner {

        min-height: 100px;

        padding:
            20px var(--case-padding);

        grid-template-columns:
            1fr 1fr;

    }


    .case-footer-index {

        display: none;

    }


    .case-footer-project {

        gap: 12px;

    }


    .case-footer-next {

        justify-self: end;

    }


    .case-footer-project-info small {

        font-size: 7px;

    }


    .case-footer-project-info strong {

        max-width: 110px;

        font-size: 11px;

        line-height: 1.15;

    }


    .case-footer-arrow {

        font-size: 21px;

    }

    .case-credits {

        margin-top: 15px;

    }

}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

    :root {
        --case-padding: 35px;
    }


    .case-intro {

        height: 280px;

    }


    .case-intro-content {

        grid-template-columns: 1fr 170px;

    }


    .case-title h1 {

        font-size: clamp(60px,
                10vw,
                90px);

    }


    .case-title h2 {

        font-size: 19px;

    }


    .case-text {

        height: 280px;

    }


    .case-text-content {

        max-width: 330px;

    }



    .case-technical {

        grid-template-columns:
            1fr 1fr;

        row-gap: 35px;

    }


    .technical-item:nth-child(3) {

        border-left: 0;

        padding-left: 0;

    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    :root {

        --case-padding: 20px;

        --case-gap: 3px;

    }


    /* HEADER */

    .site-header {

        height: 55px;

    }


    .header-logo {

        font-size: 11px;

    }


    .header-mark {

        width: 24px;
        height: 24px;

        font-size: 10px;

    }


    /* INTRO */

    .case-intro {

        height: 310px;

        padding:
            20px var(--case-padding) 30px;

    }


    .case-intro-top {

        margin-bottom: auto;

    }


    .case-intro-content {

        grid-template-columns: 1fr;

        gap: 25px;

        align-items: start;

    }


    .case-title h1 {

        font-size: 18vw;

        line-height: 0.82;

    }


    .case-title h2 {

        margin-top: 8px;

        font-size: 16px;

    }


    .case-categories {

        margin-top: 10px;

    }


    .case-next-project {

        display: none;

    }





    /* TEXT */

    .case-text {

        height: auto;

        min-height: 320px;

        padding:
            45px var(--case-padding);

    }


    .case-text .case-section-label {

        margin-bottom: 25px;
        padding-left: 24px;

    }


    .case-text-content {

        max-width: 300px;

        font-size: 14px;

        line-height: 1.5;

    }


    /* TEXT + MEDIA */

    .case-text-media {

        grid-template-columns: 1fr;

    }


    .case-text-media-content {

        min-height: 300px;

        padding:
            45px var(--case-padding);

    }


    .case-text-media-image {

        height: 80vw;

    }


    /* GALLERY */

    .case-gallery {

        grid-template-columns:
            repeat(2, 1fr);

    }


    /* TECHNICAL */

    .case-technical {

        padding:
            35px var(--case-padding);

        grid-template-columns:
            1fr 1fr;

        row-gap: 35px;

    }


    .technical-item {

        padding-right: 15px;

    }


    .technical-item+.technical-item {

        padding-left: 15px;

    }


    .technical-value {

        font-size: 11px;

    }


    /* FOOTER */

    .case-footer {

        min-height: 100px;

        padding:
            20px var(--case-padding);

        grid-template-columns:
            1fr 1fr;

    }


    .case-footer-index {

        display: none;

    }


    .case-footer-previous,
    .case-footer-next {

        gap: 12px;

    }


    .case-footer-arrow {

        font-size: 22px;

    }


    .case-hero .case-section-label {
        padding-left: 24px;
    }


}


/* =========================================================
   CREDITS
========================================================= */

.case-credits {

    width: 100%;

    padding:
        30px var(--case-padding) 40px;

    border-top: 1px solid rgba(0, 0, 0, 0.12);

    background: var(--case-bg);

}


.case-credits-header {

    margin-bottom: 30px;

}


.case-credits-header .case-section-label {

    display: inline-block;

}


.case-credits-header .case-section-label::after {

    content: "";

    display: block;

    width: 22px;

    height: 2px;

    margin-top: 9px;

    background: #ff0a6c;

}


.case-credits-grid {

    display: grid;

    grid-template-columns:
        repeat(5, 1fr);

}


.credit-item {

    min-height: 65px;

    padding:
        0 30px;

}


.credit-item:first-child {

    padding-left: 0;

}


.credit-item:last-child {

    padding-right: 0;

}


.credit-item+.credit-item {

    border-left:
        1px solid rgba(255, 10, 108, 0.35);

}


.credit-role {

    display: block;

    margin-bottom: 14px;

    color: #ff0a6c;

    font-size: 9px;

    line-height: 1;

    font-weight: 600;

    text-transform: uppercase;

}


.credit-name {

    display: block;

    font-size: 11px;

    line-height: 1.4;

}

@media (max-width: 900px) {

    .case-credits-grid {

        grid-template-columns:
            repeat(3, 1fr);

        row-gap: 35px;

    }


    .credit-item:nth-child(4) {

        padding-left: 0;

        border-left: 0;

    }

}

@media (max-width: 600px) {

    .case-credits {

        padding:
            30px var(--case-padding) 40px;

    }


    .case-credits-grid {

        grid-template-columns:
            1fr 1fr;

        row-gap: 35px;

    }


    .credit-item {

        padding:
            0 15px;

    }


    .credit-item:nth-child(odd) {

        padding-left: 0;

    }


    .credit-item:nth-child(even) {

        padding-right: 0;

    }


    .credit-item:nth-child(3) {

        padding-left: 0;

        border-left: 0;

    }

}



/* =========================================================
   TEXTOS EM COLUNAS
========================================================= */
.case-text-columns {
    width: 100%;
}

.case-text-columns-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8vw;

    width: 100%;
}

.case-text-column {
    padding:60px var(--case-padding);
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.case-text-columns-content {    
    font-size: clamp(12px, 1vw, 15px);
    line-height: 1.5;
}


@media (max-width: 768px) {

    .case-text-columns-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }

}


/* =========================================================
   IFRAME VIMEO
========================================================= */
.video-vimeo {
    width: 100%;
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.video-vimeo iframe {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    border: 0;
}