/* ---------- Contorno deslocado (assinatura da marca) ----------
   Usado só na foto da seção "A abordagem junguiana", para não se repetir. */
.moldura { position: relative; isolation: isolate; }
.moldura::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border: 1px solid var(--violeta); border-radius: var(--r-md);
  transform: translate(8px, -8px);
}
.moldura img { width: 100%; height: auto; border-radius: var(--r-md); background: var(--areia-clara); }
@media (min-width: 640px) { .moldura::before { transform: translate(12px, -12px); } }

/* Alinhamento do texto com o container quando a foto sangra até a borda */
:root { --alinha-container: max(var(--gutter), calc((100vw - var(--container)) / 2)); }

/* ---------- Hero: foto de ponta a ponta ao lado do texto ---------- */
.hero { padding: 0; }
.hero__grid { display: grid; grid-template-columns: 1fr; }
.hero__texto { padding: var(--s-7) var(--gutter) var(--s-8); max-width: none; }
.hero__texto > * { max-width: 36rem; }
.hero h1 em { color: var(--violeta-profundo); }
/* Os dois parágrafos do hero usam o mesmo tamanho de fonte (o menor) */
.hero__lead { margin: var(--s-6) 0 0; font-size: var(--t-body); line-height: 1.7; color: var(--texto-secundario); }
.hero__texto2 { margin: var(--s-4) 0 var(--s-6); font-size: var(--t-body); color: var(--texto-secundario); line-height: 1.7; }
.hero__foto { margin: 0; line-height: 0; background: var(--areia-clara); }
.hero__foto img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; max-height: 78svh; object-fit: cover; object-position: 55% 30%; }

@media (min-width: 860px) {
  .hero__grid { grid-template-columns: 1fr 1fr; min-height: min(calc(100svh - var(--header-h)), 800px); }
  .hero__texto { display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
    padding: var(--s-9) var(--s-8) var(--s-9) var(--alinha-container); }
  .hero__foto { position: relative; min-height: 520px; }
  .hero__foto img { position: absolute; inset: 0; height: 100%; max-height: none; aspect-ratio: auto; }
}

/* Celular e tablet (< 860 px): a foto vem primeiro e esmaece no creme; o título sobe e se apoia nessa base
   (opção A aprovada por Mariana em 23/11/2026). A versão web (>= 860 px) não muda. */
@media (max-width: 859.98px) {
  .hero__foto {
    order: -1; background: none;
    -webkit-mask-image: linear-gradient(to bottom, #000 64%, rgba(0, 0, 0, .6) 84%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 64%, rgba(0, 0, 0, .6) 84%, transparent 100%);
  }
  /* fundo creme atrás do título, subindo um pouco sobre a base da foto, para o título ficar legível */
  .hero__texto::before {
    content: ""; position: absolute; left: 0; right: 0; z-index: -1; pointer-events: none;
    top: calc(-1 * clamp(26px, 7vw, 54px)); height: clamp(150px, 34vw, 210px);
    background: linear-gradient(to bottom, rgba(247, 243, 239, 0) 0, rgba(247, 243, 239, .72) 34%, var(--papel) 58%, var(--papel) 100%);
  }
  .hero__foto::after { content: none; }
  .hero__foto img { aspect-ratio: auto; max-height: none; height: min(112vw, 760px); object-position: 55% 22%; }
  .hero__texto { position: relative; z-index: 1; margin-top: calc(-1 * clamp(52px, 13vw, 110px)); padding-top: 0; }
  .hero h1 { text-shadow: 0 0 18px rgba(247, 243, 239, .95), 0 0 36px rgba(247, 243, 239, .9); }
}

/* Entrada suave: só quando há JavaScript (sem JS o conteúdo aparece direto) */
@media (prefers-reduced-motion: no-preference) {
  .js .hero__texto > *, .js .hero__foto { animation: entrada .6s var(--ease) both; }
  .js .hero__texto > :nth-child(2) { animation-delay: .08s; }
  .js .hero__texto > :nth-child(3) { animation-delay: .16s; }
  .js .hero__texto > :nth-child(4) { animation-delay: .24s; }
  .js .hero__foto { animation-delay: .2s; }
  @keyframes entrada { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
}
