/* ===================================================================
   IM ADVOCACIA — ATELIÊ JURÍDICO
   Paleta oficial: teal profundo + teal + creme + sage + branco.
   Seções alternam entre escuro (teal) e claro (creme/branco).
   Tipografia Cormorant Garamond (display) + Inter (corpo).
   =================================================================== */

:root {
  --ink: #002529;        /* teal profundo — fundo base / texto escuro */
  --teal: #023537;       /* teal — superfícies escuras */
  --cream: #f4f3f2;      /* creme — fundo claro / texto sobre escuro */
  --white: #ffffff;      /* branco — fundo claro */
  --sage: #5d7772;       /* sage — acento único do site */
  --sage-soft: #7e948e;  /* sage clareado — acento sobre fundo escuro */
  --ink-soft: rgba(0, 37, 41, .62);
  --cream-soft: rgba(244, 243, 242, .6);
  --line-dark: rgba(93, 119, 114, .22);   /* divisórias sobre escuro */
  --line-light: rgba(0, 37, 41, .12);      /* divisórias sobre claro */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--ink);
  color: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(93, 119, 114, .4); color: var(--cream); }
::-webkit-scrollbar { width: 0; }

@font-face { font-family: 'VintageSignature'; src: url('../fonts/Vintage_Signature.ttf') format('truetype'); font-display: swap; }
.font-display { font-family: 'Cormorant Garamond', serif; }
.font-signature { font-family: 'VintageSignature', cursive; }

/* ---------- Temas de seção ---------- */
.sec-ink   { background: transparent; color: var(--cream); }   /* mostra o fundo base + partículas */
.sec-teal  { background: var(--teal); color: var(--cream); }
.sec-cream { background: var(--cream); color: var(--ink); }
.sec-white { background: var(--white); color: var(--ink); }

/* ---------- Atmosfera de fundo ---------- */
.noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .6;
  background-image:
    radial-gradient(circle at 18% 18%, rgba(93, 119, 114, .14), transparent 26%),
    radial-gradient(circle at 84% 10%, rgba(93, 119, 114, .10), transparent 30%),
    radial-gradient(circle at 50% 98%, rgba(2, 53, 55, .5), transparent 36%);
}
#bg-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .8; }

/* ---------- Texturas e sombras ---------- */
.grid-paper {
  background-image:
    linear-gradient(rgba(93, 119, 114, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(93, 119, 114, .08) 1px, transparent 1px);
  background-size: 46px 46px;
}
.grid-paper-light {
  background-image:
    linear-gradient(rgba(0, 37, 41, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 37, 41, .05) 1px, transparent 1px);
  background-size: 46px 46px;
}
.soft-shadow { box-shadow: 0 18px 45px rgba(0, 12, 13, .35), 0 4px 14px rgba(0, 12, 13, .22); }
.deep-shadow { box-shadow: 0 30px 70px rgba(0, 12, 13, .5), 0 8px 22px rgba(0, 12, 13, .3); }
.lift-shadow { box-shadow: 0 18px 40px rgba(0, 37, 41, .10); }

/* Fio de luz no topo do card */
.edge-top { position: relative; }
.edge-top::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(to right, transparent, var(--sage), transparent);
  opacity: .55;
}

/* Halo sage difuso */
.sage-halo { position: absolute; border-radius: 9999px; filter: blur(120px); background: rgba(93, 119, 114, .16); pointer-events: none; }

/* ---------- Painéis de foto ---------- */
.photo-panel { position: relative; overflow: hidden; border-radius: 4px; background: var(--teal); }
.photo-panel::before {
  content: ""; position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: transform 1.1s cubic-bezier(.16, 1, .3, 1);
}
.photo-panel:hover::before { transform: scale(1.06); }
.photo-panel::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0, 37, 41, .95), rgba(0, 37, 41, .45), rgba(0, 37, 41, .04));
}
.photo-panel > * { position: relative; z-index: 1; }
.img-founder::before  { background-image: url("../images/dr-israel.jpg"); }
.img-about::before    { background-image: url("../images/about-bg.jpg"); }
.img-lago::before     { background-image: url("../images/branch-lago-sul.jpg"); }
.img-sorriso::before  { background-image: url("../images/branch-sorriso.jpg"); }
.img-goiania::before  { background-image: url("../images/branch-goiania.jpg"); }
.img-saopaulo::before { background-image: url("../images/branch-sao-paulo.webp"); }
.img-florida::before  { background-image: url("../images/branch-florida.jpg"); }

/* ===================================================================
   REVELAÇÕES — IntersectionObserver + CSS (robusto, sem depender de
   cálculo de scroll). Garante que TODO conteúdo apareça.
   =================================================================== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s cubic-bezier(.16, 1, .3, 1), transform .9s cubic-bezier(.16, 1, .3, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .07s; } .reveal.d2 { transition-delay: .14s; }
.reveal.d3 { transition-delay: .21s; } .reveal.d4 { transition-delay: .28s; }
.reveal.d5 { transition-delay: .35s; } .reveal.d6 { transition-delay: .42s; }

/* Revelação de palavra dos títulos */
.line { display: inline-flex; overflow: hidden; vertical-align: top; }
.word { display: inline-block; transform: translateY(116%); transition: transform 1s cubic-bezier(.16, 1, .3, 1); }
.h-reveal.in .word { transform: none; }
.h-reveal.in .line:nth-child(1) .word { transition-delay: .02s; }
.h-reveal.in .line:nth-child(2) .word { transition-delay: .08s; }
.h-reveal.in .line:nth-child(3) .word { transition-delay: .14s; }
.h-reveal.in .line:nth-child(4) .word { transition-delay: .20s; }
.h-reveal.in .line:nth-child(5) .word { transition-delay: .26s; }
.h-reveal.in .line:nth-child(6) .word { transition-delay: .32s; }
.h-reveal.in .line:nth-child(7) .word { transition-delay: .38s; }
.h-reveal.in .line:nth-child(8) .word { transition-delay: .44s; }
.h-reveal.in .line:nth-child(9) .word { transition-delay: .50s; }

/* ---------- Marquee horizontal ---------- */
.marquee { animation: marquee 34s linear infinite; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Marquee vertical de depoimentos ---------- */
.wf { will-change: transform; backface-visibility: hidden; transform: translateZ(0); }

/* ---------- Prêmios — scroll infinito ---------- */
@keyframes infinite-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.animate-infinite-scroll { animation: infinite-scroll 42s linear infinite; }
.group:hover .animate-infinite-scroll { animation-play-state: paused; }

/* ---------- Cursor digitado ---------- */
@keyframes blink { 50% { opacity: 0; } }
.typed-cursor { animation: blink 1s steps(2) infinite; }

/* ---------- Pontos do copy rotativo ---------- */
.hero-dot { transition: background .4s; }
.hero-dot.is-active { background: var(--sage) !important; }

/* ---------- Filiais — expansão no hover ---------- */
.branch-card { transition: flex 600ms cubic-bezier(.22, 1, .36, 1), filter 600ms; flex: 1 1 0%; }
.branch-row:hover .branch-card { flex: 1 1 0%; filter: brightness(.55) saturate(.9); }
.branch-row .branch-card:hover { flex: 3 1 0%; filter: brightness(1) saturate(1); }
.branch-card .branch-meta { opacity: 0; transform: translateY(8px); transition: opacity 500ms 150ms, transform 500ms 150ms; }
.branch-card:hover .branch-meta { opacity: 1; transform: translateY(0); }

/* ===================================================================
   COMPONENTES
   =================================================================== */
.eyebrow { font-size: 10px; text-transform: uppercase; letter-spacing: .3em; color: var(--sage); font-weight: 600; }

/* Card de valor (claro) */
.value-card { display: flex; gap: .85rem; padding: 1.35rem; background: var(--white); border: 1px solid var(--line-light); border-radius: 4px; transition: border-color .4s, box-shadow .4s; }
.value-card:hover { border-color: var(--sage); box-shadow: var(--lift-shadow); }
.value-card .vico { color: var(--sage); flex-shrink: 0; margin-top: 2px; }
.value-card h3 { color: var(--ink); font-weight: 600; margin-bottom: .25rem; }
.value-card p { color: var(--ink-soft); font-size: .875rem; line-height: 1.55; font-weight: 300; }

/* Mini card do hero (escuro) */
.mini-card { position: relative; background: rgba(2, 53, 55, .5); border: 1px solid var(--line-dark); border-radius: 4px; padding: 1.25rem; min-height: 128px; transition: border-color .4s; }
.mini-card:hover { border-color: rgba(93, 119, 114, .5); }
.mini-card h3 { color: var(--cream); font-weight: 600; font-size: .875rem; margin: 1rem 0 .35rem; }
.mini-card p { color: var(--cream-soft); font-size: .75rem; line-height: 1.5; font-weight: 300; }

/* Card de área de atuação (claro) */
.area-card { position: relative; display: flex; flex-direction: column; gap: 1.25rem; padding: 2rem; background: var(--white); border: 1px solid var(--line-light); border-radius: 4px; transition: border-color .45s, transform .5s, box-shadow .5s; }
.area-card:hover { border-color: var(--sage); transform: translateY(-3px); box-shadow: var(--lift-shadow); }
.area-ico { width: 3rem; height: 3rem; border-radius: 4px; background: rgba(93, 119, 114, .12); border: 1px solid rgba(93, 119, 114, .4); display: flex; align-items: center; justify-content: center; color: var(--teal); transition: background .4s, color .4s; }
.area-card:hover .area-ico { background: var(--teal); color: var(--cream); }
.area-card h3 { color: var(--ink); font-weight: 600; letter-spacing: -.01em; margin-bottom: .5rem; transition: color .4s; }
.area-card:hover h3 { color: var(--sage); }
.area-card p { color: var(--ink-soft); font-size: .875rem; line-height: 1.55; font-weight: 300; }

/* Card de etapa do processo (escuro) */
.step-card { position: relative; overflow: hidden; background: rgba(2, 53, 55, .5); border: 1px solid var(--line-dark); border-radius: 4px; padding: 2rem; min-height: 300px; display: flex; flex-direction: column; transition: transform .5s; }
.step-card:hover { transform: translateY(-4px); }
.step-num { position: absolute; top: -1.6rem; right: 1.2rem; font-family: 'Cormorant Garamond', serif; font-size: 6.5rem; line-height: 1; color: rgba(93, 119, 114, .2); pointer-events: none; user-select: none; }
.step-ico { width: max-content; padding: .5rem; border-radius: 4px; background: var(--ink); border: 1px solid var(--line-dark); color: var(--sage-soft); transition: color .4s; }
.step-card:hover .step-ico { color: var(--cream); }
.step-card h3 { color: var(--cream); font-weight: 500; font-size: 1.125rem; letter-spacing: -.01em; margin-bottom: .75rem; transition: color .4s; }
.step-card:hover h3 { color: var(--sage-soft); }
.step-card p { color: var(--cream-soft); font-size: .875rem; line-height: 1.55; font-weight: 300; }

/* Card de depoimento (claro) */
.review-card { background: var(--white); border: 1px solid var(--line-light); border-radius: 4px; padding: 1.5rem; }
.review-card.feature { background: linear-gradient(135deg, rgba(93, 119, 114, .14), rgba(255, 255, 255, 0)); border-color: rgba(93, 119, 114, .35); }
.review-card p { color: var(--ink); }
.review-card .meta { color: var(--ink-soft); }
.review-card .av { background: rgba(93, 119, 114, .18); color: var(--teal); border: 1px solid rgba(93, 119, 114, .4); }

/* ---------- CTA primário — pílula creme, texto teal, borda sage girando ---------- */
@property --gradient-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes border-spin { to { --gradient-angle: 360deg; } }
.shiny-cta {
  position: relative; overflow: hidden; border-radius: 9999px;
  padding: .95rem 2.3rem; font-size: .9rem; line-height: 1.2; font-weight: 600;
  color: var(--ink); cursor: pointer; isolation: isolate; z-index: 0; border: 2px solid transparent;
  background: linear-gradient(var(--cream), var(--cream)) padding-box,
    conic-gradient(from var(--gradient-angle), transparent 0%, var(--sage) 5%, var(--sage-soft) 15%, var(--sage) 30%, transparent 40%, transparent 100%) border-box;
  box-shadow: inset 0 0 0 1px rgba(0, 37, 41, .15);
  animation: border-spin 2.6s linear infinite;
  transition: box-shadow .3s, transform .2s;
}
.shiny-cta:hover { box-shadow: 0 0 32px rgba(93, 119, 114, .5); transform: translateY(-1px); }
.shiny-cta:active { transform: translateY(1px); }
.shiny-cta span { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: .5rem; }

/* CTA fantasma */
.ghost-cta { display: inline-flex; align-items: center; gap: .6rem; padding: .85rem 1.6rem; border-radius: 9999px; border: 1px solid var(--line-dark); color: var(--cream); font-size: .85rem; font-weight: 500; transition: all .3s; }
.ghost-cta:hover { border-color: var(--sage); background: rgba(93, 119, 114, .12); }
.ghost-cta.on-light { border-color: var(--line-light); color: var(--ink); }
.ghost-cta.on-light:hover { border-color: var(--sage); background: rgba(93, 119, 114, .08); }

/* CTA secundário — pílula teal com partículas */
.button-custom { cursor: pointer; position: relative; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; transition: all .25s ease; background: linear-gradient(180deg, var(--teal) 0%, var(--ink) 100%); border-radius: 9999px; border: 1px solid var(--line-dark); padding: 10px 22px; min-height: 44px; color: var(--cream); }
.button-custom::before { content: ""; position: absolute; inset: 1px; background: linear-gradient(177.95deg, rgba(244, 243, 242, .16) 0%, rgba(244, 243, 242, 0) 100%); border-radius: 9999px; z-index: 0; }
.button-custom .inner { z-index: 2; position: relative; display: inline-flex; align-items: center; gap: 6px; color: var(--cream); font-weight: 600; font-size: .85rem; }
.points_wrapper { overflow: hidden; width: 100%; height: 100%; pointer-events: none; position: absolute; inset: 0; z-index: 1; }
.points_wrapper .point { bottom: -10px; position: absolute; width: 2px; height: 2px; background: var(--sage-soft); border-radius: 9999px; animation: floating-points infinite ease-in-out; }
@keyframes floating-points { 0% { transform: translateY(0); } 85% { opacity: 0; } 100% { transform: translateY(-55px); opacity: 0; } }
.points_wrapper .point:nth-child(1) { left: 10%; opacity: 1; animation-duration: 2.35s; animation-delay: .2s; }
.points_wrapper .point:nth-child(2) { left: 30%; opacity: .7; animation-duration: 2.5s; animation-delay: .5s; }
.points_wrapper .point:nth-child(3) { left: 25%; opacity: .8; animation-duration: 2.2s; animation-delay: .1s; }
.points_wrapper .point:nth-child(4) { left: 44%; opacity: .6; animation-duration: 2.05s; }
.points_wrapper .point:nth-child(5) { left: 50%; opacity: 1; animation-duration: 1.9s; }
.points_wrapper .point:nth-child(6) { left: 75%; opacity: .5; animation-duration: 1.5s; animation-delay: 1.5s; }
.points_wrapper .point:nth-child(7) { left: 88%; opacity: .9; animation-duration: 2.2s; animation-delay: .2s; }

/* ---------- Scrim do topo (leve — não embaçado) ---------- */
.top-scrim { position: fixed; z-index: 40; inset: 0 0 auto 0; height: 92px; pointer-events: none; background: linear-gradient(to bottom, var(--ink) 0%, rgba(0, 37, 41, .6) 42%, transparent 100%); }

/* ---------- WhatsApp flutuante ---------- */
@keyframes whats-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, .5); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 18px rgba(37, 211, 102, 0); }
}
.whats-pulse { animation: whats-pulse 2.5s ease-in-out infinite; }

/* ===================================================================
   RODAPÉ — vídeo de fundo + letreiro IM ADVOCACIA com brilho em
   movimento suave e flutuação.
   =================================================================== */
.footer-stage { position: relative; overflow: hidden; }
.footer-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .3; filter: saturate(.8) contrast(1.05); z-index: 0; }
.footer-video-scrim { position: absolute; inset: 0; z-index: 1; background:
  linear-gradient(to bottom, var(--ink) 0%, rgba(0, 37, 41, .55) 30%, rgba(0, 37, 41, .55) 70%, var(--ink) 100%),
  radial-gradient(ellipse 70% 60% at 50% 50%, transparent 30%, rgba(0, 37, 41, .6) 100%); }
.brand-stroke {
  font-family: 'Cormorant Garamond', serif; font-weight: 600; letter-spacing: -.01em;
  background: linear-gradient(100deg, rgba(244, 243, 242, .28) 28%, #ffffff 50%, rgba(244, 243, 242, .28) 72%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 1px rgba(93, 119, 114, .45);
  animation: brand-shine 7s linear infinite, brand-float 9s ease-in-out infinite;
}
@keyframes brand-shine { to { background-position: -220% 0; } }
@keyframes brand-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) {
  .brand-stroke { animation: none; }
  .reveal, .word { transition: none; }
}

/* ============================================================
   Efeito de hover — luz que circula a borda (neon/filete)
   Cor invertida pelo fundo da seção: branco no escuro, verde no claro.
   Só no hover. Respeita prefers-reduced-motion. CSS puro.
   ============================================================ */
@property --hxa { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

/* cor do efeito por seção. O fallback (#f4f3f2 = branco) cobre elementos
   fora de qualquer .sec-* — ex.: o .button-custom do header, que é escuro. */
.sec-ink, .sec-teal { --fx: #f4f3f2; }
.sec-cream, .sec-white { --fx: #2f9e74; }

/* ---- NEON completo (com glow): cards de área e de processo ----
   .area-card NÃO usa .edge-top → o ::before está livre.
   .step-card USA .edge-top, que já ocupa o ::before (fio de luz no topo).
   Por isso o neon do step-card vai no ::after, e com border-radius EXPLÍCITO
   (não 'inherit'), garantindo a moldura fechada nos 4 lados. */
.area-card::before,
.step-card::after {
  content: ""; position: absolute; inset: 0; box-sizing: border-box;
  padding: 1.5px;
  background: conic-gradient(from var(--hxa),
    var(--fx, #f4f3f2) 0 8%,
    color-mix(in srgb, var(--fx, #f4f3f2) 25%, transparent) 20% 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .4s ease; pointer-events: none;
  filter: drop-shadow(0 0 4px var(--fx, #f4f3f2)) drop-shadow(0 0 9px var(--fx, #f4f3f2));
}
.area-card::before { border-radius: inherit; }      /* card de área tem raio nos 4 cantos */
.step-card::after  { border-radius: 4px; }           /* mesmo raio visual do .area-card */
.area-card:hover::before,
.step-card:hover::after { opacity: 1; }

/* .step-card tem overflow:hidden (recorta o número gigante 01–05), o que cortaria
   o glow externo do pseudo. Devolvemos o halo via box-shadow do próprio card,
   que NÃO é recortado pelo overflow. */
.step-card { transition: transform .5s, box-shadow .4s ease; } /* +box-shadow no fade */
.step-card:hover {
  box-shadow: 0 0 18px color-mix(in srgb, var(--fx, #f4f3f2) 45%, transparent);
}

/* ---- FILETE discreto (sem glow): botões principais ----
   .button-custom já usa ::before (sheen interno) → usamos ::after.
   .shiny-cta e .ghost-cta não usam pseudo → ::after livre. */
.shiny-cta::after,
.ghost-cta::after,
.button-custom::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  padding: 2px; box-sizing: border-box;                /* 2px: um pouco mais perceptível */
  background: conic-gradient(from var(--hxa),
    transparent 0 66%, var(--fx, #f4f3f2) 80% 96%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .35s ease; pointer-events: none;
}
.shiny-cta:hover::after,
.ghost-cta:hover::after,
.button-custom:hover::after { opacity: 1; }

/* Botões CLAROS sobre fundo escuro (ex.: .shiny-cta é sempre creme): o filete
   branco se perderia dentro do botão → forçamos o filete VERDE para contrastar.
   .cta-light fica disponível para qualquer outro botão claro futuro. */
.shiny-cta, .cta-light { --fx: #2f9e74; }

/* o .ghost-cta não tinha resposta de hover → leve elevação para "ganhar vida" */
.ghost-cta:hover { transform: translateY(-1px); }

/* a rotação da luz só roda para quem não pediu menos movimento */
@media (prefers-reduced-motion: no-preference) {
  .area-card:hover::before,
  .step-card:hover::after { animation: fx-spin 2.8s linear infinite; }
  .shiny-cta:hover::after,
  .ghost-cta:hover::after,
  .button-custom:hover::after { animation: fx-spin 2.6s linear infinite; }
}
@keyframes fx-spin { to { --hxa: 360deg; } }
