/* =================================================================
   InstruMED — Página de vendas do e-book
   Paleta de ambiente hospitalar (azul, verde, vermelho) + preto/branco/cinza.
   Mobile-first. Sem enfeite: cada cor e cada espaço tem função.
   ================================================================= */

/* ---------- Variáveis de marca ---------- */
:root {
  /* Azuis da marca */
  --navy: #01273a;         /* azul escuríssimo, fundos de impacto */
  --blue: #005684;         /* azul médio, CTA e destaques em fundo claro */
  --blue-light: #4cabdd;   /* azul claro, destaques em fundo escuro e grafismos */
  --blue-700: #004a72;     /* hover do CTA */

  /* Neutros */
  --ink: #0f1a22;          /* quase preto (leve tom frio), texto principal */
  --ink-soft: #3a4750;     /* texto secundário */
  --paper: #f7fafb;        /* branco levemente frio, fundo padrão */
  --paper-2: #eaf1f5;      /* um tom de azul-claro pra alternar seções */
  --white: #ffffff;
  --gray: #5f6b73;
  --line: rgba(1, 39, 58, 0.14);

  /* Tipografia */
  --font-display: 'Archivo', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;

  /* Layout */
  --container: 68rem;
  --measure: 40rem;
  --radius: 6px;
  --pad-section: clamp(4rem, 11vw, 7.5rem);
}

/* ---------- Reset enxuto ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, figure { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ol, ul { list-style: none; padding: 0; }

/* ---------- Utilitários de layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
}
.measure { max-width: var(--measure); }
.center { text-align: center; margin-inline: auto; }

/* Quebra de linha inteligente: reequilibra as linhas pra evitar
   palavra solta / espaço vazio na última linha. Aplicado pontualmente. */
.u-balance { text-wrap: balance; }

.section { padding-block: var(--pad-section); }
.section--paper  { background: var(--paper); }
.section--paper2 { background: var(--paper-2); }
.section--dark   { background: var(--navy); color: var(--paper); }

/* ---------- Tipografia base ---------- */
.kicker {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.kicker::before {
  content: "";
  width: 1.75rem;
  height: 2px;
  background: currentColor;
}
.kicker--accent { color: var(--blue); }
.kicker--light  { color: var(--blue-light); }

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 4.6vw, 2.7rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.prose p { margin-bottom: 1.15rem; }
.prose p:last-child { margin-bottom: 0; }
.prose--lg p { font-size: clamp(1.12rem, 2.4vw, 1.35rem); line-height: 1.55; }
.prose--invert { color: var(--paper); }

/* =================================================================
   BOTÕES (CTA)
   ================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  background: var(--blue);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  padding: 0.95rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(0,0,0,0.12);
  transition: background-color 0.18s ease, transform 0.18s ease;
}
.btn:hover   { background: var(--blue-700); }
.btn:active  { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid #a9d5ec; outline-offset: 2px; }
.btn-sm { padding: 0.6rem 1.05rem; font-size: 0.95rem; }
.btn-lg { padding: 1.1rem 1.9rem; font-size: 1.12rem; }
.btn-block { display: flex; width: 100%; }
.btn-arrow { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* =================================================================
   CABEÇALHO
   ================================================================= */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.85rem;
}
.brand { display: flex; align-items: center; }
.brand-logo { height: 2rem; width: auto; }
.brand-logo--dark { display: none; }   /* versão colorida, some até rolar */
/* Header começa transparente sobre o herói escuro; some o botão até rolar */
.site-header .btn-sm { opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }
.site-header.scrolled {
  background: var(--white);
  box-shadow: 0 1px 0 var(--line), 0 6px 20px rgba(1,39,58,0.06);
}
.site-header.scrolled .brand-logo--light { display: none; }
.site-header.scrolled .brand-logo--dark { display: block; }
.site-header.scrolled .btn-sm { opacity: 1; pointer-events: auto; }

/* =================================================================
   1. HERÓI
   ================================================================= */
.hero {
  background: var(--navy);
  color: var(--paper);
  padding-top: clamp(6.5rem, 16vw, 9rem);
  padding-bottom: clamp(3.5rem, 10vw, 6rem);
  position: relative;
  overflow: hidden;
}
/* Textura sutil de "campo cirúrgico": faixas diagonais discretas, sem brilho */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.22)),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.022) 0 2px, transparent 2px 22px);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(2rem, 6vw, 3.5rem);
  align-items: center;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.15rem, 8.5vw, 4.15rem);
  line-height: 1.02;
  letter-spacing: -0.028em;
  text-wrap: balance;
}
.hero-sub {
  font-size: clamp(1.08rem, 2.6vw, 1.3rem);
  line-height: 1.55;
  color: #cfe1ea;
  margin-top: 1.4rem;
  max-width: 34rem;
}
.hero-actions { margin-top: 2.1rem; }
.hero-support {
  font-size: 0.92rem;
  color: #8fb3c6;
  margin-top: 1rem;
}

/* =================================================================
   MOLDURAS DE IMAGEM (herói e bio)
   ================================================================= */
.hero-media {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

.sobre-media {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  max-width: 22rem;
  box-shadow: 0 18px 45px rgba(1, 39, 58, 0.18);
}
.sobre-media img { width: 100%; height: 100%; object-fit: cover; }

/* =================================================================
   3. A VIRADA
   ================================================================= */
.pullquote {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 6.5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-top: 2.75rem;
  padding-top: 2.25rem;
  border-top: 1px solid rgba(255,255,255,0.16);
  text-wrap: balance;
}
.pullquote em {
  font-style: normal;
  color: var(--blue-light);
  position: relative;
}
.pullquote em::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -0.08em;
  height: 3px;
  background: var(--blue-light);
}

/* =================================================================
   4. DEIXA EU ME APRESENTAR
   ================================================================= */
.sobre-grid {
  display: grid;
  gap: clamp(1.75rem, 5vw, 3rem);
  align-items: center;
}
.sobre-copy .prose { margin-top: 1.4rem; font-size: 1.1rem; }

/* =================================================================
   5. O QUE TEM DENTRO
   ================================================================= */
.dentro-grid {
  display: grid;
  gap: clamp(2rem, 6vw, 3.5rem);
  align-items: start;
}
.dentro-list {
  margin-top: 1.9rem;
  border-top: 1px solid var(--line);
}
.dentro-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.1rem;
  align-items: baseline;
  padding-block: 1.15rem;
  border-bottom: 1px solid var(--line);
}
.dentro-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
  padding-top: 0.1rem;
}
.dentro-text { font-size: 1.06rem; line-height: 1.5; }
.dentro-head .btn { margin-top: 2rem; }
.dentro-mockup { display: flex; justify-content: center; }
.dentro-mockup img {
  width: 100%;
  max-width: 27rem;
  height: auto;
  filter: drop-shadow(0 22px 40px rgba(1, 39, 58, 0.28));
}

/* =================================================================
   6. QUEM JÁ PASSOU POR ISSO (prova social)
   ================================================================= */
.prova-chamada {
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  line-height: 1.45;
  font-weight: 500;
  margin-top: 0.25rem;
}
.prova-head { margin-bottom: clamp(2rem, 5vw, 3rem); }

/* Parede de depoimentos: mosaico (bento) que respeita o formato de cada print. */
.prova-wall {
  column-count: 2;
  column-gap: clamp(0.7rem, 2vw, 1.1rem);
}
.prova-item {
  display: block;
  break-inside: avoid;
  margin-bottom: clamp(0.7rem, 2vw, 1.1rem);
  border-radius: 10px;
  overflow: hidden;
  background: var(--navy);
  box-shadow: 0 6px 20px rgba(1, 39, 58, 0.12);
}
.prova-item img { width: 100%; height: auto; display: block; }

/* =================================================================
   7. A OFERTA
   ================================================================= */
.oferta-card {
  max-width: 44rem;
  margin-inline: auto;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: clamp(1.75rem, 5vw, 3rem);
}
.oferta-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.55rem, 4.4vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.preco { color: var(--blue-light); white-space: nowrap; }
.oferta-arg {
  color: #cfe1ea;
  font-size: 1.08rem;
  margin-top: 1.15rem;
}
.oferta-card .btn { margin-top: 2rem; }
.oferta-selos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.75rem;
  margin-top: 1.6rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.oferta-selos li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.92rem;
  color: #a9c4d3;
}
.oferta-selos svg {
  width: 1.35rem; height: 1.35rem;
  fill: none; stroke: var(--blue-light); stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}

/* =================================================================
   8. FAQ
   ================================================================= */
.faq-list { margin-top: 0.5rem; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  background: none;
  border: none;
  padding: 1.35rem 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.05rem, 2.6vw, 1.25rem);
  color: var(--ink);
  letter-spacing: -0.01em;
}
.faq-chevron {
  width: 1.4rem; height: 1.4rem;
  fill: none; stroke: var(--blue); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}
.faq-q[aria-expanded="true"] .faq-chevron { transform: rotate(180deg); }
.faq-a {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}
.faq-a p {
  padding-bottom: 1.35rem;
  color: var(--ink-soft);
  font-size: 1.04rem;
  max-width: 38rem;
}

/* =================================================================
   9. FECHAMENTO
   ================================================================= */
.fechamento-symbol {
  width: clamp(3.75rem, 12vw, 5rem);
  height: auto;
  margin: 0 auto 1.75rem;
  opacity: 0.95;
}
.fechamento-lead {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 4.6vw, 2.35rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.fechamento-preco {
  font-size: clamp(1.1rem, 2.8vw, 1.3rem);
  color: #cfe1ea;
  margin-top: 1.1rem;
}
.fechamento .btn { margin-top: 2rem; }

/* =================================================================
   RODAPÉ
   ================================================================= */
.site-footer {
  background: #011c2a;
  color: #8fb3c6;
  padding-block: 2.75rem;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;   /* impede a imagem de esticar na largura toda */
  gap: 1.1rem;
}
.footer-logo { height: 1.9rem; width: auto; }
.footer-note { font-size: 0.9rem; max-width: 34rem; }

/* =================================================================
   CTA FIXO NO CELULAR
   ================================================================= */
.mobile-cta {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 60;
  display: none;
  align-items: center;
  gap: 0.9rem;
  padding: 0.7rem clamp(1rem, 5vw, 1.25rem);
  padding-bottom: calc(0.7rem + env(safe-area-inset-bottom));
  background: var(--paper);
  box-shadow: 0 -2px 18px rgba(0,0,0,0.14);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform 0.28s ease;
}
.mobile-cta.visible { transform: translateY(0); }
.mobile-cta-price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--ink);
  flex-shrink: 0;
}
.mobile-cta .btn { flex: 1; }

/* =================================================================
   RESPONSIVO — do celular pra cima
   ================================================================= */
@media (max-width: 47.9375em) {
  .mobile-cta { display: flex; }
  /* Espaço no fim da página pra barra fixa não cobrir o rodapé */
  body { padding-bottom: calc(4.9rem + env(safe-area-inset-bottom)); }
  /* No celular, a foto do herói não precisa ocupar tanta altura */
  .hero-media { max-width: 24rem; margin-inline: auto; }
}

@media (min-width: 48em) {
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; }

  .sobre-grid { grid-template-columns: 0.8fr 1.2fr; }
  .sobre-media { justify-self: start; }

  .dentro-grid { grid-template-columns: 1.15fr 0.85fr; }
  .dentro-mockup { position: sticky; top: 6rem; }
  .dentro-mockup img { max-width: 30rem; }

  .prova-wall { column-count: 3; }
}

/* =================================================================
   ACESSIBILIDADE — respeita quem prefere menos movimento
   ================================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
