/* ==========================================================================
   CONSÓRCIO PIX — camada CINEMA da HOME
   --------------------------------------------------------------------------
   Carregado SÓ no index.html, DEPOIS do base.css. Todo seletor daqui é
   prefixado por `.pg-home` (classe no <body> da home) — nada vaza para as
   outras 7 páginas, mesmo que este arquivo seja incluído por engano.

   Direção: "Aurora de marca + composição editorial" — o verde da marca vira
   ATMOSFERA em camadas (discos de luz em profundidades diferentes, com
   paralaxe real na rolagem), a grade quebra em bento com hierarquia de
   produto, e a leitura é conduzida por revelações de rolagem.

   Regras de execução:
   - Só transform / opacity / clip-path animam em movimento contínuo.
   - Duas exceções de PAINT, ambas de disparo único e curtas: o traço do
     marca-texto do H1 (background-size) e a abertura do acordeão
     (::details-content). Nada disso roda por frame de rolagem.
   - Zero dependência externa. Zero handler de scroll em JS: a paralaxe é
     `animation-timeline: scroll()/view()`, nativa, atrás de @supports.
   - Tudo que se move está dentro de `prefers-reduced-motion: no-preference`.
   ========================================================================== */

.pg-home {
  --cine: cubic-bezier(.22, 1, .36, 1);
  --grao: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E");
  --dome-h: clamp(38px, 6vw, 78px);
}

/* ==========================================================================
   1. NAV — barra de progresso da narrativa + "pouso" da barra ao rolar
   ========================================================================== */

/* camada sólida que aparece quando a página sai do topo (só opacity anima) */
.pg-home .nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--areia);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--verde-esc) 13%, transparent);
  opacity: 0;
}
/* fio de progresso de leitura, no gradiente da marca */
.pg-home .nav::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  z-index: 1; pointer-events: none; border-radius: 0 2px 2px 0;
  background: var(--grad);
  transform: scaleX(0); transform-origin: 0 50%;
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    .pg-home .nav::before {
      animation: navPousa linear both;
      animation-timeline: scroll(root);
      animation-range: 0 140px;
    }
    .pg-home .nav::after {
      animation: navProgresso linear both;
      animation-timeline: scroll(root);
    }
  }
}
@keyframes navPousa    { to { opacity: 1; } }
@keyframes navProgresso { to { transform: scaleX(1); } }

/* ==========================================================================
   2. HERO — abertura em camadas
   --------------------------------------------------------------------------
   4 planos de profundidade, cada um com sua velocidade de rolagem:
     anéis (::before do base)  →  +22vh
     atmosfera (discos de luz) →  +12vh
     conteúdo/texto            →  -5vh, esmaece
     cartão do simulador       →  fixo (é âncora de #simular; não desalinha)
   ========================================================================== */

.pg-home .hero {
  padding-block: clamp(3rem, 8vw, 5.5rem) calc(clamp(3rem, 8vw, 5.5rem) + var(--dome-h));
}

/* --- plano de atmosfera: discos de luz (radial-gradient, sem filter:blur) --- */
.pg-home .hero__atmo {
  position: absolute; inset: -12% -6% 0; z-index: 0;
  pointer-events: none; overflow: hidden;
}
.pg-home .hero__atmo .blob {
  position: absolute; display: block; border-radius: 50%;
  will-change: transform;
}
.pg-home .hero__atmo .blob--a {
  width: min(76vw, 620px); aspect-ratio: 1; left: -16%; top: -14%;
  background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--lima) 62%, transparent), transparent 64%);
  opacity: .7;
}
.pg-home .hero__atmo .blob--b {
  width: min(92vw, 780px); aspect-ratio: 1; right: -24%; bottom: -40%;
  background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--verde-esc) 92%, transparent), transparent 62%);
  opacity: .8;
}
.pg-home .hero__atmo .blob--c {
  width: min(46vw, 330px); aspect-ratio: 1; right: 12%; top: -20%;
  background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--ouro) 34%, transparent), transparent 66%);
  opacity: .55;
}

/* --- conteúdo ---
   SCRIM (a "seda" do cinema): uma elipse escura, do próprio verde profundo
   da marca, atrás da coluna de leitura.
   Não é só estética — é ACESSIBILIDADE. Texto claro direto sobre o verde
   vivo dava ~2,5:1 de contraste (o mínimo para corpo de texto é 4,5:1).
   Com o scrim, a mesma tipografia clara passa de 4,6:1 para cima, e a
   identidade não muda: continua verde, só ganha profundidade.
   Para clarear/escurecer, mexa nas duas porcentagens de #04351F abaixo. */
.pg-home .hero__in {
  position: relative; z-index: 1;
  background: radial-gradient(88% 96% at 22% 44%,
    color-mix(in srgb, #04351F 72%, transparent) 0%,
    color-mix(in srgb, #04351F 58%, transparent) 45%,
    color-mix(in srgb, #04351F 40%, transparent) 70%,
    transparent 100%);
}
@media (max-width: 819px) {
  /* empilhado, a coluna de leitura ocupa o topo inteiro */
  .pg-home .hero__in {
    background: radial-gradient(140% 88% at 50% 34%,
      color-mix(in srgb, #04351F 72%, transparent) 0%,
      color-mix(in srgb, #04351F 58%, transparent) 45%,
      color-mix(in srgb, #04351F 40%, transparent) 70%,
      transparent 100%);
  }
}
.pg-home .hero .eyebrow { color: #E8F5EE; }
.pg-home .hero__h1 { max-width: 16ch; }
.pg-home .hero__lead { color: #EAF6F0; max-width: 48ch; }
.pg-home .hero__lead strong { color: #fff; }
.pg-home .hero__cta { margin-top: 1.2rem; }

/* palavras do título: cada uma é um bloco próprio para poder subir */
.pg-home .hero__h1 .w { display: inline-block; }

/* --- faixa de prova: pílulas de vidro ESCURO sobre o verde ---
   vidro escuro (e não branco): o texto claro de dentro ganha contraste em
   vez de perder, e as pílulas leem como camada à frente do fundo. --- */
.pg-home .hero__provas { margin-top: 1.9rem; gap: .55rem .6rem; }
.pg-home .hero__provas li {
  padding: .55rem 1rem .55rem .8rem; border-radius: 999px;
  background: color-mix(in srgb, #04351F 34%, transparent);
  border: 1px solid color-mix(in srgb, #fff 22%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font-size: .86rem; font-weight: 600;
}
/* (0,3,0) para vencer o `.verde-bg .provas svg` do base.css) */
.pg-home .hero .provas svg { color: var(--lima); }

/* --- cartão do simulador: painel fantasma atrás = profundidade ---
   (o id #simular é o alvo de "Simular agora" e do CTA — só ganha respiro
   para não parar debaixo da barra fixa; o id em si não muda) --- */
.pg-home #simular { scroll-margin-top: 5.5rem; }
.pg-home .hero__card { position: relative; }
.pg-home .hero__card::before {
  content: ""; position: absolute; z-index: -1;
  inset: 7% -3.5% -6% -3.5%; border-radius: var(--r-lg);
  background: color-mix(in srgb, #fff 15%, transparent);
  border: 1px solid color-mix(in srgb, #fff 22%, transparent);
  transform: rotate(-2.2deg);
}
.pg-home .hero__card h3 { margin: .8rem 0 .4rem; }

/* --- curva de passagem: a seção clara "engole" a base do hero --- */
.pg-home .hero__dome {
  position: absolute; z-index: 2; left: 50%; bottom: -1px;
  width: 150%; height: var(--dome-h);
  transform: translateX(-50%);
  background: var(--areia);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  pointer-events: none;
}

/* --- indicação decorativa de rolagem (sem texto, aria-hidden) --- */
.pg-home .hero__cue {
  position: absolute; z-index: 3; left: 50%; bottom: calc(var(--dome-h) + .8rem);
  width: 2px; height: 42px; border-radius: 2px; overflow: hidden;
  transform: translateX(-50%);
  background: color-mix(in srgb, #fff 22%, transparent);
  pointer-events: none;
}
.pg-home .hero__cue::after {
  content: ""; position: absolute; inset-inline: 0; top: 0; height: 42%;
  background: #fff; border-radius: 2px; transform: translateY(-120%);
}

/* ==========================================================================
   3. SEÇÕES — bandas com passagem suave (nada de corte seco)
   ========================================================================== */

.pg-home .sec-obj {
  position: relative;
  background:
    radial-gradient(120% 62% at 50% -14%, color-mix(in srgb, var(--verde-cl) 72%, transparent), transparent 62%),
    var(--areia);
  padding-block: clamp(2.8rem, 7vw, 4.6rem);
}
.pg-home .sec-por {
  position: relative;
  background: linear-gradient(180deg,
    var(--areia) 0%, var(--areia-esc) 11%,
    var(--areia-esc) 89%, var(--areia) 100%);
}
.pg-home .sec-calc { position: relative; background: var(--areia); padding-block: clamp(2.4rem, 6vw, 4rem); }
.pg-home .sec-como {
  position: relative;
  background: linear-gradient(180deg,
    var(--areia) 0%, var(--areia-esc) 11%,
    var(--areia-esc) 89%, var(--areia) 100%);
}

/* grão fino nas bandas claras — tira o "chapado" sem sujar o texto */
.pg-home .atmo > .wrap { position: relative; z-index: 1; }
.pg-home .atmo::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  pointer-events: none; opacity: .5;
  background-image: var(--grao);
}

/* cabeçalho de seção */
.pg-home .sec-cab { max-width: 22ch; }
.pg-home .sec-cab--centro { max-width: 24ch; margin-inline: auto; }

/* --------------------------------------------------------------------------
   VERDE DE TEXTO sobre fundo claro.
   O --verde (#12B76A) rende 2,46:1 sobre a areia e o --verde-esc (#0A8F57)
   rende 4,13:1 sobre o branco — os dois abaixo dos 4,5:1 exigidos para texto
   pequeno. #087B4A é o mesmo verde da marca, um degrau mais fundo, e passa
   em TODOS os fundos claros da página (mínimo 4,65:1).
   Aplicado só na home; nas outras 7 páginas o token do base.css continua
   valendo — vale abrir uma rodada depois para levar isso ao site inteiro.
   -------------------------------------------------------------------------- */
.pg-home { --verde-txt: #087B4A; }
.pg-home main section:not(.hero) .eyebrow { color: var(--verde-txt); }
.pg-home .card:not(.card--escuro) .card__ir { color: var(--verde-txt); }
.pg-home a.card:not(.card--escuro):hover h3 { color: var(--verde-txt); }

/* ==========================================================================
   4. BENTO — "simule por objetivo" com hierarquia de produto
   --------------------------------------------------------------------------
   Ritmo 2 / 3 / 2 em grade de 6 colunas. No celular continua empilhado.
   ========================================================================== */

.pg-home .bento .card { position: relative; }

@media (min-width: 600px) and (max-width: 899px) {
  .pg-home .bento { grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
  .pg-home .bento > .b--flag { grid-column: span 2; }
}
@media (min-width: 900px) {
  .pg-home .bento {
    grid-template-columns: repeat(6, 1fr);
    gap: clamp(1rem, 1.5vw, 1.4rem);
    align-items: stretch;
  }
  .pg-home .bento > * { grid-column: span 2; }
  .pg-home .bento > .b3 { grid-column: span 3; }
}

/* cartão-carro-chefe */
.pg-home .bento .b--flag {
  overflow: hidden;
  padding: clamp(1.6rem, 3.4vw, 2.6rem);
  border-color: color-mix(in srgb, var(--verde) 24%, transparent);
  box-shadow: var(--sh-2);
}
.pg-home .bento .b--flag::before {
  content: ""; position: absolute; z-index: 0;
  right: -20%; bottom: -46%; width: min(64%, 330px); aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--lima) 52%, transparent), transparent 68%);
}
.pg-home .bento .b--flag > * { position: relative; z-index: 1; }
.pg-home .bento .b--flag h3 { font-size: clamp(1.45rem, 1.1rem + 1.3vw, 2.05rem); }
.pg-home .bento .b--flag p { font-size: 1.02rem; max-width: 32ch; }
.pg-home .bento .b--flag .ico { width: 62px; height: 62px; border-radius: 20px; }
.pg-home .bento .b--flag .ico svg { width: 31px; height: 31px; }

/* ==========================================================================
   5. RESPOSTA 3D AO PONTEIRO (só mouse fino; celular não paga nada por isso)
   ========================================================================== */

.pg-home .tilt { --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 0%; }

@media (hover: hover) and (pointer: fine) {
  /* a perspectiva vive na própria função transform: não precisa (nem deve)
     de transform-style: preserve-3d, que brigaria com o overflow:hidden */
  .pg-home .bento .tilt:hover,
  .pg-home .bento .tilt:focus-visible {
    transform: perspective(900px) translate3d(0, -6px, 0)
               rotateX(var(--rx)) rotateY(var(--ry));
  }
  /* brilho especular que segue o ponteiro */
  .pg-home .tilt::after {
    content: ""; position: absolute; inset: 0; z-index: 2;
    border-radius: inherit; pointer-events: none;
    background: radial-gradient(240px circle at var(--mx) var(--my),
                color-mix(in srgb, #fff 60%, transparent), transparent 72%);
    mix-blend-mode: soft-light;
    opacity: 0; transition: opacity var(--dur) var(--ease);
  }
  .pg-home .tilt:hover::after { opacity: 1; }
}

/* ==========================================================================
   6. "POR QUE" — pódio editorial + fio de marca no topo do cartão
   ========================================================================== */

.pg-home .podio .card { position: relative; padding-top: clamp(1.8rem, 3.8vw, 2.4rem); }
.pg-home .podio .card::before {
  content: ""; position: absolute; top: 0; left: clamp(1.5rem, 3.5vw, 2.1rem);
  width: 46px; height: 4px; border-radius: 0 0 4px 4px;
  background: var(--grad);
}
@media (min-width: 900px) {
  .pg-home .podio { align-items: start; }
  .pg-home .podio > :nth-child(2) { position: relative; top: -1.6rem; }
  .pg-home .podio > :nth-child(3) { position: relative; top: -.7rem; }
}

/* ==========================================================================
   7. CALCULADORA — painel flutuante com luz própria
   ========================================================================== */

.pg-home .painel {
  position: relative; isolation: isolate; overflow: hidden;
  border-radius: clamp(24px, 4vw, 40px);
  padding: clamp(1.5rem, 4vw, 3.2rem);
  background: linear-gradient(158deg, var(--verde-cl) 0%, color-mix(in srgb, var(--areia) 55%, #fff) 78%);
  border: 1px solid color-mix(in srgb, var(--verde) 20%, transparent);
  box-shadow: var(--sh-2);
}
.pg-home .painel::before,
.pg-home .painel::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%;
  pointer-events: none;
}
.pg-home .painel::before {
  width: min(72%, 420px); aspect-ratio: 1; right: -12%; top: -34%;
  background: radial-gradient(circle, color-mix(in srgb, var(--lima) 58%, transparent), transparent 68%);
}
.pg-home .painel::after {
  width: min(62%, 360px); aspect-ratio: 1; left: -16%; bottom: -38%;
  background: radial-gradient(circle, color-mix(in srgb, var(--ouro) 26%, transparent), transparent 68%);
}
.pg-home .painel .card { background: color-mix(in srgb, #fff 92%, transparent); }

/* lista de benefícios com marca de conferido (CSS puro, sem mexer no texto) */
.pg-home .lista-check { list-style: none; margin: 0; padding: 0; }
.pg-home .lista-check li {
  position: relative; padding-left: 2rem; margin-bottom: .7rem; line-height: 1.55;
}
.pg-home .lista-check li:last-child { margin-bottom: 0; }
.pg-home .lista-check li::before {
  content: ""; position: absolute; left: 0; top: .18em;
  width: 1.35rem; height: 1.35rem; border-radius: 50%;
  background: var(--verde-cl) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23087B4A' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / .82rem no-repeat;
}

/* ==========================================================================
   8. COMO FUNCIONA — numerais em escala editorial + trilha que se desenha
   ========================================================================== */

.pg-home .passos { position: relative; padding-top: 2.4rem; margin-top: 2.2rem; }

/* trilha horizontal — mesma em celular e desktop, some no reduce */
.pg-home .passos::before {
  content: ""; position: absolute; z-index: 0; left: 4px; right: 8%; top: .5rem;
  height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--verde), color-mix(in srgb, var(--verde) 18%, transparent));
  transform-origin: 0 50%;
  /* já nasce desenhada; só encolhe para 0 quando existe rolagem para desenhá-la
     de volta (ver o bloco de movimento) */
}
.pg-home .passos .passo { position: relative; z-index: 1; }

/* marcador de cada passo sobre a trilha — só quando os 3 estão lado a lado */
@media (min-width: 820px) {
  .pg-home .passos .passo::after {
    content: ""; position: absolute; left: 0; top: calc(-1.9rem - 4px);
    width: 11px; height: 11px; border-radius: 50%;
    background: var(--verde);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--verde) 16%, transparent);
  }
}
/* empilhado, o marcador viraria bolinha solta no meio do texto: no celular
   quem marca o ritmo é o numeral vazado, que fica ainda maior. */

/* numeral vazado, grande, atrás da leitura */
.pg-home .passos .passo__n {
  font-size: clamp(3.2rem, 2.2rem + 4vw, 5.6rem);
  line-height: .84;
  letter-spacing: -.05em;
  margin: .35rem 0 .45rem -.06em;
}
@supports (-webkit-text-stroke: 2px currentColor) {
  .pg-home .passos .passo__n {
    color: transparent;
    -webkit-text-stroke: 2px color-mix(in srgb, var(--verde) 46%, transparent);
  }
}

/* ==========================================================================
   9. DÚVIDAS FREQUENTES — composição editorial + acordeão de produto
   (estilos migrados do <style> que ficava no <head> do index.html)
   ========================================================================== */

.pg-home .sec-faq { background: var(--areia); }

@media (min-width: 900px) {
  .pg-home .faq-split {
    display: grid; grid-template-columns: .82fr 1.18fr;
    gap: clamp(2rem, 4vw, 3.6rem); align-items: start;
  }
  .pg-home .faq-cab { position: sticky; top: 6.5rem; }
}
.pg-home .faq-cab h2 { max-width: 20ch; }

.pg-home .faq { max-width: none; margin-inline: 0; }
.pg-home .faq details {
  position: relative; overflow: hidden;
  background: var(--branco);
  border: 1px solid color-mix(in srgb, var(--verde-esc) 9%, transparent);
  border-radius: var(--r-md);
  margin-bottom: .7rem;
  box-shadow: var(--sh-1);
  transition: box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.pg-home .faq details::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--grad);
  transform: scaleY(0); transform-origin: 50% 0;
  transition: transform .34s var(--cine);
}
.pg-home .faq details[open] {
  border-color: color-mix(in srgb, var(--verde) 28%, transparent);
  box-shadow: var(--sh-2);
}
.pg-home .faq details[open]::before { transform: scaleY(1); }
.pg-home .faq summary {
  cursor: pointer; list-style: none;
  min-height: 3rem; padding: 1.05rem 1.2rem;
  font: 700 1.02rem var(--titulo); color: var(--grafite);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  transition: color var(--dur) var(--ease);
}
.pg-home .faq summary:hover { color: var(--verde-txt); }
.pg-home .faq summary::-webkit-details-marker { display: none; }
.pg-home .faq summary::after {
  content: "+"; flex: none;
  font: 400 1.5rem/1 var(--corpo); color: var(--verde-txt);
  transition: transform var(--dur) var(--ease);
}
.pg-home .faq details[open] summary::after { transform: rotate(45deg); }
.pg-home .faq details > p {
  margin: 0; padding: 0 1.2rem 1.15rem; max-width: none;
  font-size: .95rem; line-height: 1.6; color: var(--grafite-sv);
}

/* abertura animada do acordeão — progressivo; sem suporte, abre instantâneo */
@supports (interpolate-size: allow-keywords) {
  @supports selector(::details-content) {
    .pg-home .faq { interpolate-size: allow-keywords; }
    .pg-home .faq details::details-content {
      block-size: 0; overflow: clip;
      transition: block-size .36s var(--cine), content-visibility .36s allow-discrete;
    }
    .pg-home .faq details[open]::details-content { block-size: auto; }
  }
}

/* ==========================================================================
   10. MOVIMENTO — tudo daqui pra baixo só existe sem `reduce`
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {

  /* --- entrada do hero: título palavra a palavra ---
     REGRA DE SEGURANÇA: o estado invisível vive SÓ dentro do @keyframes
     (com fill-mode `both`, que já cobre o atraso). Nenhum `opacity: 0`
     solto na regra — se por qualquer motivo a animação não rodar, o texto
     aparece inteiro em vez de sumir. */
  .pg-home .hero__h1 .w {
    animation: palavraSobe .5s var(--cine) both;
    animation-delay: calc(var(--i, 0) * 32ms);
  }
  @keyframes palavraSobe {
    from { opacity: 0; transform: translate3d(0, .46em, 0) rotate(1.4deg); filter: blur(7px); }
    to   { opacity: 1; transform: none; filter: blur(0); }
  }

  /* traço do marca-texto, depois que as palavras assentam.
     Única animação de PAINT da página, de disparo único, sobre 5 palavras. */
  .pg-home .hero__h1 .hl {
    background-repeat: no-repeat;
    animation: marcaTexto .66s var(--cine) both;
    animation-delay: .92s;
  }
  @keyframes marcaTexto {
    from { background-size: 0 100%; }
    to   { background-size: 100% 100%; }
  }

  /* lead, CTA e provas entram atrás do título.
     O cartão do simulador NÃO entra aqui de propósito: é o elemento de
     conversão (aparece na hora) e carrega um painel-fantasma em z-index
     negativo, que um transform de entrada jogaria para cima do cartão. */
  .pg-home .hero__lead,
  .pg-home .hero__cta,
  .pg-home .hero__provas li {
    animation: sobeSuave .62s var(--cine) both;
  }
  .pg-home .hero__lead      { animation-delay: .30s; }
  .pg-home .hero__cta       { animation-delay: .42s; }
  .pg-home .hero__provas li { animation-delay: calc(.56s + var(--i, 0) * 90ms); }
  @keyframes sobeSuave {
    from { opacity: 0; transform: translate3d(0, 22px, 0); }
    to   { opacity: 1; transform: none; }
  }

  /* --- respiro contínuo: discos de luz e cartão do simulador --- */
  .pg-home .hero__atmo .blob {
    animation: deriva 26s ease-in-out infinite alternate;
  }
  .pg-home .hero__atmo .blob--b { animation-duration: 34s; animation-direction: alternate-reverse; }
  .pg-home .hero__atmo .blob--c { animation-duration: 21s; }
  @keyframes deriva {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(4%, -6%, 0) scale(1.13); }
  }

  .pg-home .painel::before { animation: deriva 30s ease-in-out infinite alternate; }
  .pg-home .painel::after  { animation: deriva 38s ease-in-out infinite alternate-reverse; }

  /* --- pulso da indicação de rolagem --- */
  .pg-home .hero__cue::after {
    animation: cueDesce 2.6s var(--cine) infinite;
    will-change: transform;
  }
  @keyframes cueDesce {
    0%        { transform: translateY(-120%); }
    55%, 100% { transform: translateY(260%); }
  }

  /* --- PARALAXE REAL, sem JS: cada plano numa velocidade ---
     Nada de handler de scroll: `animation-timeline: scroll(root)` é nativo,
     roda fora da thread principal e simplesmente não existe onde não houver
     suporte (o hero fica estático e bonito do mesmo jeito). */
  @supports (animation-timeline: scroll()) {
    .pg-home .hero__atmo,
    .pg-home .hero::before,
    .pg-home .hero__cue {
      animation-timeline: scroll(root);
      animation-range: 0 90vh;
      animation-timing-function: linear;
      animation-fill-mode: both;
    }
    .pg-home .hero__atmo   { animation-name: parAtmo; }
    .pg-home .hero::before { animation-name: parAneis; }
    .pg-home .hero__cue    { animation-name: cueSome; animation-range: 0 24vh; }

    /* a COLUNA DE LEITURA só se move onde o hero cabe em ~uma tela. No
       celular ele é alto e empilhado: mexer no texto ali atrapalharia a
       leitura em vez de dar profundidade. A atmosfera continua com paralaxe. */
    @media (min-width: 820px) {
      .pg-home .hero__texto {
        animation: parTexto linear both;
        animation-timeline: scroll(root);
        animation-range: 0 90vh;
      }
    }

    @keyframes parAtmo  { to { transform: translate3d(0, 12vh, 0) scale(1.07); } }
    @keyframes parAneis { to { transform: translate3d(-3vw, 22vh, 0) rotate(9deg); } }
    @keyframes parTexto { to { transform: translate3d(0, -5vh, 0); opacity: .55; } }
    @keyframes cueSome  { to { opacity: 0; } }
  }

  /* --- REVELAÇÃO POR ROLAGEM (cascata escalonada dentro da fileira) --- */
  @supports (animation-timeline: view()) {
    .pg-home .rise {
      animation: riseIn linear both;
      animation-timeline: view();
      animation-range: entry 2% cover 22%;
    }
    @keyframes riseIn {
      from { opacity: 0; transform: translate3d(0, 26px, 0); }
      to   { opacity: 1; transform: none; }
    }

    .pg-home .cascata > * {
      animation: cascataSobe linear both;
      animation-timeline: view();
      animation-range: entry 3% cover 24%;
    }
    /* alcances diferentes por coluna = escalonamento natural na mesma fileira
       (vale para as grades de 3: "por que" e "como funciona") */
    .pg-home .cascata > :nth-child(3n + 2) { animation-range: entry 3% cover 31%; }
    .pg-home .cascata > :nth-child(3n + 3) { animation-range: entry 3% cover 38%; }

    /* o bento tem fileiras de 2 / 3 / 2 — o escalonamento acompanha a POSIÇÃO
       na fileira, não a posição na lista, senão a cascata sai fora de ordem */
    .pg-home .bento.cascata > :nth-child(1),
    .pg-home .bento.cascata > :nth-child(3),
    .pg-home .bento.cascata > :nth-child(6) { animation-range: entry 3% cover 24%; }
    .pg-home .bento.cascata > :nth-child(2),
    .pg-home .bento.cascata > :nth-child(4),
    .pg-home .bento.cascata > :nth-child(7) { animation-range: entry 3% cover 31%; }
    .pg-home .bento.cascata > :nth-child(5) { animation-range: entry 3% cover 38%; }

    @keyframes cascataSobe {
      from { opacity: 0; transform: translate3d(0, 32px, 0) scale(.975); }
      to   { opacity: 1; transform: none; }
    }

    /* a trilha dos passos se desenha conforme a seção entra */
    .pg-home .passos::before {
      animation: trilhaX linear both;
      animation-timeline: view();
      animation-range: entry 14% cover 48%;
    }
    @keyframes trilhaX {
      from { transform: scaleX(0); }
      to   { transform: scaleX(1); }
    }
  }
}

/* ==========================================================================
   11. SEM MOVIMENTO — o conteúdo tem que chegar inteiro e imediato
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .pg-home .hero__h1 .w,
  .pg-home .hero__lead,
  .pg-home .hero__cta,
  .pg-home .hero__provas li,
  .pg-home .hero__card,
  .pg-home .rise,
  .pg-home .cascata > * {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    animation: none !important;
  }
  .pg-home .hero__atmo .blob,
  .pg-home .painel::before,
  .pg-home .painel::after,
  .pg-home .nav::before,
  .pg-home .nav::after,
  .pg-home .hero__cue::after { animation: none !important; }
  .pg-home .nav::before { opacity: 1; }
  .pg-home .nav::after  { transform: scaleX(0); }
  .pg-home .hero__cue   { display: none; }
  .pg-home .passos::before { transform: none; }
  .pg-home .faq details::before { transform: scaleY(0); }
  .pg-home .faq details[open]::before { transform: scaleY(1); }
  .pg-home .bento .tilt:hover { transform: none; }
  .pg-home .tilt::after { display: none; }
}

/* ==========================================================================
   12. AJUSTES DE TELA PEQUENA (90% do tráfego é celular)
   ========================================================================== */

@media (max-width: 599px) {
  .pg-home .hero__atmo .blob--c { display: none; }   /* menos camadas, mesma leitura */
  .pg-home .hero__card::before { inset: 8% -2.5% -5% -2.5%; }
  .pg-home .hero__provas { gap: .5rem; }
  .pg-home .hero__provas li { font-size: .84rem; padding: .5rem .85rem .5rem .7rem; }
  .pg-home .passos .passo__n { font-size: clamp(3rem, 2.4rem + 5vw, 4.2rem); }
  .pg-home .faq summary { font-size: .98rem; padding: 1rem 1.05rem; }
  .pg-home .faq details > p { padding: 0 1.05rem 1.05rem; }
}

/* ==========================================================================
   FOTO DO HERO — fundo sangrando (condomínio; escolha dela em 28/07)
   Ordem das camadas: FOTO → atmosfera (discos) → scrim + conteúdo → domo.

   A foto entra ESCURECIDA e o scrim engrossa. Não é gosto: foi medido.
   O pior pixel da coluna de leitura é o céu (248,243,242) — quase branco.
   Com brightness .62 + opacidade .55, o véu precisa de no mínimo 42% para o
   corpo de texto se manter em 4,5:1 (WCAG AA). Os valores abaixo (78/64/48)
   dão margem sobre esse mínimo.
   Para dar MAIS foto: suba a opacidade e/ou o brilho — e refaça a conta do
   contraste antes, senão volta a falha de acessibilidade que corrigimos.
   ========================================================================== */
.pg-home .hero__foto {
  position: absolute; inset: 0; z-index: 0;
  overflow: hidden; pointer-events: none;
}
.pg-home .hero__foto img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: 62% 72%;   /* puxa o enquadramento p/ a casa; tira céu da coluna de texto */
  opacity: .55; filter: brightness(.62) saturate(.92);
}

/* véu recalculado com a foto atrás (antes: 72/58/40 sem foto) */
.pg-home .hero__in {
  background: radial-gradient(88% 96% at 22% 44%,
    color-mix(in srgb, #04351F 78%, transparent) 0%,
    color-mix(in srgb, #04351F 64%, transparent) 45%,
    color-mix(in srgb, #04351F 48%, transparent) 70%,
    transparent 100%);
}
/* --------------------------------------------------------------------------
   CELULAR: a foto é PROTAGONISTA, não textura.
   Duas mudanças em relação à 1ª versão:
   1) arte PRÓPRIA EM PÉ (hero-mob.webp, 1600x2143). A versão deitada tinha de
      ser ampliada ~60% para preencher um hero alto e estreito — daí a falta de
      nitidez. Em pé, o navegador reduz em vez de ampliar, e fica limpa.
   2) opacidade .88 e brilho .80 (era .42/.62), com o véu em DEGRADÊ VERTICAL:
      forte no topo, onde mora o texto, e sumindo embaixo, onde está o carro.
   Medido: o pior pixel da faixa de texto é 255/247/255; com .88/.80 o véu
   precisa de 56% ali para o corpo de texto ficar em 4,5:1 — a rampa abaixo
   entrega 74% no topo e 62% no fim da faixa de leitura. Embaixo cai para 10%
   e a foto aparece quase limpa (o cartão branco cobre o resto, então nada de
   texto claro fica sem véu).
   -------------------------------------------------------------------------- */
@media (max-width: 819px) {
  .pg-home .hero__in {
    background: linear-gradient(180deg,
      color-mix(in srgb, #04351F 74%, transparent)  0%,
      color-mix(in srgb, #04351F 68%, transparent) 38%,
      color-mix(in srgb, #04351F 62%, transparent) 62%,
      color-mix(in srgb, #04351F 30%, transparent) 80%,
      color-mix(in srgb, #04351F 10%, transparent) 100%);
  }
  .pg-home .hero__foto img {
    opacity: .88; filter: brightness(.80) saturate(.98);
    object-position: 50% 62%;
  }
}

/* --------------------------------------------------------------------------
   GRÃO FORA DE CIMA DA FOTO.
   O `base.css` pinta uma textura de ruído (feTurbulence, opacidade .5,
   mix-blend-mode: overlay) em todo `.verde-bg`, para tirar o "chapado" do
   verde sólido. Sobre uma FOTOGRAFIA esse mesmo ruído come detalhe fino
   (folha de palmeira, pedra, reflexo) e lê como imagem fora de foco.
   Como o pseudo-elemento é pintado depois dos filhos no mesmo plano, ele
   caía exatamente por cima da foto do hero.
   Desktop: fica, bem fraco — ali a foto está a 55% e o grão ainda ajuda o
   verde. Celular: sai, porque lá a foto é protagonista e a nitidez é o ponto.
   -------------------------------------------------------------------------- */
.pg-home .hero::after { opacity: .16; }
@media (max-width: 819px) {
  .pg-home .hero::after { display: none; }
}
