:root {
  --page-bg: #ffffff;
  --header-bg: rgba(255,255,255,.96);
  --header-shadow: 0 5px 22px rgba(18,58,86,.07);
  --theme-pill-bg: rgba(245, 242, 250, .92);
  --theme-pill-border: #d8cdee;
  --theme-btn-color: #5a4d72;
  --theme-btn-hover-bg: rgba(132,56,232,.12);
  --theme-btn-active-bg: #8438E8;
  --theme-btn-active-color: #ffffff;
  --whatsapp: #25D366;
}

html { color-scheme: light; }
body { background: var(--page-bg); }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.hdr { justify-content: space-between; }
.nav { margin-left: auto; }
.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
  flex: 0 0 auto;
}

.theme-switcher {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--theme-pill-border);
  border-radius: 999px;
  background: var(--theme-pill-bg);
  box-shadow: 0 8px 20px rgba(20,14,34,.06);
  backdrop-filter: blur(12px);
}
.theme-btn {
  position: relative;
  width: 33px;
  height: 33px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--theme-btn-color);
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}
.theme-btn:hover {
  background: var(--theme-btn-hover-bg);
  transform: translateY(-1px);
}
.theme-btn.is-active,
.theme-btn[aria-pressed="true"] {
  background: var(--theme-btn-active-bg);
  color: var(--theme-btn-active-color);
  box-shadow: 0 10px 20px rgba(132,56,232,.2);
}
.theme-btn i {
  font-size: .92rem;
  line-height: 1;
}

.theme-auto-icon {
  position: relative;
  width: 18px;
  height: 18px;
  border: 1.8px solid currentColor;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .60rem;
  font-weight: 800;
  line-height: 1;
}
.theme-auto-icon::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background:
    linear-gradient(currentColor 0 0) top center / 1.5px 5px no-repeat,
    linear-gradient(currentColor 0 0) bottom center / 1.5px 5px no-repeat,
    linear-gradient(currentColor 0 0) center left / 5px 1.5px no-repeat,
    linear-gradient(currentColor 0 0) center right / 5px 1.5px no-repeat,
    linear-gradient(currentColor 0 0) 16% 16% / 4px 1.5px no-repeat,
    linear-gradient(currentColor 0 0) 84% 16% / 4px 1.5px no-repeat,
    linear-gradient(currentColor 0 0) 16% 84% / 4px 1.5px no-repeat,
    linear-gradient(currentColor 0 0) 84% 84% / 4px 1.5px no-repeat;
  opacity: .95;
  pointer-events: none;
}


.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 995;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(180deg, #35df79, var(--whatsapp));
  box-shadow: 0 18px 32px rgba(37, 211, 102, .32);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.whatsapp-float:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 22px 38px rgba(37, 211, 102, .38);
  filter: saturate(1.04);
}
.whatsapp-float i {
  font-size: 2rem;
  line-height: 1;
}
.whatsapp-float::after {
  content: attr(data-label);
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  padding: 8px 11px;
  border-radius: 999px;
  color: #fff;
  background: rgba(20,14,34,.88);
  font-size: .82rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity .18s ease, transform .18s ease;
}
.whatsapp-float:hover::after,
.whatsapp-float:focus-visible::after {
  opacity: 1;
  transform: translateY(-50%) translateX(-2px);
}

html[data-theme-resolved="dark"] {
  --page-bg: #100B1B;
  --navy: #F5F2FA;
  --navy-dark: #ffffff;
  --blue: #C7A4FF;
  --cyan: #A875FF;
  --cyan-soft: #1C1430;
  --ink: #F5F2FA;
  --muted: #D6CCE5;
  --line: #382A4F;
  --surface: #100B1B;
  --surface-alt: #181126;
  --success: #A875FF;
  --shadow-sm: 0 12px 28px rgba(0,0,0,.3);
  --shadow-md: 0 24px 48px rgba(0,0,0,.35);
  --header-bg: rgba(20,14,34,.94);
  --header-shadow: 0 12px 30px rgba(0,0,0,.28);
  --theme-pill-bg: rgba(34, 23, 49, .9);
  --theme-pill-border: #4B3968;
  --theme-btn-color: #F5F2FA;
  --theme-btn-hover-bg: rgba(199,164,255,.14);
  color-scheme: dark;
}

html[data-theme-resolved="dark"] body,
html[data-theme-resolved="dark"] .services,
html[data-theme-resolved="dark"] .about,
html[data-theme-resolved="dark"] .srv-detail,
html[data-theme-resolved="dark"] .srv-cta-strip { background: #100B1B; }
html[data-theme-resolved="dark"] .why-section,
html[data-theme-resolved="dark"] .contact,
html[data-theme-resolved="dark"] .srv-features,
html[data-theme-resolved="dark"] .srv-process { background: #140E22; }
html[data-theme-resolved="dark"] #header {
  background: var(--header-bg);
  border-bottom-color: rgba(199,164,255,.08);
}
html[data-theme-resolved="dark"] #header.scrolled {
  border-color: var(--line);
  box-shadow: var(--header-shadow);
}
html[data-theme-resolved="dark"] .nav,
html[data-theme-resolved="dark"] .nav.open { background: #140E22; }
html[data-theme-resolved="dark"] .nav-link { color: #F5F2FA; }
html[data-theme-resolved="dark"] .nav-link:hover,
html[data-theme-resolved="dark"] .nav-link.active { color: var(--blue); }
html[data-theme-resolved="dark"] .hamburger span { background: #ffffff; }
html[data-theme-resolved="dark"] .btn-ghost {
  color: #ffffff;
  background: transparent;
  border-color: #5B4A75;
}
html[data-theme-resolved="dark"] .btn-ghost:hover {
  color: #ffffff;
  background: #221731;
  border-color: #7F65A6;
}
html[data-theme-resolved="dark"] .section-sub,
html[data-theme-resolved="dark"] .about-text > p,
html[data-theme-resolved="dark"] .feat-card p,
html[data-theme-resolved="dark"] .srv-desc,
html[data-theme-resolved="dark"] .contact-card p,
html[data-theme-resolved="dark"] .contact-form-card > p,
html[data-theme-resolved="dark"] .srv-check-list li,
html[data-theme-resolved="dark"] .mini-row,
html[data-theme-resolved="dark"] .metrics-intro,
html[data-theme-resolved="dark"] .trust-box span,
html[data-theme-resolved="dark"] .hero-sub,
html[data-theme-resolved="dark"] .hero-illustration > p,
html[data-theme-resolved="dark"] .stat-label,
html[data-theme-resolved="dark"] .srv-breadcrumb,
html[data-theme-resolved="dark"] .srv-breadcrumb a { color: var(--muted); }
html[data-theme-resolved="dark"] .srv-card,
html[data-theme-resolved="dark"] .metrics-card,
html[data-theme-resolved="dark"] .metric-box,
html[data-theme-resolved="dark"] .about-logo-card,
html[data-theme-resolved="dark"] .value-chip,
html[data-theme-resolved="dark"] .contact-card,
html[data-theme-resolved="dark"] .contact-form-card,
html[data-theme-resolved="dark"] .feat-card,
html[data-theme-resolved="dark"] .srv-img-card,
html[data-theme-resolved="dark"] .srv-mini-panel,
html[data-theme-resolved="dark"] .step-card,
html[data-theme-resolved="dark"] .hero-solutions span {
  background: #1D152D;
  border-color: var(--line);
  box-shadow: none;
}
html[data-theme-resolved="dark"] .hero-illustration {
  background: rgba(29,21,45,.95);
  border-color: var(--line);
}
html[data-theme-resolved="dark"] .srv-card:hover,
html[data-theme-resolved="dark"] .feat-card:hover,
html[data-theme-resolved="dark"] .step-card:hover { border-color: #7E62AA; }
html[data-theme-resolved="dark"] .contact-card strong,
html[data-theme-resolved="dark"] .feat-card h3,
html[data-theme-resolved="dark"] .srv-mini-panel h3,
html[data-theme-resolved="dark"] .metrics-title,
html[data-theme-resolved="dark"] h1,
html[data-theme-resolved="dark"] h2,
html[data-theme-resolved="dark"] h3,
html[data-theme-resolved="dark"] h4,
html[data-theme-resolved="dark"] .srv-title,
html[data-theme-resolved="dark"] .stat-num { color: #ffffff; }
html[data-theme-resolved="dark"] .contact-form-card,
html[data-theme-resolved="dark"] .form-group input,
html[data-theme-resolved="dark"] .form-group select,
html[data-theme-resolved="dark"] .form-group textarea {
  color: #ffffff;
}
html[data-theme-resolved="dark"] .form-group input,
html[data-theme-resolved="dark"] .form-group select,
html[data-theme-resolved="dark"] .form-group textarea {
  background: #140E22;
  border-color: #43315F;
}
html[data-theme-resolved="dark"] .form-group label { color: #F5F2FA; }
html[data-theme-resolved="dark"] .form-group input::placeholder,
html[data-theme-resolved="dark"] .form-group textarea::placeholder { color: #AC9CC8; }
html[data-theme-resolved="dark"] .srv-breadcrumb a { color: #F5F2FA; }
html[data-theme-resolved="dark"] .srv-breadcrumb span,
html[data-theme-resolved="dark"] .srv-breadcrumb i { color: #C7A4FF; }
html[data-theme-resolved="dark"] .insta-link {
  background: #1D152D;
  border-color: var(--line);
  color: #ffffff;
}
html[data-theme-resolved="dark"] .cc-icon,
html[data-theme-resolved="dark"] .pillar-icon,
html[data-theme-resolved="dark"] .feat-icon,
html[data-theme-resolved="dark"] .srv-icon-wrap { background: rgba(199,164,255,.14); }
html[data-theme-resolved="dark"] .cc-action { color: #C7A4FF; }
html[data-theme-resolved="dark"] .cta-strip-inner,
html[data-theme-resolved="dark"] .cta-banner,
html[data-theme-resolved="dark"] footer { background: #140E22; }
html[data-theme-resolved="dark"] .whatsapp-float::after { background: rgba(255,255,255,.12); backdrop-filter: blur(12px); }


html[data-theme-resolved="dark"] .cta-strip-inner .btn-primary {
  color: #140E22;
  background: #ffffff;
  border-color: #ffffff;
}
html[data-theme-resolved="dark"] .cta-strip-inner .btn-primary:hover,
html[data-theme-resolved="dark"] .cta-banner .btn-primary:hover {
  color: #140E22;
  background: #F5F2FA;
}
html[data-theme-resolved="dark"] .cta-banner .btn-primary {
  color: #ffffff;
}
html[data-theme-resolved="dark"] .cta-banner .btn-primary:hover {
  border-color: #F5F2FA;
}

@media (max-width: 820px) {
  .hdr { gap: 10px; }
  .header-tools {
    margin-left: 8px;
  }
  .theme-btn { width: 31px; height: 31px; }
}

@media (max-width: 600px) {
  .theme-switcher { padding: 2px; gap: 2px; }
  .theme-btn { width: 29px; height: 29px; }
  .theme-btn i { font-size: .82rem; }
  .theme-auto-icon { width: 16px; height: 16px; font-size: .56rem; }
  .whatsapp-float {
    right: 16px;
    bottom: 16px;
    width: 58px;
    height: 58px;
  }
  .whatsapp-float::after { display: none; }
}

/* WTH Presença v4 — correções definitivas de legibilidade e posicionamento */
#header .hdr {
  width: calc(100% - 48px);
  max-width: none;
  margin-inline: auto;
  gap: clamp(10px, 1.4vw, 24px);
}
#header .nav { margin-left: auto; gap: 4px; }
#header .header-tools { order: 4; margin-left: 4px; flex-shrink: 0; }
#header .hamburger { order: 5; flex-shrink: 0; }
#header .theme-switcher { padding: 2px; gap: 2px; border-radius: 999px; box-shadow: 0 5px 14px rgba(20,14,34,.12); }
#header .theme-btn { width: 30px; height: 30px; }
#header .theme-btn i { font-size: .86rem; }
#header .theme-auto-icon { width: 17px; height: 17px; font-size: .57rem; }
#header .nav .btn-cta { white-space: nowrap; }

/* Fundo claro requer texto escuro explícito, independente de tokens invertidos do modo dark. */
.cta-banner .btn-primary,
.cta-strip-inner .btn-primary,
html[data-theme-resolved="dark"] .cta-banner .btn-primary,
html[data-theme-resolved="dark"] .cta-strip-inner .btn-primary {
  background: #ffffff;
  border-color: #ffffff;
  color: #140E22;
  -webkit-text-fill-color: #140E22;
}
.cta-banner .btn-primary:hover,
.cta-strip-inner .btn-primary:hover,
html[data-theme-resolved="dark"] .cta-banner .btn-primary:hover,
html[data-theme-resolved="dark"] .cta-strip-inner .btn-primary:hover {
  background: #F0E5FF;
  border-color: #F0E5FF;
  color: #140E22;
  -webkit-text-fill-color: #140E22;
}
.cta-banner .btn-primary i,
.cta-strip-inner .btn-primary i { color: inherit; }

/* Botões roxos em painéis claros/escuros sempre com texto branco. */
.btn-cta, .btn-primary { -webkit-text-fill-color: currentColor; }
#header .btn-cta { color: #fff; }
html[data-theme-resolved="dark"] .btn-primary:not(.cta-banner .btn-primary):not(.cta-strip-inner .btn-primary),
html[data-theme-resolved="dark"] .btn-cta {
  color: #fff;
  background: #8438E8;
  border-color: #8438E8;
  -webkit-text-fill-color: #fff;
}
html[data-theme-resolved="dark"] .btn-primary:not(.cta-banner .btn-primary):not(.cta-strip-inner .btn-primary):hover,
html[data-theme-resolved="dark"] .btn-cta:hover { background: #7027CD; border-color: #7027CD; }

@media (max-width: 1060px) and (min-width: 821px) {
  #header .logo-img { width: 190px; }
  #header .nav-link { font-size: .85rem; padding: 9px 5px; }
  #header .nav .btn-cta { padding: 9px 12px; }
}
@media (max-width: 820px) {
  #header .hdr { width: calc(100% - 32px); gap: 8px; }
  #header .logo-img { width: clamp(155px, 39vw, 225px); }
  #header .header-tools { margin-left: auto; }
  #header .hamburger { margin-left: 2px; }
  #header .nav { margin-left: 0; background: #fff; }
  #header .nav.open { max-height: 500px; }
  html[data-theme-resolved="dark"] #header .nav { background: #140E22; }
}
@media (max-width: 420px) {
  #header .hdr { width: calc(100% - 24px); gap: 5px; }
  #header .logo-img { width: clamp(122px, 34vw, 145px); }
  #header .header-tools { margin-left: auto; }
  #header .theme-btn { width: 27px; height: 27px; }
  #header .theme-btn i { font-size: .8rem; }
  #header .theme-auto-icon { width: 15px; height: 15px; font-size: .52rem; }
  #header .hamburger { width: 38px; padding: 7px; }
}
