/* Cenário Brasil — academic-stone research publication */
:root {
  --primary: #4A4E69;
  --accent: #9A8C98;
  --bg: #F2E9E4;
  --text: #22223B;
  --muted: #6C6A7A;
  --white: #FFFFFF;
  --border: #C9C0BA;
  --border-light: #DDD6D1;
  --surface: #FAF7F5;
  --header-h: 64px;
  --header-h-shrink: 48px;
  --container: 1140px;
  --radius: 6px;
  --radius-soft: 8px;
  --shadow-sm: 0 1px 3px rgba(34, 34, 59, 0.06);
  --font-serif: Georgia, "Times New Roman", Times, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --leading-tight: 1.25;
  --leading-normal: 1.55;
  --leading-loose: 1.75;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --transition: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: var(--leading-normal);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: var(--leading-tight);
  margin: 0 0 var(--space-sm);
  color: var(--text);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.125rem; }

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

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

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

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-lg);
}

.col-main { grid-column: span 8; }
.col-sidebar { grid-column: span 4; }

@media (max-width: 900px) {
  .col-main,
  .col-sidebar {
    grid-column: span 12;
  }
}

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

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

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

.site-header.is-shrunk .logo-text {
  font-size: 1.125rem;
}

.site-header.is-shrunk .logo-tagline {
  display: none;
}

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

.logo-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text);
}

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

.logo-mark {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.1;
  transition: font-size var(--transition);
}

.logo-tagline {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}

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

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

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

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

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border-light);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
  }

  .main-nav.is-open {
    max-height: 320px;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: var(--space-md);
  }

  .main-nav li {
    width: 100%;
    border-bottom: 1px solid var(--border-light);
  }

  .main-nav li:last-child {
    border-bottom: none;
  }

  .main-nav a {
    display: block;
    padding: var(--space-sm) 0;
  }

  .site-header {
    position: relative;
  }
}

/* Buttons — outlined */
.btn {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-align: center;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

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

.btn-outlined:hover {
  background: var(--primary);
  color: var(--white);
}

/* Tags — uppercase small */
.tag {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-xs);
}

/* Inline byline */
.byline {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: var(--space-md);
}

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

.byline-sep {
  margin: 0 0.35em;
  color: var(--border);
}

.byline-avatar {
  vertical-align: middle;
  margin-right: 8px;
  border-radius: 50%;
}

.date {
  font-variant-numeric: tabular-nums;
}

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

.hero-content h1 {
  font-size: 2.25rem;
  margin-bottom: var(--space-md);
}

.hero-lead {
  font-size: 1.0625rem;
  line-height: var(--leading-loose);
  color: var(--muted);
  margin-bottom: var(--space-lg);
}

.hero-image {
  border-radius: var(--radius-soft);
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.hero-image img,
.hero-image svg {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

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

  .hero-content h1 {
    font-size: 1.75rem;
  }
}

/* Section headers */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--primary);
}

.section-header h2 {
  margin: 0;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Article list — horizontal rows, bordered cards */
.article-feed {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.article-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-lg);
  padding: var(--space-md);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-soft);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.article-row:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.article-row-thumb {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.article-row-thumb img,
.article-row-thumb svg {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-row-body h3 {
  font-size: 1.0625rem;
  margin-bottom: var(--space-xs);
}

.article-row-body h3 a {
  color: var(--text);
}

.article-row-body h3 a:hover {
  color: var(--primary);
}

.article-row-excerpt {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: var(--space-sm);
  line-height: var(--leading-normal);
}

.article-row-meta {
  font-size: 0.75rem;
  color: var(--muted);
}

@media (max-width: 600px) {
  .article-row {
    grid-template-columns: 1fr;
  }
}

/* Sidebar — right rail */
.sidebar {
  position: sticky;
  top: calc(var(--header-h) + var(--space-md));
}

.sidebar-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-soft);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}

.sidebar-block h3 {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--border-light);
}

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

.sidebar-list li {
  padding: var(--space-xs) 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.875rem;
}

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

.sidebar-list a {
  color: var(--text);
}

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

/* Article page — pull quote led */
.article-header {
  padding: var(--space-xl) 0 var(--space-lg);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-xl);
}

.article-header h1 {
  font-size: 2.125rem;
  max-width: 720px;
}

.article-lead {
  font-size: 1.125rem;
  line-height: var(--leading-loose);
  color: var(--muted);
  max-width: 680px;
}

.pull-quote {
  float: left;
  width: 40%;
  margin: 0 var(--space-lg) var(--space-md) 0;
  padding: var(--space-md) var(--space-lg);
  border-left: 4px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius-soft) var(--radius-soft) 0;
}

.pull-quote p {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-style: italic;
  line-height: var(--leading-tight);
  color: var(--primary);
  margin: 0;
}

.pull-quote cite {
  display: block;
  margin-top: var(--space-sm);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.article-body {
  font-size: 0.9375rem;
  line-height: var(--leading-loose);
}

.article-body h2 {
  margin-top: var(--space-xl);
  font-size: 1.375rem;
}

.article-body h3 {
  margin-top: var(--space-lg);
}

.article-featured-image {
  margin-bottom: var(--space-xl);
  border-radius: var(--radius-soft);
  overflow: hidden;
  border: 1px solid var(--border);
}

.article-featured-image img,
.article-featured-image svg {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

@media (max-width: 768px) {
  .pull-quote {
    float: none;
    width: 100%;
    margin: var(--space-lg) 0;
  }

  .article-header h1 {
    font-size: 1.625rem;
  }
}

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

.editorial-intro {
  margin-bottom: var(--space-xl);
}

.editorial-intro .content-block {
  margin-bottom: 0;
}

.page-content h1 {
  margin-bottom: var(--space-lg);
}

.content-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-soft);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.content-block h2 {
  font-size: 1.125rem;
  margin-top: var(--space-lg);
}

.content-block h2:first-child {
  margin-top: 0;
}

/* Contact form */
.form-group {
  margin-bottom: var(--space-md);
}

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

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
}

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

/* Editorial masthead footer */
.site-footer {
  background: var(--primary);
  color: var(--bg);
  padding: var(--space-2xl) 0 var(--space-lg);
  margin-top: var(--space-2xl);
}

.footer-masthead {
  text-align: center;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid rgba(242, 233, 228, 0.2);
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.footer-tagline {
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.75;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
  opacity: 0.7;
}

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

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

.footer-col a {
  color: var(--bg);
  font-size: 0.875rem;
  opacity: 0.85;
}

.footer-col a:hover {
  opacity: 1;
  color: var(--white);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(242, 233, 228, 0.2);
  font-size: 0.8125rem;
  opacity: 0.7;
}

.footer-bottom a {
  color: var(--bg);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* Cookie bottom bar */
.cookie-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--text);
  color: var(--bg);
  padding: var(--space-md);
  transform: translateY(100%);
  transition: transform var(--transition);
  box-shadow: 0 -4px 20px rgba(34, 34, 59, 0.15);
}

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

.cookie-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  max-width: var(--container);
  margin: 0 auto;
}

.cookie-text {
  flex: 1;
  min-width: 240px;
  font-size: 0.8125rem;
  line-height: var(--leading-normal);
  margin: 0;
}

.cookie-text a {
  color: var(--bg);
  text-decoration: underline;
}

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

.cookie-bar .btn-outlined {
  border-color: var(--bg);
  color: var(--bg);
}

.cookie-bar .btn-outlined:hover {
  background: var(--bg);
  color: var(--text);
}

/* Utility */
.sr-only {
  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);
}

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

.main-content {
  min-height: 60vh;
}
