/* Select Brasil — selectbr.digital
   local-newspaper · modern-sans · soft-neutral · article-stream */

:root {
  --primary: #4A4E69;
  --accent: #9A8C98;
  --bg: #F7F4F8;
  --text: #22223B;
  --muted: #C9ADA7;
  --white: #FFFFFF;
  --border: #E8E0E4;
  --border-strong: #D4C8CE;
  --surface: #FFFFFF;
  --overlay: rgba(34, 34, 59, 0.62);
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 64px;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-pill: 999px;
  --container: 1140px;
  --font-sans: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --header-full: 96px;
  --header-shrink: 56px;
  --line-tight: 1.28;
  --line-base: 1.65;
  --line-prose: 1.75;
  --ease: 0.22s ease;
  --shadow-card: 0 1px 0 var(--border-strong);
}

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

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

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: var(--line-base);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

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

ul,
ol {
  list-style: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

main {
  flex: 1;
}

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

h1 { font-size: clamp(1.75rem, 4vw, 2.375rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.25rem, 2.5vw, 1.625rem); }
h3 { font-size: 1.125rem; }
h4 { font-size: 0.9375rem; }

p {
  margin-bottom: var(--space-sm);
}

p:last-child {
  margin-bottom: 0;
}

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

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

.col-main { grid-column: 1 / -1; }
.col-aside { grid-column: 1 / -1; }

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

/* Double-row header — sticky shrink */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--ease);
}

.site-header.is-shrunk {
  box-shadow: 0 2px 12px rgba(74, 78, 105, 0.1);
}

.header-row-top {
  background: var(--primary);
  color: var(--white);
  transition: padding var(--ease);
}

.site-header.is-shrunk .header-row-top {
  padding-top: 0;
  padding-bottom: 0;
}

.header-row-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  flex-wrap: wrap;
  transition: padding var(--ease);
}

.site-header.is-shrunk .header-row-top-inner {
  padding: var(--space-xs) 0;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--white);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  text-decoration: none;
  transition: font-size var(--ease);
}

.site-header.is-shrunk .brand-lockup {
  font-size: 1.0625rem;
}

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

.brand-lockup img {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  transition: width var(--ease), height var(--ease);
}

.site-header.is-shrunk .brand-lockup img {
  width: 28px;
  height: 28px;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: 0.8125rem;
  opacity: 0.9;
}

.header-meta a {
  color: var(--white);
}

.header-meta a:hover {
  color: var(--muted);
}

.header-row-bottom {
  background: var(--surface);
  overflow: hidden;
  max-height: 52px;
  transition: max-height var(--ease), opacity var(--ease);
}

.site-header.is-shrunk .header-row-bottom {
  max-height: 0;
  opacity: 0;
  border: none;
}

.header-row-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-xs) 0;
}

.header-tagline {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 500;
  display: none;
}

.main-nav {
  display: none;
  align-items: center;
  gap: var(--space-xs);
}

.main-nav a {
  display: inline-block;
  padding: var(--space-xs) var(--space-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background var(--ease), color var(--ease);
}

.main-nav a:hover {
  background: var(--bg);
  color: var(--primary);
}

.main-nav a.is-active {
  color: var(--accent);
  background: var(--bg);
}

.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: var(--space-xs);
  margin-left: auto;
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
  transition: transform var(--ease), opacity var(--ease);
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-drawer {
  display: none;
  flex-direction: column;
  gap: var(--space-xs);
  padding-bottom: var(--space-sm);
}

.mobile-drawer.is-open {
  display: flex;
}

.mobile-drawer a {
  padding: var(--space-sm);
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  border-radius: var(--radius-sm);
}

.mobile-drawer a:hover,
.mobile-drawer a.is-active {
  background: var(--bg);
  color: var(--accent);
}

/* Category strip */
.category-strip {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: var(--space-sm) 0;
}

.category-strip-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
}

.category-strip__label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-right: var(--space-xs);
}

/* Pill-colored tags */
.tag {
  display: inline-block;
  padding: 0.2em 0.75em;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  text-decoration: none;
  line-height: 1.4;
}

.tag--pulse {
  background: rgba(74, 78, 105, 0.12);
  color: var(--primary);
}

.tag--sector {
  background: rgba(154, 140, 152, 0.18);
  color: #6B5F6A;
}

.tag--sentiment {
  background: rgba(201, 173, 167, 0.35);
  color: #7A635C;
}

.tag--local {
  background: rgba(34, 34, 59, 0.08);
  color: var(--text);
}

/* Subtle-ghost button */
.btn {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  text-decoration: none;
  transition: background var(--ease), border-color var(--ease), color var(--ease);
}

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

/* Hero — full-width image + overlay */
.hero-banner {
  position: relative;
  width: 100%;
  min-height: 380px;
  overflow: hidden;
  background: var(--primary);
}

.hero-banner__image {
  width: 100%;
  height: 100%;
  min-height: 380px;
  object-fit: cover;
  aspect-ratio: 3 / 2;
}

.hero-banner__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--overlay) 0%, rgba(34, 34, 59, 0.25) 55%, rgba(34, 34, 59, 0.1) 100%);
}

.hero-banner__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-xl) var(--space-md);
  color: var(--white);
}

.hero-banner__content .container {
  max-width: var(--container);
}

.hero-banner__kicker {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: var(--space-sm);
}

.hero-banner__content h1 {
  color: var(--white);
  max-width: 36rem;
  margin-bottom: var(--space-sm);
}

.hero-banner__lead {
  font-size: 1.0625rem;
  line-height: var(--line-prose);
  color: rgba(255, 255, 255, 0.9);
  max-width: 32rem;
}

/* Article stream — vertical bordered cards */
.stream-section {
  padding: var(--space-xl) 0;
}

.stream-header {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 2px solid var(--primary);
}

.stream-header h2 {
  margin-bottom: var(--space-xs);
}

.stream-header p {
  color: var(--accent);
  font-size: 0.9375rem;
}

.article-stream {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.stream-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: border-color var(--ease);
}

.stream-card:hover {
  border-color: var(--accent);
}

.stream-card__thumb {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--bg);
}

.stream-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stream-card__body {
  padding: 0 var(--space-md) var(--space-md);
}

.stream-card__meta {
  font-size: 0.8125rem;
  color: var(--accent);
  margin-bottom: var(--space-xs);
}

.stream-card__title {
  font-size: 1.25rem;
  margin-bottom: var(--space-xs);
}

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

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

.stream-card__excerpt {
  font-size: 0.9375rem;
  color: var(--text);
  line-height: var(--line-prose);
}

/* Intro prose block */
.intro-block {
  padding: var(--space-xl) 0;
  border-bottom: 1px solid var(--border);
}

.intro-block .prose {
  max-width: 42rem;
}

.intro-block .prose p {
  line-height: var(--line-prose);
}

.prose h2 {
  margin-bottom: var(--space-sm);
}

.prose blockquote {
  margin: var(--space-md) 0;
  padding-left: var(--space-md);
  border-left: 3px solid var(--muted);
  font-style: italic;
  color: var(--accent);
}

/* Page header */
.page-header {
  padding: var(--space-xl) 0 var(--space-md);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-lg);
}

.page-header p {
  color: var(--accent);
  margin-top: var(--space-xs);
}

/* Article layout — sidebar author only */
.article-page {
  padding: var(--space-lg) 0 var(--space-xl);
}

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

.article-byline {
  font-size: 0.875rem;
  color: var(--accent);
  margin-top: var(--space-sm);
}

.article-hero {
  margin-bottom: var(--space-lg);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-strong);
}

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

.article-content {
  line-height: var(--line-prose);
}

.article-content h2 {
  margin: var(--space-lg) 0 var(--space-sm);
}

.article-content blockquote {
  margin: var(--space-md) 0;
  padding: var(--space-md);
  background: var(--bg);
  border-left: 4px solid var(--muted);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--accent);
}

.article-updated {
  font-size: 0.8125rem;
  color: var(--accent);
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
}

.article-disclaimer {
  font-size: 0.8125rem;
  color: var(--accent);
  margin-top: var(--space-md);
  padding: var(--space-sm);
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* Author sidebar bio box */
.author-bio {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: var(--space-md);
  box-shadow: var(--shadow-card);
}

.author-bio__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: var(--space-sm);
  border: 2px solid var(--border);
}

.author-bio__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-bio__label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: var(--space-xs);
}

.author-bio__name {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--space-xs);
}

.author-bio__role {
  font-size: 0.8125rem;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.author-bio__text {
  font-size: 0.875rem;
  line-height: var(--line-prose);
  color: var(--text);
}

.aside-sticky {
  position: sticky;
  top: calc(var(--header-shrink) + var(--space-md));
}

/* Related articles */
.related-section {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}

.related-section h2 {
  margin-bottom: var(--space-md);
  font-size: 1.125rem;
}

.related-list li {
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-sm);
  border-bottom: 1px dashed var(--border);
}

.related-list a {
  font-weight: 600;
  text-decoration: none;
}

.related-list span {
  display: block;
  font-size: 0.8125rem;
  color: var(--accent);
  margin-top: 2px;
}

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

.form-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  color: var(--primary);
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 0.75rem var(--space-sm);
  font: inherit;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
}

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

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

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

.content-page .prose {
  max-width: 42rem;
  line-height: var(--line-prose);
}

.content-page .prose h2 {
  margin: var(--space-lg) 0 var(--space-sm);
}

.content-page .prose h3 {
  margin: var(--space-md) 0 var(--space-xs);
}

.content-page .prose ul {
  list-style: disc;
  margin: var(--space-sm) 0 var(--space-sm) var(--space-lg);
}

.content-page .prose li {
  margin-bottom: var(--space-xs);
}

/* Footer — editorial masthead */
.site-footer {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.88);
  padding: var(--space-xl) 0 var(--space-lg);
  margin-top: auto;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.footer-masthead {
  text-align: center;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-masthead__edition {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-xs);
}

.footer-masthead__name {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-xs);
}

.footer-masthead__tagline {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.78);
  max-width: 30rem;
  margin: 0 auto;
  line-height: var(--line-prose);
}

.footer-grid {
  display: grid;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-col h4 {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: var(--space-sm);
}

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

.footer-col a {
  font-size: 0.875rem;
  text-decoration: none;
}

.footer-col a:hover {
  text-decoration: underline;
}

.footer-bottom {
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.65);
  text-align: center;
}

/* Cookie — inline-footer-note */
.cookie-notice {
  display: none;
  margin-top: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
}

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

.cookie-notice button {
  display: inline;
  margin-left: var(--space-xs);
  color: var(--muted);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

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

/* Breakpoints */
@media (min-width: 640px) {
  .stream-card {
    grid-template-columns: 280px 1fr;
  }

  .stream-card__body {
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

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

  .main-nav {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

  .col-main {
    grid-column: span 5;
  }

  .col-aside {
    grid-column: span 3;
  }

  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-8--article .col-main {
    grid-column: span 5;
  }

  .grid-8--article .col-aside {
    grid-column: span 3;
  }
}

@media (min-width: 1024px) {
  .col-main {
    grid-column: span 6;
  }

  .col-aside {
    grid-column: span 2;
  }

  .grid-8--article .col-main {
    grid-column: span 5;
  }

  .grid-8--article .col-aside {
    grid-column: span 3;
  }
}

@media (max-width: 767px) {
  .header-meta {
    font-size: 0.75rem;
    gap: var(--space-sm);
  }

  .hero-banner {
    min-height: 300px;
  }

  .hero-banner__image {
    min-height: 300px;
  }
}
