/* ==========================================================================
   Scarppati & Barboza Advocacia
   Custom styles complementing Tailwind CSS (loaded via CDN).
   ========================================================================== */

:root {
  --brand-50:  #F4F7F8;
  --brand-100: #E8EEF1;
  --brand-300: #90A8B3;
  --brand-500: #1F4E5F;
  --brand-700: #143246;
  --brand-900: #0B1F2A;
  --gold-100:  #E8D4A2;
  --gold-300:  #D9B978;
  --gold-500:  #B8893E;
  --cream:     #FAFAF6;
  --whatsapp:  #25D366;
}

html { scroll-behavior: smooth; }
body { font-feature-settings: "ss01", "cv11"; -webkit-text-size-adjust: 100%; }

/* Garante imagens fluidas e impede overflow horizontal em mobile */
img, svg, video, iframe { max-width: 100%; height: auto; }
html, body { overflow-x: hidden; }

/* Display tweaks */
.font-display { letter-spacing: -0.01em; }
.font-display em { font-style: italic; color: var(--gold-500); }

/* Decorative elements */
.gold-line {
  display: inline-block;
  height: 2px;
  width: 48px;
  background: var(--gold-500);
  vertical-align: middle;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gold-500);
}

/* Hero background — deep navy with subtle teal gradient */
.hero-bg {
  background:
    radial-gradient(80% 60% at 0% 100%, rgba(31, 78, 95, 0.35), transparent 55%),
    linear-gradient(180deg, #0B1F2A 0%, #0F2A38 55%, #0B1F2A 100%);
}

.hero-grain::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 3px 3px;
  pointer-events: none;
  opacity: 0.7;
}

/* Section subtle background pattern */
.bg-pattern {
  background-image:
    radial-gradient(circle at 18% 12%, rgba(184, 137, 62, 0.06), transparent 35%),
    radial-gradient(circle at 82% 88%, rgba(31, 78, 95, 0.07), transparent 40%);
}

/* Card hover */
.card-hover {
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background-color .25s ease;
  will-change: transform;
}
.card-hover:hover {
  transform: translateY(-3px);
  border-color: var(--gold-300);
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--whatsapp);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.28);
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 10px 28px rgba(37, 211, 102, 0.36); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  background: transparent;
  color: var(--brand-900);
  border: 1px solid var(--brand-900);
  font-weight: 600;
  transition: background .2s ease, color .2s ease;
}
.btn-secondary:hover { background: var(--brand-900); color: var(--cream); }

.btn-ghost-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-weight: 500;
  backdrop-filter: blur(6px);
  transition: background .2s ease, border-color .2s ease;
}
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.32); }

/* Header */
[data-header] {
  transition: background-color .25s ease, box-shadow .25s ease, backdrop-filter .25s ease;
  padding-top: env(safe-area-inset-top);
}
[data-header].is-scrolled {
  background-color: rgba(11, 31, 42, 0.92);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  backdrop-filter: saturate(140%) blur(8px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04), 0 8px 24px rgba(0,0,0,0.18);
}

/* Dropdown menu in header (Áreas de atuação) — opens on click */
.dropdown-panel {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .18s ease, visibility .18s ease, transform .18s ease;
  pointer-events: none;
}
[data-dropdown].is-open .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.dropdown-chevron {
  transition: transform .2s ease;
}
[data-dropdown].is-open .dropdown-chevron {
  transform: rotate(180deg);
}

/* Floating WhatsApp button */
.fab-whatsapp {
  position: fixed;
  bottom: calc(22px + env(safe-area-inset-bottom));
  right: calc(22px + env(safe-area-inset-right));
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px 14px 16px;
  background: var(--whatsapp);
  color: #fff;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.35);
  text-decoration: none;
}
.fab-whatsapp .fab-label { display: inline-block; }
@media (max-width: 480px) {
  .fab-whatsapp .fab-label { display: none; }
  .fab-whatsapp { padding: 14px; }
}

/* WhatsApp pulse */
@keyframes wpulse {
  0%,100% { box-shadow: 0 12px 30px rgba(37,211,102,0.35), 0 0 0 0 rgba(37,211,102,0.45); }
  50%     { box-shadow: 0 12px 30px rgba(37,211,102,0.35), 0 0 0 14px rgba(37,211,102,0); }
}
@media (prefers-reduced-motion: no-preference) {
  .wpulse { animation: wpulse 2.6s infinite; }
}

/* FAQ accordion */
details.acc { border-bottom: 1px solid rgba(11,31,42,0.10); }
details.acc > summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--brand-900);
}
details.acc > summary::-webkit-details-marker { display: none; }
details.acc[open] .acc-icon { transform: rotate(45deg); }
.acc-icon { transition: transform .25s ease; flex: 0 0 auto; color: var(--gold-500); }
details.acc .acc-body { padding: 0 0 22px 0; color: rgb(55, 65, 81); line-height: 1.7; max-width: 70ch; }

/* Subtle entrance animation (only when supported and motion-safe) */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .6s ease, transform .6s ease;
  }
  .reveal.is-in { opacity: 1; transform: translateY(0); }
}

/* Utility: responsive max content width */
.container-tight { max-width: 1180px; margin-inline: auto; padding-inline: 1.25rem; }

/* Number ticker style */
.metric { font-family: "Playfair Display", Georgia, serif; font-weight: 600; letter-spacing: -0.02em; }

/* Marquee-like quote highlight */
.quote-mark {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 3.5rem;
  line-height: 0.8;
  color: var(--gold-500);
  display: block;
}
@media (min-width: 640px) {
  .quote-mark { font-size: 5rem; }
}

/* Print */
@media print {
  .fab-whatsapp, [data-header] { display: none !important; }
  body { background: #fff; color: #000; }
}
