/* Controle Societário — academic-stone, bento-grid, 960px container */

:root {
  --primary: #3D405B;
  --accent: #E07A5F;
  --bg: #F4F1DE;
  --text: #1C1E2E;
  --muted: #8D99AE;
  --white: #FDFCF8;
  --border: rgba(61, 64, 91, 0.12);
  --shadow: 0 4px 24px rgba(28, 30, 46, 0.08);
  --shadow-sm: 0 2px 12px rgba(28, 30, 46, 0.06);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --container: 960px;
  --sidebar: 220px;
  --font-serif: "Georgia", "Times New Roman", serif;
  --font-sans: "Segoe UI", system-ui, -apple-system, sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4.5rem;
}

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

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

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

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); }
h3 { font-size: 1.15rem; }

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

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

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

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--primary);
}

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

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

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header-meta {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: right;
}

.header-meta time { display: block; }

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.65rem;
  font-size: 0.85rem;
  color: var(--primary);
  cursor: pointer;
}

.header-nav {
  padding: var(--space-sm) 0;
}

.nav-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-pills a {
  display: block;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  transition: background 0.2s, color 0.2s;
}

.nav-pills a:hover {
  background: rgba(61, 64, 91, 0.06);
  color: var(--primary);
}

.nav-pills a.active {
  background: var(--primary);
  color: var(--white);
}

/* Layout with left sidebar */
.page-layout {
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  gap: var(--space-xl);
  padding: var(--space-xl) 0 var(--space-2xl);
}

.sidebar {
  position: sticky;
  top: 7rem;
  align-self: start;
}

.sidebar-block {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-md);
}

.sidebar-block h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 var(--space-sm);
  font-family: var(--font-sans);
  font-weight: 600;
}

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

.sidebar-links li {
  border-bottom: 1px solid var(--border);
  padding: 0.4rem 0;
}

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

.sidebar-links a {
  text-decoration: none;
  font-size: 0.85rem;
  color: var(--text);
}

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

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

/* Hero — stacked-headlines-no-image */
.hero-stacked {
  padding: var(--space-xl) 0 var(--space-lg);
}

.hero-stacked .eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.hero-stacked h1 {
  margin: 0 0 var(--space-md);
  max-width: 18ch;
}

.hero-stacked .lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 42ch;
  margin: 0;
}

/* Bento grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}

.bento-item {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.bento-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(28, 30, 46, 0.12);
}

.bento-featured {
  grid-column: span 4;
  grid-row: span 2;
}

.bento-side {
  grid-column: span 2;
}

.bento-small {
  grid-column: span 2;
}

.bento-item a {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.bento-item .thumb-wrap {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: rgba(61, 64, 91, 0.04);
}

.bento-item .thumb-wrap img,
.bento-item .thumb-wrap svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bento-body {
  padding: var(--space-md);
}

.bento-body h2, .bento-body h3 {
  margin: var(--space-xs) 0;
  font-size: 1.1rem;
}

.bento-featured .bento-body h2 {
  font-size: 1.5rem;
}

/* Tags — pill-colored */
.tag {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tag-control { background: rgba(61, 64, 91, 0.12); color: var(--primary); }
.tag-acionaria { background: rgba(224, 122, 95, 0.18); color: #9E4A35; }
.tag-governanca { background: rgba(141, 153, 174, 0.2); color: #5A6478; }
.tag-familia { background: rgba(244, 209, 96, 0.35); color: #6B5A1E; }

.meta {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Compact dense list */
.article-list-compact {
  list-style: none;
  margin: 0;
  padding: 0;
}

.article-list-compact li {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

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

.article-list-compact .thumb-mini {
  width: 72px;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(61, 64, 91, 0.04);
}

.article-list-compact .thumb-mini img,
.article-list-compact .thumb-mini svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-list-compact a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: 0.92rem;
}

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

.article-list-compact .meta { margin-top: 0.15rem; }

/* Cards — shadowed */
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
}

/* Buttons — subtle-ghost */
.btn {
  display: inline-block;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--primary);
  transition: background 0.2s, border-color 0.2s;
}

.btn:hover {
  background: rgba(61, 64, 91, 0.06);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-accent {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-accent:hover {
  background: rgba(224, 122, 95, 0.1);
}

/* Article — pull-quote-led */
.article-header {
  margin-bottom: var(--space-xl);
}

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

.pull-quote {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  line-height: 1.45;
  color: var(--primary);
  border-left: 4px solid var(--accent);
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-lg) 0;
  background: rgba(224, 122, 95, 0.06);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.article-body h2 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
}

.article-body ul, .article-body ol {
  margin: 0 0 var(--space-md);
  padding-left: 1.4rem;
}

.article-figure {
  margin: var(--space-lg) 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

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

.article-figure figcaption {
  font-size: 0.8rem;
  color: var(--muted);
  padding: var(--space-sm) var(--space-md);
  background: var(--white);
}

/* Author — footer-author-note */
.author-note {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-top: var(--space-xl);
}

.author-note img,
.author-note svg {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  flex-shrink: 0;
}

.author-note .author-info { font-size: 0.9rem; }

.author-note .author-name {
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.2rem;
}

.author-note .author-bio {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0;
}

/* Page sections */
.section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: var(--space-md);
  font-family: var(--font-sans);
}

.page-hero {
  padding: var(--space-xl) 0 var(--space-lg);
}

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

.page-hero .lead {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 55ch;
}

.prose { max-width: 65ch; }

.prose-narrow { max-width: 58ch; }

/* Contact form */
.contact-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
  color: var(--primary);
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--white);
  margin-bottom: var(--space-md);
}

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

/* Footer — stacked-links */
.site-footer {
  background: var(--primary);
  color: rgba(253, 252, 248, 0.85);
  padding: var(--space-xl) 0 var(--space-lg);
  margin-top: var(--space-2xl);
}

.site-footer a {
  color: rgba(253, 252, 248, 0.9);
  text-decoration: none;
}

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

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: var(--space-sm);
}

.footer-tagline {
  font-size: 0.9rem;
  opacity: 0.75;
  margin-bottom: var(--space-lg);
  max-width: 40ch;
}

.footer-links-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: var(--space-lg);
}

.footer-links-stack a {
  font-size: 0.9rem;
}

.footer-bottom {
  border-top: 1px solid rgba(253, 252, 248, 0.15);
  padding-top: var(--space-md);
  font-size: 0.8rem;
  opacity: 0.7;
}

.cookie-note {
  margin-top: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: rgba(253, 252, 248, 0.08);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  line-height: 1.5;
}

.cookie-note button {
  background: none;
  border: none;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
  padding: 0;
  margin-left: 0.25rem;
}

.cookie-note.hidden { display: none; }

/* Articles grid page */
.articles-grid {
  display: grid;
  gap: var(--space-md);
}

.article-card-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: var(--space-md);
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.article-card-row:hover { box-shadow: var(--shadow); }

.article-card-row .thumb-wrap {
  aspect-ratio: 4 / 3;
}

.article-card-row .thumb-wrap img,
.article-card-row .thumb-wrap svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-card-row .card-body {
  padding: var(--space-md) var(--space-md) var(--space-md) 0;
}

.article-card-row h2 {
  font-size: 1.1rem;
  margin: 0.3rem 0;
}

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

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

.article-card-row p {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

/* Utility */
.text-center { text-align: center; }
.mt-lg { margin-top: var(--space-lg); }
.mb-lg { margin-bottom: var(--space-lg); }

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

.meta-compact {
  margin: 0;
  font-size: 0.9rem;
}

.meta-footer {
  margin: 0;
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 820px) {
  .page-layout {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .sidebar {
    position: static;
    order: 2;
  }

  .bento-featured,
  .bento-side,
  .bento-small {
    grid-column: span 6;
  }

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

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

  .article-card-row .card-body {
    padding: 0 var(--space-md) var(--space-md);
  }

  .menu-toggle { display: block; }

  .header-nav {
    display: none;
    padding-bottom: var(--space-md);
  }

  .header-nav.is-open { display: block; }

  .nav-pills { flex-direction: column; }
}
