/* Tanque em Foco — academic-stone | data-light-newsroom */

:root {
  --stone-50: #f7f5f1;
  --stone-100: #ede9e2;
  --stone-200: #d9d3c8;
  --stone-300: #b8afa3;
  --stone-400: #8f8578;
  --stone-500: #6b6258;
  --stone-600: #4a443c;
  --stone-700: #332f2a;
  --stone-800: #221f1c;
  --accent: #4a6b5a;
  --accent-muted: #6a8f7a;
  --accent-light: #e8f0eb;
  --white: #fdfcfa;
  --border: #d4cec4;
  --border-strong: #b5ada2;
  --shadow: 0 1px 3px rgba(34, 31, 28, 0.06);
  --font-sans: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --container: 960px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --ratio-editorial: 3 / 2;
  --header-height: 52px;
  --header-height-shrink: 40px;
  --transition: 0.22s ease;
}

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.62;
  color: var(--stone-700);
  background: var(--stone-50);
}

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

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

a:hover { color: var(--stone-800); }

h1, h2, h3, h4 {
  color: var(--stone-800);
  line-height: 1.22;
  font-weight: 650;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(1.65rem, 4vw, 2.15rem); margin: 0 0 var(--space-3); }
h2 { font-size: 1.35rem; margin: var(--space-5) 0 var(--space-3); }
h3 { font-size: 1.1rem; margin: var(--space-4) 0 var(--space-2); }

p { margin: 0 0 var(--space-3); }

ul, ol { margin: 0 0 var(--space-3); padding-left: 1.25rem; }

.container {
  width: min(100% - var(--space-4) * 2, var(--container));
  margin-inline: auto;
}

/* Cookie top-strip */
.cookie-strip {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--stone-800);
  color: var(--stone-100);
  font-size: 0.8125rem;
  line-height: 1.45;
  padding: var(--space-2) var(--space-4);
  transform: translateY(-100%);
  transition: transform var(--transition);
}

.cookie-strip.is-visible { transform: translateY(0); }

.cookie-strip__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  max-width: var(--container);
  margin-inline: auto;
}

.cookie-strip a { color: var(--stone-200); }

.cookie-strip .btn-ghost {
  border-color: var(--stone-400);
  color: var(--stone-50);
  padding: var(--space-1) var(--space-3);
  font-size: 0.75rem;
}

.cookie-strip .btn-ghost:hover {
  background: var(--stone-600);
  color: var(--white);
}

body.has-cookie-strip .site-header { top: 0; }
body.has-cookie-strip.cookie-visible .site-header { top: 0; }

/* Compact topbar header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition), padding var(--transition);
}

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

.site-header.is-shrunk .header-inner {
  min-height: var(--header-height-shrink);
}

.site-header.is-shrunk .logo-text { font-size: 0.95rem; }
.site-header.is-shrunk .logo-mark { width: 26px; height: 26px; font-size: 0.7rem; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: var(--space-4);
  transition: min-height var(--transition);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--stone-800);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: var(--accent);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 800;
  transition: width var(--transition), height var(--transition), font-size var(--transition);
}

.logo-text { transition: font-size var(--transition); }

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.site-nav a {
  text-decoration: none;
  color: var(--stone-600);
  font-size: 0.875rem;
  font-weight: 500;
  padding: var(--space-1) 0;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin-inline: auto;
  background: var(--stone-700);
  transition: transform var(--transition), opacity var(--transition);
}

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(34, 31, 28, 0.4);
  z-index: 850;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.nav-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Buttons */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2) var(--space-4);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--stone-700);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.btn-ghost:hover {
  background: var(--stone-100);
  border-color: var(--stone-500);
  color: var(--stone-800);
}

/* Tags */
.tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
}

/* Byline */
.byline {
  font-size: 0.8125rem;
  color: var(--stone-500);
  margin-bottom: var(--space-3);
}

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

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

.byline time { color: var(--stone-400); }

/* Hero split-image-text */
.hero-split {
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--border);
  background: var(--white);
}

.hero-split__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  align-items: center;
}

.hero-split__media {
  aspect-ratio: var(--ratio-editorial);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--stone-100);
}

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

.hero-split__label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone-400);
  margin-bottom: var(--space-2);
}

.hero-split h1 a {
  color: inherit;
  text-decoration: none;
}

.hero-split h1 a:hover { color: var(--accent); }

.hero-split .dek {
  font-size: 1.05rem;
  color: var(--stone-500);
  line-height: 1.55;
  margin-bottom: var(--space-3);
}

/* Section labels */
.section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone-400);
  margin: 0 0 var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--stone-800);
  display: inline-block;
}

/* Vertical cards — editorial-lines */
.feed-section {
  padding: var(--space-5) 0;
}

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

.feed-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border);
}

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

.feed-card__thumb {
  aspect-ratio: var(--ratio-editorial);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--stone-100);
}

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

.feed-card h3 {
  margin: 0 0 var(--space-2);
  font-size: 1.05rem;
}

.feed-card h3 a {
  color: var(--stone-800);
  text-decoration: none;
}

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

.feed-card .excerpt {
  font-size: 0.9rem;
  color: var(--stone-500);
  margin-bottom: var(--space-2);
}

.feed-card .meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.75rem;
  color: var(--stone-400);
}

/* Data-light newsroom panel */
.data-panel {
  background: var(--stone-100);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin: var(--space-4) 0;
}

.data-panel__title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone-500);
  margin: 0 0 var(--space-3);
}

.data-panel dl {
  margin: 0;
  display: grid;
  gap: var(--space-2);
}

.data-panel dt {
  font-size: 0.75rem;
  color: var(--stone-400);
  font-weight: 500;
}

.data-panel dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--stone-700);
}

/* Article split-content-rail */
.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  padding: var(--space-5) 0;
}

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

.article-hero-img {
  aspect-ratio: var(--ratio-editorial);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: var(--space-4);
  background: var(--stone-100);
}

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

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

.article-body h2 {
  margin-top: var(--space-5);
  padding-top: var(--space-2);
  border-top: 1px solid var(--border);
}

.article-body blockquote {
  margin: var(--space-4) 0;
  padding: var(--space-3) var(--space-4);
  border-left: 3px solid var(--accent);
  background: var(--accent-light);
  font-style: italic;
  color: var(--stone-600);
}

.article-body .updated {
  font-size: 0.8125rem;
  color: var(--stone-400);
  margin-top: var(--space-5);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
}

/* Right rail sidebar */
.sidebar-rail {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.sidebar-widget {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

.sidebar-widget h3 {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone-500);
  margin: 0 0 var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
}

.sidebar-widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-widget li {
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--stone-100);
  font-size: 0.875rem;
}

.sidebar-widget li:last-child { border-bottom: none; }

.sidebar-widget a {
  color: var(--stone-700);
  text-decoration: none;
}

.sidebar-widget a:hover { color: var(--accent); }

.author-card {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.author-card__avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.author-card__name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--stone-800);
  margin: 0 0 var(--space-1);
}

.author-card__bio {
  font-size: 0.8rem;
  color: var(--stone-500);
  margin: 0;
  line-height: 1.45;
}

/* Page header */
.page-header {
  padding: var(--space-5) 0 var(--space-4);
  border-bottom: 1px solid var(--border);
  background: var(--white);
}

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

.page-header .lead {
  font-size: 1.05rem;
  color: var(--stone-500);
  max-width: 42rem;
}

/* Content page */
.content-page {
  padding: var(--space-5) 0;
}

.content-page .prose { max-width: 42rem; }

.content-page .prose-wide { max-width: none; }

/* Contact form */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

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

.contact-info h2 {
  font-size: 1rem;
  margin-top: 0;
}

.form-group {
  margin-bottom: var(--space-3);
}

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--stone-600);
  margin-bottom: var(--space-1);
}

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

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

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: 2px solid var(--accent-muted);
  outline-offset: 1px;
}

/* Three-column footer */
.site-footer {
  background: var(--stone-800);
  color: var(--stone-200);
  padding: var(--space-5) 0 var(--space-4);
  margin-top: var(--space-5);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

.footer-brand .logo {
  color: var(--white);
  margin-bottom: var(--space-3);
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--stone-300);
  line-height: 1.5;
}

.footer-col h3 {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone-400);
  margin: 0 0 var(--space-3);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

.footer-col a {
  color: var(--stone-200);
  text-decoration: none;
  font-size: 0.875rem;
}

.footer-col a:hover { color: var(--white); text-decoration: underline; }

.footer-bottom {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--stone-600);
  font-size: 0.75rem;
  color: var(--stone-400);
  text-align: center;
}

/* Articles listing */
.articles-grid .feed-card__content { order: 2; }
.articles-grid .feed-card__thumb { order: 1; }

/* Responsive */
@media (min-width: 640px) {
  .feed-card {
    grid-template-columns: 200px 1fr;
    align-items: start;
  }

  .hero-split__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
  }

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

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

@media (min-width: 768px) {
  .article-layout {
    grid-template-columns: 1fr 280px;
    align-items: start;
  }

  .feed-card {
    grid-template-columns: 240px 1fr;
  }
}

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

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(280px, 85vw);
    height: 100vh;
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-5) var(--space-4);
    background: var(--white);
    border-left: 1px solid var(--border);
    transform: translateX(100%);
    transition: transform var(--transition);
    z-index: 880;
    gap: var(--space-3);
  }

  .site-nav.is-open { transform: translateX(0); }

  .site-nav a {
    width: 100%;
    padding: var(--space-2) 0;
    font-size: 1rem;
  }

  .nav-overlay { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
