:root {
  --bg: #ffffff;
  --bg-soft: #f7f6f3;
  --text: #1f2328;
  --muted: #5b6570;
  --line: #e4e2dd;
  --link: #1a6aa8;
  --link-hover: #124a76;
  --serif: Georgia, "Times New Roman", "Iowan Old Style", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  font-family: var(--sans);
  color: var(--text);
  line-height: 1.65;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* The article page uses a looser line-height for long-form reading */
body.page-article { line-height: 1.75; }

/* Sticky footer: keep the footer at the bottom even when content is short */
body.page-sobre {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body.page-sobre .article-wrap { flex: 1; }

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

.wrap {
  width: min(92vw, 1040px);
  margin: 0 auto;
  padding: 0 8px;
}

/* Header / nav */
header.site {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 8px;
}
.brand {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 1.4rem;
  color: var(--text);
}
.brand:hover { color: var(--text); text-decoration: none; }
nav.menu {
  display: flex;
  gap: 26px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
nav.menu a { color: var(--muted); }
nav.menu a:hover { color: var(--text); text-decoration: none; }

/* Hamburger toggle — hidden on desktop, shown at the mobile breakpoint */
.nav-toggle { display: none; }
.nav-burger { display: none; }
.nav-burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Shared byline strong */
.byline strong { color: var(--text); font-weight: 600; }

/* ============================================================
   Home page (index.html) — body.page-home
   ============================================================ */

/* Hero / featured */
.hero {
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}
.hero-inner {
  padding: 72px 8px 64px;
  max-width: 760px;
}
.hero h1 {
  font-family: var(--serif);
  margin: 0;
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.hero p {
  max-width: 620px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1.12rem;
}
.hero .kicker { margin: 0 0 18px; }

/* Section heading */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 2px solid var(--text);
  padding-bottom: 10px;
  margin: 56px 0 28px;
}
.section-head h2 {
  font-family: var(--serif);
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}
.section-head a {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* Post grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 40px 36px;
  padding-bottom: 24px;
}
.post { display: block; color: var(--text); }
.post:hover { text-decoration: none; }
.post:hover h3 { color: var(--link); }

.thumb {
  aspect-ratio: 742 / 703;
  max-width: 200px;
  border-radius: 4px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #d7d2c8, #b9bec6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--serif);
  font-size: 1.1rem;
  font-style: italic;
  overflow: hidden;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.thumb.alt1 { background: linear-gradient(135deg, #c8b7a6, #8a9ba8); }
.thumb.alt2 { background: linear-gradient(135deg, #a9b7a0, #7f8fa0); }

.post .cat {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--link);
  margin-bottom: 8px;
}
.post h3 {
  font-family: var(--serif);
  margin: 0 0 10px;
  font-size: 1.35rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  transition: color 0.12s ease;
}
.post p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.98rem;
}
.post .byline {
  font-size: 0.85rem;
  color: var(--muted);
}

/* About */
.about {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  margin-top: 64px;
}
.about-inner {
  max-width: 720px;
  padding: 56px 8px;
}
.about h2 {
  font-family: var(--serif);
  margin: 0 0 14px;
  font-size: 1.7rem;
}
.about p { margin: 0; color: var(--muted); font-size: 1.05rem; }

/* ============================================================
   Evangelism page (evangelismo.html) — body.page-evangelismo
   ============================================================ */

/* Page intro */
.intro {
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}
.intro-inner {
  padding: 64px 8px 56px;
  max-width: 720px;
}
.intro h1 {
  font-family: var(--serif);
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.intro p {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.1rem;
}
.intro .kicker { margin: 0 0 16px; }

/* Shared kicker */
.kicker {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--link);
}

/* Tract grid */
.page-evangelismo main { padding: 48px 0 8px; }

.tracts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 36px 32px;
}
.tract {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
}
.tract-preview {
  display: block;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  padding: 18px;
  text-align: center;
}
.tract-preview img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(31, 35, 40, 0.12);
}
.tract-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 20px 22px;
  flex: 1;
}
.tract .cat {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--link);
}
.tract h2 {
  font-family: var(--serif);
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.tract p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.btn-download {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 6px;
  background: var(--link);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.12s ease;
}
.btn-download:hover {
  background: var(--link-hover);
  color: #fff;
  text-decoration: none;
}
.btn-download svg { width: 16px; height: 16px; }

.tract.soon .tract-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  color: var(--muted);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  background: linear-gradient(135deg, #ece8e1, #dfe3e8);
}
.tag-soon {
  margin-top: auto;
  display: inline-block;
  padding: 10px 16px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ============================================================
   Article page (deepfake.html) — body.page-article
   ============================================================ */

.article-wrap {
  width: min(92vw, 720px);
  margin: 0 auto;
  padding: 0 8px;
}
article { padding: 40px 0 48px; }

.back {
  display: inline-block;
  margin-bottom: 28px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--muted);
}
.back:hover { color: var(--link); text-decoration: none; }

.cat {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--link);
  margin: 0 0 14px;
}

h1 {
  font-family: var(--serif);
  margin: 0 0 20px;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.article-wrap .byline {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 28px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
  color: var(--muted);
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f7f6f3 url("../favicon/favicon-96x96.png") center / contain no-repeat;
  flex: none;
}

.lead { font-size: 1.2rem; line-height: 1.7; color: #2b3138; }

.featured { margin: 28px 0 8px; }
.featured img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
}

/* Keep any article image within its container on all screen sizes */
article img {
  max-width: 100%;
  height: auto;
}

/* Ministry e-mail image: responsive, centered, capped on large screens */
.email-img {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  margin: 8px auto;
}

article p {
  color: #2b3138;
  font-size: 1.08rem;
  margin: 0 0 22px;
}

article h2 {
  font-family: var(--serif);
  margin: 40px 0 14px;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
}

blockquote {
  margin: 32px 0;
  padding: 6px 0 6px 26px;
  border-left: 3px solid var(--link);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--text);
}
blockquote cite {
  display: block;
  margin-top: 10px;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.9rem;
  color: var(--muted);
}

.end {
  margin: 44px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 1rem;
  color: var(--muted);
}

/* WhatsApp button */
.whatsapp-wrap {
  text-align: center;
  margin: 1.5rem 0;
}
.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .75rem 1.4rem;
  background: #25D366;
  color: #fff;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}
.whatsapp-btn:hover {
  color: #fff;
  text-decoration: none;
}

/* ============================================================
   Footer (shared, with per-page top spacing)
   ============================================================ */
footer.site {
  border-top: 1px solid var(--line);
  background: var(--text);
  color: #c7ccd2;
  padding: 40px 8px;
  font-size: 0.9rem;
}
.page-article footer.site { margin-top: 56px; }
.page-evangelismo footer.site { margin-top: 64px; }
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: center;
  justify-content: space-between;
}
footer.site a { color: #e6eaef; }
footer.site .foot-brand {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: #fff;
}

@media (max-width: 720px) {
  .nav { flex-wrap: wrap; }

  /* Show the hamburger button */
  .nav-burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    margin: -10px -8px -10px 0;
    padding: 10px;
    cursor: pointer;
  }

  /* Collapse the menu into a full-width dropdown, hidden by default */
  nav.menu {
    display: none;
    flex-direction: column;
    gap: 0;
    width: 100%;
    order: 3;
    font-size: 0.9rem;
    border-top: 1px solid var(--line);
    margin-top: 14px;
  }
  nav.menu a {
    padding: 14px 4px;
    border-bottom: 1px solid var(--line);
  }
  nav.menu a:last-child { border-bottom: none; }

  /* Open state, driven by the checkbox */
  .nav-toggle:checked ~ .menu { display: flex; }

  /* Animate the bars into an X when open */
  .nav-toggle:checked ~ .nav-burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .nav-burger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}
