/* Órbita Brasil — weekend-edition, warm-earth, compact-news */
:root {
  --primary: #6B3E26;
  --accent: #C27B4F;
  --bg: #FDF6EF;
  --text: #2F2018;
  --muted: #9E7C67;
  --surface: #FFFCF8;
  --border: #E8D5C4;
  --space-xs: 12px;
  --space-sm: 24px;
  --space-md: 36px;
  --space-lg: 48px;
  --space-xl: 72px;
  --radius: 12px;
  --radius-sm: 8px;
  --container: 960px;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", Times, serif;
  --line-tight: 1.25;
  --line-body: 1.55;
  --transition: 0.2s 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(--line-body);
  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-thickness: 1px;
  text-underline-offset: 2px;
  transition: color var(--transition);
}

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

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  line-height: var(--line-tight);
  font-weight: 700;
  margin: 0 0 var(--space-xs);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.25rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.65rem); }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }

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

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

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

/* Header — centered-logo */
.site-header {
  padding: var(--space-md) 0 var(--space-sm);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.site-header__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.site-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text);
}

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

.site-logo__mark {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-xs);
}

.site-logo__name {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.site-logo__tagline {
  font-size: 0.8125rem;
  color: var(--muted);
  font-weight: 400;
  margin-top: 4px;
}

/* Nav — category-tags-row */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 0.875rem;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
}

.nav-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-tags a {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8125rem;
  text-decoration: none;
  color: var(--text);
  background: var(--bg);
  transition: background var(--transition), border-color var(--transition);
}

.nav-tags a:hover,
.nav-tags a.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Main layout — left-rail sidebar, 8-col asymmetric */
.page-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  padding: var(--space-lg) 0 var(--space-xl);
}

@media (min-width: 768px) {
  .page-layout--with-sidebar {
    grid-template-columns: 200px 1fr;
    gap: var(--space-md) var(--space-lg);
  }
}

.sidebar {
  order: 2;
}

@media (min-width: 768px) {
  .sidebar {
    order: 0;
  }
}

.sidebar__block {
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border);
}

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

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

.sidebar__list li {
  margin-bottom: 8px;
}

.sidebar__list a {
  font-size: 0.875rem;
  text-decoration: none;
  color: var(--text);
}

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

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

/* Hero — stacked-headlines-no-image */
.hero-stack {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 2px solid var(--primary);
}

.hero-stack__lead {
  margin-bottom: var(--space-md);
}

.hero-stack__lead a {
  text-decoration: none;
  color: var(--text);
}

.hero-stack__lead a:hover h2 {
  color: var(--primary);
}

.hero-stack__lead h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  margin-bottom: var(--space-xs);
  transition: color var(--transition);
}

.hero-stack__lead .deck {
  font-size: 1.0625rem;
  color: var(--muted);
  line-height: 1.5;
  max-width: 52ch;
}

.hero-stack__secondary {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.hero-stack__item a {
  text-decoration: none;
  color: var(--text);
  display: block;
  padding: var(--space-xs) 0;
  border-top: 1px solid var(--border);
}

.hero-stack__item a:hover h3 {
  color: var(--primary);
}

.hero-stack__item h3 {
  font-size: 1.0625rem;
  margin-bottom: 4px;
  transition: color var(--transition);
}

.hero-stack__item .meta {
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Mosaic tiles — homepage */
.mosaic {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-sm);
}

@media (min-width: 600px) {
  .mosaic {
    grid-template-columns: repeat(8, 1fr);
    gap: var(--space-sm);
  }

  .mosaic__tile--wide {
    grid-column: span 5;
  }

  .mosaic__tile--narrow {
    grid-column: span 3;
  }

  .mosaic__tile--half {
    grid-column: span 4;
  }

  .mosaic__tile--full {
    grid-column: span 8;
  }
}

/* Cards — stacked-text-below */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition);
}

.card:hover {
  box-shadow: 0 4px 20px rgba(107, 62, 38, 0.08);
}

.card__image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--border);
}

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

.card__body {
  padding: var(--space-sm);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card__title {
  font-size: 1.0625rem;
  margin-bottom: 8px;
}

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

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

.card__excerpt {
  font-size: 0.875rem;
  color: var(--muted);
  flex: 1;
  margin-bottom: var(--space-xs);
}

.card__meta {
  font-size: 0.75rem;
  color: var(--muted);
}

/* Magazine columns — article list */
.magazine-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 600px) {
  .magazine-columns {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .magazine-columns--three {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Tags — bracket-label */
.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}

.tag::before { content: "["; }
.tag::after { content: "]"; }

/* Buttons — outlined */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.btn:hover {
  background: var(--primary);
  color: #fff;
}

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

.btn--accent:hover {
  background: var(--accent);
  color: #fff;
}

/* Author — card-with-avatar */
.author-card {
  display: flex;
  gap: var(--space-xs);
  align-items: flex-start;
  padding: var(--space-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: var(--space-md) 0;
}

.author-card__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--border);
}

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

.author-card__name {
  font-weight: 700;
  font-size: 0.9375rem;
  margin-bottom: 2px;
}

.author-card__role {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.author-card__bio {
  font-size: 0.8125rem;
  color: var(--text);
  line-height: 1.45;
}

/* Article — wide-magazine */
.article-header {
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border);
}

.article-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  max-width: 20ch;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  align-items: center;
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: var(--space-xs);
}

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

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

.article-figure figcaption {
  font-size: 0.8125rem;
  color: var(--muted);
  padding: var(--space-xs) 0;
  font-style: italic;
}

.article-body {
  font-size: 1rem;
  line-height: 1.65;
}

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

.article-body h2 {
  margin-top: var(--space-md);
  margin-bottom: var(--space-xs);
  font-size: 1.25rem;
}

.article-body blockquote {
  margin: var(--space-md) 0;
  padding: var(--space-sm) var(--space-md);
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  font-style: italic;
  color: var(--primary);
}

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

.related-articles {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 2px solid var(--border);
}

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

/* Page content */
.page-header {
  margin-bottom: var(--space-md);
}

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

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

.prose {
  max-width: 65ch;
}

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

.prose h2 {
  margin-top: var(--space-md);
  font-size: 1.125rem;
}

/* Contact form */
.contact-form {
  max-width: 480px;
  margin-top: var(--space-md);
}

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

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 6px;
}

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

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

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

/* Footer — two-column */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: var(--space-lg) 0 var(--space-md);
  margin-top: var(--space-xl);
}

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

@media (min-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 36ch;
}

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

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

.footer-nav li {
  margin-bottom: 6px;
}

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

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

.footer-bottom {
  margin-top: var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--muted);
  text-align: center;
}

/* Section titles */
.section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: var(--space-sm);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* Cookie — corner-popup */
.cookie-popup {
  position: fixed;
  bottom: var(--space-sm);
  right: var(--space-sm);
  max-width: 340px;
  padding: var(--space-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(47, 32, 24, 0.12);
  z-index: 1000;
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.cookie-popup.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.cookie-popup.is-hidden {
  display: none;
}

.cookie-popup p {
  font-size: 0.8125rem;
  color: var(--text);
  margin-bottom: var(--space-xs);
}

.cookie-popup__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cookie-popup .btn {
  padding: 8px 16px;
  font-size: 0.8125rem;
}

/* Articles listing teaser */
.teaser-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border);
}

.teaser-row:last-child {
  border-bottom: none;
}

.teaser-row h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.teaser-row h3 a {
  text-decoration: none;
  color: var(--text);
}

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

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

.teaser-row .excerpt {
  font-size: 0.875rem;
  color: var(--muted);
}

/* Mobile */
@media (max-width: 767px) {
  .nav-toggle {
    display: block;
  }

  .nav-tags {
    display: none;
    flex-direction: column;
    width: 100%;
    padding-top: var(--space-xs);
  }

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

  .nav-tags a {
    text-align: center;
  }

  .page-layout--with-sidebar {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: 0;
  }
}

.sidebar__text {
  font-size: 0.875rem;
  color: var(--muted);
}

.section-spaced {
  margin-top: var(--space-lg);
}

.site-logo--footer {
  align-items: flex-start;
}

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