/* ============================================================
   Iandeyara Ferrari Advocacia e Consultoria Jurídica — v1
   Paleta: navy institucional + dourado decorativo (DESIGN.md)
   ============================================================ */

:root {
  /* superfícies */
  --canvas: hsl(40 25% 97%);
  --superficie: hsl(40 20% 93%);
  --canvas-tom: hsl(38 22% 89%);
  --canvas-escuro: hsl(215 40% 10%);
  --canvas-escuro-2: hsl(215 32% 15%);

  /* tinta */
  --tinta: hsl(216 30% 13%);
  --texto-suave: hsl(216 12% 36%);
  --texto-inverso: hsl(40 25% 97%);
  --texto-inverso-suave: hsl(215 18% 75%);

  /* acento */
  --acento: hsl(215 45% 28%);
  --acento-hover: hsl(215 50% 20%);
  --acento-secundario: hsl(42 35% 48%); /* só traço decorativo */
  --ouro-claro: hsl(42 55% 62%);        /* estrelas sobre o escuro */

  /* linhas e sombras */
  --hairline: hsl(216 30% 13% / .12);
  --hairline-forte: hsl(216 30% 13% / .28);
  --hairline-inversa: hsl(40 25% 97% / .16);
  --sombra: 0 18px 55px hsl(215 40% 20% / .12);
  --sombra-hover: 0 24px 64px hsl(215 40% 20% / .17);

  /* tipografia */
  --font-display: "Libre Baskerville", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  --text-h1: clamp(1.9rem, 4.6vw, 3.35rem);
  --text-h2: clamp(1.55rem, 3.2vw, 2.4rem);
  --text-h3: clamp(1.1rem, 1.6vw, 1.3rem);
  --text-body: clamp(1rem, calc(.4vw + .93rem), 1.125rem);
  --text-number: clamp(2.8rem, 6vw, 4.6rem);
  --text-kicker: .75rem;

  /* layout */
  --maxw: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-space: clamp(3.5rem, 7vw, 6.25rem);
  --header-h: 68px;

  /* raios e easing */
  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 26px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-expo: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--tinta);
  background: var(--canvas);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.18;
  margin: 0 0 .6em;
}

h1 { font-size: var(--text-h1); letter-spacing: -.01em; }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); margin-bottom: .35em; }

p { margin: 0 0 1em; }

a { color: var(--acento); }

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

.quebra-longa { overflow-wrap: anywhere; }

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

.sec--escuro :focus-visible { outline-color: var(--texto-inverso); }

/* ---------- seções / ritmo ---------- */

.sec { padding-block: var(--section-space); }
.sec--claro { background: var(--canvas); }
.sec--tom { background: var(--canvas-tom); }
.sec--escuro { background: var(--canvas-escuro); color: var(--texto-inverso); }

.sec-head { max-width: 640px; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.sec-head--centro { margin-inline: auto; text-align: center; }

.sec-sub { color: var(--texto-suave); }
.sec-sub--inversa { color: var(--texto-inverso-suave); }

/* assinatura: hairline dourada que se desenha sob os H2 */
.sec-head h2,
.sobre-texto h2 { position: relative; padding-bottom: .55em; }
.sec-head h2::after,
.sobre-texto h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 2px;
  background: var(--acento-secundario);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .6s var(--ease) .35s;
}
.sec-head--centro h2::after { left: 50%; margin-left: -28px; }
.js .sec-head h2[data-reveal].is-in::after,
.js .sobre-texto h2[data-reveal].is-in::after,
html:not(.js) .sec-head h2::after,
html:not(.js) .sobre-texto h2::after { transform: scaleX(1); }

.kicker {
  font-size: var(--text-kicker);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--acento);
  margin: 0 0 .9em;
}
.kicker--inverso { color: var(--ouro-claro); }

.sec-cta { margin-top: clamp(1.5rem, 3vw, 2.25rem); text-align: center; }
.sec-cta--esquerda { text-align: left; margin-top: .5rem; }

/* ---------- botões ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 48px;
  padding: 12px 26px;
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease),
              background-color .2s var(--ease), border-color .2s var(--ease),
              color .2s var(--ease);
}

.btn--primario {
  background: var(--acento);
  color: var(--texto-inverso);
}
.btn--primario:hover { background: var(--acento-hover); transform: translateY(-2px); box-shadow: var(--sombra-hover); }
.btn--primario:active { transform: translateY(0); box-shadow: var(--sombra); }

.btn--claro {
  background: var(--canvas);
  color: var(--tinta);
}
.btn--claro:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 18px 44px hsl(215 40% 4% / .5); }
.btn--claro:active { transform: translateY(0); }

.btn--ghost {
  background: transparent;
  border: 1px solid var(--hairline-forte);
  color: var(--tinta);
}
.btn--ghost:hover { border-color: var(--acento); color: var(--acento); transform: translateY(-2px); }
.btn--ghost:active { transform: translateY(0); }

.btn--compacto { min-height: 44px; padding: 9px 18px; font-size: .95rem; }

.icone-zap { width: 20px; height: 20px; flex: none; }

/* ---------- header fixo (#topo — nunca por tag) ---------- */

#topo {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: transparent;
  transition: background-color .2s var(--ease), box-shadow .2s var(--ease);
}

#topo.is-scrolled {
  background: hsl(40 25% 97% / .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
  box-shadow: 0 8px 30px hsl(215 40% 20% / .07);
}

.topo-linha {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--tinta);
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.topo-nav {
  display: flex;
  gap: 1.4rem;
  margin-left: auto;
}

.topo-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 2px;
  color: var(--tinta);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
}

.topo-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 2px;
  background: var(--acento-secundario);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.topo-nav a:hover::after { transform: scaleX(1); }

#topo .btn { margin-left: auto; }

/* ---------- hero ---------- */

.sec-hero {
  padding-top: calc(var(--header-h) + clamp(2rem, 6vw, 4.5rem));
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

.hero-grade {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-sub {
  color: var(--texto-suave);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  max-width: 46ch;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 1.4rem;
}

.hero-micro {
  margin-top: .9rem;
  font-size: .875rem;
  color: var(--texto-suave);
}

.hero-foto {
  position: relative;
  margin: 0;
  max-width: 440px;
  justify-self: end;
  width: 100%;
}

.hero-foto::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: translate(16px, 16px);
  background: var(--canvas-tom);
  border-radius: var(--r-lg);
}

.hero-img {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 22%;
  border-radius: var(--r-lg);
  border: 1px solid var(--hairline);
  box-shadow: var(--sombra);
}

/* cascata do hero no load */
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}
.hero-conteudo > * { animation: hero-rise .8s var(--ease) both; }
.hero-conteudo > *:nth-child(2) { animation-delay: .1s; }
.hero-conteudo > *:nth-child(3) { animation-delay: .2s; }
.hero-conteudo > *:nth-child(4) { animation-delay: .3s; }
.hero-conteudo > *:nth-child(5) { animation-delay: .4s; }

@keyframes hero-foto-entra {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.hero-foto { animation: hero-foto-entra .9s var(--ease-expo) .25s both; }

/* ---------- faixa de confiança ---------- */

.faixa-confianca {
  list-style: none;
  margin: 0 0 clamp(2.25rem, 5vw, 3.5rem);
  padding: 1rem clamp(1rem, 3vw, 2rem);
  display: flex;
  flex-wrap: wrap;
  gap: .75rem clamp(1.25rem, 3vw, 2.5rem);
  justify-content: center;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
}

.faixa-confianca li {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 600;
  font-size: .95rem;
  color: var(--tinta);
}

.icone {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: var(--acento);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- pilares (linhas com número gigante) ---------- */

.pilares { border-top: 1px solid var(--hairline); }

.pilar {
  display: grid;
  grid-template-columns: minmax(76px, 120px) 1fr;
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: center;
  padding-block: clamp(1.4rem, 3vw, 2.1rem);
  border-bottom: 1px solid var(--hairline);
}

.pilar-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-number);
  line-height: 1;
  color: var(--acento);
  opacity: .18;
}

.pilar p { margin: 0; color: var(--texto-suave); max-width: 56ch; }

/* ---------- etapas ---------- */

.etapas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

.etapa {
  position: relative;
  overflow: hidden;
  background: var(--superficie);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 1.6rem 1.5rem 1.4rem;
}

.etapa-num {
  position: absolute;
  top: -1.1rem;
  right: .4rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-number);
  line-height: 1;
  color: var(--acento);
  opacity: .12;
  pointer-events: none;
}

.etapa h3 { position: relative; }
.etapa p { position: relative; margin: 0; color: var(--texto-suave); }

/* ---------- avaliação (escuro) ---------- */

.citacao {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.estrelas {
  display: flex;
  justify-content: center;
  gap: .3rem;
  margin-bottom: 1rem;
}

.estrelas span {
  color: var(--ouro-claro);
  font-size: 1.5rem;
  line-height: 1;
}

.js .citacao[data-reveal] .estrelas span {
  opacity: 0;
  transform: scale(.55);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.js .citacao[data-reveal].is-in .estrelas span { opacity: 1; transform: none; }
.js .citacao[data-reveal].is-in .estrelas span:nth-child(1) { transition-delay: .15s; }
.js .citacao[data-reveal].is-in .estrelas span:nth-child(2) { transition-delay: .23s; }
.js .citacao[data-reveal].is-in .estrelas span:nth-child(3) { transition-delay: .31s; }
.js .citacao[data-reveal].is-in .estrelas span:nth-child(4) { transition-delay: .39s; }
.js .citacao[data-reveal].is-in .estrelas span:nth-child(5) { transition-delay: .47s; }

.citacao blockquote { margin: 0; }

.citacao blockquote p {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  line-height: 1.35;
  margin-bottom: .8em;
}

.citacao figcaption {
  color: var(--texto-inverso-suave);
  font-size: .95rem;
}

.avaliacao-rodape {
  text-align: center;
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
}

.avaliacao-nota { font-weight: 600; margin-bottom: .4em; }

.link-inverso {
  color: var(--texto-inverso);
  font-weight: 600;
  text-decoration-color: var(--hairline-inversa);
  text-underline-offset: 4px;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  transition: text-decoration-color .2s var(--ease);
}
.link-inverso:hover { text-decoration-color: var(--ouro-claro); }

.avaliacao-consulta {
  margin-top: .6em;
  font-size: .8rem;
  color: var(--texto-inverso-suave);
}

/* ---------- sobre ---------- */

.sobre-grade {
  display: grid;
  grid-template-columns: minmax(0, 400px) 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.sobre-foto { margin: 0; }

.sobre-foto img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 18%;
  filter: brightness(1.05) contrast(1.03);
  border-radius: var(--r-lg);
  border: 1px solid var(--hairline);
  box-shadow: var(--sombra);
}

.sobre-texto p:not(.kicker) { color: var(--texto-suave); max-width: 54ch; }

/* ---------- contato / fechamento ---------- */

.contato-grade {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(1.75rem, 4vw, 3rem);
  margin-top: clamp(2.25rem, 5vw, 3.5rem);
  align-items: start;
}

.contato-bloco { margin-bottom: 1.5rem; }
.contato-bloco h3 { color: var(--ouro-claro); font-size: 1rem; }
.contato-bloco p { margin: 0; color: var(--texto-inverso-suave); }

.lista-horarios {
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--texto-inverso-suave);
}
.lista-horarios li { padding-block: .15rem; }

.mapa {
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--hairline-inversa);
}

.mapa iframe {
  display: block;
  width: 100%;
  height: 300px;
  border: 0;
}

.rodape {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 1.75rem;
  border-top: 1px solid var(--hairline-inversa);
  text-align: center;
  color: var(--texto-inverso-suave);
  font-size: .9rem;
}

.rodape-nome {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--texto-inverso);
  font-size: 1.05rem;
  margin-bottom: .4em;
}

.rodape-legal { margin-top: 1em; font-size: .8rem; margin-bottom: 0; }

/* ---------- reveal on scroll (só com .js) ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js [data-reveal="zoom"] { transform: scale(.96); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- sticky CTA mobile ---------- */

.cta-fixa {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  padding: .6rem .9rem calc(.6rem + env(safe-area-inset-bottom));
  background: hsl(40 25% 97% / .96);
  border-top: 1px solid var(--hairline);
  box-shadow: 0 -10px 30px hsl(215 40% 20% / .12);
  transform: translateY(110%);
  transition: transform .35s var(--ease);
}

.cta-fixa.is-on { transform: none; }
.cta-fixa .btn { width: 100%; }

/* ---------- zap-float (desktop) ---------- */

.zap-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--acento);
  color: var(--texto-inverso);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--sombra);
  transition: opacity .25s var(--ease), transform .25s var(--ease),
              background-color .2s var(--ease);
  animation: zap-entra .5s var(--ease) 1.2s backwards;
}

.zap-float svg { width: 30px; height: 30px; }

.zap-float:hover { background: var(--acento-hover); transform: translateY(-2px); }

.zap-float.is-hidden {
  opacity: 0;
  transform: scale(.6);
  pointer-events: none;
}

@keyframes zap-entra {
  from { opacity: 0; transform: scale(.6); }
  to { opacity: 1; transform: scale(1); }
}

/* ---------- responsivo ---------- */

@media (max-width: 900px) {
  .hero-grade { grid-template-columns: 1fr; }
  .hero-foto { justify-self: start; max-width: 420px; }
  .hero-img { max-height: 45vh; }
  .sobre-grade { grid-template-columns: 1fr; }
  .sobre-foto { max-width: 420px; }
  .contato-grade { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .topo-nav { display: none; }
  #topo .btn { margin-left: auto; }
  .zap-float { display: none; }
  .cta-fixa { display: block; }
  #contato { padding-bottom: calc(var(--section-space) + 76px + env(safe-area-inset-bottom)); }
}

@media (max-width: 640px) {
  .hero-ctas .btn { width: 100%; }
  .pilar { grid-template-columns: 64px 1fr; }
  .mapa iframe { height: 240px; }
}

/* ---------- reduced motion (regra dura) ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
  }
}
