/* ============================================================
   MEDSAC — Sistema de design compartilhado (portal)
   Carregado por todas as páginas ANTES do CSS inline de cada uma.
   Contém: tokens, base, container, cabeçalhos de seção, botões,
   utilitários e o rodapé global.
   ============================================================ */

:root{
  /* ===== Cores ===== */
  --bg:#f8fafc;            /* fundo da página */
  --bg-soft:#eef2f9;       /* fundo alternado de seção */
  --card:#ffffff;
  --text:#0b1220;
  --muted:#475569;
  --muted-2:#64748b;
  --primary:#2563eb;
  --primary-700:#1d4ed8;
  --accent:#0ea5e9;
  --violet:#7c3aed;        /* apoio em gradientes */
  --success:#16a34a;
  --ring:#3b82f6;
  --border:rgba(2,6,23,.10);

  /* Superfície escura (bandas de destaque) */
  --dark:#0b1220;
  --dark-2:#0f1b3d;
  --on-dark:#e7ecf6;
  --on-dark-muted:#9fb0cf;

  /* ===== Gradientes ===== */
  --grad-primary: linear-gradient(135deg, var(--primary), var(--primary-700));
  --grad-vibe: linear-gradient(135deg, #2563eb 0%, #4f46e5 45%, #7c3aed 100%);
  --grad-dark: radial-gradient(1200px 600px at 15% -10%, rgba(37,99,235,.45), transparent 60%),
               radial-gradient(900px 500px at 100% 0%, rgba(124,58,237,.35), transparent 55%),
               linear-gradient(160deg, #0b1220 0%, #0f1b3d 100%);

  /* ===== Tipografia ===== */
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
  --fs-display: clamp(2.2rem, 2.3vw + 1rem, 3rem);     /* h1 do hero */
  --fs-h2: clamp(1.85rem, 1.5vw + 1.2rem, 2.5rem);     /* títulos de seção */
  --fs-lead: clamp(1.02rem, .45vw + .9rem, 1.15rem);   /* parágrafo de apoio do hero */
  --fs-sub: clamp(1rem, .4vw + .92rem, 1.1rem);        /* subtítulos de seção */

  /* ===== Espaçamento / raio / sombra ===== */
  --container:1200px;
  --space-section: clamp(3.25rem, 6.5vw, 6rem);        /* padding vertical de toda seção */
  --space-head: clamp(1.4rem, 3vw, 2.4rem);            /* distância entre cabeçalho e conteúdo */
  --radius-sm:12px;
  --radius:16px;
  --radius-lg:22px;
  --radius-pill:999px;
  --shadow-sm:0 6px 18px rgba(2,6,23,.06);
  --shadow-md:0 14px 38px rgba(2,6,23,.10);
  --shadow-lg:0 26px 60px rgba(2,6,23,.16);
  --shadow-primary:0 18px 40px rgba(37,99,235,.30);
}

/* ===== Base ===== */
*,*::before,*::after{ box-sizing:border-box }
html{ scroll-behavior:smooth; overflow-x:clip; -webkit-text-size-adjust:100% }
body{
  margin:0; background:var(--bg); color:var(--text);
  font:16px/1.6 var(--font);
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}
a{ color:inherit; text-decoration:none }
img,svg{ max-width:100%; vertical-align:middle }
button{ font:inherit }
:focus-visible{ outline:2px solid var(--ring); outline-offset:3px }

.container{ max-width:var(--container); margin:0 auto; padding:0 1.25rem }

/* ===== Cabeçalhos de seção ===== */
.section-title{
  font-size:var(--fs-h2); line-height:1.1; letter-spacing:-.025em; font-weight:800;
  text-wrap:balance;
}
.section-sub{
  margin:.6rem auto 0; max-width:60ch;
  color:var(--muted); font-size:var(--fs-sub); line-height:1.55;
}
.eyebrow{
  display:inline-flex; align-items:center; gap:.4rem;
  padding:.3rem .7rem; border-radius:var(--radius-pill);
  font-size:.76rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
  color:var(--primary-700);
  background:color-mix(in oklab, var(--primary) 12%, #fff);
  border:1px solid color-mix(in oklab, var(--primary) 24%, #fff);
}

/* ===== Botões (definição única do site) ===== */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:.55rem;
  padding:.7rem 1.1rem; border-radius:.8rem;
  font-weight:700; font-size:.95rem; line-height:1.2; white-space:nowrap;
  border:1px solid var(--border); cursor:pointer;
  transition:transform .18s ease, box-shadow .2s ease, background .18s ease, border-color .18s ease, filter .18s ease;
}
.btn:hover{ transform:translateY(-1px) }
.btn-sm{ padding:.55rem .9rem; font-size:.9rem; border-radius:.7rem }
.btn-lg{ padding:.9rem 1.4rem; font-size:1.02rem; border-radius:.9rem }
.btn-primary{ background:var(--grad-primary); color:#fff; border-color:transparent; box-shadow:var(--shadow-primary) }
.btn-primary:hover{ box-shadow:0 22px 50px rgba(37,99,235,.40); filter:brightness(1.04) }
.btn-outline{ background:#fff; color:var(--text) }
.btn-outline:hover{ border-color:color-mix(in oklab, var(--primary) 40%, var(--border)); box-shadow:var(--shadow-sm) }

/* ===== Utilitários ===== */
.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;
}
.reveal{ opacity:0; transform:translateY(18px); transition:opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1) }
.reveal.in{ opacity:1; transform:none }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto }
  .reveal{ opacity:1 !important; transform:none !important; transition:none }
  .btn{ transition:none }
  .btn:hover{ transform:none }
}

/* ===== Normalização dos subtítulos da página inicial =====
   (as regras inline de cada seção não definem font-size; esta vale para todas) */
.journey-head .muted,
#pricing > .container > .muted,
#meta-costs .mc-head .muted,
#integrations .integrations-head .muted,
#features .features-head .muted{ font-size:var(--fs-sub); line-height:1.55 }

/* ===== Rodapé global ===== */
#site-footer{
  background:#fff; color:var(--text);
  border-top:1px solid var(--border);
  padding:clamp(2.5rem,5vw,4rem) 0 1.4rem;
}
#site-footer .footer-grid{ display:grid; gap:2rem 1.5rem; grid-template-columns:1fr }
@media (min-width:640px){ #site-footer .footer-grid{ grid-template-columns:1fr 1fr } #site-footer .footer-about{ grid-column:1 / -1 } }
@media (min-width:980px){ #site-footer .footer-grid{ grid-template-columns:1.6fr 1fr 1fr 1fr } #site-footer .footer-about{ grid-column:auto } }

#site-footer .footer-brand{ display:inline-flex; align-items:center; gap:.65rem; font-weight:800; font-size:1.05rem }
#site-footer .footer-logo{
  width:40px; height:40px; border-radius:12px; overflow:hidden; flex-shrink:0;
  display:grid; place-items:center; background:#fff;
  box-shadow:0 10px 30px rgba(37,99,235,.22);
}
#site-footer .footer-logo img{ width:100%; height:100%; object-fit:cover; display:block }
#site-footer .footer-tagline{ margin:.9rem 0 0; color:var(--muted); max-width:36ch; line-height:1.55; font-size:.95rem }
#site-footer .footer-partner{ margin-top:1rem }
#site-footer .footer-partner img{ height:40px; width:auto; display:block }
#site-footer .footer-company{ margin:1rem 0 0; font-size:.8rem; color:var(--muted-2); line-height:1.5 }

#site-footer .col-title{
  margin:0 0 .7rem; font-size:.78rem; font-weight:800;
  letter-spacing:.08em; text-transform:uppercase; color:var(--muted-2);
}
#site-footer .col-title + .col-list + .col-title{ margin-top:1.4rem }
#site-footer .col-list{ list-style:none; margin:0; padding:0; display:grid; gap:.5rem }
#site-footer .col-list a{
  color:var(--text); font-weight:500; font-size:.95rem;
  display:inline-block; padding:.1rem 0; border-radius:6px; background:none;
}
#site-footer .col-list a:hover{ color:var(--primary-700); background:none; text-decoration:underline; text-underline-offset:3px }

#site-footer .footer-bottom{
  margin-top:clamp(1.6rem,3vw,2.4rem); padding-top:1rem;
  border-top:1px solid var(--border);
  display:flex; flex-wrap:wrap; gap:.6rem 1.25rem; justify-content:space-between; align-items:center;
  font-size:.85rem; color:var(--muted);
}
#site-footer .footer-bottom-links{ display:flex; flex-wrap:wrap; gap:1rem }
#site-footer .footer-bottom-links a{ color:var(--muted); background:none }
#site-footer .footer-bottom-links a:hover{ color:var(--primary-700); background:none; text-decoration:underline; text-underline-offset:3px }
