/* =========================================================================
   FASS Advogados — base comum a todas as páginas
   Tokens, reset, botões, cabeçalho, seções, rodapé e motion.
   Os componentes de cada página ficam em assets/pages.css.
   ========================================================================= */

/* --------------------------------- Tokens -------------------------------- */
:root {
  /* Cores */
  --c-bg:          #181818;
  --c-surface:     #1F1F1F;
  --c-surface-2:   #242424;
  --c-line:        rgba(255, 255, 255, .1);
  --c-line-soft:   rgba(255, 255, 255, .07);
  --c-accent:      #F24E1E;   /* preenchimento; texto só em tamanho grande */
  --c-accent-hi:   #FF6B42;   /* laranja para texto pequeno: 6,3:1 no fundo */
  --c-on-accent:   #181818;   /* texto sobre o laranja: 5:1 (branco dá 3,6:1) */
  --c-text:        #F4F4F5;
  --c-text-strong: #FFFFFF;
  --c-text-soft:   #E4E4E7;
  --c-text-body:   #C9C9D1;
  --c-text-muted:  #A7A5B8;   /* 7,3:1 */
  --c-text-dim:    #8E8C9E;   /* 5,4:1: rótulo, nunca corpo */

  /* Tipografia */
  --f-body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-display: "Poppins", "Inter", system-ui, sans-serif;

  /* Medidas */
  --shell:      1120px;
  --gutter:     clamp(20px, 5vw, 40px);
  --section-y:  clamp(72px, 10vw, 136px);
  --header-h:   84px;
  --raio:       12px;

  /* Motion */
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html {
  /* Sem `scroll-behavior: smooth`: as âncoras do site são atalhos ("me leve ao
     formulário"), não passeios. */
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.5;
  text-wrap: pretty;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
button { font: inherit; }

a { color: var(--c-accent-hi); text-decoration: none; transition: color .2s ease; }
a:hover { color: #FF8A66; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 20px;
  background: var(--c-accent);
  color: var(--c-on-accent);
  font-weight: 600;
}
.skip-link:focus { left: 12px; top: 12px; color: var(--c-on-accent); }

.visualmente-oculto {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Container ---------------------------------------------------------------- */
.shell {
  width: min(100% - var(--gutter) * 2, var(--shell));
  margin-inline: auto;
}

/* ---------------------------- Barra de progresso -------------------------- */
.progress-track {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 60;
  pointer-events: none;
}
.progress-bar {
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: var(--c-accent);
  /* scaleX em vez de width: não recalcula layout a cada quadro de scroll. */
  will-change: transform;
}

/* --------------------------------- Botões -------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding-inline: 24px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease,
              transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }

/* Texto escuro sobre o laranja: 5:1. Branco sobre o mesmo laranja dá 3,6:1
   e reprova em qualquer tamanho de botão. */
.btn--primary,
.btn--solid {
  background: var(--c-accent);
  color: var(--c-on-accent);
}
.btn--primary:hover,
.btn--solid:hover { background: var(--c-accent-hi); color: var(--c-on-accent); }

.btn--solid { height: 42px; padding-inline: 18px; border-radius: 8px; font-size: 15.5px; }

.btn--ghost {
  border-color: rgba(255, 255, 255, .2);
  color: var(--c-text);
  font-weight: 500;
}
.btn--ghost:hover { border-color: rgba(242, 78, 30, .6); color: var(--c-text-strong); }

.btn--bloco { width: 100%; }
.btn--icone { justify-content: flex-start; }

/* --------------------------------- Header --------------------------------
   Fundo sólido, sem backdrop-filter: com conteúdo passando por baixo, o
   desfoque era recalculado a cada quadro de scroll. */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-line-soft);
}
.site-header.is-stuck { box-shadow: 0 10px 30px -22px rgba(0, 0, 0, .9); }
/* Home: transparente sobre a foto até o primeiro scroll. */
.site-header--transparente { transition: background-color .25s ease, border-color .25s ease; }
.site-header--transparente:not(.is-stuck) { background: transparent; border-bottom-color: transparent; }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}
.header__logo img { width: 80px; height: auto; }

.nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 32px); }
.nav__list { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 32px); }
.nav__list a {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 16px;
  line-height: 1;
  color: var(--c-text-soft);
  white-space: nowrap;
}
.nav__list a:hover { color: var(--c-text-strong); }
.nav__list a[aria-current="page"] {
  color: var(--c-text-strong);
  text-decoration: underline;
  text-decoration-color: var(--c-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 10px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  background: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--c-text-soft);
  border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s ease;
}
.nav-toggle span + span { margin-top: 6px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* -------------------------------- Seções --------------------------------- */
.section { padding-block: var(--section-y) 0; }
.section--junta { padding-top: clamp(72px, 9vw, 128px); }

.section__cab {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 48px;
  flex-wrap: wrap;
  margin-bottom: clamp(28px, 3.5vw, 40px);
}
.section__title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1.08;
  letter-spacing: -.02em;
  color: var(--c-text-strong);
}
.section__title--menor { font-size: clamp(24px, 2.2vw, 30px); line-height: 1.15; }
.section__lead {
  margin-top: 14px;
  max-width: 620px;
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.6;
  color: var(--c-text-body);
}
.section__link {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 16px;
  white-space: nowrap;
}
.section__link-linha { margin-top: 16px; }

/* Rótulo de bloco: pequeno, em caixa normal (sem o eyebrow em caixa alta). */
.rotulo {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
  color: var(--c-text-muted);
}

/* Usado no perfil, na página de área e no 404. */
.eyebrow {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
  color: var(--c-accent-hi);
}

.prose { display: flex; flex-direction: column; gap: 16px; }
.prose--claro { font-size: clamp(16.5px, 1.3vw, 18px); line-height: 1.65; }
.prose--claro p { color: var(--c-text-body); }
.prose strong, .texto-apoio strong { color: var(--c-text-strong); font-weight: 600; }

.texto-apoio {
  margin-top: 14px;
  font-size: clamp(16px, 1.3vw, 17px);
  line-height: 1.65;
  color: var(--c-text-body);
}

/* Sublinhado da marca, desenhado pelo navegador: escala com o texto e não
   custa a máscara SVG de 50 KB que havia antes. */
.grifo {
  text-decoration: underline;
  text-decoration-color: var(--c-accent);
  text-decoration-thickness: .09em;
  text-underline-offset: .14em;
  text-decoration-skip-ink: none;
}

/* --------------------------------- Rodapé -------------------------------- */
.site-footer {
  padding-block: clamp(56px, 7vw, 80px) 36px;
  border-top: 1px solid var(--c-line-soft);
}

.footer__grade {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .8fr) minmax(0, 1.3fr) minmax(0, 1.3fr);
  gap: 40px 48px;
  align-items: start;
}
.footer__marca { display: flex; flex-direction: column; gap: 16px; }
.footer__logo img { width: 110px; height: auto; }
.footer__slogan { font-size: 15px; line-height: 1.55; color: var(--c-text-muted); }

.footer__heading {
  margin-bottom: 14px;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--c-text-strong);
}
.footer__nav ul { display: flex; flex-direction: column; gap: 10px; }
.footer__nav--areas ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; }
.footer__nav a { font-size: 15px; line-height: 1.35; color: var(--c-text-body); }
.footer__nav a:hover { color: var(--c-text-strong); }

.footer__unidades { display: grid; gap: 16px; }
.footer__cidade { font-weight: 600; font-size: 14.5px; color: var(--c-text); }
.footer__endereco { margin-top: 2px; font-size: 14.5px; line-height: 1.5; color: var(--c-text-muted); }
.footer__unidade a { font-size: 14.5px; color: var(--c-text-body); }
.footer__unidade a:hover { color: var(--c-text-strong); }
.footer__email { margin-top: 16px; font-size: 14.5px; }

.social { display: flex; gap: 10px; }
.social__link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .14);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text-soft);
  transition: border-color .2s ease, color .2s ease;
}
.social__link:hover { border-color: rgba(242, 78, 30, .6); color: var(--c-text-strong); }
.social__link svg { max-height: 18px; width: auto; }

.footer__legal {
  margin-top: clamp(40px, 5vw, 56px);
  padding-top: 24px;
  border-top: 1px solid var(--c-line-soft);
  font-family: var(--f-display);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--c-text-muted);
}

/* -------------------------------- Motion ---------------------------------
   Só abaixo da primeira tela: o que já está visível na carga não anima (o
   título do Sobre ficava invisível até o JavaScript rodar). Opacidade e
   transform apenas, nada que obrigue o navegador a recalcular layout. */
.js [data-reveal],
.js [data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.js [data-reveal].is-visible,
.js [data-reveal-stagger] > .is-visible { opacity: 1; transform: none; }

/* ------------------------------- Responsivo ------------------------------ */
@media (max-width: 960px) {
  .footer__grade { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }

  .header__logo img { width: 62px; }
  .nav-toggle { display: block; }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-line);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, transform .2s var(--ease), visibility .2s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }

  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__list a { display: block; padding: 15px 4px; font-size: 18px; }
  .nav__list a[aria-current="page"] { text-underline-offset: 6px; }
  .nav__cta { margin-top: 14px; align-self: flex-start; height: 48px; }
}

@media (max-width: 560px) {
  .footer__grade { grid-template-columns: 1fr; }
  .section__link { white-space: normal; }
}

/* --------------------------- Preferências do SO -------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .js [data-reveal],
  .js [data-reveal-stagger] > * { opacity: 1; transform: none; }
}

@media print {
  .site-header, .progress-track, .btn, .post__lado, .indice--movel { display: none; }
  body { background: #fff; color: #000; }
}
