/* =========================================================
   SerPleno Saúde — Sistema visual
   ========================================================= */

:root {
  /* Cores da marca */
  --blue: #1E5BBA;
  --blue-700: #164a99;
  --blue-50: #eaf1fb;
  --green: #2BA84A;
  --green-700: #1f8a3b;
  --green-50: #e7f5ea;
  --orange: #F58F2C;
  --orange-700: #d97916;
  --orange-50: #fdf0e0;

  /* Neutros quentes */
  --cream: #FAF7F2;
  --cream-2: #F4EFE6;
  --cream-3: #ECE5D7;
  --paper: #FFFFFF;
  --ink: #0F1F2E;
  --ink-2: #2c3a48;
  --ink-3: #5a6675;
  --ink-4: #8893a0;
  --line: rgba(15, 31, 46, 0.10);
  --line-2: rgba(15, 31, 46, 0.06);

  /* Tipografia */
  --font-display: "Bricolage Grotesque", "DM Sans", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Raio + sombra */
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 22px;
  --r-xl: 32px;
  --shadow-sm: 0 1px 2px rgba(15,31,46,.05), 0 4px 12px rgba(15,31,46,.04);
  --shadow: 0 2px 6px rgba(15,31,46,.06), 0 18px 40px -12px rgba(15,31,46,.12);
  --shadow-lg: 0 30px 60px -20px rgba(15,31,46,.22);

  /* Layout */
  --maxw: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
}

* { box-sizing: border-box; }
html, body { padding: 0; margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }

/* =========================================================
   Tipografia
   ========================================================= */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: clamp(38px, 5.6vw, 72px); }
h2 { font-size: clamp(28px, 3.4vw, 46px); letter-spacing: -0.025em; }
h3 { font-size: clamp(20px, 1.7vw, 26px); letter-spacing: -0.015em; line-height: 1.15; }
p { margin: 0; text-wrap: pretty; }

.serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-3);
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

section { padding: clamp(64px, 8vw, 110px) 0; }

/* =========================================================
   Botões
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: transform .12s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: white; }
.btn-primary:hover { background: var(--blue-700); box-shadow: 0 10px 24px -8px rgba(30,91,186,.45); }
.btn-accent { background: var(--orange); color: white; }
.btn-accent:hover { background: var(--orange-700); box-shadow: 0 10px 24px -8px rgba(245,143,44,.45); }
.btn-ghost { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--cream-2); }
.btn-line { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--cream); }
.btn-lg { padding: 18px 28px; font-size: 16px; }
.btn-sm { padding: 10px 16px; font-size: 13px; }
.btn .ph { font-size: 18px; }

/* Pill / chip */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: all .15s ease;
}
.chip:hover { background: var(--cream-2); }
.chip.active {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}
.chip .ph { font-size: 14px; }

/* Tag (in-content) */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--cream-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.tag.blue { background: var(--blue-50); color: var(--blue-700); }
.tag.green { background: var(--green-50); color: var(--green-700); }
.tag.orange { background: var(--orange-50); color: var(--orange-700); }

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 242, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line-2);
}
.site-header__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px var(--gutter);
}
.site-header__logo {
  display: flex; align-items: center; gap: 10px;
}
.site-header__logo svg { width: 36px; height: 36px; }
.site-header__logo img { width: 120px; height: 48px; object-fit: contain; display: block; }
.site-header__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.site-header__brand span { color: var(--green); }
.site-nav {
  display: flex;
  gap: 4px;
  margin-left: 18px;
}
.site-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  transition: all .15s ease;
}
.site-nav a:hover { background: var(--cream-2); color: var(--ink); }
.site-nav a.active { background: var(--ink); color: var(--cream); }

.site-header__cta {
  margin-left: auto;
  display: flex; align-items: center; gap: 10px;
}
.site-header__login {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  transition: all .15s ease;
}
.site-header__login:hover { background: var(--cream-2); }
.site-header__login .ph { color: var(--blue); }

.mobile-toggle {
  display: none;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line);
  align-items: center; justify-content: center;
  font-size: 22px;
}

/* Mobile nav drawer */
.mobile-drawer {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15,31,46,.45);
  z-index: 60;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.mobile-drawer.open { opacity: 1; pointer-events: auto; }
.mobile-drawer__panel {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: min(360px, 88vw);
  background: var(--cream);
  padding: 80px 28px 28px;
  transform: translateX(100%);
  transition: transform .25s cubic-bezier(.22,.61,.36,1);
  display: flex; flex-direction: column; gap: 6px;
}
.mobile-drawer.open .mobile-drawer__panel { transform: translateX(0); }
.mobile-drawer a {
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
}
.mobile-drawer a:hover { background: var(--cream-2); }
.mobile-drawer a.active { background: var(--ink); color: var(--cream); }
.mobile-drawer__close {
  position: absolute; top: 22px; right: 24px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.mobile-drawer__cta {
  margin-top: 20px;
  display: flex; flex-direction: column; gap: 10px;
}

/* =========================================================
   Floating CTA + WhatsApp
   ========================================================= */
.float-cta-bar {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 8px 8px 18px;
  background: var(--ink);
  color: var(--cream);
  border-radius: 999px;
  box-shadow: 0 16px 40px -10px rgba(15,31,46,.45);
  font-size: 14px;
  font-weight: 500;
}
.float-cta-bar__inner-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--orange);
  color: white;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  transition: background .15s ease;
}
.float-cta-bar__inner-cta:hover { background: var(--orange-700); }
.float-cta-bar .ph { font-size: 16px; }

.whatsapp-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 41;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: #25D366;
  color: white;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 30px -8px rgba(37,211,102,.5);
  transition: transform .15s ease;
}
.whatsapp-fab:hover { transform: scale(1.08); }
.whatsapp-fab svg { width: 32px; height: 32px; fill: currentColor; }
.whatsapp-fab__pulse {
  position: absolute; inset: 0; border-radius: 50%;
  background: #25D366;
  opacity: 0.4;
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.4; }
  100% { transform: scale(1.9); opacity: 0; }
}
.whatsapp-fab__tooltip {
  position: absolute;
  right: 72px;
  background: var(--ink);
  color: var(--cream);
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(10px);
  transition: all .15s ease;
  pointer-events: none;
}
.whatsapp-fab:hover .whatsapp-fab__tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: var(--ink);
  color: var(--cream);
  padding: 80px 0 36px;
  margin-top: 60px;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 60px;
}
.site-footer h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(250, 247, 242, 0.5);
  margin-bottom: 18px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.site-footer a {
  color: rgba(250, 247, 242, 0.78);
  font-size: 15px;
  transition: color .15s ease;
}
.site-footer a:hover { color: var(--cream); }
.site-footer__logo {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px;
}
.site-footer__logo svg { width: 36px; height: 36px; }
.site-footer__logo img { width: 140px; height: 56px; object-fit: contain; display: block; filter: brightness(0) invert(1); }
.site-footer__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: white;
}
.site-footer__brand span { color: var(--green); }
.site-footer__about {
  color: rgba(250, 247, 242, 0.7);
  font-size: 15px;
  max-width: 320px;
}
.site-footer__bottom {
  margin-top: 60px;
  padding-top: 26px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  color: rgba(250,247,242,0.5);
  font-size: 13px;
}
.site-footer__socials { display: flex; gap: 10px; }
.site-footer__socials a {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.site-footer__socials a:hover { background: rgba(255,255,255,0.18); }

@media (max-width: 920px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 40px 28px; }
}
@media (max-width: 560px) {
  .site-footer__grid { grid-template-columns: 1fr; }
}

/* =========================================================
   Card primitives
   ========================================================= */
.card {
  background: var(--paper);
  border-radius: var(--r-lg);
  padding: 28px;
  border: 1px solid var(--line-2);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.icon-tile {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
}
.icon-tile.blue { background: var(--blue-50); color: var(--blue); }
.icon-tile.green { background: var(--green-50); color: var(--green-700); }
.icon-tile.orange { background: var(--orange-50); color: var(--orange-700); }
.icon-tile.ink { background: var(--cream-3); color: var(--ink); }

/* =========================================================
   Utilities
   ========================================================= */
.muted { color: var(--ink-3); }
.divider { height: 1px; background: var(--line); }
.kicker { color: var(--blue); font-weight: 600; }

.appear { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.appear.in { opacity: 1; transform: none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
  .site-nav, .site-header__login { display: none; }
  .mobile-toggle { display: inline-flex; }
  .float-cta-bar { font-size: 13px; padding: 6px 6px 6px 14px; }
  .whatsapp-fab { width: 56px; height: 56px; bottom: 90px; }
}

/* Form primitives */
.field {
  display: flex; flex-direction: column; gap: 6px;
}
.field label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.field input, .field textarea, .field select {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 15px;
  transition: border .15s ease, box-shadow .15s ease;
  color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(30,91,186,.12);
}
.field--error input, .field--error textarea { border-color: #d9534f; }
.field__error { color: #d9534f; font-size: 12px; }
.field__hint { color: var(--ink-3); font-size: 12px; }
