/* ============================================================
   Pesquisa FAPESP — Layout template (clean rebuild)
   Design tokens extraídos da página de referência
   ============================================================ */

:root {
  /* Cores */
  --color-ink:        #161616;  /* fundo escuro / texto principal */
  --color-paper:      #f4f3ee;  /* off-white quente (seções claras) */
  --color-white:      #ffffff;
  --color-gold:       #e5b80b;  /* destaque (logo, badges, eyebrow) */
  --color-muted:      #6b6b68;  /* texto secundário */
  --color-muted-dark: #b3b3ad;  /* texto secundário sobre fundo escuro */
  --color-border:     #dddcd6;  /* bordas sutis */
  --color-ink-80:     rgba(22, 22, 22, 0.9);

  /* Tipografia */
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-sans:  "Public Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  /* Espaçamento / layout */
  --maxw: 1120px;
  --radius: 6px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

/* --------- Reset enxuto --------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-ink);
  background: var(--color-paper);
  line-height: 1.6;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* --------- Utilidades --------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin: 0 0 1rem;
}
.lead {
  font-size: 1.125rem;
  color: var(--color-muted);
  max-width: 44ch;
}
.section-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
}

/* --------- Header --------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-ink-80);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--color-white);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 1.5rem;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 20px; width: auto; }
.nav {
  display: flex;
  gap: 2rem;
  margin-left: auto;
}
.nav a {
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--color-muted-dark);
  transition: color 0.15s ease;
}
.nav a:hover { color: var(--color-white); }

/* --------- Hero (escuro) --------- */
.hero {
  background: var(--color-ink);
  color: var(--color-white);
  padding-block: clamp(3.5rem, 8vw, 6rem);
}
.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 5.5vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 1.25rem;
}
.hero .lead { color: var(--color-muted-dark); }

/* Capas da revista */
.cover {
  margin: 0;
  justify-self: end;
  width: 100%;
  max-width: 480px;
}
/* A foto tem fundo escuro próprio: as bordas se desfazem para ela se fundir ao fundo da seção */
.cover img { width: 100%; height: auto;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 95%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 12%, #000 86%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 95%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 12%, #000 86%, transparent 100%);
  mask-composite: intersect; }

.hero-acoes { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.hero-acoes .btn { width: auto; margin-top: 0; }
.selos { list-style: none; margin: 1.75rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; font-size: 0.92rem; color: var(--color-muted-dark); }
.selos li { display: flex; align-items: center; gap: 0.45rem; }
.selos svg { width: 18px; height: 18px; fill: none; stroke: var(--color-gold); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* --------- Seção clara genérica --------- */
.section {
  padding-block: clamp(3.5rem, 7vw, 5.5rem);
}
.section--paper { background: var(--color-paper); }
.section--white { background: var(--color-white); }

/* --------- Grade de preços --------- */
.pricing-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.pricing-head .note { color: var(--color-muted); font-size: 0.95rem; max-width: 36ch; margin: 0 0 1rem; }
.pricing-head .section-title { margin-bottom: 0; max-width: 22ch; }
.plans {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.plan {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.plan p { margin: 0; }
.plan .btn { margin-top: auto; }
.plan .per-edition { margin-bottom: 1.5rem; }
@media (hover: hover) { .plan:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -24px rgba(22, 22, 22, 0.45); } }
.plan--highlight { border-color: var(--color-gold); border-width: 2px; }
.plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.plan-head h3 {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-ink);
}
.badge {
  background: var(--color-gold);
  color: var(--color-ink);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  white-space: nowrap;
}
.plan .from { color: var(--color-muted); font-size: 0.95rem; }
.plan .from s { opacity: 0.7; }
.plan .price {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 3.25rem;
  line-height: 1;
  margin: 0.25rem 0 0.75rem;
}
.plan .discount { font-weight: 700; font-size: 0.95rem; }
.plan .per-edition { color: var(--color-muted); font-size: 0.9rem; margin-top: 0.25rem; }

/* Botão */
.btn {
  display: inline-block;
  margin-top: 1.5rem;
  width: 100%;
  text-align: center;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--color-ink);
  background: var(--color-ink);
  color: var(--color-white);
  transition: opacity 0.15s ease, transform 0.05s ease;
}
.btn:hover { opacity: 0.88; }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--color-ink); }

.fine-print {
  margin-top: 2rem;
  font-size: 0.82rem;
  color: var(--color-muted);
}

/* --------- Passos (como assinar) --------- */
.steps {
  list-style: none;
  padding: 0;
  margin: 2.5rem 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  counter-reset: step;
}
.steps li {
  background: var(--color-paper);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.steps li .step-n {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-gold);
  font-weight: 700;
}
.steps li h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.3rem;
  margin: 0.5rem 0 0.4rem;
}
.steps li p { margin: 0; color: var(--color-muted); font-size: 0.95rem; }

/* --------- FAQ --------- */
.faq { max-width: 760px; }
.faq details {
  border-bottom: 1px solid var(--color-border);
  padding: 1.15rem 0;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--color-gold);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0.75rem 0 0; color: var(--color-muted); }

/* --------- Botões extras --------- */
.btn { cursor: pointer; }
.btn--gold { background: var(--color-gold); border-color: var(--color-gold); color: var(--color-ink); font-weight: 700; }
.btn--linha { background: transparent; border-color: rgba(255, 255, 255, 0.35); color: var(--color-white); }
.btn--sm { width: auto; margin-top: 0; padding: 0.5rem 1rem; font-size: 0.92rem; white-space: nowrap; }
.btn--auto { width: auto; padding-inline: 1.75rem; }
.btn:focus-visible, .nav a:focus-visible, .faq summary:focus-visible, .site-footer a:focus-visible { outline: 3px solid var(--color-gold); outline-offset: 3px; }
.eyebrow--muted { color: var(--color-muted); }
.lead--largo { max-width: 60ch; }
.centro { text-align: center; margin-top: 1rem; }

/* --------- A revista: texto + foto --------- */
.revista { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.reconhecimento { margin: 2rem 0 0; padding-left: 1rem; border-left: 3px solid var(--color-gold); color: var(--color-muted); }
.reconhecimento strong { color: var(--color-ink); }
/* Mosaico de fotos: uma grande e duas menores */
.mosaico { display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; aspect-ratio: 1 / 1.05; width: 100%; max-width: 500px; justify-self: end; }
.mosaico figure { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--color-border); }
.mosaico img { width: 100%; height: 100%; object-fit: cover; }
.mosaico .m-grande { grid-row: 1 / 3; }
.mosaico .m-a img { object-position: 50% 25%; }
.mosaico .m-b img { object-position: 50% 40%; }

/* --------- Faixa com foto (livraria) --------- */
.faixa { position: relative; isolation: isolate; background: var(--color-ink); color: var(--color-white); padding-block: clamp(4rem, 11vw, 8rem); overflow: hidden; }
.faixa > img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.faixa::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(22, 22, 22, 0.92) 0%, rgba(22, 22, 22, 0.72) 42%, rgba(22, 22, 22, 0.15) 100%); }
.faixa h2 { font-family: var(--font-serif); font-weight: 500; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.12; letter-spacing: -0.01em; margin: 0; max-width: 16ch; }
.faixa .btn { margin-top: 1.75rem; }

/* --------- Dúvidas + atendimento --------- */
.duvidas { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.atendimento { position: sticky; top: 88px; background: var(--color-ink); color: var(--color-white); border-radius: var(--radius); padding: 1.75rem; }
.atendimento h3 { font-family: var(--font-serif); font-weight: 500; font-size: 1.45rem; line-height: 1.2; margin: 0 0 0.6rem; }
.atendimento p { margin: 0; color: var(--color-muted-dark); font-size: 0.95rem; }
.atendimento .eyebrow { margin-bottom: 0.75rem; }
.btn--whats { display: flex; align-items: center; justify-content: center; gap: 0.6rem; background: #1faa59; border-color: #1faa59; color: #fff; margin-top: 1.25rem; padding-inline: 0.75rem; font-size: 0.98rem; white-space: nowrap; }
.btn--whats svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contato-link { display: block; margin-top: 0.9rem; text-align: center; font-size: 0.95rem; color: var(--color-white); font-weight: 600; word-break: break-word; }

/* --------- Chamada final --------- */
.final { background: var(--color-ink); color: var(--color-white); padding-block: clamp(2.5rem, 6vw, 4rem); border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.final .container { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; flex-wrap: wrap; }
.final h2 { font-family: var(--font-serif); font-weight: 500; font-size: clamp(1.6rem, 3.4vw, 2.2rem); line-height: 1.15; margin: 0; max-width: 24ch; }
.final .btn { margin-top: 0; }

/* --------- Footer --------- */
.site-footer {
  background: var(--color-ink);
  color: var(--color-muted-dark);
  padding-block: 3rem 2rem;
  font-size: 0.9rem;
}
.seguranca { list-style: none; margin: 0 0 2.5rem; padding: 0 0 2.5rem; border-bottom: 1px solid rgba(255, 255, 255, 0.1); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; }
.seguranca li { display: flex; gap: 0.85rem; align-items: flex-start; }
.seguranca svg { flex: 0 0 28px; width: 28px; height: 28px; fill: none; stroke: var(--color-gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.seguranca b { display: block; color: var(--color-white); font-size: 0.95rem; margin-bottom: 0.15rem; }
.seguranca span { font-size: 0.85rem; line-height: 1.45; display: block; }
.footer-marcas { display: flex; align-items: center; gap: 1.5rem 2.25rem; flex-wrap: wrap; margin-bottom: 2.25rem; }
.footer-marcas .m-rev { height: 48px; width: auto; }
.footer-marcas .m-gestao { display: flex; align-items: center; gap: 0.85rem; padding-left: 2.25rem; border-left: 1px solid rgba(255, 255, 255, 0.2); font-size: 0.8rem; }
.footer-marcas .m-funep { height: 38px; width: auto; }
.site-footer .footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
}
.site-footer h4 {
  color: var(--color-white);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 0.6rem;
}
.site-footer p { margin: 0 0 0.4rem; }
.site-footer a { color: var(--color-gold); text-underline-offset: 3px; }
.footer-fim { margin: 2.5rem 0 0; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.1); font-size: 0.8rem; }

/* --------- WhatsApp flutuante e barra de compra do celular --------- */
.whats-flutuante { position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 56px; height: 56px; border-radius: 50%; background: #1faa59; color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.5); transition: transform 0.15s ease; }
.whats-flutuante:hover { transform: scale(1.06); }
.whats-flutuante svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.barra-celular { display: none; }

/* --------- Responsivo --------- */
@media (max-width: 980px) {
  .seguranca, .site-footer .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .duvidas { grid-template-columns: 1fr; }
  .atendimento { position: static; }
}
@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .cover { max-width: 360px; justify-self: center; }
  .plans { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .nav { display: none; }
  .revista { grid-template-columns: 1fr; }
  .mosaico { justify-self: start; max-width: 100%; aspect-ratio: 1 / 0.9; }
  .faixa::after { background: linear-gradient(180deg, rgba(22, 22, 22, 0.88) 0%, rgba(22, 22, 22, 0.7) 100%); }
  .pricing-head { margin-bottom: 1.75rem; }

  /* Barra de compra fixa no pé da tela */
  .barra-celular { display: flex; align-items: center; justify-content: space-between; gap: 1rem; position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom)); background: var(--color-ink); color: var(--color-white); border-top: 1px solid rgba(255, 255, 255, 0.12); transform: translateY(110%); transition: transform 0.25s ease; }
  .barra-celular.visivel { transform: none; }
  .barra-celular span { font-size: 0.78rem; color: var(--color-muted-dark); line-height: 1.3; }
  .barra-celular b { display: block; font-size: 1rem; color: var(--color-white); }
  .whats-flutuante { bottom: 84px; right: 14px; width: 50px; height: 50px; }
  .site-footer { padding-bottom: 6rem; }
}
@media (max-width: 560px) {
  .brand img { height: 17px; }
  .hero-acoes .btn { flex: 1 1 100%; }
  .plan { padding: 1.5rem; }
  .plan .price { font-size: 2.75rem; }
  .seguranca, .site-footer .footer-grid { grid-template-columns: 1fr; }
  .footer-marcas .m-gestao { padding-left: 0; border-left: 0; }
  .final .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .plan, .barra-celular, .whats-flutuante { transition: none; }
}
