/* ==========================================================================
   Geraldini & Lana — Alergia e Pneumologia Pediátrica
   Folha única. Sem build, sem dependências.
   Paleta herdada da identidade da clínica; tons de texto ajustados
   para contraste WCAG AA (ver README).
   ========================================================================== */

:root {
  /* Marca */
  --navy-900: #05173C;
  --navy-800: #0A2455;
  --blue-700: #0B57C7;   /* texto, links e botões — AA sobre branco (6.56:1) */
  --blue-600: #1276F0;   /* gráficos, hover, foco */
  --blue-500: #2F7BFF;   /* fim do gradiente */
  --cyan-400: #43E4FF;   /* início do gradiente */
  --blue-100: #EEF5FF;   /* superfície clara */

  /* Texto e superfície */
  --ink: #05173C;
  --muted: #4A5B75;      /* 6.9:1 sobre branco */
  --line: #DCE6F5;
  --surface: #FFFFFF;
  --surface-alt: #F7FAFF;
  --on-dark: #FFFFFF;
  --on-dark-muted: #C7D6EE; /* 11.96:1 sobre --navy-900 */

  /* Métrica */
  --wrap: 1140px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(5, 23, 60, .06), 0 4px 12px rgba(5, 23, 60, .05);
  --shadow-md: 0 2px 4px rgba(5, 23, 60, .07), 0 12px 32px rgba(5, 23, 60, .09);

  --font-head: "Sora", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Karla", "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.015em; }
h1 { font-size: clamp(2rem, 5.2vw, 3.05rem); font-weight: 700; }
h2 { font-size: clamp(1.55rem, 3.6vw, 2.2rem); font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }
h4 { font-size: 1.03rem; font-weight: 600; }
p, ul, ol, dl { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.25em; }
li { margin-bottom: .45em; }
a { color: var(--blue-700); text-underline-offset: .18em; }
a:hover { color: var(--blue-600); }
strong { font-weight: 700; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
:focus-visible {
  outline: 3px solid var(--blue-600);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Estrutura ---------- */
.container { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 1.25rem; }
.section { padding-block: clamp(3rem, 7vw, 5.25rem); }
.section--tight { padding-block: clamp(2.25rem, 5vw, 3.5rem); }
.section--alt { background: var(--surface-alt); }
.section--soft { background: var(--blue-100); }
.section--dark { background: var(--navy-900); color: var(--on-dark); }
.section--dark h2, .section--dark h3 { color: var(--on-dark); }
.section--dark p { color: var(--on-dark-muted); }
.measure { max-width: 66ch; }
.center { text-align: center; margin-inline: auto; }

.section-head { max-width: 60ch; margin-bottom: 2.25rem; }
.section-head.center { text-align: center; }
.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue-700);
  margin-bottom: .6rem;
}
.section--dark .eyebrow { color: var(--cyan-400); }
.lead { font-size: 1.14rem; color: var(--muted); }
.section--dark .lead { color: var(--on-dark-muted); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--navy-900); color: #fff; padding: .75rem 1.1rem;
  border-radius: 0 0 var(--radius) 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- Cabeçalho ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; gap: 1rem; min-height: 72px; }

.logo { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); }
.logo__mark { width: 38px; height: 38px; flex: none; }
.logo__word {
  display: block; font-family: var(--font-head); font-weight: 700;
  font-size: 1.02rem; letter-spacing: -.01em; line-height: 1.15;
}
.logo__tag {
  display: block; font-size: .68rem; color: var(--muted);
  letter-spacing: .04em; line-height: 1.3;
}

.nav-toggle {
  margin-left: auto; width: 44px; height: 44px;
  display: grid; place-items: center;
  background: var(--blue-100); border: 1px solid var(--line);
  border-radius: 10px; cursor: pointer; color: var(--navy-900);
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  content: ""; display: block; width: 19px; height: 2px;
  background: currentColor; border-radius: 2px; transition: transform .2s, opacity .2s;
}
.nav-toggle__bars::before { transform: translateY(-6px); }
.nav-toggle__bars::after { transform: translateY(4px); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(0) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-2px) rotate(-45deg); }

.nav { display: none; }
.nav[data-open="true"] {
  display: block; position: absolute; left: 0; right: 0; top: 100%;
  background: #fff; border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-md); padding: .75rem 1.25rem 1.25rem;
}
.nav__list { list-style: none; margin: 0; padding: 0; }
.nav__list li { margin: 0; }
.nav__link {
  display: block; padding: .7rem .25rem; text-decoration: none;
  color: var(--ink); font-weight: 500; border-bottom: 1px solid var(--line);
}
.nav__link[aria-current="page"] { color: var(--blue-700); font-weight: 700; }
.nav .btn { margin-top: 1rem; width: 100%; }

@media (min-width: 1000px) {
  .nav-toggle { display: none; }
  .nav { display: block; margin-left: auto; }
  .nav__list { display: flex; align-items: center; gap: .15rem; }
  .nav__link {
    border-bottom: 0; padding: .5rem .6rem; border-radius: 8px;
    font-size: .93rem; white-space: nowrap;
  }
  .nav__link:hover { background: var(--blue-100); }
  .nav__link[aria-current="page"] { background: var(--blue-100); }
  .nav .btn { margin: 0 0 0 .6rem; width: auto; }
  .logo__word { font-size: 1.08rem; }
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-head); font-weight: 600; font-size: .95rem;
  padding: .78rem 1.35rem; border-radius: 999px; border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer; transition: background .16s, color .16s, border-color .16s;
}
.btn--primary { background: var(--blue-700); color: #fff; }
.btn--primary:hover { background: var(--navy-800); color: #fff; }
.btn--ghost { background: transparent; color: var(--blue-700); border-color: #B9CFF0; }
.btn--ghost:hover { background: var(--blue-100); color: var(--blue-700); }
.btn--light { background: #fff; color: var(--navy-900); }
.btn--light:hover { background: var(--blue-100); color: var(--navy-900); }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn--outline-light:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn__icon { width: 18px; height: 18px; flex: none; fill: currentColor; }
.btn-row { display: flex; flex-wrap: wrap; gap: .7rem; }

/* ---------- Hero ---------- */
.hero { background: var(--navy-900); color: var(--on-dark); position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; inset: auto -20% -55% auto;
  width: 560px; height: 560px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(67,228,255,.20), rgba(47,123,255,0) 68%);
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; padding-block: clamp(3rem, 8vw, 5.5rem); }
.hero h1 { color: #fff; max-width: 19ch; }
.hero__lead { font-size: 1.16rem; color: var(--on-dark-muted); max-width: 56ch; }
.hero .btn-row { margin-top: 1.9rem; }
.hero__meta {
  display: flex; flex-wrap: wrap; gap: .5rem .55rem; margin-top: 2.2rem;
  list-style: none; padding: 0;
}
.hero__meta li {
  margin: 0; font-size: .84rem; color: var(--on-dark-muted);
  border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: .3rem .8rem;
}

.page-hero { background: var(--navy-900); color: var(--on-dark); }
.page-hero__inner { padding-block: clamp(2.4rem, 6vw, 3.9rem); }
.page-hero h1 { color: #fff; max-width: 22ch; margin-bottom: .35rem; }
.page-hero p { color: var(--on-dark-muted); max-width: 62ch; margin-bottom: 0; font-size: 1.08rem; }

.breadcrumb { font-size: .84rem; margin-bottom: 1.1rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: 0; }
.breadcrumb li { margin: 0; color: var(--on-dark-muted); }
.breadcrumb li + li::before { content: "/"; margin-right: .4rem; opacity: .55; }
.breadcrumb a { color: var(--on-dark-muted); }
.breadcrumb a:hover { color: #fff; }

/* ---------- Grades e cartões ---------- */
.grid { display: grid; gap: 1.15rem; }
@media (min-width: 640px)  { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 640px)  { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px)  { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 640px)  { .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px)  { .grid--4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.card > :last-child { margin-bottom: 0; }
/* h4 aparece quando o cartao esta aninhado sob um rotulo de grupo (h3);
   mantem o mesmo peso visual do h3 para o cartao nao "encolher". */
.card h3, .card h4 { margin-bottom: .45rem; font-size: 1.2rem; font-weight: 600; }
.card p { color: var(--muted); margin-bottom: .8rem; }
.card__link { font-family: var(--font-head); font-weight: 600; font-size: .92rem; text-decoration: none; }
.card__link::after { content: " \2192"; }
.card__link:hover { text-decoration: underline; }
.card--flat { box-shadow: none; background: var(--surface-alt); }
.card--dark { background: var(--navy-800); border-color: rgba(255,255,255,.14); box-shadow: none; }
.card--dark h3 { color: #fff; }
.card--dark p { color: var(--on-dark-muted); }

.icon-badge {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--blue-100); color: var(--blue-700); margin-bottom: 1rem;
}
.icon-badge svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card--dark .icon-badge { background: rgba(67,228,255,.14); color: var(--cyan-400); }

/* ---------- Listas de conteúdo ---------- */
.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 1.75rem; margin-bottom: .6rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 9px; height: 9px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan-400), var(--blue-500));
}
.section--dark .checklist li { color: var(--on-dark-muted); }

.pill-list { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; }
.pill-list li {
  margin: 0; font-size: .88rem; background: var(--blue-100); color: var(--navy-800);
  border-radius: 999px; padding: .38rem .9rem;
}

.def-grid { display: grid; gap: 1.15rem; }
@media (min-width: 760px) { .def-grid { grid-template-columns: repeat(2, 1fr); } }
.def { border-left: 3px solid var(--blue-600); padding: .1rem 0 .1rem 1.1rem; }
.def h3 { margin-bottom: .3rem; }
.def p { color: var(--muted); margin-bottom: 0; }

.prose > :last-child { margin-bottom: 0; }
.prose h2 { margin-top: 2.4rem; }
.prose h3 { margin-top: 1.7rem; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }

.note {
  background: var(--blue-100); border-left: 4px solid var(--blue-600);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 1.1rem 1.25rem;
}
.note > :last-child { margin-bottom: 0; }
.note--warn { background: #FFF6E8; border-left-color: #C9781B; }

/* ---------- Médicos ---------- */
.doctor { display: grid; gap: 1.5rem; }
@media (min-width: 820px) { .doctor { grid-template-columns: 260px 1fr; gap: 2.25rem; } }
.doctor + .doctor { margin-top: 3rem; padding-top: 3rem; border-top: 1px solid var(--line); }
.doctor__figure { margin: 0; }
.doctor__photo {
  aspect-ratio: 4 / 5; border-radius: var(--radius-lg); background: var(--blue-100);
  display: grid; place-items: center; color: var(--muted); font-size: .88rem;
  border: 1px dashed #B9CFF0; text-align: center; padding: 1rem;
}
.doctor__name { margin-bottom: .25rem; }
.doctor__role { color: var(--muted); margin-bottom: .75rem; }

.registro {
  list-style: none; padding: 1rem 1.15rem; margin: 0 0 1.25rem;
  background: var(--surface-alt); border: 1px solid var(--line); border-radius: var(--radius);
  font-size: .93rem;
}
.registro li { margin-bottom: .35rem; }
.registro li:last-child { margin-bottom: 0; }
.registro__crm { font-family: var(--font-head); font-weight: 700; color: var(--navy-900); }
.registro .rqe { color: var(--muted); }

.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 1.15rem 1.4rem; margin: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -6px; top: .55em;
  width: 10px; height: 10px; border-radius: 50%; background: var(--blue-600); border: 2px solid #fff;
}
.timeline__year { display: block; font-family: var(--font-head); font-size: .8rem; font-weight: 600; color: var(--blue-700); letter-spacing: .04em; }
.timeline__what { display: block; font-weight: 600; }
.timeline__where { display: block; color: var(--muted); font-size: .93rem; }

/* ---------- Contato ---------- */
.contact-grid { display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1.15fr .85fr; align-items: start; } }

.info-list { list-style: none; padding: 0; margin: 0; }
.info { display: flex; gap: .9rem; padding: 1rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.info:last-child { border-bottom: 0; }
.info__icon {
  width: 40px; height: 40px; flex: none; border-radius: 11px; display: grid; place-items: center;
  background: var(--blue-100); color: var(--blue-700);
}
.info__icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.info__label { font-family: var(--font-head); font-size: .78rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.info__value { font-size: 1.02rem; }
.info__value a { text-decoration: none; }
.info__value a:hover { text-decoration: underline; }

.address-block { font-style: normal; }
.address-block strong { display: block; font-family: var(--font-head); }

.map-frame {
  border: 0; width: 100%; aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg); display: block; background: var(--blue-100);
}

.steps { list-style: none; counter-reset: step; padding: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 2.6rem; margin-bottom: 1rem; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--blue-700); color: #fff;
  font-family: var(--font-head); font-size: .85rem; font-weight: 700;
  display: grid; place-items: center;
}

/* ---------- Faixa de chamada ---------- */
.cta { background: var(--navy-900); color: var(--on-dark); }
.cta__inner { padding-block: clamp(2.5rem, 6vw, 3.75rem); text-align: center; }
.cta h2 { color: #fff; }
.cta p { color: var(--on-dark-muted); max-width: 54ch; margin-inline: auto; }
.cta .btn-row { justify-content: center; margin-top: 1.5rem; }

/* ---------- Rodapé ---------- */
.site-footer { background: var(--navy-900); color: var(--on-dark-muted); font-size: .92rem; }
.site-footer a { color: var(--on-dark-muted); }
.site-footer a:hover { color: #fff; }
.site-footer__top { display: grid; gap: 2rem; padding-block: 3rem 2.25rem; }
@media (min-width: 780px)  { .site-footer__top { grid-template-columns: 1.4fr 1fr; } }
@media (min-width: 1040px) { .site-footer__top { grid-template-columns: 1.5fr 1fr 1fr; } }
.site-footer h2, .site-footer h3 {
  font-size: .8rem; letter-spacing: .11em; text-transform: uppercase;
  color: #fff; margin-bottom: .9rem;
}
.footer-nav { list-style: none; padding: 0; margin: 0; }
.footer-nav li { margin-bottom: .5rem; }
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }

/* Bloco legal — texto selecionável, nunca imagem */
.legal { line-height: 1.75; }
.legal__name { display: block; color: #fff; font-family: var(--font-head); font-weight: 600; letter-spacing: .01em; }
.legal p { margin-bottom: .75rem; color: var(--on-dark-muted); }
.legal p:last-child { margin-bottom: 0; }
.legal .rt { color: #fff; }

.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.16);
  padding-block: 1.4rem 2.25rem;
  display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; justify-content: space-between;
  font-size: .84rem;
}
.site-footer__bottom p { margin: 0; }

/* ---------- Utilidades ---------- */
.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;
}
.mb-0 { margin-bottom: 0; }

@media print {
  .site-header, .nav, .cta, .btn { display: none !important; }
  body { color: #000; }
  .site-footer { background: #fff; color: #000; }
  .site-footer a, .legal p, .legal__name, .legal .rt { color: #000; }
}
