/* ==========================================================================
   Advocacia João Antônio & Associados — Design System
   Fonte de verdade: solucao/branding/design/DESIGN.md
   Compliance: Provimento OAB 205/2021 (publicidade informativa)
   ========================================================================== */

:root {
  /* Base institucional — grafite, não preto puro */
  --color-ink:         #12151B;
  --color-ink-soft:    #2A2F38;
  --color-graphite:    #4A515C;
  --color-slate:       #6B7280;

  /* Papel — fundo claro, quente */
  --color-paper:       #F7F5F1;
  --color-surface:     #FFFFFF;
  --color-line:        #E4DFD6;

  /* Azul institucional — confiança + CTA */
  --color-navy:        #16324F;
  --color-navy-strong: #0F2438;
  --color-navy-tint:   #EAF0F5;

  /* Dourado — ACENTO apenas (latão envelhecido) */
  --color-gold:        #A8894F;
  --color-gold-soft:   #C2A66E;
  --color-gold-tint:   #F2ECDD;

  /* Papéis semânticos */
  --bg:            var(--color-paper);
  --bg-elevated:   var(--color-surface);
  --text:          var(--color-ink);
  --text-muted:    var(--color-graphite);
  --border:        var(--color-line);
  --accent:        var(--color-gold);
  --action:        var(--color-navy);
  --action-hover:  var(--color-navy-strong);

  /* Tipografia */
  --font-display: 'Lora', 'Georgia', 'Times New Roman', serif;
  --font-body:    'Inter', -apple-system, 'Segoe UI', sans-serif;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.25rem;
  --text-xl:   1.563rem;
  --text-2xl:  1.953rem;
  --text-3xl:  2.441rem;
  --text-4xl:  3.052rem;

  /* Sombras — sutis, realistas */
  --shadow-sm: 0 1px 2px rgba(18,21,27,.06), 0 1px 3px rgba(18,21,27,.04);
  --shadow-md: 0 4px 12px rgba(18,21,27,.08);
  --shadow-lg: 0 12px 32px rgba(18,21,27,.10);

  --maxw: 1120px;
  --measure: 720px;
}

/* Reset ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--color-navy); text-decoration: none; }
a:hover { color: var(--color-navy-strong); }

/* Tipografia ------------------------------------------------------------ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--color-ink);
  margin: 0 0 0.5em;
}
h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
p  { margin: 0 0 1rem; max-width: var(--measure); }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-graphite);
  margin: 0 0 0.75rem;
}

/* Filete dourado — assinatura da marca */
.rule-gold {
  width: 48px; height: 2px;
  background: var(--color-gold);
  border: 0; margin: 0 0 1.25rem;
}
.center .rule-gold { margin-left: auto; margin-right: auto; }

/* Layout ---------------------------------------------------------------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 104px 0; }
.section--tight { padding: 72px 0; }
.center { text-align: center; }
.lead { font-size: var(--text-lg); color: var(--color-graphite); }

.section--ink  { background: var(--color-ink); color: var(--color-paper); }
.section--ink h1, .section--ink h2, .section--ink h3 { color: #fff; }
.section--paper-alt { background: #FBFAF7; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* Botões ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-body); font-weight: 600; font-size: var(--text-base);
  padding: 0.85rem 1.6rem; border-radius: 5px;
  letter-spacing: 0.01em; cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
  min-height: 48px;
}
.btn-primary { background: var(--action); color: #fff; border: 1px solid var(--action); }
.btn-primary:hover { background: var(--action-hover); color: #fff; }
.btn-secondary { background: transparent; color: var(--color-navy); border: 1px solid var(--color-navy); }
.btn-secondary:hover { background: var(--color-navy-tint); color: var(--color-navy-strong); }
.section--ink .btn-secondary { color: #fff; border-color: rgba(255,255,255,.5); }
.section--ink .btn-secondary:hover { background: rgba(255,255,255,.08); color: #fff; }
.btn svg { width: 20px; height: 20px; }

/* Header ---------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--color-ink);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 96px; }
.site-header .brand img { height: 60px; width: auto; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { color: rgba(247,245,241,.82); font-size: var(--text-sm); font-weight: 500; padding: 4px 0; }
.nav a:hover { color: #fff; border-bottom: 2px solid var(--color-gold); }
.nav .btn-primary { color: #fff; padding: 0.6rem 1.1rem; min-height: 40px; }
.nav-toggle { display: none; }

/* Hero ------------------------------------------------------------------ */
.hero { background: var(--color-ink); color: var(--color-paper); padding: 96px 0 108px; text-align: center; }
.hero h1 { font-size: var(--text-4xl); color: #fff; max-width: 15ch; margin: 0 auto 0.4em; }
.hero .rule-gold { margin: 0 auto 1.5rem; }
.hero p { color: rgba(247,245,241,.82); font-size: var(--text-lg); max-width: 60ch; margin: 0 auto 2rem; }
.hero .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Hero com foto do escritório (overlay grafite p/ consistência) */
.hero--office {
  background-image:
    linear-gradient(rgba(18,21,27,.86), rgba(18,21,27,.80)),
    url('/assets/escritorio-2.webp');
  background-size: cover;
  background-position: center;
}

/* Galeria do escritório --------------------------------------------------- */
.gallery {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
  max-width: 720px; margin: 0 auto;
}
.gallery figure {
  margin: 0; border: 1px solid var(--border); border-radius: 6px;
  overflow: hidden; box-shadow: var(--shadow-sm); background: var(--color-ink);
}
.gallery img {
  width: 100%; height: 190px; object-fit: cover; display: block;
  filter: saturate(.97);
  transition: transform .45s ease;
}
.gallery figure:hover img { transform: scale(1.035); }

/* Autoridade (números-fato) --------------------------------------------- */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.fact { text-align: center; padding: 8px 0; }
.fact .num { font-family: var(--font-display); font-weight: 600; font-size: var(--text-3xl); color: var(--color-navy); line-height: 1; }
.fact .label { font-size: var(--text-sm); color: var(--color-slate); margin-top: 0.5rem; }

/* Cards ----------------------------------------------------------------- */
.grid-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-cards--2 { grid-template-columns: repeat(2, 1fr); max-width: 900px; margin: 0 auto; }
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-top: 3px solid var(--color-navy);
  border-radius: 6px; padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}
.card--featured { border-top-color: var(--color-gold); }
.card h3 { font-size: var(--text-lg); margin-bottom: 0.4rem; }
.card p { font-size: var(--text-sm); color: var(--color-graphite); margin: 0; }
.card .ico { width: 30px; height: 30px; color: var(--color-gold); margin-bottom: 0.9rem; }
.card .ico svg { width: 100%; height: 100%; }

/* Sobre / autoridade com foto ------------------------------------------- */
.about { display: grid; grid-template-columns: 320px 1fr; gap: 56px; align-items: center; }
.about .portrait {
  border-radius: 8px; overflow: hidden; box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  aspect-ratio: 4 / 5;
}
.about .portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }

/* Passos (como trabalho) ------------------------------------------------ */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: step; }
.step { }
.step .n {
  font-family: var(--font-display); font-weight: 600; font-size: var(--text-2xl);
  color: var(--color-gold); line-height: 1;
  border-bottom: 2px solid var(--color-gold); display: inline-block; padding-bottom: 4px; margin-bottom: 12px;
}
.step h3 { font-size: var(--text-lg); }
.step p { font-size: var(--text-sm); color: var(--color-graphite); }

/* Contato --------------------------------------------------------------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border); }
.contact-list .k { font-weight: 600; color: var(--color-ink); min-width: 92px; font-size: var(--text-sm); }
.contact-list .v { color: var(--color-graphite); font-size: var(--text-sm); }
.map-wrap { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow-sm); }
.map-wrap iframe { display: block; width: 100%; height: 340px; border: 0; filter: grayscale(0.25) contrast(1.02); }

/* Footer ---------------------------------------------------------------- */
.site-footer { background: var(--color-ink); color: rgba(247,245,241,.72); padding: 56px 0 40px; font-size: var(--text-sm); }
.site-footer .top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; align-items: flex-start; padding-bottom: 28px; border-bottom: 1px solid rgba(255,255,255,.10); }
.site-footer .brand img { height: 40px; margin-bottom: 14px; }
.site-footer .cols { display: flex; gap: 64px; flex-wrap: wrap; }
.site-footer h4 { color: #fff; font-family: var(--font-body); font-size: var(--text-xs); letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 12px; }
.site-footer a { color: rgba(247,245,241,.72); }
.site-footer a:hover { color: #fff; }
.site-footer .legal { margin-top: 24px; color: rgba(247,245,241,.5); font-size: var(--text-xs); line-height: 1.7; max-width: 760px; }
.site-footer .oab { color: var(--color-gold-soft); font-weight: 600; }

/* WhatsApp flutuante / sticky mobile ------------------------------------ */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--color-navy); color: #fff;
  padding: 12px 18px; border-radius: 6px; font-weight: 600; font-size: var(--text-sm);
  box-shadow: var(--shadow-lg); border: 1px solid var(--color-navy-strong);
}
.wa-float:hover { background: var(--color-navy-strong); color: #fff; }
.wa-float svg { width: 22px; height: 22px; }

/* Responsivo ------------------------------------------------------------ */
@media (max-width: 900px) {
  .gallery { grid-template-columns: 1fr 1fr; }
  .about { grid-template-columns: 1fr; gap: 28px; }
  .about .portrait { max-width: 280px; margin: 0 auto; }
  .contact { grid-template-columns: 1fr; gap: 28px; }
  .grid-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .section--tight { padding: 48px 0; }
  .hero { padding: 64px 0 76px; }
  .hero h1 { font-size: var(--text-3xl); }
  h1 { font-size: var(--text-2xl); }
  .nav { display: none; }
  .site-header .container { height: 76px; }
  .site-header .brand img { height: 50px; }
  .nav.open {
    display: flex; position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--color-ink); padding: 8px 24px 16px; border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .nav.open a { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
  .nav.open .btn-primary { margin-top: 10px; justify-content: center; }
  .nav-toggle {
    display: inline-flex; background: transparent; border: 1px solid rgba(255,255,255,.3);
    border-radius: 5px; padding: 8px 10px; cursor: pointer; color: #fff;
  }
  .nav-toggle svg { width: 22px; height: 22px; }
  .facts { grid-template-columns: 1fr; gap: 24px; }
  .grid-cards, .grid-cards--2, .steps { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .gallery img { height: 220px; }
  .wa-float span { display: none; }
  .wa-float { padding: 14px; border-radius: 50%; }
}
