/* ============================================================
   Advocacia BSA — Stylesheet principal
   Design tokens, layout base, navegação, footer, animações,
   componentes compartilhados entre todas as páginas.
   ============================================================ */

:root{
  --bg: #EFE9DD;
  --bg-2: #E6DFD0;
  --paper: #F7F3EA;
  --ink: #0A0A0A;
  --ink-soft: #2B2B2B;
  --muted: #6B6357;
  --rule: #C9BFAA;
  --oxblood: #6E1A26;
  --oxblood-deep: #4A0F1A;
  --gold: #A88555;
  --gold-soft: #C8A876;
  --green: #1F3A2E;
}

*{margin:0;padding:0;box-sizing:border-box;}

/* Fix de overflow horizontal em mobile (touch swipe) */
html, body{
  overflow-x: hidden;
  max-width: 100vw;
}
html{scroll-behavior:smooth;}

body{
  background: var(--bg);
  color: var(--ink);
  font-family: 'Geist', sans-serif;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Travamento robusto do body quando menu mobile aberto */
body.no-scroll{
  position: fixed;
  width: 100%;
  overflow: hidden;
}

/* Sutil grão de papel */
body::before{
  content:"";
  position:fixed;inset:0;pointer-events:none;z-index:1;
  background-image: radial-gradient(rgba(0,0,0,0.025) 1px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: multiply;
  opacity: 0.5;
}

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

.container{
  max-width:1240px;
  margin:0 auto;
  padding: 0 32px;
  position:relative;
  z-index:2;
}
@media(max-width:560px){
  .container{padding: 0 24px;}
}

/* ===================================================
   NAV — logo, links, dropdown, hamburger mobile
   =================================================== */
nav{
  border-bottom: 1px solid var(--rule);
  padding: 16px 0;
  background: rgba(239,233,221,0.92);
  position: sticky;top:0;z-index: 50;
  backdrop-filter: blur(8px);
}
.nav-inner{display:flex;align-items:center;justify-content:space-between;gap:24px;}

.logo{
  display:flex;align-items:center;gap:12px;
  text-decoration:none;
  color: var(--ink);
}
.logo-img{
  height: 48px;
  width: auto;
  display: block;
  object-fit: contain;
}
.logo-fallback{
  display:none;
  font-family:'Fraunces',serif;
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.logo-fallback em{
  font-style: italic;
  color: var(--oxblood);
  font-weight: 500;
}

.nav-links{display:flex;gap:36px;align-items:center;}
.nav-links > a, .nav-dropdown-toggle{
  color: var(--ink-soft);
  text-decoration:none;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color .2s;
  font-weight: 400;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
}
.nav-links > a:hover, .nav-dropdown-toggle:hover,
.nav-links > a.nav-active{color:var(--oxblood);}

/* Dropdown */
.nav-dropdown{position: relative;}
.nav-dropdown-toggle::after{
  content: "";
  width: 7px;height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-left: 2px;
  margin-top: -3px;
  transition: transform .25s;
}
.nav-dropdown:hover .nav-dropdown-toggle::after{transform: rotate(225deg);margin-top: 2px;}
.nav-dropdown-menu{
  position: absolute;
  top: 100%;
  left: -16px;
  min-width: 280px;
  background: var(--paper);
  border: 1px solid var(--rule);
  box-shadow: 0 12px 32px -12px rgba(0,0,0,0.12);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .22s, transform .22s, visibility .22s;
  margin-top: 14px;
}
.nav-dropdown-menu::before{
  content: "";
  position: absolute;
  top: -14px;left: 0;right: 0;height: 14px;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu{
  opacity: 1;visibility: visible;transform: translateY(0);
}
.nav-dropdown-menu a{
  display: block;
  padding: 14px 20px;
  color: var(--ink);
  text-decoration: none;
  font-family:'Fraunces',serif;
  font-weight: 400;
  font-size: 16px;
  letter-spacing: -0.01em;
  text-transform: none;
  transition: background .2s, color .2s;
  border-bottom: 1px solid var(--rule);
}
.nav-dropdown-menu a:last-child{border-bottom: none;}
.nav-dropdown-menu a:hover{background: var(--bg-2);color: var(--oxblood);}
.nav-dropdown-menu a small{
  display: block;
  font-family:'JetBrains Mono',monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 400;
}

.nav-cta{
  background: var(--ink) !important;
  color: var(--bg) !important;
  padding: 11px 20px !important;
  border-radius: 0;
  transition: background .2s !important;
}
.nav-cta:hover{background: var(--oxblood) !important;}

/* Hamburger */
.nav-toggle{
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;height: 40px;
  padding: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  z-index: 101;
}
.nav-toggle span{
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: transform .3s, opacity .3s, background .3s;
}
.nav-toggle.open span{background: var(--bg);}
.nav-toggle.open span:nth-child(1){transform: translateY(6.5px) rotate(45deg);}
.nav-toggle.open span:nth-child(2){opacity: 0;}
.nav-toggle.open span:nth-child(3){transform: translateY(-6.5px) rotate(-45deg);}

/* Botão de fechar discreto dentro do drawer */
.nav-close{
  display: none;
  position: absolute;
  top: 24px;
  right: 24px;
  width: 36px;height: 36px;
  background: none;
  border: 1px solid rgba(239,233,221,0.25);
  cursor: pointer;
  align-items: center;justify-content: center;
  color: rgba(239,233,221,0.7);
  font-size: 18px;
  transition: all .2s;
  z-index: 102;
}
.nav-close:hover{
  border-color: var(--gold);
  color: var(--gold);
}

.mobile-overlay{
  position: fixed;inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 99;
  opacity: 0;visibility: hidden;
  transition: opacity .3s, visibility .3s;
}
.mobile-overlay.open{opacity: 1;visibility: visible;}

@media(max-width:880px){
  .nav-toggle{display: flex;}
  .nav-links{
    position: fixed;
    top: 0;right: 0;
    width: min(380px, 90vw);
    height: 100vh;
    background: var(--ink);
    color: var(--bg);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 80px 32px 40px;
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.2,.8,.2,1);
    z-index: 100;
    overflow-y: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }
  .nav-links.open{transform: translateX(0);}
  .nav-links .nav-close{display: flex;}
  .nav-links > a, .nav-dropdown-toggle{
    color: rgba(239,233,221,0.85);
    width: 100%;
    padding: 18px 0;
    border-bottom: 1px solid rgba(239,233,221,0.12);
    font-size: 14px;
  }
  .nav-links > a:hover, .nav-dropdown-toggle:hover,
  .nav-links > a.nav-active{color: var(--gold);}
  .nav-dropdown{width: 100%;}
  .nav-dropdown-toggle{justify-content: space-between;}
  .nav-dropdown-toggle::after{
    border-color: rgba(239,233,221,0.5);
  }
  .nav-dropdown-menu{
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0 0 12px 16px;
    margin-top: 0;
    min-width: 0;
  }
  .nav-dropdown-menu a{
    color: rgba(239,233,221,0.7);
    font-family:'Geist', sans-serif;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.04em;
    padding: 10px 0;
    border-bottom: 1px solid rgba(239,233,221,0.08);
  }
  .nav-dropdown-menu a:last-child{border-bottom: 1px solid rgba(239,233,221,0.08);}
  .nav-dropdown-menu a:hover{background: transparent;color: var(--gold);}
  .nav-cta{
    margin-top: 20px;
    width: 100%;
    text-align: center;
    background: var(--oxblood) !important;
  }
}

/* ===================================================
   TIPOGRAFIA E COMPONENTES BASE
   =================================================== */

h1{
  font-family:'Fraunces',serif;
  font-weight: 300;
  font-size: clamp(40px, 5.8vw, 80px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin-bottom: 32px;
}
h1 em{
  font-style: italic;
  font-weight: 300;
  color: var(--oxblood);
}
h1 .pillar{display:block;}
h1 .underline{position:relative;display:inline-block;}
h1 .underline::after{
  content:"";position:absolute;left:0;right:0;bottom:6px;height:8px;
  background: var(--gold);opacity:.32;z-index:-1;
}

.eyebrow{
  font-family:'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--oxblood);
  margin-bottom: 28px;
  display:flex;align-items:center;gap:14px;
}
.eyebrow::before{
  content:"";width:32px;height:1px;background:var(--oxblood);
}

.lede{
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 540px;
  margin-bottom: 40px;
}
.lede strong{color:var(--ink);font-weight: 600;}

/* Botões */
.cta-row{display:flex;gap:18px;flex-wrap:wrap;align-items:center;}
.btn-primary{
  background: var(--ink);
  color: var(--bg);
  padding: 16px 28px;
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  display:inline-flex;align-items:center;gap:12px;
  transition: all .25s;
  border: 1px solid var(--ink);
}
.btn-primary:hover{background: var(--oxblood);border-color: var(--oxblood);}
.btn-primary svg{transition: transform .25s;}
.btn-primary:hover svg{transform: translateX(4px);}
.btn-secondary{
  color: var(--ink);
  padding: 16px 4px;
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  border-bottom: 1px solid var(--ink);
  transition: color .2s, border-color .2s;
}
.btn-secondary:hover{color:var(--oxblood);border-color:var(--oxblood);}

/* Sections */
section{padding: 120px 0;border-bottom: 1px solid var(--rule);}
@media(max-width:880px){section{padding: 80px 0;}}

.section-num{
  font-family:'JetBrains Mono',monospace;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--oxblood);
  margin-bottom: 24px;
  display: block;
}
.section-title{
  font-family:'Fraunces',serif;
  font-weight: 300;
  font-size: clamp(36px, 4.5vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin-bottom: 32px;
  max-width: 900px;
}
.section-title em{font-style: italic;color: var(--oxblood);}
.section-intro{
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 680px;
  margin-bottom: 64px;
}

/* Ticker (DPO + Patrimonial) */
.ticker{
  background: var(--ink);
  color: var(--bg);
  padding: 18px 0;
  overflow: hidden;
  border-bottom: 1px solid var(--ink);
}
.ticker-track{
  display: flex;
  gap: 56px;
  animation: scroll 60s linear infinite;
  white-space: nowrap;
  width: fit-content;
}
.ticker-item{
  font-family:'JetBrains Mono',monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display:flex;align-items:center;gap:12px;
}
.ticker-item::before{content:"●";color: var(--gold);font-size: 8px;}
@keyframes scroll{
  from{transform:translateX(0);}
  to{transform:translateX(-50%);}
}

/* FAQ accordion (DPO + Patrimonial) */
.faq-list{
  border-top: 1px solid var(--ink);
  max-width: 900px;
}
.faq-item{
  border-bottom: 1px solid var(--rule);
  padding: 28px 0;
  cursor: pointer;
}
.faq-q{
  display:grid;
  grid-template-columns: 40px 1fr 32px;
  gap: 16px;
  align-items: start;
}
.faq-q-num{
  font-family:'JetBrains Mono',monospace;
  font-size: 12px;
  color: var(--oxblood);
  letter-spacing: 0.08em;
  padding-top: 6px;
}
.faq-q h4{
  font-family:'Fraunces',serif;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.faq-toggle{
  font-family:'Fraunces',serif;
  font-weight: 300;
  font-size: 28px;
  color: var(--oxblood);
  line-height: 0.8;
  transition: transform .3s;
  text-align: center;
}
.faq-item.open .faq-toggle{transform: rotate(45deg);}
.faq-a{
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease, padding .3s;
  padding-left: 56px;
  padding-right: 48px;
}
.faq-item.open .faq-a{
  max-height: 600px;
  padding-top: 16px;
}
.faq-a p{
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
}
@media(max-width:560px){
  .faq-q{grid-template-columns: 32px 1fr 24px;gap: 10px;}
  .faq-q h4{font-size: 18px;}
  .faq-a{padding-left: 42px;padding-right: 0;}
}

/* CTA final escuro (compartilhado entre LPs) */
.final{
  background: var(--ink);
  color: var(--bg);
  padding: 140px 0;
  border-bottom: none;
}
@media(max-width:880px){.final{padding: 80px 0;}}
.final-inner{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
@media(max-width:980px){.final-inner{grid-template-columns:1fr;gap:40px;}}
.final h2{
  font-family:'Fraunces',serif;
  font-weight: 300;
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.final h2 em{font-style: italic;color: var(--gold);}
.final-card{
  background: var(--bg);
  color: var(--ink);
  padding: 40px;
  border: 1px solid var(--gold);
}
@media(max-width:560px){.final-card{padding: 32px 24px;}}
.final-card .eyebrow{margin-bottom: 16px;}
.final-card h3{
  font-family:'Fraunces',serif;
  font-weight: 400;
  font-size: 26px;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.final-card p{
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
  line-height: 1.55;
}
.final-card .btn-primary{
  width: 100%;
  justify-content: center;
  background: var(--oxblood);
  border-color: var(--oxblood);
}
.final-card .btn-primary:hover{background:var(--oxblood-deep);border-color:var(--oxblood-deep);}
.final-checks{list-style: none;margin-bottom: 24px;}
.final-checks li{
  font-size: 13px;
  color: var(--ink-soft);
  padding: 6px 0;
  display:flex;align-items:flex-start;gap:10px;
}
.final-checks li::before{content:"→";color: var(--oxblood);font-weight:600;flex-shrink: 0;}

/* ===================================================
   FOOTER (compartilhado)
   =================================================== */
footer{
  background: var(--ink);
  color: rgba(239,233,221,0.5);
  padding: 56px 0 32px;
  border-top: 1px solid rgba(239,233,221,0.12);
}
.footer-inner{
  display: flex;
  justify-content: space-between;
  align-items: start;
  flex-wrap: wrap;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(239,233,221,0.12);
  margin-bottom: 32px;
}
.footer-brand-block{max-width: 320px;}
.footer-logo-img{
  height: 56px;
  width: auto;
  margin-bottom: 16px;
  display: block;
}
.footer-tagline{
  font-size: 14px;
  line-height: 1.5;
  color: rgba(239,233,221,0.5);
}
.footer-cols{display: flex; gap: 64px; flex-wrap: wrap;}
.footer-col h5{
  font-family:'JetBrains Mono',monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}
.footer-col ul{list-style: none;}
.footer-col ul li{padding: 6px 0;}
.footer-col ul a{
  color: rgba(239,233,221,0.65);
  text-decoration: none;
  font-size: 14px;
  transition: color .2s;
}
.footer-col ul a:hover{color: var(--gold);}
.footer-bottom{
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-family:'JetBrains Mono',monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ===================================================
   ANIMAÇÕES
   =================================================== */
@keyframes fadeUp{
  from{opacity:0;transform:translateY(24px);}
  to{opacity:1;transform:translateY(0);}
}
.reveal{
  opacity:0;
  animation: fadeUp .9s cubic-bezier(.2,.8,.2,1) forwards;
}
.reveal.d1{animation-delay:.1s;}
.reveal.d2{animation-delay:.25s;}
.reveal.d3{animation-delay:.4s;}
.reveal.d4{animation-delay:.55s;}

.scroll-reveal{
  opacity:0;
  transform: translateY(24px);
  transition: opacity .8s ease, transform .8s ease;
}
.scroll-reveal.visible{
  opacity:1;
  transform: translateY(0);
}

/* ===================================================
   PÁGINAS LEGAIS (Termos, Política, Código de Ética)
   =================================================== */
.legal-page{padding: 80px 0 120px;}
.legal-page h1{
  font-family:'Fraunces',serif;
  font-weight: 300;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 32px;
  max-width: 800px;
}
.legal-page h1 em{font-style: italic;color: var(--oxblood);}
.legal-content{
  max-width: 760px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.legal-content h2{
  font-family:'Fraunces',serif;
  font-weight: 400;
  font-size: 26px;
  letter-spacing: -0.02em;
  margin-top: 56px;
  margin-bottom: 16px;
  color: var(--ink);
}
.legal-content h2:first-child{margin-top: 0;}
.legal-content h3{
  font-family:'Fraunces',serif;
  font-weight: 400;
  font-size: 20px;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--ink);
}
.legal-content p{margin-bottom: 18px;}
.legal-content ul, .legal-content ol{margin: 18px 0 18px 24px;}
.legal-content li{margin-bottom: 8px;}
.legal-content a{color: var(--oxblood);}
.legal-meta{
  font-family:'JetBrains Mono',monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 24px;
  margin-top: 56px;
  border-top: 1px solid var(--rule);
}
