/* ════════════════════════════════════════════════════════════
   BLOG CRÂNIOS — dois temas na mesma folha.
   Padrão: tinta sobre o escuro da casa.
   [data-theme="paper"]: a risografia da Crânios, papel & tinta.
   O leitor escolhe pelo botão do header (guardado em localStorage).
   ════════════════════════════════════════════════════════════ */

:root {
  /* ── tema escuro (padrão) ── */
  --bg: #060607;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-strong: rgba(255, 255, 255, 0.075);
  --panel-soft: rgba(255, 255, 255, 0.025);
  --panel-soft-2: rgba(255, 255, 255, 0.025);
  --panel-hover: rgba(255, 255, 255, 0.055);
  --text: #ffffff;
  --text-2: rgba(255, 255, 255, 0.62);
  --text-3: rgba(255, 255, 255, 0.38);
  --text-soft: rgba(255, 255, 255, 0.78);
  --text-strong-2: rgba(255, 255, 255, 0.82);
  --strong: #ffffff;
  --border: rgba(255, 255, 255, 0.08);
  --border-mid: rgba(255, 255, 255, 0.16);
  --accent: #4b45ff;
  --accent-soft: rgba(75, 69, 255, 0.18);
  --accent-wash: rgba(75, 69, 255, 0.10);
  --accent-line: rgba(75, 69, 255, 0.40);
  --accent-shadow: rgba(75, 69, 255, 0.30);
  --accent-fg: #f2efe6;
  --callout-fg: #dcd9ff;
  --ink: #060607;

  --glow: rgba(255, 255, 255, 0.06);
  --veil: rgba(255, 255, 255, 0.012);
  --hairline: rgba(255, 255, 255, 0.04);
  --watermark: rgba(255, 255, 255, 0.035);
  --grad-a: rgba(255, 255, 255, 0.052);
  --grad-b: rgba(255, 255, 255, 0.018);
  --shadow-lg: rgba(0, 0, 0, 0.35);
  --shadow-md: rgba(0, 0, 0, 0.25);
  --header-bg: rgba(6, 6, 7, 0.78);
  --btn-bg: #ffffff;
  --btn-fg: #000000;
  --btn-shadow: rgba(255, 255, 255, 0.14);
  --btn-shadow-hover: rgba(255, 255, 255, 0.18);

  --radius: 8px;
  --ease: cubic-bezier(0.19, 1, 0.22, 1);
}

:root[data-theme="paper"] {
  /* ── tema papel: uma tinta só, como a LP da Crânios ── */
  --bg: #f2efe6;
  --panel: rgba(39, 34, 204, 0.05);
  --panel-strong: rgba(39, 34, 204, 0.09);
  --panel-soft: rgba(39, 34, 204, 0.02);
  --panel-soft-2: rgba(39, 34, 204, 0.03);
  --panel-hover: rgba(39, 34, 204, 0.07);
  --text: #2722cc;
  --text-2: rgba(39, 34, 204, 0.72);
  --text-3: rgba(39, 34, 204, 0.5);
  --text-soft: rgba(39, 34, 204, 0.72);
  --text-strong-2: rgba(39, 34, 204, 0.82);
  --strong: #2722cc;
  --border: rgba(39, 34, 204, 0.22);
  --border-mid: rgba(39, 34, 204, 0.38);
  --accent: #2722cc;
  --accent-soft: rgba(39, 34, 204, 0.10);
  --accent-wash: rgba(39, 34, 204, 0.05);
  --accent-line: rgba(39, 34, 204, 0.35);
  --accent-shadow: rgba(39, 34, 204, 0.22);
  --accent-fg: #f2efe6;
  --callout-fg: #2722cc;
  --ink: #2722cc;

  --glow: rgba(39, 34, 204, 0.05);
  --veil: rgba(39, 34, 204, 0.02);
  --hairline: rgba(39, 34, 204, 0.05);
  --watermark: rgba(39, 34, 204, 0.06);
  --grad-a: rgba(39, 34, 204, 0.06);
  --grad-b: rgba(39, 34, 204, 0.02);
  --shadow-lg: rgba(39, 34, 204, 0.09);
  --shadow-md: rgba(39, 34, 204, 0.1);
  --header-bg: rgba(242, 239, 230, 0.85);
  --btn-bg: #2722cc;
  --btn-fg: #f2efe6;
  --btn-shadow: rgba(39, 34, 204, 0.18);
  --btn-shadow-hover: rgba(39, 34, 204, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(70% 50% at 50% -5%, var(--glow), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: Outfit, Sora, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  text-rendering: geometricPrecision;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(55% 45% at 50% 40%, var(--glow), transparent 70%),
    radial-gradient(42% 35% at 84% 12%, var(--accent-wash), transparent 72%),
    linear-gradient(180deg, var(--veil), transparent 36%);
}

a {
  color: inherit;
  text-decoration: none;
}

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

main {
  width: 100%;
  max-width: 100%;
}

.container {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.section {
  position: relative;
  padding: clamp(78px, 9vw, 132px) 0;
}

.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.13;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
}

.kicker,
.eyebrow,
.post-meta,
.card-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  color: var(--text-3);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.28em;
  line-height: 1.35;
  text-transform: uppercase;
}

.kicker::before,
.eyebrow::before {
  content: "*";
  color: var(--accent);
  font-family: inherit;
  font-size: 15px;
  line-height: 1;
}

.button,
.header-cta,
.read-more {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  padding: 0 28px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 8px 30px var(--btn-shadow);
  transition: transform 450ms var(--ease), box-shadow 450ms var(--ease);
}

.button:hover,
.header-cta:hover,
.read-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px var(--btn-shadow-hover);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px clamp(24px, 4vw, 48px);
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  backdrop-filter: blur(22px);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  width: 112px;
  min-height: 28px;
  color: var(--strong);
  line-height: 1;
}

.brand svg {
  display: block;
  width: 100%;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 30px);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 500;
}

.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 360ms var(--ease);
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--strong);
}

.site-nav a:hover::after,
.site-nav a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-cta {
  min-height: 46px;
  background: var(--accent);
  color: var(--accent-fg);
  box-shadow: 0 8px 30px var(--accent-shadow);
}

.hero-blog {
  position: relative;
  min-height: calc(92svh - 89px);
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: clamp(62px, 7vw, 108px) 0;
}

.hero-blog::after {
  content: "Blog";
  position: absolute;
  right: -1vw;
  bottom: -1.8vw;
  color: var(--watermark);
  font-size: clamp(96px, 19vw, 284px);
  font-weight: 600;
  line-height: 0.72;
}

.hero-blog__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(380px, 520px);
  align-items: center;
  gap: clamp(44px, 7vw, 112px);
}

.hero-blog__copy {
  text-align: center;
}

.hero-blog__copy h1,
.article-hero h1,
.archive-heading h1,
.empty-page h1 {
  margin: 0;
  max-width: 100%;
  color: var(--strong);
  font-size: clamp(42px, 5.4vw, 74px);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.02;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.hero-blog__copy p,
.article-hero p,
.archive-heading p,
.empty-page p {
  max-width: 660px;
  margin: 28px auto 0;
  color: var(--text-2);
  font-size: 18px;
  font-weight: 300;
  line-height: 1.66;
}

.featured-card,
.post-card,
.popular-box,
.article-content blockquote,
.article-callout,
.article-cta {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), var(--panel-soft));
  box-shadow: 0 30px 80px var(--shadow-lg), inset 0 1px 0 var(--hairline);
  backdrop-filter: blur(18px);
}

.featured-card,
.post-card,
.popular-box,
.category-tile,
.article-content,
.article-callout,
.article-cta {
  min-width: 0;
}

.featured-card {
  border-radius: 16px;
}

.featured-card img,
.post-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.03);
}

.featured-card__content {
  padding: 30px;
}

.featured-card__content > span,
.meta-row,
.article-meta {
  color: var(--text-3);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.featured-card__content h2 {
  margin: 16px 0 14px;
  color: var(--strong);
  font-size: clamp(26px, 2.3vw, 34px);
  font-weight: 500;
  line-height: 1.08;
}

.featured-card__content p,
.post-card p,
.article-cta p {
  margin: 0;
  color: var(--text-2);
  font-weight: 300;
  line-height: 1.58;
}

.featured-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 28px;
}

.featured-card__footer small {
  color: var(--text-3);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 42px;
}

.section-heading h2,
.cta-band h2 {
  margin: 0;
  max-width: 100%;
  color: var(--strong);
  font-size: clamp(34px, 4vw, 56px);
  font-weight: 500;
  line-height: 1.08;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.category-tile {
  min-height: 220px;
  display: grid;
  align-content: space-between;
  gap: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  background: var(--panel-soft-2);
  transition: background 320ms var(--ease), transform 320ms var(--ease), border-color 320ms var(--ease), box-shadow 320ms var(--ease);
}

.category-tile:hover {
  border-color: var(--accent-line);
  background: var(--panel-hover);
  box-shadow: 0 18px 50px var(--shadow-md);
  transform: translateY(-3px);
}

.category-tile span {
  color: var(--strong);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.12;
}

.category-tile p {
  color: var(--text-2);
  font-weight: 300;
  line-height: 1.62;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: clamp(34px, 5vw, 70px);
  align-items: start;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.post-card {
  border-radius: var(--radius);
  transition: transform 320ms var(--ease), border-color 320ms var(--ease);
}

.post-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-mid);
}

.post-card a {
  display: block;
  height: 100%;
}

.post-card:hover .post-thumb {
  filter: saturate(0.98) contrast(1.06);
  transform: scale(1.035);
}

.post-thumb {
  transition: transform 520ms var(--ease), filter 520ms var(--ease);
}

.post-card__body {
  padding: 24px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}

.post-card h2 {
  margin: 18px 0 12px;
  color: var(--strong);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 500;
  line-height: 1.1;
}

.post-card p {
  margin: 0 0 22px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--strong);
  font-weight: 600;
}

.text-link::after,
.read-more::after,
.header-cta::after {
  content: "↗";
  color: currentColor;
}

.popular-box {
  position: sticky;
  top: 116px;
  padding: 26px;
}

.popular-box .popular-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  width: 100%;
  border-top: 1px solid var(--border);
  padding: 20px 0;
}

.popular-box strong {
  color: var(--accent);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-weight: 500;
}

.popular-box span:last-child {
  color: var(--strong);
  font-weight: 500;
  line-height: 1.28;
}

.cta-band {
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 28px max(24px, calc((100% - 1120px) / 2));
  border: 1px solid var(--border);
  border-radius: 16px;
  background:
    radial-gradient(50% 90% at 82% 50%, var(--accent-soft), transparent 72%),
    linear-gradient(180deg, var(--grad-a), var(--grad-b));
  box-shadow: 0 34px 90px var(--shadow-lg);
}

.cta-band__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  gap: 48px;
  align-items: center;
}

.article-shell {
  padding-top: 70px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
  color: var(--text-3);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.article-hero {
  max-width: 980px;
  text-align: center;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-top: 28px;
}

.article-image,
.article-thumb {
  width: 100%;
  max-height: 620px;
  margin: 58px 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  object-fit: cover;
  aspect-ratio: 16 / 8;
  filter: saturate(0.85) contrast(1.04);
}

.article-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 760px);
  gap: clamp(34px, 6vw, 90px);
  align-items: start;
}

.toc {
  position: sticky;
  top: 118px;
  display: grid;
  gap: 12px;
  border-left: 1px solid var(--border-mid);
  padding-left: 18px;
}

.toc span {
  color: var(--accent);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.toc a {
  color: var(--text-2);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.35;
}

.toc a:hover {
  color: var(--strong);
}

.article-content {
  width: 100%;
  max-width: 100%;
  color: var(--text-strong-2);
  font-size: 19px;
  font-weight: 300;
  line-height: 1.78;
  overflow-wrap: anywhere;
}

.article-content h2 {
  margin: 56px 0 18px;
  color: var(--strong);
  font-size: clamp(30px, 3vw, 43px);
  font-weight: 500;
  line-height: 1.1;
}

.article-content h3 {
  margin: 36px 0 14px;
  color: var(--strong);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
}

.article-content p {
  color: var(--text-soft);
}

.article-content ul {
  padding-left: 22px;
}

.article-content li {
  margin: 10px 0;
}

.article-content blockquote,
.article-callout,
.article-cta {
  margin: 42px 0;
  padding: 28px;
}

.article-content blockquote {
  border-left: 4px solid var(--accent);
  color: var(--strong);
  font-size: 25px;
  font-weight: 500;
  line-height: 1.32;
}

.article-callout {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--callout-fg);
  font-weight: 500;
  line-height: 1.45;
}

.article-cta {
  background:
    radial-gradient(70% 90% at 100% 0%, var(--accent-soft), transparent 70%),
    linear-gradient(180deg, var(--panel-strong), var(--panel));
  color: var(--text);
}

.article-cta h2 {
  margin-top: 0;
}

.article-cta a {
  color: var(--accent);
  font-weight: 600;
}

.share-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.share-box span {
  margin-right: 10px;
  color: var(--text-3);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.share-box a {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-mid);
  border-radius: 999px;
  background: var(--hairline);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 56px 0;
  background: rgba(6, 6, 7, 0.76);
  color: var(--text);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px 280px;
  gap: 48px;
}

.site-footer p,
.site-footer span {
  max-width: 440px;
  color: var(--text-2);
  font-weight: 300;
  line-height: 1.6;
}

/* os links das colunas empilham (antes saíam colados numa linha só) */
.footer-grid > div > a {
  display: block;
  margin-top: 9px;
}

.site-footer a {
  color: var(--text-soft);
  font-weight: 300;
}

.site-footer a:hover {
  color: var(--strong);
}

.footer-title {
  margin-bottom: 8px;
  color: var(--text-3);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

@media (max-width: 1020px) {
  .site-nav {
    display: none;
  }

  .hero-blog__grid,
  .content-layout,
  .cta-band__inner,
  .article-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .popular-box,
  .toc {
    position: static;
  }

  .category-grid,
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .container {
    width: min(100% - 32px, 1120px);
  }

  .site-header {
    gap: 14px;
    padding: 14px 16px;
  }

  .brand {
    width: 96px;
  }

  .header-cta {
    display: none;
  }

  .hero-blog {
    min-height: auto;
    padding-top: 54px;
  }

  .hero-blog::after {
    display: none;
  }

  .hero-blog__grid,
  .category-grid,
  .post-grid {
    grid-template-columns: 1fr;
  }

  .hero-blog__copy h1,
  .article-hero h1,
  .archive-heading h1,
  .empty-page h1 {
    font-size: 36px;
    line-height: 1.05;
  }

  .section-heading h2,
  .cta-band h2 {
    font-size: 30px;
    line-height: 1.1;
  }

  .featured-card__footer,
  .article-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .article-meta,
  .article-hero,
  .archive-heading,
  .hero-blog__copy {
    text-align: left;
  }

  .hero-blog__copy p,
  .article-hero p,
  .archive-heading p,
  .empty-page p {
    margin-left: 0;
    margin-right: 0;
  }

  .category-tile {
    min-height: 180px;
  }

  .article-shell {
    padding-top: 44px;
  }

  .article-image,
  .article-thumb {
    margin: 36px 0;
    aspect-ratio: 4 / 3;
  }

  .article-content {
    font-size: 17px;
    line-height: 1.72;
  }

  .article-content blockquote {
    font-size: 22px;
  }

  .button,
  .read-more {
    width: 100%;
    padding: 0 22px;
  }

  .featured-card__content,
  .post-card__body,
  .popular-box,
  .article-content blockquote,
  .article-callout,
  .article-cta {
    padding: 22px;
  }
}

@media (pointer: coarse) {
  .site-nav,
  .header-cta {
    display: none;
  }

  .container {
    width: min(100% - 32px, 1120px);
  }

  .hero-blog__grid,
  .content-layout,
  .cta-band__inner,
  .article-layout,
  .footer-grid,
  .category-grid,
  .post-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .popular-box,
  .toc {
    position: static;
  }

  .hero-blog__copy,
  .article-hero,
  .archive-heading {
    text-align: left;
  }

  .hero-blog__copy p,
  .article-hero p,
  .archive-heading p,
  .empty-page p {
    margin-left: 0;
    margin-right: 0;
  }
}

/* ── Marca Crânios ─────────────────────────────────────────────
   Só o wordmark, sem o símbolo do cérebro: mais limpo no header.
   Duas versões (tinta e papel); o CSS mostra a que contrasta com
   o tema em vigor. */
.brand {
  width: auto;
}

.lockup {
  display: inline-flex;
  align-items: center;
}

.lockup__word {
  height: 22px;
  width: auto;
}

.lockup img.is-paper { display: none; }
:root[data-theme="paper"] .lockup img.is-paper { display: block; }
:root[data-theme="paper"] .lockup img.is-ink { display: none; }

.site-footer .lockup__word { height: 19px; }

/* ── Botão de tema ─────────────────────────────────────────── */
.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: color 300ms var(--ease), border-color 300ms var(--ease), transform 300ms var(--ease);
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--border-mid);
  transform: translateY(-1px);
}

.theme-toggle svg {
  width: 17px;
  height: 17px;
}

.theme-toggle .icon-sun { display: none; }
:root[data-theme="paper"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="paper"] .theme-toggle .icon-moon { display: none; }

/* ── Correções de proporção ────────────────────────────────────
   A moldura da faixa CTA herdava o padding cheio da seção, o que
   deixava um vazio enorme em volta de um conteúdo curto. E a seção
   institucional não tinha regra própria. */
.section.cta-band {
  padding: clamp(44px, 5vw, 72px) 0;
}

.cta-band .cta-band__inner {
  padding: clamp(30px, 3.4vw, 46px) clamp(26px, 3vw, 44px);
}

.cta-band__inner h2 {
  margin: 0;
}

.institutional .cta-band__inner {
  align-items: start;
  gap: clamp(28px, 4vw, 64px);
}

.institutional h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(28px, 3.2vw, 46px);
  font-weight: 500;
  line-height: 1.08;
  text-wrap: balance;
}

.institutional p {
  margin: 0;
  color: var(--text-2);
  font-size: 17px;
  font-weight: 300;
  line-height: 1.7;
}

/* ── Voz da Crânios nos destaques ──────────────────────────── */
.hero-blog__copy h1 em,
.article-hero h1 em,
.archive-heading h1 em,
.section-heading h2 em,
.cta-band__inner h2 em,
.institutional h2 em,
.featured-card__content h2 em {
  font-family: "Crimson Pro", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

@media (max-width: 720px) {
  .lockup__word { height: 18px; }
}

/* ── Cards sem imagem destacada ────────────────────────────────
   Só 2 dos 10 posts têm imagem. Sem tratamento, o card sem thumb
   fica com um buraco do tamanho da imagem do vizinho. A grade
   alinha pelo topo e o card sem imagem ganha uma faixa de tinta
   no lugar, pra manter o ritmo visual. */
.post-grid {
  align-items: start;
}

.post-card:not(:has(.post-thumb)) .post-card__body::before {
  content: "";
  display: block;
  height: 3px;
  width: 56px;
  margin-bottom: 20px;
  background: var(--accent);
  border-radius: 999px;
}

/* fallback pra navegador sem :has() — nada quebra, só não ganha a faixa */
@supports not selector(:has(*)) {
  .post-card__body::before {
    content: none;
  }
}

/* ── Imagens: altura previsível ────────────────────────────────
   O WordPress escreve width/height como atributos no <img>. Com a
   largura definida pelo CSS e a altura vindo do atributo, as duas
   dimensões ficam fixas e o aspect-ratio é ignorado — por isso um
   post com imagem em pé esticava o card (954px de thumb).
   Altura explícita + object-fit resolve e deixa a grade regular. */

.featured-card img,
.post-thumb {
  height: clamp(150px, 17vw, 196px);
  aspect-ratio: auto;
}

.featured-card img {
  height: clamp(190px, 21vw, 260px);
}

.article-image,
.article-thumb {
  height: clamp(220px, 30vw, 420px);
  max-height: none;
  object-fit: cover;
  margin: 40px 0;
}

/* hero mais curto: a chamada e o destaque cabem sem rolar */
.hero-blog {
  min-height: 0;
  padding: clamp(44px, 5.5vw, 80px) 0;
}

.hero-blog__copy h1 {
  font-size: clamp(36px, 4.4vw, 58px);
}

.featured-card__content {
  padding: clamp(20px, 2.2vw, 26px);
}

.featured-card__content h2 {
  font-size: clamp(21px, 1.9vw, 27px);
  margin: 12px 0 10px;
}

/* seções mais compactas, pra caber mais conteúdo na tela */
.section {
  padding: clamp(52px, 6vw, 92px) 0;
}
