/* 1. GLOBAIS E VARIÁVEIS */
:root {
    --bg-color: #0c0c0c;
    --text-color: #e0e0e0;
    --accent-color: #888888;
    --line-color: rgba(255, 255, 255, 0.12);
    --font-display: 'Syne', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --pad-container: 60px;
    --header-height: 90px;
}

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

html, body {
    width: 100%;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body.page-index {
    overflow-x: clip; 
}

body.page-utility {
    height: 100vh;
    height: 100dvh;
    overflow: hidden; 
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

a {
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

ul { 
    list-style: none; 
}

button {
    border: none;
    background: none;
    color: inherit;
    cursor: pointer;
    font-family: inherit;
    outline: none;
}

/* 2. ELEMENTOS COMUNS (Linhas, Header, Footer) */
.grid-lines {
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: -1;
    padding: 0 var(--pad-container);
    transition: padding 0.3s ease;
}

.line {
    width: 1px; 
    height: 100%;
    background: var(--line-color);
    opacity: 0.5;
}

header {
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100%;
    height: var(--header-height);
    padding: 0 var(--pad-container);
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    background: rgba(11, 11, 11, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 200;
    border-bottom: 1px solid var(--line-color);
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
    font-weight: 600;
    transition: padding 0.3s ease, height 0.3s ease;
}

body.page-utility header {
    position: relative;
    border-bottom: none;
    background: none;
    backdrop-filter: none;
    padding-top: 40px;
    height: auto;
}

.logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 16px;
    z-index: 102;
}

/* BADGES DE STATUS (404 e Manutenção) */
.status-badge {
    font-family: var(--font-body);
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 50px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.status-badge.error {
    color: #ff4a4a;
    background: rgba(255, 74, 74, 0.1);
    border: 1px solid rgba(255, 74, 74, 0.3);
}

.status-badge.offline {
    color: var(--bg-color);
    background: var(--text-color);
}

.footer {
    padding: 100px var(--pad-container) 40px;
    border-top: 1px solid var(--line-color);
}

body.page-utility .footer {
    padding: 40px var(--pad-container);
    border-top: none;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-size: 14px;
    text-transform: uppercase;
    line-height: 1.5;
    z-index: 10;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-size: 14px;
    text-transform: uppercase;
    line-height: 1.5;
}

.copyright-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.local-time {
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--accent-color);
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.socials { 
    display: flex; 
    gap: 30px; 
}

/* HOVER LINKS */
.hover-link {
    position: relative;
    display: inline-block;
    overflow: hidden;
    height: 18px;
    line-height: 18px;
    vertical-align: top;
}

.hover-link span, 
.hover-link::after {
    display: block;
    transition: transform 0.4s cubic-bezier(0.76, 0, 0.24, 1);
}

.hover-link::after {
    content: attr(data-replace);
    position: absolute;
    top: 100%; 
    left: 0; 
    width: 100%; 
    height: 100%;
    color: var(--accent-color);
}

.hover-link:hover span { transform: translateY(-100%); }
.hover-link:hover::after { transform: translateY(-100%); }

/* 3. INDEX ESPECÍFICO (Portfólio) */
.loader {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100vh;
    background: var(--bg-color);
    z-index: 9999;
    display: flex; 
    align-items: center;
    padding: 0 var(--pad-container);
}

.loader-bar { 
    width: 0%; 
    height: 2px; 
    background: var(--text-color); 
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.desktop-nav { 
    display: flex; 
    gap: 40px; 
}

.menu-btn { 
    display: none; 
    text-transform: uppercase; 
    font-size: 13px; 
    font-weight: 600; 
    z-index: 102; 
    letter-spacing: 1px; 
    height: 18px; 
    overflow: hidden; 
}

.menu-btn span { 
    display: block; 
    height: 100%; 
    line-height: 18px; 
    transition: transform 0.5s cubic-bezier(0.85, 0, 0.15, 1); 
}

.menu-btn.active span { 
    transform: translateY(-100%); 
}

.mobile-nav {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100dvh;
    background: var(--bg-color); 
    z-index: 101; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center;
    transform: translateY(-100%); 
    transition: transform 0.6s cubic-bezier(0.85, 0, 0.15, 1); 
    padding: 20px; 
    text-align: center;
}

.mobile-nav.active { transform: translateY(0); }

.mobile-nav a { 
    font-family: var(--font-display); 
    font-size: clamp(32px, 8vw, 60px); 
    margin: 10px 0; 
    text-transform: uppercase; 
    font-weight: 700; 
    color: var(--text-color); 
}

.mobile-socials { 
    margin-top: 40px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 30px; 
}

.mobile-socials a { 
    display: flex; 
    color: var(--accent-color); 
    transition: color 0.3s ease; 
    -webkit-tap-highlight-color: transparent; 
}

.mobile-socials a:hover { color: var(--text-color); }

.mobile-socials svg { 
    width: 28px; 
    height: 28px; 
    fill: currentColor; 
}

.section-label {
    font-family: var(--font-display); 
    font-size: 15px; 
    text-transform: uppercase; 
    letter-spacing: 1.5px;
    color: var(--accent-color); 
    margin-bottom: 30px; 
    display: block; 
    border-bottom: 1px solid var(--line-color); 
    padding-bottom: 15px;
}

/* HERO SECTION */
.hero { 
    min-height: 100dvh; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    padding: 0 var(--pad-container); 
    padding-top: var(--header-height); 
}

.hero h1 { 
    font-family: var(--font-display); 
    font-size: clamp(24px, 8.5vw, 130px); 
    line-height: 0.85; 
    text-transform: uppercase; 
    font-weight: 800; 
    margin-bottom: 30px; 
    letter-spacing: -0.03em; 
    width: 100%; 
}

.hero h1 .line-wrapper { 
    overflow: hidden; 
    padding-bottom: 5px; 
}

.hero h1 span { 
    display: block; 
    transform: translateY(100%); 
    will-change: transform; 
}

.hero p { 
    max-width: 500px; 
    color: var(--accent-color); 
    font-size: clamp(16px, 2vw, 20px); 
    line-height: 1.5; 
    margin-left: 5px; 
}

/* ABOUT SECTION */
.about { 
    padding: 120px var(--pad-container); 
    border-bottom: 1px solid var(--line-color); 
}

.about-grid { 
    display: grid; 
    grid-template-columns: 1.4fr 1fr; 
    gap: 80px; 
    margin-top: 40px; 
}

.about-bio h3 { 
    font-family: var(--font-display); 
    font-size: clamp(24px, 4vw, 36px); 
    text-transform: uppercase; 
    margin-bottom: 30px; 
    line-height: 1.2; 
}

.about-bio p { 
    font-size: clamp(16px, 1.5vw, 18px); 
    line-height: 1.6; 
    color: var(--accent-color); 
    margin-bottom: 20px; 
}

.about-services { 
    padding-left: 40px; 
    border-left: 1px solid var(--line-color); 
}

.service-list li { 
    font-family: var(--font-display); 
    font-size: 18px; 
    text-transform: uppercase; 
    padding: 20px 0; 
    border-bottom: 1px solid var(--line-color); 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.service-list li span:last-child { 
    color: var(--accent-color); 
    font-family: var(--font-body); 
    font-size: 13px; 
    text-transform: none; 
    text-align: right; 
}

/* WORK SECTION */
.work { 
    padding: 120px var(--pad-container); 
    position: relative; 
}

.project-item { 
    padding: 60px 0; 
    border-bottom: 1px solid var(--line-color); 
    display: flex; 
    justify-content: space-between; 
    align-items: baseline; 
    cursor: pointer; 
    position: relative; 
    transition: opacity 0.3s; 
    text-decoration: none; 
}

.project-item:hover { opacity: 0.5; }

.project-name { 
    font-family: var(--font-display); 
    font-size: clamp(32px, 6vw, 80px); 
    text-transform: uppercase; 
    font-weight: 700; 
    z-index: 2; 
    letter-spacing: -1px; 
    transition: transform 0.3s ease; 
}

.project-cat { 
    font-size: 13px; 
    text-transform: uppercase; 
    color: var(--accent-color); 
    text-align: right; 
    letter-spacing: 1.3px; 
}

/* FOOTER CTA */
.footer-cta { 
    font-family: var(--font-display); 
    font-size: clamp(40px, 11vw, 140px); 
    text-transform: uppercase; 
    font-weight: 800; 
    line-height: 1; 
    display: inline-block; 
    margin-bottom: 80px; 
    color: var(--text-color); 
    transition: color 0.4s ease, -webkit-text-stroke 0.4s ease, transform 0.4s cubic-bezier(0.25, 1, 0.5, 1); 
    -webkit-text-stroke: 2px transparent; 
    transform-origin: left center; 
}

.footer-cta:hover { 
    color: transparent; 
    -webkit-text-stroke: 2px #ffffff; 
    transform: scale(0.97); 
}

/* MODAIS DE PROJETO */
.project-modal { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100vh; 
    height: 100dvh; 
    background: rgba(12, 12, 12, 0.98); 
    z-index: 9999; 
    display: block; 
    overflow-y: auto; 
    -webkit-overflow-scrolling: touch; 
    overscroll-behavior: none; 
    opacity: 0; 
    pointer-events: none; 
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px); 
}

.project-modal.active { 
    opacity: 1; 
    pointer-events: auto; 
    visibility: visible;
}

.modal-content { 
    width: 100%; 
    max-width: 1200px; 
    margin: 60px auto; 
    padding: 0 var(--pad-container); 
    position: relative; 
    display: flex; 
    flex-direction: column; 
}

.modal-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-top: 40px; 
    margin-bottom: 20px; 
}

.modal-header h2 { 
    font-family: var(--font-display); 
    font-size: clamp(24px, 4vw, 36px); 
    text-transform: uppercase; 
    margin: 0; 
}

.close-modal { 
    font-family: var(--font-display); 
    text-transform: uppercase; 
    font-size: 14px; 
    font-weight: 600; 
    letter-spacing: 1px; 
    color: var(--text-color); 
    transition: color 0.3s; 
    padding: 10px 0; 
}

.close-modal:hover { color: var(--accent-color); }

.modal-body { 
    display: flex; 
    flex-direction: column; 
    padding-bottom: 40px; 
}

.modal-body iframe, 
.modal-image, 
.modal-video { 
    width: 100%; 
    height: 75vh; 
    min-height: 550px; 
    border: 1px solid var(--line-color); 
    border-radius: 4px; 
    margin-bottom: 40px; 
    background: #ffffff; 
    pointer-events: none;
}

.modal-image, 
.modal-video { 
    object-fit: cover; 
    object-position: top; 
    background: #111; 
}

.modal-description { 
    margin-bottom: 30px; 
    color: var(--accent-color); 
    font-size: clamp(14px, 1.5vw, 16px); 
    line-height: 1.6; 
    text-align: center; 
    max-width: 800px; 
    margin-left: auto; 
    margin-right: auto; 
}

.visit-btn { 
    display: inline-block; 
    padding: 12px 24px; 
    border: 1px solid var(--line-color); 
    font-family: var(--font-display); 
    text-transform: uppercase; 
    font-size: 13px; 
    text-align: center; 
    transition: all 0.3s; 
    width: fit-content; 
    margin: 0 auto; 
}

.visit-btn:hover { 
    background: var(--text-color); 
    color: var(--bg-color); 
}

/* 4. PÁGINAS UTILITÁRIAS (404 e Maintenance) */
.util-main { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    padding: 0 var(--pad-container); 
    z-index: 10; 
}

.util-main h1 { 
    font-family: var(--font-display); 
    line-height: 0.9; 
    text-transform: uppercase; 
    font-weight: 800; 
    margin-bottom: 20px; 
    letter-spacing: -0.03em; 
}

.util-main h1 .line-wrapper { 
    overflow: hidden; 
    padding-bottom: 15px; 
    padding-top: 5px; 
}

.util-main h1 span { 
    display: block; 
    transform: translateY(100%); 
    will-change: transform; 
}

.util-main p { 
    max-width: 500px; 
    color: var(--accent-color); 
    font-size: clamp(16px, 2vw, 20px); 
    line-height: 1.5; 
    margin-left: 5px; 
    margin-bottom: 40px; 
    opacity: 0; 
}

/* Tamanhos específicos para os H1 gigantes e botão */
.page-404 .util-main h1 { font-size: clamp(32px, 8.5vw, 180px); }
.page-maint .util-main h1 { font-size: clamp(32px, 7.5vw, 100px); letter-spacing: -0.02em; }

.home-btn { 
    display: inline-block; 
    padding: 14px 32px; 
    border: 1px solid var(--line-color); 
    font-family: var(--font-display); 
    text-transform: uppercase; 
    font-size: 13px; 
    font-weight: 600; 
    letter-spacing: 1px; 
    text-align: center; 
    transition: all 0.3s ease; 
    width: fit-content; 
    margin-left: 5px; 
    border-radius: 50px; 
    opacity: 0; 
}

.home-btn:hover { 
    background: var(--text-color); 
    color: var(--bg-color); 
}

/* 5. RESPONSIVO GLOBAL */
@media (max-width: 1024px) {
    :root { 
        --pad-container: 40px; 
    }
    .desktop-nav { display: none; }
    .menu-btn { display: block; }
    .about-grid { gap: 40px; }
    .about-services { padding-left: 30px; }
    .page-404 .util-main h1 { font-size: 8vw; }
}

@media (max-width: 900px) {
    .about-grid { 
        grid-template-columns: 1fr; 
        gap: 50px; 
    }
    .about-services { 
        padding-left: 0; 
        border-left: none; 
        border-top: 1px solid var(--line-color); 
        padding-top: 40px; 
    }
}

@media (max-width: 768px) {
    :root { 
        --pad-container: 24px; 
        --header-height: 70px; 
    }
    
    .grid-lines .line:nth-child(2), 
    .grid-lines .line:nth-child(3) { display: none; }
    
    .hero h1 { margin-bottom: 20px; }
    .about { padding: 80px var(--pad-container); }
    
    .project-item { 
        padding: 40px 0; 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 10px; 
    }
    
    .project-item:hover { opacity: 1; }
    .project-name { transform: none; }
    
    .footer { padding-top: 60px; }
    .footer-bottom { 
        flex-direction: column-reverse; 
        gap: 40px; 
        align-items: flex-start; 
    }
    
    .socials { 
        flex-wrap: wrap; 
        gap: 20px; 
        width: 100%; 
    }
    
    .socials a { 
        flex: 1; 
        white-space: nowrap; 
    }

    /* Ajustes utilitários Mobile */
    .page-404 .util-main h1 { font-size: 11vw; letter-spacing: -0.04em; }
    .page-maint .util-main h1 { font-size: 7vw; letter-spacing: -0.05em; }
    
    .logo { 
        font-size: 13px; 
        white-space: nowrap; 
    }
    
    body.page-utility .footer { 
        flex-direction: column-reverse; 
        gap: 30px; 
        align-items: flex-start; 
    }
    
    body.page-utility .socials a { 
        flex: unset; 
        font-size: 13px; 
    }
}

@media (max-width: 380px) {
    .hero h1 { font-size: 42px; }
    .service-list li { 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 5px; 
    }
    .service-list li span:last-child { 
        text-align: left; 
        opacity: 0.7; 
    }
}