/* =========================================================
   VARIÁVEIS
========================================================= */

:root {

    --fundo: #f7f9fc;
    --fundo-card: #ffffff;
    --fundo-secundario: #eef3f9;

    --texto: #172033;
    --texto-secundario: #4d5a6d;

    --azul: #0756d6;
    --azul-escuro: #063d9d;
    --azul-claro: #e8f0ff;

    --amarelo: #ffd600;
    --amarelo-claro: #fff4a8;

    --borda: #d9e1ec;

    --header: #073b9c;
    --header-texto: #ffffff;

    --sucesso: #0a8f5b;

    --sombra:
        0 10px 30px rgba(12, 39, 80, 0.10);

    --sombra-forte:
        0 18px 45px rgba(12, 39, 80, 0.16);

    --raio: 18px;

    --tamanho-texto: 20px;
}


/* =========================================================
   MODO ESCURO
========================================================= */

body.dark {

    --fundo: #070b12;
    --fundo-card: #101722;
    --fundo-secundario: #151e2b;

    --texto: #f4f7fb;
    --texto-secundario: #c5cedb;

    --azul: #66a0ff;
    --azul-escuro: #8ab5ff;
    --azul-claro: #142746;

    --amarelo: #ffe500;
    --amarelo-claro: #453d00;

    --borda: #2b3748;

    --header: #05070b;
    --header-texto: #ffffff;

    --sombra:
        0 10px 30px rgba(0, 0, 0, 0.35);

    --sombra-forte:
        0 18px 45px rgba(0, 0, 0, 0.45);
}


/* =========================================================
   RESET
========================================================= */

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


html {

    scroll-behavior: smooth;

    scroll-padding-top: 150px;
}


body {

    font-family: "Poppins", sans-serif;

    background: var(--fundo);

    color: var(--texto);

    line-height: 1.8;

    transition:
        background-color 0.3s ease,
        color 0.3s ease;

    overflow-x: hidden;
}


button,
a {

    font-family: inherit;
}


button {

    cursor: pointer;
}


::selection {

    background: var(--azul);

    color: white;
}


/* =========================================================
   ACESSIBILIDADE DE FOCO
========================================================= */

button:focus-visible,
a:focus-visible {

    outline: 4px solid #ff9800;

    outline-offset: 4px;

    border-radius: 8px;
}


/* =========================================================
   CABEÇALHO
========================================================= */

.cabecalho {

    position: sticky;

    top: 0;

    z-index: 1000;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 30px;

    padding: 16px 5%;

    background: var(--header);

    color: var(--header-texto);

    box-shadow:
        0 5px 25px rgba(0, 0, 0, 0.18);
}


.logo {

    display: flex;

    align-items: center;

    gap: 16px;

    min-width: 0;
}


.logo-escola {

    width: 82px;

    height: 82px;

    object-fit: contain;

    background: white;

    border-radius: 12px;

    padding: 4px;
}


.logo-texto {

    min-width: 0;
}


.logo-subtitulo {

    display: block;

    font-size: 13px;

    font-weight: 500;

    letter-spacing: 1.5px;

    text-transform: uppercase;

    opacity: 0.8;
}


.logo h1 {

    font-size: 22px;

    line-height: 1.25;

    font-weight: 700;
}


/* =========================================================
   NAVEGAÇÃO
========================================================= */

.navegacao {

    display: flex;

    align-items: center;

    justify-content: flex-end;

    flex-wrap: wrap;

    gap: 8px;
}


.botao-nav,
.botao-controle {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-height: 44px;

    padding: 10px 15px;

    border: 2px solid transparent;

    border-radius: 10px;

    font-size: 14px;

    font-weight: 700;

    text-decoration: none;

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


.botao-nav {

    background: white;

    color: #063d9d;
}


.botao-nav:hover {

    transform: translateY(-2px);

    background: #e8f0ff;

    border-color: #9fc0ff;
}


.botao-controle {

    border-color: rgba(255, 255, 255, 0.25);

    background: rgba(255, 255, 255, 0.10);

    color: white;
}


.botao-controle:hover {

    transform: translateY(-2px);

    background: rgba(255, 255, 255, 0.20);
}


.dark .botao-nav {

    background: #172235;

    color: #ffffff;

    border-color: #31415a;
}


.dark .botao-nav:hover {

    background: #22324c;
}


/* =========================================================
   LEITOR
========================================================= */

.leitor {

    padding: 55px 20px;

    background:
        linear-gradient(
            135deg,
            var(--azul-claro),
            var(--fundo)
        );

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


.leitor-conteudo {

    width: min(1100px, 92%);

    margin: auto;

    text-align: center;
}


.etiqueta {

    display: inline-block;

    margin-bottom: 10px;

    padding: 5px 12px;

    border-radius: 999px;

    background: var(--azul);

    color: white;

    font-size: 12px;

    font-weight: 700;

    letter-spacing: 1px;

    text-transform: uppercase;
}


.leitor h2 {

    margin-bottom: 8px;

    color: var(--azul);

    font-size: clamp(28px, 4vw, 42px);

    line-height: 1.2;
}


.leitor p {

    color: var(--texto-secundario);

    font-size: 16px;
}


.botoes-leitor {

    display: flex;

    align-items: center;

    justify-content: center;

    flex-wrap: wrap;

    gap: 12px;

    margin-top: 25px;
}


.botao-leitor {

    min-width: 120px;

    padding: 12px 18px;

    border: 2px solid var(--azul);

    border-radius: 10px;

    background: var(--fundo-card);

    color: var(--azul);

    font-size: 15px;

    font-weight: 700;

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}


.botao-leitor:hover {

    transform: translateY(-2px);

    background: var(--azul);

    color: white;
}


.botao-leitor.principal {

    background: var(--azul);

    color: white;
}


.botao-leitor.principal:hover {

    background: var(--azul-escuro);
}


.status-leitor {

    margin-top: 16px;

    min-height: 28px;

    font-size: 14px !important;

    font-weight: 600;
}


/* =========================================================
   CONTEÚDO PRINCIPAL
========================================================= */

main {

    width: min(1250px, 92%);

    margin: auto;
}


.materia {

    padding: 90px 0 50px;

    scroll-margin-top: 130px;
}


.materia + .materia {

    border-top: 2px solid var(--borda);

    margin-top: 50px;
}


/* =========================================================
   CABEÇALHO DAS MATÉRIAS
========================================================= */

.cabecalho-materia {

    display: grid;

    grid-template-columns: auto 1fr;

    align-items: center;

    gap: 25px;

    margin-bottom: 55px;

    padding: 35px;

    border-radius: 24px;

    background:
        linear-gradient(
            135deg,
            var(--azul),
            var(--azul-escuro)
        );

    color: white;

    box-shadow: var(--sombra-forte);
}


.numero-materia {

    display: flex;

    align-items: center;

    justify-content: center;

    width: 95px;

    height: 95px;

    border-radius: 22px;

    background: rgba(255, 255, 255, 0.15);

    border: 2px solid rgba(255, 255, 255, 0.3);

    font-size: 30px;

    font-weight: 800;
}


.etiqueta-materia {

    display: block;

    margin-bottom: 5px;

    font-size: 14px;

    font-weight: 600;

    letter-spacing: 2px;

    text-transform: uppercase;

    opacity: 0.85;
}


.titulo-principal {

    color: white;

    font-size: clamp(48px, 8vw, 92px);

    line-height: 1;

    letter-spacing: -2px;

    font-weight: 800;

    margin-bottom: 15px;
}


.descricao-materia {

    max-width: 850px;

    color: rgba(255, 255, 255, 0.9);

    font-size: 18px;

    line-height: 1.7;
}


/* =========================================================
   ATIVIDADES
========================================================= */

.atividade {

    margin-bottom: 70px;

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

    border-radius: var(--raio);

    background: var(--fundo-card);

    box-shadow: var(--sombra);

    overflow: hidden;
}


.cabecalho-atividade {

    padding: 35px 40px;

    background:
        linear-gradient(
            135deg,
            var(--fundo-secundario),
            var(--fundo-card)
        );

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


.numero-atividade {

    display: inline-block;

    margin-bottom: 8px;

    color: var(--azul);

    font-size: 14px;

    font-weight: 800;

    letter-spacing: 2px;
}


.cabecalho-atividade h3 {

    color: var(--texto);

    font-size: clamp(30px, 5vw, 48px);

    line-height: 1.2;

    font-weight: 800;
}


.conteudo-atividade {

    padding: 40px;
}


.conteudo-atividade h4 {

    position: relative;

    margin-top: 45px;

    margin-bottom: 20px;

    padding-left: 18px;

    color: var(--azul);

    font-size: clamp(25px, 3vw, 34px);

    line-height: 1.3;
}


.conteudo-atividade h4:first-child {

    margin-top: 0;
}


.conteudo-atividade h4::before {

    content: "";

    position: absolute;

    left: 0;

    top: 5px;

    width: 6px;

    height: calc(100% - 10px);

    border-radius: 10px;

    background: var(--amarelo);
}


.conteudo-atividade h5 {

    margin-top: 30px;

    margin-bottom: 12px;

    color: var(--texto);

    font-size: clamp(21px, 2.5vw, 27px);

    line-height: 1.4;
}


/* =========================================================
   TEXTOS
========================================================= */

.texto {

    margin-bottom: 20px;

    color: var(--texto);

    font-size: var(--tamanho-texto);

    line-height: 1.9;

    text-align: left;
}


.texto strong {

    color: var(--azul);
}


.destaque-introducao {

    padding: 25px;

    border-left: 6px solid var(--azul);

    border-radius: 10px;

    background: var(--azul-claro);

    font-size: calc(var(--tamanho-texto) + 1px);

    font-weight: 500;
}


/* =========================================================
   TEXTO SENDO LIDO
========================================================= */

.lendo {

    position: relative;

    padding: 12px 16px;

    border-radius: 10px;

    background: var(--amarelo-claro) !important;

    color: #111 !important;

    box-shadow:
        0 0 0 3px rgba(255, 214, 0, 0.25);
}


/* =========================================================
   CARDS DE TECNOLOGIAS
========================================================= */

.tecnologias {

    display: grid;

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

    gap: 20px;

    margin: 25px 0 35px;
}


.tecnologia-card {

    position: relative;

    padding: 28px;

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

    border-radius: 16px;

    background: var(--fundo-secundario);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}


.tecnologia-card:hover {

    transform: translateY(-5px);

    border-color: var(--azul);

    box-shadow: var(--sombra);
}


.tecnologia-numero {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    width: 42px;

    height: 42px;

    margin-bottom: 15px;

    border-radius: 50%;

    background: var(--azul);

    color: white;

    font-weight: 800;
}


.tecnologia-card h5 {

    margin-top: 0;

    font-size: 23px;
}


.tecnologia-card p {

    margin-bottom: 12px;

    color: var(--texto-secundario);

    font-size: 16px;

    line-height: 1.7;
}


.tecnologia-card p strong {

    color: var(--azul);
}


/* =========================================================
   APLICAÇÕES DE FÍSICA
========================================================= */

.aplicacao-optica {

    position: relative;

    margin: 30px 0;

    padding: 35px 35px 25px 100px;

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

    border-radius: 18px;

    background: var(--fundo-secundario);

    overflow: hidden;
}


.numero-aplicacao {

    position: absolute;

    top: 25px;

    left: 25px;

    display: flex;

    align-items: center;

    justify-content: center;

    width: 55px;

    height: 55px;

    border-radius: 14px;

    background: var(--azul);

    color: white;

    font-size: 18px;

    font-weight: 800;
}


.aplicacao-optica h4 {

    margin-top: 0;
}


.informacoes {

    margin-top: 20px;
}


/* =========================================================
   IA
========================================================= */

.bloco-ia {

    margin-top: 45px;

    padding: 30px;

    border: 2px solid var(--azul);

    border-radius: 18px;

    background: var(--azul-claro);
}


.bloco-ia h4 {

    margin-top: 0;

    color: var(--azul);
}


.lista-numerada {

    padding-left: 28px;

    margin: 20px 0;
}


.lista-numerada li {

    padding: 10px 0;

    color: var(--texto);

    font-size: var(--tamanho-texto);

    line-height: 1.7;
}


.lista-prompts {

    margin: 20px 0;

    padding: 20px 25px 20px 45px;

    border-radius: 12px;

    background: var(--fundo-card);
}


.lista-prompts li {

    padding: 8px 0;

    font-size: calc(var(--tamanho-texto) - 1px);
}


/* =========================================================
   LISTAS
========================================================= */

.lista-destaque {

    display: grid;

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

    gap: 10px;

    margin: 20px 0 30px;

    padding: 0;

    list-style: none;
}


.lista-destaque li {

    padding: 14px 18px;

    border-radius: 10px;

    background: var(--azul-claro);

    color: var(--texto);

    font-weight: 600;
}


.lista-destaque li::before {

    content: "✓";

    margin-right: 10px;

    color: var(--sucesso);

    font-weight: 800;
}


/* =========================================================
   REFERÊNCIAS
========================================================= */

.referencias {

    display: flex;

    flex-direction: column;

    gap: 14px;

    padding-left: 25px;
}


.referencias li {

    padding-left: 5px;

    color: var(--texto-secundario);

    font-size: calc(var(--tamanho-texto) - 2px);

    line-height: 1.7;
}


/* =========================================================
   BOTÃO VOLTAR AO TOPO
========================================================= */

.voltar-topo {

    position: fixed;

    right: 25px;

    bottom: 25px;

    z-index: 900;

    display: flex;

    align-items: center;

    justify-content: center;

    width: 52px;

    height: 52px;

    border: none;

    border-radius: 50%;

    background: var(--azul);

    color: white;

    font-size: 25px;

    font-weight: 700;

    box-shadow: var(--sombra);

    opacity: 0;

    visibility: hidden;

    transform: translateY(15px);

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


.voltar-topo.visivel {

    opacity: 1;

    visibility: visible;

    transform: translateY(0);
}


.voltar-topo:hover {

    background: var(--azul-escuro);

    transform: translateY(-3px);
}


/* =========================================================
   FOOTER
========================================================= */

footer {

    margin-top: 80px;

    padding: 60px 20px;

    background: var(--header);

    color: white;

    text-align: center;

    border-top: 5px solid var(--amarelo);
}


.footer-conteudo {

    width: min(800px, 92%);

    margin: auto;
}


footer .etiqueta {

    background: rgba(255, 255, 255, 0.15);
}


footer h2 {

    margin: 15px 0 25px;

    color: white;

    font-size: 36px;
}


.participantes {

    display: grid;

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

    gap: 10px;

    margin-bottom: 30px;
}


.participantes p {

    padding: 10px;

    border-radius: 10px;

    background: rgba(255, 255, 255, 0.08);

    font-size: 17px;
}


.turma {

    display: flex;

    flex-direction: column;

    gap: 5px;

    padding-top: 25px;

    border-top: 1px solid rgba(255, 255, 255, 0.2);

    font-size: 17px;
}


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

@keyframes aparecer {

    from {

        opacity: 0;

        transform: translateY(25px);
    }

    to {

        opacity: 1;

        transform: translateY(0);
    }
}


.materia {

    animation: aparecer 0.7s ease both;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1000px) {

    .cabecalho {

        align-items: flex-start;

        flex-direction: column;
    }


    .navegacao {

        width: 100%;

        justify-content: flex-start;
    }


    .titulo-principal {

        font-size: clamp(45px, 9vw, 75px);
    }


    .tecnologias {

        grid-template-columns: 1fr;
    }

}


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

@media (max-width: 700px) {

    html {

        scroll-padding-top: 20px;
    }


    .cabecalho {

        position: relative;

        padding: 15px;
    }


    .logo {

        width: 100%;
    }


    .logo-escola {

        width: 65px;

        height: 65px;
    }


    .logo h1 {

        font-size: 18px;
    }


    .logo-subtitulo {

        font-size: 10px;
    }


    .navegacao {

        display: grid;

        grid-template-columns: 1fr 1fr;

        width: 100%;
    }


    .botao-nav,
    .botao-controle {

        width: 100%;

        font-size: 12px;

        padding: 10px 8px;
    }


    .leitor {

        padding: 40px 15px;
    }


    .botoes-leitor {

        display: grid;

        grid-template-columns: 1fr 1fr;

        width: 100%;
    }


    .botao-leitor {

        width: 100%;

        min-width: 0;
    }


    main {

        width: 94%;
    }


    .materia {

        padding-top: 55px;
    }


    .cabecalho-materia {

        grid-template-columns: 1fr;

        padding: 25px;

        gap: 15px;
    }


    .numero-materia {

        width: 65px;

        height: 65px;

        font-size: 22px;
    }


    .titulo-principal {

        font-size: clamp(40px, 13vw, 60px);

        letter-spacing: -1px;
    }


    .descricao-materia {

        font-size: 15px;
    }


    .cabecalho-atividade {

        padding: 25px 20px;
    }


    .conteudo-atividade {

        padding: 25px 20px;
    }


    .conteudo-atividade h4 {

        font-size: 25px;
    }


    .conteudo-atividade h5 {

        font-size: 21px;
    }


    .texto {

        font-size: var(--tamanho-texto);

        line-height: 1.8;

        text-align: left;
    }


    .aplicacao-optica {

        padding: 90px 20px 20px;
    }


    .numero-aplicacao {

        top: 20px;

        left: 20px;
    }


    .lista-destaque {

        grid-template-columns: 1fr;
    }


    .participantes {

        grid-template-columns: 1fr;
    }


    .voltar-topo {

        right: 15px;

        bottom: 15px;

        width: 46px;

        height: 46px;
    }

}


/* =========================================================
   TELAS MUITO PEQUENAS
========================================================= */

@media (max-width: 420px) {

    .navegacao {

        grid-template-columns: 1fr;
    }


    .botoes-leitor {

        grid-template-columns: 1fr;
    }


    .titulo-principal {

        font-size: 38px;
    }


    .cabecalho-materia {

        padding: 20px;
    }

}


/* =========================================================
   REDUÇÃO DE MOVIMENTO
========================================================= */

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

    html {

        scroll-behavior: auto;
    }


    *,
    *::before,
    *::after {

        animation-duration: 0.01ms !important;

        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;
    }

}

.alerta-seguranca h1 {
    color: #B91C1C;
}

.alerta-seguranca .texto-intro {
    background: #FEF2F2;
    border-left: 4px solid #DC2626;
}

.alerta-seguranca h2 {
    color: #DC2626;
}

.alerta-seguranca .dica {
    background: #FFF1F2;
}