/* =========================================================
   Clínica Vitalité — Design System (CSS puro)
   Com ajustes: barra fixa, header não fixo, botões responsivos
   ========================================================= */

/* 1. TOKENS ------------------------------------------------ */
:root {
  /* Cores */
  --bg: #f7fafa;
  --surface: #ffffff;
  --text: #16242e;
  --text-muted: #5d7180;
  --primary: #0f8a94;
  --primary-dark: #0b6b73;
  --primary-soft: #e2f4f4;
  --primary-contrast: #ffffff;
  --cta: #12925f;
  --cta-dark: #0e7a4f;
  --ink: #142330;
  --ink-2: #1b3040;
  --ink-text: #f3f8f9;
  --ink-muted: #a8bcc7;
  --border: #e3eaed;

  /* Gradientes */
  --gradient-primary: linear-gradient(135deg, var(--primary-dark), #23b0a6);
  --gradient-ink: linear-gradient(140deg, var(--ink), var(--ink-2));
  --gradient-hero: radial-gradient(120% 90% at 85% 0%, #dff2f2 0%, transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f1f8f8 100%);

  /* Raios e sombras */
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow-soft: 0 1px 2px rgba(20, 35, 48, 0.05), 0 12px 32px -12px rgba(20, 35, 48, 0.14);
  --shadow-lift: 0 24px 60px -24px rgba(20, 35, 48, 0.3);
  --shadow-cta: 0 16px 34px -14px rgba(18, 146, 95, 0.55);

  /* Espaçamento */
  --section-y: clamp(4rem, 8vw, 7rem);
  --container: 1200px;
  --demobar-height: 48px; /* altura aproximada da barra */
}

/* 2. RESET E BASE ------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding-top: var(--demobar-height); /* compensa a barra fixa */
  background: var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 800;
}
h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
}
h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

p {
  margin: 0;
}

/* 3. LAYOUT ------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.section {
  padding-block: var(--section-y);
}

.section--dark {
  background: var(--gradient-ink);
  color: var(--ink-text);
}

.section--muted {
  background: #eef4f5;
}

.grid {
  display: grid;
  gap: 1.25rem;
}

.grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.section-head {
  max-width: 40rem;
  margin-inline: auto;
  text-align: center;
  margin-bottom: 3.5rem;
}

.eyebrow {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.9rem;
}

.lead {
  color: var(--text-muted);
  font-size: 1.075rem;
  margin-top: 1rem;
}

.section--dark .lead,
.section--dark .muted {
  color: var(--ink-muted);
}

/* 4. COMPONENTES ------------------------------------------ */

/* Barra de demonstração (FIXA) */
.demobar {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: var(--ink);
  color: var(--ink-text);
  padding: 0.6rem 1.25rem;
  font-size: 0.85rem;
  height: var(--demobar-height);
  box-sizing: border-box;
}

.badge {
  background: var(--primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-pill);
}

.demobar__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

/* Header (NÃO FIXO) */
.header {
  position: relative; /* não mais fixo */
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  /* Removemos o top e o fixed */
}

/* Quando a página rolar, podemos adicionar um fundo, mas não é fixo */
.header.is-stuck {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.header__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding-block: 0.85rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.brand__mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--gradient-primary);
  color: #fff;
  font-weight: 800;
}

.brand__name {
  font-weight: 800;
  font-size: 1.1rem;
  display: block;
}

.brand__tag {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.nav a:hover {
  color: var(--primary);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}

.nav-mobile {
  display: none;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 0.75rem 1.25rem 1.25rem;
}

.nav-mobile.is-open {
  display: block;
}

.nav-mobile a {
  display: block;
  padding: 0.85rem 0.5rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
}

.nav-mobile a:hover {
  background: #f2f7f8;
}

/* Botões – corrigidos para não estourar */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.9rem 1.6rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  max-width: 100%;
  /* Evita overflow em telas pequenas */
  min-width: 0;
  flex-shrink: 1;
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn--primary {
  background: var(--gradient-primary);
  color: var(--primary-contrast);
  box-shadow: var(--shadow-soft);
}

.btn--cta {
  background: var(--cta);
  color: #fff;
  box-shadow: var(--shadow-cta);
}

.btn--cta:hover {
  background: var(--cta-dark);
}

.btn--ghost {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}

.btn--lg {
  padding: 1.15rem 2.25rem;
  font-size: 1.05rem;
}

.btn--inline {
  /* Para botões inline na barra ou header */
  padding: 0.45rem 1.1rem;
  font-size: 0.8rem;
}

/* Hero – ajuste de padding-top (sem header fixo) */
.hero {
  background: var(--gradient-hero);
  padding-top: clamp(4rem, 8vw, 6rem); /* reduzido porque não há header fixo */
  padding-bottom: var(--section-y);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.125rem;
  margin-top: 1.5rem;
  max-width: 34rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2.25rem;
}

.hero__actions .btn {
  /* Garantir que os botões não quebrem o layout */
  flex: 0 1 auto;
  min-width: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.stats dt {
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 800;
  color: var(--primary);
}

.stats dd {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero__media {
  position: relative;
}

.hero__media::before {
  content: "";
  position: absolute;
  inset: -1rem;
  background: var(--primary-soft);
  border-radius: 2.75rem;
  transform: rotate(3deg);
  z-index: -1;
}

.hero__media img {
  width: 100%;
  height: clamp(340px, 45vw, 560px);
  object-fit: cover;
  border-radius: 2.25rem;
  box-shadow: var(--shadow-lift);
}

.floating-card {
  position: absolute;
  left: 1.5rem;
  bottom: -1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  box-shadow: var(--shadow-soft);
}

.floating-card span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.floating-card strong {
  display: block;
  font-size: 0.9rem;
}

/* Imagens Responsivas */
.sobre-img {
  border-radius: 1.75rem;
  height: clamp(300px, 38vw, 420px);
  object-fit: cover;
  width: 100%;
  box-shadow: var(--shadow-lift);
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(15, 138, 148, 0.4);
  box-shadow: var(--shadow-soft);
}

.card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.card__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  margin-bottom: 1.25rem;
}

.card__icon svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
}

.card__icon--solid {
  background: var(--gradient-primary);
  color: #fff;
}

/* Checklist (seção escura) */
.checklist {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.checklist li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.checklist span {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--cta);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
}

/* Faixa de exames */
.callout {
  display: grid;
  grid-template-columns: 1.6fr auto;
  gap: 2rem;
  align-items: center;
  background: var(--primary-soft);
  border: 1px solid rgba(15, 138, 148, 0.2);
  border-radius: 1.75rem;
  padding: clamp(1.75rem, 4vw, 3rem);
  margin-top: 3.5rem;
}

.callout p {
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* Equipe */
.doctor {
  text-align: center;
}

.doctor__photo {
  height: 20rem;
  overflow: hidden;
  border-radius: 1.75rem;
  box-shadow: var(--shadow-soft);
  margin-bottom: 1.25rem;
  background: #fff;
}

.doctor__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.doctor:hover .doctor__photo img {
  transform: scale(1.05);
}

.doctor h3 {
  font-size: 1.1rem;
}

.doctor__area {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.88rem;
}

.doctor__crm {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

/* Convênios */
.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.plans li {
  height: 5rem;
  display: grid;
  place-items: center;
  text-align: center;
  padding-inline: 0.75rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.plans li:hover {
  color: var(--primary);
  border-color: rgba(15, 138, 148, 0.4);
}

/* Depoimentos */
.quote {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  box-shadow: var(--shadow-soft);
  margin: 0;
}

.quote__stars {
  color: #f2b134;
  letter-spacing: 0.15em;
}

.quote blockquote {
  margin: 0.75rem 0 0;
  color: #263946;
}

.quote figcaption {
  margin-top: 1rem;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* FAQ */
.faq {
  max-width: 46rem;
  margin-inline: auto;
  display: grid;
  gap: 0.75rem;
}

.faq details {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
}

.faq details[open] {
  box-shadow: var(--shadow-soft);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  color: var(--primary);
  font-size: 1.35rem;
  line-height: 1;
  transition: transform 0.25s ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq p {
  margin-top: 0.75rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* CTA final */
.cta-final {
  position: relative;
  overflow: hidden;
  text-align: center;
}

.cta-final::after {
  content: "";
  position: absolute;
  top: -6rem;
  right: -6rem;
  width: 24rem;
  height: 24rem;
  border-radius: 50%;
  background: rgba(35, 176, 166, 0.28);
  filter: blur(80px);
}

.cta-final .container {
  position: relative;
  z-index: 1;
  max-width: 46rem;
}

.cta-final p {
  margin: 1.25rem auto 2.5rem;
  color: var(--ink-muted);
  font-size: 1.1rem;
}

/* Footer */
.footer {
  background: var(--ink);
  color: var(--ink-muted);
  padding: 4rem 0 2rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(243, 248, 249, 0.12);
}

.footer h3 {
  color: var(--ink-text);
  margin-bottom: 1rem;
}

.footer ul {
  display: grid;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.footer__bottom {
  padding-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
}

.footer__bottom a {
  color: #3fc0b6;
  font-weight: 700;
}

.footer .brand__name {
  color: var(--ink-text);
}

/* WhatsApp flutuante */
.wa-float {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--cta);
  color: #fff;
  box-shadow: var(--shadow-cta);
  transition: transform 0.2s ease;
}

.wa-float:hover {
  transform: scale(1.1);
}

/* 5. ANIMAÇÕES PREMIUM ------------------------------------ */

/* Base para todas as animações */
.fade-in-up,
.fade-in-left,
.zoom-in-soft {
  opacity: 0;
  will-change: opacity, transform;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* fade-in-up */
.fade-in-up {
  transform: translateY(28px);
}
.fade-in-up.is-visible {
  opacity: 1;
  transform: none;
}

/* fade-in-left */
.fade-in-left {
  transform: translateX(-30px);
}
.fade-in-left.is-visible {
  opacity: 1;
  transform: none;
}

/* zoom-in-soft */
.zoom-in-soft {
  transform: scale(0.92);
}
.zoom-in-soft.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* Redução de movimento para usuários que preferem */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .fade-in-up,
  .fade-in-left,
  .zoom-in-soft {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* 6. RESPONSIVIDADE --------------------------------------- */
@media (max-width: 1024px) {
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nav {
    display: none;
  }
  .nav-toggle {
    display: block;
  }
  .hero__grid,
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero__media {
    order: -1;
  }
}

@media (max-width: 768px) {
  .hero__content {
    text-align: center;
  }
  .hero p {
    margin-inline: auto;
  }
  .hero__actions {
    justify-content: center;
  }
  .hero__actions .btn {
    flex: 1 1 100%; /* em telas pequenas, os botões ocupam toda a largura */
    max-width: 100%;
    white-space: normal; /* permite quebra de linha se necessário */
  }
  .stats {
    text-align: center;
    gap: 0.5rem;
  }
  .hero__media img {
    height: 280px;
    border-radius: 1.5rem;
  }
  .hero__media::before {
    inset: -0.5rem;
    border-radius: 1.75rem;
  }
  .floating-card {
    left: 50%;
    transform: translateX(-50%);
    bottom: -1rem;
    width: max-content;
    max-width: 90%;
    justify-content: center;
  }

  .sobre-img {
    height: 240px;
  }
  .doctor {
    max-width: 320px;
    margin-inline: auto;
  }
  .doctor__photo {
    height: 18rem;
  }

  .grid--3 {
    grid-template-columns: minmax(0, 1fr);
  }
  .callout {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
  }
  .footer__grid {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
  }
  .demobar span.hide-sm {
    display: none;
  }
  .btn {
    width: 100%;
    justify-content: center;
  }
  .btn--inline {
    width: auto;
  }
}

@media (max-width: 520px) {
  .grid--4,
  .plans {
    grid-template-columns: minmax(0, 1fr);
  }
  .plans {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .floating-card {
    left: 50%;
  }
}