/* ============================================================
   BLOG — Dr. Pedro Ivo Machado
   Folha de estilo própria do blog (independente do Tailwind).
   Mesmos tokens visuais do site principal.
   ============================================================ */

:root {
  --ink: #0F2744;
  --ink-soft: #23456b;
  --paper: #F8F9FB;
  --mist: #E7ECF2;
  --tint: #EEF3F9;
  --accent: #2F6FB5;
  --accent-700: #265a92;
  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
}

::selection { background: var(--accent); color: #fff; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-700); }

img { max-width: 100%; display: block; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* ---------- Skip link ---------- */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip:focus { left: 16px; top: 16px; color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s ease, border-color .3s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--mist);
  box-shadow: 0 1px 2px rgba(15,39,68,.05);
}
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; gap: 16px;
}
.site-header .logo img { height: 42px; width: auto; }
.site-header nav {
  display: none; align-items: center; gap: 34px;
  font-size: 15px; color: rgba(15,39,68,.75);
}
.site-header nav a { color: inherit; }
.site-header nav a:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
@media (min-width: 1024px) { .site-header nav { display: flex; } }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  padding: 10px 20px; border-radius: 999px; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer; transition: background .2s, color .2s;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(15,39,68,.08); }
.btn-primary:hover { background: var(--accent-700); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--mist); }
.btn-ghost:hover { background: var(--paper); color: var(--ink); }
.btn-lg { font-size: 16px; padding: 15px 28px; }
.btn-call .label { display: none; }
@media (min-width: 640px) { .btn-call .label { display: inline; } }

/* ---------- Eyebrow ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--accent); margin: 0 0 18px;
}
.eyebrow .rule { width: 32px; height: 1px; background: var(--accent); }

/* ---------- Blog index ---------- */
.blog-hero { padding: 64px 0 36px; }
.blog-hero h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(34px, 5vw, 52px); line-height: 1.06; letter-spacing: -0.02em;
  margin: 0; color: var(--ink); max-width: 16ch;
}
.blog-hero p {
  font-size: 19px; color: rgba(15,39,68,.7); margin: 20px 0 0; max-width: 56ch;
}

.post-list { padding: 8px 0 80px; display: grid; gap: 0; }
.post-card {
  display: grid; grid-template-columns: 1fr; gap: 20px;
  padding: 36px 0; border-top: 1px solid var(--mist);
  align-items: center; transition: transform .2s ease;
}
.post-card:last-child { border-bottom: 1px solid var(--mist); }
.post-card .thumb {
  border-radius: 14px; overflow: hidden; background: var(--tint);
  aspect-ratio: 16/10;
}
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .meta {
  font-size: 13px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--accent); margin: 0 0 12px; font-weight: 500;
}
.post-card h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(24px, 3vw, 31px); line-height: 1.14; letter-spacing: -0.01em;
  margin: 0; color: var(--ink);
}
.post-card h2 a { color: inherit; }
.post-card h2 a:hover { color: var(--accent); }
.post-card .excerpt { font-size: 17px; color: rgba(15,39,68,.68); margin: 14px 0 0; max-width: 60ch; }
.post-card .more {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 15px; font-weight: 500; color: var(--accent); margin-top: 18px;
}
.post-card .more svg { width: 16px; height: 16px; transition: transform .2s; }
.post-card:hover .more svg { transform: translateX(3px); }
@media (min-width: 760px) {
  .post-card { grid-template-columns: 300px 1fr; gap: 40px; }
  .post-card.featured { grid-template-columns: 1fr; }
  .post-card.featured .thumb { aspect-ratio: 21/9; }
  .post-card.featured h2 { font-size: clamp(30px, 4vw, 42px); }
}

/* ---------- Article ---------- */
.article-head { padding: 56px 0 0; }
.article-head .back {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 500; color: var(--accent); margin-bottom: 28px;
}
.article-head .back svg { width: 15px; height: 15px; }
.article-head .meta {
  font-size: 13px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--accent); font-weight: 500; margin: 0 0 18px;
  display: flex; flex-wrap: wrap; gap: 8px 16px;
}
.article-head h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(32px, 5vw, 50px); line-height: 1.07; letter-spacing: -0.02em;
  margin: 0; color: var(--ink); max-width: 20ch;
}
.article-head .standfirst {
  font-size: 21px; line-height: 1.5; color: rgba(15,39,68,.72);
  margin: 22px 0 0; max-width: 60ch;
}
.article-cover {
  margin: 44px 0 0; border-radius: 18px; overflow: hidden;
  background: var(--tint); aspect-ratio: 21/9;
}
.article-cover img { width: 100%; height: 100%; object-fit: cover; }

.prose { padding: 8px 0 16px; font-size: 18.5px; line-height: 1.72; color: #2a3f57; }
.prose > * { margin-inline: auto; }
.prose p { margin: 0 0 24px; }
.prose h2 {
  font-family: var(--serif); font-weight: 600; color: var(--ink);
  font-size: clamp(25px, 3.4vw, 32px); line-height: 1.18; letter-spacing: -0.01em;
  margin: 52px 0 18px;
}
.prose h3 {
  font-family: var(--serif); font-weight: 600; color: var(--ink);
  font-size: 22px; line-height: 1.25; margin: 36px 0 12px;
}
.prose strong { color: var(--ink); font-weight: 600; }
.prose ul, .prose ol { margin: 0 0 24px; padding-left: 0; list-style: none; }
.prose ul li, .prose ol li { position: relative; padding-left: 30px; margin-bottom: 12px; }
.prose ul li::before {
  content: ""; position: absolute; left: 4px; top: 12px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}
.prose ol { counter-reset: item; }
.prose ol li { counter-increment: item; }
.prose ol li::before {
  content: counter(item); position: absolute; left: 0; top: 1px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--tint); color: var(--accent);
  font-size: 13px; font-weight: 600; font-family: var(--sans);
  display: flex; align-items: center; justify-content: center;
}
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(47,111,181,.35); }

/* Callout box */
.callout {
  background: var(--tint); border-radius: 16px; padding: 28px 30px;
  margin: 36px 0; font-size: 17.5px; line-height: 1.65;
}
.callout .callout-title {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-weight: 600; color: var(--ink);
  font-size: 16px; margin: 0 0 10px; text-transform: none; letter-spacing: 0;
}
.callout .callout-title svg { width: 20px; height: 20px; color: var(--accent); flex-shrink: 0; }
.callout p:last-child { margin-bottom: 0; }

/* Key-facts strip */
.keyfacts {
  display: grid; gap: 1px; background: var(--mist);
  border: 1px solid var(--mist); border-radius: 16px; overflow: hidden;
  margin: 40px 0;
}
.keyfacts .kf { background: var(--paper); padding: 22px 24px; }
.keyfacts .kf .n { font-family: var(--serif); font-size: 30px; color: var(--ink); line-height: 1; }
.keyfacts .kf .l { font-size: 14px; color: rgba(15,39,68,.6); margin-top: 8px; }
@media (min-width: 640px) { .keyfacts { grid-template-columns: repeat(3, 1fr); } }

/* Medical disclaimer */
.disclaimer {
  border-top: 1px solid var(--mist); margin-top: 48px; padding-top: 28px;
  font-size: 15px; color: rgba(15,39,68,.55); line-height: 1.6;
}
.disclaimer strong { color: rgba(15,39,68,.75); }

/* Source note */
.source-note { font-size: 14.5px; color: rgba(15,39,68,.5); margin-top: 14px; }

/* ---------- Article CTA ---------- */
.article-cta {
  margin: 56px 0 0; background: var(--ink); color: #fff;
  border-radius: 20px; padding: 44px 40px; text-align: center;
}
.article-cta h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(24px, 3.4vw, 32px); line-height: 1.15; margin: 0 0 14px;
  color: #fff; max-width: 24ch; margin-inline: auto;
}
.article-cta p { color: rgba(255,255,255,.72); font-size: 17px; margin: 0 0 26px; max-width: 52ch; margin-inline: auto; }
.article-cta .btn-primary { background: #fff; color: var(--ink); }
.article-cta .btn-primary:hover { background: var(--paper); color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.7); margin-top: 80px; }
.site-footer .cols {
  display: grid; grid-template-columns: 1fr; gap: 40px; padding: 56px 0;
}
.site-footer .logo-white img { height: 46px; width: auto; }
.site-footer p { font-size: 15px; line-height: 1.6; margin: 22px 0 0; max-width: 36ch; }
.site-footer .reg { font-size: 14px; color: rgba(255,255,255,.5); margin-top: 18px; }
.site-footer .col-title {
  font-size: 13px; text-transform: uppercase; letter-spacing: .14em;
  color: rgba(255,255,255,.4); margin: 0 0 16px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer ul li { margin-bottom: 12px; font-size: 15px; }
.site-footer ul li a { color: rgba(255,255,255,.7); }
.site-footer ul li a:hover { color: #fff; }
.site-footer .bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding: 26px 0;
  display: flex; flex-direction: column; gap: 10px;
  font-size: 13px; color: rgba(255,255,255,.45);
}
@media (min-width: 640px) {
  .site-footer .cols { grid-template-columns: 2fr 1fr 1fr; }
  .site-footer .bottom { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1 !important; transform: none !important; transition: none !important; } }

a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
