/* ============================================================================
   DRA. MIRIAN BENTO — Identidade visual (theme.css)
   ----------------------------------------------------------------------------
   Override de tokens.template.css do kit + nav + footer + whatsapp-pill.
   Estilos POR SEÇÃO vivem em style.css.
   Paleta: branco clean + gradiente bordô suave + acento dourado + CTA verde folha.
   Tipo: Be Vietnam Pro (300/400/500/600) — sem família serif.
   ========================================================================== */

:root {
  /* ════════ 1. PALETA ════════ */
  --ink:           #4A0030;             /* bordô profundo, quase preto */
  --sand:          #FFFFFF;             /* branco clean */
  --cream:         #FCFAFA;             /* off-white com leve rose */
  --muted:         #9C7790;             /* rose dessaturado */
  --body:          #5C003E;             /* texto corrido */
  --accent:        #4C833C;             /* verde folha — CTAs */
  --accent-2:      #3E7B34;             /* verde folha hover */
  --accent-gold:   #C9A961;             /* dourado quente */
  --accent-gold-2: #B89344;             /* dourado hover */
  --surface:       #FAEEF4;             /* cards com leve rose */
  --line:          rgba(92, 0, 62, 0.10);
  --line-strong:   rgba(92, 0, 62, 0.20);

  /* ════════ 2. GRADIENTES ════════ */
  --grad-wine:      linear-gradient(135deg, #5C003E 0%, #9B1D61 100%);
  --grad-wine-deep: linear-gradient(160deg, #380026 0%, #5C003E 60%, #810C55 100%);
  --grad-leaf:        linear-gradient(135deg, #4C833C 0%, #6FA858 100%);
  --grad-leaf-hover:  linear-gradient(135deg, #3E7B34 0%, #5C9650 100%);
  --grad-wine-text:  linear-gradient(135deg, #4A0030 0%, #971A5F 100%);
  --accent-gold-light: #E2C77F;

  /* ════════ 3. TIPOGRAFIA ════════ */
  --font-display: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
  --font-body:    'Be Vietnam Pro', system-ui, -apple-system, sans-serif;

  /* Escala — ajustada pra acessibilidade visual (público 45+) */
  --fs-h1:    clamp(2.4rem, 7.99vw, 4.2rem);
  --fs-h2:    clamp(1.9rem, 6.08vw, 3.2rem);
  --fs-h3:    clamp(1.3rem, 3.05vw, 1.6rem);
  --fs-body:  clamp(1.125rem, 2.08vw, 1.25rem);  /* 18 → 20px (acessibilidade 60+) */
  --fs-lede:  clamp(1.15rem, 2.41vw, 1.35rem);   /* 18.4 → 21.6px */
  --fs-small: 1rem;                              /* 16px */
  --fs-label: 0.85rem;                           /* 13.6px */

  /* ════════ 4. RITMO ════════ */
  --section-py:    clamp(4rem, 8vw, 7rem);
  --container-max: 1200px;
  --container-px:  clamp(1.25rem, 4vw, 2.5rem);

  /* ════════ 5. RAIOS ════════ */
  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   20px;
  --radius-xl:   28px;
  --radius-pill: 999px;

  /* ════════ 6. SOMBRAS ════════ */
  --shadow-sm:   0 2px 10px rgba(92, 0, 62, 0.06);
  --shadow-md:   0 12px 32px rgba(92, 0, 62, 0.10);
  --shadow-lg:   0 24px 60px rgba(92, 0, 62, 0.14);
  --shadow-leaf: 0 12px 28px rgba(76, 131, 60, 0.25);

  /* ════════ 7. TRANSIÇÕES ════════ */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast:   180ms;
  --t-base:   320ms;
  --t-slow:   560ms;
}

/* ════════ 8. BASE ════════ */
html, body {
  background: var(--sand);
  color: var(--body);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.7;
  /* overflow-x: clip — corta overflow horizontal SEM criar scroll container.
     CRÍTICO: overflow-x: hidden quebra position: sticky em descendants. */
  overflow-x: clip;
  max-width: 100%;
}

::selection {
  background: var(--accent-gold);
  color: var(--ink);
}

body.menu-open { overflow: hidden; }

/* Skip-to-content — acessibilidade keyboard */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: top var(--t-fast) var(--ease-out);
}
.skip-link:focus-visible { top: 1rem; }

/* Tipografia geral */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.15;
  font-weight: 400;
}

strong, b { font-weight: 500; color: var(--ink); }
em {
  /* Sem itálico — ênfase via cor dourada + peso médio */
  font-style: normal;
  color: var(--accent-gold);
  font-weight: 500;
}

.gold { color: var(--accent-gold); font-weight: 500; }

/* ════════ 8b. FOCUS UNIVERSAL — on-brand, acessível ════════ */
*:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 3px;
  border-radius: 4px;
}
.cta-button:focus-visible,
.mobile-menu-cta:focus-visible,
.nav-cta:focus-visible {
  outline-offset: 4px;
}
.abordagem:focus-visible {
  outline-offset: -2px;
  border-radius: var(--radius-xl);
}

/* ════════ 9. SECTION HEADER (overrides do primitive) ════════ */
.section-header { margin-bottom: clamp(2.25rem, 4vw, 3.5rem); }
.section-header-center { margin-inline: auto; text-align: center; }
.section-header-center .section-label {
  justify-content: center;
  display: inline-flex;
}

.section-label {
  color: var(--accent-gold);
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.22em;
}
.section-label .label-line {
  background: var(--accent-gold);
  opacity: 0.7;
}

.section-title {
  font-weight: 400;
  font-size: var(--fs-h2);
}

.section-caption {
  color: var(--body);
  font-size: var(--fs-lede);
  max-width: 60ch;
  line-height: 1.55;
}
.section-header-center .section-caption { margin-inline: auto; }

/* ════════ 10. CTA BUTTONS (override do primitive) ════════ */
.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  background: var(--grad-leaf);
  color: #fff;
  padding: 1rem 1.75rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.01em;
  box-shadow: var(--shadow-leaf);
  white-space: nowrap;
  transition: transform var(--t-base) var(--ease-out),
              box-shadow var(--t-base) var(--ease-out),
              background var(--t-base) var(--ease-out);
}
.cta-button:hover {
  background: var(--grad-leaf-hover);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(76, 131, 60, 0.35);
}
.cta-button:active { transform: translateY(0); }

.cta-large {
  padding: 1.15rem 2rem;
  font-size: 1.05rem;
}

.cta-solid {
  background: var(--accent);
  box-shadow: 0 10px 24px rgba(76, 131, 60, 0.22);
}
.cta-solid:hover {
  background: var(--accent-2);
  box-shadow: 0 14px 32px rgba(76, 131, 60, 0.32);
}

.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  padding-block: 0.5rem;
  border-bottom: 1px solid transparent;
  transition: color var(--t-fast) var(--ease-out),
              gap var(--t-base) var(--ease-out),
              border-color var(--t-fast) var(--ease-out);
}
.cta-link:hover {
  color: var(--accent);
  gap: 0.85rem;
  border-bottom-color: var(--accent);
}
.cta-link svg { transition: transform var(--t-base) var(--ease-out); }
.cta-link:hover svg { transform: translateX(3px); }

/* ════════ 11. NAV ════════ */
.nav-wrapper {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(251, 249, 253, 0.75);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid rgba(74, 0, 48, 0.04);
  transition: transform var(--t-base) var(--ease-out),
              background var(--t-base) var(--ease-out),
              backdrop-filter var(--t-base) var(--ease-out),
              border-color var(--t-base) var(--ease-out),
              box-shadow var(--t-base) var(--ease-out);
}
.nav-wrapper.scrolled {
  background: rgba(251, 249, 253, 0.95);
  backdrop-filter: saturate(200%) blur(24px);
  -webkit-backdrop-filter: saturate(200%) blur(24px);
  border-bottom-color: rgba(74, 0, 48, 0.10);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 12px 32px rgba(74, 0, 48, 0.10);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav-wrapper { background: rgba(251, 249, 253, 0.92); }
  .nav-wrapper.scrolled { background: rgba(251, 249, 253, 0.98); }
}
.nav-wrapper.nav-hidden { transform: translateY(-100%); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
}
.brand-logo {
  display: block;
  height: 40px;
  width: auto;
  max-width: 100%;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.nav-links li a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.55rem 0.95rem;
  color: var(--body);
  font-size: 1rem;
  font-weight: 400;
  border-radius: var(--radius-pill);
  transition: color var(--t-fast) var(--ease-out),
              background var(--t-fast) var(--ease-out);
}
.nav-links li a:hover {
  color: var(--ink);
  background: var(--surface);
}

.nav-links li .nav-cta {
  background: var(--grad-leaf);
  color: #fff;
  padding: 0.6rem 1.1rem;
  margin-left: 0.6rem;
  font-weight: 500;
}
.nav-links li .nav-cta:hover {
  background: var(--grad-leaf-hover);
  color: #fff;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.75rem;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(201, 169, 97, 0.15);
  position: relative;
  z-index: 101;
  background: transparent;
  border: 0;
}
.nav-toggle > * { pointer-events: none; }
.nav-toggle .bar {
  width: 24px;
  height: 1.6px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--t-base) var(--ease-out),
              opacity var(--t-base) var(--ease-out);
}
.nav-toggle.is-open .bar-1 { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open .bar-2 { opacity: 0; }
.nav-toggle.is-open .bar-3 { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile menu overlay ─────────────────────────────────────── */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--grad-wine-deep);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px);
  transition: opacity var(--t-base) var(--ease-out),
              transform var(--t-base) var(--ease-out);
}
.mobile-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.mobile-menu-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  min-width: 44px;
  min-height: 44px;
  color: #fff;
  font-size: 2.5rem;
  font-weight: 300;
  line-height: 1;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  text-align: center;
}
.mobile-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.6rem 1.5rem;
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 300;
  letter-spacing: -0.01em;
}
.mobile-menu-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 1.25rem;
  background: var(--grad-leaf);
  color: #fff;
  padding: 0.95rem 2rem;
  border-radius: var(--radius-pill);
  font-weight: 500;
  font-size: 1rem;
}

/* ════════ 12. FOOTER ════════ */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.7);
  padding-block: clamp(2.5rem, 5vw, 4rem) 1.75rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem 3rem;
  align-items: center;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}
.footer-logo {
  display: block;
  height: 96px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}
.footer-sub {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.65);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: flex-end;
}
.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1rem;
  transition: color var(--t-fast) var(--ease-out);
}
.footer-nav a:hover { color: var(--accent-gold); }

.footer-copy {
  grid-column: 1 / -1;
  padding-top: 1.5rem;
  margin-top: 1rem;
  padding-right: clamp(4rem, 8vw, 7rem);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.02em;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
}
.footer-credit {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.45);
}
.footer-credit a {
  color: var(--accent-gold);
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color var(--t-fast) var(--ease-out);
}
.footer-credit a:hover { color: var(--accent-gold-light); }

@media (max-width: 960px) {
  .footer-copy {
    align-items: center;
    text-align: center;
    padding-right: 0;
  }
}

/* ════════ 13. WHATSAPP PILL FLUTUANTE ════════ */
.whatsapp-pill {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.5rem 1.1rem 0.5rem 0.5rem;
  min-height: 48px;
  background: #fff;
  border: 1px solid rgba(74, 0, 48, 0.08);
  border-radius: 999px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 8px 24px rgba(74, 0, 48, 0.10),
    0 24px 48px rgba(74, 0, 48, 0.08);
  color: var(--ink);
  transition: transform var(--t-base) var(--ease-out),
              box-shadow var(--t-base) var(--ease-out),
              border-color var(--t-base) var(--ease-out);
}
.whatsapp-pill:hover {
  transform: translateY(-2px);
  border-color: rgba(76, 131, 60, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 12px 32px rgba(74, 0, 48, 0.14),
    0 32px 56px rgba(74, 0, 48, 0.10);
}

.pill-avatar {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  border: 1px solid rgba(74, 0, 48, 0.08);
  border-radius: 50%;
  overflow: hidden;
}
.pill-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.pill-content {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  gap: 0.15rem;
}
.pill-content strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.pill-content small {
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.pill-icon {
  display: inline-flex;
  color: var(--accent);
  margin-left: 0.15rem;
}

@media (max-width: 560px) {
  .whatsapp-pill {
    padding: 0.4rem 0.55rem 0.4rem 0.4rem;
    gap: 0.4rem;
    bottom: 1rem;
    right: 1rem;
  }
  .whatsapp-pill .pill-content { display: none; }
  .pill-avatar { width: 38px; height: 38px; }
  .pill-icon svg { width: 18px; height: 18px; }
}

/* ════════ 13b. STICKY CTA BOTTOM ════════ */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 95;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 32px rgba(74, 0, 48, 0.10);
  padding: 0.75rem clamp(1rem, 4vw, 2rem) calc(0.75rem + env(safe-area-inset-bottom));
  opacity: 0;
  transform: translateY(100%);
  pointer-events: none;
  transition: opacity var(--t-base) var(--ease-out),
              transform var(--t-base) var(--ease-out);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .sticky-cta { background: rgba(255, 255, 255, 0.98); }
}
.sticky-cta.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.sticky-cta-inner {
  max-width: var(--container-max);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.sticky-cta-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.2;
  min-width: 0;
  flex: 1;
}
.sticky-cta-text strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  color: var(--ink);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sticky-cta-text small {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 400;
}
.sticky-cta-button {
  flex-shrink: 0;
  min-height: 44px;
  padding: 0.7rem 1.2rem;
  font-size: 0.95rem;
}

/* Quando sticky ativo, esconde whatsapp-pill (evita stacking) */
body.sticky-active .whatsapp-pill { display: none; }

@media (max-width: 480px) {
  .sticky-cta-text small { display: none; }
  .sticky-cta-text strong { font-size: 0.92rem; }
  .sticky-cta-button { padding: 0.6rem 1rem; font-size: 0.88rem; }
}

@media (prefers-reduced-motion: reduce) {
  .sticky-cta { transition: opacity var(--t-fast) linear; transform: none; }
  .sticky-cta:not(.is-visible) { transform: none; }
}

/* ════════ 14. DEFENSIVE — sem JS, conteúdo aparece ════════ */
html:not(.js-ready) [data-reveal],
html:not(.js-ready) [data-reveal-words] .word-inner,
html:not(.js-ready) [data-reveal-stagger] > * {
  opacity: 1;
  transform: none;
}

/* ════════ 15. STAGGER REVEAL ════════ */
[data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
}
[data-reveal-stagger] [data-reveal] {
  opacity: 1;
  transform: none;
  transition: none;
}
[data-reveal-stagger].is-visible > * {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal-stagger].is-visible > *:nth-child(1) { transition-delay:   0ms; }
[data-reveal-stagger].is-visible > *:nth-child(2) { transition-delay:  70ms; }
[data-reveal-stagger].is-visible > *:nth-child(3) { transition-delay: 140ms; }
[data-reveal-stagger].is-visible > *:nth-child(4) { transition-delay: 210ms; }
[data-reveal-stagger].is-visible > *:nth-child(5) { transition-delay: 280ms; }
[data-reveal-stagger].is-visible > *:nth-child(6) { transition-delay: 350ms; }
[data-reveal-stagger].is-visible > *:nth-child(7) { transition-delay: 420ms; }
[data-reveal-stagger].is-visible > *:nth-child(8) { transition-delay: 490ms; }
[data-reveal-stagger].is-visible > *:nth-child(9) { transition-delay: 560ms; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal-stagger] > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ════════ 16. WORD-BY-WORD REVEAL ════════ */
[data-reveal-words] .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  margin-right: 0;
  padding: 0.08em 0.12em 0.08em 0;
  text-align: left;
}
[data-reveal-words] .word-inner {
  display: inline-block;
  opacity: 0;
  transform: translateY(110%);
  transition:
    opacity var(--t-slow) var(--ease-out),
    transform var(--t-slow) var(--ease-out);
  transition-delay: calc(var(--i, 0) * 60ms);
  will-change: transform, opacity;
}
[data-reveal-words].is-visible .word-inner {
  opacity: 1;
  transform: translateY(0);
}

/* ════════ 17. PRINT ════════ */
@media print {
  .nav-wrapper,
  .mobile-menu,
  .whatsapp-pill,
  .sticky-cta,
  .cta-button,
  .cta-link { display: none !important; }
  body { color: #000; background: #fff; }
}

/* ════════ 18. RESPONSIVO — toggle nav mobile ════════ */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
}
