/* Caderno do Homem — warm-earth, serif editorial, independent blog */

:root {
  --bg: #efe6d8;
  --bg-alt: #e4d9c8;
  --surface: #f7f2ea;
  --text: #1c1712;
  --text-muted: #5a4d3f;
  --accent: #a85c2e;
  --accent-soft: #c4784a;
  --olive: #6b5e48;
  --border: #c4b49c;
  --overlay: rgba(28, 23, 18, 0.58);
  --container: 720px;
  --radius: 2px;
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --font: Georgia, 'Times New Roman', 'Palatino Linotype', serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 17px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--accent-soft);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--s4);
}

/* Minimal header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: var(--s4) 0 var(--s3);
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--s3);
}

.brand {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  color: var(--accent);
}

.brand-tagline {
  margin: var(--s1) 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
}

.menu-toggle {
  display: none;
  font-family: var(--font);
  font-size: 0.78rem;
  text-transform: lowercase;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s1) var(--s3);
  color: var(--text-muted);
  cursor: pointer;
}

.menu-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Horizontal pill nav */
.nav-pills {
  list-style: none;
  margin: var(--s3) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}

.nav-pills a {
  display: block;
  padding: var(--s1) var(--s3);
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid transparent;
}

.nav-pills a:hover {
  color: var(--accent);
  background: var(--bg-alt);
}

.nav-pills a[aria-current="page"] {
  background: var(--olive);
  color: var(--surface);
  border-color: var(--olive);
}

@media (max-width: 600px) {
  .menu-toggle {
    display: block;
  }

  .nav-pills {
    display: none;
    flex-direction: column;
    gap: var(--s1);
    padding-top: var(--s2);
  }

  .nav-pills.is-open {
    display: flex;
  }

  .cookie-popup {
    left: var(--s4);
    right: var(--s4);
    max-width: none;
  }
}

/* Full-width hero with overlay */
.hero-full {
  position: relative;
  width: 100%;
  min-height: 280px;
  margin-bottom: var(--s5);
  overflow: hidden;
}

.hero-full img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  aspect-ratio: 16 / 9;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  display: flex;
  align-items: flex-end;
  padding: var(--s5) var(--s4);
}

.hero-overlay .container {
  padding: 0;
}

.hero-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bg-alt);
  margin: 0 0 var(--s2);
}

.hero-overlay h1 {
  margin: 0 0 var(--s3);
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.2;
  color: var(--surface);
  font-weight: 700;
  max-width: 36ch;
}

.hero-deck {
  margin: 0;
  font-size: 0.95rem;
  color: var(--bg);
  max-width: 48ch;
  line-height: 1.5;
}

/* Section titles */
.section-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin: 0 0 var(--s4);
  font-weight: 400;
}

/* Numbered article list */
.article-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: feed;
}

.article-feed > li {
  counter-increment: feed;
  margin-bottom: var(--s5);
  padding-bottom: var(--s5);
  border-bottom: 1px solid var(--border);
}

.article-feed > li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.article-feed > li::before {
  content: counter(feed, decimal-leading-zero);
  display: block;
  font-size: 0.72rem;
  color: var(--olive);
  letter-spacing: 0.05em;
  margin-bottom: var(--s2);
}

/* Stacked text-below cards */
.card {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.card-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--bg-alt);
}

.card-meta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.card h2, .card h3 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.3;
  font-weight: 700;
}

.card h2 a, .card h3 a {
  color: var(--text);
  text-decoration: none;
}

.card h2 a:hover, .card h3 a:hover {
  color: var(--accent);
}

.card-excerpt {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Intro prose */
.intro-block {
  margin-bottom: var(--s5);
}

.intro-block p {
  margin: 0 0 var(--s4);
}

.intro-block p:last-child {
  margin-bottom: 0;
}

/* Article narrow reading */
.article-header {
  margin-bottom: var(--s5);
  padding-bottom: var(--s4);
  border-bottom: 1px solid var(--border);
}

.article-header h1 {
  margin: 0 0 var(--s3);
  font-size: clamp(1.45rem, 4vw, 1.85rem);
  line-height: 1.25;
}

.article-meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.article-body {
  max-width: 62ch;
}

.article-body p {
  margin: 0 0 var(--s4);
}

.article-body h2 {
  margin: var(--s5) 0 var(--s3);
  font-size: 1.1rem;
  font-weight: 700;
}

.article-body ul, .article-body ol {
  margin: 0 0 var(--s4);
  padding-left: var(--s5);
}

.article-body li {
  margin-bottom: var(--s2);
}

.article-figure {
  margin: var(--s5) 0;
}

.article-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}

.article-figure figcaption {
  margin-top: var(--s2);
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Related stories */
.related-block {
  margin-top: var(--s5);
  padding-top: var(--s4);
  border-top: 1px solid var(--border);
}

.related-block h2 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 400;
  margin: 0 0 var(--s4);
}

.related-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.related-list li {
  margin-bottom: var(--s3);
  font-size: 0.92rem;
}

.related-list a {
  color: var(--text);
  text-decoration: none;
}

.related-list a:hover {
  color: var(--accent);
}

/* Author minimal */
.author-line {
  margin: var(--s4) 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Legal / static pages */
.page-header {
  margin-bottom: var(--s5);
}

.page-header h1 {
  margin: 0 0 var(--s3);
  font-size: 1.5rem;
}

.page-body p, .page-body li {
  margin: 0 0 var(--s3);
}

.page-body h2 {
  margin: var(--s5) 0 var(--s3);
  font-size: 1.05rem;
}

.page-body ul {
  padding-left: var(--s5);
  margin: 0 0 var(--s4);
}

/* Contact */
.contact-email {
  font-size: 1.05rem;
  margin: var(--s4) 0;
}

.contact-note {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Minimal single footer */
.site-footer {
  margin-top: var(--s5);
  padding: var(--s5) 0;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.footer-inner a {
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s4);
}

/* Corner cookie popup */
.cookie-popup {
  position: fixed;
  bottom: var(--s4);
  right: var(--s4);
  max-width: 280px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s4);
  font-size: 0.82rem;
  color: var(--text-muted);
  box-shadow: 0 2px 12px rgba(28, 23, 18, 0.12);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(var(--s2));
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
}

.cookie-popup.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cookie-popup p {
  margin: 0 0 var(--s3);
  line-height: 1.45;
}

.cookie-accept {
  font-family: var(--font);
  font-size: 0.78rem;
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.cookie-accept:hover {
  color: var(--accent-soft);
}

main {
  padding-bottom: var(--s5);
}
