@font-face {
  font-family: 'Kanopi';
  src: url('../fonts/KanopiBrazil-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Nature';
  src: url('../fonts/ZTNature-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Nature';
  src: url('../fonts/ZTNature-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --petrol:   #4A7C82;
  --terracotta: #82341A;
  --cream:    #FFE3BA;
  --amber:    #FFBC43;
  --ink:      #2A1810;
  --ink-soft: #5C4A3E;

  --font-logo: 'Kanopi', sans-serif;
  --font-heading: 'Nature', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.6;
}

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

/* ---------- Header ---------- */

.site-header {
  background: var(--terracotta);
  padding: 20px 0;
}

.site-header__inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.logo {
  font-family: var(--font-logo);
  font-size: 1.8rem;
  color: var(--cream);
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--cream);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav a:hover {
  text-decoration: underline;
}

/* ---------- Onda decorativa ---------- */

.wave {
  line-height: 0;
  margin-top: -1px;
}

.wave svg {
  width: 100%;
  height: 36px;
  display: block;
  transform: scaleY(-1); /* inverte a onda de cabeça pra baixo */
}

.wave--footer svg {
  height: 44px;
  transform: none; /* aqui não inverte — cai naturalmente para o rodapé */
}

/* ---------- Tags ---------- */

.tag {
  display: inline-block;
  font-size: 0.78rem;
  padding: 2px 10px;
  border-radius: 3px;
  margin-right: 8px;
}

.tag--category {
  background: transparent;
  border: 1px solid var(--petrol);
  color: var(--petrol);
}

.tag--lang {
  background: var(--amber);
  color: var(--ink);
}

/* ---------- Hero ---------- */

.hero {
  padding: 56px 0 40px;
  border-bottom: 1px solid rgba(42, 24, 16, 0.15);
}

.hero__meta { margin: 0 0 14px; }

.hero__title {
  font-family: var(--font-heading);
  font-weight: 900; /* Black — texto grande, aguenta o peso */
  font-synthesis: none; /* impede o navegador de "engordar" a fonte artificialmente */
  font-size: 2.1rem;
  line-height: 1.25;
  margin: 0 0 16px;
  color: var(--terracotta);
}

.hero__dek {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 62ch;
  margin: 0 0 16px;
}

.hero__byline {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- Grid de matérias ---------- */

.grid {
  padding: 8px 0 60px;
}

.card {
  padding: 32px 0;
  border-bottom: 1px solid rgba(42, 24, 16, 0.15);
}

.card:last-child { border-bottom: none; }

.card__meta { margin: 0 0 10px; }

.card__title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-synthesis: none;
  font-size: 1.45rem;
  line-height: 1.3;
  margin: 0 0 10px;
  color: var(--ink);
}

.card__title a,
.hero__link {
  color: inherit;
  text-decoration: none;
}

.card__title a:hover,
.hero__link:hover {
  text-decoration: underline;
}

.hero__link {
  display: inline-block;
  font-weight: 600;
  color: var(--terracotta);
}

.card__dek {
  color: var(--ink-soft);
  max-width: 68ch;
  margin: 0;
}

/* ---------- Página de matéria individual / Sobre ---------- */

.wrap--article {
  max-width: 680px;
}

.article {
  padding: 48px 0 40px;
}

.article__meta { margin: 0 0 14px; }

.article__title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-synthesis: none;
  font-size: 1.99rem;
  line-height: 1.3;
  margin: 0 0 12px;
  color: var(--terracotta);
}

.article__byline {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0 0 32px;
}

.article__body p {
  margin: 0 0 20px;
  max-width: 68ch;
}

.article__body h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--ink);
  margin: 32px 0 14px;
}

.article__body code {
  background: rgba(42, 24, 16, 0.08);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.9em;
  font-weight: 900
}

.article__back {
  padding: 0 0 60px;
}

.article__back a {
  color: var(--petrol);
  text-decoration: none;
  font-size: 0.95rem;
}

.article__back a:hover { text-decoration: underline; }

/* ---------- Busca ---------- */

.search {
  padding: 24px 0 60px;
  border-top: 1px solid rgba(42, 24, 16, 0.15);
}

.search__title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  margin: 0 0 14px;
  font-weight: 900
}

.search__input {
  width: 100%;
  max-width: 420px;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid var(--ink-soft);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
}

.search__input:focus-visible {
  outline: 2px solid var(--petrol);
  outline-offset: 1px;
}

.search__resultados {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

.search__resultados li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(42, 24, 16, 0.1);
}

.search__resultados a {
  color: var(--terracotta);
  text-decoration: none;
  margin-right: 8px;
}

.search__resultados a:hover { text-decoration: underline; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--terracotta);
  color: var(--cream);
  padding: 24px 0;
  font-size: 0.9rem;
}

.site-footer p { margin: 0; }

/* ---------- Responsivo ---------- */

@media (max-width: 600px) {
  .hero__title { font-size: 1.7rem; }
  .card__title { font-size: 1.2rem; }
}

/* ---------- Acessibilidade ---------- */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--petrol);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- Página de links ---------- */

.links-page {
  max-width: 440px;
  padding-top: 48px;
  padding-bottom: 60px;
  text-align: center;
}

.links-page__title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-synthesis: none;
  font-size: 2rem;
  line-height: 1.3;
  margin: 0 0 8px;
  color: var(--terracotta);
}

.links-page__sub {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0 0 32px;
}

.botao {
  display: block;
  margin: 0 0 14px;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--petrol);
  color: var(--cream);
  text-decoration: none;
  transition: transform 0.15s, background 0.15s;
}

.botao strong { font-weight: 600; }
.botao span { display: block; font-size: 0.85rem; opacity: 0.85; }
.botao:hover { transform: translateY(-2px); background: var(--terracotta); }

.links-page__sub span { display: block; }

.links-page__role {
  font-size: 0.85rem;
  opacity: 0.85;
}

/* ---------- Conversa no Bluesky ---------- */

.conversa {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(42, 24, 16, 0.15);
}

.conversa__titulo {
  font-family: var(--font-heading);
  font-weight: 900;
  font-synthesis: none;
  font-size: 1.3rem;
  color: var(--ink);
  margin: 0 0 10px;
}

.conversa__acao {
  margin: 0 0 24px;
}

.conversa__acao a {
  color: var(--petrol);
  text-decoration: none;
  font-weight: 600;
}

.conversa__acao a:hover { text-decoration: underline; }

/* texto de "Carregando…", "Sem respostas" e de erro */
.conversa__lista {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.comentario {
  margin: 0 0 20px;
  padding-left: 14px;
  border-left: 3px solid var(--amber);
  color: var(--ink);
}

/* respostas às respostas */
.comentario .comentario {
  margin: 16px 0 0 12px;
  border-left-color: var(--petrol);
}

.comentario__autor { font-weight: 600; }

.comentario__handle {
  margin-left: 6px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.comentario__texto {
  margin: 4px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.comentario__meta {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.comentario__meta a {
  color: var(--petrol);
  text-decoration: none;
}

.comentario__meta a:hover { text-decoration: underline; }

.views { display: inline-flex; align-items: center; gap: .25em; }
.views svg { vertical-align: -2px; }


/* ---------- Header: botão Menu ---------- */

.site-header__inner { align-items: center; }

.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 0;
  padding: 4px 6px;
  margin-left: -6px;
  color: var(--cream);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}

.menu-btn:hover span { text-decoration: underline; }

.menu-btn:focus-visible,
.drawer a:focus-visible,
.drawer__fechar:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

/* ---------- Menu lateral (drawer) ---------- */

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(42, 24, 16, 0.5);
  z-index: 90;
}

.drawer-overlay[hidden] { display: none; }

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(320px, 86vw);
  background: var(--cream);
  color: var(--ink);
  z-index: 100;
  overflow-y: auto;
  padding: 20px 24px 40px;
  transform: translateX(-100%);
  visibility: hidden;
  transition: transform 0.22s ease, visibility 0.22s;
  box-shadow: 4px 0 24px rgba(42, 24, 16, 0.25);
}

.menu-aberto .drawer {
  transform: none;
  visibility: visible;
}

.menu-aberto { overflow: hidden; }

.drawer__topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-heading);
  font-weight: 900;
  font-synthesis: none;
  font-size: 1.2rem;
  color: var(--terracotta);
  margin-bottom: 8px;
}

.drawer__fechar {
  background: transparent;
  border: 0;
  font-size: 2rem;
  line-height: 1;
  color: var(--terracotta);
  cursor: pointer;
}

.drawer__bloco {
  padding: 16px 0;
  border-bottom: 1px solid rgba(42, 24, 16, 0.15);
}

.drawer__bloco:last-child { border-bottom: none; }

.drawer__titulo {
  font-family: var(--font-heading);
  font-weight: 900;
  font-synthesis: none;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--petrol);
  margin: 0 0 10px;
}

.drawer a {
  color: var(--ink);
  text-decoration: none;
}

.drawer a:hover { text-decoration: underline; color: var(--terracotta); }

.drawer__paginas { display: flex; flex-direction: column; gap: 8px; }

.drawer__secao { margin: 12px 0 4px; font-weight: 600; }

.drawer__lista {
  list-style: none;
  margin: 0 0 8px;
  padding: 0 0 0 14px;
  border-left: 2px solid var(--amber);
}

.drawer__lista--solta { padding-left: 0; border-left: none; }

.drawer__lista li { margin: 4px 0; font-size: 0.95rem; }

.drawer__n {
  font-size: 0.75rem;
  color: var(--ink-soft);
  margin-left: 4px;
}

/* ---------- Páginas de listagem ---------- */

.listagem__cab {
  padding: 48px 0 12px;
  border-bottom: 1px solid rgba(42, 24, 16, 0.15);
}

.listagem__sub {
  margin: 0 0 6px;
  font-size: 0.85rem;
  color: var(--petrol);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.listagem__titulo {
  font-family: var(--font-heading);
  font-weight: 900;
  font-synthesis: none;
  font-size: 2.2rem;
  line-height: 1.15;
  margin: 0 0 16px;
  color: var(--ink);
}

.listagem__vazio { color: var(--ink-soft); padding: 32px 0; }

/* ---------- Tags e bylines como links ---------- */

a.tag { text-decoration: none; }
a.tag--category:hover { background: var(--petrol); color: var(--cream); }

.card__byline {
  margin: 10px 0 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.card__byline a,
.hero__byline a,
.article__byline a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(42, 24, 16, 0.3);
}

.card__byline a:hover,
.hero__byline a:hover,
.article__byline a:hover { text-decoration-color: currentColor; }

/* ---------- Poemas: preserva as quebras de linha ---------- */

.texto--poema p {
  white-space: pre-line;
  margin: 0 0 1.6em;
}

/* ---------- Mobile: o menu lateral assume a navegação ---------- */

@media (max-width: 760px) {
  .nav { display: none; }
  .site-header__inner { justify-content: flex-start; gap: 16px; }
}

/* ---------- Navegação do header em caixinhas ---------- */

/* O .nav ocupa a segunda linha inteira; cada caixinha cresce para preencher a largura. */
.nav {
  flex: 1 1 100%;
  gap: 10px;
}

.nav a {
  flex: 1 1 auto;
  text-align: center;
  white-space: nowrap;
  border: 1px solid var(--cream);
  border-radius: 3px;
  padding: 8px 16px;
  line-height: 1.2;
  transition: background 0.15s, color 0.15s;
}

.nav a:hover {
  background: var(--cream);
  color: var(--terracotta);
  text-decoration: none;
}

/* ---------- Compartilhar ---------- */

.share {
  margin: 40px 0 8px;
  padding-top: 24px;
  border-top: 1px solid rgba(42, 24, 16, 0.15);
}

.share__titulo {
  font-family: var(--font-heading);
  font-weight: 900;
  font-synthesis: none;
  font-size: 1.05rem;
  color: var(--terracotta);
  margin: 0 0 12px;
}

.share__lista {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.share__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  font: inherit;
  font-size: 0.9rem;
  border: 1px solid var(--petrol);
  border-radius: 3px;
  background: transparent;
  color: var(--petrol);
  text-decoration: none;
  cursor: pointer;
}

.share__btn:hover { background: var(--petrol); color: var(--cream); }
.share__btn:disabled { opacity: 0.5; cursor: wait; }

.share__btn--destaque {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: var(--cream);
}
.share__btn--destaque:hover { background: var(--ink); border-color: var(--ink); }
.share__btn[hidden] { display: none; }

/* botão que aparece ao selecionar texto */
.sel-share {
  position: absolute;
  z-index: 50;
  min-height: 40px;
  padding: 0 16px;
  font: inherit;
  font-size: 0.85rem;
  border: 0;
  border-radius: 999px;
  background: var(--terracotta);
  color: var(--cream);
  box-shadow: 0 4px 14px rgba(42, 24, 16, 0.3);
  cursor: pointer;
}
.sel-share:hover { background: var(--ink); }
.sel-share[hidden] { display: none; }

/* diálogo do cartão */
.cartao {
  width: min(440px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--cream);
  color: var(--ink);
  box-shadow: 0 20px 60px rgba(42, 24, 16, 0.45);
}
.cartao::backdrop { background: rgba(42, 24, 16, 0.6); }
.cartao__corpo { padding: 16px 18px 18px; }

.cartao__topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cartao__titulo {
  font-family: var(--font-heading);
  font-weight: 900;
  font-synthesis: none;
  font-size: 1.1rem;
  color: var(--terracotta);
  margin: 0;
}

.cartao__fechar {
  width: 44px;
  height: 44px;
  font-size: 1.6rem;
  line-height: 1;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.cartao__previa {
  display: flex;
  justify-content: center;
  padding: 10px;
  margin-bottom: 12px;
  border-radius: 6px;
  background: rgba(42, 24, 16, 0.08);
}

.cartao__previa canvas {
  display: block;
  max-width: 100%;
  max-height: 46vh;
  width: auto;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(42, 24, 16, 0.25);
}

.cartao__aviso { margin: 0 0 10px; font-size: 0.82rem; color: var(--ink-soft); }

.cartao__grupo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.cartao__rotulo { min-width: 64px; font-size: 0.8rem; color: var(--ink-soft); }

.opcao {
  min-height: 40px;
  padding: 0 12px;
  font: inherit;
  font-size: 0.85rem;
  border: 1px solid var(--petrol);
  border-radius: 3px;
  background: transparent;
  color: var(--petrol);
  cursor: pointer;
}
.opcao[aria-pressed="true"] { background: var(--petrol); color: var(--cream); }

.cartao__acoes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.cartao__acoes .share__btn { flex: 1 1 auto; }

.share-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 100;
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--cream);
  font-size: 0.9rem;
}
