/* ============================================================
   OMNI PREV — Estilos personalizados (complemento ao Tailwind)
   Paleta: #071D3D (azul-marinho) · #B98737 (dourado) · #FFFFFF
           #F5F6F8 · #E5E6EA · #4B4F5C
   ============================================================ */

:root {
  --navy: #071d3d;
  --navy-light: #0e2f5c;
  --gold: #b98737;
  --gold-light: #c7953d;
  --gold-lighter: #d1a34b;
  --gold-dark: #a9772e;
  --cloud: #f5f6f8;
  --mist: #e5e6ea;
  --ink-soft: #4b4f5c;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  color: var(--ink-soft);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Acessibilidade ---------- */

/* Indicador de foco visível e consistente (WCAG 2.4.7) */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Link "pular para o conteúdo" */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--navy);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 0.5rem 0.5rem;
  font-weight: 600;
}
.skip-link:focus {
  left: 1rem;
}

/* Respeito a prefers-reduced-motion (WCAG 2.3.3) */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---------- Animações de entrada (leves) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Grafismos da marca (baixa opacidade) ---------- */
.brand-arc {
  position: absolute;
  border-radius: 9999px;
  border: 1.5px solid var(--navy);
  opacity: 0.06;
  pointer-events: none;
}
.brand-arc--gold {
  border-color: var(--gold);
  opacity: 0.14;
}
.brand-dots {
  position: absolute;
  opacity: 0.5;
  pointer-events: none;
}

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border: 1px solid var(--mist);
  border-radius: 1rem;
  box-shadow: 0 1px 2px rgb(7 29 61 / 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease,
    border-color 0.25s ease;
}
.card:hover,
.card:focus-within {
  transform: translateY(-4px);
  border-color: var(--gold-lighter);
  box-shadow: 0 12px 28px rgb(7 29 61 / 0.1);
}

/* ---------- Botões "liquid" ----------
   O preenchimento sobe como uma onda a partir da base ao passar o mouse
   (ou ao receber foco pelo teclado). O conteúdo fica acima do preenchimento.
   Cada variante tem contraste adequado nos dois estados. */
.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  border-radius: 0.75rem;
  padding: 0.875rem 1.75rem;
  min-height: 48px; /* área de toque adequada */
  transition: color 0.35s ease, border-color 0.35s ease,
    box-shadow 0.3s ease, transform 0.3s ease;
}

/* Onda de preenchimento */
.btn::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -10%;
  right: -10%;
  bottom: 0;
  height: 150%;
  background: var(--btn-fill, var(--gold));
  border-radius: 50% 50% 0 0 / 22% 22% 0 0;
  transform: translateY(101%);
  transition: transform 0.55s cubic-bezier(0.65, 0, 0.35, 1),
    border-radius 0.55s cubic-bezier(0.65, 0, 0.35, 1);
}
.btn:hover::before,
.btn:focus-visible::before,
.btn:active::before {
  transform: translateY(0);
  border-radius: 0;
}
.btn:hover,
.btn:focus-visible {
  color: var(--btn-fill-text, var(--navy));
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(0);
}

/* Primário: azul-marinho → preenchimento dourado com texto azul-marinho */
.btn-primary {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 4px 14px rgb(7 29 61 / 0.22);
  --btn-fill: var(--gold-light);
  --btn-fill-text: var(--navy);
}
.btn-primary:hover,
.btn-primary:focus-visible {
  box-shadow: 0 10px 24px rgb(185 135 55 / 0.32);
}

/* Secundário: branco → preenchimento azul-marinho com texto branco */
.btn-secondary {
  background: #fff;
  color: var(--navy);
  border: 1.5px solid var(--navy);
  --btn-fill: var(--navy);
  --btn-fill-text: #fff;
}
.btn-secondary:hover,
.btn-secondary:focus-visible {
  box-shadow: 0 10px 24px rgb(7 29 61 / 0.18);
}
/* Ícones internos acompanham a cor do texto no hover */
.btn-secondary:hover svg,
.btn-secondary:focus-visible svg {
  color: #fff;
}

/* Dourado: dourado → preenchimento azul-marinho com texto branco */
.btn-gold {
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 4px 14px rgb(185 135 55 / 0.3);
  --btn-fill: var(--navy);
  --btn-fill-text: #fff;
}
.btn-gold:hover,
.btn-gold:focus-visible {
  box-shadow: 0 10px 24px rgb(7 29 61 / 0.3);
}

/* Contorno claro (sobre fundo escuro): → preenchimento branco, texto marinho */
.btn-ghost-light {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgb(255 255 255 / 0.55);
  --btn-fill: #fff;
  --btn-fill-text: var(--navy);
}
.btn-ghost-light:hover,
.btn-ghost-light:focus-visible {
  border-color: #fff;
}

/* Sem animação: preenchimento imediato, mantendo o estado visual */
@media (prefers-reduced-motion: reduce) {
  .btn::before {
    transition: none;
  }
  .btn:hover,
  .btn:focus-visible {
    transform: none;
  }
}

/* ---------- Header ---------- */
.site-header {
  transition: box-shadow 0.25s ease, background-color 0.25s ease;
}
.site-header.is-scrolled {
  box-shadow: 0 4px 20px rgb(7 29 61 / 0.08);
}

/* Sublinhado dourado nos links de navegação */
.nav-link {
  position: relative;
  color: var(--navy);
  font-weight: 500;
  padding: 0.5rem 0;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-link:hover::after,
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

/* ---------- Links em texto corrido ---------- */
.prose-link {
  color: var(--navy);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.prose-link:hover {
  color: var(--gold-dark);
}

/* ---------- Glassmorphism discreto (pontos específicos) ---------- */
.glass {
  background: rgb(255 255 255 / 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgb(229 230 234 / 0.9);
}

/* ---------- Timeline "Como funciona" ---------- */
.timeline-step {
  position: relative;
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background: #fff;
  border: 2px solid var(--gold);
  color: var(--gold-dark);
  font-weight: 700;
  font-size: 1.125rem;
  flex-shrink: 0;
}

/* ---------- FAQ (details/summary acessível) ---------- */
.faq-item {
  border: 1px solid var(--mist);
  border-radius: 0.875rem;
  background: #fff;
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.125rem 1.25rem;
  font-weight: 600;
  color: var(--navy);
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary .faq-icon {
  flex-shrink: 0;
  transition: transform 0.25s ease;
  color: var(--gold);
}
.faq-item[open] summary .faq-icon {
  transform: rotate(45deg);
}
.faq-item .faq-body {
  padding: 0 1.25rem 1.25rem;
  color: var(--ink-soft);
  line-height: 1.7;
}

/* ---------- Formulários ---------- */
.field-label {
  display: block;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.375rem;
  font-size: 0.9375rem;
}
.field-input {
  width: 100%;
  background: var(--cloud);
  border: 1.5px solid var(--mist);
  border-radius: 0.625rem;
  padding: 0.75rem 1rem;
  min-height: 48px;
  color: #1f2430;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgb(185 135 55 / 0.18);
  background: #fff;
}
.field-error {
  display: none;
  color: #b3261e;
  font-size: 0.875rem;
  margin-top: 0.375rem;
}
.field-input[aria-invalid="true"] {
  border-color: #b3261e;
}
.field-input[aria-invalid="true"] ~ .field-error {
  display: block;
}

/* ---------- Banner de cookies ---------- */
.cookie-banner {
  position: fixed;
  inset-inline: 1rem;
  bottom: 1rem;
  z-index: 80;
  max-width: 42rem;
  margin-inline: auto;
  transform: translateY(150%);
  transition: transform 0.4s ease;
}
.cookie-banner.is-visible {
  transform: translateY(0);
}

/* Toggle de consentimento */
.consent-toggle {
  position: relative;
  width: 3rem;
  height: 1.625rem;
  border-radius: 9999px;
  background: var(--mist);
  transition: background 0.2s ease;
  flex-shrink: 0;
  border: none;
  cursor: pointer;
}
.consent-toggle[aria-checked="true"] {
  background: var(--navy);
}
.consent-toggle::after {
  content: "";
  position: absolute;
  top: 0.1875rem;
  left: 0.1875rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  background: #fff;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.25);
}
.consent-toggle[aria-checked="true"]::after {
  transform: translateX(1.375rem);
}
.consent-toggle:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ---------- Botão flutuante de WhatsApp ---------- */
.wa-float {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 70;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgb(7 29 61 / 0.3);
  transition: transform 0.2s ease, background 0.2s ease;
}
.wa-float:hover {
  transform: scale(1.06);
  background: var(--navy-light);
}
.wa-float .wa-ring {
  position: absolute;
  inset: -4px;
  border-radius: 9999px;
  border: 2px solid var(--gold);
  opacity: 0.55;
}

/* ---------- Menu mobile ---------- */
.mobile-menu {
  transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
  transform: translateX(100%);
  opacity: 0;
  visibility: hidden;
}
.mobile-menu.is-open {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
}

/* ---------- Tipografia auxiliar ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dark);
}
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

/* Divisórias suaves no rodapé */
.footer-divider {
  border-color: rgb(255 255 255 / 0.12);
}

/* Impressão */
@media print {
  .site-header,
  .wa-float,
  .cookie-banner,
  footer nav {
    display: none !important;
  }
}
