/* ==========================================================================
   INSTITUTO SAPIENS — STYLE
   Full-bleed, escuro dominante, composição editorial. HTML/CSS/JS puro.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--neutral-bg);
  color: var(--neutral-900);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
ul { list-style: none; }
.icon { width: 1em; height: 1em; stroke-width: 2; vertical-align: -0.15em; }
b, strong { font-weight: 700; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------------------------------- Layout ---------------------------------- */

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-8); }
section { padding: var(--space-13) var(--space-8); }
.section-inner { max-width: var(--max-width); margin: 0 auto; }

.section-dark { background: var(--sapiens-950); color: var(--on-dark-80); position: relative; overflow: hidden; }
.section-dark .sec-title, .section-dark h2, .section-dark h3 { color: var(--on-dark-100); }

.glow-tr { position: absolute; top: -25%; right: -8%; width: 560px; height: 560px; background: radial-gradient(circle, rgba(226,59,107,0.16) 0%, rgba(226,59,107,0) 70%); border-radius: 50%; pointer-events: none; }
.glow-bl { position: absolute; bottom: -30%; left: -6%; width: 460px; height: 460px; background: radial-gradient(circle, rgba(226,59,107,0.10) 0%, rgba(226,59,107,0) 70%); border-radius: 50%; pointer-events: none; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-5); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--sapiens-600); margin-bottom: var(--space-5);
  padding: 7px 16px 7px 12px; border-radius: var(--radius-pill);
  background: var(--sapiens-50); border: 1px solid var(--sapiens-100);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sapiens-500); flex-shrink: 0; }
.section-dark .eyebrow { color: var(--sapiens-300); background: var(--on-dark-surface); border-color: var(--on-dark-border); }
.section-dark .eyebrow .dot { background: var(--sapiens-400); }

.sec-title { font-size: var(--fs-2xl); font-weight: 800; color: var(--neutral-900); margin-bottom: var(--space-4); letter-spacing: -0.02em; line-height: var(--lh-tight); }
.sec-sub { font-size: var(--fs-md); color: var(--neutral-700); line-height: var(--lh-loose); max-width: 580px; margin-bottom: var(--space-8); }
.section-dark .sec-sub { color: var(--on-dark-60); }
.highlight { background: var(--sapiens-gradient-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------------------------------- Buttons ---------------------------------- */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 16px 30px; border-radius: var(--radius-pill);
  font-size: var(--fs-base); font-weight: 700; cursor: pointer; border: none;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.btn:hover { transform: translateY(-2px); }

.btn-primary   { background: var(--sapiens-500); color: var(--white); box-shadow: 0 14px 30px rgba(198,0,60,.28); }
.btn-primary:hover { background: var(--sapiens-600); box-shadow: 0 18px 38px rgba(198,0,60,.36); }
.btn-outline   { background: transparent; color: var(--on-dark-100); border: 1.5px solid var(--on-dark-border); }
.btn-outline:hover { background: var(--on-dark-surface); border-color: rgba(255,255,255,0.3); }
.btn-secondary { background: var(--white); color: var(--sapiens-700); border: 1.5px solid var(--neutral-200); box-shadow: var(--shadow-xs); }
.btn-secondary:hover { border-color: var(--sapiens-400); }
.btn-dark      { background: var(--sapiens-950); color: var(--white); }
.btn-dark:hover{ background: var(--sapiens-900); }
.btn-teal  { background: var(--agila-600); color: var(--white); box-shadow: 0 14px 30px rgba(15,110,86,.24); }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 11px 20px; font-size: var(--fs-sm); }

/* ---------------------------------- Navbar ---------------------------------- */

.navbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--space-8); height: 108px;
  background: rgba(20,0,14,0.72); backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--on-dark-border);
  position: sticky; top: 0; z-index: 100;
}
.nav-logo img { height: 64px; width: auto; }
.nav-links { display: flex; gap: var(--space-6); align-items: center; }
.nav-link { font-size: var(--fs-sm); font-weight: 600; color: var(--on-dark-60); cursor: pointer; white-space: nowrap; transition: color var(--dur-fast); }
.nav-link:hover, .nav-link.active { color: var(--white); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--white); }

@media (max-width: 980px) {
  .navbar { height: 88px; }
  .nav-logo img { height: 48px; }
  .nav-links { position: fixed; inset: 88px 0 0 0; background: var(--sapiens-950); flex-direction: column; align-items: flex-start; padding: var(--space-6) var(--space-8); gap: var(--space-5); transform: translateX(100%); transition: transform var(--dur-base) var(--ease); overflow-y: auto; }
  .nav-links.open { transform: translateX(0); }
  .nav-toggle { display: block; }
}

/* ---------------------------------- Hero ---------------------------------- */

.hero { background: var(--sapiens-gradient); padding: 76px var(--space-8) var(--space-13); }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--space-10); align-items: center; }
.hero h1 { font-size: var(--fs-4xl); font-weight: 800; color: var(--white); line-height: var(--lh-tight); letter-spacing: -0.02em; margin-bottom: var(--space-5); }
.hero h1 span { display: block; }
.hero-sub { font-size: var(--fs-lg); color: var(--on-dark-60); line-height: var(--lh-loose); max-width: 460px; margin-bottom: var(--space-8); }
.hero-btns { display: flex; gap: var(--space-3); flex-wrap: wrap; }

.hero-visual { position: relative; }
.doc-card {
  background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  padding: var(--space-6); transform: rotate(2.5deg); position: relative; z-index: 1;
}
.doc-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: var(--space-5); padding-bottom: var(--space-4); border-bottom: 1px solid var(--neutral-100); }
.doc-card-head .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sapiens-500); }
.doc-card-head span { font-size: var(--fs-xs); font-weight: 700; color: var(--neutral-500); letter-spacing: 0.02em; }
.doc-line { height: 10px; border-radius: 5px; background: var(--neutral-100); margin-bottom: 10px; }
.doc-bars { display: flex; align-items: flex-end; gap: 8px; height: 64px; margin: var(--space-5) 0; }
.doc-bars i { flex: 1; background: var(--sapiens-100); border-radius: 6px 6px 0 0; }
.doc-check { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); font-weight: 700; color: var(--agila-700); background: var(--agila-50); padding: 12px 14px; border-radius: var(--radius-sm); }
.doc-check .icon { color: var(--agila-600); width: 18px; height: 18px; }
.doc-badge { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-xs); font-weight: 800; color: var(--sapiens-700); background: var(--sapiens-50); padding: 8px 14px; border-radius: var(--radius-pill); margin-bottom: var(--space-4); }

.float-badge {
  position: absolute; z-index: 2; background: var(--white); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md); padding: 14px 18px; display: flex; align-items: center; gap: 12px;
}
.float-badge-1 { top: -22px; right: -18px; }
.float-badge-2 { bottom: -20px; left: -24px; }
.float-badge .icon-wrap { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--sapiens-50); color: var(--sapiens-600); }
.float-badge .icon-wrap .icon { width: 18px; height: 18px; }
.float-badge b { display: block; font-size: var(--fs-md); font-weight: 800; color: var(--neutral-900); line-height: 1.1; }
.float-badge span { font-size: 11px; color: var(--neutral-500); font-weight: 600; }

/* ---------------------------------- Proof strip (números grandes) ---------------------------------- */

.proof-strip { background: var(--neutral-50); border-bottom: 1px solid var(--neutral-100); }
.proof-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.proof-item { text-align: center; padding: var(--space-8) var(--space-4); border-left: 1px solid var(--neutral-200); }
.proof-item:first-child { border-left: none; }
.proof-num { font-size: var(--fs-3xl); font-weight: 800; color: var(--sapiens-600); letter-spacing: -0.02em; line-height: 1; margin-bottom: 8px; }
.proof-label { font-size: var(--fs-sm); color: var(--neutral-700); font-weight: 600; }

.trust-row { display: flex; align-items: center; justify-content: center; gap: var(--space-3); flex-wrap: wrap; padding: var(--space-6) var(--space-8) var(--space-8); }
.trust-item { font-size: var(--fs-xs); font-weight: 600; color: var(--neutral-700); display: flex; align-items: center; gap: 7px; }
.trust-item .icon { color: var(--agila-500); width: 15px; height: 15px; }
.trust-item + .trust-item { border-left: 1px solid var(--neutral-200); padding-left: var(--space-3); }

/* ---------------------------------- Listas numeradas editoriais ---------------------------------- */

.num-list-3, .num-list-4 { display: grid; grid-template-columns: repeat(3, 1fr); }
.num-list-4 { grid-template-columns: repeat(4, 1fr); }
.num-item { padding: 0 var(--space-6); border-left: 1px solid var(--on-dark-border); }
.num-item:first-child { border-left: none; padding-left: 0; }
.num-item .num { font-size: var(--fs-md); font-weight: 800; color: var(--sapiens-400); margin-bottom: var(--space-4); letter-spacing: 0.04em; }
.num-item .icon-wrap { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-4); background: var(--on-dark-surface); border: 1px solid var(--on-dark-border); color: var(--sapiens-300); }
.num-item .icon-wrap .icon { width: 22px; height: 22px; }
.num-item h3 { font-size: var(--fs-lg); font-weight: 800; color: var(--white); margin-bottom: 10px; }
.num-item p { font-size: var(--fs-base); color: var(--on-dark-60); line-height: var(--lh-normal); margin-bottom: var(--space-4); }
.num-item a { font-size: var(--fs-sm); font-weight: 700; color: var(--sapiens-300); display: inline-flex; align-items: center; gap: 6px; }
.num-item .solution { font-size: var(--fs-sm); font-weight: 700; color: var(--agila-300, #9FE1CB); display: flex; align-items: center; gap: 6px; padding-top: var(--space-3); border-top: 1px solid var(--on-dark-border); margin-top: var(--space-3); }

/* Serviços clínicos / listas divididas (sem cards) */

.service-list { border-top: 1px solid var(--neutral-100); }
.service-row {
  display: grid; grid-template-columns: 60px 1fr 1fr; gap: var(--space-6); align-items: center;
  padding: var(--space-6) 0; border-bottom: 1px solid var(--neutral-100);
}
.service-row .num { font-size: var(--fs-base); font-weight: 800; color: var(--sapiens-300); }
.service-row .svc-title { display: flex; align-items: center; gap: var(--space-4); }
.service-row .icon-wrap { width: 44px; height: 44px; border-radius: 13px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--sapiens-50); color: var(--sapiens-600); }
.service-row .icon-wrap .icon { width: 20px; height: 20px; }
.service-row h3 { font-size: var(--fs-md); font-weight: 800; color: var(--neutral-900); }
.service-row .pill-tag { display: inline-block; font-size: 11px; font-weight: 700; color: var(--sapiens-600); margin-top: 3px; }
.service-row p { font-size: var(--fs-base); color: var(--neutral-700); line-height: var(--lh-normal); }

/* ---------------------------------- Sobre / Fundadora ---------------------------------- */

.photo-frame { position: relative; }
.photo-box {
  background: var(--sapiens-gradient); border-radius: var(--radius-lg); height: 340px; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.photo-box img { width: 100%; height: 100%; object-fit: cover; }
.photo-box .ph-fallback { height: 100%; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.45); }
.photo-frame .float-badge { bottom: -20px; left: 24px; top: auto; right: auto; }

.tag { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 7px 15px; border-radius: var(--radius-pill); margin: 3px 6px 3px 0; background: var(--sapiens-50); color: var(--sapiens-700); }

.about-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); margin-top: var(--space-4); }
.about-thumb { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--sapiens-500); padding: var(--space-4) 0; }
.about-thumb .icon { width: 22px; height: 22px; }
.about-thumb span { font-size: var(--fs-xs); font-weight: 600; color: var(--neutral-700); }

.founder-grid { display: grid; grid-template-columns: 340px 1fr; gap: var(--space-10); align-items: center; }
.founder-name { font-size: var(--fs-xl); font-weight: 800; color: var(--neutral-900); margin-bottom: 4px; letter-spacing: -0.01em; }
.founder-role { font-size: var(--fs-base); color: var(--sapiens-600); font-weight: 700; margin-bottom: var(--space-5); }
.founder-bio { font-size: var(--fs-lg); color: var(--neutral-900); line-height: var(--lh-loose); margin-bottom: var(--space-6); font-weight: 500; position: relative; padding-left: var(--space-5); border-left: 3px solid var(--sapiens-500); }

/* ---------------------------------- Loja preview ---------------------------------- */

.test-card {
  background: var(--white); border-radius: var(--radius-md); padding: var(--space-5);
  box-shadow: var(--shadow-sm); transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
  position: relative;
}
.test-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.test-img { background: var(--agila-50); border-radius: var(--radius-sm); height: 90px; display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-4); color: var(--agila-600); }
.test-img .icon { width: 30px; height: 30px; }
.test-name { font-size: var(--fs-base); font-weight: 800; color: var(--neutral-900); margin-bottom: 4px; }
.test-cat { font-size: var(--fs-xs); color: var(--neutral-500); margin-bottom: var(--space-3); }
.test-price { font-size: var(--fs-lg); font-weight: 800; color: var(--agila-600); }
.test-price-member { font-size: var(--fs-xs); color: var(--sapiens-600); font-weight: 700; }
.ribbon { position: absolute; top: 14px; right: 14px; background: var(--sapiens-500); color: var(--white); font-size: 10.5px; font-weight: 800; padding: 4px 10px; border-radius: var(--radius-pill); }

/* ---------------------------------- Rede Sapiens callout ---------------------------------- */

.rede-callout { background: var(--sapiens-gradient); }
.rede-callout h2 { font-size: var(--fs-2xl); font-weight: 800; color: var(--white); line-height: var(--lh-tight); margin-bottom: var(--space-5); letter-spacing: -0.02em; }
.mini-cards { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.mini-card { background: var(--on-dark-surface); border: 1px solid var(--on-dark-border); border-radius: var(--radius-sm); padding: var(--space-5); }
.mini-card .num { font-size: var(--fs-lg); font-weight: 800; color: var(--sapiens-300); opacity: .7; margin-bottom: 6px; }
.mini-card h4 { font-size: var(--fs-base); font-weight: 800; color: var(--white); margin-bottom: 4px; }
.mini-card p { font-size: var(--fs-sm); color: var(--on-dark-60); line-height: var(--lh-normal); }

/* ---------------------------------- Depoimentos ---------------------------------- */

.testimonial { background: var(--neutral-50); border-radius: var(--radius-md); padding: var(--space-6); position: relative; }
.testimonial .quote-mark { font-size: 52px; font-weight: 800; color: var(--sapiens-100); line-height: 1; margin-bottom: var(--space-2); font-family: Georgia, serif; }
.stars { color: var(--b2b-500); display: flex; gap: 3px; margin-bottom: var(--space-4); }
.stars .icon { width: 15px; height: 15px; }
.test-text { font-size: var(--fs-base); color: var(--neutral-900); line-height: var(--lh-loose); margin-bottom: var(--space-5); font-weight: 500; }
.author { display: flex; align-items: center; gap: var(--space-3); }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: var(--fs-sm); font-weight: 800; flex-shrink: 0; background: var(--sapiens-500); color: var(--white); }
.author-name { font-size: var(--fs-sm); font-weight: 800; color: var(--neutral-900); }
.author-role { font-size: var(--fs-xs); color: var(--neutral-500); }

/* ---------------------------------- Mapa (faixa full-bleed) ---------------------------------- */

.map-band { width: 100%; line-height: 0; background: var(--neutral-100); }
.map-band iframe { width: 100%; height: 350px; border: 0; display: block; }

/* ---------------------------------- CTA final ---------------------------------- */

.cta-final { background: var(--sapiens-950); text-align: center; }
.cta-final h2 { font-size: var(--fs-3xl); font-weight: 800; color: var(--white); margin-bottom: var(--space-5); letter-spacing: -0.02em; line-height: var(--lh-tight); max-width: 700px; margin-left: auto; margin-right: auto; }
.cta-final p { font-size: var(--fs-lg); color: var(--on-dark-60); margin-bottom: var(--space-8); }
.cta-btns { display: flex; gap: var(--space-3); justify-content: center; flex-wrap: wrap; }

/* ---------------------------------- Footer ---------------------------------- */

.footer { padding: var(--space-10) var(--space-8) var(--space-6); background: var(--sapiens-950); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-8); margin-bottom: var(--space-8); }
.footer-brand img { height: 56px; margin-bottom: var(--space-3); }
.footer-desc { font-size: var(--fs-sm); color: var(--on-dark-60); line-height: var(--lh-normal); margin-bottom: var(--space-4); max-width: 260px; }
.footer-social { display: flex; gap: var(--space-3); }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; background: var(--on-dark-surface); border: 1px solid var(--on-dark-border); display: flex; align-items: center; justify-content: center; color: var(--on-dark-80); transition: background var(--dur-fast), color var(--dur-fast); flex-shrink: 0; }
.footer-social a:hover { background: var(--sapiens-500); color: var(--white); border-color: var(--sapiens-500); }
.footer-social a svg, .footer-social a .icon { width: 16px; height: 16px; fill: currentColor; }
.footer-social a[data-brand="whatsapp"]:hover { background: var(--whatsapp); border-color: var(--whatsapp); }
.footer-col-title { font-size: var(--fs-sm); font-weight: 800; color: var(--white); margin-bottom: var(--space-4); }
.footer-link { font-size: var(--fs-sm); color: var(--on-dark-60); display: block; padding: 5px 0; transition: color var(--dur-fast); }
.footer-link:hover { color: var(--sapiens-300); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: var(--space-5); border-top: 1px solid var(--on-dark-border); font-size: var(--fs-xs); color: var(--on-dark-60); flex-wrap: wrap; gap: var(--space-2); }
.footer-bottom-links { display: flex; gap: var(--space-4); }
.footer-bottom-links a:hover { color: var(--white); }

/* ---------------------------------- WhatsApp flutuante ---------------------------------- */

.whatsapp-float {
  position: fixed; right: 24px; bottom: 24px; z-index: 999;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--whatsapp); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 28px rgba(37,211,102,.45);
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.whatsapp-float:hover { transform: scale(1.08); box-shadow: 0 14px 34px rgba(37,211,102,.55); }
.whatsapp-float svg { width: 30px; height: 30px; fill: var(--white); }
.whatsapp-float .wa-pulse {
  position: absolute; inset: 0; border-radius: 50%; background: var(--whatsapp);
  animation: wa-pulse 2.2s ease-out infinite; z-index: -1;
}
@keyframes wa-pulse {
  0% { transform: scale(1); opacity: .55; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* ---------------------------------- Responsivo ---------------------------------- */

@media (max-width: 980px) {
  .container, section { padding-left: var(--space-5); padding-right: var(--space-5); }
  .navbar { padding: 0 var(--space-5); }
  .grid-2, .grid-3, .grid-4, .footer-grid, .proof-grid, .num-list-3, .num-list-4, .mini-cards, .founder-grid { grid-template-columns: 1fr; }
  .num-item { border-left: none; padding-left: 0; border-top: 1px solid var(--on-dark-border); padding-top: var(--space-6); }
  .num-item:first-child { border-top: none; padding-top: 0; }
  .proof-item { border-left: none; border-top: 1px solid var(--neutral-200); padding: var(--space-6) 0; }
  .proof-item:first-child { border-top: none; }
  .service-row { grid-template-columns: 1fr; gap: var(--space-3); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 36px; }
  .doc-card { transform: none; }
  .float-badge { position: static; margin-top: var(--space-4); }
  .sec-title { font-size: 24px; }
  .cta-final h2 { font-size: 28px; }
  .map-band iframe { height: 260px; }
  .whatsapp-float { right: 16px; bottom: 16px; width: 54px; height: 54px; }
  .whatsapp-float svg { width: 26px; height: 26px; }
}
