/* ============================================================================
   site.css — Layout do site LixStudios / Legend of Legaia Remake
   Depende de theme.css (tokens, .jrpg-card, .corner, .btn, .key-badge).
   ============================================================================ */

/* ============================================================
   FUNDO FIXO — port do #options-bg + vinheta + particulas
   ============================================================ */

#site-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background:
        linear-gradient(160deg, rgba(16, 34, 66, 0.55) 0%, transparent 48%),
        linear-gradient(205deg, rgba(24, 18, 56, 0.45) 0%, transparent 42%),
        linear-gradient(180deg, rgba(2, 10, 24, 0.97) 0%, rgba(2, 8, 20, 0.94) 100%);
}

#site-vignette {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow: inset 0 0 240px rgba(0, 0, 0, 0.85);
}

#site-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.opt-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: var(--gold);
    opacity: 0;
    will-change: transform, opacity;
    animation: optFloatParticle 8s infinite ease-in-out;
}

.opt-particle:nth-child(1)     { left: 23%; top: 43%; animation-delay: 2.0s; animation-duration: 9.1s; }
.opt-particle:nth-child(2)     { left: 74%; top: 33%; animation-delay: 2.7s; animation-duration: 7.1s; }
.opt-particle:nth-child(3)     { left: 37%; top: 36%; animation-delay: 1.6s; animation-duration: 9.7s; }
.opt-particle:nth-child(4)     { left: 92%; top: 16%; animation-delay: 2.2s; animation-duration: 10.6s; }
.opt-particle:nth-child(5)     { left: 45%; top: 13%; animation-delay: 2.7s; animation-duration: 6.8s; }
.opt-particle:nth-child(6)     { left: 73%; top:  8%; animation-delay: 2.2s; animation-duration: 7.4s; }
.opt-particle:nth-child(7)     { left: 18%; top: 88%; animation-delay: 0.8s; animation-duration: 8.2s; }
.opt-particle:nth-child(8)     { left: 91%; top: 41%; animation-delay: 3.0s; animation-duration: 9.5s; }
.opt-particle:nth-child(9)     { left: 36%; top: 92%; animation-delay: 5.4s; animation-duration: 9.4s; }
.opt-particle:nth-child(10)    { left:  5%; top:  8%; animation-delay: 2.1s; animation-duration: 7.2s; }
.opt-particle:nth-child(11)    { left: 89%; top: 87%; animation-delay: 0.5s; animation-duration: 6.8s; }
.opt-particle:nth-child(12)    { left: 92%; top: 60%; animation-delay: 3.6s; animation-duration: 6.1s; }
.opt-particle:nth-child(13)    { left: 76%; top: 64%; animation-delay: 4.6s; animation-duration: 6.9s; }
.opt-particle:nth-child(14)    { left:  3%; top: 34%; animation-delay: 1.6s; animation-duration: 6.7s; }
.opt-particle:nth-child(15)    { left: 59%; top: 12%; animation-delay: 2.9s; animation-duration: 9.0s; }
.opt-particle:nth-child(16)    { left: 36%; top: 57%; animation-delay: 1.8s; animation-duration: 6.6s; }
.opt-particle:nth-child(17)    { left: 70%; top: 83%; animation-delay: 4.7s; animation-duration: 10.8s; }
.opt-particle:nth-child(18)    { left:  3%; top: 63%; animation-delay: 3.6s; animation-duration: 9.7s; }
.opt-particle:nth-child(19)    { left: 23%; top: 61%; animation-delay: 2.5s; animation-duration: 10.4s; }
.opt-particle:nth-child(20)    { left: 69%; top: 35%; animation-delay: 5.2s; animation-duration: 9.4s; }
.opt-particle:nth-child(21)    { left: 78%; top: 91%; animation-delay: 3.1s; animation-duration: 8.0s; }
.opt-particle:nth-child(22)    { left: 56%; top: 32%; animation-delay: 2.2s; animation-duration: 8.4s; }
.opt-particle:nth-child(23)    { left: 66%; top: 62%; animation-delay: 2.2s; animation-duration: 7.0s; }
.opt-particle:nth-child(24)    { left: 45%; top: 59%; animation-delay: 5.4s; animation-duration: 8.2s; }
.opt-particle:nth-child(25)    { left: 53%; top: 85%; animation-delay: 0.6s; animation-duration: 9.0s; }
.opt-particle:nth-child(26)    { left: 36%; top: 11%; animation-delay: 0.6s; animation-duration: 8.8s; }
.opt-particle:nth-child(27)    { left: 11%; top: 90%; animation-delay: 3.0s; animation-duration: 10.7s; }
.opt-particle:nth-child(28)    { left: 23%; top:  7%; animation-delay: 3.4s; animation-duration: 6.4s; }

@keyframes optFloatParticle {
    0%, 100% { opacity: 0;    transform: translateY(0) scale(1); }
    25%      { opacity: 0.5; }
    50%      { opacity: 0.25; transform: translateY(-50px) scale(1.8); }
    75%      { opacity: 0.4; }
}

.opt-ember {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--gold-light), transparent);
    opacity: 0;
    will-change: transform, opacity;
    animation: optFloatEmber 12s infinite ease-in-out;
}

.opt-ember:nth-child(29)    { left: 65%; top: 83%; animation-delay: 5.9s; animation-duration: 14.7s; }
.opt-ember:nth-child(30)    { left: 32%; top: 86%; animation-delay: 7.0s; animation-duration: 13.7s; }
.opt-ember:nth-child(31)    { left: 33%; top: 82%; animation-delay: 8.9s; animation-duration: 14.9s; }
.opt-ember:nth-child(32)    { left: 50%; top: 83%; animation-delay: 2.2s; animation-duration: 13.0s; }
.opt-ember:nth-child(33)    { left: 51%; top: 76%; animation-delay: 10.9s; animation-duration: 14.7s; }
.opt-ember:nth-child(34)    { left: 96%; top: 91%; animation-delay: 2.9s; animation-duration: 14.2s; }
.opt-ember:nth-child(35)    { left:  7%; top: 87%; animation-delay: 4.9s; animation-duration: 15.6s; }
.opt-ember:nth-child(36)    { left: 97%; top: 87%; animation-delay: 10.5s; animation-duration: 12.2s; }
.opt-ember:nth-child(37)    { left:  6%; top: 83%; animation-delay: 1.1s; animation-duration: 12.8s; }
.opt-ember:nth-child(38)    { left: 70%; top: 86%; animation-delay: 2.2s; animation-duration: 13.7s; }

@keyframes optFloatEmber {
    0%   { opacity: 0;   transform: translateY(0) translateX(0); }
    10%  { opacity: 0.8; }
    50%  { opacity: 0.4; transform: translateY(-200px) translateX(30px); }
    90%  { opacity: 0.1; }
    100% { opacity: 0;   transform: translateY(-400px) translateX(-20px); }
}

/* ============================================================
   TOPBAR — 50px
   ============================================================ */

#topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 22px;
    background: rgba(2, 10, 24, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#topbar.nav-open {
    background: rgba(2, 10, 24, 0.985);
}

/* A regua dourada do #options-header-rule separando a barra do conteudo */
#topbar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(200, 168, 78, 0.45), transparent);
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    white-space: nowrap;
}

/* O logotipo ja traz o nome desenhado, entao .brand-name saiu do HTML.
   A altura fixa em 26px e o que manda: a largura sai da proporcao (913x185),
   e o alinhamento passou de baseline pra center porque imagem nao tem
   baseline de texto — com baseline o logo ficava pendurado acima da tagline. */
.brand-logo {
    height: 26px;
    width: auto;
    display: block;
}

.brand-tag {
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold-muted);
    opacity: 0.75;
}

/* --- Abas de navegacao (o .opt-tab do jogo, em dourado) --- */

#nav {
    /* Absoluto no centro da propria barra: como flex item, o #nav centralizava
       dentro do espaco entre a marca e as acoes, e como a marca e mais larga
       que as acoes as abas saiam empurradas para a direita. */
    position: absolute;
    left: 50%;
    top: 0;
    height: 100%;
    transform: translateX(-50%);
    display: flex;
    align-items: stretch;
}

#nav-tabs {
    display: flex;
    align-items: stretch;
}

.opt-tab {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    /* Dourado apagado, como a aba inativa da tela de Options do jogo */
    color: var(--gold-muted);
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.25s ease, text-shadow 0.25s ease;
}

/* FLARE embaixo do texto: halo suave (::before) + nucleo com falloff (::after).
   Mesma tecnica do jogo — box-shadow para o halo, linear-gradient para o nucleo. */
.opt-tab::before {
    content: "";
    position: absolute;
    bottom: 9px;
    left: 50%;
    width: 46%;
    height: 2px;
    transform: translateX(-50%);
    pointer-events: none;
    opacity: 0;
    border-radius: 999px;
    background: rgba(240, 208, 120, 0.45);
    box-shadow: 0 0 16px 5px rgba(240, 208, 120, 0.22),
                0 0 34px 10px rgba(212, 168, 67, 0.12);
    transition: opacity 0.3s ease;
}

.opt-tab::after {
    content: "";
    position: absolute;
    bottom: 8px;
    left: 50%;
    width: 0;
    height: 2px;
    transform: translateX(-50%);
    pointer-events: none;
    opacity: 0;
    border-radius: 999px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(212, 168, 67, 0.45) 18%,
        var(--gold-bright) 50%,
        rgba(212, 168, 67, 0.45) 82%,
        transparent 100%);
    box-shadow: 0 0 10px rgba(240, 208, 120, 0.5);
    transition: width 0.3s ease, opacity 0.3s ease;
}

.opt-tab:hover {
    color: var(--gold-light);
    text-shadow: 0 0 12px rgba(212, 168, 67, 0.35);
}

.opt-tab:hover::before { opacity: 0.5; }
.opt-tab:hover::after  { width: 55%; opacity: 0.75; }

/* Aba da secao visivel — o JS poe .selected via IntersectionObserver */
.opt-tab.selected {
    color: var(--gold-bright);
    text-shadow: 0 0 26px rgba(212, 168, 67, 0.45), 0 2px 4px rgba(0, 0, 0, 0.8);
}

.opt-tab.selected::before {
    opacity: 1;
    animation: optFlareBloomPulse 2.2s ease-in-out infinite;
}

.opt-tab.selected::after {
    width: 82%;
    opacity: 1;
    animation: optFlareCorePulse 2.2s ease-in-out infinite;
}

/* O bloom ja usa translateX(-50%) — os keyframes precisam repetir,
   senao o flare "pula" para a esquerda ao comecar a animacao. */
@keyframes optFlareBloomPulse {
    0%, 100% { opacity: 0.7; transform: translateX(-50%) scale(0.92); }
    50%      { opacity: 1;   transform: translateX(-50%) scale(1.08); }
}

@keyframes optFlareCorePulse {
    0%, 100% { opacity: 0.8; }
    50%      { opacity: 1; }
}

/* --- Acoes a direita --- */

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    /* O #nav saiu do fluxo, entao e este margin que empurra as acoes ao fim */
    margin-left: auto;
}

.lang-toggle {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-gold-dim);
}

.lang-opt {
    padding: 4px 8px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    background: transparent;
    border: none;
    color: var(--gold-muted);
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.lang-opt.active {
    color: var(--gold-bright);
    background: rgba(200, 168, 78, 0.14);
}

.lang-opt[disabled] {
    cursor: not-allowed;
    opacity: 0.45;
}

#nav-toggle {
    display: none;
    padding: 5px 10px;
    font-family: inherit;
    font-size: 16px;
    line-height: 1;
    background: transparent;
    border: 1px solid var(--border-gold-dim);
    color: var(--gold);
    cursor: pointer;
}

/* ============================================================
   LAYOUT DAS SECOES
   ============================================================ */

main {
    padding-top: var(--topbar-h);
}

.section {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 76px 32px;
    /* compensa a topbar fixa quando o link de ancora rola ate aqui */
    scroll-margin-top: var(--topbar-h);
}

.section-head {
    margin-bottom: 36px;
}

.section-kicker {
    font-size: 11px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--gold-muted);
    margin-bottom: 8px;
}

.section-title {
    /* Fluido: com tamanho fixo, "DEVELOPMENT" sozinho ja passava da largura
       util numa tela de 320px. */
    font-size: clamp(23px, 5.2vw, 32px);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold-light);
    text-shadow: 0 0 16px rgba(212, 168, 67, 0.3);
}

.section-sub {
    margin-top: 12px;
    max-width: 760px;
    font-size: 16px;
    color: var(--text-secondary);
}

.prose p + p { margin-top: 14px; }

.prose p {
    color: var(--text-secondary);
    font-size: 16px;
}

.prose strong {
    color: var(--text-primary);
    font-weight: 600;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold-light);
    margin-bottom: 10px;
}

/* ============================================================
   1. HERO — o texto grande vem dentro da imagem de fundo
   ============================================================ */

#hero {
    position: relative;
    min-height: calc(100vh - var(--topbar-h));
    max-width: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 0 32px 72px;
    text-align: center;
    overflow: hidden;
}

/* Arte de fundo: assets/img/legend-of-legaia-remake-cover.webp (mesma imagem
   usada no og:image). Se o arquivo nao existir, o navegador ignora a camada de
   imagem e sobra so o degrade — nada quebra. */
#hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background-image:
        linear-gradient(180deg, rgba(2, 10, 24, 0.35) 0%, rgba(2, 10, 24, 0.55) 55%, var(--bg-deep) 100%),
        url('../img/legend-of-legaia-remake-cover.webp');
    background-size: cover, cover;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
}

.hero-inner {
    max-width: 820px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 26px;
}

/* Logotipo no topo do hero. A arte ja tem brilho e contorno proprios, entao o
   drop-shadow aqui e so pra descolar do fundo verde da cena — filter segue o
   recorte do PNG/WebP, ao contrario de box-shadow que sombrearia o retangulo.
   A largura em clamp() acompanha a viewport sem passar de 620px no desktop. */
.hero-logo {
    margin: 0;
    line-height: 0;
}

.hero-logo img {    
    height: auto;
    filter: drop-shadow(0 6px 26px rgba(0, 0, 0, 0.65));
}

.hero-desc {
    font-size: clamp(15px, 1.6vw, 18px);
    line-height: 1.8;
    color: var(--text-primary);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

/* Seta piscando no fim do hero, como as setinhas das abas do jogo.
   Triangulo de borda em vez do glifo U+25BC: o Cinzel nao tem esse caractere,
   entao ele caia numa fonte de fallback com bearing lateral assimetrico e
   parecia torto mesmo com a caixa perfeitamente centralizada. */
.hero-scroll {
    margin-top: 8px;
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 11px solid var(--gold);
    opacity: 0.5;
    animation: heroBob 1.8s ease-in-out infinite;
}

@keyframes heroBob {
    0%, 100% { transform: translateY(0);   opacity: 0.35; }
    50%      { transform: translateY(7px); opacity: 0.9; }
}

/* ============================================================
   2. SOBRE — card horizontal + quick facts em faixa horizontal
   ============================================================ */

.about-card {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 34px;
    align-items: start;
    padding: 30px 34px;
}

.about-card > * { min-width: 0; }

/* Aviso fan-made: precisa saltar aos olhos */
.notice {
    padding: 16px 18px;
    border-left: 3px solid var(--gold);
    background: rgba(200, 168, 78, 0.06);
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.notice strong { color: var(--gold-light); }

.about-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

/* --- Quick Facts: faixa horizontal, uma coluna por fato --- */

.facts-strip {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    margin-top: 24px;
    background: rgba(200, 168, 78, 0.18);
    border: 1px solid var(--border-gold-dim);
}

.fact {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 16px;
    background: linear-gradient(180deg, rgba(14, 26, 48, 0.95), rgba(5, 11, 22, 0.95));
}

.fact-label {
    font-size: 10px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--gold-muted);
}

.fact-value {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-primary);
}

/* ============================================================
   3. STATUS
   ============================================================ */

.stat-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    margin-bottom: 34px;
    background: rgba(200, 168, 78, 0.18);
    border: 1px solid var(--border-gold-dim);
}

.stat {
    padding: 20px 14px;
    text-align: center;
    background: linear-gradient(180deg, rgba(14, 26, 48, 0.95), rgba(5, 11, 22, 0.95));
}

.stat-num {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--gold);
    text-shadow: 0 0 18px rgba(212, 168, 67, 0.3);
}

.stat-label {
    margin-top: 5px;
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 26px;
    align-items: start;
}

.status-grid > * { min-width: 0; }

.status-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.status-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Losango dourado como marcador, igual ao thumb do slider do jogo */
.status-list li::before {
    content: "";
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    margin-top: 7px;
    transform: rotate(45deg);
    background: var(--gold);
    box-shadow: 0 0 8px rgba(212, 168, 67, 0.45);
}

.status-list.is-next li::before {
    background: transparent;
    border: 1px solid var(--border-gold-dim);
    box-shadow: none;
}

/* ============================================================
   4. MIDIA — cards levemente tortos, clique abre a imagem inteira
   ============================================================ */

.media-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px 26px;
    /* As rotacoes fazem os cantos invadirem o vizinho; a folga evita corte */
    padding: 10px 6px;
}

.media-grid > * { min-width: 0; }

.media-card {
    padding: 0;
    cursor: pointer;
    background: none;
    text-align: left;
    font: inherit;
    color: inherit;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.28s ease,
                border-color 0.28s ease;
}

/* Cada card nasce torto num angulo diferente — o :nth-child cicla de 6 em 6 */
.media-card:nth-child(6n + 1) { transform: rotate(-1.6deg); }
.media-card:nth-child(6n + 2) { transform: rotate(1.1deg); }
.media-card:nth-child(6n + 3) { transform: rotate(-0.7deg); }
.media-card:nth-child(6n + 4) { transform: rotate(1.5deg); }
.media-card:nth-child(6n + 5) { transform: rotate(-1.2deg); }
.media-card:nth-child(6n + 6) { transform: rotate(0.8deg); }

/* No hover o card se endireita e sobe — da a sensacao de pegar a foto da mesa */
.media-card:hover,
.media-card:focus-visible {
    transform: rotate(0deg) translateY(-6px) scale(1.03);
    border-color: var(--border-gold);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6), var(--glow-gold);
    z-index: 2;
}

.media-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background:
        repeating-linear-gradient(45deg,
            rgba(200, 168, 78, 0.05) 0px,
            rgba(200, 168, 78, 0.05) 10px,
            transparent 10px,
            transparent 20px),
        rgba(4, 10, 22, 0.6);
    border-bottom: 1px solid var(--border-gold-dim);
}

.media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.media-card:hover .media-thumb img { transform: scale(1.06); }

/* Placeholder: o JS marca .is-empty quando a imagem nao existe ainda.
   Assim basta soltar o arquivo com o nome certo em assets/img/ que funciona. */
.media-ph {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    text-align: center;
}

.media-card.is-empty .media-thumb img { display: none; }
.media-card.is-empty .media-ph { display: flex; }

.media-ph-icon {
    font-size: 22px;
    color: var(--border-gold-dim);
}

.media-ph-label {
    font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
    font-size: 10px;
    letter-spacing: 0;
    color: var(--text-secondary);
    word-break: break-all;
}

.media-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 16px;
}

.media-caption {
    font-size: 14px;
    letter-spacing: 0.5px;
    color: var(--text-primary);
}

/* --- Lightbox --- */

#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: rgba(1, 5, 12, 0.94);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

#lightbox.open { display: flex; }

.lightbox-frame {
    position: relative;
    max-width: min(1600px, 100%);
    max-height: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#lightbox-img {
    max-width: 100%;
    max-height: calc(100vh - 150px);
    object-fit: contain;
    border: 2px solid var(--border-gold-dim);
}

#lightbox-caption {
    font-size: 14px;
    letter-spacing: 1px;
    color: var(--text-primary);
    text-align: center;
}

#lightbox-close {
    position: absolute;
    top: -34px;
    right: -6px;
    padding: 4px 12px;
    font-family: inherit;
    font-size: 20px;
    line-height: 1;
    background: transparent;
    border: 1px solid var(--border-gold-dim);
    color: var(--gold);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}

#lightbox-close:hover {
    color: var(--gold-bright);
    border-color: var(--border-gold);
}

/* ============================================================
   5. VIDEOS — cards menores, thumbnail do YouTube
   ============================================================ */

.video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.video-grid > * { min-width: 0; }

.video-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.video-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-gold);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5), var(--glow-gold);
}

.video-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: rgba(4, 10, 22, 0.6);
    border-bottom: 1px solid var(--border-gold-dim);
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Triangulo de play sobre a thumb */
.video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 42px;
    height: 42px;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(2, 10, 24, 0.72);
    border: 1px solid var(--border-gold);
    color: var(--gold);
    font-size: 13px;
    padding-left: 3px;
    transition: background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
}

.video-card:hover .video-play {
    background: rgba(212, 168, 67, 0.9);
    color: var(--bg-deep);
    box-shadow: var(--glow-gold);
}

.video-meta {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.video-title {
    font-size: 13px;
    line-height: 1.45;
    letter-spacing: 0.3px;
    color: var(--text-primary);
}

.video-date {
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold-muted);
}

.videos-more {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}

/* ============================================================
   6. FAQ — acordeao <details>/<summary>
   ============================================================ */

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq-item { padding: 0; }

.faq-item summary {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.8px;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
    transition: color 0.2s ease, background 0.2s ease;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary:hover {
    color: var(--gold-light);
    background: rgba(200, 168, 78, 0.05);
}

/* O losango do slider do jogo vira o marcador do acordeao */
.faq-item summary::before {
    content: "";
    flex-shrink: 0;
    width: 9px;
    height: 9px;
    transform: rotate(45deg);
    background: var(--border-gold-dim);
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.faq-item[open] summary { color: var(--gold); }

.faq-item[open] summary::before {
    background: var(--gold);
    transform: rotate(135deg);
    box-shadow: 0 0 12px rgba(212, 168, 67, 0.6);
}

.faq-answer {
    padding: 0 20px 20px 44px;
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.faq-answer a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ============================================================
   7. LINKS OFICIAIS — icone SVG na cor das cantoneiras
   ============================================================ */

.link-grid {
    --link-gap: 16px;
    --link-cols: 4;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--link-gap);
}

.link-card {
    /* Mesma largura que o card teria num grid de --link-cols colunas */
    flex: 0 1 calc((100% - (var(--link-cols) - 1) * var(--link-gap)) / var(--link-cols));
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 17px 18px;
    transition: background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.link-card:hover {
    border-color: var(--border-gold);
    box-shadow: var(--glow-gold);
    text-shadow: none;
}

.link-icon {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    /* A cor das cantoneiras, como pedido */
    color: var(--border-gold);
    transition: color 0.2s ease, filter 0.2s ease;
}

.link-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.link-card:hover .link-icon {
    color: var(--gold-bright);
    filter: drop-shadow(0 0 8px rgba(212, 168, 67, 0.6));
}

.link-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.link-name {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold-light);
}

.link-handle {
    font-size: 12px;
    color: var(--text-secondary);
    word-break: break-all;
}

.link-card.is-pending { opacity: 0.5; }
.link-card.is-pending:hover { box-shadow: none; border-color: var(--border-gold-dim); }

.links-note {
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* --- Comunidade: deliberadamente separado do grid oficial --- */

.community-title {
    margin-top: 44px;
}

/* Borda apagada e sem o brilho do hover dos cards oficiais: a diferenca visual
   reforca que este bloco nao e um canal da LixStudios. */
.community-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    border-color: rgba(122, 106, 48, 0.55);
}

.community-card .link-icon {
    width: 30px;
    height: 30px;
    color: var(--border-gold-dim);
}

.community-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    flex: 1;
}

.community-note {
    font-size: 13px;
    line-height: 1.65;
    color: var(--text-secondary);
}

.community-note strong {
    color: var(--gold-light);
}

.community-card .btn { flex-shrink: 0; }

/* ============================================================
   8. ABOUT LIXSTUDIOS — card horizontal
   ============================================================ */

.studio-card {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 34px;
    align-items: center;
    padding: 30px 34px;
}

.studio-card > * { min-width: 0; }

.studio-aside {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ============================================================
   9. APOIAR O PROJETO
   ============================================================ */

.support-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 26px;
    align-items: stretch;
}

.support-grid > * { min-width: 0; }

.support-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 28px 30px;
}

.support-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.support-icon {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    color: var(--border-gold);
}

.support-icon svg { width: 100%; height: 100%; display: block; }

.support-text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
    flex: 1;
}

.support-card .btn { align-self: flex-start; }

/* --- Chave Pix + botao de copiar --- */

.pix-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
    flex-wrap: wrap;
}

.pix-key {
    flex: 1 1 260px;
    min-width: 0;
    padding: 11px 14px;
    font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
    font-size: 12.5px;
    letter-spacing: 0;
    color: var(--gold-light);
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-gold-dim);
    /* A chave e para copiar: deixa selecionar e nao deixa furar a caixa */
    user-select: all;
    word-break: break-all;
}

.pix-copy { flex-shrink: 0; }

.pix-copied {
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--hp-green-bright);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.pix-copied.show { opacity: 1; }

/* ============================================================
   FOOTER — sem navegacao, so o botao de voltar ao topo
   ============================================================ */

#footer {
    margin-top: 30px;
    padding: 48px 32px 56px;
    border-top: 1px solid rgba(200, 168, 78, 0.25);
    background: rgba(2, 8, 18, 0.7);
}

.footer-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 22px;
    align-items: center;
    text-align: center;
}

.footer-disclaimer {
    max-width: 780px;
    font-size: 12.5px;
    line-height: 1.75;
    color: var(--text-secondary);
}

.footer-copy {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--gold-muted);
}

#to-top { margin-bottom: 4px; }

/* ============================================================
   RESPONSIVO
   ============================================================ */

/* ---- Navbar: as abas sao centralizadas na barra inteira, entao o espaco util
   e (largura - 2x o maior dos lados). Com 8 abas a 18px isso da 1693px.
   Abaixo disso a barra encolhe por etapas antes de virar hamburguer. ---- */

/* 1a etapa: cai o subtitulo da marca (o wordmark ja identifica o estudio) */
@media (max-width: 1750px) {
    .brand-tag { display: none; }
}

/* 2a etapa: abas menores e mais juntas */
@media (max-width: 1320px) {
    .opt-tab { font-size: 15px; padding: 0 9px; letter-spacing: 1.5px; }
    .brand-name { font-size: 17px; }
}

@media (max-width: 1240px) {
    .video-grid  { grid-template-columns: repeat(3, 1fr); }
    .link-grid   { --link-cols: 3; }
    .facts-strip { grid-template-columns: repeat(3, 1fr); }
}

/* 3a etapa: nem encolhidas as abas cabem ao lado das acoes — vira hamburguer. */
@media (max-width: 1180px) {
    .media-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-strip { grid-template-columns: repeat(2, 1fr); }

    #topbar {
        flex-wrap: wrap;
        height: auto;
        min-height: var(--topbar-h);
        padding: 8px 18px;
        gap: 12px;
    }

    #nav-toggle { display: block; order: 3; }

    .topbar-actions { order: 2; }

    /* As abas descem para uma coluna abaixo da barra. O #nav VOLTA para o
       fluxo — no desktop ele e absoluto no centro, e assim ficaria flutuando
       por cima da barra em vez de abrir embaixo dela. */
    #nav {
        position: static;
        transform: none;
        height: auto;
        order: 4;
        flex-basis: 100%;
        display: none;
    }

    #nav.open { display: block; }

    #nav-tabs {
        flex-direction: column;
        align-items: stretch;
        padding-bottom: 8px;
    }

    .opt-tab {
        font-size: 16px;
        padding: 11px 4px;
        text-align: left;
    }

    /* Numa lista vertical o flare centralizado nao faz sentido — vira barra */
    .opt-tab::before,
    .opt-tab::after { display: none; }

    .opt-tab.selected {
        border-left: 2px solid var(--gold);
        padding-left: 12px;
        background: rgba(200, 168, 78, 0.06);
    }

    .about-card,
    .studio-card {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .support-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
    .section { padding: 60px 20px; }

    .video-grid  { grid-template-columns: repeat(2, 1fr); }
    .link-grid   { --link-cols: 2; }
    .status-grid { grid-template-columns: 1fr; gap: 30px; }

    #hero { padding-bottom: 56px; }
}

@media (max-width: 620px) {
    /* Celular tem menos GPU e tela menor: 38 pontos animados viram ruido e
       gastam bateria. Fica com os 14 primeiros — a mesma densidade visual
       relativa, porque a area tambem encolheu. */
    .opt-particle:nth-child(n+15),
    .opt-ember:nth-child(n+33) { display: none; }

    .media-grid  { grid-template-columns: 1fr; gap: 24px; }
    .link-grid   { --link-cols: 1; }

    .community-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
    .facts-strip { grid-template-columns: repeat(2, 1fr); }
    .stat-strip  { grid-template-columns: repeat(2, 1fr); }

    .brand-tag { display: none; }

    /* Torto acumulado numa coluna so fica baguncado — endireita */
    .media-card { transform: none !important; }
    .media-card:hover { transform: translateY(-4px) !important; }

    .faq-answer { padding-left: 20px; }

    .hero-ctas .btn { flex: 1 1 100%; }

    #lightbox { padding: 20px; }
    #lightbox-close { top: -32px; right: 0; }
}

@media (max-width: 420px) {
    .video-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   ACESSIBILIDADE — quem pediu menos movimento nao ve particula nem pulso
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    #site-particles { display: none; }

    .hero-scroll,
    .opt-tab.selected::before,
    .opt-tab.selected::after { animation: none; }

    .media-card { transform: none !important; }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
