/* =========================================================
   ATHENA — Base compartilhada
   Variáveis, reset, tipografia, header, rodapé e animações
   usados em todas as páginas do site.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Raleway:wght@600;700;800;900&family=Cormorant+Garamond:ital,wght@0,500;1,500;1,600&display=swap');

:root {
    /* fundo */
    --bg-0: #161d27;
    --bg-1: #1f2734;
    --bg-2: #273142;
    --bg-3: #2f3c52;

    /* neutros de texto */
    --cor-clara: #f7efd8;
    --texto: #f7efd8;
    --texto-secundario: #b9c0cf;
    --texto-esmaecido: #8791a3;

    /* marca */
    --cor-primaria: #556270;
    --cor-primaria-hover: #6b7a8c;
    --cor-secundaria: #273142;

    /* acento — dourado da coroa alada da Athena, usado com moderação */
    --ouro: #c9a15a;
    --ouro-forte: #e8c37c;
    --ouro-fraco: rgba(201, 161, 90, 0.14);

    /* acento frio — usado em dados/gráficos para contrastar com o dourado */
    --info: #8db4d6;
    --info-fraco: rgba(141, 180, 214, 0.16);

    --borda: rgba(247, 239, 216, 0.1);
    --borda-forte: rgba(247, 239, 216, 0.2);

    /* cor fixa para texto sobre elementos dourados — não muda entre temas */
    --sobre-acento: #171e28;

    --fonte-titulo: 'Raleway', sans-serif;
    --fonte-texto: 'Inter', sans-serif;
    --fonte-classica: 'Cormorant Garamond', serif;

    --raio-sm: 12px;
    --raio-md: 18px;
    --raio-lg: 26px;

    --sombra-suave: 0 20px 50px rgba(0, 0, 0, 0.28);
    --transicao: 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* =========================================================
   TEMA CLARO
   Alterna apenas as variáveis de cor — todo o resto do CSS
   já é construído em cima delas, então herda automaticamente.
   ========================================================= */
[data-tema="claro"] {
    --bg-0: #f7f4ec;
    --bg-1: #fffdf8;
    --bg-2: #efe8d6;
    --bg-3: #e6dcc3;

    --cor-clara: #21283a;
    --texto: #21283a;
    --texto-secundario: #565f74;
    --texto-esmaecido: #767f92;

    --cor-secundaria: #efe8d6;

    --ouro-fraco: rgba(180, 132, 45, 0.12);
    --info-fraco: rgba(48, 92, 133, 0.12);

    --borda: rgba(33, 40, 58, 0.1);
    --borda-forte: rgba(33, 40, 58, 0.18);

    --sombra-suave: 0 20px 50px rgba(33, 40, 58, 0.12);
}

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

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

body {
    font-family: var(--fonte-texto);
    background: linear-gradient(160deg, var(--bg-0) 0%, var(--bg-2) 45%, var(--bg-3) 100%);
    background-attachment: fixed;
    color: var(--texto);
    line-height: 1.7;
    overflow-x: hidden;
    transition: background var(--transicao), color var(--transicao);
}

/* trava o scroll enquanto a tela de carregamento inicial está ativa */
body.carregando {
    overflow: hidden;
    height: 100vh;
}

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

a {
    color: inherit;
}

::selection {
    background: var(--ouro);
    color: var(--sobre-acento);
}

/* barra de progresso de leitura */
.progresso-scroll {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--ouro), var(--ouro-forte));
    z-index: 2000;
    transition: width 0.1s ease-out;
}

/* foco visível para acessibilidade */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--ouro);
    outline-offset: 3px;
    border-radius: 6px;
}

/* CONTAINER */

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 2rem;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--fonte-classica);
    font-style: italic;
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--ouro-forte);
    letter-spacing: 0.02em;
    margin-bottom: 0.9rem;
}

.eyebrow::before {
    content: "";
    width: 26px;
    height: 1px;
    background: var(--ouro);
    display: inline-block;
}

/* botões (usados em ambas as páginas) */

.btn {
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    font-family: inherit;

    font-weight: 600;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: transform var(--transicao), box-shadow var(--transicao), background var(--transicao);
}

.btn-primary {
    background: var(--cor-primaria);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    background: var(--cor-primaria-hover);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.btn-secondary {
    border: 1px solid var(--borda-forte);
    color: var(--cor-clara);
    background: rgba(255, 255, 255, 0.03);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-3px);
}

/* revelação de elementos ao rolar (compartilhada) */

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.em-vista {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================================
   HEADER
   ========================================================= */

header {
    position: sticky;
    top: 0;
    z-index: 1000;

    backdrop-filter: blur(0px);
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: box-shadow var(--transicao), background var(--transicao),
        backdrop-filter var(--transicao), border-color var(--transicao);
}

header.scrolled {
    backdrop-filter: blur(14px);
    background: rgba(22, 29, 39, 0.82);
    border-bottom: 1px solid var(--borda);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

[data-tema="claro"] header.scrolled {
    background: rgba(247, 244, 236, 0.82);
}

/* linha inferior com leve brilho dourado quando o vidro fosco entra em cena */
header.scrolled::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--ouro-forte) 50%, transparent);
    opacity: 0.55;
}

.header-inner {
    height: 88px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.site-branding {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.site-branding img {
    height: 46px;
    width: auto;
}

nav {
    display: flex;
    align-items: center;
}

nav ul {
    display: flex;
    align-items: center;
    gap: 2.2rem;
    list-style: none;
}

nav a {
    position: relative;
    text-decoration: none;
    color: var(--texto-secundario);
    font-weight: 500;
    font-size: 0.98rem;
    padding: 0.4rem 0.1rem;
    transition: color 0.25s ease;
}

nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0%;
    height: 2px;
    background: var(--ouro);
    transition: width 0.3s ease;
}

nav a:hover {
    color: var(--cor-clara);
}

nav a:hover::after,
nav a.ativo::after {
    width: 100%;
}

nav a.ativo {
    color: var(--ouro-forte);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.header-btn {
    text-decoration: none;
    color: var(--sobre-acento);

    background: linear-gradient(135deg, var(--ouro-forte), var(--ouro));
    padding: 0.75rem 1.5rem;
    border-radius: 999px;

    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(201, 161, 90, 0.22);
    transition: transform var(--transicao), box-shadow var(--transicao);
}

.header-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(201, 161, 90, 0.34);
}

/* interruptor de tema (claro/escuro) */

.tema-toggle {
    position: relative;
    flex-shrink: 0;
    width: 56px;
    height: 30px;
    border-radius: 999px;
    padding: 3px;

    display: flex;
    align-items: center;

    background: rgba(247, 239, 216, 0.08);
    border: 1px solid var(--borda-forte);
    cursor: pointer;
    transition: background var(--transicao), border-color var(--transicao);
}

.tema-toggle:hover {
    background: rgba(247, 239, 216, 0.14);
}

.tema-toggle-bolha {
    width: 22px;
    height: 22px;
    border-radius: 50%;

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

    background: linear-gradient(135deg, var(--ouro-forte), var(--ouro));
    color: var(--sobre-acento);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);

    transform: translateX(0);
    transition: transform var(--transicao);
}

[data-tema="claro"] .tema-toggle-bolha {
    transform: translateX(26px);
}

.tema-toggle-bolha svg {
    width: 13px;
    height: 13px;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}

.tema-toggle-bolha .icone-lua {
    position: absolute;
    opacity: 0;
    transform: rotate(-180deg) scale(0.6);
}

[data-tema="claro"] .tema-toggle-bolha .icone-sol {
    opacity: 0;
    transform: rotate(180deg) scale(0.6);
}

[data-tema="claro"] .tema-toggle-bolha .icone-lua {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.tema-toggle-bolha .icone-sol {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* transição de círculo ao trocar de tema (View Transitions API) */
::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
}

::view-transition-old(root) {
    z-index: 1;
}

::view-transition-new(root) {
    z-index: 2;
}

@media (max-width: 980px) {
    .tema-toggle {
        margin-right: 0.4rem;
    }
}

/* menu hambúrguer (mobile) */

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;

    width: 44px;
    height: 44px;

    background: rgba(247, 239, 216, 0.06);
    border: 1px solid var(--borda);
    border-radius: 12px;
    cursor: pointer;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--cor-clara);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 980px) {
    nav {
        position: fixed;
        inset: 88px 0 auto 0;
        max-height: calc(100vh - 88px);
        overflow-y: auto;

        background: rgba(22, 29, 39, 0.98);
        backdrop-filter: blur(14px);
        border-bottom: 1px solid var(--borda);

        transform: translateY(-12px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;

        transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
    }

    nav.aberto {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 1rem 2rem 1.5rem;
    }

    nav ul li {
        border-bottom: 1px solid var(--borda);
    }

    nav a {
        display: block;
        padding: 1rem 0;
    }

    nav a::after {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .header-actions .header-btn {
        display: none;
    }
}

@media (max-width: 768px) {
    .header-inner {
        height: 76px;
    }

    html {
        scroll-padding-top: 76px;
    }

    nav {
        top: 76px;
        inset: 76px 0 auto 0;
    }

    .site-branding img {
        height: 38px;
    }
}

/* FOOTER */

footer {
    margin-top: 3rem;
    padding-top: 4rem;

    background: rgba(0, 0, 0, 0.18);
    border-top: 1px solid var(--borda);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr repeat(2, 1fr);
    gap: 3rem;
}

.footer-brand {
    margin-bottom: 1rem;
}

.footer-brand img {
    height: 52px;
    width: auto;
}

.footer-column p.footer-tagline {
    color: var(--texto-secundario);
    max-width: 320px;
    font-size: 0.92rem;
}

.footer-column h3 {
    margin-bottom: 1.2rem;

    font-family: var(--fonte-titulo);
    font-size: 1.02rem;
    color: var(--cor-clara);
}

.footer-column a,
.footer-column p {
    display: block;

    margin-bottom: 0.8rem;

    text-decoration: none;
    color: var(--texto-secundario);
    font-size: 0.94rem;

    transition: color 0.25s ease;
}

.footer-column a:hover {
    color: var(--ouro-forte);
}

.footer-bottom {
    margin-top: 3rem;
    padding: 1.5rem 0;

    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;

    border-top: 1px solid var(--borda);
}

.footer-bottom p {
    color: var(--texto-esmaecido);
    font-size: 0.9rem;
}

.voltar-topo {
    width: 42px;
    height: 42px;
    border-radius: 50%;

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

    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--borda);
    color: var(--cor-clara);
    cursor: pointer;
    text-decoration: none;
    transition: transform var(--transicao), background var(--transicao);
}

.voltar-topo:hover {
    transform: translateY(-3px);
    background: var(--ouro-fraco);
    color: var(--ouro-forte);
}

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

@media (max-width: 560px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* =========================================================
   TELA DE CARREGAMENTO (PRELOADER)
   ========================================================= */

.preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-0);
}

.preloader-conteudo {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.4rem;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.preloader.saindo .preloader-conteudo {
    opacity: 0;
    transform: translateY(-10px) scale(0.96);
}

.preloader-svg {
    width: 72px;
    height: 72px;
    overflow: visible;
}

.preloader-svg path {
    fill: transparent;
    stroke: var(--ouro-forte);
    stroke-width: 3.5;
    stroke-linejoin: round;
    stroke-linecap: round;
    filter: drop-shadow(0 0 6px rgba(232, 195, 124, 0.5));
    transition: fill 0.4s ease 0.05s;
}

.preloader.preenchido .preloader-svg path {
    fill: var(--ouro-forte);
}

.preloader-contador {
    font-family: var(--fonte-titulo);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--texto-esmaecido);
    min-width: 3ch;
    text-align: center;
}

.preloader-cortina {
    position: fixed;
    left: 0;
    right: 0;
    height: 50%;
    background: var(--bg-0);
    transition: transform 0.6s cubic-bezier(0.76, 0, 0.24, 1);
    z-index: 1;
}

.preloader-cortina-cima {
    top: 0;
}

.preloader-cortina-baixo {
    bottom: 0;
}

.preloader.saindo .preloader-cortina-cima {
    transform: translateY(-100%);
}

.preloader.saindo .preloader-cortina-baixo {
    transform: translateY(100%);
}

.preloader-conteudo {
    z-index: 2;
}

.preloader.oculto {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .preloader {
        display: none;
    }
}

/* conteúdo do herói entra em sequência assim que a cortina abre */

.hero-entrada {
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* só começa oculto quando o JS está ativo (garantido pela classe no <html>);
   sem JS, o conteúdo do herói permanece visível desde o início */
html.js .hero-entrada {
    opacity: 0;
    transform: translateY(22px);
}

body.carregado .hero-entrada {
    opacity: 1;
    transform: translateY(0);
}

body.carregado .hero-badge {
    transition-delay: 0.05s;
}

body.carregado .hero-left h1 {
    transition-delay: 0.18s;
}

body.carregado .hero-left p {
    transition-delay: 0.34s;
}

body.carregado .hero-actions {
    transition-delay: 0.48s;
}

body.carregado .hero-stats {
    transition-delay: 0.6s;
}

body.carregado .hero-visual {
    transition-delay: 0.3s;
}

/* ANIMAÇÕES E ACESSIBILIDADE */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    .hero-entrada {
        opacity: 1 !important;
        transform: none !important;
    }

    .hero-visual,
    .card,
    .score {
        transform: none !important;
    }
}
