/* ============================================================
   CLÍNICA BERENICE MATTIELLO — DESIGN SYSTEM
   style.css  |  Tokens · Reset · Base · Layout · Utilitários
   ============================================================ */

/* ─── TOKENS ──────────────────────────────────────────────── */
:root {
  /* Cores */
  --primary:        #1aaba1;   /* Verde principal — logo, CTAs, destaques */
  --primary-hover:  #138880;   /* Hover do primary */
  --primary-deep:   #1aaba1;   /* Alias de primary — tom dominante da marca */
  --primary-mid:    #47bca3;   /* Verde oliva — footer, ícones */
  --primary-light:  #9fdda5;   /* Verde apoio — badges sobre fundo escuro */
  --primary-pale:   #cbeda6;   /* Verde detalhe — highlights, CTA bg */
  --primary-bg:     #f0fafb;   /* Fundo de seção clara */
  --primary-bg-alt: #e6f7f0;   /* Fundo alternativo (hover, badge) */
  --white:          #ffffff;
  --off-white:      #fafdfb;
  --text:           #1a2e2d;   /* Texto principal */
  --text-muted:     #5a7a79;   /* Texto secundário, legendas */
  --border:         #c4e5e2;   /* Bordas e separadores */
  --shadow:         rgba(26, 171, 161, 0.10);
  --shadow-md:      rgba(26, 171, 161, 0.16);
  --whatsapp:       #9fdda5;   /* Verde clínica para botões WhatsApp */
  --whatsapp-hover: #47bca3;   /* Hover do botão WhatsApp */

  /* Tipografia */
  --font-heading: 'Outfit', sans-serif;
  --font-body:    'Inter', sans-serif;

  /* Border Radius */
  --radius-sm:   8px;
  --radius:      14px;
  --radius-lg:   20px;
  --radius-xl:   28px;
  --radius-full: 9999px;

  /* Espaçamento de seção */
  --section-padding: 96px;
  --section-padding-sm: 64px;

  /* Container */
  --container-max: 1200px;
  --container-pad: 28px;

  /* Transição global */
  --transition: 0.3s ease;
}

/* ─── RESET ───────────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

img,
svg,
video {
  max-width: 100%;
  display: block;
}

/* ─── BASE ────────────────────────────────────────────────── */
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  font-weight: 700;
  color: var(--primary-deep);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-hover);
}

ul {
  list-style: none;
}

/* ─── LAYOUT ──────────────────────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* Grid 2 colunas (padrão para seções) */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

/* Grid 3 colunas (cards de especialidade) */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

/* ─── TIPOGRAFIA ──────────────────────────────────────────── */
.heading-display {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--primary-deep);
}

.heading-display em {
  font-style: italic;
  color: var(--primary);
}

.heading-xl {
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  letter-spacing: -0.02em;
}

.heading-lg {
  font-size: clamp(1.7rem, 2.5vw, 2.4rem);
}

.heading-md {
  font-size: clamp(1.4rem, 2vw, 2rem);
}

/* Eyebrow / Section Label */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}

.section-label::before {
  content: '';
  width: 22px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 56px;
}

.section-header h2 {
  font-size: 2.4rem;
  color: var(--primary-deep);
  margin-bottom: 14px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.02rem;
}

/* ─── UTILITÁRIOS ─────────────────────────────────────────── */
.text-muted  { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-center { text-align: center; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus visível (acessibilidade) */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ─── ANIMAÇÕES AO ROLAR (data-animate) ──────────────────── */
[data-animate] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

[data-animate="left"]  { transform: translateX(-28px); }
[data-animate="right"] { transform: translateX(28px); }
[data-animate].is-visible { opacity: 1; transform: none; }

[data-animate-group] > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

[data-animate-group].is-visible > *              { opacity: 1; transform: none; }
[data-animate-group].is-visible > *:nth-child(2) { transition-delay: 0.10s; }
[data-animate-group].is-visible > *:nth-child(3) { transition-delay: 0.20s; }
[data-animate-group].is-visible > *:nth-child(4) { transition-delay: 0.30s; }
[data-animate-group].is-visible > *:nth-child(5) { transition-delay: 0.40s; }
[data-animate-group].is-visible > *:nth-child(6) { transition-delay: 0.50s; }

@media (prefers-reduced-motion: reduce) {
  [data-animate],
  [data-animate-group] > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ─── ANIMAÇÕES ───────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideRight {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ─── RESPONSIVO — BASE ───────────────────────────────────── */
@media (max-width: 1024px) {
  :root {
    --section-padding: 72px;
    --container-pad: 24px;
  }

  .grid-2 {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .heading-display { font-size: 2.5rem; }
  .heading-xl      { font-size: 2.2rem; }
  .heading-lg      { font-size: 2rem; }
  .section-header h2 { font-size: 2rem; }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 56px;
    --container-pad: 20px;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .heading-display { font-size: 2rem; }
  .heading-xl      { font-size: 1.9rem; }
  .section-header h2 { font-size: 1.8rem; }
}

@media (max-width: 480px) {
  :root {
    --section-padding: 48px;
    --container-pad: 16px;
  }
}
