/* ==========================================================================
   VOLTZ STUDIO — PORTFÓLIO | STYLESHEET
   ========================================================================== */

/* 1. VARIÁVEIS E CONFIGURAÇÕES GLOBAIS
   ========================================================================== */
:root {
    --bg-black: #000000;
    --cyber-red: #FF2A40;
    --bright-crimson: #FF4D61;
    --dark-charcoal: #161214;
    --pure-white: #FFFFFF;
    --gray-text: #A0A0A8;
    --line: rgba(255, 255, 255, .09);
    --font-display: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --transition: all .25s cubic-bezier(.16, 1, .3, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    background: var(--bg-black);
    color: var(--pure-white);
    font-family: var(--font-display);
    line-height: 1.65;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

img {
    max-width: 100%;
    display: block;
}

button, a {
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: 2px solid var(--bright-crimson);
    outline-offset: 4px;
}

::selection {
    background: var(--cyber-red);
    color: white;
}


/* 2. COMPONENTES COMUNS E UTILITÁRIOS
   ========================================================================== */
.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 12px 19px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-weight: 700;
    font-size: .9rem;
    transition: var(--transition);
    cursor: pointer;
}

.button-primary {
    background: var(--cyber-red);
    color: white;
}

.button-primary:hover {
    background: var(--bright-crimson);
    transform: translateY(-2px);
    box-shadow: 0 9px 24px rgba(255, 42, 64, .2);
}

.button-secondary {
    background: rgba(255, 255, 255, .025);
    border-color: rgba(255, 255, 255, .17);
    color: white;
}

.button-secondary:hover {
    border-color: var(--cyber-red);
    color: var(--bright-crimson);
}

.section-wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 94px 28px 100px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 28px;
    margin-bottom: 38px;
}

.section-heading h2,
.institutional-copy h2,
.contact-panel h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -.04em;
}

.section-heading p {
    margin-top: 10px;
    color: var(--gray-text);
}


/* 3. HEADER E NAVEGAÇÃO (Padronizado com a Index)
   ========================================================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(9, 7, 8, 0.85);
    backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 42, 64, 0.1);
}

.nav-container {
    max-width: 1240px;
    min-height: 82px;
    margin: 0 auto;
    padding: 14px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 28px;
}

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

.wordmark {
    display: flex;
    flex-direction: column;
    line-height: 0.9;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(12px, 1.7vw, 26px);
}

.nav-links a {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--pure-white);
    transition: var(--transition);
    white-space: nowrap;
}

.nav-links a:hover {
    border-bottom: 2px solid var(--cyber-red);
}

.nav-links a.active {
    border-bottom: 2px solid var(--cyber-red);
}

.btn-cta-nav {
    display: inline-block;
    background: var(--cyber-red);
    color: var(--pure-white) !important;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.85rem;
    line-height: normal; /* Garante que a altura da linha seja fixa */
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 0 15px rgba(255, 42, 64, 0.25);
    white-space: nowrap; /* Evita que a palavra quebre linha */
}

.btn-cta-nav:hover {
    background: var(--bright-crimson);
    box-shadow: 0 0 20px rgba(255, 77, 97, 0.5);
    transform: translateY(-1px);
}

.hamburger {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    padding: 0;
    z-index: 1001;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background-color: var(--pure-white);
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger:hover span {
    background-color: var(--cyber-red);
}

/* Animação do ícone ao abrir (X) */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}


/* 4. HERO SECTION
   ========================================================================== */
.hero {
    min-height: 510px;
    padding: 140px 28px 96px; /* Ajustado padding superior para compensar o header fixed */
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    background: radial-gradient(ellipse at 82% 30%, rgba(255, 42, 64, .15), transparent 38%),
                linear-gradient(135deg, #090708 55%, #130b0d 100%);
    border-bottom: 1px solid var(--line);
}

.hero::after {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    right: 8%;
    top: 50%;
    transform: translateY(-50%) rotate(15deg);
    border: 1px solid rgba(255, 42, 64, .22);
    border-radius: 28px;
    box-shadow: 0 0 0 28px rgba(255, 42, 64, .025), 0 0 0 56px rgba(255, 42, 64, .02);
    pointer-events: none;
}

.hero-inner {
    max-width: 1184px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.tech-label {
    color: var(--cyber-red);
    font: .76rem var(--font-mono);
    letter-spacing: .04em;
    margin-bottom: 18px;
}

.hero h1 {
    max-width: 760px;
    font-size: clamp(2.8rem, 6vw, 5.2rem);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -.055em;
}

.hero h1 span,
.institutional-copy h2 span {
    color: var(--cyber-red);
}

.hero p {
    max-width: 660px;
    margin-top: 24px;
    color: var(--gray-text);
    font-size: 1.08rem;
}

.hero-actions,
.document-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.hero-index {
    position: absolute;
    z-index: 1;
    right: max(28px, calc((100vw - 1184px) / 2));
    bottom: 30px;
    font: .7rem var(--font-mono);
    color: #747078;
    letter-spacing: .13em;
}

.hero-index span {
    color: var(--cyber-red);
}


/* 5. SEÇÃO DE PROJETOS E FILTROS
   ========================================================================== */
.filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-button {
    padding: 8px 13px;
    background: transparent;
    border: 1px solid var(--line);
    color: #c5c2c4;
    border-radius: 4px;
    cursor: pointer;
    font-size: .8rem;
    transition: var(--transition);
}

.filter-button:hover,
.filter-button.is-active {
    border-color: var(--cyber-red);
    color: white;
    background: rgba(255, 42, 64, .1);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.project-card {
    min-width: 0;
    background: var(--dark-charcoal);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 42, 64, .55);
}

.project-card[hidden] {
    display: none;
}

.project-info {
    padding: 21px 22px 23px;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--bright-crimson);
    font: .68rem var(--font-mono);
    letter-spacing: .04em;
}

.project-meta span:last-child {
    color: #777078;
}

.project-info h3 {
    margin-top: 11px;
    font-size: 1.2rem;
    line-height: 1.3;
}

.project-info p {
    margin-top: 9px;
    color: var(--gray-text);
    font-size: .9rem;
}

.project-link {
    display: inline-flex;
    gap: 9px;
    align-items: center;
    margin-top: 18px;
    color: white;
    font-size: .85rem;
    font-weight: 700;
}

.project-link:hover {
    color: var(--bright-crimson);
}

.empty-state {
    text-align: center;
    padding: 58px 24px;
    border: 1px dashed rgba(255, 255, 255, .17);
    border-radius: 8px;
    background: linear-gradient(140deg, rgba(255, 255, 255, .018), transparent);
}

.empty-mark {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin: 0 auto 17px;
    border: 1px solid rgba(255, 42, 64, .5);
    color: var(--cyber-red);
    border-radius: 50%;
    font-size: 1.7rem;
    font-weight: 300;
}

.empty-state h3 {
    font-size: 1.35rem;
}

.empty-state p {
    max-width: 570px;
    margin: 10px auto 0;
    color: var(--gray-text);
    font-size: .92rem;
}


/* 6. CONTATO E FOOTER
   ========================================================================== */
.contact-section {
    padding: 86px 28px;
}

.contact-panel {
    max-width: 1184px;
    margin: 0 auto;
    padding: 58px 28px;
    text-align: center;
    border: 1px solid rgba(255, 42, 64, .25);
    border-radius: 10px;
    background: radial-gradient(ellipse at center, rgba(255, 42, 64, .12), transparent 70%);
}

.contact-panel .tech-label {
    margin-bottom: 15px;
}

.contact-panel p {
    max-width: 620px;
    margin: 16px auto 0;
    color: var(--gray-text);
}

.contact-panel .button {
    margin-top: 26px;
}

.site-footer {
    max-width: 1240px;
    margin: 0 auto;
    padding: 25px 28px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid var(--line);
    color: var(--gray-text);
    font-size: .78rem;
}

.footer-brand .brand-logo {
    width: 88px;
}

.back-to-top:hover {
    color: var(--bright-crimson);
}


/* 7. MODAL / LIGHTBOX
   ========================================================================== */
.lightbox {
    width: min(94vw, 1100px);
    max-width: none;
    max-height: 92vh;
    margin: auto;
    padding: 52px 18px 18px;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 8px;
    background: #100d0e;
    color: white;
}

.lightbox::backdrop {
    background: rgba(0, 0, 0, .88);
    backdrop-filter: blur(5px);
}

.lightbox img {
    max-height: 75vh;
    width: 100%;
    object-fit: contain;
}

.lightbox p {
    color: var(--gray-text);
    text-align: center;
    margin-top: 12px;
    font-size: .85rem;
}

.lightbox-close {
    position: absolute;
    top: 9px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: white;
    background: #21191c;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
}


/* 8. MEDIA QUERIES & RESPONSIVIDADE (Menu Mobile Igualzinho à Index)
   ========================================================================== */
@media (max-width: 900px) {
    .project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero::after {
        right: -140px;
        opacity: .6;
    }

    .hamburger {
        display: flex;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(9, 7, 8, 0.98);
        backdrop-filter: blur(15px);
        transition: var(--transition);
        z-index: 1000;
        gap: 2.5rem;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.2rem;
    }
}

@media (max-width: 900px) {
    
    .hero {
        min-height: 480px;
        padding: 100px 20px 80px;
    }
    
    .hero h1 {
        font-size: clamp(2.6rem, 12vw, 4rem);
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero::after {
        width: 220px;
        height: 220px;
        right: -125px;
        top: 72%;
    }
    
    .hero-index {
        right: 22px;
        bottom: 18px;
    }
    
    .section-wrap {
        padding: 70px 20px 76px;
    }
    
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 20px;
    }
    
    .filter-list {
        gap: 7px;
    }
    
    .filter-button {
        padding: 8px 10px;
        font-size: .75rem;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
        gap: 17px;
    }
    
    .project-info {
        padding: 19px;
    }
    
    .contact-section {
        padding: 64px 20px;
    }
    
    .contact-panel {
        padding: 44px 20px;
    }
    
    .site-footer {
        padding: 24px 20px 28px;
        flex-wrap: wrap;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .site-footer p {
        order: 3;
        flex-basis: 100%;
    }
}