/* Topo e capa da home. Carregado depois do index.css. */
:root {
    --rap-verde: #8CF50F;
    --rap-verde-escuro: #12A30B;
    --rap-laranja: #E4641F;
    --rap-preto: #050704;
    --rap-osso: #F4F7EF;
    --rap-topo: 64px;
}

html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: var(--rap-topo); }

.topo *, .capa * { font-family: 'Barlow', Arial, sans-serif; }

/* ---------- Topo ---------- */
header.topo {
    padding: 0;
    height: var(--rap-topo);
    background: transparent;
    border-bottom: 2px solid transparent;
    backdrop-filter: none;
    transition: background-color .25s, border-color .25s;
}
header.topo::before {
    content: '';
    position: absolute;
    inset: 0 0 -32px;
    background: linear-gradient(rgba(5, 7, 4, .85), transparent);
    pointer-events: none;
    transition: opacity .25s;
}
header.topo.rolou, header.topo.aberto {
    background: var(--rap-preto);
    border-bottom-color: var(--rap-verde-escuro);
}
header.topo.rolou::before, header.topo.aberto::before { opacity: 0; }

.topo-barra {
    position: relative;
    max-width: 1280px;
    height: 100%;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.topo-marca img { display: block; width: 150px; height: auto; }

nav.topo-menu ul { display: flex; align-items: center; gap: 32px; list-style: none; }
nav.topo-menu a {
    display: block;
    padding: 10px 0;
    font: italic 700 1.2rem/1 'Barlow Condensed', Arial, sans-serif;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--rap-osso);
}
nav.topo-menu a:hover, nav.topo-menu a.active { color: var(--rap-verde); }
nav.topo-menu a::after { background: var(--rap-verde); height: 3px; transform: skewX(-20deg); }
nav.topo-menu a.topo-acesso {
    padding: 10px 20px;
    border: 2px solid var(--rap-verde);
    transform: skewX(-8deg);
}
nav.topo-menu a.topo-acesso::after { display: none; }
nav.topo-menu a.topo-acesso:hover, nav.topo-menu a.topo-acesso.active { background: var(--rap-verde); color: var(--rap-preto); }

.topo-botao { display: none; }
.topo a:focus-visible, .topo button:focus-visible, .capa a:focus-visible {
    outline: 3px solid var(--rap-osso);
    outline-offset: 3px;
}

/* ---------- Capa ---------- */
.capa {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background: var(--rap-preto);
    isolation: isolate;
}
.capa-foto { position: absolute; inset: 0; z-index: -2; }
.capa-foto img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 70%; }
.capa::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(to top, var(--rap-preto) 0%, rgba(5, 7, 4, .75) 22%, transparent 55%),
        linear-gradient(to right, rgba(5, 7, 4, .7), transparent 55%);
}
.capa-conteudo { width: 100%; max-width: 1280px; margin: 0 auto; padding: 96px 16px 48px; }

h1.capa-titulo { position: relative; width: min(100%, 540px); margin-bottom: 24px; isolation: isolate; }
.capa-titulo img { display: block; width: 100%; height: auto; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .6)); }
.capa-splat {
    position: absolute;
    z-index: -1;
    width: 50%;
    aspect-ratio: 1;
    left: 26%;
    top: 42%;
    translate: 0 -50%;
    background: var(--rap-laranja);
    -webkit-mask: url('../img/topo/splat.svg') center / contain no-repeat;
    mask: url('../img/topo/splat.svg') center / contain no-repeat;
    opacity: .92;
}

.capa p.capa-chamada {
    max-width: 18em;
    font: italic 800 clamp(1.7rem, 3.4vw, 2.6rem)/1.05 'Barlow Condensed', Arial, sans-serif;
    text-transform: uppercase;
    color: var(--rap-osso);
}
.capa p.capa-texto { max-width: 34em; margin-top: 10px; font-size: 1.05rem; color: #D5DBCD; }

.capa-acoes { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.capa a.capa-btn {
    padding: 14px 28px;
    border: 2px solid var(--rap-osso);
    font: italic 700 1.25rem/1 'Barlow Condensed', Arial, sans-serif;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    color: var(--rap-osso);
    transform: skewX(-8deg);
    transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.capa a.capa-btn:hover { background: var(--rap-osso); color: var(--rap-preto); transform: skewX(-8deg) translateY(-3px); }
.capa a.capa-btn-cheio {
    border-color: var(--rap-verde);
    background: linear-gradient(var(--rap-verde), var(--rap-verde-escuro));
    color: var(--rap-preto);
}
.capa a.capa-btn-cheio:hover { background: var(--rap-verde); border-color: var(--rap-verde); }

/* tinta ao tocar na capa (criada pelo topo.js) */
.capa-tiro {
    position: absolute;
    z-index: 0;
    width: 110px;
    height: 110px;
    margin: -55px 0 0 -55px;
    pointer-events: none;
    -webkit-mask: url('../img/topo/splat.svg') center / contain no-repeat;
    mask: url('../img/topo/splat.svg') center / contain no-repeat;
    animation: tiro 2.2s ease-out forwards;
}
.capa-conteudo { position: relative; z-index: 1; }

/* ---------- Celular e tablet ---------- */
@media (max-width: 860px) {
    .topo-botao {
        display: flex;
        align-items: center;
        gap: 10px;
        min-height: 44px;
        padding: 0 4px;
        background: none;
        border: 0;
        color: var(--rap-osso);
        cursor: pointer;
    }
    .js .topo-botao-texto, .topo-botao-texto { font: italic 700 1.1rem/1 'Barlow Condensed', Arial, sans-serif; text-transform: uppercase; }
    .topo-botao-icone { display: grid; gap: 5px; width: 28px; }
    .topo-botao-icone i { height: 3px; background: var(--rap-verde); transform: skewX(-30deg); transition: transform .2s, opacity .2s; }
    .aberto .topo-botao-icone i:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .aberto .topo-botao-icone i:nth-child(2) { opacity: 0; }
    .aberto .topo-botao-icone i:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    nav.topo-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        max-height: calc(100vh - var(--rap-topo));
        overflow-y: auto;
        padding: 8px 16px 24px;
        background: var(--rap-preto);
        border-bottom: 2px solid var(--rap-verde-escuro);
        visibility: hidden;
        opacity: 0;
        transform: translateY(-8px);
        transition: opacity .2s, transform .2s, visibility .2s;
    }
    .aberto nav.topo-menu { visibility: visible; opacity: 1; transform: none; }
    nav.topo-menu ul { flex-direction: column; align-items: stretch; gap: 4px; }
    nav.topo-menu a { font-size: 1.7rem; padding: 12px 0; }
    nav.topo-menu a::after { display: none; }
    nav.topo-menu a.topo-acesso { margin-top: 8px; text-align: center; }
}

@media (max-width: 767px) {
    .capa { flex-direction: column; justify-content: flex-end; align-items: stretch; }
    .capa-foto { bottom: auto; height: 62%; }
    .capa::after {
        background: linear-gradient(to bottom, transparent 36%, rgba(5, 7, 4, .8) 52%, var(--rap-preto) 62%);
    }
    .capa-conteudo { padding: 0 16px 32px; text-align: center; }
    h1.capa-titulo { margin: 0 auto 18px; }
    .capa-splat { width: 42%; left: 29%; }
    .capa p.capa-chamada, .capa p.capa-texto { margin-left: auto; margin-right: auto; }
    .capa-acoes { flex-direction: column; margin-top: 22px; padding: 0 6px; }
}

/* ---------- Animação de entrada (um único momento) ---------- */
@media (prefers-reduced-motion: no-preference) {
    .capa-foto img { animation: foto 2.4s cubic-bezier(.2, .7, .2, 1) both; }
    .capa-splat { animation: splat .5s .35s cubic-bezier(.2, 1.6, .4, 1) both; }
    .capa-titulo img { animation: carimbo .45s .6s cubic-bezier(.2, 1.4, .4, 1) both; }
    .capa-chamada, .capa-texto, .capa-acoes { animation: entra .5s ease-out both; }
    .capa-chamada { animation-delay: .9s; }
    .capa-texto { animation-delay: 1s; }
    .capa-acoes { animation-delay: 1.1s; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .topo *, .capa * { transition: none !important; }
}

@keyframes foto { from { transform: scale(1.12); } to { transform: scale(1); } }
@keyframes splat { from { opacity: 0; scale: .15; rotate: -40deg; } to { opacity: .92; scale: 1; rotate: 0deg; } }
@keyframes carimbo { from { opacity: 0; transform: scale(1.5); } to { opacity: 1; transform: scale(1); } }
@keyframes entra { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
@keyframes tiro {
    0% { opacity: 1; scale: .2; }
    8% { scale: 1.1; }
    14% { scale: 1; }
    65% { opacity: .9; translate: 0 6px; }
    100% { opacity: 0; translate: 0 18px; }
}
