/* Crivano Jornal — civic-watchdog, academic-stone, serif-editorial */
:root {
  --primary: #3E3A32;
  --accent: #9C7C38;
  --bg: #F8F5EC;
  --text: #25231E;
  --muted: #8A8172;
  --border: #D9D2C4;
  --white: #FFFFFF;
  --shadow: 0 2px 12px rgba(62, 58, 50, 0.08);
  --shadow-lg: 0 6px 24px rgba(62, 58, 50, 0.12);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 28px;
  --container: 960px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --font-serif: "Georgia", "Times New Roman", "Palatino Linotype", serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-height: 88px;
  --header-height-shrunk: 56px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 16px); }

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

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

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

a:hover { color: var(--primary); }

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

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

/* 8-column asymmetric grid */
.grid-8 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}

.grid-8__main { grid-column: 1 / -1; }
.grid-8__aside { grid-column: 1 / -1; }

@media (min-width: 768px) {
  .grid-8 {
    grid-template-columns: repeat(8, 1fr);
    gap: var(--space-4);
  }

  .grid-8__main { grid-column: 1 / 7; }
  .grid-8__aside { grid-column: 7 / 9; }
  .grid-8__wide { grid-column: 1 / 6; }
  .grid-8__narrow { grid-column: 6 / 9; }
}

/* Stacked header */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.site-header.is-shrunk {
  box-shadow: var(--shadow);
  border-color: transparent;
}

.site-header__stack {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--space-4) var(--space-4) var(--space-3);
  text-align: center;
  transition: padding 0.25s ease;
}

.site-header.is-shrunk .site-header__stack {
  padding: var(--space-2) var(--space-4);
}

.site-header__tagline {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-2);
  transition: opacity 0.2s, max-height 0.25s, margin 0.25s;
  max-height: 20px;
  overflow: hidden;
}

.site-header.is-shrunk .site-header__tagline {
  opacity: 0;
  max-height: 0;
  margin-bottom: 0;
}

.site-logo {
  font-family: var(--font-serif);
  font-size: clamp(26px, 5vw, 34px);
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: inline-block;
  transition: font-size 0.25s ease;
}

.site-header.is-shrunk .site-logo { font-size: 22px; }

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

.site-logo span {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

.site-header__bar {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-4) var(--space-3);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: padding 0.25s ease;
}

.site-header.is-shrunk .site-header__bar {
  padding-bottom: var(--space-2);
}

.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-1);
  position: absolute;
  right: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--primary);
  transition: transform 0.2s;
}

.site-nav { width: 100%; }

.site-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-5);
}

.site-nav a {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  padding: var(--space-2) 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

@media (max-width: 767px) {
  .site-nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: var(--space-4);
    box-shadow: var(--shadow-lg);
    z-index: 150;
  }

  .site-header.is-shrunk + .site-nav,
  .site-nav.is-open { display: block; }

  .site-nav ul {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  .site-nav li { width: 100%; text-align: center; border-bottom: 1px solid var(--border); }
  .site-nav li:last-child { border-bottom: none; }

  .site-nav a {
    display: block;
    padding: var(--space-3) 0;
    border-bottom: none;
  }
}

/* Tags — underline-text */
.tag {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  background: none;
  padding: 0;
}

.tag:hover { color: var(--primary); }

/* Buttons — text-link-only */
.text-link {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.text-link:hover { color: var(--primary); }

/* Byline */
.byline {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--muted);
  margin: var(--space-2) 0;
}

.byline a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.byline a:hover { text-decoration: underline; }

/* Featured story — stacked headlines, no image */
.featured-story {
  padding: var(--space-5) 0 var(--space-4);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-5);
}

.featured-story__kicker {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-2);
}

.featured-story__title {
  font-size: clamp(30px, 6vw, 42px);
  line-height: 1.12;
  margin-bottom: var(--space-3);
}

.featured-story__title a {
  color: var(--primary);
  text-decoration: none;
}

.featured-story__title a:hover { color: var(--accent); }

.featured-story__deck {
  font-size: 19px;
  color: var(--muted);
  max-width: 52ch;
  margin-bottom: var(--space-3);
  line-height: 1.45;
}

.featured-story__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.featured-story__excerpt {
  font-size: 17px;
  max-width: 62ch;
  margin-bottom: var(--space-3);
}

/* Secondary headlines stack */
.headline-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-5);
}

.headline-stack__item {
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
}

.headline-stack__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.headline-stack__item h3 {
  font-size: 20px;
  margin: var(--space-2) 0;
}

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

.headline-stack__item h3 a:hover { color: var(--accent); }

.headline-stack__item p {
  font-size: 15px;
  color: var(--muted);
}

/* Section headings */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: var(--space-5) 0 var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--primary);
}

.section-head h2 {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-sans);
  font-weight: 700;
}

.section-head a {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
}

/* Vertical cards — shadowed */
.vertical-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  list-style: none;
}

.vertical-card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.vertical-card:hover { box-shadow: var(--shadow-lg); }

.vertical-card__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.vertical-card__thumb img,
.vertical-card__thumb svg {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.vertical-card__body {
  padding: var(--space-4);
}

.vertical-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.vertical-card__date {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--muted);
}

.vertical-card__title {
  font-size: 20px;
  margin-bottom: var(--space-2);
}

.vertical-card__title a {
  color: var(--primary);
  text-decoration: none;
}

.vertical-card__title a:hover { color: var(--accent); }

.vertical-card__excerpt {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: var(--space-2);
}

@media (min-width: 640px) {
  .vertical-card__inner {
    grid-template-columns: 200px 1fr;
  }

  .vertical-card__thumb img,
  .vertical-card__thumb svg {
    height: 100%;
    min-height: 133px;
  }
}

/* Compact feed list */
.feed-list { list-style: none; }

.feed-item {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
}

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

.feed-item__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-1);
}

.feed-item__date {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--muted);
}

.feed-item__title {
  font-size: 18px;
  margin-bottom: var(--space-1);
}

.feed-item__title a {
  color: var(--primary);
  text-decoration: none;
}

.feed-item__title a:hover { color: var(--accent); }

.feed-item__excerpt {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}

/* Info panels */
.info-panel {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}

.info-panel h3 {
  font-size: 16px;
  margin-bottom: var(--space-2);
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.info-panel p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
}

.info-panel--accent {
  background: var(--primary);
  color: var(--white);
}

.info-panel--accent h3,
.info-panel--accent p { color: var(--white); }

.info-panel--accent p { opacity: 0.88; }

/* Page layouts */
.page-main { padding: var(--space-5) 0 var(--space-6); }

.page-header {
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-size: clamp(28px, 5vw, 36px);
  margin-bottom: var(--space-2);
}

.page-header .lead {
  font-size: 18px;
  color: var(--muted);
  max-width: 58ch;
}

.prose { max-width: 65ch; }

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

.prose h2 {
  font-size: 22px;
  margin: var(--space-5) 0 var(--space-3);
}

.prose h3 {
  font-size: 18px;
  margin: var(--space-4) 0 var(--space-2);
}

.prose ul, .prose ol {
  margin: 0 0 var(--space-4) var(--space-5);
}

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

/* Pull-quote-led article layout */
.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

@media (min-width: 900px) {
  .article-layout {
    grid-template-columns: 1fr 200px;
    gap: var(--space-6);
  }
}

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

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

.article-header h1 {
  font-size: clamp(26px, 5vw, 36px);
  margin: var(--space-2) 0 var(--space-3);
}

.article-updated {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--muted);
}

.pull-quote-lead {
  font-size: clamp(22px, 4vw, 28px);
  font-style: italic;
  color: var(--primary);
  line-height: 1.35;
  padding: var(--space-4) 0 var(--space-4) var(--space-4);
  border-left: 3px solid var(--accent);
  margin: var(--space-4) 0 var(--space-5);
}

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

.article-hero {
  margin-bottom: var(--space-5);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.article-hero img,
.article-hero svg {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.article-hero figcaption {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--muted);
  padding: var(--space-2) var(--space-3);
  background: var(--white);
}

.prose blockquote {
  font-size: 20px;
  font-style: italic;
  color: var(--primary);
  border-left: 3px solid var(--accent);
  padding: var(--space-2) 0 var(--space-2) var(--space-4);
  margin: var(--space-5) 0;
}

/* Sticky TOC sidebar */
.article-toc {
  font-family: var(--font-sans);
}

.article-toc__inner {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: var(--space-4);
}

@media (min-width: 900px) {
  .article-toc__inner {
    position: sticky;
    top: calc(var(--header-height-shrunk) + 20px);
  }
}

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

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

.article-toc li {
  counter-increment: toc;
  margin-bottom: var(--space-2);
  font-size: 13px;
  line-height: 1.4;
}

.article-toc li::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--accent);
  font-weight: 700;
  margin-right: var(--space-2);
  font-size: 11px;
}

.article-toc a {
  color: var(--text);
  text-decoration: none;
}

.article-toc a:hover { color: var(--accent); text-decoration: underline; }

/* Footer author note */
.author-note {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: var(--space-3);
  align-items: start;
}

.author-note__avatar img,
.author-note__avatar svg {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.author-note__name {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--space-1);
}

.author-note__bio {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}

/* Related block */
.related-block {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--primary);
}

.related-block h2 {
  font-family: var(--font-sans);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-3);
}

/* Authors grid */
.authors-grid {
  display: grid;
  gap: var(--space-4);
  margin: var(--space-4) 0;
}

@media (min-width: 640px) {
  .authors-grid { grid-template-columns: repeat(2, 1fr); }
}

.author-card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: var(--space-4);
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: var(--space-3);
}

.author-card img,
.author-card svg {
  width: 72px;
  height: 72px;
  border-radius: 50%;
}

.author-card h3 {
  font-size: 17px;
  margin-bottom: var(--space-1);
}

.author-card p {
  font-size: 14px;
  color: var(--muted);
}

/* Contact */
.contact-block {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: var(--space-5);
  max-width: 52ch;
}

.contact-block h2 {
  font-size: 18px;
  margin-bottom: var(--space-3);
}

.contact-block p { margin-bottom: var(--space-3); }

/* Editorial masthead footer */
.site-footer {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.9);
  padding: var(--space-6) 0 var(--space-4);
  margin-top: var(--space-6);
}

.site-footer__masthead {
  text-align: center;
  padding-bottom: var(--space-5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  margin-bottom: var(--space-4);
}

.site-footer__brand {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: var(--space-2);
}

.site-footer__brand span {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

.site-footer__edition {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.site-footer__tagline {
  font-size: 15px;
  text-align: center;
  max-width: 48ch;
  margin: 0 auto var(--space-5);
  line-height: 1.5;
  opacity: 0.85;
}

.site-footer__grid {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

@media (min-width: 640px) {
  .site-footer__grid {
    grid-template-columns: repeat(3, 1fr);
    text-align: left;
  }
}

.site-footer__col h3 {
  font-family: var(--font-sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: var(--space-3);
}

.site-footer__col ul { list-style: none; }

.site-footer__col li { margin-bottom: var(--space-2); }

.site-footer__col a {
  font-family: var(--font-sans);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.site-footer__col a:hover { color: var(--accent); text-decoration: underline; }

.site-footer__bottom {
  font-family: var(--font-sans);
  font-size: 12px;
  text-align: center;
  opacity: 0.6;
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* Cookie inline footer note */
.cookie-note {
  font-family: var(--font-sans);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  padding: var(--space-3) var(--space-4);
  background: rgba(0, 0, 0, 0.15);
  margin-top: var(--space-4);
  border-radius: var(--radius-sm);
  display: none;
}

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

.cookie-note a { color: var(--accent); }

.cookie-note__btn {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: none;
  text-decoration: underline;
  cursor: pointer;
  margin-left: var(--space-2);
  padding: 0;
}

.cookie-note__btn:hover { color: var(--white); }

/* Teaser notes on articles page */
.teaser-note {
  padding: var(--space-4);
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  margin-bottom: var(--space-4);
  scroll-margin-top: calc(var(--header-height) + 16px);
}

.teaser-note h2 {
  font-size: 18px;
  margin: var(--space-2) 0;
}

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

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

.mt-section { margin-top: var(--space-5); }
