/* ===== Página institucional ===== */
.institucional { color: rgb(28, 28, 72); }
.wrap-inst { width: 92%; max-width: 1100px; margin: 0 auto; }

/* ---------- 1. Abertura ---------- */
.hero-inst {
    background: linear-gradient(135deg, rgb(28, 28, 72) 0%, #2b2b86 100%);
    color: #fff;
    padding: 3rem 0 6rem;
    overflow-x: clip; /* a moldura dourada da foto avança um pouco para a direita; não pode criar rolagem lateral */
}
.hero-inst-grade { display: grid; grid-template-columns: 380px 1fr; gap: 3.5rem; align-items: center; }

.hero-foto { position: relative; }
/* moldura dourada deslocada atrás da foto */
.hero-foto::before {
    content: ""; position: absolute; inset: 16px -16px -16px 16px;
    border: 3px solid goldenrod; border-radius: 18px;
    transition: inset .3s ease;
}
.hero-foto:hover::before { inset: 10px -10px -10px 10px; }
.hero-foto img {
    position: relative; display: block; width: 100%; height: auto;
    aspect-ratio: 1 / 1; object-fit: cover; object-position: center top;
    border-radius: 18px; background: #fff; box-shadow: 0 12px 32px rgba(0, 0, 0, .4);
}

.hero-eyebrow { margin: 0 0 .7rem; color: goldenrod; font-weight: 700; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
.hero-texto h1 { margin: 0 0 .9rem; color: #fff; font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.1; }
.hero-lema { margin: 0 0 1rem; font-size: clamp(1.15rem, 2.4vw, 1.5rem); font-weight: 600; line-height: 1.4; color: #f1f3ff; }
.hero-apoio { margin: 0; max-width: 56ch; line-height: 1.65; color: #d4d9f5; text-wrap: balance; }

/* Entrada suave dos textos (a foto fica parada: ela é o maior elemento da tela e não pode atrasar o carregamento) */
@media (prefers-reduced-motion: no-preference) {
    .hero-eyebrow, .hero-lema, .hero-apoio { animation: hero-subir .7s ease both; }
    .hero-lema { animation-delay: .12s; }
    .hero-apoio { animation-delay: .24s; }
}
@keyframes hero-subir { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- 2. Números ---------- */
.numeros { position: relative; z-index: 1; margin-top: -3.2rem; }
.numeros-grade { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.numero {
    background: #fff; border-top: 5px solid goldenrod; border-radius: 12px;
    padding: 1.3rem 1rem 1.2rem; text-align: center;
    box-shadow: 0 6px 18px rgba(28, 28, 72, .18);
}
.numero-valor {
    display: block; font-family: "Merriweather", Georgia, "Times New Roman", serif; font-weight: 700;
    font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.1; color: rgb(28, 28, 72);
    font-variant-numeric: tabular-nums;
}
.numero-rotulo { display: block; margin-top: .5rem; font-size: .92rem; line-height: 1.4; color: #444; }

/* ---------- 3. Linha do tempo ---------- */
.trajetoria, .biografia { max-width: 760px; }
.trajetoria { margin-top: 4rem; margin-bottom: 3.5rem; }
.titulo-secao { margin: 0 0 1.6rem; font-size: clamp(1.6rem, 3.2vw, 2.1rem); line-height: 1.2; }
.titulo-secao::after { content: ""; display: block; width: 64px; height: 4px; margin-top: .6rem; border-radius: 2px; background: goldenrod; }

.linha-tempo { list-style: none; margin: 0; padding: 0; }
.linha-tempo li { display: grid; grid-template-columns: 4.5rem 1fr; gap: 0 1.6rem; }
.ano {
    padding-top: .05rem; text-align: right; line-height: 1.2;
    font-family: "Merriweather", Georgia, "Times New Roman", serif; font-weight: 700; font-size: 1.4rem; color: rgb(28, 28, 72);
}
.linha-tempo li > div { position: relative; padding: 0 0 1.9rem 1.6rem; border-left: 3px solid #cfd6ea; }
.linha-tempo li:last-child > div { padding-bottom: 0; border-left-color: transparent; }
.linha-tempo li > div::before { /* marcador */
    content: ""; position: absolute; left: -10px; top: .3rem; width: 15px; height: 15px; border-radius: 50%;
    background: goldenrod; border: 3px solid #fff; box-shadow: 0 0 0 2px rgb(28, 28, 72);
}
.linha-tempo h3 { margin: 0 0 .25rem; font-size: 1.05rem; line-height: 1.35; color: rgb(28, 28, 72); }
.linha-tempo p { margin: 0; line-height: 1.6; color: #444; }

/* ---------- 4. Biografia completa ---------- */
.biografia { margin-top: 0; margin-bottom: 4rem; }
.institucional .bio-texto { max-width: 68ch; text-align: left; hyphens: manual; }
.bio-texto h3 {
    margin: 2.2rem 0 .7rem; padding-left: .8rem; border-left: 4px solid goldenrod;
    font-family: "Merriweather", Georgia, "Times New Roman", serif; font-size: 1.25rem; line-height: 1.3; color: rgb(28, 28, 72);
}
.bio-texto > h3:first-child { margin-top: 0; }
.institucional .bio-texto p { margin: 0 0 1.1rem; font-size: 1.05rem; line-height: 1.8; color: #222; }
.institucional .bio-texto .lead { font-size: 1.2rem; line-height: 1.7; color: rgb(28, 28, 72); }
/* letra capitular (em dourado escuro, para ter contraste suficiente sobre o fundo branco) */
.institucional .bio-texto .lead::first-letter {
    float: left; padding: .06em .12em 0 0; line-height: .85; font-size: 3.6em; font-weight: 700; color: #8a6400;
    font-family: "Merriweather", Georgia, "Times New Roman", serif;
}

.principios { max-width: 68ch; margin-top: 2rem; padding: 1.2rem 1.4rem; background: #eef1f8; border-left: 5px solid goldenrod; border-radius: 0 12px 12px 0; }
.principios-texto { margin: 0 0 .8rem; font-weight: 700; color: rgb(28, 28, 72); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li { padding: .35rem .9rem; border-radius: 999px; background: rgb(28, 28, 72); color: #fff; font-size: .9rem; font-weight: 600; }

/* ---------- 5. Chamada final ---------- */
.cta-inst { padding: 3.5rem 0; background: #eef1f8; text-align: center; }
.cta-conteudo h2 { margin: 0 0 .6rem; font-size: clamp(1.6rem, 3.4vw, 2.2rem); color: rgb(28, 28, 72); }
.cta-conteudo p { max-width: 48ch; margin: 0 auto 1.6rem; line-height: 1.6; color: #333; }
.cta-botoes { display: flex; flex-wrap: wrap; justify-content: center; gap: .9rem; }
.cta-btn {
    display: inline-block; padding: .85rem 1.6rem; border-radius: 999px; font-weight: 700; text-decoration: none;
    transition: transform .2s ease, background .2s ease, color .2s ease;
}
.cta-btn:hover { transform: translateY(-2px); }
.cta-btn:focus-visible { outline: 3px solid goldenrod; outline-offset: 3px; }
.cta-btn-principal, .cta-btn-principal:visited { background: rgb(28, 28, 72); color: #fff; border: 2px solid rgb(28, 28, 72); }
.cta-btn-principal:hover { background: #2f2f8f; border-color: #2f2f8f; }
.cta-btn-secundario, .cta-btn-secundario:visited { background: transparent; color: rgb(28, 28, 72); border: 2px solid rgb(28, 28, 72); }
.cta-btn-secundario:hover { background: rgb(28, 28, 72); color: #fff; }

/* ---------- Efeito de surgir ao rolar ---------- */
/* só opacity e transform: não mudam o tamanho nem a posição dos elementos (sem layout shift) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; transition-delay: var(--atraso, 0ms); }
.reveal.is-visible { opacity: 1; transform: none; }
/* depois que apareceu, a transição volta a ser só a do "hover" (sem atraso) */
.reveal.pronto { transition: transform .25s ease, box-shadow .25s ease; transition-delay: 0ms; }
.numero.is-visible:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(28, 28, 72, .26); }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .hero-foto::before, .cta-btn { transition: none; }
    .numero.is-visible:hover, .cta-btn:hover { transform: none; }
}

/* ---------- Telas menores ---------- */
@media (max-width: 800px) {
    .hero-inst { padding: 2.2rem 0 5rem; }
    .hero-inst-grade { grid-template-columns: 1fr; gap: 2.2rem; text-align: center; }
    .hero-foto { width: min(300px, 80%); margin: 0 auto; }
    .hero-foto::before { inset: 12px -12px -12px 12px; }
    .hero-apoio { margin: 0 auto; }
    .numeros { margin-top: -2.8rem; }
    .numeros-grade { grid-template-columns: repeat(2, 1fr); }
    .trajetoria { margin-top: 3rem; }
}
@media (max-width: 560px) {
    .linha-tempo li { grid-template-columns: 3.4rem 1fr; gap: 0 1rem; }
    .ano { font-size: 1.1rem; }
    .linha-tempo li > div { padding-left: 1.2rem; }
    .numero { padding: 1rem .7rem; }
    .numero-rotulo { font-size: .85rem; }
    .institucional .bio-texto p { font-size: 1rem; }
    .institucional .bio-texto .lead { font-size: 1.1rem; }
}
