/* ==============================
   BASE
============================== */

* {
    box-sizing: border-box;
}

:root {
    --bg: #050505;
    --panel: #0b0b0d;
    --panel-hover: #101014;

    --border: #1a1a1e;

    --text: #f4f4f4;
    --muted: #77777e;

    --purple: #8175ff;
    --purple-dark: #5248c8;

    --green: #62d894;
    --red: #ff6f72;
    --yellow: #dfb664;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;

    background:
        radial-gradient(
            circle at 85% 0%,
            rgba(129, 117, 255, 0.09),
            transparent 28%
        ),
        var(--bg);

    color: var(--text);

    font-family:
        Inter,
        Arial,
        Helvetica,
        sans-serif;

    overflow-x: hidden;
}

.app {
    width: min(1500px, calc(100% - 40px));
    margin: 0 auto;
}


/* ==============================
   TOPO
============================== */

.topbar {
    height: 62px;

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

    border-bottom: 1px solid var(--border);
}

.logo {
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 2px;
}

.logo span {
    color: var(--purple);
}

.top-meta {
    display: flex;
    gap: 10px;

    color: #555;
    font-size: 11px;

    letter-spacing: 1px;
    text-transform: uppercase;
}

.meta-dot {
    color: #2a2a2a;
}


/* ==============================
   HERO
============================== */

.hero {
    position: relative;

    min-height: 300px;

    display: flex;
    align-items: center;

    overflow: hidden;

    border-bottom: 1px solid var(--border);
}

.hero-texto {
    position: relative;

    z-index: 3;

    width: min(45%, 660px);

    padding: 28px 0;
}

.eyebrow {
    margin-bottom: 14px;

    color: var(--purple);

    font-size: 9px;
    font-weight: 800;

    letter-spacing: 3px;
}

h1 {
    margin: 0;

    font-size: clamp(48px, 4.8vw, 78px);

    line-height: 0.87;

    letter-spacing: -4px;
}

h1 span {
    color: var(--purple);
}

.slogan {
    margin: 18px 0 0;

    color: #999;

    font-size: 17px;
}

.abertura {
    max-width: 650px;

    margin: 20px 0 0;

    color: #aaa;

    line-height: 1.5;

    font-size: 14px;
}

/*
   Cena panorâmica do Estado 1 — CALMO / CAFÉ.
   Ela ocupa a metade direita do banner e se dissolve no fundo escuro.
*/
.hero-scene {
    position: absolute;

    top: 0;
    right: 0;
    bottom: 0;

    z-index: 1;

    width: 68%;

    overflow: hidden;

    pointer-events: none;
}

.hero-scene picture {
    display: block;

    width: 100%;
    height: 100%;
}

.hero-scene-image {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
    object-position: right center;

    image-rendering: auto;
}

/*
   Escurece suavemente a transição entre texto e cena,
   sem criar moldura ou "quadrado" visível.
*/
.hero::before {
    content: "";

    position: absolute;
    inset: 0;

    z-index: 2;

    background:
        linear-gradient(
            90deg,
            var(--bg) 0%,
            rgba(5, 5, 5, 0.98) 25%,
            rgba(5, 5, 5, 0.78) 38%,
            rgba(5, 5, 5, 0.28) 51%,
            rgba(5, 5, 5, 0.04) 64%,
            transparent 76%
        );

    pointer-events: none;
}

.hero::after {
    content: "";

    position: absolute;

    left: 38%;
    right: 0;
    bottom: 0;

    height: 28%;

    z-index: 2;

    background:
        linear-gradient(
            180deg,
            transparent,
            rgba(5, 5, 5, 0.68)
        );

    pointer-events: none;
}


/* ==============================
   GRID PRINCIPAL
============================== */

.dashboard {
    display: grid;

    grid-template-columns:
        1.35fr
        1fr
        1fr;

    gap: 12px;

    padding: 12px 0;
}


/* primeira linha */

.painel-hoje {
    grid-column: span 2;
}

.painel-mercados {
    grid-column: span 1;
}


/* radar ocupa a largura */

.painel-radar {
    grid-column: 1 / -1;
}


/* ==============================
   PAINÉIS
============================== */

.painel {
    min-width: 0;

    padding: 20px;

    background:
        rgba(11, 11, 13, 0.86);

    border:
        1px
        solid
        var(--border);

    border-radius: 14px;

    transition:
        border-color
        0.2s ease,
        background
        0.2s ease;
}

.painel:hover {
    border-color: #292930;

    background:
        var(--panel-hover);
}

.painel-header {
    display: flex;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 16px;
}

.tag {
    display: block;

    margin-bottom: 6px;

    color: var(--purple);

    font-size: 8px;
    font-weight: 800;

    letter-spacing: 2px;
}

h2 {
    margin: 0;

    font-size: 19px;

    letter-spacing: -0.5px;
}

.icone {
    color: #34343b;

    font-size: 22px;
}


/* ==============================
   DESTAQUES
============================== */

.destaques {
    display: grid;

    gap: 5px;
}

.destaque-item {
    padding: 9px 0;

    color: #d8d8dc;

    font-size: 13px;
    line-height: 1.35;

    border-bottom:
        1px
        solid
        #161619;
}

.destaque-item:last-child {
    border-bottom: 0;
}

.destaque-item::before {
    content: "›";

    margin-right: 8px;

    color: var(--purple);

    font-weight: 900;
}


/* ==============================
   MERCADOS
============================== */

.mercados-grid {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 7px;
}

.mercado-card {
    padding: 11px;

    background: #08080a;

    border:
        1px
        solid
        #17171a;

    border-radius: 9px;
}

.mercado-nome {
    color: #666;

    font-size: 8px;

    letter-spacing: 0.7px;

    text-transform: uppercase;
}

.mercado-valor {
    margin-top: 7px;

    font-size: 16px;
    font-weight: 800;
}

.mercado-variacao {
    margin-top: 3px;

    font-size: 10px;
}

.positivo {
    color: var(--green);
}

.negativo {
    color: var(--red);
}


/* ==============================
   NOTÍCIAS
============================== */

.noticia-item {
    padding:
        10px
        0;

    border-bottom:
        1px
        solid
        #161619;
}

.noticia-item:last-child {
    border-bottom: 0;
}

.noticia-item strong {
    display: block;

    font-size: 12px;

    line-height: 1.3;
}

.noticia-item p {
    margin:
        5px
        0
        0;

    color: #777;

    font-size: 10px;

    line-height: 1.45;
}


/* ==============================
   AGENDA
============================== */

.agenda-item {
    display: grid;

    grid-template-columns:
        48px
        1fr
        auto;

    gap: 8px;

    align-items: center;

    padding:
        8px
        0;

    border-bottom:
        1px
        solid
        #161619;

    font-size: 11px;
}

.agenda-item:last-child {
    border-bottom: 0;
}

.agenda-hora {
    font-weight: 800;

    color: #ddd;
}

.impacto {
    font-size: 7px;

    letter-spacing: 0.7px;

    text-transform: uppercase;
}

.impacto-alto {
    color: var(--red);
}

.impacto-medio {
    color: var(--yellow);
}

.impacto-baixo {
    color: #666;
}


/* ==============================
   RADAR
============================== */

.painel-radar {
    background:
        linear-gradient(
            110deg,
            rgba(129, 117, 255, 0.075),
            rgba(11, 11, 13, 0.95) 40%
        );

    border-color:
        rgba(129, 117, 255, 0.22);
}

.radar {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 8px;
}

.radar-item {
    padding: 12px;

    background:
        rgba(0, 0, 0, 0.25);

    border:
        1px
        solid
        rgba(129, 117, 255, 0.14);

    border-radius: 9px;
}

.radar-ativo {
    display: inline-block;

    padding:
        3px
        7px;

    border-radius: 4px;

    background: var(--purple);

    color: white;

    font-size: 11px;
    font-weight: 900;
}

.radar-motivo {
    margin-top: 7px;

    color: #85858b;

    font-size: 10px;

    line-height: 1.4;
}


/* ==============================
   FONTES E FOOTER
============================== */

footer {
    display: flex;

    justify-content: space-between;

    gap: 30px;

    padding:
        18px
        0
        30px;

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

.fonte {
    display: inline-block;

    margin:
        3px
        5px
        3px
        0;

    padding:
        5px
        8px;

    border:
        1px
        solid
        #1c1c20;

    border-radius: 15px;

    color: #68686e;

    text-decoration: none;

    font-size: 9px;
}

.fonte:hover {
    color: white;

    border-color:
        var(--purple);
}

.footer-frase {
    color: #404044;

    text-align: right;

    font-size: 10px;

    line-height: 1.5;
}


/* ==============================
   ANIMAÇÕES
============================== */

/*
   O movimento do Estado 1 está embutido no WebP:
   - vapor do café
   - leve pulso de luz ambiente
   O avatar não se desloca.
*/


/* ==============================
   NOTEBOOK MENOR
============================== */

@media (max-width: 1150px) {

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

    .painel-hoje {
        grid-column:
            span 1;
    }

    .painel-mercados {
        grid-column:
            span 1;
    }

    .painel-radar {
        grid-column:
            1 / -1;
    }

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


/* ==============================
   CELULAR
============================== */

@media (max-width: 720px) {

    .app {
        width:
            calc(100% - 24px);
    }

    .topbar {
        height: 54px;
    }

    .top-meta {
        display: none;
    }

    .hero {
        min-height: auto;

        grid-template-columns:
            1fr;

        gap: 0;

        padding-top: 20px;
    }

    .hero-texto {
        order: 2;

        padding:
            15px
            0
            35px;
    }

    .hero {
        min-height: auto;

        display: flex;
        flex-direction: column;

        padding-top: 0;
    }

    .hero-scene {
        position: relative;

        order: 1;

        width: 100%;
        height: 220px;

        top: auto;
        right: auto;
        bottom: auto;
    }

    .hero-scene-image {
        object-fit: contain;
        object-position: center;
    }

    .hero-texto {
        order: 2;

        z-index: 3;

        width: 100%;

        padding:
            20px
            0
            35px;
    }

    .hero::before {
        background:
            linear-gradient(
                180deg,
                transparent 0%,
                rgba(5, 5, 5, 0.22) 34%,
                var(--bg) 58%,
                var(--bg) 100%
            );
    }

    .hero::after {
        display: none;
    }

h1 {
        font-size: 52px;

        letter-spacing: -3px;
    }

    .slogan {
        font-size: 15px;
    }

    .abertura {
        font-size: 13px;
    }

    .dashboard {
        display: flex;

        flex-direction: column;

        padding:
            12px
            0;
    }

    .painel {
        padding: 18px;
    }

    h2 {
        font-size: 21px;
    }

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

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

    footer {
        flex-direction:
            column;
    }

    .footer-frase {
        text-align: left;
    }
}