/* =========================================================
   TOKENS
========================================================= */
:root{
    --bg: #0B1120;
    --bg-raised: #121B2E;
    --line: #24314A;
    --line-soft: #1A2338;
    --paper: #EDEFF3;
    --muted: #8C9AB5;
    --signal: #FFB100;
    --signal-mint: #3ED598;

    --fonte-titulo: 'Space Grotesk', sans-serif;
    --fonte-corpo: 'IBM Plex Sans', sans-serif;
    --fonte-mono: 'IBM Plex Mono', monospace;

    --largura-maxima: 1180px;
}

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

html{
    scroll-behavior: smooth;
}

body{
    background-color: var(--bg);
    color: var(--paper);
    font-family: var(--fonte-corpo);
    overflow-x: hidden;
}

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

a{
    color: inherit;
}

.rotulo{
    font-family: var(--fonte-mono);
    font-size: 13px;
    color: var(--signal);
    margin-bottom: 14px;
}

@media (prefers-reduced-motion: reduce){
    *{
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* =========================================================
   TOPO / NAVEGAÇÃO
========================================================= */
.topo-fixo{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 500;

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

    padding: 22px 60px;

    background: rgba(11, 17, 32, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line-soft);
}

.marca{
    font-family: var(--fonte-titulo);
    font-size: 22px;
    font-weight: 600;
    text-decoration: none;
    color: var(--paper);
    letter-spacing: 0.5px;
}

.marca span{
    color: var(--signal);
}

.menu{
    display: flex;
    gap: 40px;
}

.menu a{
    text-decoration: none;
    color: var(--paper);
    font-size: 16px;
    position: relative;
    padding-bottom: 4px;
}

.menu a::after{
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background-color: var(--signal);
    transition: width 0.25s ease;
}

.menu a:hover::after{
    width: 100%;
}

.hamburger{
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1002;
}

.hamburger span{
    width: 26px;
    height: 2px;
    background-color: var(--paper);
    transition: 0.3s;
}

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

.menu-overlay{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s;
    z-index: 900;
}

.menu-overlay.active{
    opacity: 1;
    pointer-events: all;
}

.menu-mobile{
    position: fixed;
    top: 0;
    right: -100%;
    width: min(78%, 320px);
    height: 100vh;
    background-color: var(--bg-raised);
    border-left: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 30px;
    padding-left: 48px;
    transition: right 0.4s ease;
    z-index: 1000;
}

.menu-mobile.active{
    right: 0;
}

.menu-mobile a{
    text-decoration: none;
    color: var(--paper);
    font-size: 22px;
    font-family: var(--fonte-titulo);
}

/* =========================================================
   HERO
========================================================= */
.hero{
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 140px 80px 100px;
    isolation: isolate;
}

.hero-grade{
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--line-soft) 1px, transparent 1px),
        linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 30% 40%, black 40%, transparent 85%);
    mask-image: radial-gradient(ellipse 80% 60% at 30% 40%, black 40%, transparent 85%);
    z-index: -1;
}

.hero-conteudo{
    max-width: 760px;
}

.hero-tag{
    font-family: var(--fonte-mono);
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 28px;
}

.hero-titulo{
    font-family: var(--fonte-titulo);
    font-weight: 600;
    font-size: clamp(40px, 6vw, 76px);
    line-height: 1.08;
    letter-spacing: -1px;
}

.hero-titulo em{
    font-style: normal;
    color: var(--signal);
}

.hero-linha-codigo{
    font-family: var(--fonte-mono);
    font-size: 19px;
    color: var(--paper);
    margin-top: 36px;
}

.hero-linha-codigo .prompt{
    color: var(--signal-mint);
    margin-right: 10px;
}

.cursor{
    display: inline-block;
    margin-left: 2px;
    color: var(--signal);
    animation: piscar 1s steps(1) infinite;
}

@keyframes piscar{
    50%{ opacity: 0; }
}

.hero-cta{
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 48px;
}

.btn{
    font-family: var(--fonte-corpo);
    font-weight: 500;
    font-size: 15px;
    text-decoration: none;
    padding: 15px 28px;
    border-radius: 2px;
    transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}

.btn-cheio{
    background-color: var(--signal);
    color: var(--bg);
}

.btn-cheio:hover{
    background-color: #ffc640;
}

.btn-linha{
    border: 1px solid var(--line);
    color: var(--paper);
}

.btn-linha:hover{
    border-color: var(--signal);
    color: var(--signal);
}

.hero-cantos{
    position: absolute;
    inset: 40px;
    pointer-events: none;
}

.canto{
    position: absolute;
    width: 22px;
    height: 22px;
    border: 1px solid var(--line);
}

.canto-tl{ top: 0; left: 0; border-right: none; border-bottom: none; }
.canto-tr{ top: 0; right: 0; border-left: none; border-bottom: none; }
.canto-bl{ bottom: 0; left: 0; border-right: none; border-top: none; }
.canto-br{ bottom: 0; right: 0; border-left: none; border-top: none; }

.scroll-hint{
    position: absolute;
    bottom: 40px;
    left: 80px;
    width: 26px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 20px;
}

.scroll-hint span{
    position: absolute;
    top: 8px;
    left: 50%;
    width: 4px;
    height: 8px;
    background-color: var(--signal);
    border-radius: 2px;
    transform: translateX(-50%);
    animation: rolar 1.6s ease-in-out infinite;
}

@keyframes rolar{
    0%{ opacity: 1; transform: translate(-50%, 0); }
    70%{ opacity: 0; transform: translate(-50%, 16px); }
    100%{ opacity: 0; transform: translate(-50%, 0); }
}

/* =========================================================
   SOBRE
========================================================= */
.sobre{
    position: relative;
    max-width: var(--largura-maxima);
    margin: 0 auto;
    padding: 140px 80px;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 60px;
    border-top: 1px solid var(--line-soft);
}

.sobre-marca{
    font-family: var(--fonte-mono);
    font-size: 64px;
    color: var(--line);
    line-height: 1;
}

.sobre-conteudo{
    max-width: 640px;
}

.sobre-titulo{
    font-family: var(--fonte-titulo);
    font-weight: 600;
    font-size: clamp(28px, 3.4vw, 40px);
    line-height: 1.2;
    margin-bottom: 28px;
}

.sobre-conteudo p{
    font-size: 17px;
    line-height: 1.75;
    color: var(--muted);
    margin-bottom: 20px;
}

/* =========================================================
   PORTFOLIO
========================================================= */
.portfolio{
    max-width: var(--largura-maxima);
    margin: 0 auto;
    padding: 60px 80px 140px;
}

.portfolio-cabecalho{
    margin-bottom: 56px;
}

.portfolio-cabecalho h2,
.contato-conteudo h2{
    font-family: var(--fonte-titulo);
    font-weight: 600;
    font-size: clamp(30px, 4vw, 44px);
}

.portfolio-grade{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background-color: var(--line-soft);
    border: 1px solid var(--line-soft);
}

.ficha{
    background-color: var(--bg);
    position: relative;
    transition: background-color 0.25s ease;
}

.ficha:hover{
    background-color: var(--bg-raised);
}

.ficha-media{
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-bottom: 1px solid var(--line-soft);
}

.ficha-media img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(40%);
    transition: filter 0.3s ease, transform 0.5s ease;
}

.ficha:hover .ficha-media img{
    filter: grayscale(0%);
    transform: scale(1.04);
}

.ficha-status{
    position: absolute;
    top: 14px;
    right: 14px;
    font-family: var(--fonte-mono);
    font-size: 11px;
    padding: 5px 10px;
    background-color: var(--bg);
    border: 1px solid var(--line);
    color: var(--muted);
}

.concluido .ficha-status{
    color: var(--signal-mint);
    border-color: var(--signal-mint);
}

.andamento .ficha-status{
    color: var(--signal);
    border-color: var(--signal);
}

.ficha-corpo{
    padding: 26px 28px 30px;
}

.ficha-corpo h3{
    font-family: var(--fonte-titulo);
    font-size: 20px;
    margin-bottom: 10px;
}

.ficha-corpo p{
    font-size: 14.5px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

.ficha-link{
    font-family: var(--fonte-mono);
    font-size: 13px;
    text-decoration: none;
    color: var(--paper);
    border-bottom: 1px solid var(--line);
    padding-bottom: 3px;
    transition: color 0.2s, border-color 0.2s;
}

.ficha-link:hover{
    color: var(--signal);
    border-color: var(--signal);
}

/* =========================================================
   CONTATO
========================================================= */
.contato{
    max-width: var(--largura-maxima);
    margin: 0 auto;
    padding: 100px 80px 80px;
    border-top: 1px solid var(--line-soft);
}

.contato-conteudo{
    max-width: 560px;
    margin-bottom: 56px;
}

.contato-texto{
    color: var(--muted);
    font-size: 16px;
    line-height: 1.7;
    margin-top: 18px;
}

.contato-lista{
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--line-soft);
}

.contato-lista li{
    border-bottom: 1px solid var(--line-soft);
    border-right: 1px solid var(--line-soft);
}

.contato-lista li:last-child{
    border-right: none;
}

.contato-lista a{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    text-decoration: none;
    padding: 26px 20px;
    font-size: 15px;
    transition: background-color 0.25s;
}

.contato-lista a:hover{
    background-color: var(--bg-raised);
    color: var(--signal);
}

.contato-lista i{
    font-size: 20px;
}

.rodape{
    margin-top: 56px;
    font-family: var(--fonte-mono);
    font-size: 13px;
    color: var(--line);
}

/* =========================================================
   ACESSIBILIDADE
========================================================= */
a:focus-visible,
button:focus-visible{
    outline: 2px solid var(--signal);
    outline-offset: 3px;
}

/* =========================================================
   TABLET
========================================================= */
@media (max-width: 1024px){
    .topo-fixo, .hero, .sobre, .portfolio, .contato{
        padding-left: 40px;
        padding-right: 40px;
    }

    .sobre{
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .sobre-marca{
        font-size: 40px;
    }

    .portfolio-grade{
        grid-template-columns: repeat(2, 1fr);
    }

    .contato-lista{
        grid-template-columns: repeat(2, 1fr);
    }

    .contato-lista li:nth-child(2){
        border-right: none;
    }
}

/* =========================================================
   MOBILE
========================================================= */
@media (max-width: 640px){
    .menu{
        display: none;
    }

    .hamburger{
        display: flex;
    }

    .topo-fixo, .hero, .sobre, .portfolio, .contato{
        padding-left: 24px;
        padding-right: 24px;
    }

    .hero{
        padding-top: 120px;
        min-height: auto;
        padding-bottom: 80px;
    }

    .hero-cantos{
        display: none;
    }

    .scroll-hint{
        left: 24px;
    }

    .sobre, .portfolio, .contato{
        padding-top: 80px;
        padding-bottom: 80px;
    }

    .portfolio-grade{
        grid-template-columns: 1fr;
    }

    .contato-lista{
        grid-template-columns: 1fr 1fr;
    }
}
