/*
Theme Name: eu falo demais
Theme URI: https://example.com
Author: Gustavo
Description: Tema minimalista para o blog "eu falo demais". Branco e cinzas, Inter, post em destaque na home, grade de posts com imagem e filtro por assunto.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: efd
Tags: blog, minimal, one-column, grid-layout, featured-images, custom-menu, threaded-comments
*/

/* ==========================================================
   Tokens
   ========================================================== */
:root {
  --bg: #FFFFFF;
  --bg-soft: #F6F6F6;
  --text: #1A1A1A;
  --text-body: #2B2B2B;
  --muted: #6B6B6B;
  --subtle: #8A8A8A;
  --line: #EAEAEA;
  --border: #E2E2E2;
  --input-border: #DCDCDC;
  --img-1: #EFEFEF;
  --img-2: #E2E2E2;
  --img-3: #D8D8D8;

  --font: 'Inter', system-ui, -apple-system, sans-serif;

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 6px;
}

/* ==========================================================
   Base
   ========================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, figure { margin: 0; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

.container { max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }

.sr-only, .screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed; top: 12px; left: 12px; width: auto; height: auto; clip: auto; margin: 0;
  padding: 12px 16px; background: var(--text); color: #FFFFFF; border-radius: 8px; z-index: 100;
}

/* ==========================================================
   Header + menus
   ========================================================== */
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px; padding-block: 32px;
}
.logo { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.nav ul, .site-footer ul { display: flex; flex-wrap: wrap; gap: 32px; list-style: none; margin: 0; padding: 0; }
.nav { font-size: 14px; }
.nav a { color: var(--muted); transition: color .2s ease; }
.nav a:hover, .nav .current-menu-item > a { color: var(--text); }

/* ==========================================================
   Componentes
   ========================================================== */
.meta { font-size: 13px; color: var(--subtle); }

.media { overflow: hidden; border-radius: var(--radius); background: var(--img-2); }
.media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.media--hero { aspect-ratio: 16 / 11; }
.media--card { aspect-ratio: 4 / 3; }
.media--cover { aspect-ratio: 16 / 10; border-radius: 4px; }
.card:hover .media img { transform: scale(1.03); }

.card-title { transition: color .2s ease; }
.card:hover .card-title { color: var(--muted); }

.read-more { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.read-more svg { transition: transform .2s ease; }
.card:hover .read-more svg { transform: translateX(4px); }

.chip {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg); color: var(--muted);
  font: 14px var(--font);
  transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}
.chip:hover { color: var(--text); }
.chip.is-active { background: var(--text); border-color: var(--text); color: #FFFFFF; }

.input,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea,
.search-form .search-field {
  min-height: 48px; padding: 0 16px; width: 100%;
  border: 1px solid var(--input-border); border-radius: 8px; background: var(--bg);
  font: 15px var(--font); color: var(--text);
}
.comment-form textarea { padding: 14px 16px; min-height: 140px; resize: vertical; }

.btn,
.comment-form .submit,
.search-form .search-submit {
  min-height: 48px; padding: 0 22px; border: 0; border-radius: 8px;
  background: var(--text); color: #FFFFFF; font: 500 14px var(--font); cursor: pointer;
  transition: opacity .2s ease;
}
.btn:hover, .comment-form .submit:hover, .search-form .search-submit:hover { opacity: .85; }

/* ==========================================================
   Home — hero
   ========================================================== */
.hero { padding-block: clamp(24px, 4vw, 56px) clamp(72px, 9vw, 128px); }
.hero .card { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(28px, 4vw, 64px); }
.hero .media { flex: 999 1 520px; min-width: 0; }
.hero-text { flex: 1 1 340px; display: flex; flex-direction: column; gap: 20px; }
.hero-title { font-size: clamp(32px, 3.6vw, 48px); font-weight: 500; line-height: 1.1; letter-spacing: -0.035em; }
.hero-excerpt { font-size: 17px; line-height: 1.6; color: var(--muted); }

/* ==========================================================
   Grade de posts
   ========================================================== */
.posts { padding-bottom: clamp(80px, 10vw, 140px); }
.posts--archive { padding-top: clamp(32px, 5vw, 72px); }
.posts-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 20px; border-top: 1px solid var(--line); padding-top: 32px; margin-bottom: 40px;
}
.posts-head h1, .posts-head h2 { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; }
.posts-desc { margin: -24px 0 40px; max-width: 640px; font-size: 15px; line-height: 1.6; color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 56px 32px;
}
.grid .card { display: flex; flex-direction: column; gap: 16px; }
.grid .card:nth-child(3n+1) .media { background: var(--img-1); }
.grid .card:nth-child(3n+3) .media { background: var(--img-3); }
.grid .meta { margin-top: 4px; }
.grid .card-title { font-size: 20px; font-weight: 500; line-height: 1.35; letter-spacing: -0.015em; }

.empty { color: var(--subtle); font-size: 15px; }

.pagination { margin-top: 72px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px;
  padding: 0 14px; border: 1px solid var(--border); border-radius: 999px; font-size: 14px; color: var(--muted);
}
.pagination a.page-numbers:hover { color: var(--text); }
.pagination .page-numbers.current { background: var(--text); border-color: var(--text); color: #FFFFFF; }
.pagination .page-numbers.dots { border-color: transparent; }

/* ==========================================================
   Sobre + newsletter
   ========================================================== */
.band { background: var(--bg-soft); }
.band > .container {
  display: flex; flex-wrap: wrap; gap: 48px 96px;
  padding-block: clamp(64px, 8vw, 112px);
}
.band-col { flex: 1 1 380px; display: flex; flex-direction: column; gap: 16px; }
.band-lead { font-size: 22px; font-weight: 500; line-height: 1.45; letter-spacing: -0.015em; }
.newsletter-row { display: flex; flex-wrap: wrap; gap: 8px; }
.newsletter-row .input { flex: 1 1 220px; width: auto; }

/* ==========================================================
   Footer
   ========================================================== */
.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
  padding-block: 32px 48px; font-size: 13px; color: var(--subtle);
}
.site-footer ul { gap: 24px; }
.site-footer a:hover { color: var(--text); }

/* ==========================================================
   Post / página
   ========================================================== */
.article { max-width: 680px; margin: 0 auto; padding: clamp(56px, 8vw, 112px) var(--gutter); }
.back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 13px; color: var(--subtle); }
.back:hover { color: var(--text); }
.article-meta { margin: 32px 0 16px; }
.article-title { font-size: clamp(34px, 4vw, 48px); font-weight: 500; line-height: 1.12; letter-spacing: -0.035em; }
.article-lead { margin-top: 24px; font-size: 20px; line-height: 1.5; color: var(--muted); letter-spacing: -0.01em; }
.article-cover { margin: 56px 0; }
.article-cover figcaption { margin-top: 12px; font-size: 13px; color: var(--subtle); }
.page .prose { margin-top: 48px; }

/* Conteúdo do editor (Gutenberg) */
.prose { font-size: 18px; line-height: 1.75; color: var(--text-body); }
.prose > * + * { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.5em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li + li { margin-top: .4em; }
.prose h2 { margin: 2em 0 .6em; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; color: var(--text); }
.prose h3 { margin: 1.8em 0 .5em; font-size: 19px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.35; color: var(--text); }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--muted); }
.prose strong { font-weight: 600; color: var(--text); }
.prose blockquote, .prose .wp-block-quote {
  margin: 2.2em 0; padding: 0 0 0 24px; border-left: 1px solid var(--text);
  font-size: 24px; font-weight: 500; line-height: 1.4; letter-spacing: -0.02em; color: var(--text);
}
.prose blockquote p { margin: 0; }
.prose blockquote cite { display: block; margin-top: 12px; font-size: 13px; font-weight: 400; font-style: normal; color: var(--subtle); letter-spacing: 0; }
.prose .wp-block-pullquote { margin: 2.4em 0; padding: 32px 0; border-block: 1px solid var(--line); text-align: left; }
.prose .wp-block-pullquote blockquote { border: 0; padding: 0; margin: 0; }
.prose figure, .prose .wp-block-image { margin: 2.4em 0; }
.prose img { border-radius: 4px; }
.prose figcaption, .prose .wp-element-caption { margin-top: 12px; font-size: 13px; line-height: 1.5; color: var(--subtle); text-align: left; }
.prose hr, .prose .wp-block-separator { margin: 3em 0; border: 0; border-top: 1px solid var(--line); }
.prose code { font-size: .9em; background: var(--bg-soft); padding: 2px 6px; border-radius: 4px; }
.prose pre { background: var(--bg-soft); padding: 20px; border-radius: 6px; overflow-x: auto; font-size: 14px; line-height: 1.6; }
.prose pre code { background: none; padding: 0; }
.prose .wp-block-embed iframe, .prose iframe { max-width: 100%; }
.prose .alignwide { margin-inline: calc(-1 * min(120px, 8vw)); max-width: none; }
.prose .alignfull { margin-inline: calc(50% - 50vw); max-width: 100vw; }
.prose .alignfull img, .prose .alignwide img { width: 100%; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.tag {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: 999px; font-size: 13px; color: var(--muted);
}
.tag:hover { color: var(--text); }

.post-nav > .container {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 32px; padding-block: clamp(56px, 7vw, 96px);
}
.post-nav a { display: flex; flex-direction: column; gap: 8px; }
.post-nav .is-next { text-align: right; grid-column: -2; }
.post-nav .card-title { font-size: 20px; font-weight: 500; letter-spacing: -0.015em; line-height: 1.35; }
.post-nav a:hover .card-title { color: var(--muted); }

/* ==========================================================
   Comentários
   ========================================================== */
.comments { max-width: 680px; margin: 0 auto; padding: 0 var(--gutter) clamp(64px, 8vw, 112px); }
.comments-title, .comment-reply-title { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; margin: 0 0 32px; }
.comment-list, .comment-list .children { list-style: none; margin: 0; padding: 0; }
.comment-list .children { padding-left: 24px; border-left: 1px solid var(--line); }
.comment-body { padding: 24px 0; border-top: 1px solid var(--line); font-size: 16px; line-height: 1.65; color: var(--text-body); }
.comment-author { display: flex; align-items: center; gap: 12px; font-weight: 600; color: var(--text); }
.comment-author img { border-radius: 999px; }
.comment-author .says { display: none; }
.comment-metadata { margin: 4px 0 12px; font-size: 13px; color: var(--subtle); }
.comment-content p { margin: 0 0 1em; }
.reply a { font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.comment-respond { margin-top: 48px; }
.comment-form { display: flex; flex-direction: column; gap: 16px; }
.comment-form p { margin: 0; }
.comment-form label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--subtle); }
.comment-form .comment-notes, .comment-form .logged-in-as { font-size: 13px; color: var(--subtle); }
.comment-form-cookies-consent { display: flex; gap: 8px; align-items: flex-start; }
.comment-form-cookies-consent label { margin: 0; }

/* Busca */
.search-form { display: flex; flex-wrap: wrap; gap: 8px; max-width: 520px; }
.search-form label { flex: 1 1 240px; }

/* 404 */
.not-found { padding-block: clamp(80px, 12vw, 160px); }
.not-found h1 { font-size: clamp(34px, 4vw, 48px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.12; }
.not-found p { margin: 20px 0 32px; font-size: 18px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
