/* ==========================================================================
   MAIN STYLES & GLOBAL ARCHITECTURE — EMERSON LÉGORI ADVOCACIA
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-footer);
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--bg-base);
  line-height: 1.65;
  font-weight: 400;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  animation: pageFadeIn 0.35s ease-out forwards;
}

#main-content {
  width: 100%;
  position: relative;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

#main-content.spring-scroll-active {
  animation: springScrollTeaser 1.25s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes springScrollTeaser {
  0% {
    transform: translateY(0);
  }
  28% {
    transform: translateY(-74px);
  }
  46% {
    transform: translateY(-12px);
  }
  64% {
    transform: translateY(-30px);
  }
  80% {
    transform: translateY(-6px);
  }
  92% {
    transform: translateY(-14px);
  }
  100% {
    transform: translateY(0);
  }
}

/* ==========================================================================
   SCROLLBAR MINIMALISTA & INTEGRADA
   ========================================================================== */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
  background: var(--brand-gold-dark);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--brand-gold);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--brand-gold-dark) var(--bg-base);
}

/* ==========================================================================
   TIPOGRAFIA & RITMO VISUAL EDITORIAL
   ========================================================================== */
h1, h2, h3, h4, .font-serif {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.18;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 300;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 300;
}

h3 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 400;
}

h4 {
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  font-weight: 500;
}

p {
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
  font-size: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

/* ==========================================================================
   ESTILOS DE DESTAQUE & KICKERS
   ========================================================================== */
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--brand-gold-light);
  margin-bottom: 1rem;
}

.section-kicker::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background-color: var(--brand-gold);
}

.section-title {
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.section-title em {
  font-style: italic;
  font-weight: 300;
  color: var(--brand-gold-light);
}

.section-subtitle {
  font-size: 1.05rem;
  max-width: 680px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.text-center {
  text-align: center;
}

.text-center .section-kicker {
  justify-content: center;
}

.text-center .section-kicker::after {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background-color: var(--brand-gold);
}

.text-center .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   CONTAINER & SEÇÕES UNIFICADAS
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.section {
  padding-top: clamp(80px, 10vw, 130px);
  padding-bottom: clamp(80px, 10vw, 130px);
  position: relative;
  overflow: hidden;
  background-color: var(--bg-base);
}

.section-header {
  margin-bottom: clamp(40px, 6vw, 70px);
}

/* Fundos Harmonizados (Sem Efeito Zebra) */
.bg-base {
  background-color: var(--bg-base);
}

.bg-surface {
  background-color: var(--bg-surface);
}

.bg-dark {
  background-color: var(--bg-base);
}

/* ==========================================================================
   BOTÕES & CTAs PADRONIZADOS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 15px 30px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--btn-radius);
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
  will-change: transform;
}

/* Botão principal: dourado sólido, sem gradiente (Item 03 - Retorno 4ª Rodada) */
.btn-gold,
.btn-ouro,
.btn-primary,
.nav-cta-btn,
.hero .btn-primary,
a[href*="wa.me"].btn {
  background: #C5A059 !important;
  background-image: none !important;
  color: #141414 !important;
  border: 1px solid #8A6A2E !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  box-shadow: 0 6px 18px -10px rgba(0, 0, 0, 0.6) !important;
}

.btn-gold:hover,
.btn-ouro:hover,
.btn-primary:hover,
.nav-cta-btn:hover,
.hero .btn-primary:hover,
a[href*="wa.me"].btn:hover {
  background: #B08A3E !important;
  background-image: none !important;
  border-color: #6E5424 !important;
  color: #141414 !important;
  transform: translateY(-2px);
}

.btn-outline-gold {
  background: transparent;
  color: #E0C07A;
  border: 1px solid #C5A059;
  letter-spacing: 0.06em;
}

.btn-outline-gold:hover {
  background-color: rgba(197, 160, 89, 0.12);
  border-color: #E0C07A;
  color: #FFFFFF;
  transform: translateY(-2px);
}

.btn-dark, .btn-secondary {
  background-color: var(--bg-surface-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-gold-subtle);
}

.btn-dark:hover, .btn-secondary:hover {
  background-color: var(--bg-surface-card);
  border-color: var(--brand-gold);
  color: var(--brand-gold-light);
  transform: translateY(-2px);
}

.btn-icon-svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  transition: transform var(--transition-fast);
}

.btn:hover .btn-icon-svg {
  transform: translateX(4px);
}

/* ==========================================================================
   ANIMAÇÃO BIDIRECIONAL SUAVE (2.5s COM --ease-premium)
   ========================================================================== */
.reveal-item {
  opacity: 0;
  transition: opacity var(--transition-reveal), transform var(--transition-reveal);
  will-change: opacity, transform;
}

.from-left {
  transform: translateX(-40px);
}

.from-right {
  transform: translateX(40px);
}

.from-bottom {
  transform: translateY(30px);
}

.reveal-item.is-visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* Cascata no Hero */
.hero-badge-authority.reveal-item { transition-delay: 0.05s; }
.hero-title.reveal-item { transition-delay: 0.18s; }
.hero-description.reveal-item { transition-delay: 0.32s; }
.hero-cta-group.reveal-item { transition-delay: 0.46s; }
.hero-stats-strip.reveal-item { transition-delay: 0.60s; }

/* Delay gradual para listas e grids */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }

/* ==========================================================================
   ACELERAÇÃO DE HARDWARE & ACESSIBILIDADE
   ========================================================================== */
:focus-visible {
  outline: 2px solid var(--brand-gold) !important;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
