/* ==========================================================================
   GERSON BERTONI — Perícia Judicial e Avaliação Imobiliária
   Design System & Estilos Globais
   Diretriz: Superfície contínua, azul e ouro metálico, sem caixas cinzas
   ========================================================================== */

/* Fontes Locais em WOFF2 (Sem CDN externo, com font-display: swap) */
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/cinzel-700.woff2?v=1.0.0') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/plus-jakarta-sans-variable.woff2?v=1.0.0') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   Variáveis e Tokens da Marca (≥ 5 tons extraídos da foto/marca)
   ========================================================================== */
:root {
  /* Tons de Azul da Marca */
  --bg-deep: #070d18;          /* Fundo contínuo principal */
  --bg-surface: #0c1626;       /* Camada de superfície suave */
  --bg-elevated: #112037;      /* Painel iluminado superiormente */
  --border-subtle: rgba(72, 118, 175, 0.22); /* Arestas discretas */
  --border-highlight: rgba(139, 180, 219, 0.45); /* Aresta de cima iluminada */
  --accent-blue: #8bb4db;      /* Azul claro da camisa / apoio */

  /* Tons de Dourado Ouro Metálico */
  --gold-100: #fae08c;         /* Brilho máximo do metal */
  --gold-200: #e5b858;         /* Ouro nobre intermediário */
  --gold-300: #c89b3c;         /* Ouro base sólido */
  --gold-400: #996d19;         /* Ouro em sombra/profundidade */
  --gold-glow: rgba(229, 184, 88, 0.35); /* Aura e reflexo de luz */

  /* Tipografia & Legibilidade */
  --text-primary: #f0f4f9;
  --text-secondary: #c2d1e4;
  --text-muted: #8fa5c2;

  /* Font Stacks */
  --font-display: 'Cinzel', Georgia, 'Times New Roman', serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Espaçamentos & Raios */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;

  /* Transições Base */
  --ease-tactile: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Reset & Base Respeitando Acessibilidade e Mobile-First
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden !important;
}

body {
  min-height: 100dvh;
  background: radial-gradient(circle at 50% 0%, #0d1b30 0%, var(--bg-deep) 65%);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden !important;
  position: relative;
  isolation: isolate;
  padding-bottom: env(safe-area-inset-bottom);
}

/* Elementos Fixos Globais de Luz (Zero layout shift, zero CPU thrashing) */
.ambient-glow-top {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(1000px, 100vw);
  height: 500px;
  background: radial-gradient(ellipse at 50% 0%, rgba(229, 184, 88, 0.12) 0%, rgba(13, 27, 48, 0.4) 45%, transparent 75%);
  pointer-events: none;
  z-index: -1;
}

/* Canvas 3D de fundo Three.js */
#three-canvas-container {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  transition: opacity 1s var(--ease-tactile);
}

/* Container Estrutural */
.site-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Header & Navegação Institucional
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  padding: 16px 0;
  padding-top: max(16px, env(safe-area-inset-top));
  background: rgba(7, 13, 24, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-monogram {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-surface) 100%);
  border: 1px solid var(--gold-300);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--gold-200);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(250, 224, 140, 0.3);
}

.brand-details {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ffffff;
  line-height: 1.2;
}

.brand-role {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold-200);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--gold-100) 0%, var(--gold-200) 50%, var(--gold-300) 100%);
  border: none;
  border-radius: var(--radius-pill);
  text-decoration: none;
  box-shadow: 0 4px 16px var(--gold-glow);
  transition: transform 0.3s var(--ease-tactile), box-shadow 0.3s var(--ease-tactile);
}

.btn-header-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--gold-glow);
}

/* ==========================================================================
   Botões & Efeito Shiny Sweep Glow
   ========================================================================== */
.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  color: #050911;
  background: linear-gradient(135deg, #fae08c 0%, #e5b858 50%, #c89b3c 100%);
  border: 1px solid rgba(250, 224, 140, 0.6);
  border-radius: var(--radius-pill);
  text-decoration: none;
  overflow: hidden;
  box-shadow: 0 10px 25px var(--gold-glow), 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s var(--ease-tactile), box-shadow 0.3s var(--ease-tactile);
  cursor: pointer;
}

/* Efeito Shiny Sweep Glow: animação usando APENAS transform */
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.6) 50%,
    transparent 100%
  );
  transform: translateX(-100%);
  pointer-events: none;
}

.btn-primary:hover::after {
  animation: shinySweep 0.8s var(--ease-tactile) forwards;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 16px 36px var(--gold-glow), 0 4px 12px rgba(0, 0, 0, 0.5);
}

.btn-primary:active {
  transform: translateY(-1px) scale(0.99);
}

@keyframes shinySweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ==========================================================================
   Hero Section (Primeira Dobra Impecável - Zero Delay, Zero Fila)
   ========================================================================== */
.hero-section {
  padding: 60px 0 80px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 56px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  background: rgba(229, 184, 88, 0.08);
  border: 1px solid rgba(229, 184, 88, 0.28);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gold-100);
  margin-bottom: 24px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-200);
  box-shadow: 0 0 10px var(--gold-100);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.2vw, 3.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #ffffff;
  margin-bottom: 20px;
}

.hero-title .text-gold {
  background: linear-gradient(135deg, #ffffff 0%, var(--gold-100) 40%, var(--gold-200) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline;
}

.hero-description {
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 580px;
  margin-bottom: 32px;
}

.hero-cta-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 460px;
}

.hero-cta-note {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Card Visual do Perito no Hero */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.perito-card-frame {
  position: relative;
  width: 100%;
  max-width: 380px;
  border-radius: var(--radius-lg);
  padding: 16px;
  background: linear-gradient(180deg, rgba(17, 32, 55, 0.7) 0%, rgba(12, 22, 38, 0.95) 100%);
  border: 1px solid var(--border-subtle);
  border-top: 1px solid var(--gold-300);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(229, 184, 88, 0.1);
}

.perito-photo-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 178 / 300;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #09121f;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.perito-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.perito-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 20px 16px;
  background: linear-gradient(180deg, transparent 0%, rgba(7, 13, 24, 0.95) 80%);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.overlay-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
}

.overlay-title {
  font-size: 0.85rem;
  color: var(--gold-100);
  font-weight: 600;
}

/* ==========================================================================
   Superfícies & Seções Contínuas (Sem caixas cinzas, luz superior)
   ========================================================================== */
.section-block {
  padding: 80px 0;
  position: relative;
}

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

.section-kicker {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--gold-200);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Grid de Serviços — Superfície iluminada de cima */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.surface-panel {
  position: relative;
  border-radius: var(--radius-md);
  padding: 36px 28px;
  background: linear-gradient(180deg, rgba(18, 33, 56, 0.6) 0%, rgba(10, 19, 33, 0.85) 100%);
  border: 1px solid rgba(72, 118, 175, 0.22);
  border-top: 1px solid rgba(229, 184, 88, 0.4);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease-tactile), border-color 0.3s var(--ease-tactile);
}

.surface-panel:hover {
  transform: translateY(-4px);
  border-top-color: var(--gold-100);
  border-color: rgba(229, 184, 88, 0.35);
}

.panel-icon-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: rgba(229, 184, 88, 0.1);
  border: 1px solid rgba(229, 184, 88, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-200);
  margin-bottom: 24px;
}

.panel-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 14px;
  line-height: 1.3;
}

.panel-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 20px;
}

.panel-list {
  list-style: none;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 20px;
}

.panel-list li {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.45;
}

.panel-list li svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--gold-200);
}

/* ==========================================================================
   Seção "É Para Mim?" (Públicos e Aplicações Reais)
   ========================================================================== */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.audience-card {
  border-radius: var(--radius-md);
  padding: 32px 24px;
  background: linear-gradient(180deg, rgba(16, 28, 48, 0.5) 0%, rgba(8, 15, 26, 0.9) 100%);
  border: 1px solid var(--border-subtle);
  border-top: 1px solid rgba(139, 180, 219, 0.35);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.audience-target {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold-200);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.audience-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 14px;
}

.audience-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   Seção "Como Funciona" (Etapas Conectadas)
   ========================================================================== */
.steps-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}

.step-card {
  position: relative;
  border-radius: var(--radius-md);
  padding: 28px 22px;
  background: linear-gradient(180deg, rgba(14, 25, 43, 0.6) 0%, rgba(8, 14, 24, 0.95) 100%);
  border: 1px solid var(--border-subtle);
  border-top: 1px solid rgba(229, 184, 88, 0.35);
  display: flex;
  flex-direction: column;
}

.step-badge {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold-100);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.step-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
}

.step-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   Seção de Ação Final (LGPD, Horário, Contato Direto)
   ========================================================================== */
.action-box {
  border-radius: var(--radius-lg);
  padding: 60px 40px;
  background: linear-gradient(180deg, rgba(17, 32, 55, 0.8) 0%, rgba(10, 18, 30, 0.98) 100%);
  border: 1px solid var(--border-subtle);
  border-top: 1px solid var(--gold-200);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6), 0 0 40px rgba(229, 184, 88, 0.08);
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
}

.action-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 16px;
  line-height: 1.25;
}

.action-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 620px;
  margin: 0 auto 32px;
}

.action-cta-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.schedule-note {
  font-size: 0.9rem;
  color: var(--gold-100);
  font-weight: 600;
}

.privacy-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.5;
}

/* ==========================================================================
   Rodapé & Bloqueio de Conformidade CRECI
   ========================================================================== */
.site-footer {
  padding: 60px 0 40px;
  padding-bottom: max(40px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--border-subtle);
  background: #05080f;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  max-width: 380px;
}

.footer-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.footer-role {
  font-size: 0.875rem;
  color: var(--gold-200);
  font-weight: 600;
  margin-bottom: 12px;
}

.footer-schedule {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-social-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-link-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  transition: all 0.3s var(--ease-tactile);
}

.social-link:hover {
  color: var(--gold-100);
  border-color: var(--gold-300);
  background: rgba(229, 184, 88, 0.08);
}

/* Espaço do CRECI preparado (Bloqueio de Conformidade) */
.creci-container {
  margin-top: 16px;
}

.creci-badge {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--gold-200);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Scroll Reveal (Apenas transform e opacity - ZERO layout shift)
   Primeira dobra nasce 100% visível no HTML!
   ========================================================================== */
.reveal-item {
  opacity: 1;
  transform: none;
}

/* Quando JS ativa observer para elementos abaixo da dobra */
.js-loaded .reveal-pending {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-tactile), transform 0.8s var(--ease-tactile);
}

.js-loaded .reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Acessibilidade & Prefers-Reduced-Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
    scroll-behavior: auto !important;
  }
  .btn-primary::after {
    display: none !important;
  }
  #three-canvas-container {
    display: none !important;
  }
  .reveal-item, .reveal-pending {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ==========================================================================
   Responsividade & Varredura Mobile (320px até 1920px)
   ========================================================================== */
@media (max-width: 1024px) {
  .services-grid,
  .audience-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .steps-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .hero-content {
    align-items: center;
  }
  .hero-cta-group {
    align-items: center;
  }
  .services-grid,
  .audience-grid,
  .steps-container {
    grid-template-columns: 1fr;
  }
  .action-box {
    padding: 40px 20px;
  }
  .footer-grid {
    flex-direction: column;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .site-wrapper {
    padding: 0 16px;
  }
  .hero-section {
    padding: 40px 0 60px;
  }
  .hero-title {
    font-size: 2.1rem;
  }
  .btn-primary {
    width: 100%;
    padding: 14px 20px;
  }
  .header-actions .btn-header-cta {
    display: none; /* No mobile estreito, o CTA da hero fica imediatamente visível */
  }
}

/* Varredura ultra estreita 320px */
@media (max-width: 340px) {
  .hero-title {
    font-size: 1.85rem;
  }
  .status-badge {
    font-size: 0.78rem;
    padding: 6px 12px;
  }
}
