/* ==========================================================================
   Gontijo e Marçal Advocacia — Landing Page Trabalhista
   Complementa o Tailwind (CDN). Mobile-first.
   Escala de espaçamento: 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 / 96 px
   ========================================================================== */

:root {
  --navy: #00223d;
  --navy-deep: #001a30;
  --gold: #b69b7c;
  --gold-soft: #d6c3ab;
  --ink: #161616;
  --cream: #f9f5f2;
  --taupe: #756656;
  --wa: #25d366;

  /* Altura da barra fixa de CTA no mobile: 12px + 56px + 12px + safe-area */
  --cta-bar-h: calc(80px + env(safe-area-inset-bottom, 0px));
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: "Lato", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background-color: var(--cream);
  overflow-x: hidden;
  /* Impede que a barra fixa de CTA cubra o fim da página no mobile */
  padding-bottom: var(--cta-bar-h);
}

@media (min-width: 1024px) {
  body { padding-bottom: 0; }
}

.font-serif { font-family: "EB Garamond", Georgia, serif; }

::selection { background: var(--gold); color: #fff; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--taupe); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--navy); }

/* Foco visível consistente em toda a página */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Link de pular para o conteúdo (acessibilidade) */
.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  background: var(--cream);
  color: var(--navy);
  font-weight: 700;
  padding: 12px 16px;
  border-radius: 8px;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 16px; }

/* --------------------------------------------------------------------------
   HERO
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(120% 90% at 80% -10%, rgba(182, 155, 124, 0.22), transparent 55%),
    radial-gradient(90% 70% at 0% 0%, rgba(117, 102, 86, 0.25), transparent 50%),
    linear-gradient(160deg, #00223d 0%, #012b4d 45%, #001a30 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(80% 80% at 50% 30%, #000 30%, transparent 100%);
          mask-image: radial-gradient(80% 80% at 50% 30%, #000 30%, transparent 100%);
}

.hero-glow {
  position: absolute;
  bottom: -8%;
  left: 50%;
  transform: translateX(-50%);
  width: min(88%, 520px);
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(182, 155, 124, 0.32), transparent 65%);
  filter: blur(20px);
  z-index: -1;
  pointer-events: none;
}

.hero-photo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: bottom center;
  -webkit-mask-image: linear-gradient(to bottom, #000 84%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 84%, transparent 100%);
}

.floating-badge {
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  background: rgba(249, 245, 242, 0.94);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.55);
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
.animate-floaty { animation: floaty 5s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .animate-floaty { animation: none; }
}

/* --------------------------------------------------------------------------
   REVELAÇÃO NO SCROLL
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* --------------------------------------------------------------------------
   CARDS DE SITUAÇÃO (clicáveis → WhatsApp)
   -------------------------------------------------------------------------- */
.case-card {
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
@media (hover: hover) {
  .case-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 44px -26px rgba(0, 34, 61, 0.42);
    border-color: rgba(182, 155, 124, 0.7);
  }
}
.case-card:active { transform: translateY(0) scale(0.99); }
@media (prefers-reduced-motion: reduce) {
  .case-card, .case-card:hover, .case-card:active { transform: none; transition: none; }
}

/* --------------------------------------------------------------------------
   CARROSSEL DE AVALIAÇÕES (estilo Google)
   -------------------------------------------------------------------------- */
.reviews-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 8px 4px 24px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.reviews-track::-webkit-scrollbar { display: none; }

.review-card {
  scroll-snap-align: start;
  flex: 0 0 86%;
}
@media (min-width: 640px)  { .review-card { flex-basis: 47%; } }
@media (min-width: 1024px) { .review-card { flex-basis: 31.5%; } }

@media (prefers-reduced-motion: reduce) {
  .reviews-track { scroll-behavior: auto; }
}

.clamp-5 {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   FAQ (details/summary nativo, acessível por teclado)
   -------------------------------------------------------------------------- */
.faq-item summary { list-style: none; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { content: ""; }

.faq-item .faq-chevron { transition: transform 0.25s ease; }
.faq-item[open] .faq-chevron { transform: rotate(180deg); }

@media (prefers-reduced-motion: reduce) {
  .faq-item .faq-chevron { transition: none; }
}

/* --------------------------------------------------------------------------
   BARRA FIXA DE CTA (mobile)
   -------------------------------------------------------------------------- */
.cta-bar {
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -10px 30px -12px rgba(0, 0, 0, 0.35);
}

/* Botão WhatsApp flutuante (desktop) */
.wa-float {
  box-shadow: 0 12px 30px -8px rgba(37, 211, 102, 0.6);
  transition: transform 0.2s ease;
}
@media (hover: hover) {
  .wa-float:hover { transform: scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
  .wa-float { transition: none; }
  .wa-float:hover { transform: none; }
}

/* Pulso discreto no CTA principal */
@keyframes softpulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(182, 155, 124, 0.45); }
  70%      { box-shadow: 0 0 0 14px rgba(182, 155, 124, 0); }
}
.cta-pulse { animation: softpulse 2.6s ease-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .cta-pulse { animation: none; }
}

/* Números tabulares para contadores e dados */
.tnum { font-variant-numeric: tabular-nums; }
