/* Zenith Brasil — opinion-led editorial, muted-green palette */
:root {
  --primary: #264653;
  --accent: #2A9D8F;
  --bg: #F1FAF3;
  --text: #1B4332;
  --muted: #7AA287;
  --white: #FFFFFF;
  --border: #C8E6D0;
  --overlay: rgba(27, 67, 50, 0.72);
  --container: 1140px;
  --font-serif: "Georgia", "Times New Roman", Times, serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --space-xs: 6px;
  --space-sm: 12px;
  --space-md: 20px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 72px;
  --radius-pill: 999px;
  --header-height: 68px;
  --sidebar-width: 240px;
  --transition: 0.2s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

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

a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--muted);
}

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

h1, h2, h3, h4, .headline {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary);
}

h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }

p { margin-bottom: 1.1em; }
p:last-child { margin-bottom: 0; }

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

/* Cookie corner popup */
.cookie-popup {
  position: fixed;
  bottom: var(--space-md);
  right: var(--space-md);
  max-width: 340px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: var(--space-md);
  box-shadow: 0 8px 32px rgba(38, 70, 83, 0.12);
  z-index: 300;
  display: none;
  font-size: 14px;
  line-height: 1.5;
}

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

.cookie-popup p { margin-bottom: var(--space-sm); }

.cookie-popup__actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.btn--accent {
  background: var(--accent);
  color: var(--white);
  text-decoration: none;
}

.btn--accent:hover {
  background: var(--primary);
  color: var(--white);
  text-decoration: none;
}

.btn--ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  background: var(--bg);
  color: var(--primary);
  text-decoration: none;
}

/* Tags — underline-text */
.tag {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--muted);
}

.tag:hover { text-decoration-color: var(--accent); }

/* Header — split-nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: var(--space-md);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo:hover { text-decoration: none; }

.site-logo__mark {
  width: 36px;
  height: 36px;
}

.site-logo__text {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.site-logo__text span {
  display: block;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

/* Nav — horizontal-pill-active */
.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.site-nav a {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  transition: background var(--transition), color var(--transition);
}

.site-nav a:hover {
  color: var(--primary);
  background: var(--bg);
  text-decoration: none;
}

.site-nav a.is-active {
  background: var(--accent);
  color: var(--white);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
  color: var(--primary);
}

.menu-toggle svg { width: 28px; height: 28px; }

/* Hero — split-image-text */
.hero-split {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: var(--space-lg);
  align-items: center;
  padding: var(--space-xl) 0 var(--space-2xl);
}

.hero-split__content {
  padding-right: var(--space-md);
}

.hero-split__eyebrow {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.hero-split h1 { margin-bottom: var(--space-md); }

.hero-split__lead {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: var(--space-lg);
  max-width: 42ch;
}

.hero-split__meta {
  font-size: 14px;
  color: var(--muted);
}

.hero-split__visual {
  border-radius: 24px;
  overflow: hidden;
  margin-left: var(--space-lg);
}

.hero-split__visual img,
.hero-split__visual svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Magazine breakout grid */
.magazine-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-md);
}

.magazine-grid__main { grid-column: span 8; }
.magazine-grid__side { grid-column: span 4; }

/* Editorial columns homepage */
.editorial-columns {
  padding: var(--space-xl) 0 var(--space-2xl);
}

.editorial-columns__header {
  margin-bottom: var(--space-xl);
  max-width: 60ch;
}

.editorial-columns__header h2 { margin-bottom: var(--space-sm); }

.editorial-columns__header p {
  color: var(--muted);
  font-size: 1.05rem;
}

/* Numbered article list */
.numbered-list {
  list-style: none;
  counter-reset: article-counter;
}

.numbered-list__item {
  counter-increment: article-counter;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: var(--space-md);
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.numbered-list__item:first-child { padding-top: 0; }

.numbered-list__num {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--muted);
  line-height: 1;
  padding-top: 4px;
}

.numbered-list__num::before {
  content: counter(article-counter, decimal-leading-zero);
}

.numbered-list__body h3 {
  font-size: 1.35rem;
  margin-bottom: var(--space-xs);
}

.numbered-list__body h3 a {
  color: var(--primary);
  text-decoration: none;
}

.numbered-list__body h3 a:hover { color: var(--accent); }

.numbered-list__excerpt {
  font-size: 15px;
  color: var(--text);
  margin-bottom: var(--space-sm);
}

.numbered-list__meta {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  align-items: center;
}

/* Image overlay cards — pill-cards */
.card-overlay {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  display: block;
  text-decoration: none;
}

.card-overlay:hover { text-decoration: none; }

.card-overlay__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-overlay__content {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--overlay) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-md);
}

.card-overlay__content .tag {
  color: var(--white);
  text-decoration-color: rgba(255,255,255,0.5);
  margin-bottom: var(--space-xs);
}

.card-overlay__title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
}

/* Side column stack */
.side-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding-top: var(--space-sm);
}

.side-block {
  background: var(--white);
  border-radius: 20px;
  padding: var(--space-md) var(--space-lg);
  border: 1px solid var(--border);
}

.side-block h3 {
  font-size: 1rem;
  margin-bottom: var(--space-sm);
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: var(--muted);
}

.side-block p {
  font-size: 15px;
  color: var(--text);
}

/* Author card with avatar */
.author-card {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  background: var(--white);
  border-radius: 20px;
  padding: var(--space-md);
  border: 1px solid var(--border);
}

.author-card__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
}

.author-card__name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: 2px;
}

.author-card__role {
  font-size: 13px;
  color: var(--muted);
}

/* Section spacing — mixed asymmetric */
.section-offset-left { padding-left: var(--space-xl); }
.section-offset-right { padding-right: var(--space-xl); }
.section-narrow { max-width: 680px; }
.section-wide { max-width: 900px; }

/* Page header */
.page-header {
  padding: var(--space-xl) 0 var(--space-lg);
}

.page-header h1 { margin-bottom: var(--space-sm); }

.page-header__lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 55ch;
}

/* Article layout — pull-quote-led */
.article-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: var(--space-xl);
  padding-bottom: var(--space-2xl);
  align-items: start;
}

.article-toc {
  position: sticky;
  top: calc(var(--header-height) + var(--space-md));
  font-size: 14px;
}

.article-toc h2 {
  font-family: var(--font-sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: var(--space-sm);
  font-weight: 600;
}

.article-toc ol {
  list-style: none;
  counter-reset: toc;
}

.article-toc li {
  counter-increment: toc;
  margin-bottom: var(--space-xs);
}

.article-toc a {
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  display: block;
  padding: 4px 0;
  border-left: 2px solid transparent;
  padding-left: var(--space-sm);
  transition: border-color var(--transition), color var(--transition);
}

.article-toc a:hover,
.article-toc a.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
  text-decoration: none;
}

.article-main { min-width: 0; }

.article-header {
  margin-bottom: var(--space-lg);
}

.article-header h1 { margin-bottom: var(--space-sm); }

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  font-size: 14px;
  color: var(--muted);
  margin-bottom: var(--space-md);
  align-items: center;
}

.article-meta a { color: var(--muted); }

/* Full bleed image */
.article-bleed {
  width: calc(100% + var(--space-xl));
  margin-left: calc(var(--space-md) * -1);
  margin-bottom: var(--space-lg);
  border-radius: 0;
}

.article-bleed img,
.article-bleed svg {
  width: 100%;
  display: block;
}

/* Pull quote */
.pull-quote {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 700;
  line-height: 1.35;
  color: var(--primary);
  border-left: 4px solid var(--accent);
  padding: var(--space-sm) 0 var(--space-sm) var(--space-md);
  margin: var(--space-lg) 0;
  max-width: 38ch;
}

.pull-quote cite {
  display: block;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  font-style: normal;
  margin-top: var(--space-sm);
}

.article-body h2 {
  font-size: 1.4rem;
  margin: var(--space-lg) 0 var(--space-sm);
}

.article-body p { margin-bottom: 1.15em; }

.article-updated {
  font-size: 13px;
  color: var(--muted);
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
}

/* Related articles */
.related-articles {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}

.related-articles h2 {
  font-size: 1.1rem;
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: var(--space-md);
  font-weight: 600;
}

.related-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.related-list a {
  font-family: var(--font-serif);
  font-weight: 600;
  text-decoration: none;
  color: var(--primary);
}

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

/* Articles archive page */
.articles-grid {
  display: grid;
  gap: var(--space-lg);
  padding-bottom: var(--space-2xl);
}

.archive-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-lg);
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.archive-card__thumb {
  border-radius: 20px;
  overflow: hidden;
}

.archive-card__thumb img,
.archive-card__thumb svg { width: 100%; }

.archive-card h2 {
  font-size: 1.5rem;
  margin-bottom: var(--space-xs);
}

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

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

/* About page */
.about-content {
  max-width: 680px;
  padding-bottom: var(--space-2xl);
}

.about-content h2 {
  font-size: 1.4rem;
  margin: var(--space-lg) 0 var(--space-sm);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  padding-bottom: var(--space-2xl);
  align-items: start;
}

.contact-info {
  background: var(--white);
  border-radius: 20px;
  padding: var(--space-lg);
  border: 1px solid var(--border);
}

.contact-info h2 {
  font-size: 1.1rem;
  margin-bottom: var(--space-md);
}

.contact-info dt {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 4px;
  font-weight: 600;
}

.contact-info dd {
  margin-bottom: var(--space-md);
  font-size: 16px;
}

.contact-note {
  font-size: 15px;
  color: var(--muted);
}

/* Legal pages */
.legal-content {
  max-width: 720px;
  padding-bottom: var(--space-2xl);
}

.legal-content h2 {
  font-size: 1.3rem;
  margin: var(--space-lg) 0 var(--space-sm);
}

.legal-content ul {
  margin: 0 0 1.1em 1.4em;
}

.legal-content li { margin-bottom: 0.4em; }

.legal-content code {
  font-family: var(--font-sans);
  font-size: 0.9em;
  background: var(--white);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* Footer — minimal-single */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-lg) 0;
  margin-top: auto;
}

.site-footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  font-size: 14px;
  color: var(--muted);
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
}

.site-footer__nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.site-footer__nav a:hover { color: var(--accent); }

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

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

.note-updated {
  margin-top: 1.5em;
  font-size: 15px;
}

.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

/* Responsive */
@media (max-width: 960px) {
  .hero-split {
    grid-template-columns: 1fr;
    padding: var(--space-lg) 0 var(--space-xl);
  }

  .hero-split__visual { margin-left: 0; }

  .magazine-grid__main,
  .magazine-grid__side { grid-column: span 12; }

  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-toc {
    position: static;
    background: var(--white);
    border-radius: 16px;
    padding: var(--space-md);
    border: 1px solid var(--border);
    margin-bottom: var(--space-md);
  }

  .article-bleed {
    width: 100%;
    margin-left: 0;
  }

  .archive-card {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .section-offset-left,
  .section-offset-right {
    padding-left: 0;
    padding-right: 0;
  }
}

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

  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: var(--space-md);
    border-bottom: 1px solid var(--border);
    gap: var(--space-xs);
  }

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

  .site-nav a {
    width: 100%;
    text-align: center;
  }

  .site-header { position: relative; }

  .site-header__inner { position: relative; }

  .numbered-list__item {
    grid-template-columns: 36px 1fr;
  }

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