/* =============================================================
   MEMÓRIA VIVA — folha de estilos compartilhada das reportagens
   ============================================================= */

:root {
  --noite:     #2E2A27;   /* marrom escuro — texto e seções escuras */
  --indigo:    #B65E4A;   /* terracota — destaque */
  --esmeralda: #B65E4A;   /* terracota */
  --ambar:     #B65E4A;   /* terracota */
  --oliva:     #6F7B5C;   /* verde oliva/musgo — header e rodapé */
  --cinza:     #7A7D72;
  --areia:     #F6F1EA;   /* claro quente */

  --on-dark-1: #FFFFFF;
  --on-dark-2: #E8E2D8;
  --on-dark-3: #C5BEB1;

  --photo-bg:  #DDD6C9;
  --footer-bg: #6F7B5C;
  --footer-rule: rgba(255,255,255,0.18);

  --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
html, body {
  margin: 0; padding: 0;
  background: var(--on-dark-1);
  color: var(--noite);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: rgba(182,94,74,0.30); color: var(--noite); }

/* ---------- NAVBAR ---------- */
.navbar {
  position: sticky; top: 0; z-index: 100;
  height: 64px;
  background: var(--oliva);
  color: var(--on-dark-1);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem;
}
/* Preenche a safe-area (notch) com a cor do navbar no iOS */
.navbar::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: env(safe-area-inset-top, 0px);
  background: var(--oliva);
  z-index: 101;
  pointer-events: none;
}
.nav-brand { display: flex; flex-direction: column; line-height: 1.15; }
.nav-brand .logo { font-size: 1.1rem; font-weight: 800; letter-spacing: -0.01em; color: var(--on-dark-1); }
.nav-brand .tagline { font-size: 0.7rem; color: var(--on-dark-3); font-weight: 400; margin-top: 2px; }
.back-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.82rem; font-weight: 500;
  color: var(--on-dark-1);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  transition: color 0.18s ease, background 0.18s ease;
}
.back-link:hover { color: var(--areia); background: rgba(255,255,255,0.08); }

/* ---------- HERO ---------- */
.article-hero {
  position: relative;
  min-height: 60vh;
  /* Para usar foto real, substitua background-color por:
     background: url('foto.jpg') center/cover no-repeat;
     (o overlay escuro acima garante leitura mesmo sobre fotos claras) */
  background-color: var(--noite);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.article-hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 25% 30%, rgba(182,94,74,0.26) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 65%, rgba(111,123,92,0.20) 0%, transparent 55%);
  z-index: 0;
}
.article-hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(46,42,39,0.55) 0%, rgba(46,42,39,0.80) 60%, rgba(46,42,39,0.96) 100%);
  z-index: 1;
}
.article-hero .photo-hint {
  position: absolute; top: 1rem; right: 1rem; z-index: 2;
  font-size: 0.65rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  font-weight: 600;
}
.hero-inner {
  position: relative; z-index: 2;
  max-width: 900px; width: 100%;
  margin: 0 auto;
  padding: 0 2rem 4rem;
  color: var(--on-dark-1);
}
.section-tag {
  display: inline-block;
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 2px;
  background: var(--indigo);
  color: var(--on-dark-1);
  margin-bottom: 1rem;
}
.section-tag.t-saude       { background: var(--indigo); }
.section-tag.t-comportamento { background: var(--indigo); }
.section-tag.t-economia    { background: var(--indigo); }

.article-hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  max-width: 780px;
  text-wrap: balance;
  color: var(--on-dark-1);
}
.article-hero .deck {
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--on-dark-2);
  max-width: 640px;
  margin: 0 0 1.25rem;
  text-wrap: pretty;
}
.byline {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--on-dark-3);
}
.byline .avatar-mini {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--indigo);
  color: var(--on-dark-1);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.04em;
}
.byline .sep { color: rgba(255,255,255,0.25); }

/* ---------- META BAR ---------- */
.meta-bar {
  background: var(--areia);
  border-bottom: 1px solid rgba(46,42,39,0.10);
}
.meta-inner {
  max-width: 900px; margin: 0 auto;
  padding: 0.9rem 2rem;
  display: flex; flex-wrap: wrap; gap: 1.5rem;
  font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--cinza); font-weight: 600;
}
.meta-inner .item { display: inline-flex; align-items: center; gap: 0.4rem; }
.meta-inner .item svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.8; }

/* ---------- ARTICLE BODY ---------- */
.article-body {
  max-width: 700px;
  margin: 0 auto;
  padding: 4rem 2rem 5rem;
}
.article-body p {
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.85;
  color: var(--noite);
  margin: 0 0 1.4rem;
  text-wrap: pretty;
}
.article-body h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--noite);
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.pullquote {
  margin: 2.5rem 0;
  padding: 1.5rem 0 1.5rem 1.5rem;
  border-left: 3px solid var(--indigo);
}
.pullquote .q {
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--noite);
  margin: 0;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.pullquote .by {
  display: block;
  margin-top: 0.9rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--cinza);
}

.inline-photo {
  margin: 2.5rem 0;
  background-color: var(--photo-bg);
  height: 320px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--cinza); font-size: 0.78rem;
  letter-spacing: 0.18em; text-transform: uppercase;
  font-weight: 600;
  position: relative;
}
.inline-photo .caption {
  position: absolute; left: 0; right: 0; bottom: -2rem;
  font-size: 0.8rem; letter-spacing: 0; text-transform: none;
  color: var(--cinza); font-weight: 400;
  text-align: left;
  line-height: 1.5;
}
.inline-photo + p { margin-top: 3rem; }

/* ---------- VIDEOCAST PLAYER (página Intimidade) ---------- */
.video-player {
  position: relative;
  background: var(--noite);
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 2.5rem;
  max-width: 900px;
  /* Substitua background por background: url('thumb.jpg') center/cover no-repeat; */
  background-image:
    radial-gradient(ellipse at 30% 30%, rgba(182,94,74,0.28) 0%, transparent 55%),
    radial-gradient(ellipse at 70% 70%, rgba(111,123,92,0.22) 0%, transparent 55%);
}
.video-player .play-big {
  width: 84px; height: 84px;
  border-radius: 50%;
  background: var(--esmeralda);
  color: var(--on-dark-1);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
  box-shadow: 0 8px 30px rgba(182,94,74,0.40);
}
.video-player .play-big:hover { transform: scale(1.06); }
.video-player .play-big svg { width: 32px; height: 32px; fill: currentColor; margin-left: 4px; }
.video-player .badge {
  position: absolute; top: 1rem; left: 1rem;
  font-size: 0.65rem; letter-spacing: 0.16em; text-transform: uppercase;
  font-weight: 700;
  color: var(--esmeralda);
  background: rgba(0,0,0,0.4);
  padding: 4px 10px; border-radius: 2px;
}
.video-meta {
  max-width: 900px; margin: 0 auto 3rem;
  display: flex; flex-wrap: wrap; gap: 1.5rem;
  padding: 0 2rem;
  font-size: 0.85rem; color: var(--cinza);
}
.video-meta strong { color: var(--noite); font-weight: 600; }

/* ---------- RELATED ---------- */
.related {
  background: var(--areia);
  padding: 3.5rem 2rem 4rem;
}
.related-inner { max-width: 900px; margin: 0 auto; }
.related h3 {
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--indigo);
  margin: 0 0 1.5rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}
.related-card {
  background: var(--on-dark-1);
  border-radius: 10px;
  padding: 1.25rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.related-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.10);
}
.related-card .tag {
  font-size: 0.65rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--indigo);
}
.related-card h4 {
  font-size: 1rem; font-weight: 700;
  color: var(--noite); margin: 0;
  line-height: 1.3; letter-spacing: -0.005em;
}
.related-card .arrow {
  margin-top: 0.4rem;
  font-size: 0.82rem; font-weight: 600;
  color: var(--esmeralda);
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--footer-bg);
  color: var(--on-dark-1);
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--footer-rule);
}
.footer-mark { font-size: 0.95rem; font-weight: 600; margin: 0 0 0.4rem; }
.footer-note { font-size: 0.78rem; color: #fff; margin: 0; letter-spacing: 0.02em; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .navbar { padding: 0 1.25rem; }
  .article-hero { min-height: 80vh; }
  .hero-inner { padding: 4rem 1.25rem 3rem; }
  .article-hero h1 { font-size: clamp(1.8rem, 8vw, 2.4rem); }
  .article-hero .deck { font-size: 1rem; }
  .meta-inner { padding: 0.9rem 1.25rem; gap: 1rem; font-size: 0.7rem; }
  .article-body { padding: 3rem 1.25rem 4rem; }
  .article-body p { font-size: 1rem; }
  .pullquote .q { font-size: 1.15rem; }
  .inline-photo { height: 220px; }
  .related { padding: 3rem 1.25rem; }
  .video-meta { padding: 0 1.25rem; }
}

/* ── Figura com legenda ─────────────────────────────── */
.article-figure {
  margin: 2rem 0;
  padding: 0;
}
.article-figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}
.article-figure figcaption {
  font-size: 0.8rem;
  color: #888;
  margin-top: 0.5rem;
  font-style: italic;
  line-height: 1.4;
}

/* ── Video embed ────────────────────────────────────── */
.video-wrap {
  margin: 2rem 0 0.5rem;
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 4px;
  background: #111;
}
.video-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}
.video-caption {
  font-size: 0.82rem;
  color: #888;
  margin-top: 0.45rem;
  margin-bottom: 2rem;
  font-style: italic;
}
