/* Site pessoal flaviomaldonado.com.br — mobile first, quebras em 768px e 1100px. */

:root {
  /* Paleta */
  --fundo: #0A1628;
  --marinho: #13294B;
  --aco: #2E4A7A;
  --ambar: #F2A93B;
  --papel: #F5F2EB;

  /* Derivadas da paleta */
  --texto-suave: rgba(245, 242, 235, 0.74);
  --texto-fraco: rgba(245, 242, 235, 0.56);
  --borda: rgba(46, 74, 122, 0.55);

  --fonte: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --largura: 1200px;
  --gutter: 20px;
  --topo-altura: 64px;
  --topo-compacto: 56px;
  --raio: 14px;
  --secao-espaco: 88px;
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  background: var(--fundo);
  color: var(--papel);
  font-family: var(--fonte);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

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

.container {
  width: 100%;
  max-width: var(--largura);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section[id] {
  scroll-margin-top: var(--topo-compacto);
}

/* ---------- Botões e links ---------- */

.botao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--ambar);
  color: var(--fundo);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.botao:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px -10px rgba(242, 169, 59, 0.6);
}

.botao--pequeno {
  min-height: 38px;
  padding: 8px 16px;
  font-size: 0.9375rem;
}

.link-seta {
  font-weight: 600;
  color: var(--papel);
  text-decoration: underline;
  text-decoration-color: var(--aco);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  transition: text-decoration-color 0.25s ease;
}

.link-seta:hover {
  text-decoration-color: var(--ambar);
}

.link-seta__icone {
  display: inline-block;
  margin-left: 8px;
  text-decoration: none;
  transition: transform 0.25s ease;
}

.link-seta:hover .link-seta__icone {
  transform: translateX(4px);
}

/* ---------- Topo fixo ---------- */

.topo {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background: linear-gradient(to bottom, rgba(10, 22, 40, 0.7), rgba(10, 22, 40, 0));
  border-bottom: 1px solid transparent;
  transition: background-color 0.35s ease, border-color 0.35s ease;
}

.topo__barra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--topo-altura);
  transition: height 0.35s ease;
}

.topo__logo {
  flex-shrink: 0;
  display: block;
}

.topo__logo img {
  width: auto;
  height: 28px;
  transition: height 0.35s ease;
}

.topo__acoes {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topo.is-compacto,
.topo.is-aberto {
  background: rgba(10, 22, 40, 0.94);
  border-bottom-color: var(--borda);
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .topo.is-compacto {
    background: rgba(10, 22, 40, 0.82);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
}

.topo.is-compacto .topo__barra {
  height: var(--topo-compacto);
}

.topo.is-compacto .topo__logo img {
  height: 24px;
}

/* Navegação: no mobile, sem JS, o menu fica escondido (o conteúdo da página continua todo visível). */
.nav {
  display: none;
}

.menu-botao {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 11px;
  border: 1px solid var(--borda);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

.js .menu-botao {
  display: inline-flex;
}

.menu-botao__linha {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--papel);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

.menu-botao[aria-expanded="true"] .menu-botao__linha:nth-child(2) {
  transform: scaleX(0);
}

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

.js .nav.is-aberto {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--fundo);
  border-bottom: 1px solid var(--borda);
  padding: 8px var(--gutter) 24px;
}

.nav__lista a {
  display: block;
  padding: 14px 0;
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--borda);
}

.nav__lista li:last-child a {
  border-bottom: 0;
}

.nav__lista a:hover {
  color: var(--ambar);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-top: var(--topo-altura);
}

.hero__midia {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.hero__parallax {
  position: absolute;
  inset: 0;
}

.hero__parallax picture,
.hero__foto {
  width: 100%;
  height: 100%;
}

.hero__foto {
  object-fit: cover;
  object-position: 72% 30%;
}

.hero__midia::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10, 22, 40, 0) 55%, var(--fundo) 100%);
  pointer-events: none;
}

.hero__conteudo {
  position: relative;
  padding-top: 8px;
  padding-bottom: 72px;
}

.hero__chamada {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--texto-suave);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hero__chamada::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--ambar);
  flex-shrink: 0;
}

.hero__titulo {
  font-size: clamp(2.125rem, 1.2rem + 4.2vw, 4.25rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.hero__titulo .palavra {
  display: inline-block;
}

.hero__subtitulo {
  margin-top: 22px;
  max-width: 36rem;
  color: var(--texto-suave);
  font-size: 1.125rem;
}

.hero__texto .botao {
  margin-top: 30px;
}

/* ---------- Seções ---------- */

.secao {
  padding-block: var(--secao-espaco);
  border-top: 1px solid var(--borda);
}

.secao__titulo {
  font-size: clamp(1.875rem, 1.3rem + 2.4vw, 3rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.secao__subtitulo {
  margin-top: 14px;
  color: var(--texto-suave);
  font-size: 1.125rem;
}

.secao__cabecalho {
  margin-bottom: 40px;
}

/* ---------- Linha do tempo ---------- */

.historia__titulo {
  margin-bottom: 48px;
}

.linha {
  position: relative;
  padding-left: 36px;
}

.linha__trilho,
.linha__progresso {
  position: absolute;
  left: 7px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  border-radius: 2px;
}

.linha__trilho {
  background: var(--borda);
}

.linha__progresso {
  background: var(--ambar);
  transform-origin: top center;
}

.marco {
  position: relative;
  padding-bottom: 40px;
}

.marco:last-child {
  padding-bottom: 0;
}

.marco::before {
  content: "";
  position: absolute;
  left: -36px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--fundo);
  border: 2px solid var(--ambar);
}

.marco--hoje::before {
  background: var(--ambar);
  box-shadow: 0 0 0 6px rgba(242, 169, 59, 0.18);
}

.marco__titulo {
  font-size: 1.25rem;
  line-height: 1.35;
  font-weight: 700;
}

.marco__quando {
  color: var(--ambar);
}

.marco__texto {
  margin-top: 6px;
  max-width: 38rem;
  color: var(--texto-suave);
}

/* ---------- Números ---------- */

.numeros {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(19, 41, 75, 0.9), rgba(10, 22, 40, 0) 70%),
    var(--fundo);
}

.numeros__rotulo {
  margin-top: 14px;
  color: var(--texto-fraco);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.numeros__lista {
  display: grid;
  gap: 16px;
  margin-top: 40px;
}

.numero {
  padding: 28px 24px;
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  background: rgba(19, 41, 75, 0.55);
}

.numero__destaque {
  color: var(--ambar);
  font-size: clamp(2.25rem, 1.4rem + 4vw, 3.5rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.numero__mais {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.numero__legenda {
  margin-top: 10px;
  font-size: 1.125rem;
  font-weight: 700;
}

.numero__apoio {
  margin-top: 4px;
  color: var(--texto-suave);
  font-size: 1rem;
}

.numeros__nota {
  margin-top: 28px;
  max-width: 44rem;
  color: var(--texto-fraco);
  font-size: 0.9375rem;
}

/* ---------- Bastidores ---------- */

.cartoes {
  display: grid;
  gap: 18px;
}

.cartao {
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  background: var(--marinho);
}

.cartao__titulo {
  font-size: 1.3125rem;
  line-height: 1.3;
  font-weight: 700;
  text-wrap: balance;
}

.cartao__historia {
  margin-top: 14px;
  color: var(--texto-suave);
}

.cartao__licao {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--borda);
}

.cartao__historia + .cartao__licao {
  margin-top: 22px;
}

.cartao__licao strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ambar);
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- IA ---------- */

.ia__texto {
  margin-top: 18px;
  max-width: 34rem;
  color: var(--texto-suave);
  font-size: 1.125rem;
}

.ia__pontos {
  display: grid;
  gap: 14px;
  margin-top: 40px;
}

.ia__ponto {
  position: relative;
  padding: 22px 22px 22px 52px;
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  color: var(--texto-suave);
}

.ia__ponto::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 30px;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--aco);
  transform: rotate(45deg);
}

.ia__ponto strong {
  color: var(--papel);
  font-weight: 700;
}

.ia__fechamento {
  margin-top: 36px;
  padding-left: 20px;
  border-left: 3px solid var(--ambar);
  font-size: clamp(1.25rem, 1rem + 1vw, 1.625rem);
  line-height: 1.4;
  font-weight: 600;
}

/* ---------- Produtos ---------- */

.produtos__lista {
  display: grid;
  gap: 18px;
}

.produto {
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  background: var(--marinho);
}

.produto--principal {
  border-color: var(--aco);
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(46, 74, 122, 0.45), rgba(19, 41, 75, 0) 60%),
    var(--marinho);
}

.produto__logo {
  display: flex;
  align-items: center;
  height: 72px;
}

.produto__logo img {
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.produto__logo img[width="404"] {
  height: 48px;
}

.produto__quando {
  margin-top: 20px;
  color: var(--ambar);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.produto__texto {
  margin-top: 10px;
  color: var(--texto-suave);
}

.produto__link {
  margin-top: auto;
  padding-top: 22px;
}

/* ---------- Sobre ---------- */

.sobre__grade {
  display: grid;
  gap: 32px;
}

.sobre__foto {
  max-width: 420px;
  border-radius: calc(var(--raio) + 6px);
  overflow: hidden;
  border: 1px solid var(--borda);
}

.sobre__bio {
  margin-top: 18px;
  color: var(--texto-suave);
  font-size: 1.125rem;
}

/* ---------- Rodapé ---------- */

.rodape {
  padding-top: var(--secao-espaco);
  border-top: 1px solid var(--borda);
  background:
    radial-gradient(80% 70% at 50% 100%, rgba(19, 41, 75, 0.95), rgba(10, 22, 40, 0) 70%),
    var(--fundo);
}

.rodape__cta {
  text-align: center;
}

.rodape__titulo {
  font-size: clamp(1.875rem, 1.2rem + 3vw, 3.25rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.rodape__texto {
  margin: 16px auto 0;
  max-width: 30rem;
  color: var(--texto-suave);
  font-size: 1.125rem;
}

.rodape__cta .botao {
  margin-top: 30px;
}

.rodape__base {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 72px;
  padding-block: 28px;
  border-top: 1px solid var(--borda);
}

.rodape__direitos {
  color: var(--texto-fraco);
  font-size: 0.9375rem;
}

/* ---------- Página 404 ---------- */

.erro {
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding-block: calc(var(--topo-altura) + 48px) 72px;
  background:
    radial-gradient(90% 70% at 80% 20%, rgba(19, 41, 75, 0.9), rgba(10, 22, 40, 0) 70%),
    var(--fundo);
}

.erro__codigo {
  margin-bottom: 14px;
  color: var(--ambar);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.erro__texto {
  margin-top: 18px;
  max-width: 32rem;
  color: var(--texto-suave);
  font-size: 1.125rem;
}

.erro .botao {
  margin-top: 30px;
}

/* ---------- Estados iniciais das animações (só com JS e GSAP carregados) ---------- */

.js-anim [data-anim],
.js-anim .hero__titulo .palavra {
  opacity: 0;
}

.js-anim .linha__progresso {
  transform: scaleY(0);
}

/* ---------- 768px ---------- */

@media (min-width: 768px) {
  :root {
    --gutter: 32px;
    --topo-altura: 76px;
    --topo-compacto: 60px;
    --secao-espaco: 112px;
  }

  .topo__logo img {
    height: 32px;
  }

  .topo.is-compacto .topo__logo img {
    height: 26px;
  }

  .nav,
  .js .nav {
    display: block;
    margin-left: auto;
  }

  .nav__lista {
    display: flex;
    align-items: center;
    gap: 26px;
  }

  .nav__lista a {
    padding: 6px 0;
    font-size: 0.9375rem;
    border-bottom: 0;
    color: var(--texto-suave);
    transition: color 0.2s ease;
  }

  .nav__lista a:hover {
    color: var(--papel);
  }

  .js .menu-botao {
    display: none;
  }

  .hero__midia {
    aspect-ratio: 16 / 9;
  }

  .hero__foto {
    object-position: center;
  }

  .hero__conteudo {
    margin-top: -48px;
  }

  .numero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 32px;
    align-items: end;
  }

  .numero__destaque {
    grid-row: span 2;
  }

  .numero__legenda {
    margin-top: 0;
  }

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

  .sobre__grade {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 56px;
    align-items: center;
  }

  .sobre__foto {
    max-width: none;
  }

  .rodape__base {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ---------- 1100px ---------- */

@media (min-width: 1100px) {
  :root {
    --topo-altura: 84px;
    --secao-espaco: 136px;
  }

  .topo__logo img {
    height: 34px;
  }

  .nav__lista {
    gap: 34px;
  }

  /* Hero: foto ocupando o fundo, texto à esquerda */
  .hero {
    padding-top: 0;
    display: flex;
    align-items: center;
    min-height: 100vh;
    min-height: 100svh;
  }

  .hero__midia {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
  }

  .hero__foto {
    object-position: 100% 30%;
  }

  .hero__midia::after {
    background:
      linear-gradient(90deg, var(--fundo) 0%, rgba(10, 22, 40, 0.88) 28%, rgba(10, 22, 40, 0) 58%),
      linear-gradient(to bottom, rgba(10, 22, 40, 0) 70%, var(--fundo) 100%);
  }

  .hero__conteudo {
    margin-top: 0;
    padding-top: calc(var(--topo-altura) + 48px);
    padding-bottom: 96px;
  }

  .hero__texto {
    max-width: min(38rem, 48vw);
  }

  .hero__titulo {
    font-size: clamp(3rem, 1rem + 3.3vw, 4.5rem);
  }

  .historia__grade {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 64px;
    align-items: start;
  }

  .historia__titulo {
    position: sticky;
    top: calc(var(--topo-altura) + 40px);
    margin-bottom: 0;
  }

  .marco {
    padding-bottom: 52px;
  }

  .marco__titulo {
    font-size: 1.375rem;
  }

  .numeros__lista {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }

  .numero {
    display: block;
    padding: 36px 32px;
  }

  .numero__destaque {
    font-size: clamp(2.25rem, 2.9vw, 3.25rem);
  }

  .numero__legenda {
    margin-top: 14px;
  }

  .secao__cabecalho {
    margin-bottom: 56px;
  }

  .cartoes {
    gap: 20px;
  }

  .cartao {
    padding: 36px 32px;
  }

  .ia__grade {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: 64px;
    align-items: start;
  }

  .ia__pontos {
    margin-top: 0;
  }

  .ia__fechamento {
    grid-column: 2;
    margin-top: 40px;
  }

  .produtos__lista {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }

  .produto {
    padding: 36px 32px;
  }

  .sobre__grade {
    gap: 88px;
  }
}

/* ---------- Movimento reduzido: sem animação, tudo visível ---------- */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js-anim [data-anim],
  .js-anim .hero__titulo .palavra {
    opacity: 1 !important;
    transform: none !important;
  }

  .js-anim .linha__progresso {
    transform: none !important;
  }
}
