/* Top Brasil — topbr.digital | tabloid-quick | editorial-red-accent */

:root {
  --red: #C41E3A;
  --red-bright: #E63946;
  --red-dark: #9B1830;
  --ink: #141414;
  --ink-soft: #4A4A4A;
  --cream: #FAFAF8;
  --white: #FFFFFF;
  --border: #E8E4E0;
  --radius-pill: 999px;
  --radius-card: 24px;
  --container: 720px;
  --gap-tight: 0.5rem;
  --gap-md: 0.85rem;
  --gap-lg: 1.25rem;
  --font-sans: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --shadow-card: 0 3px 16px rgba(20, 20, 20, 0.07);
  --transition: 0.18s ease;
}

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

html { font-size: 15px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.42;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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); }

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--gap-md);
  background: var(--red);
  color: var(--white);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-pill);
  z-index: 300;
  font-size: 0.8rem;
  font-weight: 700;
}

.skip-link:focus { top: 0.5rem; color: var(--white); }

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

/* ── 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: 0.45rem 0;
  gap: var(--gap-md);
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 900;
  font-size: 1.05rem;
  color: var(--ink);
  letter-spacing: -0.03em;
  text-decoration: none;
  white-space: nowrap;
}

.logo:hover { color: var(--ink); }

.logo img { width: 26px; height: 26px; flex-shrink: 0; }

.logo span { color: var(--red); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  margin: 4px 0;
  border-radius: 2px;
}

.main-nav { display: flex; align-items: center; gap: var(--gap-lg); }

.main-nav a {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a.active { color: var(--red); }

/* ── Category tags row ── */
.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.4rem 0 0.55rem;
  border-top: 1px solid var(--border);
}

.tag {
  display: inline-block;
  padding: 0.18rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--white);
  background: var(--red);
  transition: transform var(--transition), background var(--transition);
  text-decoration: none;
}

.tag:hover { transform: translateY(-1px); color: var(--white); background: var(--red-dark); }

.tag--performance { background: var(--red); }
.tag--execucao { background: var(--ink); }
.tag--mercado { background: var(--red-dark); }
.tag--lideres { background: #2D2D2D; }
.tag--metas { background: var(--red-bright); }

/* ── Stacked headlines hero (no image) ── */
.hero-stacked {
  padding: var(--gap-lg) 0 var(--gap-md);
}

.hero-stacked .hero-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.3rem;
}

.hero-stacked h1 {
  font-size: clamp(1.55rem, 4.2vw, 2.15rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.035em;
  margin-bottom: 0.35rem;
}

.hero-stacked h1 em {
  font-style: normal;
  color: var(--red);
}

.hero-stacked .hero-sub {
  font-size: 0.92rem;
  color: var(--ink-soft);
  max-width: 50ch;
  margin-bottom: var(--gap-md);
}

.hero-headlines {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: var(--gap-tight) 0 var(--gap-md);
  border-top: 2px solid var(--ink);
  margin-top: var(--gap-tight);
}

.hero-headlines a {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.25;
  text-decoration: none;
}

.hero-headlines a:hover { color: var(--red); }

.hero-headlines .hl-meta {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-top: 0.1rem;
}

/* ── Bento grid ── */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: minmax(130px, auto);
  gap: var(--gap-tight);
  padding-bottom: var(--gap-lg);
}

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

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

.bento-grid .card-overlay .overlay {
  position: relative;
  z-index: 1;
  padding: var(--gap-md);
  background: linear-gradient(transparent 0%, rgba(20, 20, 20, 0.88) 72%);
  color: var(--white);
}

.bento-grid .card-overlay .overlay .tag { margin-bottom: 0.3rem; }

.bento-grid .card-overlay h2,
.bento-grid .card-overlay h3 {
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.01em;
}

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

.bento-grid .card-overlay h2 a:hover,
.bento-grid .card-overlay h3 a:hover { color: #FFB4B4; }

.bento-grid .card-overlay .meta {
  font-size: 0.65rem;
  opacity: 0.85;
  margin-top: 0.25rem;
}

.bento-grid .span-2 { grid-column: span 2; }
.bento-grid .span-2-row { grid-row: span 2; }

/* ── Compact dense list ── */
.article-list {
  list-style: none;
  padding-bottom: var(--gap-lg);
}

.article-list li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: var(--gap-md);
  padding: var(--gap-tight) 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.article-list .thumb-square {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
}

.article-list h3 {
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1.22;
  margin-bottom: 0.15rem;
}

.article-list h3 a { color: var(--ink); text-decoration: none; }
.article-list h3 a:hover { color: var(--red); }

.article-list .list-meta {
  font-size: 0.68rem;
  color: var(--ink-soft);
}

/* ── Image-heavy article ── */
.article-hero-img {
  width: 100%;
  aspect-ratio: 1;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius-card);
  margin-bottom: var(--gap-md);
}

.article-header { padding: var(--gap-md) 0; }

.article-header h1 {
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin-bottom: var(--gap-tight);
}

.article-header .article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-tight);
  align-items: center;
  font-size: 0.75rem;
  color: var(--ink-soft);
  margin-bottom: var(--gap-md);
}

.article-body {
  font-size: 0.93rem;
  padding-bottom: var(--gap-lg);
}

.article-body h2 {
  font-size: 1.05rem;
  font-weight: 800;
  margin: var(--gap-lg) 0 var(--gap-tight);
  color: var(--ink);
}

.article-body p { margin-bottom: var(--gap-md); }

.article-body ul, .article-body ol {
  margin: 0 0 var(--gap-md) 1.15rem;
}

.article-body li { margin-bottom: 0.3rem; }

.article-body .inline-img {
  width: 100%;
  aspect-ratio: 1;
  max-height: 360px;
  object-fit: cover;
  border-radius: var(--radius-card);
  margin: var(--gap-md) 0;
}

.article-updated {
  font-size: 0.72rem;
  color: var(--ink-soft);
  margin-top: 0.2rem;
}

/* ── Author card with avatar ── */
.author-card {
  display: flex;
  align-items: center;
  gap: var(--gap-md);
  padding: var(--gap-md);
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  margin: var(--gap-lg) 0;
  border-left: 4px solid var(--red);
}

.author-card img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  flex-shrink: 0;
}

.author-card .author-info h4 {
  font-size: 0.86rem;
  font-weight: 800;
}

.author-card .author-info p {
  font-size: 0.76rem;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.4;
}

/* ── Page content ── */
.page-content {
  padding: var(--gap-lg) 0;
  max-width: 68ch;
}

.page-content h1 {
  font-size: 1.55rem;
  font-weight: 900;
  margin-bottom: var(--gap-md);
  letter-spacing: -0.02em;
}

.page-content h2 {
  font-size: 1rem;
  font-weight: 800;
  margin: var(--gap-lg) 0 var(--gap-tight);
}

.page-content p { margin-bottom: var(--gap-md); font-size: 0.9rem; }
.page-content ul, .page-content ol { margin: 0 0 var(--gap-md) 1.15rem; font-size: 0.9rem; }
.page-content li { margin-bottom: 0.3rem; }

.section-title {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--red);
  margin-bottom: var(--gap-tight);
  padding-top: var(--gap-md);
}

.editorial-block p {
  font-size: 0.9rem;
  margin-bottom: var(--gap-md);
  max-width: 68ch;
}

/* ── Contact ── */
.contact-block { padding: var(--gap-lg) 0 var(--gap-xl); max-width: 52ch; }
.contact-block p { margin-bottom: var(--gap-md); font-size: 0.9rem; }
.contact-email { font-size: 1.1rem; font-weight: 800; color: var(--red); }

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border: none;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
}

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

.btn--accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(196, 30, 58, 0.35);
  color: var(--white);
}

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

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

/* ── Archive ── */
.archive-list { list-style: none; padding: var(--gap-md) 0 var(--gap-xl); }

.archive-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--gap-md);
  padding: var(--gap-md) 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.archive-item img {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  object-fit: cover;
}

.archive-item h2 {
  font-size: 1rem;
  font-weight: 800;
  margin: 0.2rem 0;
  line-height: 1.2;
}

.archive-item h2 a { color: var(--ink); text-decoration: none; }
.archive-item h2 a:hover { color: var(--red); }

.archive-item .excerpt {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-bottom: 0.25rem;
}

.archive-item .meta {
  font-size: 0.68rem;
  color: var(--ink-soft);
}

/* ── Authors grid ── */
.authors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--gap-md);
  margin: var(--gap-lg) 0;
}

.author-profile {
  background: var(--white);
  border-radius: var(--radius-card);
  padding: var(--gap-md);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.author-profile img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin: 0 auto var(--gap-tight);
}

.author-profile h3 {
  font-size: 0.9rem;
  font-weight: 800;
  margin-bottom: 0.2rem;
}

.author-profile p {
  font-size: 0.76rem;
  color: var(--ink-soft);
}

/* ── Related ── */
.related-block {
  padding: var(--gap-lg) 0;
  border-top: 2px solid var(--ink);
}

.related-block h2 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--red);
  margin-bottom: var(--gap-md);
}

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

.related-list li {
  padding: var(--gap-tight) 0;
  border-bottom: 1px solid var(--border);
}

.related-list a {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink);
  text-decoration: none;
}

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

/* ── Minimal single footer ── */
.site-footer {
  margin-top: auto;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--gap-md) 0;
}

.footer-minimal {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
}

.footer-minimal__brand {
  font-weight: 900;
  font-size: 0.9rem;
  color: var(--white);
  text-decoration: none;
}

.footer-minimal__brand span { color: var(--red-bright); }

.footer-minimal__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 0.85rem;
}

.footer-minimal__links a {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
}

.footer-minimal__links a:hover { color: var(--white); }

.footer-minimal__copy {
  font-size: 0.68rem;
  opacity: 0.45;
  margin-top: 0.2rem;
}

/* ── Cookie corner popup ── */
.cookie-popup {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  max-width: 300px;
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: 0 8px 32px rgba(20, 20, 20, 0.16);
  padding: var(--gap-md);
  z-index: 200;
  display: none;
  border: 2px solid var(--red);
}

.cookie-popup.visible { display: block; }

.cookie-popup p {
  font-size: 0.76rem;
  color: var(--ink-soft);
  margin-bottom: var(--gap-tight);
  line-height: 1.4;
}

.cookie-popup .cookie-actions {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex-wrap: wrap;
}

.cookie-popup .btn { font-size: 0.7rem; padding: 0.38rem 0.9rem; }

main { flex: 1; }

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

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--gap-md);
    border-bottom: 2px solid var(--red);
    box-shadow: var(--shadow-card);
  }

  .main-nav.open { display: flex; }
}

@media (max-width: 520px) {
  .bento-grid { grid-template-columns: 1fr; }
  .bento-grid .span-2,
  .bento-grid .span-2-row { grid-column: span 1; grid-row: auto; }

  .cookie-popup {
    left: 0.65rem;
    right: 0.65rem;
    bottom: 0.65rem;
    max-width: none;
  }
}
