/* ==========================================================================
   LAB · MENU DE TECNOLOGIAS
   Abas laterais, painéis, especificações, mídias e âncoras diretas.
   ========================================================================== */


/* ==========================================================================
   ÂNCORAS DIRETAS
   ========================================================================== */

   .tech-anchor {
    position: relative;

    width: 1px;
    height: 1px;

    pointer-events: none;

    scroll-margin-top: 125px;
}


/* ==========================================================================
   ESTRUTURA DO LAB
   ========================================================================== */

.lab {
    display: grid;

    grid-template-columns:
        minmax(0, 340px)
        minmax(0, 1fr);

    gap: 28px;

    align-items: start;
}


.lab-panels {
    min-width: 0;
}


.lab-side {
    position: sticky;

    top: 96px;

    align-self: start;

    z-index: 5;
}


/* ==========================================================================
   ABAS
   ========================================================================== */

.tabs {
    display: flex;

    flex-direction: column;

    border-top:
        1px solid
        var(--line);
}


.tabs button {
    display: grid;

    grid-template-columns:
        44px
        minmax(0, 1fr);

    gap: 4px 8px;

    text-align: left;

    padding:
        22px
        6px
        22px
        0;

    border: 0;

    border-bottom:
        1px solid
        var(--line);

    background: none;

    cursor: pointer;

    position: relative;

    transition:
        padding
        .35s
        var(--ease);
}


.tabs button .ix {
    font-family: var(--mono);

    font-size: .74rem;

    color: var(--mut);

    padding-top: 4px;

    grid-row: span 2;
}


.tabs button b {
    font-family: var(--disp);

    font-weight: 400;

    font-size: 1.25rem;

    letter-spacing: -.01em;

    color: var(--tx2);

    transition:
        color
        .25s
        ease;
}


.tabs button small {
    font-size: .84rem;

    color: var(--mut);
}


.tabs button .cr {
    grid-column: 2;

    justify-self: start;

    margin-top: 6px;

    font-family: var(--mono);

    font-size: .62rem;

    letter-spacing: .12em;

    text-transform: uppercase;

    padding:
        3px
        8px;

    border-radius: 3px;

    background: var(--or);

    color: #000;

    font-weight: 500;
}


.tabs button::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: -1px;

    height: 1px;
    width: 100%;

    background: var(--or);

    transform:
        scaleX(0);

    transform-origin: left;

    transition:
        transform
        .5s
        var(--ease);
}


.tabs button[aria-selected="true"] {
    padding-left: 14px;
}


.tabs button[aria-selected="true"] b {
    color: var(--tx);
}


.tabs button[aria-selected="true"] .ix {
    color: var(--or);
}


.tabs button[aria-selected="true"]::after {
    transform:
        scaleX(1);
}


.tabs button .on {
    display: none;

    position: absolute;

    right: 6px;
    top: 24px;

    width: 20px;
    height: 20px;

    border-radius: 50%;

    background: var(--ors);

    color: var(--or);

    font-size: .7rem;

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


.tabs button.inproj .on {
    display: inline-flex;
}


.lab-note {
    margin-top: 22px;

    font-size: .84rem;

    color: var(--mut);
}


/* ==========================================================================
   PAINEL
   ========================================================================== */

.panel {
    background: var(--s1);

    border:
        1px solid
        var(--line);

    border-radius: 8px;

    overflow: hidden;

    min-width: 0;
}


.panel[hidden] {
    display: none;
}


.panel.in {
    animation:
        pin
        .6s
        var(--ease);
}


@keyframes pin {

    from {
        opacity: 0;

        transform:
            translateY(12px);
    }

}


/* ==========================================================================
   CABEÇALHO DO PAINEL
   ========================================================================== */

.p-head {
    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    gap: 20px;

    padding:
        30px
        32px
        0;
}


.p-head h3 {
    font-size:
        clamp(
            1.8rem,
            3vw,
            2.6rem
        );

    font-weight: 300;

    letter-spacing: -.03em;

    margin-top: 10px;
}


.badge {
    flex-shrink: 0;

    font-family: var(--mono);

    font-size: .66rem;

    letter-spacing: .12em;

    text-transform: uppercase;

    padding:
        7px
        11px;

    border-radius: 4px;

    border:
        1px solid
        var(--line2);

    color: var(--tx2);
}


.badge.cr {
    border-color: var(--or);

    color: var(--or);

    background: var(--ors);
}


/* ==========================================================================
   CORPO
   ========================================================================== */

.p-body {
    display: grid;

    grid-template-columns:
        minmax(0, 1.1fr)
        minmax(0, .9fr);

    gap: 36px;

    padding:
        28px
        32px
        32px;
}


.p-body h4 {
    font-family: var(--mono);

    font-size: .7rem;

    letter-spacing: .12em;

    text-transform: uppercase;

    color: var(--mut);

    font-weight: 400;

    margin-bottom: 12px;
}


.p-body h4.mt {
    margin-top: 24px;
}


.p-body p {
    color: var(--tx2);

    font-size: .95rem;
}


.p-body p + p {
    margin-top: 12px;
}


/* ==========================================================================
   ESPECIFICAÇÕES
   ========================================================================== */

.specs {
    list-style: none;

    margin: 0;

    padding: 0;

    border-top:
        1px solid
        var(--line);
}


.specs li {
    display: flex;

    justify-content: space-between;

    gap: 16px;

    padding:
        11px
        0;

    border-bottom:
        1px solid
        var(--line);

    font-size: .88rem;
}


.specs li span {
    color: var(--mut);
}


.specs li b {
    font-weight: 600;

    text-align: right;
}


/* ==========================================================================
   CHIPS
   ========================================================================== */

.chips {
    display: flex;

    flex-wrap: wrap;

    gap: 6px;

    margin-top: 18px;
}


.chips span {
    font-size: .78rem;

    padding:
        5px
        11px;

    border-radius: 999px;

    border:
        1px solid
        var(--line2);

    color: var(--tx2);
}


/* ==========================================================================
   AÇÕES
   ========================================================================== */

.p-act {
    display: flex;

    flex-wrap: wrap;

    align-items: center;

    gap: 12px 20px;

    padding:
        0
        32px
        32px;
}


.p-act .q {
    font-size: .88rem;

    color: var(--tx2);

    text-decoration: underline;

    text-underline-offset: 4px;

    text-decoration-color: var(--line2);
}


.p-act .q:hover {
    color: var(--tx);

    text-decoration-color: var(--or);
}


.p-act .src {
    margin-left: auto;

    font-size: .74rem;

    color: var(--mut);
}


/* ==========================================================================
   MÍDIAS
   ========================================================================== */

.clip {
    position: relative;

    border-radius: 6px;

    overflow: hidden;

    aspect-ratio: 9 / 12;

    background: #000;

    margin-top: 20px;
}


.clip video,
.clip img {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;
}


.clip span {
    position: absolute;

    left: 12px;
    bottom: 10px;

    font-family: var(--mono);

    font-size: .64rem;

    letter-spacing: .1em;

    text-transform: uppercase;

    color: #fff;

    text-shadow:
        0 1px 6px
        rgba(0, 0, 0, .8);
}


.clips {
    display: grid;

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

    gap: 10px;

    margin-top: 20px;
}


.clips .clip {
    margin-top: 0;

    aspect-ratio: 3 / 4;
}


/* ==========================================================================
   RESPONSIVO · NOTEBOOK
   ========================================================================== */

@media (max-width: 1180px) {

    .lab {
        grid-template-columns:
            minmax(0, 280px)
            minmax(0, 1fr);
    }


    .p-body {
        grid-template-columns:
            minmax(0, 1fr);
    }

}


/* ==========================================================================
   RESPONSIVO · TABLET
   ========================================================================== */

@media (max-width: 900px) {

    .tech-anchor {
        scroll-margin-top: 100px;
    }


    .lab {
        grid-template-columns:
            minmax(0, 1fr);
    }


    .lab-side {
        top: 72px;

        background: var(--bg);

        margin:
            0
            -28px;

        padding:
            0
            28px;
    }


    .tabs {
        flex-direction: row;

        overflow-x: auto;

        border-top: 0;

        scrollbar-width: none;
    }


    .tabs::-webkit-scrollbar {
        display: none;
    }


    .tabs button {
        flex:
            0
            0
            auto;

        display: flex;

        align-items: center;

        padding:
            14px
            18px
            14px
            0;

        border-bottom:
            1px solid
            var(--line);

        margin-right: 6px;
    }


    .tabs button .ix,
    .tabs button small,
    .tabs button .cr {
        display: none;
    }


    .tabs button b {
        font-size: 1rem;
    }


    .tabs button[aria-selected="true"] {
        padding-left: 0;
    }


    .tabs button .on {
        position: static;

        margin-left: 6px;

        width: 16px;
        height: 16px;

        font-size: .6rem;
    }


    .tabs button.inproj b {
        display: inline;
    }


    .lab-note {
        display: none;
    }

}


/* ==========================================================================
   RESPONSIVO · CELULAR
   ========================================================================== */

@media (max-width: 640px) {

    .tech-anchor {
        scroll-margin-top: 85px;
    }


    .clips .clip {
        aspect-ratio: 3 / 4;
    }


    .lab-side {
        margin:
            0
            -20px;

        padding:
            0
            20px;
    }


    .p-head {
        padding:
            24px
            20px
            0;
    }


    .p-body {
        padding:
            24px
            20px
            24px;
    }


    .p-act {
        padding:
            0
            20px
            24px;
    }


    .p-act .btn {
        width: 100%;

        white-space: normal;

        text-align: center;

        line-height: 1.25;

        padding:
            12px
            20px;
    }


    .p-act .src {
        margin-left: 0;
    }


    .p-head {
        flex-direction: column;

        gap: 12px;
    }


    /* ======================================================================
       WINDOW BLUE · ORDEM ESPECÍFICA NO MOBILE

       Desktop:
       apresentação → simulador → imagens → texto

       Mobile:
       imagens → apresentação → simulador → texto
       ====================================================================== */

    #pn-windowblue {
        display: flex;

        flex-direction: column;
    }


    #pn-windowblue .p-head {
        order: 1;
    }


    /*
     * Remove apenas as caixas intermediárias do layout.
     * O conteúdo continua existindo normalmente no DOM.
     */
    #pn-windowblue .p-body {
        display: contents;
    }


    #pn-windowblue .p-body > div:first-child {
        display: contents;
    }


    /*
     * Fotos/vídeos primeiro.
     */
    #pn-windowblue .p-body > div:first-child > .clips {
        order: 2;

        margin:
            24px
            20px
            0;

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


    /*
     * Texto comercial principal da Window Blue.
     */
    #pn-windowblue .windowblue-feature {
        order: 3;
    }


    /*
     * Simulador das tonalidades.
     */
    #pn-windowblue .demo {
        order: 4;
    }


    /*
     * "Como funciona" depois do simulador.
     */
    #pn-windowblue .p-body > div:first-child > h4 {
        order: 5;

        margin:
            28px
            20px
            12px;
    }


    #pn-windowblue .p-body > div:first-child > p {
        order: 6;

        margin-left: 20px;
        margin-right: 20px;
    }


    #pn-windowblue .p-body > div:first-child > p + p {
        margin-top: 12px;
    }


    /*
     * Especificações e "Ideal para".
     */
    #pn-windowblue .p-body > div:nth-child(2) {
        order: 7;

        margin:
            28px
            20px
            24px;
    }


    /*
     * Botões finais.
     */
    #pn-windowblue .p-act {
        order: 8;
    }

}