/* Atlas Clínico — páginas públicas (landing e planos). Mobile-first. */

/* ---------------------------------------------------------- header */

#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 64px;
  z-index: 100;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
  transition: transform 220ms ease;
}
#header.hidden { transform: translateY(-100%); }

#header .container {
  display: flex;
  align-items: center;
  gap: var(--s3);
  height: 100%;
}

#header nav {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin-left: auto;
}

#header .nav-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 var(--s3);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  border-radius: 10px;
  transition: color var(--t);
}
#header .nav-link:hover { color: var(--accent); }

.hamburger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap);
  height: var(--tap);
  margin-left: auto;
  border-radius: 10px;
  color: var(--text);
}

/* menu do celular (o landing.js põe/tira o [hidden] do #nav) */
#header #nav {
  position: absolute;
  top: 64px;
  left: 0;
  width: 100%;
  margin: 0;
  flex-direction: column;
  align-items: stretch;
  gap: var(--s2);
  padding: var(--s3) var(--s4) var(--s5);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
#header #nav .theme-toggle { align-self: flex-start; }
#header #nav[hidden] { display: none; }

.hide-sm { display: none !important; }

main { padding-top: 64px; }

/* ---------------------------------------------------------- hero */

.hero { padding: var(--s10) 0 var(--s12); }

.hero-in {
  display: flex;
  flex-direction: column;
  gap: var(--s10);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s5);
}

.hero h1 {
  font-size: clamp(36px, 9vw, 60px);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -.03em;
}

.hero-sub {
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-2);
  max-width: 560px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
}

.hero-trust {
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
}

/* exemplo de resposta */
.demo {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: var(--s5);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
.demo-q {
  align-self: flex-end;
  max-width: 90%;
  background: var(--user-bubble);
  border-radius: 14px 14px 4px 14px;
  padding: 10px 14px;
  font-size: 15px;
  line-height: 22px;
}
.demo-a {
  font-size: 19px;
  line-height: 26px;
  font-weight: 500;
}
.demo-a strong { font-weight: 700; color: var(--accent); }
.demo-calc {
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: var(--s3) 14px;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px var(--s3);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 19px;
}
.demo-calc dt { color: var(--muted); }
.demo-calc dd { margin: 0; }
.demo-tags { display: flex; flex-wrap: wrap; gap: var(--s2); }
.demo-tag {
  padding: 5px 12px;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  color: var(--text-2);
}
.demo-tag.is-accent { border-color: transparent; background: var(--accent-soft); color: var(--accent); }

/* ---------------------------------------------------------- seções */

.section { padding: var(--s12) 0; }
.section-alt {
  background: var(--panel);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  max-width: 720px;
  margin-bottom: var(--s8);
}

.section-title {
  font-size: clamp(28px, 6vw, 40px);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -.02em;
}
.section-sub {
  font-size: 17px;
  line-height: 25px;
  color: var(--muted);
}

/* ---------------------------------------------------------- funções */

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s4);
}

.feature {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  background: var(--bg);
}
.section-alt .feature { background: var(--bg); }

.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--r);
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.feature h3 { font-size: 19px; line-height: 25px; font-weight: 600; }
.feature p { font-size: 15px; line-height: 23px; color: var(--text-2); }

/* ---------------------------------------------------------- rigor */

.rigor-grid { display: grid; grid-template-columns: 1fr; gap: var(--s4); }

.rigor {
  border-radius: 18px;
  padding: var(--s6);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  border: 1px solid var(--border);
  background: var(--panel);
}
.rigor-strong { background: var(--accent-soft); border-color: transparent; }
.rigor h3 { font-size: 21px; line-height: 28px; font-weight: 600; }
.rigor ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.rigor li {
  display: flex;
  gap: 10px;
  font-size: 16px;
  line-height: 24px;
  color: var(--text-2);
}
.rigor li svg { flex-shrink: 0; margin-top: 4px; color: var(--accent); }

/* ---------------------------------------------------------- planos */

.plans-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s4);
  align-items: stretch;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  padding: var(--s6);
  border-radius: 18px;
  background: var(--bg);
}
.section-alt .plan-card { background: var(--bg); }
.plan-card.highlighted { border: 2px solid var(--accent); }

.plan-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
}
.plan-card h3 { font-size: 20px; line-height: 26px; font-weight: 600; }
.plan-card .badge { background: var(--accent); color: var(--accent-ink); }

.plan-card .price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--mono);
  font-size: 40px;
  line-height: 44px;
  font-weight: 500;
  letter-spacing: -.02em;
}
.plan-card .price span {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}

.plan-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.plan-card li {
  display: flex;
  gap: 10px;
  font-size: 15px;
  line-height: 22px;
}
.plan-card li svg {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  stroke: var(--accent);
  stroke-width: 2.2;
  fill: none;
}
.plan-card .btn-primary,
.plan-card .btn-secondary { margin-top: auto; min-height: 48px; }

.plans-note {
  margin-top: var(--s5);
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
}

/* ---------------------------------------------------------- passos */

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s5);
}
.step {
  display: flex;
  gap: var(--s4);
}
.step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
}
.step h3 { font-size: 17px; line-height: 24px; font-weight: 600; }
.step p { font-size: 15px; line-height: 22px; color: var(--muted); margin-top: 2px; }

/* ---------------------------------------------------------- perguntas frequentes */

.faq {
  max-width: 820px;
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
.faq details {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  min-height: 56px;
  padding: var(--s3) var(--s4);
  font-size: 16px;
  line-height: 22px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex-shrink: 0;
  color: var(--accent);
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq details p {
  padding: 0 var(--s4) var(--s4);
  font-size: 15px;
  line-height: 23px;
  color: var(--text-2);
}

/* ---------------------------------------------------------- página de planos */

.page-hero { padding: var(--s10) 0 var(--s8); }
.page-hero h1 {
  font-size: clamp(30px, 7vw, 44px);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -.02em;
}
.page-hero p {
  margin-top: var(--s3);
  font-size: 17px;
  line-height: 25px;
  color: var(--muted);
}

/* ---------------------------------------------------------- rodapé */

footer {
  padding: var(--s6) 0 var(--s8);
  border-top: 1px solid var(--border-soft);
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}
footer .container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s2);
}
footer nav { display: flex; gap: var(--s2); }
footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 var(--s2);
  margin-left: calc(var(--s2) * -1);
  transition: color var(--t);
}
footer nav a + a { margin-left: 0; }
footer a:hover { color: var(--text); }

/* ---------------------------------------------------------- tema claro */

html[data-theme="light"] .demo { box-shadow: 0 16px 48px rgba(16, 35, 63, .10); }
html[data-theme="light"] .rigor-strong { background: #10233f; color: #ffffff; }
html[data-theme="light"] .rigor-strong li { color: #dce4ee; }
html[data-theme="light"] .rigor-strong li svg { color: #9dbbf7; }

/* ---------------------------------------------------------- tablet e desktop */

@media (min-width: 640px) {
  .features-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .step { flex-direction: column; gap: var(--s3); }
  footer .container { flex-direction: row; align-items: center; justify-content: space-between; }
}

@media (min-width: 769px) {
  .hamburger { display: none; }
  .hide-sm { display: inline-flex !important; }

  #header #nav {
    position: static;
    width: auto;
    margin-left: auto;
    flex-direction: row;
    align-items: center;
    gap: var(--s2);
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  #header #nav .theme-toggle { align-self: auto; }

  .hero { padding: var(--s12) 0 72px; }
  .section { padding: 72px 0; }
  .rigor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plans-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .hero-in {
    flex-direction: row;
    align-items: center;
    gap: 56px;
  }
  .hero-copy { flex: 1 1 0; }
  .demo { flex: 0 1 460px; padding: var(--s6); }
  .features-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  #header.hidden { transform: none; }
}
