/* zerados.vitalzero.cc — folha unica, sem dependencia externa.
   Gerada junto com as paginas por ../tools/build.py — ver CLAUDE.md. */

:root {
    --bg: #0a0c11;
    --bg-soft: #0f131b;
    --surface: #151a25;
    --surface-hi: #1d2431;
    --line: #262e3f;
    --line-hi: #38425a;
    --text: #e9edf5;
    --muted: #8b96ad;
    --muted-dim: #616c82;
    --accent: #6fe3c4;
    --accent-ink: #04150f;
    --radius: 14px;
    --radius-sm: 9px;
    --maxw: 1440px;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 12px 32px -12px rgba(0, 0, 0, .8);
    --ease: cubic-bezier(.2, .7, .3, 1);
}

[data-section="steam"] { --accent: #5ab8f0; --accent-ink: #04131d; }
[data-section="ps5"]   { --accent: #8fa8ff; --accent-ink: #060c22; }
[data-section="retro"] { --accent: #f2ab5c; --accent-ink: #1c1004; }

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

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 400 16px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* halo discreto no topo, na cor da secao */
body::before {
    content: "";
    position: fixed;
    inset: 0 0 auto 0;
    height: 420px;
    background: radial-gradient(1100px 380px at 50% -140px,
                color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: none; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ---------- estrutura ---------- */

.wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 40px);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(1.4) blur(14px);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid var(--line);
}

.topbar .wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 58px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--text);
    font-weight: 640;
    letter-spacing: -.02em;
    font-size: 15px;
    white-space: nowrap;
}

.brand .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.crumb {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: var(--muted);
    font-size: 14px;
}

.crumb .sep { color: var(--muted-dim); }

.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--text); }

.crumb .cur {
    color: var(--text);
    font-weight: 560;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar .spacer { flex: 1 1 auto; }

.navlinks { display: flex; gap: 4px; }

.navlinks a {
    padding: 6px 11px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 520;
    transition: background .15s var(--ease), color .15s var(--ease);
}

.navlinks a:hover { background: var(--surface-hi); color: var(--text); }
.navlinks a[aria-current] { background: var(--surface-hi); color: var(--text); }

@media (max-width: 720px) {
    /* a nav nao cabe ao lado da trilha, mas escondê-la deixaria o celular sem como
       trocar de secao — entao ela quebra pra segunda linha, alinhada a direita */
    .topbar .wrap { flex-wrap: wrap; row-gap: 9px; padding-block: 10px; min-height: 0; }
    .crumb { font-size: 13px; }
    .navlinks { margin-left: auto; }
    .navlinks a { padding: 5px 11px; font-size: 13px; }
}

main { padding-bottom: 72px; }

/* ---------- cabecalhos ---------- */

.hero { padding: clamp(48px, 9vw, 104px) 0 clamp(28px, 4vw, 44px); }

.hero h1 {
    margin: 0;
    font-size: clamp(40px, 8.5vw, 82px);
    line-height: .98;
    letter-spacing: -.045em;
    font-weight: 700;
}

.hero h1 em {
    font-style: normal;
    color: var(--accent);
}

.hero p {
    margin: 18px 0 0;
    max-width: 56ch;
    color: var(--muted);
    font-size: clamp(15px, 1.6vw, 18px);
}

.pagehead {
    padding: clamp(34px, 6vw, 60px) 0 22px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px 24px;
}

.pagehead h1 {
    margin: 0;
    font-size: clamp(28px, 4.6vw, 44px);
    letter-spacing: -.035em;
    line-height: 1.05;
    font-weight: 680;
}

.pagehead .sub { margin: 6px 0 0; color: var(--muted); font-size: 15px; }

/* ---------- numeros ---------- */

.stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 34px;
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.stat .n {
    font-size: clamp(21px, 3vw, 28px);
    font-weight: 660;
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
}

.stat .l {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .09em;
}

/* ---------- chips ---------- */

.chips { display: flex; flex-wrap: wrap; gap: 7px; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 540;
    white-space: nowrap;
}

.chip.on {
    border-color: color-mix(in srgb, var(--accent) 40%, transparent);
    background: color-mix(in srgb, var(--accent) 13%, var(--surface));
    color: var(--accent);
}

/* ---------- secoes da home ---------- */

.sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 18px;
    margin-top: 44px;
}

.section-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}

.section-card:hover {
    border-color: var(--line-hi);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.section-card .collage {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2px;
    aspect-ratio: 16 / 8;
    background: var(--bg-soft);
}

.section-card .collage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.section-card .collage img:first-child { grid-row: span 2; }

.section-card .body { padding: 16px 18px 18px; }

.section-card h2 {
    margin: 0;
    font-size: 19px;
    letter-spacing: -.02em;
    font-weight: 640;
}

.section-card p { margin: 5px 0 13px; color: var(--muted); font-size: 14px; }

.section-card .go {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 580;
}

.section-card .go svg { transition: transform .2s var(--ease); }
.section-card:hover .go svg { transform: translateX(3px); }

/* ---------- filtro ---------- */

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 6px 0 26px;
}

.search {
    position: relative;
    flex: 0 1 320px;
    min-width: 200px;
}

.search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-dim);
    pointer-events: none;
}

.search input {
    width: 100%;
    padding: 9px 12px 9px 36px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 14.5px;
    transition: border-color .15s var(--ease), background .15s var(--ease);
}

.search input::placeholder { color: var(--muted-dim); }

.search input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--surface-hi);
}

.count { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }

.empty {
    display: none;
    padding: 56px 0;
    color: var(--muted);
    text-align: center;
}

.empty.on { display: block; }

/* O filtro esconde card com o atributo `hidden`. A regra do user-agent perde pra qualquer
   `display` vindo de classe (.game e display:flex), entao precisa vir explicita aqui. */
[hidden] { display: none !important; }

/* ---------- grade de jogos ---------- */

.games {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
    gap: 16px;
}

.game {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}

.game:hover {
    border-color: var(--line-hi);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.game .cover {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--bg-soft);
    overflow: hidden;
}

.game .cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s var(--ease);
}

.game:hover .cover img { transform: scale(1.045); }

/* icone quadrado: nao estica, fica centralizado sobre um fundo esfumado */
.game .cover.icon img { object-fit: contain; padding: 14px; }

.game .cover.icon::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--img) center / cover no-repeat;
    filter: blur(26px) saturate(1.5);
    opacity: .5;
    transform: scale(1.3);
}

.game .cover.icon img { position: relative; }

.game .meta { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }

.game h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -.012em;
    line-height: 1.3;
}

.game .line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin-top: auto;
    color: var(--muted);
    font-size: 12.5px;
    font-variant-numeric: tabular-nums;
}

.game .line b { color: var(--text); font-weight: 600; }

/* segunda linha (data): sempre embaixo, sem separador, para os cards ficarem parelhos */
.game .line.sub { margin-top: 0; color: var(--muted-dim); font-size: 12px; }

.game .line .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-dim); }

/* ---------- pagina de jogo ---------- */

.gamehead {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: clamp(16px, 3vw, 28px);
    padding: clamp(30px, 5vw, 52px) 0 8px;
}

.gamehead .icon {
    width: clamp(72px, 11vw, 104px);
    height: clamp(72px, 11vw, 104px);
    flex: none;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--surface);
    object-fit: cover;
}

.gamehead .txt { min-width: 0; }

.gamehead h1 {
    margin: 0 0 9px;
    font-size: clamp(26px, 4.4vw, 42px);
    letter-spacing: -.035em;
    line-height: 1.06;
    font-weight: 690;
}

.gallery-title {
    display: flex;
    align-items: baseline;
    gap: 11px;
    margin: clamp(30px, 4vw, 44px) 0 16px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.gallery-title h2 {
    margin: 0;
    font-size: 13px;
    font-weight: 640;
    text-transform: uppercase;
    letter-spacing: .11em;
    color: var(--accent);
}

.gallery-title span { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 12px;
}

.shot {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--line);
    content-visibility: auto;
    contain-intrinsic-size: auto 190px;
    transition: border-color .2s var(--ease), transform .2s var(--ease);
}

.shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s var(--ease), opacity .2s var(--ease);
}

.shot:hover { border-color: var(--accent); transform: translateY(-2px); }
.shot:hover img { transform: scale(1.05); }

.shot .play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(to top, rgba(0, 0, 0, .5), transparent 55%);
    pointer-events: none;
}

.shot .play span {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--bg) 55%, transparent);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, .28);
    transition: transform .2s var(--ease), background .2s var(--ease);
}

.shot:hover .play span {
    transform: scale(1.1);
    background: color-mix(in srgb, var(--accent) 88%, transparent);
}

.shot .play svg { fill: #fff; margin-left: 2px; }
.shot:hover .play svg { fill: var(--accent-ink); }

/* ---------- lightbox ---------- */

.lb {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    background: rgba(6, 8, 12, .93);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.lb.on { display: grid; grid-template-rows: auto 1fr; }

.lb-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px clamp(12px, 3vw, 22px);
    color: var(--muted);
    font-size: 13.5px;
}

.lb-bar .name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
}

.lb-bar .idx { margin-left: auto; font-variant-numeric: tabular-nums; white-space: nowrap; }

.lb-stage {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 0;
    padding: 0 clamp(8px, 6vw, 76px) clamp(14px, 3vw, 26px);
}

.lb-stage img, .lb-stage video {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    background: #000;
    box-shadow: 0 24px 70px -20px rgba(0, 0, 0, .9);
}

.lb-btn {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: none;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    transition: background .15s var(--ease), border-color .15s var(--ease), opacity .15s var(--ease);
}

.lb-btn:hover { background: var(--surface-hi); border-color: var(--line-hi); }
.lb-btn[hidden] { display: grid !important; visibility: hidden; }

.lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
}

.lb-nav.prev { left: clamp(6px, 1.6vw, 18px); }
.lb-nav.next { right: clamp(6px, 1.6vw, 18px); }

@media (max-width: 620px) {
    .lb-nav { top: auto; bottom: 10px; transform: none; }
}

/* ---------- rodape ---------- */

footer {
    border-top: 1px solid var(--line);
    padding: 26px 0 40px;
    color: var(--muted-dim);
    font-size: 13px;
}

footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
footer a { color: var(--muted); }
footer a:hover { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}
