/* Enlace — socialbr.info
   Archetype: research-publication | Palette: petróleo + areia
   Header: compact-topbar | Typography: serif-editorial | Cards: editorial-lines */

:root {
  --petroleo-950: #0c2e2e;
  --petroleo-900: #134040;
  --petroleo-800: #1a5252;
  --petroleo-700: #226868;
  --petroleo-600: #2d8585;
  --petroleo-400: #5aabab;
  --petroleo-200: #b8d8d8;
  --areia-50: #faf8f4;
  --areia-100: #f3efe8;
  --areia-200: #e8e0d4;
  --areia-300: #d9cfc0;
  --areia-400: #c4b5a0;
  --text: #1e2a28;
  --text-muted: #5a6562;
  --text-light: #7a8683;
  --white: #ffffff;
  --border: #d4cfc4;
  --border-strong: var(--petroleo-700);
  --font-serif: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-display: Georgia, "Times New Roman", Times, serif;
  --max-wide: 1120px;
  --max-read: 42rem;
  --topbar-h: 48px;
  --sidebar-w: 280px;
}

[data-theme="dark"] {
  --areia-50: #141a19;
  --areia-100: #1c2423;
  --areia-200: #283230;
  --areia-300: #3a4543;
  --areia-400: #5a6562;
  --text: #e8eceb;
  --text-muted: #a8b4b1;
  --text-light: #889490;
  --white: #1c2423;
  --border: #3a4543;
  --petroleo-200: #2d4a4a;
}

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

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-serif);
  color: var(--text);
  background: var(--areia-50);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover { color: var(--petroleo-900); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.22;
  color: var(--petroleo-900);
  font-weight: 700;
  margin-top: 0;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4 { color: var(--petroleo-200); }

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.3rem, 2.5vw, 1.65rem); margin-bottom: 0.65em; }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1.05em; }

ul, ol { margin: 0 0 1.05em; padding-left: 1.35em; }

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

.container {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 1.35rem;
}

/* ——— Compact topbar ——— */
.topbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--petroleo-900);
  color: var(--white);
  border-bottom: 1px solid var(--petroleo-700);
}

.topbar__inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 1.35rem;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
}

.brand:hover { color: var(--petroleo-200); }

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

.brand__tag {
  display: block;
  font-family: var(--font-serif);
  font-size: 0.58rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.72;
  margin-top: 1px;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.topbar__date {
  font-size: 0.72rem;
  opacity: 0.75;
  display: none;
}

@media (min-width: 768px) {
  .topbar__date { display: block; }
}

.theme-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.35);
  color: var(--white);
  font-family: var(--font-serif);
  font-size: 0.72rem;
  padding: 0.25rem 0.55rem;
  cursor: pointer;
  border-radius: 2px;
}

.theme-btn:hover { background: rgba(255,255,255,0.1); }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--white);
}

/* Category strip */
.cat-strip {
  background: var(--areia-100);
  border-bottom: 1px solid var(--border);
}

.cat-strip__inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 1.35rem;
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.cat-strip a {
  display: block;
  padding: 0.55rem 0.9rem;
  font-size: 0.78rem;
  font-family: var(--font-serif);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}

.cat-strip a:hover,
.cat-strip a.active {
  color: var(--petroleo-800);
  border-bottom-color: var(--petroleo-700);
}

/* Main nav in topbar */
.main-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.main-nav a {
  color: rgba(255,255,255,0.85);
  font-size: 0.82rem;
  text-decoration: none;
  font-family: var(--font-serif);
}

.main-nav a:hover,
.main-nav a.active { color: var(--white); text-decoration: underline; }

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

  .main-nav {
    display: none;
    position: absolute;
    top: var(--topbar-h);
    left: 0;
    right: 0;
    background: var(--petroleo-950);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1.35rem 1rem;
    border-bottom: 1px solid var(--petroleo-700);
    gap: 0;
  }

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

  .main-nav a {
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
}

/* ——— Article stream (homepage) ——— */
.stream-header {
  padding: 2.25rem 0 1.5rem;
  border-bottom: 3px double var(--border);
  margin-bottom: 0;
}

.stream-kicker {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--petroleo-700);
  margin: 0 0 0.65rem;
  font-weight: 600;
}

.stream-header h1 {
  max-width: 38rem;
  margin-bottom: 0.85rem;
}

.stream-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 40rem;
  margin-bottom: 1rem;
}

.stream-body-text {
  max-width: 40rem;
  font-size: 0.95rem;
}

.stream-body-text p:last-child { margin-bottom: 0; }

/* Editorial-lines cards */
.article-stream { margin: 0; }

.stream-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 1.65rem 0;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 640px) {
  .stream-card {
    grid-template-columns: 160px 1fr;
    gap: 1.35rem;
  }
}

.stream-card__thumb {
  display: block;
  text-decoration: none;
}

.stream-card__thumb img {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--areia-100);
}

.stream-card__cat {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--petroleo-700);
  font-weight: 600;
  margin-bottom: 0.35rem;
  display: block;
}

.stream-card h2 {
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  margin: 0 0 0.45rem;
  line-height: 1.28;
}

.stream-card h2 a {
  color: var(--petroleo-900);
  text-decoration: none;
}

.stream-card h2 a:hover { text-decoration: underline; }

[data-theme="dark"] .stream-card h2 a { color: var(--areia-100); }

.stream-card__meta {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-bottom: 0.55rem;
}

.stream-card__meta strong { color: var(--text-muted); font-weight: 600; }

.updated-badge {
  font-style: italic;
  color: var(--petroleo-600);
}

.stream-card__excerpt {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.65;
}

.stream-card__wc {
  font-size: 0.72rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

/* ——— Sidebar article layout ——— */
.article-page { padding: 2rem 0 3rem; }

.article-header {
  max-width: var(--max-read);
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.article-header .article-cat {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--petroleo-700);
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: block;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  font-size: 0.82rem;
  color: var(--text-light);
  margin-top: 0.85rem;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 900px) {
  .article-layout {
    grid-template-columns: 1fr var(--sidebar-w);
    gap: 3rem;
  }
}

.article-content {
  max-width: var(--max-read);
}

.article-content .lead {
  font-size: 1.12rem;
  color: var(--text-muted);
  border-left: 3px solid var(--petroleo-600);
  padding-left: 1rem;
  margin-bottom: 1.5rem;
}

.article-content figure {
  margin: 1.5rem 0;
}

.article-content figure img {
  border: 1px solid var(--border);
}

.article-content figcaption {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 0.45rem;
  font-style: italic;
}

.data-callout {
  background: var(--areia-100);
  border: 1px solid var(--border);
  border-left: 3px solid var(--petroleo-700);
  padding: 1rem 1.15rem;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.data-callout strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--petroleo-800);
  margin-bottom: 0.35rem;
}

blockquote {
  margin: 1.5rem 0;
  padding: 0.5rem 0 0.5rem 1.25rem;
  border-left: 3px solid var(--petroleo-400);
  font-style: italic;
  color: var(--text-muted);
}

.article-sidebar {
  font-size: 0.88rem;
}

.sidebar-block {
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-block:last-child { border-bottom: none; margin-bottom: 0; }

.sidebar-block h3 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--petroleo-700);
  margin-bottom: 0.75rem;
}

.sidebar-related a {
  display: block;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 0.65rem;
  line-height: 1.4;
  font-size: 0.88rem;
}

.sidebar-related a:hover { color: var(--petroleo-700); text-decoration: underline; }

.sidebar-related span {
  display: block;
  font-size: 0.72rem;
  color: var(--text-light);
  margin-top: 0.15rem;
}

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

.source-list li {
  margin-bottom: 0.45rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding-left: 0.75rem;
  border-left: 2px solid var(--areia-300);
}

.author-box {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.author-box img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.author-box h4 {
  font-size: 0.95rem;
  margin: 0 0 0.25rem;
  color: var(--text);
}

.author-box .author-role {
  font-size: 0.78rem;
  color: var(--petroleo-700);
  margin-bottom: 0.4rem;
}

.author-box p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.55;
}

/* ——— Articles listing ——— */
.page-header {
  padding: 2rem 0 1.5rem;
  border-bottom: 3px double var(--border);
  margin-bottom: 0.5rem;
}

.page-header h1 { margin-bottom: 0.5rem; }

.page-header p {
  color: var(--text-muted);
  max-width: 36rem;
  margin: 0;
}

/* ——— Static pages ——— */
.static-page {
  padding: 2rem 0 3rem;
  max-width: 40rem;
}

.static-page h2 {
  margin-top: 1.75rem;
  font-size: 1.25rem;
}

/* Contact form */
.contact-form {
  margin-top: 1.5rem;
  max-width: 32rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  border-radius: 2px;
}

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

.btn {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 0.88rem;
  padding: 0.55rem 1.25rem;
  background: var(--petroleo-800);
  color: var(--white);
  border: none;
  cursor: pointer;
  border-radius: 2px;
  text-decoration: none;
}

.btn:hover {
  background: var(--petroleo-900);
  color: var(--white);
}

.form-success {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--areia-100);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--petroleo-800);
}

/* ——— Footer ——— */
.site-footer {
  background: var(--areia-100);
  border-top: 1px solid var(--border);
  padding: 2rem 0 1.5rem;
  margin-top: 2rem;
  font-size: 0.85rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

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

.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--petroleo-900);
  margin-bottom: 0.5rem;
}

.footer-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.55;
  max-width: 28rem;
}

.footer-col h4 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--petroleo-700);
  margin: 0 0 0.65rem;
}

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

.footer-col li { margin-bottom: 0.4rem; }

.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.84rem;
}

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

.footer-bottom {
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-light);
}

/* ——— Cookie notice ——— */
.cookie-notice {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--petroleo-950);
  color: var(--white);
  padding: 1rem 1.35rem;
  z-index: 300;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  font-size: 0.85rem;
}

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

.cookie-notice__inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-notice p { margin: 0; flex: 1; min-width: 200px; }

.cookie-notice a { color: var(--petroleo-200); }

.cookie-notice__actions {
  display: flex;
  gap: 0.5rem;
}

.cookie-notice .btn-accept {
  background: var(--petroleo-600);
  color: var(--white);
  border: none;
  padding: 0.45rem 0.9rem;
  font-family: var(--font-serif);
  font-size: 0.82rem;
  cursor: pointer;
  border-radius: 2px;
}

.cookie-notice .btn-decline {
  background: transparent;
  color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.35);
  padding: 0.45rem 0.9rem;
  font-family: var(--font-serif);
  font-size: 0.82rem;
  cursor: pointer;
  border-radius: 2px;
}
