/* Giro do Lixo — reciclagembr.digital */
:root {
  --red: #e02020;
  --red-dark: #b81818;
  --red-soft: #fde8e8;
  --ink: #1a1a1a;
  --ink-muted: #5c5c5c;
  --ink-light: #8a8a8a;
  --bg: #fafafa;
  --white: #ffffff;
  --border: #e8e8e8;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --radius-pill: 24px;
  --radius-sm: 8px;
  --container: 720px;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
  --line-tight: 1.25;
  --line-body: 1.5;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --transition: .18s ease;
}

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

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

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: var(--line-body);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--red); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--red-dark); }

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

/* ── Compact topbar ── */
.site-header {
  background: var(--white);
  border-bottom: 2px solid var(--red);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) 0;
  gap: var(--space-3);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--ink);
  font-weight: 800;
  font-size: .95rem;
  letter-spacing: -.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.logo:hover { color: var(--red); }
.logo svg { width: 28px; height: 28px; flex-shrink: 0; }

.topbar-meta {
  font-size: .7rem;
  color: var(--ink-light);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Category tags row nav */
.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: var(--space-2) 0 var(--space-3);
  border-top: 1px solid var(--border);
}

.cat-tag {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  background: var(--red-soft);
  color: var(--red-dark);
  transition: background var(--transition), color var(--transition);
}

.cat-tag:hover,
.cat-tag.active {
  background: var(--red);
  color: var(--white);
}

.cat-tag[data-cat="coleta"] { background: #e8f4e8; color: #2d6a2d; }
.cat-tag[data-cat="coleta"]:hover,
.cat-tag[data-cat="coleta"].active { background: #2d6a2d; color: var(--white); }

.cat-tag[data-cat="plastico"] { background: #e8eef8; color: #1a4a8a; }
.cat-tag[data-cat="plastico"]:hover,
.cat-tag[data-cat="plastico"].active { background: #1a4a8a; color: var(--white); }

.cat-tag[data-cat="startups"] { background: #f3e8f8; color: #6a2d8a; }
.cat-tag[data-cat="startups"]:hover,
.cat-tag[data-cat="startups"].active { background: #6a2d8a; color: var(--white); }

/* ── Hero stacked headlines (no image) ── */
.hero-stack {
  padding: var(--space-5) 0 var(--space-4);
}

.hero-stack .edition {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--red);
  margin-bottom: var(--space-2);
}

.hero-stack h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5vw, 2.4rem);
  line-height: var(--line-tight);
  font-weight: 700;
  margin-bottom: var(--space-3);
}

.hero-stack .lead {
  font-size: .95rem;
  color: var(--ink-muted);
  max-width: 54ch;
  line-height: var(--line-body);
}

/* ── Bento grid ── */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

@media (max-width: 520px) {
  .bento-grid { grid-template-columns: 1fr; }
}

.bento-card {
  position: relative;
  border-radius: var(--radius-pill);
  overflow: hidden;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.bento-card.featured {
  grid-column: 1 / -1;
  min-height: 220px;
}

.bento-card img,
.bento-card svg.thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bento-overlay {
  position: relative;
  z-index: 1;
  background: linear-gradient(transparent 10%, rgba(0,0,0,.72) 100%);
  padding: var(--space-4);
  color: var(--white);
}

.bento-overlay .tag {
  display: inline-block;
  padding: var(--space-1) var(--space-2);
  border-radius: 999px;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--red);
  color: var(--white);
  margin-bottom: var(--space-2);
}

.bento-overlay h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: var(--line-tight);
  font-weight: 700;
}

.bento-overlay h2 a { color: var(--white); }
.bento-overlay h2 a:hover { color: var(--red-soft); }

.bento-overlay .meta {
  font-size: .7rem;
  opacity: .8;
  margin-top: var(--space-2);
}

/* ── Compact dense article list ── */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--ink);
}

.section-head h2 {
  font-size: .85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.section-head a {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.dense-list { list-style: none; }

.dense-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.dense-item:first-child { padding-top: 0; }

.dense-thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--border);
}

.dense-thumb img,
.dense-thumb svg { width: 72px; height: 72px; object-fit: cover; }

.dense-body .tag {
  display: inline-block;
  padding: 2px var(--space-2);
  border-radius: 999px;
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: var(--space-1);
}

.dense-body h3 {
  font-size: .92rem;
  font-weight: 700;
  line-height: var(--line-tight);
  margin-bottom: var(--space-1);
}

.dense-body h3 a { color: var(--ink); }
.dense-body h3 a:hover { color: var(--red); }

.dense-body .excerpt {
  font-size: .78rem;
  color: var(--ink-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dense-body .meta {
  font-size: .68rem;
  color: var(--ink-light);
  margin-top: var(--space-1);
}

/* ── Author card with avatar ── */
.author-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--white);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  margin: var(--space-4) 0;
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--red);
}

.author-avatar svg,
.author-avatar img { width: 48px; height: 48px; }

.author-info .name {
  font-size: .85rem;
  font-weight: 700;
}

.author-info .role {
  font-size: .72rem;
  color: var(--ink-muted);
}

/* ── Article page (image-heavy) ── */
.article-header {
  padding: var(--space-5) 0 var(--space-4);
}

.article-header .tag {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--red);
  color: var(--white);
  margin-bottom: var(--space-3);
}

.article-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4.5vw, 2.1rem);
  line-height: var(--line-tight);
  font-weight: 700;
  margin-bottom: var(--space-3);
}

.article-header .dek {
  font-size: 1rem;
  color: var(--ink-muted);
  line-height: var(--line-body);
  margin-bottom: var(--space-4);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: .75rem;
  color: var(--ink-light);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
}

.article-hero-img {
  width: 100%;
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: var(--space-5);
  aspect-ratio: 16/10;
  background: var(--border);
}

.article-hero-img svg,
.article-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-body {
  font-size: .95rem;
  line-height: 1.65;
  color: var(--ink);
}

.article-body p { margin-bottom: var(--space-4); }

.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin: var(--space-5) 0 var(--space-3);
  line-height: var(--line-tight);
}

.article-body blockquote {
  border-left: 3px solid var(--red);
  padding: var(--space-3) var(--space-4);
  margin: var(--space-4) 0;
  background: var(--red-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  font-size: .92rem;
}

.article-body ul {
  margin: 0 0 var(--space-4) var(--space-5);
  font-size: .92rem;
}

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

.inline-img {
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin: var(--space-4) 0;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.btn-accent {
  background: var(--red);
  color: var(--white);
}

.btn-accent:hover {
  background: var(--red-dark);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--red);
  border: 2px solid var(--red);
}

.btn-outline:hover {
  background: var(--red);
  color: var(--white);
}

/* ── Static pages ── */
.page-header {
  padding: var(--space-5) 0 var(--space-4);
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: var(--line-tight);
  margin-bottom: var(--space-2);
}

.page-header .subtitle {
  font-size: .9rem;
  color: var(--ink-muted);
}

.page-content {
  font-size: .92rem;
  line-height: 1.6;
  padding-bottom: var(--space-5);
}

.page-content p { margin-bottom: var(--space-4); }

.page-content h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: var(--space-5) 0 var(--space-3);
}

.page-content ul {
  margin: 0 0 var(--space-4) var(--space-5);
}

.page-content li { margin-bottom: var(--space-2); }

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 480px;
}

.form-group label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  margin-bottom: var(--space-1);
  text-transform: uppercase;
  letter-spacing: .03em;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .9rem;
  background: var(--white);
}

.form-group textarea { min-height: 120px; resize: vertical; }

/* ── Minimal single footer ── */
.site-footer {
  background: var(--ink);
  color: #ccc;
  padding: var(--space-5) 0;
  margin-top: var(--space-5);
}

.footer-inner {
  text-align: center;
  font-size: .75rem;
  line-height: 1.6;
}

.footer-inner .footer-brand {
  font-weight: 800;
  font-size: .85rem;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: var(--space-2);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2) var(--space-4);
  margin: var(--space-3) 0;
}

.footer-links a { color: #aaa; font-size: .72rem; }
.footer-links a:hover { color: var(--white); }

.footer-copy {
  font-size: .68rem;
  color: #777;
  margin-top: var(--space-3);
}

/* ── Cookie corner popup ── */
.cookie-popup {
  position: fixed;
  bottom: var(--space-4);
  right: var(--space-4);
  max-width: 320px;
  background: var(--white);
  border: 2px solid var(--red);
  border-radius: var(--radius-pill);
  padding: var(--space-4);
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  z-index: 999;
  transform: translateY(120%);
  opacity: 0;
  transition: transform .35s ease, opacity .35s ease;
}

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

.cookie-popup p {
  font-size: .78rem;
  line-height: 1.45;
  color: var(--ink-muted);
  margin-bottom: var(--space-3);
}

.cookie-popup .cookie-actions {
  display: flex;
  gap: var(--space-2);
}

.cookie-popup .btn { font-size: .7rem; padding: var(--space-2) var(--space-3); }

/* ── Articles listing page ── */
.articles-page .dense-item { padding: var(--space-4) 0; }

/* Utility */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.text-center { text-align: center; }
.mt-4 { margin-top: var(--space-4); }
.mb-4 { margin-bottom: var(--space-4); }

@media (max-width: 480px) {
  .cookie-popup {
    left: var(--space-3);
    right: var(--space-3);
    max-width: none;
  }
}
