/* =================================================================
   Júlio César 555 — Senador pelo Piauí
   ================================================================= */

/* ---------------------------- Tokens ---------------------------- */
:root {
  --azul:        #003E9D;   /* azul institucional: pílulas, faixa social */
  --azul-texto:  #2B5899;   /* links do menu e rótulos dos cards */
  --azul-barra:  #008DF6;   /* barra final do rodapé */
  --amarelo:     #F4B035;   /* títulos */
  --amarelo-icone: #E49811; /* ícones da trajetória */
  --texto:       #213735;   /* corpo de texto */
  --cinza-link:  #3F3F3F;   /* links do rodapé */
  --cinza-legal: #4A4A4A;   /* texto legal */
  --card:        #E6EAF3;   /* cards da trajetória */
  --branco:      #FFFFFF;

  --container:      1070px;
  --container-wide: 1294px;

  --raio-pilula: 16px;
  --raio-painel: 30px;
  --raio-card:   26px;

  --espaco-secao: 176px;
}

/* ---------------------------- Reset ----------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--branco);
  color: var(--texto);
  font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--amarelo);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 0 0 10px 10px;
  background: var(--azul);
  color: var(--branco);
  font-weight: 700;
  transition: top .2s ease;
}
.skip-link:focus { top: 0; }

/* --------------------------- Estrutura -------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + 40px);
  margin-inline: auto;
  padding-inline: 20px;
}

section[id] { scroll-margin-top: 110px; }

/* Título em pílula azul */
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 70px;
  padding: 6px 22px;
  border-radius: var(--raio-pilula);
  background: var(--azul);
  color: var(--amarelo);
  font-size: 32px;
  font-style: italic;
  font-weight: 800;
  line-height: 1.1;
}

/* ============================ HEADER ============================= */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  padding: 36px 20px 0;
  transition: padding-top .25s ease;
}
.header.is-scrolled { padding-top: 12px; }

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  max-width: var(--container-wide);
  height: 59px;
  margin-inline: auto;
  padding-inline: 28px;
  border-radius: 999px;
  background: var(--branco);
  box-shadow: 0 6px 24px rgba(0, 30, 90, .10);
}

.nav__mobile-label,
.nav__toggle { display: none; }

.nav__list {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav__link {
  display: inline-block;
  padding: 4px 2px;
  color: var(--azul-texto);
  font-size: 15px;
  font-weight: 700;
  border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.nav__link:hover,
.nav__link.is-active { border-bottom-color: currentColor; }
.nav__link:hover { color: var(--azul); }

/* ============================= HERO ============================== */
.hero {
  overflow: hidden;
  background: url('../img/fundo-hero.jpg') center / cover no-repeat;
}

.hero__stage {
  position: relative;
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  aspect-ratio: 1440 / 1020;
}

.hero__stage > img { position: absolute; max-width: none; }

.hero__graphic { left: 26.39%; top: 20.29%; width: 73.61%; z-index: 1; }
.hero__photo   { right: 0;     bottom: 0;   width: 60.21%; z-index: 2; }
.hero__logo    { left:  5.42%; top: 22.45%; width: 38.19%; z-index: 3; }
.hero__seal    { left: 37.92%; top: 70.78%; width: 15.28%; z-index: 4; }

/* ========================== QUEM EU SOU ========================== */
.about { padding: 104px 20px 0; }

.about__inner {
  display: grid;
  grid-template-columns: 371px 382px;
  gap: 35px;
  max-width: 788px;
  margin-inline: auto;
  align-items: start;
}

.about__media { margin-top: 16px; }

.about__text .pill { margin-bottom: 28px; }
.about__text p + p { margin-top: 15px; }

/* =========================== TRAJETÓRIA ========================== */
.trajectory { padding-top: var(--espaco-secao); }

.panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--raio-painel);
}
.panel::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url('../img/fundo-card.png') center / cover no-repeat;
  transform: scaleX(-1);
}

.trajectory__grid {
  display: grid;
  grid-template-columns: 383px 479px;
  gap: 84px;
  align-items: start;
  padding: 58px 52px 60px 72px;
}

.trajectory__text { color: var(--branco); }
.trajectory__text .pill { margin-bottom: 28px; }
.trajectory__text p + p { margin-top: 15px; }

.roles {
  display: grid;
  grid-template-columns: repeat(2, 222px);
  gap: 35px;
}

.role {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  min-height: 210px;
  padding: 24px 36px;
  border-radius: var(--raio-card);
  background: var(--card);
  box-shadow: 0 10px 22px rgba(0, 20, 70, .16);
}

.role__icon {
  width: 36px;
  height: 36px;
  color: var(--amarelo-icone);
  flex: none;
}

.role__name {
  color: var(--azul-texto);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

/* ========================== REALIZAÇÕES ========================== */
.achievements { padding: var(--espaco-secao) 20px 0; }

.achievements__inner {
  max-width: 404px;
  margin-inline: auto;
}

.achievements .pill { margin-bottom: 32px; }
.achievements p + p { margin-top: 15px; }

/* ============================== CTA ============================== */
.cta { padding-top: var(--espaco-secao); }

.cta__panel {
  display: flex;
  align-items: center;
  min-height: 319px;
}

.cta__content {
  width: 327px;
  margin-left: 77px;
  text-align: center;
}

.cta__title {
  color: var(--amarelo);
  font-size: 32px;
  font-style: italic;
  font-weight: 800;
  line-height: 1.3;
}

.cta__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 69px;
  margin-top: 29px;
  padding: 0 18px;
  line-height: 1.2;
  white-space: nowrap;
  border-radius: 999px;
  background: var(--branco);
  color: var(--azul);
  font-size: 20px;
  font-weight: 700;
  transition: transform .2s ease, box-shadow .2s ease;
}
.cta__button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 20, 70, .25);
}

.cta__photo {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 665px;
}

/* ============================ RODAPÉ ============================= */
.social {
  margin-top: var(--espaco-secao);
  background: var(--azul);
}

.social__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 148px;
}

.social__label {
  color: var(--amarelo);
  font-size: 24px;
  font-weight: 700;
}

.social__list {
  display: flex;
  align-items: center;
  gap: 45px;
}

.social__list a {
  display: block;
  color: var(--branco);
  transition: transform .2s ease, opacity .2s ease;
}
.social__list a:hover { transform: translateY(-3px); opacity: .85; }
.social__list svg { width: 30px; height: 30px; }

.footer__inner {
  display: grid;
  grid-template-columns: 545px 300px minmax(0, 1fr);
  align-items: start;
  padding-block: 55px;
}

.footer__brand-wide { width: 426px; }
.footer__brand-tall { display: none; }

.footer__nav a {
  display: inline-block;
  color: var(--cinza-link);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.footer__nav a:hover,
.footer__nav a.is-active { border-bottom-color: currentColor; }
.footer__nav a:hover { color: var(--azul); }
.footer__nav li { display: flex; }
.footer__nav li + li { margin-top: 8px; }

.footer__legal {
  max-width: 234px;
  margin-left: auto;
  color: var(--cinza-legal);
  font-size: 11px;
  line-height: 1.22;
  text-align: center;
}

.footer__bar {
  height: 20px;
  background: var(--azul-barra);
}

/* ====================== Telas médias (≤1120px) =================== */
@media (max-width: 1120px) {
  .trajectory__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
    gap: 40px;
    padding: 48px 40px;
  }
  .roles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .role { padding: 24px 20px; }
  .footer__inner { grid-template-columns: 1fr 240px 225px; gap: 32px; }
  .footer__brand-wide { width: 100%; max-width: 340px; }
}

/* ========================= Mobile (≤900px) ======================= */
@media (max-width: 900px) {
  :root { --espaco-secao: 80px; }

  section[id] { scroll-margin-top: 90px; }

  /* -- Header -- */
  .header { padding: 20px 16px 0; }
  .header.is-scrolled { padding-top: 8px; }

  .nav {
    position: relative;
    justify-content: space-between;
    align-content: center;
    /* zera o row-gap: com flex-wrap, o gap de 20px do desktop entrava entre a
       linha do rótulo e a linha do menu (altura 0 quando fechado) e desalinhava
       verticalmente o conteúdo da barra */
    gap: 0;
    height: auto;
    min-height: 64px;
    padding-inline: 22px;
    border-radius: 32px;
    flex-wrap: wrap;
  }

  .nav__mobile-label {
    display: block;
    order: 0;
    color: var(--azul-texto);
    font-size: 15px;
    font-weight: 700;
  }

  .nav__toggle {
    display: grid;
    place-items: center;
    order: 1;
    width: 34px;
    height: 34px;
    flex: none;
  }
  .nav__burger,
  .nav__burger::before,
  .nav__burger::after {
    display: block;
    width: 22px;
    height: 2.5px;
    border-radius: 2px;
    background: var(--azul);
    transition: transform .25s ease, opacity .2s ease;
  }
  .nav__burger { position: relative; }
  .nav__burger::before,
  .nav__burger::after { content: ''; position: absolute; left: 0; }
  .nav__burger::before { top: -7px; }
  .nav__burger::after  { top: 7px; }

  .nav__toggle[aria-expanded='true'] .nav__burger { background: transparent; }
  .nav__toggle[aria-expanded='true'] .nav__burger::before { transform: translateY(7px) rotate(45deg); }
  .nav__toggle[aria-expanded='true'] .nav__burger::after  { transform: translateY(-7px) rotate(-45deg); }

  .nav__list {
    flex-direction: column;
    align-items: flex-start;
    order: 2;
    gap: 0;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }
  .nav__list.is-open { max-height: 320px; }
  .nav__list li { width: 100%; }
  .nav__list li:first-child { margin-top: 8px; }
  .nav__list li:last-child { margin-bottom: 18px; }
  .nav__link { display: inline-block; padding: 11px 0; }

  /* -- Hero -- */
  .hero { background-position: 86% center; }
  .hero__stage { aspect-ratio: 440 / 1000; max-width: none; }

  .hero__graphic { left: -23.0%; top: 11.1%; width: 138.9%; }
  .hero__photo {
    right: auto;
    left: -10.9%;
    bottom: auto;
    top: 15.9%;
    width: 142.3%;
    -webkit-mask-image: linear-gradient(to bottom, #000 86%, transparent 100%);
            mask-image: linear-gradient(to bottom, #000 86%, transparent 100%);
  }
  .hero__logo { left: 50%; top: 58.3%; width: 77.3%; transform: translateX(-50%); }
  .hero__seal { left: 6.6%; top: 39.0%; width: 39.8%; }

  /* -- Quem eu sou -- */
  .about { padding: 130px 28px 0; }
  .about__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    max-width: 420px;
    justify-items: center;
  }
  .about__media { margin: 0 0 26px; max-width: 370px; }
  .about__text { display: flex; flex-direction: column; width: 100%; }
  .about__text .pill { align-self: center; margin-bottom: 30px; }

  /* -- Trajetória -- */
  .trajectory__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 96px;
    padding: 58px 26px 62px;
  }
  .trajectory__text { display: flex; flex-direction: column; }
  .trajectory__text .pill { align-self: center; }
  .roles { gap: 20px; }
  .role { min-height: 190px; padding: 22px; gap: 20px; }
  .role__name { font-size: 17px; }

  /* -- Realizações -- */
  .achievements { padding-inline: 28px; }
  .achievements__inner { display: flex; flex-direction: column; max-width: 420px; }
  .achievements .pill { align-self: center; }

  /* -- CTA -- */
  .cta__panel { flex-direction: column; align-items: stretch; min-height: 0; }
  .cta__content { width: auto; margin: 63px 24px 0; }
  .cta__title { font-size: 26px; }
  .cta__button { margin-top: 35px; }
  .cta__photo {
    position: static;
    width: 108%;
    max-width: none;
    margin: 75px -4% 0;
  }

  /* -- Rodapé -- */
  .social__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 30px;
    padding: 50px 8px;
    min-height: 0;
  }
  .social__list { gap: 0; justify-content: space-between; width: 100%; }

  .footer__inner {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 46px;
    padding-block: 46px;
  }
  .footer__brand-wide { display: none; }
  .footer__brand-tall { display: block; width: 340px; }
  .footer__nav li { justify-content: center; }
  .footer__legal { max-width: 400px; margin-inline: auto; }
  .footer__bar { height: 19px; }
}

@media (max-width: 420px) {
  .pill { min-height: 60px; font-size: 26px; }
  .cta__title { font-size: 23px; }
  .cta__button { font-size: 16px; height: 60px; }
  .social__label { font-size: 20px; }
  .social__list svg { width: 26px; height: 26px; }
  .footer__brand-tall { width: 82vw; }
  .about, .achievements { padding-inline: 22px; }
  .trajectory__grid { padding-inline: 20px; }
  .role { padding: 20px 10px; }
  .role__name { font-size: 16px; }
}

/* ===================== Preferência de movimento ================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
