/* ================== IMPORT FONTS ================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&family=Outfit:wght@200;300&display=swap');

/* ================== RESET ================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

/* ================== HTML ================== */

html{
    scrollbar-gutter:stable;
    -webkit-text-size-adjust:100%;
}

/* ================== BODY ================== */

body{
    min-height:100vh;
    min-height:100dvh;
    display:flex;
    flex-direction:column;

    font-family:'Inter',sans-serif;
    font-weight:300;

    color:#111;
    background:#fff;

    line-height:1.6;
    overflow-x:hidden;
}

/* Bloquear scroll quando o modal está aberto */
body.modal-open{
    overflow:hidden;
}

/* ================== HEADER ================== */
header{
    position:relative;

    display:flex;
    justify-content:space-between;
    align-items:center;

    flex-wrap:wrap;
    gap:20px;

    width:100%;

    padding:30px clamp(25px,5vw,80px);
}

.header-left{
    display:flex;
    align-items:center;
    gap:12px;
}

.logo-link{
    display:flex;
    align-items:center;
    gap:12px;

    text-decoration:none;
    color:inherit;
}

.logo{
    width:42px;
    height:auto;
}

header h1{
    font-size:13px;
    font-weight:300;

    letter-spacing:1.5px;
    text-transform:uppercase;
}

/* ================== NAV ================== */

nav{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:18px;
}

nav a{
    color:#111;
    text-decoration:none;

    font-size:12px;
    font-weight:300;

    letter-spacing:1.2px;
    text-transform:uppercase;

    transition:.3s ease;
}

@media (hover:hover){

    nav a:hover{
        opacity:.6;
    }

}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #111;
    font-size: 30px;
    cursor: pointer;
}

nav a:focus-visible{
    outline:2px solid #111;
    outline-offset:4px;
}

/* ================== HERO ================== */

.hero{
    position:relative;

    width:100%;
    height:100svh;

    overflow:hidden;
}

.hero-image{
    position:absolute;
    inset:0;

    width:100%;
    height:100%;

    object-fit:cover;

    opacity:1;

    transition:opacity .8s ease;
}

/* ================== HERO TEXT ================== */

.hero-text{
    position:absolute;

    top:5%;
    left:50%;

    transform:translateX(-50%);

    z-index:10;

    width:min(92%,1000px);

    color:white;

    text-align:center;
}

.hero-text h2{
    font-family:'Outfit',sans-serif;

    font-size:clamp(2rem,8vw,8rem);

    font-weight:200;

    line-height:.92;

    letter-spacing:-0.04em;

    margin-bottom:20px;
}

.hero-text p{
    font-size:clamp(.95rem,2vw,1.3rem);

    line-height:1.5;

    opacity:.9;
}

/* ================== SECTION ================== */

section{
    padding:60px clamp(25px,5vw,80px);
}

section h3{
    font-size:15px;
    font-weight:500;

    letter-spacing:1.2px;

    margin-bottom:20px;
}

.section-title{
    font-weight:500;
}

section p {
    margin: 0;
}

/* ================== SERVICES ================== */

.service{
    display:flex;
    align-items:flex-start;
    gap:16px;

    margin-bottom:28px;
}

.service-icon{
    width:64px;
    min-width:64px;
    display:flex;
    justify-content:center;
    align-items:flex-start;
}

.service-icon img{
    width:48px;
    height:48px;
    object-fit:contain;
}

.service-content{
    flex:1;
}

.service h4{
    margin:0 0 10px;
    font-size:15px;
    font-weight:500;
    letter-spacing:1px;
    text-transform:uppercase;
}

.service p{
    margin:0;
}

/* ================== CONTACT PAGE ================== */

.contact-service-icon{
    width:28px !important;
    height:28px !important;
    object-fit:contain;
}

.contact-page .service{
    display:flex;
    align-items:flex-start;
    gap:24px;
    margin-bottom:32px;

    color:#111;
    text-decoration:none;
    transition:.3s ease;
}

.contact-page .service-icon{
    width:42px;
    min-width:42px;
}

@media (hover:hover){

    .contact-page .service:hover{
        opacity:.6;
    }

}

.contact-page .service:link,
.contact-page .service:visited,
.contact-page .service:active{
    color:#111;
    text-decoration:none;
}

.contact-page .service:focus-visible{
    outline:2px solid #111;
    outline-offset:4px;
}

/* ================== PROJECT GRID ================== */

.grid{
    display:grid;

    grid-template-columns:
    repeat(auto-fit,minmax(320px,1fr));

    gap:30px;
}

/* ================== PROJECT ================== */

.project{
    position:relative;

    width:100%;

    aspect-ratio:4/5;

    overflow:hidden;

    cursor:pointer;
}

.project img,
.project video{
    width:100%;
    height:100%;

    object-fit:cover;

    display:block;
}

.grayscale{
    filter: grayscale(100%) brightness(1) contrast(1);
}

/* ================== OVERLAY ================== */

.project::before{
    content:"";

    position:absolute;
    inset:0;

    background:rgba(0,0,0,0);

    transition:.3s ease;

    z-index:1;
}

@media (hover:hover){

    .project:hover::before{
        background:rgba(0,0,0,.25);
    }

    .project:hover .project-title{
        opacity:1;
    }

}

.project.touched::before{
    background:rgba(0,0,0,.25);
}

.project.touched .project-title{
    opacity:1;
}

/* ================== PROJECT TITLE ================== */

.project-title{

    position:absolute;

    left:20px;
    right:20px;
    bottom:20px;

    z-index:2;

    color:#fff;

    opacity:0;

    transition:.3s ease;

}

.project-name{

    display:block;

    font-size:16px;

    font-weight:500;

    letter-spacing:1.6px;

    line-height:1.2;

    text-transform:uppercase;

}

.project-location{

    display:block;

    margin-top:5px;

    font-size:11px;

    font-weight:300;

    letter-spacing:1.8px;

    text-transform:uppercase;

    opacity:.85;

}

/* ================= PROJECT SECTION ================= */

.projects-section{
    padding-top:0;
}

/* ================== FOOTER ================== */

footer{
    margin-top:auto;
    padding:80px 60px;
    text-align:center;
}

.social-links{
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
    gap:30px;
    margin-bottom:30px;
}

.social-links a{
    display:flex;
    align-items:center;
    gap:6px;

    color:#111;
    text-decoration:none;

    font-size:12px;
    font-weight:300;
    letter-spacing:1px;

    transition:.3s ease;

    cursor:pointer;
}

.social-icon{
    width:22px;
    height:22px;

    object-fit:contain;
    flex-shrink:0;
}

@media (hover:hover){

    .social-links a:hover{
        opacity:.5;
    }

}

footer p{
    color:#777;
    font-size:11px;
    letter-spacing:1px;
}

/* ================== MODAL ================== */

.modal{
    display:none;
    position:fixed;
    inset:0;

    background:#fff;

    z-index:999999;

    justify-content:center;
    align-items:center;
    flex-direction:column;

    overflow:hidden;
    touch-action:none;
}

#modal-content{
    display:flex;
    justify-content:center;
    align-items:center;

    width:100%;
    height:100dvh;

    overflow:hidden;
    position:relative;

    contain:layout paint;
}

#modal-content img,
#modal-content video{

    position:absolute;

    left:50%;
    top:50%;

    transform:translate(-50%, -50%);

    max-width:90vw;
    max-height:calc(100dvh - 100px);

    object-fit:contain;

    opacity:1;

    transition:
        transform .45s cubic-bezier(.22,.61,.36,1),
        opacity .45s ease;

    will-change:transform,opacity;

    transform-origin:center center;
    transform-style:preserve-3d;

    backface-visibility:hidden;
    -webkit-backface-visibility:hidden;

    user-select:none;
    -webkit-user-drag:none;
}

#modal-content video{
    pointer-events:none;
}

@media (min-width:1600px){
    #modal-content img,
    #modal-content video{
        max-height:calc(100dvh - 130px);
    }
}
/* iPad e tablets na horizontal */
@media (min-width:768px) and (max-width:1366px) and (orientation:landscape){

    #modal-content img,
    #modal-content video{
        max-height:calc(100dvh - 170px);
    }

}

/* ================= PROJECT INFO ================= */

.modal-info{
    position:absolute;
    left:50%;
    bottom:25px;
    transform:translateX(-50%);

    width:100%;
    max-width:700px;
    padding:0 25px;

    z-index:10002;
    pointer-events:none;
}

.modal-info h2{

    font-size:18px;
    font-weight:500;

    margin:0;
    display:none;
}

.modal-details{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:60px;
    flex-wrap:nowrap;
}

.modal-item{

    display:flex;
    align-items:center;
    gap:8px;

    font-size:12px;

    color:#555;

    letter-spacing:.5px;
}

.modal-item img{

    width:18px;
    height:18px;

    object-fit:contain;
}

/* ================== FECHAR ================== */

.close{
    position:absolute;

    top:25px;
    right:30px;

    color:#111;

    font-size:38px;
    font-weight:300;

    cursor:pointer;

    z-index:10001;

    transition:.3s ease;
}

@media (hover:hover){

    .close:hover{
        opacity:.5;
    }

    .prev:hover,
    .next:hover{
        opacity:.5;
    }

}

/* ================== SETAS ================== */

.prev,
.next{
    position:absolute;

    top:50%;

    transform:translateY(-50%);

    color:#111;

    font-size:50px;

    cursor:pointer;

    user-select:none;

    touch-action:manipulation;

    z-index:10000;

    transition:.3s ease;
}

.prev{
    left:25px;
}

.next{
    right:25px;
}

/* ================= CONTACT WIDGET ================= */

.contact-widget{
    display:flex;
    align-items:center;
    line-height:1;

    position:fixed;

    right:100px;
    bottom:max(40px, env(safe-area-inset-bottom));

    z-index:999999;
}

.contact-trigger{

    -webkit-appearance:none;
    appearance:none;

    -webkit-font-smoothing:antialiased;

    display:flex;
    align-items:center;
    justify-content:center;
    gap:6px;

    width:170px;

    height:52px;

    padding:0;
    margin:0;

    border:none;
    border-radius:50px;

    background:rgba(255,255,255,.95);

    box-shadow:
        0 8px 30px rgba(0,0,0,.1);

    font-family:'Inter',sans-serif;
    font-size:11px;
    font-weight:300;
    line-height:1;

    letter-spacing:1.7px;
    text-transform:uppercase;

    color:#111;

    cursor:pointer;

    overflow:hidden;

    transition:.3s ease;

    -webkit-tap-highlight-color:transparent;
}

@media (hover:hover){

    .contact-trigger:hover{

        transform:translateY(-2px);

    }

}

.contact-trigger img{

    display:block;

}

.contact-trigger span{

    display:block;

    line-height:1;

    margin:0;
    padding:0;

}

.contact-icon{

    width:26px;
    height:26px;

    flex-shrink:0;

    object-fit:contain;

}

.contact-links{

    position:absolute;

    right:0;
    bottom:65px;

    display:flex;
    flex-direction:column;

    gap:10px;

    opacity:0;
    visibility:hidden;

    transform:translateY(10px);

    transition:.3s ease;

}

.contact-widget.active .contact-links{

    opacity:1;
    visibility:visible;

    transform:translateY(0);

}

.contact-links a{

    display:flex;
    align-items:center;
    gap:6px;

    background:white;

    padding:14px 22px;

    border-radius:40px;

    color:#111;

    text-decoration:none;

    font-size:12px;

    box-shadow:
        0 10px 30px rgba(0,0,0,.1);

    transition:.3s ease;

}

.contact-link-icon{

    width:20px;
    height:20px;

    flex-shrink:0;

    object-fit:contain;

}

@media (hover:hover){

    .contact-links a:hover{
        transform:translateY(-2px);
    }

}

#back-to-top{

    position:fixed;

    left:100px;
    bottom:max(40px, env(safe-area-inset-bottom));

    width:52px;
    height:52px;

    display:flex;
    align-items:center;
    justify-content:center;

    border:none;
    border-radius:50%;

    background:rgba(255,255,255,.95);

    box-shadow:
        0 8px 30px rgba(0,0,0,.1);

    color:#111;

    cursor:pointer;

    opacity:0;
    visibility:hidden;

    transform:translateY(10px);

    transition:.3s ease;

    z-index:999999;

}

#back-to-top.show{

    opacity:1;
    visibility:visible;

    transform:translateY(0);

}

@media (hover:hover){

    #back-to-top:hover{
        transform:translateY(-2px);
    }

}

#back-to-top svg{

    width:20px;
    height:20px;

}

/* Ajuste exclusivo para iPhone */
@supports (-webkit-touch-callout: none) {

    @media (max-width:767px){

        .contact-widget,
        #back-to-top{
            bottom:max(15px, env(safe-area-inset-bottom));
        }

    }

}

/* ================= RESPONSIVE ================= */

@media (max-width:768px){

    .menu-toggle{
        display:block;
        background:none;
        border:none;
        color:#111;
        font-size:32px;
        cursor:pointer;
    }

    nav{
        display:none;
        position:absolute;
        top:80px;
        right:20px;
        background:#fff;
        padding:20px;
        border-radius:12px;
        box-shadow:0 10px 30px rgba(0,0,0,.15);
        flex-direction:column;
        gap:18px;
        z-index:5000;
    }

    nav.active{
        display:flex;
    }

    .service-icon{
    width:56px;
    min-width:56px;
    }

    .service-icon img{
    width:56px;
    height:56px;
    }

    .service{
    gap:16px;
    margin-bottom:28px;
}

    /* Apenas para a página de contactos */

    .contact-page .service-icon{
    width:40px;
    min-width:40px;
    }

    .contact-page .contact-service-icon{
    width:24px !important;
    height:24px !important;
    }

    .modal-info{
        left:0;
        transform:none;
        width:100%;
        bottom:15px;
        padding:0 16px;
    }

    .modal-info h2{
        font-size:17px;
    }

    .modal-details{
    width:100%;
    justify-content:center;
    gap:20px;
    flex-wrap:wrap;
    }

    .modal-item{
        font-size:11px;
    }
}

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

    .prev,
    .next{
        display:none !important;
    }

}

@media (max-width:480px){

    #modal-content img,
    #modal-content video{
        max-width:95vw;
        max-height:calc(100dvh - 120px);
    }

    .hero-text{
        top:7%;
        width:92%;
    }

    .hero-text h2{
        font-size:clamp(2.8rem,12vw,3.8rem);
    }

    .hero-text p{
        font-size:15px;
    }

    .contact-widget{
        right:35px;
        bottom:max(15px, env(safe-area-inset-bottom));
    }

    #back-to-top{
        left:35px;
        bottom:max(15px, env(safe-area-inset-bottom));

        width:48px;
        height:48px;
    }

    .contact-trigger{
        width:155px;
        height:48px;
        font-size:10px;
    }

}

@media (max-width:390px){

    .hero-text{
        top:6%;
    }

    .hero-text h2{
        font-size:clamp(2.3rem,12vw,3.2rem);
    }

    .hero-text p{
        font-size:13px;
    }

    footer{
        padding:40px 20px;
    }
}

.media-indicators {
    position: absolute;
    left: 50%;
    bottom: 150px;
    transform: translateX(-50%);

    display: flex;
    gap: 8px;

    z-index: 20;
}

.media-indicators span {
    width: 8px;
    height: 8px;
    border-radius: 50%;

    background: rgba(255,255,255,.22);
    box-shadow: 0 0 0 1px rgba(0,0,0,.05);

    transition:
        background .25s ease,
        border-color .25s ease,
        transform .25s ease;
}

.media-indicators span.active {
    background: #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,.10);
    transform: scale(1.4);
}

.fullscreen-btn{

    position:absolute;

    right:24px;
    bottom:24px;

    width:42px;
    height:42px;

    border:none;
    border-radius:50%;

    background:rgba(0,0,0,.35);
    backdrop-filter:blur(10px);

    color:white;
    font-size:22px;

    display:flex;
    align-items:center;
    justify-content:center;

    cursor:pointer;

    opacity:0;
    pointer-events:none;

    transition:
        opacity .25s ease,
        transform .25s ease,
        background .25s ease;

    z-index:10003;

}

.fullscreen-btn.show{

    opacity:1;
    pointer-events:auto;

}

@media (hover:hover){

    .fullscreen-btn:hover{

        background:rgba(0,0,0,.55);
        transform:scale(1.06);

    }

}

/* Ajuste iPad */
@media (min-width:768px) and (max-width:1366px){

    body{
        overscroll-behavior-y:none;
    }

    .contact-widget{
        right:60px;
        bottom:40px;
    }

    #back-to-top{
        left:60px;
        bottom:40px;
    }

}

@media (max-width:768px){
    .fullscreen-btn{
        display:none !important;
    }
}

.fullscreen-btn{
    display: none !important;
}

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

    .media-indicators{
        bottom:60px;
    }

}