/* =========================================================
   STUDIO EPÍFITA — PÁGINA Autocad
   Folha de estilos organizada
   ========================================================= */
.brand-symbol {
    width: 72px;
    height: 86px;
    object-fit: contain;
    margin-right: 0px;
    flex-shrink: 0;
}

/* =========================================================
   1. HERO / APRESENTAÇÃO DA FERRAMENTA
   ========================================================= */

.tool-hero {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    min-height: 390px;
    background: #e9e5dc;
    border-bottom: 1px solid var(--line);
}

.tool-hero-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 42px 8% 48px 10%;
}

.back-link {
    margin-bottom: 38px;
    color: var(--muted);
    font-size: 12px;
}

.back-link:hover {
    color: var(--olive);
}

.tool-hero-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 4.3vw, 58px);
    line-height: 1.05;
}

.tool-hero-copy h1 em {
    color: var(--olive);
    font-style: normal;
}

.tool-hero-copy>p:not(.eyebrow) {
    max-width: 500px;
    margin-bottom: 24px;
    color: #55564f;
    line-height: 1.65;
}

.tool-hero-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 30px 5%;
    background: #dedbd1;
}

.blueprint-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: min(100%, 900px);
    margin: 0 auto 8px;
    box-sizing: border-box;
    color: #6c6d61;
    font-size: 9px;
    letter-spacing: .2em;
}

.blueprint-art {
    width: min(100%, 600px);
    margin: auto;
    padding: 15px;
    background: #f4f1e9;
    box-shadow: 0 12px 35px #34362212;
}

.blueprint-art svg {
    display: block;
    width: 100%;
}

.visual-note {
    width: min(100%, 900px);
    margin: 8px auto 0;
    box-sizing: border-box;
    color: #77776c;
    font-size: 8px;
    letter-spacing: .13em;
    text-align: right;
}


/* =========================================================
   1.5. CARROSSEL
   ========================================================= */

.blueprint-art.carousel {
    width: 100%;
    max-width: 900px;
    aspect-ratio: 700 / 420;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    margin: 0 auto;
    box-sizing: border-box;
}

.carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    animation: carouselSlide 10s infinite;
}

.carousel-track img {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

#heroCarousel:hover .carousel-track {
    animation-play-state: paused;
}

@keyframes carouselSlide {

    0%,
    28% {
        transform: translateX(0);
    }

    33%,
    61% {
        transform: translateX(-100%);
    }

    66%,
    94% {
        transform: translateX(-200%);
    }

    100% {
        transform: translateX(0);
    }
}

.carousel-open {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, .9);
    cursor: pointer;
    font-size: 20px;
}

/* VISUALIZADOR */
.hero-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(20, 20, 18, .96);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.hero-lightbox.active {
    display: flex;
}

.hero-lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: 100%;
    max-height: 100%;
}

.hero-lightbox-content img {
    max-width: 85vw;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.hero-lightbox-counter {
    color: white;
    font-size: 13px;
    letter-spacing: 2px;
}

.hero-lightbox-close,
.hero-lightbox-arrow {
    position: absolute;
    border: none;
    background: transparent;
    color: white;
    cursor: pointer;
}

.hero-lightbox-close {
    top: 22px;
    right: 30px;
    font-size: 38px;
}

.hero-lightbox-arrow {
    top: 50%;
    transform: translateY(-50%);
    font-size: 56px;
    padding: 15px;
}

.hero-lightbox-arrow.prev {
    left: 20px;
}

.hero-lightbox-arrow.next {
    right: 20px;
}

@media (max-width: 600px) {
    .hero-lightbox {
        padding: 20px;
    }

    .hero-lightbox-content img {
        max-width: 90vw;
        max-height: 75vh;
    }

    .hero-lightbox-arrow.prev {
        left: 0;
    }

    .hero-lightbox-arrow.next {
        right: 0;
    }
}

/* =========================================================
   2. INTRODUÇÃO
   ========================================================= */


.tool-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 50px;
    border-bottom: 1px solid var(--line);
}

.tool-intro h2 {
    margin: 0;
    font-size: clamp(30px, 3.2vw, 43px);
    line-height: 1.1;
}

.tool-intro>p {
    max-width: 570px;
    margin: 0;
    color: #55564f;
    line-height: 1.75;
}


/* =========================================================
   3. LISTA E APRESENTAÇÃO DO PROJETO
   ========================================================= */

.project-list {
    padding: 0px 5% 70px;
}

.project-entry {
    max-width: 1440px;
    margin: auto;
}

.project-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 25px;
}

.project-heading h2 {
    margin: 0;
    font-size: clamp(32px, 3vw, 42px);
}

.project-number {
    padding-bottom: 7px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .15em;
}

.project-overview {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    align-items: stretch;
    gap: 38px;
}

.project-cover {
    position: relative;
    min-height: 350px;
    background: #ddd8cc;
}

.project-cover img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 350px;
    object-fit: cover;
    filter: saturate(.68);
}

.image-caption {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 7px 10px;
    background: #f3f0e9e8;
    color: #55564f;
    font-size: 9px;
}

.project-meta {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 12px 2% 12px 0;
}

.meta-line {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
}

.meta-line span {
    color: var(--muted);
}

.meta-line strong {
    font-weight: 600;
    text-align: right;
}

.project-meta>p {
    margin: 22px 0;
    color: #55564f;
    font-size: 14px;
    line-height: 1.65;
}

.project-meta .button {
    align-self: flex-start;
}


/* =========================================================
   4. DOCUMENTAÇÃO / TÍTULO DA GALERIA
   ========================================================= */

.deliverables {
    padding-top: 58px;
}

.deliverables-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 22px;
}

.deliverables-heading h3 {
    margin: 0;
    font: 500 26px "Manrope", sans-serif;
}

.deliverables-heading>p {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 11px;
}


/* =========================================================
   5. GALERIA DE PRANCHAS
   Ajuste da miniatura A3 vertical:
   - aspect-ratio define a proporção da área;
   - padding controla o espaço entre a imagem e o card;
   - --sheet-frame-inset controla a posição da moldura.
   ========================================================= */

:root {
    --sheet-preview-padding: 4px;
    --sheet-frame-inset: 4px;
    --sheet-frame-color: #b9b6ab;
}

/* Largura Moldura da folha */
.sheet-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 15px;
    width: 100%;
}

.sheet-card {
    appearance: none;
    display: block;
    width: 100%;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #f8f6f0;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

.sheet-card:hover,
.sheet-card:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px #24241912;
}

.sheet-card:focus-visible {
    outline: 2px solid var(--olive);
    outline-offset: 3px;
}

/* Altura Moldura da folha */
.sheet-preview {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 200px;
    aspect-ratio: auto;
    min-width: 0;
    padding: var(--sheet-preview-padding);
    box-sizing: border-box;
    overflow: hidden;
    background: #eeece5;
}

/* Moldura fina ao redor da folha */
.sheet-preview::before {
    content: "";
    position: absolute;
    inset: var(--sheet-frame-inset);
    z-index: 2;
    border: 1px solid var(--sheet-frame-color);
    pointer-events: none;
}

/* Imagem A3: mantém a proporção e não corta o desenho */
.sheet-preview img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    background: #fff;
}

.sheet-stamp {
    position: absolute;
    top: 9px;
    left: 9px;
    z-index: 3;
    padding: 2px 4px;
    background: #f8f6f0d9;
    color: #77776c;
    font-size: 9px;
    pointer-events: none;
}

.sheet-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-height: 68px;
    padding: 13px 14px 15px;
}

.sheet-info strong {
    font-size: 13px;
}

.sheet-info small {
    color: var(--muted);
    font-size: 10px;
}

.sheet-disclaimer {
    margin: 15px 0 0;
    color: #77766d;
    font-size: 10px;
    line-height: 1.5;
}

/* Elementos gráficos de prévia, caso ainda sejam usados no HTML */
.plan-lines,
.elevation-lines,
.detail-lines,
.iso-lines {
    position: relative;
    width: 75%;
    height: 65%;
    opacity: .85;
}

.plan-lines {
    border: 2px solid #62645a;
    background:
        linear-gradient(90deg, transparent 31%, #77786e 31.5%, #77786e 32%, transparent 32.5%, transparent 68%, #77786e 68.5%, #77786e 69%, transparent 69.5%),
        linear-gradient(0deg, transparent 48%, #77786e 48.5%, #77786e 49%, transparent 49.5%);
}

.plan-lines::before,
.plan-lines::after {
    content: "";
    position: absolute;
    border: 1px solid #77786e;
}

.plan-lines::before {
    top: 8%;
    left: 8%;
    width: 28%;
    height: 34%;
}

.plan-lines::after {
    right: 8%;
    bottom: 8%;
    width: 26%;
    height: 30%;
}

.elevation-lines {
    border: 1px solid #77786e;
    background: repeating-linear-gradient(0deg, transparent 0 20px, #77786e 21px 22px);
}

.elevation-lines::before {
    content: "";
    position: absolute;
    inset: 0 12%;
    border-right: 1px solid #77786e;
    border-left: 1px solid #77786e;
    background: repeating-linear-gradient(90deg, transparent 0 28px, #77786e 29px 30px);
}

.detail-lines {
    border: 1px solid #77786e;
    background: linear-gradient(45deg, transparent 48%, #77786e 49%, #77786e 50%, transparent 51%);
}

.detail-lines::before {
    content: "";
    position: absolute;
    top: -12px;
    right: -15px;
    width: 50px;
    height: 50px;
    border: 1px solid #77786e;
    border-radius: 50%;
    background: #eeece5;
}

.iso-lines {
    transform: rotate(-25deg) skew(25deg);
    border: 2px solid #77786e;
    background: repeating-linear-gradient(0deg, transparent 0 22px, #77786e 23px 24px);
}

.iso-lines::after {
    content: "";
    position: absolute;
    inset: 0 20%;
    border-right: 1px solid #77786e;
    border-left: 1px solid #77786e;
}


/* Texto opcional*/

.sheet-text-card {
    grid-column: span 2;
    grid-row: 2;
    align-self: stretch;
    min-width: 0;
    box-sizing: border-box;
    padding: 32px;
    background: #e9e6dc;
    border: 1px solid #d8d4c9;

    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sheet-text-card .eyebrow {
    font-size: 9px;
}

.sheet-text-card h3 {
    font-size: 18px;
}

.sheet-text-card p {
    font-size: 12px;
    line-height: 1.5;
}

/*Final do texto opcional*/


/* =========================================================
   6. PRÓXIMO PASSO / CHAMADA FINAL
   ========================================================= */

.next-step {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 5px 5%;
    background: #e7e3d9;
}

.next-step h2 {
    margin: 0;
    font-size: clamp(28px, 3vw, 39px);
    line-height: 1.1;
}


/* =========================================================
   7. VISUALIZADOR DE PRANCHAS / LIGHTBOX
   Primeiro clique: abre a prancha ajustada à tela.
   Clique na imagem: amplia.
   Arraste com o mouse: percorre a prancha ampliada.
   ESC ou clique fora: fecha.
   ========================================================= */

body .lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background: rgba(10, 10, 10, .96);
}

body .lightbox.open {
    display: flex;
}

body .lightbox .lightbox-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 45px 10px 15px;
    box-sizing: border-box;
    overflow: hidden;
    color: #fff;
    text-align: center;
}

body .lightbox .lightbox-content h2 {
    position: absolute;
    top: 12px;
    left: 50%;
    width: 90%;
    margin: 0;
    transform: translateX(-50%);
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
}

body .lightbox .lightbox-sheet {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    max-height: none;
    min-height: 0;
    overflow: auto;
    border: none;
    background: transparent;
}

/* Remove a antiga grade ilustrativa do visualizador */
body .lightbox .lightbox-sheet::before {
    display: none;
    content: none;
}

/* Prancha no enquadramento inicial */
body .lightbox .lightbox-sheet img {
    display: block;
    width: auto;
    height: auto;
    max-width: 98vw;
    max-height: 90vh;
    flex: 0 0 auto;
    object-fit: contain;
    cursor: zoom-in;
    user-select: none;
    -webkit-user-drag: none;
    transition: none;
}

/* Estado ampliado: imagem maior que a área visível */
body .lightbox .lightbox-sheet.is-zoomed {
    display: block;
    overflow: auto;
    cursor: grab;
    user-select: none;
}

body .lightbox .lightbox-sheet.is-zoomed img {
    width: 145vw;
    height: auto;
    max-width: none;
    max-height: none;
    margin: 0 auto;
    cursor: grab;
}

/* Mão fechada enquanto o usuário arrasta */
body .lightbox .lightbox-sheet.is-dragging,
body .lightbox .lightbox-sheet.is-dragging img {
    cursor: grabbing;
}

body .lightbox .lightbox-content p {
    position: absolute;
    bottom: 8px;
    margin: 0;
    color: #ccc;
    font-size: 11px;
    text-align: center;
}

body .lightbox .lightbox-close {
    position: fixed;
    top: 8px;
    right: 20px;
    z-index: 100001;
    width: 48px;
    height: 48px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
}


/* =========================================================
   8. RESPONSIVIDADE
   ========================================================= */

/* Tablets */
@media (max-width: 900px) {
    .tool-hero {
        grid-template-columns: 1fr;
    }

    .tool-hero-copy {
        padding: 35px 7%;
    }

    .back-link {
        margin-bottom: 25px;
    }

    .tool-hero-visual {
        min-height: 280px;
    }

    .project-overview {
        grid-template-columns: 1fr;
    }

    .project-meta {
        padding: 0;
    }

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

/* Celulares */
@media (max-width: 600px) {
    .tool-intro {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .project-list {
        padding: 35px 7% 50px;
    }

    .project-heading {
        align-items: flex-start;
    }

    .project-number {
        display: none;
    }

    .project-cover,
    .project-cover img {
        min-height: 240px;
    }

    .deliverables-heading {
        display: block;
    }

    .deliverables-heading>p {
        margin-top: 8px;
    }

    .sheet-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .sheet-info {
        padding: 10px;
    }

    .next-step {
        flex-direction: column;
        align-items: flex-start;
        padding: 35px 7%;
    }

    body .lightbox .lightbox-content {
        padding: 55px 5px 15px;
    }

    body .lightbox .lightbox-sheet img {
        max-width: 96vw;
        max-height: 85vh;
    }

    body .lightbox .lightbox-sheet.is-zoomed img {
        width: 180vw;
    }

    body .lightbox .lightbox-close {
        top: 6px;
        right: 10px;
    }
}


/* =========================================
   ENCERRAMENTO — STUDIO EPÍFITA
========================================= */

/* Neutraliza o grid aplicado ao footer geral */
footer.closing-section {
    display: block;
    grid-template-columns: none;
    gap: 0;
    width: 100%;
    box-sizing: border-box;
    background: #e7e3d9;
    padding: 15px 5% 18px;
}

/* Composição horizontal */
.closing-main {
    position: relative;
    display: grid;
    grid-template-columns: 2fr 1.25fr 1.35fr 1.1fr;
    align-items: center;
    gap: 30px;
    width: 100%;
    padding-bottom: 28px;
    box-sizing: border-box;
}

/* Chamada final */
.closing-title {
    min-width: 0;
    border-top: 1px solid #d2cec3;
    padding-top: 10px;
}

.closing-title .eyebrow,
.closing-cta .eyebrow,
.closing-contact .eyebrow {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.6px;
    color: #555640;
    margin: 0 0 14px;
}

.closing-title h2 {
    margin: 0;
    font-size: clamp(28px, 2.7vw, 38px);
    line-height: 1.08;
    font-weight: 500;
    letter-spacing: -1.5px;
}

/* Marca */
.closing-brand {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 250px;
}

.closing-brand img {
    display: block;
    width: 250px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.closing-brand p {
    margin: 3px 0 0;
    font-size: 9px;
    letter-spacing: 1.5px;
    color: #33332d;
}

/* Botão */
.closing-cta {
    grid-column: 3;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-self: end;
    min-width: 0;
    padding-left: 0;
    transform: none;
    margin-right: -70px;
}

.closing-cta .button {
    white-space: nowrap;
    font-size: 12px;
}

/* Contatos */
.closing-contact {
    grid-column: 4;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-self: end;
    min-width: 0;
    border-left: 1px solid #d2cec3;
    padding: 20px 0 20px 30px;
    margin-left: 0;
}

.closing-contact .eyebrow {
    margin-bottom: 10px;
}

.closing-contact a {
    color: #22221e;
    text-decoration: none;
    font-size: 12px;
    margin-bottom: 8px;
    overflow-wrap: anywhere;
}

.closing-contact a:hover {
    opacity: .6;
}


.closing-bottom small {
    display: block;
    font-size: 9px;
    color: #77766c;
    margin: 0;
    text-align: center;
}

/* Tablet */
@media (max-width: 1000px) {
    .closing-main {
        grid-template-columns: 1.5fr 1fr;
        gap: 30px;
    }

    .closing-contact {
        border-left: none;
        border-top: 1px solid #d2cec3;
        padding: 20px 0 0;
    }
}

/* Celular */
@media (max-width: 600px) {
    footer.closing-section {
        padding: 30px 6% 18px;
    }

    .closing-main {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .closing-title h2 {
        font-size: 32px;
    }

    .closing-contact {
        border-top: 1px solid #d2cec3;
        border-left: none;
        padding-top: 20px;
    }
}

/* Alinhamento da marca com o conteúdo da página */
.site-header .brand {
    margin-left: -29px;
    display: flex;
    align-items: center;
    gap: 0;
}

.site-header .brand-symbol {
    margin-right: 0;
}

.closing-back-link {
    display: inline-block;
    color: #555640;
    text-decoration: none;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.6px;
    margin-bottom: 14px;
    transition: opacity .2s ease;
}

.closing-back-link:hover {
    opacity: .6;
}