/* =========================================================
   DR. ALMEIDA ADVOCACIA — style.css
   Estética: institucional clássico · marinho profundo + dourado
   Abordagem: mobile-first, depois media queries
   ========================================================= */

/* ---------- Variáveis de tema ---------- */
:root {
  --ink:     #0f1f33;   /* marinho profundo (hero/rodapé) */
  --navy:    #16314f;   /* marinho                        */
  --slate:   #2a3f57;   /* superfície escura suave        */
  --gold:    #c2a15a;   /* acento (dourado/latão)         */
  --gold-dk: #a88842;
  --paper:   #f7f5f0;   /* fundo claro                    */
  --mist:    #ece9e1;   /* superfície clara               */
  --text:    #1b2734;   /* texto sobre claro              */
  --muted:   #5d6776;   /* texto secundário               */
  --line:    rgba(27, 39, 52, 0.14);
  --line-d:  rgba(247, 245, 240, 0.16);

  --font-display: 'Spectral', Georgia, serif;
  --font-body:    'IBM Plex Sans', system-ui, sans-serif;

  --radius: 10px;
  --max:    1160px;
  --ease:   cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset enxuto ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 300;
  background: var(--paper);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---------- Layout base ---------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 76px 0; }

.section-head { max-width: 600px; margin: 0 auto 46px; text-align: center; }
.section-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-dk);
  margin-bottom: 14px;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.1;
}
.section-sub { color: var(--muted); margin-top: 14px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s, color 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.btn-gold {
  background: var(--gold);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 8px 22px rgba(194, 161, 90, 0.28);
}
.btn-gold:hover { background: var(--gold-dk); transform: translateY(-3px); box-shadow: 0 12px 28px rgba(168, 136, 66, 0.4); }
.btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--line-d);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }
.btn-block { width: 100%; padding: 16px; }

/* ---------- Cabeçalho ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(15, 31, 51, 0.85);
  backdrop-filter: blur(10px);
  transition: padding 0.35s, box-shadow 0.35s, background 0.35s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled { padding: 10px 0; box-shadow: 0 6px 24px rgba(0,0,0,0.25); border-bottom-color: var(--line-d); }
.header-inner { display: flex; align-items: center; justify-content: space-between; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.3rem;
  border-radius: 6px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-size: 1.3rem; color: var(--paper); font-weight: 500; }
.brand-sub { font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }

/* Navegação — gaveta no mobile */
.nav {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(80%, 330px);
  background: var(--navy);
  border-left: 1px solid var(--line-d);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
  padding: 40px;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease);
}
.nav.open { transform: translateX(0); }
.nav-link { font-size: 1.02rem; color: var(--paper); letter-spacing: 0.03em; transition: color 0.2s; }
.nav-link:hover { color: var(--gold); }
.nav-cta { margin-top: 8px; }

.nav-toggle {
  display: flex; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 6px; z-index: 101;
}
.nav-toggle span { width: 26px; height: 2px; background: var(--paper); transition: transform 0.3s, opacity 0.3s; }
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(circle at 80% 0%, rgba(194,161,90,0.12), transparent 55%),
    linear-gradient(160deg, var(--ink), var(--navy));
  color: var(--paper);
  padding: 150px 0 90px;
}
.hero-inner { max-width: 760px; }
.hero-eyebrow {
  font-size: 0.76rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 22px;
  display: inline-block; padding-bottom: 8px; border-bottom: 1px solid var(--line-d);
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.4rem, 8vw, 4rem);
  line-height: 1.12;
}
.hero-title em { font-style: italic; color: var(--gold); }
.hero-lead { color: rgba(247,245,240,0.82); max-width: 560px; margin: 24px 0 34px; font-size: 1.1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-trust {
  display: flex; flex-wrap: wrap; gap: 36px;
  margin-top: 48px; padding-top: 30px; border-top: 1px solid var(--line-d);
}
.hero-trust strong { font-family: var(--font-display); font-size: 1.6rem; color: var(--gold); display: block; }
.hero-trust span { color: rgba(247,245,240,0.7); font-size: 0.85rem; }

/* ---------- Áreas de atuação ---------- */
.area-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.area {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
}
.area:hover { transform: translateY(-5px); box-shadow: 0 16px 38px rgba(15, 31, 51, 0.12); }
.area-icon {
  font-family: var(--font-display);
  font-size: 2rem; color: var(--gold-dk); display: block; margin-bottom: 12px;
}
.area-name { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; }
.area-desc { color: var(--muted); font-size: 0.96rem; margin-top: 8px; }

/* ---------- Perfil do advogado ---------- */
.profile { background: var(--mist); }
.profile-inner { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; }
.profile-photo { position: relative; max-width: 320px; margin: 0 auto; width: 100%; }
.profile-frame {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--navy), var(--ink));
  display: grid; place-items: center;
  border: 1px solid var(--line);
}
.profile-frame span { font-family: var(--font-display); font-size: 6rem; color: var(--gold); }
.profile-badge {
  position: absolute; bottom: -14px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: var(--ink);
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.08em;
  padding: 8px 18px; border-radius: 999px; white-space: nowrap;
}
.profile-role { color: var(--gold-dk); font-weight: 500; margin: 6px 0 14px; }
.profile-text p { color: var(--muted); margin-top: 14px; max-width: 560px; }
.profile-text p:first-of-type { margin-top: 0; }
.profile-list { margin-top: 22px; display: grid; gap: 10px; }
.profile-list li { position: relative; padding-left: 26px; color: var(--text); }
.profile-list li::before {
  content: "§"; position: absolute; left: 0; top: 0;
  color: var(--gold-dk); font-family: var(--font-display); font-weight: 600;
}

/* ---------- Contato ---------- */
.contact-inner { display: grid; grid-template-columns: 1fr; gap: 40px; }
.contact-text p { color: var(--muted); margin-top: 14px; max-width: 460px; }
.contact-info { margin-top: 26px; display: grid; gap: 14px; }
.contact-info li { padding-left: 16px; border-left: 2px solid var(--gold); color: var(--text); }
.contact-info strong { display: block; font-weight: 600; }

.contact-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr; gap: 0; }
.field label { display: block; font-size: 0.85rem; font-weight: 500; margin-bottom: 7px; color: var(--text); }
.field input, .field select, .field textarea {
  width: 100%;
  font-family: var(--font-body); font-size: 0.95rem;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--text);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(194, 161, 90, 0.18);
}
.field textarea { resize: vertical; }
.field .error { display: block; color: #b4452f; font-size: 0.8rem; margin-top: 6px; min-height: 1em; }
.field input.invalid, .field textarea.invalid { border-color: #b4452f; }

.form-feedback { margin-top: 14px; font-size: 0.92rem; font-weight: 500; min-height: 1.2em; }
.form-feedback.ok { color: var(--gold-dk); }
.form-note { color: var(--muted); font-size: 0.78rem; margin-top: 12px; }

/* ---------- Rodapé ---------- */
.site-footer { background: var(--ink); color: var(--paper); padding: 44px 0; }
.footer-inner { display: flex; flex-direction: column; gap: 18px; }
.footer-brand { font-size: 1.5rem; color: var(--paper); }
.footer-copy { color: var(--gold); font-size: 0.85rem; letter-spacing: 0.04em; }
.footer-rights { color: rgba(247,245,240,0.7); font-size: 0.82rem; line-height: 1.7; }
.footer-disclaimer { color: rgba(247,245,240,0.45); font-size: 0.76rem; }

/* ---------- WhatsApp flutuante ---------- */
.whatsapp-float {
  position: fixed;
  bottom: 22px; right: 22px;
  z-index: 200;
  width: 58px; height: 58px;
  display: grid; place-items: center;
  background: #25d366;
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
  animation: pulse 2.4s infinite;
  transition: transform 0.25s var(--ease);
}
.whatsapp-float:hover { transform: scale(1.08); }
@keyframes pulse {
  0%   { box-shadow: 0 8px 24px rgba(37,211,102,0.45), 0 0 0 0 rgba(37,211,102,0.5); }
  70%  { box-shadow: 0 8px 24px rgba(37,211,102,0.45), 0 0 0 16px rgba(37,211,102,0); }
  100% { box-shadow: 0 8px 24px rgba(37,211,102,0.45), 0 0 0 0 rgba(37,211,102,0); }
}

/* ---------- Animações de revelação ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .whatsapp-float { animation: none; }
  html { scroll-behavior: auto; }
}

/* =========================================================
   BREAKPOINTS
   ========================================================= */

/* Tablet */
@media (min-width: 680px) {
  .area-grid { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr 1fr; gap: 16px; }
  .footer-inner { flex-direction: row; justify-content: space-between; align-items: flex-end; }
}

/* Desktop */
@media (min-width: 940px) {
  .section { padding: 104px 0; }
  .area-grid { grid-template-columns: repeat(3, 1fr); }
  .profile-inner { grid-template-columns: 0.8fr 1.2fr; gap: 56px; }
  .profile-photo { margin: 0; }
  .contact-inner { grid-template-columns: 0.9fr 1.1fr; gap: 56px; }

  .nav-toggle { display: none; }
  .nav {
    position: static;
    width: auto;
    flex-direction: row;
    align-items: center;
    background: none;
    border: 0;
    padding: 0;
    transform: none;
    gap: 32px;
  }
  .nav-cta { margin-top: 0; }
}