/* ============================================================
   Jennifer Paim Advocacia - sistema visual do site
   Paleta e tipografia: identidade aprovada (ver ../DESIGN.md)
   ============================================================ */

/* ---------- Fontes (self-hosted, variable) ---------- */
@font-face {
  font-family: 'Sora';
  src: url('../assets/fonts/Sora.woff2') format('woff2-variations');
  font-weight: 100 800;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito Sans';
  src: url('../assets/fonts/NunitoSans.woff2') format('woff2-variations');
  font-weight: 200 900;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --green-deep: #2E3D28;
  --green-night: #1C281A;
  --green-base: #4B6943;
  --terracotta: #6C3C18;
  --brown-deep: #3A2A1E;
  --gold: #B8935A;
  --gold-soft: #C9A96E;
  --cream: #F3EEE3;
  --cream-dim: rgba(243, 238, 227, .78);
  --cream-faint: rgba(243, 238, 227, .55);
  --line: rgba(243, 238, 227, .14);

  --font-display: 'Sora', system-ui, sans-serif;
  --font-body: 'Nunito Sans', system-ui, sans-serif;

  --step--1: clamp(.83rem, .8rem + .18vw, .95rem);
  --step-0: clamp(1.06rem, 1rem + .3vw, 1.19rem);
  --step-1: clamp(1.33rem, 1.24rem + .45vw, 1.61rem);
  --step-2: clamp(1.66rem, 1.5rem + .8vw, 2.15rem);
  --step-3: clamp(2.07rem, 1.8rem + 1.35vw, 2.99rem);
  --step-4: clamp(2.59rem, 2.1rem + 2.4vw, 4.2rem);

  --space-s: clamp(1rem, .9rem + .5vw, 1.5rem);
  --space-m: clamp(2rem, 1.7rem + 1.5vw, 3rem);
  --space-l: clamp(4rem, 3rem + 4vw, 7rem);
  --space-xl: clamp(6rem, 4.5rem + 7vw, 11rem);

  --radius-card: 20px;
  --radius-pill: 999px;

  --z-texture: -1;
  --z-nav: 10;
  --z-float: 20;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--cream);
  background-color: var(--green-deep);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0 0 .5em;
}

p { margin: 0 0 1em; max-width: 65ch; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

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

::selection { background: var(--gold); color: var(--green-night); }

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

/* ============================================================
   Camada de textura fixa (técnica zoonote: img fixed, z -1,
   conteúdo rola por cima; crossfade por seção via data-world)
   ============================================================ */
.texture-layer {
  position: fixed;
  inset: 0;
  z-index: var(--z-texture);
  pointer-events: none;
}
.texture-layer img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.1s var(--ease-out);
}
.texture-layer img.is-active { opacity: 1; }

/* véu de profundidade: escurece a textura pra garantir contraste do texto */
.texture-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(0,0,0,.12), transparent 55%),
    linear-gradient(rgba(14, 20, 12, .34), rgba(14, 20, 12, .34));
}

/* ============================================================
   Navegação
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 72px;
  padding: 0 clamp(1.1rem, 3vw, 2.5rem);
  transition: background-color .45s var(--ease-out), backdrop-filter .45s var(--ease-out);
}
.nav.is-scrolled {
  background: rgba(28, 40, 26, .82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav__brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.nav__brand small {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: .68rem;
  letter-spacing: .02em;
  color: var(--cream-dim);
}
.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.2vw, 2rem);
  list-style: none;
  margin: 0; padding: 0;
}
.nav__links a {
  font-size: .92rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--cream-dim);
  transition: color .25s;
}
.nav__links a:hover { color: var(--cream); }
@media (max-width: 860px) {
  .nav__links { display: none; }
}

/* ============================================================
   Botões
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .9rem 1.7rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .2s var(--ease-out), background-color .25s, box-shadow .25s;
}
.btn:active { transform: translateY(1px) scale(.985); }
.btn--gold {
  background: var(--gold);
  color: var(--green-night);
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .55);
}
.btn--gold:hover { background: var(--gold-soft); }
.btn--gold svg { flex: none; }
.btn--ghost {
  border: 1px solid rgba(243, 238, 227, .35);
  color: var(--cream);
  background: rgba(28, 40, 26, .25);
}
.btn--ghost:hover { border-color: var(--cream-dim); }
.nav .btn { padding: .65rem 1.25rem; font-size: .92rem; min-height: 44px; }
@media (max-width: 480px) {
  .nav .btn span { display: none; }
  .nav .btn { padding: .65rem .8rem; }
}

/* ============================================================
   HERO - aberto desde o primeiro segundo (11/07: removido o efeito
   de nome vazado com abertura no scroll - pro público em pânico,
   clareza imediata pesa mais que o impacto visual do efeito).
   ============================================================ */
.hero {
  position: relative;
  height: 100dvh;
  min-height: 640px;
}
.hero__stage {
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow: hidden;
}
.hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
}
/* véu escuro pra garantir legibilidade do texto sobre a foto */
.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(14, 20, 12, .72) 0%, rgba(14, 20, 12, .18) 45%, rgba(14, 20, 12, .30) 100%);
}

.hero__content {
  position: absolute;
  left: 0; right: 0;
  bottom: clamp(2.2rem, 7vh, 5rem);
  padding: 0 clamp(1.2rem, 4vw, 3.5rem);
}
.hero__content h1 {
  font-size: var(--step-3);
  max-width: 15ch;
  margin-bottom: .35em;
}
.hero__content .hero__sub {
  font-size: var(--step-0);
  color: var(--cream-dim);
  max-width: 34ch;
  margin-bottom: 1.4em;
}
.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  align-items: center;
}

/* ============================================================
   Layout base das seções
   ============================================================ */
.section {
  position: relative;
  padding: var(--space-xl) clamp(1.2rem, 4vw, 3.5rem);
}
.wrap { max-width: 1180px; margin: 0 auto; }
.wrap--narrow { max-width: 780px; margin: 0 auto; }

.section h2 {
  font-size: var(--step-3);
  max-width: 22ch;
}
.section .lead {
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--cream-dim);
  max-width: 46ch;
}
.accent { color: var(--gold); }

/* reveal on scroll (JS adiciona .in-view; sem JS tudo visível) */
html.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
html.js .reveal.in-view { opacity: 1; transform: none; }
html.reduced-motion .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }

/* ============================================================
   Faixa institucional (fatos, sem superlativo)
   ============================================================ */
.institucional {
  padding: var(--space-m) clamp(1.2rem, 4vw, 3.5rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(28, 40, 26, .35);
}
.institucional .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s) var(--space-m);
  justify-content: space-between;
}
.institucional .fact {
  font-size: .95rem;
  color: var(--cream-dim);
}
.institucional .fact strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--cream);
  letter-spacing: -0.01em;
}

/* ============================================================
   Seção "Primeiras 24 horas"
   ============================================================ */
.urgencia .lead { margin-bottom: var(--space-m); }
.urgencia__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-m);
  margin: var(--space-m) 0;
  counter-reset: passo;
}
.urgencia__step {
  counter-increment: passo;
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
}
.urgencia__step h3 {
  font-size: var(--step-1);
  display: flex;
  align-items: baseline;
  gap: .75rem;
}
.urgencia__step h3::before {
  content: counter(passo);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .9rem;
  color: var(--green-night);
  background: var(--gold);
  border-radius: var(--radius-pill);
  min-width: 1.7rem;
  height: 1.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-2px);
}
.urgencia__step p { color: var(--cream-dim); font-size: var(--step-0); }

/* ============================================================
   Áreas de atuação
   ============================================================ */
.areas__groups {
  display: grid;
  gap: var(--space-l);
  margin-top: var(--space-m);
}
.areas__group h3 {
  font-size: var(--step-1);
  color: var(--gold);
  margin-bottom: 1.2rem;
}
.areas__list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.4rem 3rem;
}
.areas__list strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-0);
  letter-spacing: -0.01em;
  margin-bottom: .15rem;
}
.areas__list span { color: var(--cream-dim); font-size: .98rem; }
.areas__cta-lead {
  margin-top: var(--space-l);
  padding-top: var(--space-s);
  border-top: 1px solid var(--line);
  font-size: var(--step-1);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 1.1rem;
}

/* ============================================================
   Como funciona (mídia estilo dripos: imagem/vídeo + gradiente)
   ============================================================ */
.metodo { padding-left: clamp(.6rem, 2vw, 3.5rem); padding-right: clamp(.6rem, 2vw, 3.5rem); }
.metodo__card {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  max-width: 1180px;
  margin: 0 auto;
  min-height: min(78vh, 720px);
  display: flex;
  align-items: flex-end;
  isolation: isolate;
}
.metodo__card { background: rgba(24, 33, 21, .92); }
.metodo__media {
  position: absolute;
  inset: 0 0 0 38%;
  z-index: -2;
}
.metodo__media img,
.metodo__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 28%;
}
.metodo__card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(24, 33, 21, .96) 34%, rgba(24, 33, 21, .55) 52%, rgba(24, 33, 21, .08) 72%, rgba(24, 33, 21, 0) 100%);
}
/* mobile: colapso empilhado (foto em cima, texto embaixo - texto nunca
   sobre o rosto, regra 16 da marca) */
@media (max-width: 720px) {
  .metodo__card {
    display: block;
    min-height: 0;
    background: rgba(20, 28, 18, .78);
  }
  .metodo__media {
    position: relative;
    inset: auto;
    z-index: auto;
    height: 300px;
    width: 100%;
  }
  .metodo__media img,
  .metodo__media video {
    object-position: 50% 18%;
  }
  .metodo__card::before { content: none; }
}
.metodo__inner {
  padding: clamp(1.6rem, 4vw, 3.5rem);
  max-width: 640px;
}
.metodo__inner h2 { font-size: var(--step-2); }
.metodo__steps {
  list-style: none;
  margin: var(--space-s) 0 0;
  padding: 0;
  display: grid;
  gap: 1.1rem;
}
.metodo__steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .9rem;
  align-items: start;
  font-size: var(--step-0);
  color: var(--cream-dim);
  max-width: 46ch;
}
.metodo__steps svg { flex: none; margin-top: .3rem; color: var(--gold); }
.metodo__steps strong { color: var(--cream); font-weight: 700; }
.metodo__note {
  margin-top: var(--space-s);
  font-size: .95rem;
  color: var(--cream-faint);
  max-width: 44ch;
}

/* ============================================================
   Sobre
   ============================================================ */
.sobre .wrap {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: var(--space-l);
  align-items: center;
}
@media (max-width: 860px) {
  .sobre .wrap { grid-template-columns: 1fr; }
}
.sobre__foto {
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6);
}
.sobre__cred {
  margin-top: var(--space-s);
  padding-top: var(--space-s);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 2.2rem;
  font-size: .95rem;
  color: var(--cream-dim);
}
.sobre__cred b { color: var(--cream); font-weight: 700; }

/* ============================================================
   Cobertura (mundo terroso)
   ============================================================ */
.cobertura__cidades {
  list-style: none;
  margin: var(--space-m) 0 0;
  padding: 0;
}
.cobertura__cidades li {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-2);
  letter-spacing: -0.02em;
  line-height: 1.3;
  padding: .55em 0;
  border-top: 1px solid rgba(243, 238, 227, .16);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.cobertura__cidades li small {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--step--1);
  color: var(--cream-dim);
  letter-spacing: 0;
}
/* mobile: rótulo SEMPRE na linha de baixo, alinhado à esquerda
   (um padrão só pros 5 itens - achado do gate m6) */
@media (max-width: 600px) {
  .cobertura__cidades li { display: block; }
  .cobertura__cidades li small { display: block; margin-top: .1rem; }
}
.cobertura__online {
  margin-top: var(--space-m);
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--cream-dim);
  max-width: 40ch;
}
.cobertura__online b { color: var(--cream); }

/* ============================================================
   FAQ
   ============================================================ */
.faq__list { margin-top: var(--space-m); }
.faq details {
  border-top: 1px solid var(--line);
}
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 1.25rem .2rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-1);
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1.6rem;
  color: var(--gold);
  flex: none;
  transition: transform .3s var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq__answer {
  padding: 0 .2rem 1.5rem;
  color: var(--cream-dim);
  max-width: 62ch;
}

/* ============================================================
   CTA final
   ============================================================ */
.final {
  text-align: center;
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
}
.final h2 { font-size: var(--step-3); margin-inline: auto; }
.final p { margin: 0 auto 2rem; max-width: 42ch; color: var(--cream-dim); font-size: var(--step-1); line-height: 1.5; }
.final .hero__ctas { justify-content: center; }
.final__fone {
  display: block;
  margin-top: 1.6rem;
  font-size: .98rem;
  color: var(--cream-faint);
}
.final__fone a { color: var(--cream-dim); text-decoration-color: var(--gold); }

/* ============================================================
   Rodapé
   ============================================================ */
.footer {
  border-top: 1px solid var(--line);
  background: rgba(20, 28, 18, .55);
  padding: var(--space-l) clamp(1.2rem, 4vw, 3.5rem) calc(var(--space-m) + 64px);
  font-size: .92rem;
  color: var(--cream-dim);
}
.footer .wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--space-m);
}
.footer h3 {
  font-size: 1rem;
  margin-bottom: .6rem;
}
/* links inline: área de toque estendida sem mudar o layout */
.footer a,
.final__fone a {
  text-decoration-color: rgba(184, 147, 90, .6);
  display: inline-block;
  padding: .55em 0;
  margin: -.55em 0;
}
.footer p { max-width: none; }
.footer__legal {
  margin-top: var(--space-m);
  padding-top: var(--space-s);
  border-top: 1px solid var(--line);
  font-size: .8rem;
  color: var(--cream-faint);
  max-width: none;
}

/* ============================================================
   Botão flutuante de WhatsApp (mobile)
   ============================================================ */
.whats-float {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: var(--z-float);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .4s var(--ease-out), transform .4s var(--ease-out);
}
.whats-float.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
@media (min-width: 861px) {
  .whats-float { display: none; }
}

/* ============================================================
   Acessibilidade / reduced motion global
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

.skip-link {
  position: absolute;
  top: -90px;
  left: 1rem;
  z-index: 30;
  background: var(--gold);
  color: var(--green-night);
  font-weight: 700;
  padding: .7rem 1.2rem;
  border-radius: 0 0 10px 10px;
  text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 0; }
