/* ============================================================
   CENA 7

   Este arquivo contém apenas os estilos específicos da cena 7
   e seus ajustes responsivos.
   ============================================================ */


/* ============================================================
   CENA 7 — CONTATO
   ============================================================ */

#scene-7 {
    padding: 8vw 10vw;

    flex-direction: column;

    /*
     * 'safe center':
     *   - centraliza quando o conteúdo cabe na altura;
     *   - alinha ao topo quando há overflow, evitando que
     *     o <h2> "suba" e invada a zona do label no canto.
     */
    justify-content: safe center;

    position: relative;
    overflow: hidden;

    --text-muted: #c4c4c4;
}

/*
 * O global.css já define position: absolute.
 * Aqui reforçamos top/left e subimos o z-index para o label
 * ficar sempre acima do h2.
 */
#scene-7 .label {
    top: 40px;
    left: 40px;

    z-index: 2;

    color: var(--text-color);
    opacity: 0.95;
}

#scene-7 h2 {
    font-size: clamp(2.5rem, 5vw, 5rem);
    font-weight: 500;
    line-height: 1.05;
    margin-bottom: 2rem;
    letter-spacing: -0.03em;
    overflow-wrap: anywhere;
    word-break: break-word;
}

#scene-7 .desc {
    font-size: 1.1rem;

    color: var(--text-color);
    opacity: 0.85;

    max-width: 620px;
    margin-bottom: 2.5rem;
    line-height: 1.7;

    overflow-wrap: anywhere;
    word-break: break-word;
}

.service-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem 3rem;
    margin-bottom: 3rem;
    max-width: 720px;
    font-size: 0.78rem;
    line-height: 1.6;
}

.service-list > div {
    color: var(--text-color);
    opacity: 0.78;

    overflow-wrap: anywhere;
    word-break: break-word;
}

.service-list > div:nth-child(1) {
    color: var(--text-color);
    opacity: 1;
    font-weight: 700;
}

.links {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
}

.links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1rem;
    border-bottom: 1px solid var(--text-color);
    padding-bottom: 0.15rem;
    transition: opacity 0.3s ease;

    overflow-wrap: anywhere;
    word-break: break-word;
}

.links a:hover {
    opacity: 0.5;
}

.footer {
    position: absolute;
    bottom: 40px;
    left: 10vw;
    right: 10vw;

    font-size: 0.65rem;

    color: var(--text-color);
    opacity: 0.7;
}


/* ============================================================
   CENA 7 — FUNDO ABSTRATO (CUBOS WIREFRAME)
   ============================================================ */

.scene-7-bg {
    position: absolute;
    inset: 0;

    z-index: 0;

    pointer-events: none;

    overflow: hidden;

    opacity: 0.28;

    filter: blur(0.4px);

    -webkit-mask-image: radial-gradient(
        ellipse at center,
        #000 45%,
        transparent 100%
    );
            mask-image: radial-gradient(
        ellipse at center,
        #000 45%,
        transparent 100%
    );
}

.scene-7-bg svg {
    display: block;
    width: 100%;
    height: 100%;
}

/*
 * Conteúdo acima do fundo.
 * Exclui o fundo (.scene-7-bg) E o label (.label),
 * porque o label já é absoluto pelo global.css e precisa
 * continuar ancorado no canto da cena.
 */
#scene-7 > *:not(.scene-7-bg):not(.label) {
    position: relative;
    z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
    .scene-7-bg svg * {
        animation: none;
    }
}


/* ============================================================
   MOBILE — LAYOUT CINEMÁTICO
   ============================================================ */

@media (max-width: 768px) {

    #scene-7 {
        box-sizing: border-box;
        width: 100%;

        min-height: 100dvh;
        height: auto;

        padding:
            max(54px, calc(40px + env(safe-area-inset-top)))
            18px
            max(70px, calc(40px + env(safe-area-inset-bottom)));

        flex-direction: column;
        justify-content: flex-start;

        overflow-x: hidden;
        overflow-y: visible;

        --text-muted: #d0d0d0;
    }

    /* Label alinhado com o padding lateral de 18px */
    #scene-7 .label {
        top: max(16px, env(safe-area-inset-top));
        left: 18px;
    }

    .scene-7-bg {
        opacity: 0.18;
        filter: blur(0.6px);
    }

    #scene-7 h2 {
        width: 100%;
        max-width: 100%;

        margin-top: 7vh;
        margin-bottom: 1rem;

        font-size: clamp(2.1rem, 11vw, 4rem);
        line-height: 0.91;
        letter-spacing: -0.045em;

        overflow-wrap: break-word;
        word-break: normal;
    }

    #scene-7 .desc {
        width: 100%;
        max-width: 100%;
        margin-bottom: 1.2rem;

        font-size: clamp(0.7rem, 2.8vw, 0.9rem);
        line-height: 1.45;

        color: var(--text-color);
        opacity: 0.95;

        overflow-wrap: break-word;
        word-break: normal;
    }

    .service-list {
        width: 100%;
        max-width: 100%;

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

        gap: 0.35rem 0.8rem;
        margin-bottom: 1.3rem;

        font-size: clamp(0.48rem, 2vw, 0.62rem);
        line-height: 1.35;
    }

    .service-list > div {
        min-width: 0;
        max-width: 100%;

        color: var(--text-color);
        opacity: 0.9;

        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .service-list > div:nth-child(1) {
        color: var(--text-color);
        opacity: 1;
    }

    .links {
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 0.6rem 1rem;
        margin-bottom: 0;
    }

    .links a {
        max-width: 100%;

        font-size: clamp(0.52rem, 2vw, 0.68rem);
        line-height: 1.25;

        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .footer {
        position: relative;
        left: auto;
        right: auto;
        bottom: auto;

        width: 100%;
        max-width: 100%;
        margin-top: 2rem;

        font-size: clamp(0.4rem, 1.6vw, 0.52rem);
        line-height: 1.3;

        color: var(--text-color);
        opacity: 0.8;

        overflow-wrap: anywhere;
        word-break: break-word;
    }
}


/* ============================================================
   TELAS MUITO PEQUENAS
   ============================================================ */

@media (max-width: 380px) {

    #scene-7 {
        padding-left: 14px;
        padding-right: 14px;

        --text-muted: #dcdcdc;
    }

    #scene-7 .label {
        left: 14px;
    }

    .scene-7-bg {
        opacity: 0.14;
    }

    #scene-7 h2 {
        font-size: clamp(1.9rem, 11vw, 3rem);
        margin-top: 5vh;
    }

    #scene-7 .desc {
        font-size: 0.64rem;
        line-height: 1.35;

        color: var(--text-color);
        opacity: 1;
    }

    .service-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.25rem 0.55rem;
        font-size: 0.46rem;
        line-height: 1.3;
    }

    .service-list > div {
        color: var(--text-color);
        opacity: 0.95;
    }

    .links {
        gap: 0.4rem 0.7rem;
    }

    .links a {
        font-size: 0.5rem;
    }

    .footer {
        color: var(--text-color);
        opacity: 0.85;
    }
}


/* ============================================================
   CELULAR DEITADO — LANDSCAPE
   ============================================================ */

@media (max-width: 900px) and (orientation: landscape) {

    #scene-7 {
        box-sizing: border-box;
        min-height: 100dvh;
        height: auto;

        padding:
            max(36px, calc(28px + env(safe-area-inset-top)))
            6vw
            max(30px, calc(20px + env(safe-area-inset-bottom)));

        flex-direction: column;
        justify-content: flex-start;

        overflow-x: hidden;
        overflow-y: visible;

        --text-muted: #d0d0d0;
    }

    #scene-7 .label {
        top: max(12px, env(safe-area-inset-top));
        left: 6vw;
    }

    .scene-7-bg {
        opacity: 0.15;
    }

    #scene-7 h2 {
        margin-top: 0;
        margin-bottom: 0.6rem;

        font-size: clamp(1.8rem, 7vw, 4rem);
        line-height: 0.88;
        letter-spacing: -0.045em;
    }

    #scene-7 .desc {
        max-width: 100%;
        margin-bottom: 0.8rem;

        font-size: clamp(0.5rem, 1.5vw, 0.72rem);
        line-height: 1.3;

        color: var(--text-color);
        opacity: 0.95;
    }

    .service-list {
        width: 100%;
        max-width: 100%;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.2rem 0.8rem;
        margin-bottom: 0.8rem;

        font-size: clamp(0.4rem, 0.8vw, 0.55rem);
        line-height: 1.25;
    }

    .service-list > div {
        color: var(--text-color);
        opacity: 0.9;
    }

    .links {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem 1rem;
        margin-bottom: 0;
    }

    .links a {
        font-size: clamp(0.42rem, 0.8vw, 0.56rem);
        line-height: 1.2;
    }

    .footer {
        position: relative;
        left: auto;
        right: auto;
        bottom: auto;

        width: 100%;
        margin-top: 1rem;

        font-size: clamp(0.36rem, 0.7vw, 0.48rem);
        line-height: 1.2;

        color: var(--text-color);
        opacity: 0.8;
    }
}


/* ============================================================
   CELULAR DEITADO — ALTURA MUITO BAIXA
   ============================================================ */

@media (max-width: 900px)
and (orientation: landscape)
and (max-height: 430px) {

    #scene-7 {
        padding-top: 24px;
        padding-bottom: 20px;

        --text-muted: #d8d8d8;
    }

    #scene-7 .label {
        top: 10px;
        left: 6vw;
    }

    .scene-7-bg {
        opacity: 0.1;
    }

    #scene-7 h2 {
        font-size: clamp(1.5rem, 6vw, 3rem);
        margin-bottom: 0.4rem;
    }

    #scene-7 .desc {
        font-size: 0.48rem;
        line-height: 1.2;
        margin-bottom: 0.45rem;

        color: var(--text-color);
        opacity: 1;
    }

    .service-list {
        gap: 0.12rem 0.55rem;
        margin-bottom: 0.45rem;

        font-size: 0.4rem;
        line-height: 1.2;
    }

    .service-list > div {
        color: var(--text-color);
        opacity: 0.95;
    }

    .links {
        gap: 0.3rem 0.6rem;
    }

    .links a {
        font-size: 0.4rem;
    }

    .footer {
        margin-top: 0.8rem;
        color: var(--text-color);
        opacity: 0.85;
    }
}


/* ============================================================
   CELULARES MUITO PEQUENOS — LANDSCAPE
   ============================================================ */

@media (max-width: 700px)
and (orientation: landscape)
and (max-height: 360px) {

    #scene-7 {
        padding: 22px 14px 14px;
        justify-content: flex-start;

        --text-muted: #e0e0e0;
    }

    #scene-7 .label {
        top: 8px;
        left: 14px;
    }

    .scene-7-bg {
        opacity: 0.08;
    }

    #scene-7 h2 {
        font-size: clamp(1.35rem, 5.8vw, 2.6rem);
        line-height: 0.86;
        margin-bottom: 0.3rem;
    }

    #scene-7 .desc {
        max-width: 100%;
        font-size: clamp(0.42rem, 1vw, 0.54rem);
        line-height: 1.16;
        margin-bottom: 0.3rem;

        color: var(--text-color);
        opacity: 1;
    }

    .service-list {
        max-width: 100%;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.1rem 0.4rem;
        margin-bottom: 0.35rem;

        font-size: clamp(0.36rem, 0.8vw, 0.48rem);
        line-height: 1.12;
    }

    .service-list > div {
        color: var(--text-color);
        opacity: 1;
    }

    .links {
        gap: 0.2rem 0.5rem;
    }

    .links a {
        font-size: clamp(0.36rem, 0.72vw, 0.48rem);
    }

    .footer {
        margin-top: 0.6rem;
        font-size: clamp(0.34rem, 0.65vw, 0.42rem);

        color: var(--text-color);
        opacity: 0.9;
    }
}