/* =========================================================
   Perin Advogados — shared stylesheet
   Used by: index.html, sobre.html, area.html, contato.html
   ========================================================= */

:root {
  --navy:    #0b1f3a;
  --navy-2:  #14305a;
  --navy-3:  #2a4264;
  --ink:     #06122a;
  --bone:    #ffffff;
  --bone-2:  #f7f6f2;
  --paper:   #efece4;
  --line:    rgba(11, 31, 58, 0.12);
  --line-2:  rgba(11, 31, 58, 0.06);
  --muted:   rgba(11, 31, 58, 0.62);
  --gold:    #b8945f;
  --gold-2:  #d4b078;
  --wa:      #25d366;
  --wa-dark: #128c7e;

  --serif: "Playfair Display", "Source Serif Pro", Georgia, serif;
  --sans:  "Inter", system-ui, -apple-system, "Helvetica Neue", sans-serif;

  --header-h: 84px;
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bone-2);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
::selection { background: var(--navy); color: var(--bone); }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px) { .wrap { padding: 0 22px; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--sans);
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--navy);
  font-weight: 700;
  margin: 0 0 22px;
}
.eyebrow::before {
  content: ""; width: 28px; height: 2px;
  background: var(--gold);
}

h1.h, h2.h, h3.h {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--navy);
  margin: 0 0 22px;
  line-height: 1.08;
  text-wrap: balance;
  letter-spacing: -0.005em;
}
h1.h { font-size: clamp(38px, 5.2vw, 64px); }
h2.h { font-size: clamp(32px, 4.2vw, 52px); }
h3.h { font-size: clamp(22px, 2.2vw, 28px); }
.h em { font-style: italic; color: var(--gold); }

.lede {
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.6;
  color: var(--navy-3);
  max-width: 60ch;
  margin: 0 0 36px;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px;
  border-radius: var(--radius);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn.primary {
  background: var(--navy); color: var(--bone);
  box-shadow: 0 10px 24px -8px rgba(11, 31, 58, 0.4);
}
.btn.primary:hover { background: var(--ink); transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgba(11, 31, 58, 0.5); }

.btn.whatsapp {
  background: var(--wa); color: #fff;
  box-shadow: 0 10px 24px -8px rgba(37, 211, 102, 0.5);
}
.btn.whatsapp:hover { background: var(--wa-dark); transform: translateY(-2px); }

.btn.ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--line);
}
.btn.ghost:hover { background: var(--bone); border-color: var(--navy); }

.btn.gold {
  background: var(--gold); color: var(--bone);
  box-shadow: 0 10px 24px -8px rgba(184, 148, 95, 0.45);
}
.btn.gold:hover { background: #a37e4f; transform: translateY(-2px); }

.btn.lg { padding: 18px 32px; font-size: 15.5px; }

/* =========================================================
   Utility top bar  +  Header
   ========================================================= */
.utility {
  background: var(--navy);
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  letter-spacing: 0.02em;
}
.utility .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; padding: 11px 32px;
  min-height: 42px;
}
.utility .pill {
  display: inline-flex; align-items: center; gap: 9px; font-weight: 500;
}
.utility .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--wa); box-shadow: 0 0 0 4px rgba(37,211,102,0.18);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0.5); }
  50% { box-shadow: 0 0 0 6px rgba(37,211,102,0.05); }
}
.utility .nums {
  display: flex; align-items: center; gap: 18px; font-weight: 500;
}
.utility .nums a { transition: color .2s ease; }
.utility .nums a:hover { color: var(--gold-2); }
.utility .sep { opacity: 0.4; }
@media (max-width: 720px) {
  .utility .pill { font-size: 12px; }
  .utility .sep, .utility .nums .secondary { display: none; }
}

header.site {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-2);
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h); gap: 24px;
}
.brand {
  display: flex; align-items: center; gap: 14px;
  position: relative;
}
.brand img.logo {
  height: 48px; width: auto;
  display: block;
}
.brand .word {
  display: flex; flex-direction: column; line-height: 1.1;
}
.brand .word b {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.01em;
}
.brand .word span {
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 3px;
  font-weight: 600;
}
@media (max-width: 540px) {
  .brand .word { display: none; }
  .brand img.logo { height: 42px; }
}

nav.primary { display: flex; align-items: center; gap: 30px; }
nav.primary a {
  font-size: 14px; font-weight: 500;
  color: var(--navy-3);
  position: relative;
  padding: 6px 0;
  transition: color .2s ease;
}
nav.primary a::after {
  content: ""; position: absolute; left: 0; right: 100%;
  bottom: 0; height: 2px; background: var(--gold);
  transition: right .3s ease;
}
nav.primary a:hover, nav.primary a.active { color: var(--navy); }
nav.primary a:hover::after, nav.primary a.active::after { right: 0; }

.header-cta { display: flex; align-items: center; gap: 12px; }
.header-cta .btn.whatsapp {
  padding: 11px 18px;
  font-size: 13.5px;
  border-radius: 8px;
}
@media (max-width: 980px) {
  nav.primary { display: none; }
  .header-cta .btn.whatsapp .lbl { display: none; }
  .header-cta .btn.whatsapp { padding: 11px 14px; }
}
@media (max-width: 540px) {
  .header-cta .btn.whatsapp { display: none; }
}

/* Hamburger */
.hamb {
  display: none;
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
  transition: background .2s ease;
}
.hamb span {
  display: block; width: 18px; height: 2px; background: var(--navy);
  transition: transform .25s ease, opacity .2s ease;
}
.hamb:hover { background: var(--bone-2); }
.hamb.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamb.open span:nth-child(2) { opacity: 0; }
.hamb.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 980px) {
  .hamb { display: inline-flex; }
}

/* Mobile drawer */
.drawer {
  position: fixed; inset: 0;
  background: rgba(11, 31, 58, 0.96);
  backdrop-filter: blur(8px);
  z-index: 90;
  display: flex; flex-direction: column;
  padding: 100px 32px 40px;
  transform: translateY(-100%);
  transition: transform .35s cubic-bezier(0.65, 0, 0.35, 1);
  visibility: hidden;
}
.drawer.open { transform: translateY(0); visibility: visible; }
.drawer-close {
  position: absolute; top: 22px; right: 24px;
  width: 44px; height: 44px;
  background: transparent; border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px; color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.drawer-close svg { width: 16px; height: 16px; }
.drawer a.nav-item {
  display: block;
  padding: 18px 0;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: padding-left .25s ease, color .2s ease;
}
.drawer a.nav-item:hover { padding-left: 12px; color: var(--gold-2); }
.drawer-foot {
  margin-top: auto;
  padding-top: 32px;
  display: flex; flex-direction: column; gap: 14px;
}
.drawer-foot a.btn { justify-content: center; }
.drawer-foot .meta {
  margin-top: 14px;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
}

/* =========================================================
   Floating WhatsApp button
   ========================================================= */
.float-wa {
  position: fixed;
  bottom: 22px; right: 22px;
  z-index: 70;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--wa);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 12px 28px -6px rgba(37,211,102,0.55), 0 0 0 0 rgba(37,211,102,0.45);
  transition: transform .2s ease, box-shadow .2s ease;
  animation: floatPulse 2.6s ease-in-out infinite;
}
.float-wa:hover { transform: scale(1.06); }
.float-wa svg { width: 30px; height: 30px; fill: currentColor; }
@keyframes floatPulse {
  0%, 100% { box-shadow: 0 12px 28px -6px rgba(37,211,102,0.55), 0 0 0 0 rgba(37,211,102,0.45); }
  50%      { box-shadow: 0 12px 28px -6px rgba(37,211,102,0.55), 0 0 0 14px rgba(37,211,102,0); }
}
.float-wa-label {
  position: absolute;
  right: 70px; top: 50%; transform: translateY(-50%);
  background: #fff;
  color: var(--navy);
  font-size: 13px; font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: 0 8px 20px -6px rgba(11,31,58,0.25);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.float-wa:hover .float-wa-label { opacity: 1; transform: translateY(-50%) translateX(-4px); }
@media (max-width: 540px) {
  .float-wa { width: 56px; height: 56px; bottom: 18px; right: 18px; }
  .float-wa svg { width: 27px; height: 27px; }
}

/* =========================================================
   Sections
   ========================================================= */
section.block { padding: 110px 0; }
section.block.tight { padding: 80px 0; }
section.block.dark {
  background: var(--navy);
  color: rgba(255,255,255,0.85);
}
section.block.dark h1.h, section.block.dark h2.h, section.block.dark h3.h { color: #fff; }
section.block.dark .eyebrow { color: rgba(255,255,255,0.75); }
section.block.dark .eyebrow::before { background: var(--gold-2); }
section.block.dark .lede { color: rgba(255,255,255,0.75); }
section.block.cream { background: var(--paper); }
section.block.bone  { background: var(--bone); }

@media (max-width: 720px) { section.block { padding: 72px 0; } }

.section-head { max-width: 760px; margin: 0 0 64px; }
.section-head.center { margin: 0 auto 64px; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }

/* =========================================================
   Page hero (used on sobre/area/contato)
   ========================================================= */
.page-hero {
  position: relative;
  padding: 96px 0 80px;
  background: linear-gradient(180deg, var(--bone) 0%, var(--bone-2) 100%);
  border-bottom: 1px solid var(--line-2);
  overflow: hidden;
}
.page-hero::before {
  content: ""; position: absolute;
  top: -180px; right: -120px;
  width: 540px; height: 540px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184,148,95,0.16), transparent 65%);
  pointer-events: none;
}
.page-hero .wrap { position: relative; }
.page-hero .crumb {
  font-size: 12px; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 20px; font-weight: 600;
}
.page-hero .crumb a:hover { color: var(--navy); }
.page-hero .crumb span { color: var(--gold); margin: 0 8px; }

/* =========================================================
   Footer
   ========================================================= */
footer.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.65);
  padding: 80px 0 30px;
  font-size: 14px;
  position: relative;
}
footer.site-footer::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--gold), transparent 60%);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 48px;
  margin-bottom: 56px;
}
.footer-brand img.logo {
  height: 64px; width: auto; margin-bottom: 20px;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
.footer-brand p {
  margin: 0 0 22px;
  line-height: 1.6;
  font-size: 14.5px;
  color: rgba(255,255,255,0.6);
  max-width: 38ch;
}
.footer-brand .badge-row {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: 18px;
}
.footer-brand .badge-row span {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 5px 11px;
  border-radius: 999px;
  font-weight: 500;
}

.footer-col h4 {
  color: #fff;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  margin: 0 0 22px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin: 0 0 11px; }
.footer-col li a {
  color: rgba(255,255,255,0.65);
  font-size: 14px;
  transition: color .2s ease, padding-left .2s ease;
  display: inline-block;
}
.footer-col li a:hover { color: var(--gold-2); padding-left: 4px; }
.footer-col p {
  margin: 0 0 14px;
  line-height: 1.65;
  font-size: 14px;
  color: rgba(255,255,255,0.65);
}
.footer-col strong {
  display: block;
  color: rgba(255,255,255,0.95);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
  font-weight: 600;
}

.footer-ethics {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 26px 0 0;
  font-size: 12.5px;
  color: rgba(255,255,255,0.42);
  line-height: 1.65;
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 22px;
  padding-top: 22px;
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  font-size: 12.5px; color: rgba(255,255,255,0.42);
}
.footer-bottom .credits a:hover { color: var(--gold-2); }

@media (max-width: 980px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .footer-brand p { margin-left: auto; margin-right: auto; }
  .footer-brand .badge-row { justify-content: center; }
  .footer-bottom { justify-content: center; text-align: center; }
}

/* =========================================================
   Cards / common pieces
   ========================================================= */
.card {
  background: var(--bone);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 34px;
  box-shadow: 0 1px 0 rgba(11,31,58,0.02);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -16px rgba(11,31,58,0.18); border-color: var(--line); }

.divider {
  height: 1px; background: var(--line-2);
  margin: 0;
}

/* Reveal — default visible; only hidden when JS marks body.js-reveals AND element lacks .in.
   This guarantees graceful degradation if JS, IO, or CSS transitions stall. */
.reveal { opacity: 1; transform: none; transition: opacity .85s cubic-bezier(.16,1,.3,1), transform .85s cubic-bezier(.16,1,.3,1); }
body.js-reveals .reveal:not(.in) { opacity: 0; transform: translateY(28px); }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
  body.js-reveals .reveal:not(.in) { opacity: 1; transform: none; }
}

/* Focus ring */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

/* Body scroll lock when drawer open */
body.nav-open { overflow: hidden; }
