/* Premium Brasil — culture-desk editorial | ink-cream palette */

:root {
  --primary: #1A0A2E;
  --accent: #C9A227;
  --bg: #FAF6F0;
  --text: #160D1B;
  --muted: #8B7D6B;
  --cream-dark: #F0E8DC;
  --line: rgba(22, 13, 27, 0.12);
  --serif: "Georgia", "Times New Roman", serif;
  --sans: "Helvetica Neue", Arial, sans-serif;
  --container: 1140px;
  --radius-sm: 2px;
  --radius-md: 8px;
  --radius-lg: 24px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.75rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --transition: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 100%;
}

body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  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: 3px;
  transition: color var(--transition);
}

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

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

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

/* ── Split-nav header ── */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-split {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) 0;
}

.header-split .logo {
  justify-self: start;
}

.header-split .nav-primary {
  justify-self: center;
}

.header-split .header-meta {
  justify-self: end;
  font-size: 0.8125rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.logo {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo span {
  color: var(--accent);
}

.nav-primary ul {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
}

.nav-primary a {
  text-decoration: none;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  position: relative;
  padding-bottom: 4px;
}

.nav-primary a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav-primary a:hover::after,
.nav-primary a.active::after {
  width: 100%;
}

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

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  padding: var(--space-xs) var(--space-sm);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
  border-radius: var(--radius-sm);
}

/* ── Hero: full-width image + overlay ── */
.hero-featured {
  position: relative;
  width: 100%;
  aspect-ratio: 21 / 9;
  min-height: 380px;
  overflow: hidden;
  background: var(--primary);
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(26, 10, 46, 0.92) 0%,
    rgba(26, 10, 46, 0.45) 50%,
    rgba(26, 10, 46, 0.2) 100%
  );
  display: flex;
  align-items: flex-end;
  padding: var(--space-xl) var(--space-md);
}

.hero-content {
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
  color: var(--bg);
}

.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  color: var(--bg);
  max-width: 18ch;
  margin-bottom: var(--space-sm);
}

.hero-content p {
  font-size: 1.125rem;
  max-width: 52ch;
  opacity: 0.9;
  margin-bottom: var(--space-md);
}

/* ── Tags: bracket-label ── */
.tag {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

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

/* ── Buttons: subtle-ghost ── */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.75rem 1.5rem;
  border: 1px solid rgba(250, 246, 240, 0.4);
  background: transparent;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

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

.btn--dark {
  border-color: var(--line);
  color: var(--primary);
}

.btn--dark:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--bg);
}

/* ── Magazine breakout grid ── */
.magazine-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-lg);
  padding: var(--space-xl) 0;
}

.magazine-main {
  grid-column: 1 / 9;
}

.magazine-aside {
  grid-column: 9 / 13;
}

.breakout {
  grid-column: 1 / -1;
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* ── Editorial lines cards ── */
.card-editorial {
  border: 1px solid var(--line);
  padding: var(--space-md);
  background: var(--bg);
  border-radius: var(--radius-md);
  transition: border-color var(--transition);
}

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

.card-editorial h3 {
  font-size: 1.25rem;
  margin-bottom: var(--space-xs);
}

.card-editorial h3 a {
  text-decoration: none;
  color: var(--primary);
}

.card-editorial h3 a:hover {
  color: var(--accent);
}

.card-editorial p {
  font-size: 0.9375rem;
  color: var(--muted);
}

/* ── Article list: horizontal rows ── */
.article-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.article-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
  text-decoration: none;
  color: inherit;
  transition: background var(--transition);
}

.article-row:hover {
  background: var(--cream-dark);
}

.article-row:first-child {
  border-top: 1px solid var(--line);
}

.article-row__thumb {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--cream-dark);
}

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

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

.article-row__title {
  font-family: var(--serif);
  font-size: 1.375rem;
  color: var(--primary);
  margin-bottom: var(--space-xs);
}

.article-row__excerpt {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ── Author: card-with-avatar ── */
.author-card {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  padding: var(--space-md);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin: var(--space-lg) 0;
}

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

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

.author-card__name {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--primary);
}

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

/* ── Wide-magazine article layout ── */
.article-hero {
  padding: var(--space-xl) 0 var(--space-lg);
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
}

.article-hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: var(--space-md);
}

.article-hero__meta {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: var(--space-md);
}

.article-hero__lead {
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--text);
}

.article-wide {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: var(--space-xl);
  padding-bottom: var(--space-xl);
  align-items: start;
}

.article-body {
  max-width: 720px;
}

.article-body h2 {
  font-size: 1.5rem;
  margin: var(--space-lg) 0 var(--space-sm);
}

.article-body h3 {
  font-size: 1.2rem;
  margin: var(--space-md) 0 var(--space-sm);
}

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

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

.article-body li {
  margin-bottom: var(--space-xs);
}

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

.article-figure {
  margin: var(--space-lg) 0;
}

.article-figure img,
.article-figure svg {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

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

/* ── Sticky TOC sidebar ── */
.toc-sidebar {
  position: sticky;
  top: 100px;
  padding: var(--space-md);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg);
}

.toc-sidebar h4 {
  font-family: var(--sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: var(--space-sm);
}

.toc-sidebar ol {
  list-style: none;
  counter-reset: toc;
}

.toc-sidebar li {
  counter-increment: toc;
  margin-bottom: var(--space-xs);
}

.toc-sidebar a {
  text-decoration: none;
  font-size: 0.875rem;
  color: var(--text);
  display: block;
  padding: var(--space-xs) 0;
  border-bottom: 1px solid transparent;
  transition: all var(--transition);
}

.toc-sidebar a:hover,
.toc-sidebar a.active {
  color: var(--accent);
  border-bottom-color: var(--line);
}

/* ── Section headings ── */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--line);
}

.section-head h2 {
  font-size: 1.75rem;
}

.section-head a {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
}

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

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: var(--space-sm);
}

.page-header p {
  color: var(--muted);
  max-width: 60ch;
}

.page-content {
  padding-bottom: var(--space-xl);
  max-width: 720px;
}

.page-content h2 {
  font-size: 1.375rem;
  margin: var(--space-lg) 0 var(--space-sm);
}

.page-content p,
.page-content ul {
  margin-bottom: var(--space-md);
}

.page-content ul {
  margin-left: var(--space-md);
}

/* ── Contact form ── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-width: 520px;
}

.form-group label {
  display: block;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-xs);
  color: var(--muted);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--line);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--text);
  border-radius: var(--radius-sm);
}

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

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

/* ── Two-column footer ── */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--primary);
  color: var(--bg);
  padding: var(--space-xl) 0 var(--space-lg);
  margin-top: var(--space-xl);
}

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

.footer-brand .logo {
  color: var(--bg);
  margin-bottom: var(--space-sm);
  display: inline-block;
}

.footer-brand p {
  font-size: 0.9375rem;
  opacity: 0.75;
  max-width: 36ch;
}

.footer-nav h4 {
  font-family: var(--sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

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

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

.footer-nav a {
  color: var(--bg);
  text-decoration: none;
  font-size: 0.9375rem;
  opacity: 0.8;
}

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

.footer-bottom {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(250, 246, 240, 0.15);
  font-size: 0.8125rem;
  opacity: 0.6;
  text-align: center;
}

/* ── Cookie bottom-bar ── */
.cookie-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--primary);
  color: var(--bg);
  padding: var(--space-md);
  z-index: 200;
  transform: translateY(100%);
  transition: transform 0.4s ease;
  border-top: 2px solid var(--accent);
}

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

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

.cookie-bar p {
  font-size: 0.875rem;
  flex: 1;
  min-width: 200px;
}

.cookie-bar a {
  color: var(--accent);
}

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

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

.cookie-bar .btn:hover {
  background: var(--accent);
  color: var(--primary);
}

/* ── Prose utilities ── */
.text-muted { color: var(--muted); }
.text-center { text-align: center; }
.mb-lg { margin-bottom: var(--space-lg); }
.mt-lg { margin-top: var(--space-lg); }

/* ── Responsive ── */
@media (max-width: 960px) {
  .header-split {
    grid-template-columns: 1fr auto;
  }

  .header-split .nav-primary {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: var(--space-md);
    justify-self: stretch;
  }

  .header-split .nav-primary.open {
    display: block;
  }

  .header-split .nav-primary ul {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .header-split .header-meta {
    display: none;
  }

  .menu-toggle {
    display: block;
    justify-self: end;
  }

  .site-header .header-split {
    position: relative;
  }

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

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

  .toc-sidebar {
    position: static;
    order: -1;
  }

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

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

  .hero-featured {
    aspect-ratio: 4 / 3;
    min-height: 300px;
  }
}

@media (max-width: 600px) {
  .hero-overlay {
    padding: var(--space-lg) var(--space-md);
  }

  .cookie-bar__inner {
    flex-direction: column;
    align-items: stretch;
  }
}
