/* ==========================================================================
   GLOBAL STYLES & ARCHITECTURE - GPS ADVOCACIA
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-dark);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
}

/* Scrollbar Minimalista Customizado */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: var(--brand-navy-dark);
}

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

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

/* Acessibilidade - Link de Pular para o Conteúdo Principal */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--brand-gold);
  color: var(--brand-navy-dark);
  padding: 12px 20px;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 4px;
  z-index: 2000;
  transition: top 0.3s ease;
  text-decoration: none;
}

.skip-to-content:focus {
  top: 16px;
}

/* Tipografia Base */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading, var(--font-serif));
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  letter-spacing: -0.025em;
  font-weight: 700;
}

h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  letter-spacing: -0.02em;
  font-weight: 600;
}

h3 {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}

p {
  margin-bottom: 1.2rem;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

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

/* Foco Acessível */
:focus-visible {
  outline: 2px solid var(--brand-gold) !important;
  outline-offset: 3px !important;
}

/* Containers e Estrutura */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.section {
  padding-top: var(--section-padding-y);
  padding-bottom: var(--section-padding-y);
  position: relative;
}

@media (max-width: 768px) {
  .section {
    padding-top: var(--section-padding-mobile-y);
    padding-bottom: var(--section-padding-mobile-y);
  }
}

/* Temas de Seção */
.section-dark {
  background-color: var(--brand-navy-dark);
  color: var(--text-light);
}

.section-deep {
  background-color: var(--brand-navy-deep);
  color: var(--text-light);
}

.section-light {
  background-color: var(--bg-body);
  color: var(--text-dark);
}

.section-surface {
  background-color: var(--bg-surface-light);
  color: var(--text-dark);
}

/* Kicker / Tag de Cabeçalho */
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--brand-gold);
  margin-bottom: 18px;
}

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

.section-header-center {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 64px auto;
}

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

.section-title {
  margin-bottom: 20px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
}

.section-dark .section-subtitle {
  color: var(--text-light-muted);
}

/* ==========================================================================
   SISTEMA DE ANIMAÇÕES BIDIRECIONAIS EM SLOWMOTION (Indo e Voltando no Scroll)
   ========================================================================== */

.reveal-init,
.reveal-up,
.reveal-left,
.reveal-right,
.reveal-scale,
.reveal-blur {
  opacity: 0;
  will-change: opacity, transform, filter;
  transition: opacity var(--duration-entrance) var(--ease-slowmotion), 
              transform var(--duration-entrance) var(--ease-slowmotion),
              filter var(--duration-entrance) var(--ease-slowmotion);
}

.reveal-init {
  filter: blur(4px);
}

.reveal-up {
  transform: translateY(35px);
  filter: blur(6px);
}

.reveal-left {
  transform: translateX(-45px) translateY(10px);
  filter: blur(6px);
}

.reveal-right {
  transform: translateX(45px) translateY(10px);
  filter: blur(6px);
}

.reveal-scale {
  transform: scale(0.95) translateY(20px);
  filter: blur(6px);
}

.reveal-blur {
  transform: translateY(15px);
  filter: blur(12px);
}

/* Estado Ativado pelo IntersectionObserver (Indo e Voltando) */
.revealed {
  opacity: 1 !important;
  transform: translate3d(0, 0, 0) scale(1) !important;
  filter: blur(0) !important;
}

/* Delays escalonados aplicados no disparo de entrada */
.revealed.delay-1 { transition-delay: 0.15s; }
.revealed.delay-2 { transition-delay: 0.3s; }
.revealed.delay-3 { transition-delay: 0.45s; }
.revealed.delay-4 { transition-delay: 0.6s; }
.revealed.delay-5 { transition-delay: 0.75s; }

/* Cascata de entrada linha a linha / elemento a elemento */
.reveal-cascade > * {
  opacity: 0;
  transform: translateY(30px);
  filter: blur(5px);
  will-change: opacity, transform, filter;
  transition: opacity var(--duration-entrance) var(--ease-slowmotion), 
              transform var(--duration-entrance) var(--ease-slowmotion),
              filter var(--duration-entrance) var(--ease-slowmotion);
}

.reveal-cascade.revealed > * {
  opacity: 1 !important;
  transform: translate3d(0, 0, 0) !important;
  filter: blur(0) !important;
}

.reveal-cascade.revealed > *:nth-child(1) { transition-delay: 0.1s; }
.reveal-cascade.revealed > *:nth-child(2) { transition-delay: 0.28s; }
.reveal-cascade.revealed > *:nth-child(3) { transition-delay: 0.46s; }
.reveal-cascade.revealed > *:nth-child(4) { transition-delay: 0.64s; }
.reveal-cascade.revealed > *:nth-child(5) { transition-delay: 0.82s; }
.reveal-cascade.revealed > *:nth-child(6) { transition-delay: 1.0s; }
.reveal-cascade.revealed > *:nth-child(7) { transition-delay: 1.18s; }
.reveal-cascade.revealed > *:nth-child(8) { transition-delay: 1.36s; }

/* Respeito à preferência de movimento reduzido */
@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;
  }
  .reveal-init, .reveal-up, .reveal-left, .reveal-right, .reveal-scale, .reveal-blur, .reveal-cascade > * {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
}
