/* Hyper Brasil — modern-magazine, bold-contrast, mosaic-tiles */
:root {
  --primary: #3A0CA3;
  --accent: #F72585;
  --bg: #FFF5FB;
  --text: #1A0B2E;
  --muted: #9B5DE5;
  --white: #FFFFFF;
  --border: rgba(58, 12, 163, 0.14);
  --overlay: rgba(26, 11, 46, 0.82);
  --space-xs: 12px;
  --space-sm: 24px;
  --space-md: 40px;
  --space-lg: 56px;
  --space-xl: 80px;
  --radius-pill: 28px;
  --radius-card: 24px;
  --container: 1140px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --line-tight: 1.25;
  --line-body: 1.55;
  --transition: 0.22s ease;
}

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

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

body {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: var(--line-body);
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

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

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

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

ul,
ol {
  list-style: none;
}

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

/* Typography — compact-news */
h1, h2, h3, h4 {
  font-weight: 800;
  line-height: var(--line-tight);
  color: var(--text);
  letter-spacing: -0.02em;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
h4 { font-size: 0.9rem; }

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

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

.lead {
  font-size: 1rem;
  line-height: var(--line-body);
  color: var(--text);
  font-weight: 500;
}

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

/* Tags — underline-text */
.tag {
  display: inline;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}

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

/* Buttons — filled-accent */
.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

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

.btn--accent:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-1px);
}

.text-link {
  font-weight: 700;
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-link:hover {
  color: var(--accent);
}

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

.site-main {
  padding: var(--space-md) 0 var(--space-xl);
}

.section-label {
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-xs);
}

/* Header — compact-topbar */
.site-header {
  background: var(--white);
  border-bottom: 2px solid var(--primary);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  gap: var(--space-sm);
}

.site-logo {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.03em;
}

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

.nav-toggle {
  display: none;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  padding: 8px 14px;
  border: 2px solid var(--primary);
  border-radius: var(--radius-pill);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.site-nav a {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: border-color var(--transition), color var(--transition);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Nav — category-tags-row */
.category-bar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}

.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

.category-tags .tag {
  font-size: 0.625rem;
}

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

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

.hero-stack__primary h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: var(--space-xs);
  max-width: 18ch;
}

.hero-stack__primary .lead {
  max-width: 38rem;
}

.hero-stack__list {
  display: grid;
  gap: var(--space-sm);
}

.hero-stack__item {
  padding: var(--space-xs) 0;
  border-top: 1px solid var(--border);
}

.hero-stack__item h2 {
  font-size: 1rem;
  margin: 6px 0 4px;
}

.hero-stack__item a {
  text-decoration: none;
  color: inherit;
}

.hero-stack__item a:hover h2 {
  color: var(--accent);
}

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

.mosaic__tile {
  border-radius: var(--radius-card);
  overflow: hidden;
  min-height: 200px;
}

.mosaic__tile--hero {
  min-height: 320px;
}

/* Cards — image-overlay */
.card-overlay {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  min-height: inherit;
  border-radius: var(--radius-card);
  overflow: hidden;
  text-decoration: none;
  color: var(--white);
}

.card-overlay img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--overlay) 0%, rgba(26, 11, 46, 0.35) 55%, rgba(26, 11, 46, 0.05) 100%);
}

.card-overlay__body {
  position: relative;
  z-index: 1;
  padding: var(--space-md);
}

.card-overlay__body h2,
.card-overlay__body h3 {
  color: var(--white);
  margin: 8px 0 6px;
}

.card-overlay__body h2 {
  font-size: 1.35rem;
}

.card-overlay__body h3 {
  font-size: 1.05rem;
}

.card-overlay__excerpt {
  font-size: 0.8125rem;
  opacity: 0.9;
  margin-bottom: 10px;
  max-width: 36rem;
}

.card-overlay:hover {
  color: var(--white);
}

.card-overlay:hover h2,
.card-overlay:hover h3 {
  color: var(--accent);
}

/* Magazine breakout grid */
.magazine-breakout {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.magazine-breakout__wide {
  grid-column: 1 / -1;
}

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

.magazine-columns .card-overlay {
  min-height: 220px;
}

.magazine-columns .card-featured {
  min-height: 300px;
}

.magazine-columns .card-featured h3 {
  font-size: 1.2rem;
}

/* Editorial prose */
.editorial-block {
  margin-bottom: var(--space-lg);
  padding: var(--space-md) 0;
}

.editorial-block h2 {
  color: var(--primary);
  margin-bottom: var(--space-sm);
}

.article-content {
  font-size: 0.875rem;
}

.article-content h2 {
  margin: var(--space-md) 0 var(--space-xs);
  color: var(--primary);
}

.article-content h3 {
  margin: var(--space-sm) 0 var(--space-xs);
}

.article-content ul,
.article-content ol {
  margin: var(--space-xs) 0 var(--space-xs) var(--space-sm);
  list-style: disc;
}

.article-content ol {
  list-style: decimal;
}

.article-content li {
  margin-bottom: 6px;
}

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

.prose-section {
  margin-bottom: var(--space-md);
}

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

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

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

.article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  align-items: center;
  margin-bottom: var(--space-xs);
  font-size: 0.75rem;
}

/* Article — image-heavy, full-bleed */
.article-hero-bleed {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-bottom: var(--space-md);
  aspect-ratio: 21 / 9;
  min-height: 240px;
  max-height: 520px;
  overflow: hidden;
  background: var(--primary);
}

.article-hero-bleed img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-hero-bleed figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-xs) var(--space-sm);
  background: linear-gradient(to top, var(--overlay), transparent);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.6875rem;
}

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

.article-inline-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-inline-figure figcaption {
  font-size: 0.6875rem;
  color: var(--muted);
  padding: 8px 0;
}

.article-body {
  max-width: 42rem;
}

/* Author — footer-author-note */
.author-note {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
  margin-top: var(--space-lg);
  padding: var(--space-sm);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  max-width: 42rem;
}

.author-note__avatar {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--accent);
}

.author-note__name {
  font-weight: 800;
  font-size: 0.875rem;
  color: var(--primary);
  margin-bottom: 2px;
}

.author-note__role {
  font-size: 0.6875rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.author-note__text {
  font-size: 0.8125rem;
  line-height: 1.5;
}

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

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

.related-strip ul li {
  margin-bottom: 8px;
}

.related-strip a {
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.related-strip a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Footer — two-column */
.site-footer {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.88);
  padding: var(--space-lg) 0 var(--space-sm);
}

.footer-masthead {
  margin-bottom: var(--space-md);
}

.footer-masthead .site-logo {
  color: var(--white);
  display: inline-block;
  margin-bottom: var(--space-xs);
}

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

.footer-masthead p {
  font-size: 0.8125rem;
  max-width: 32rem;
  opacity: 0.85;
}

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

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

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

.footer-col a {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: var(--space-sm);
  font-size: 0.6875rem;
  opacity: 0.7;
  text-align: center;
}

/* Contact form */
.contact-form label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--primary);
}

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

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 10px 14px;
  font: inherit;
  font-size: 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--text);
}

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

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
  border-radius: var(--radius-card);
}

/* Cookie — corner-popup */
.cookie-popup {
  position: fixed;
  bottom: var(--space-sm);
  right: var(--space-sm);
  max-width: 340px;
  background: var(--white);
  border: 2px solid var(--primary);
  border-radius: var(--radius-card);
  padding: var(--space-sm);
  box-shadow: 0 12px 40px rgba(58, 12, 163, 0.18);
  z-index: 200;
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

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

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

.cookie-popup h3 {
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--primary);
}

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

.cookie-popup a {
  color: var(--primary);
}

/* Utilities */
.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;
}

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mt-sm { margin-top: var(--space-sm); }

/* Media queries */
@media (min-width: 600px) {
  .mosaic {
    grid-template-columns: repeat(12, 1fr);
  }

  .mosaic__tile--8 { grid-column: span 8; }
  .mosaic__tile--4 { grid-column: span 4; }
  .mosaic__tile--6 { grid-column: span 6; }
  .mosaic__tile--12 { grid-column: span 12; }

  .magazine-columns {
    grid-template-columns: repeat(2, 1fr);
  }

  .magazine-columns .card-featured {
    grid-column: span 2;
  }

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

  .hero-stack__list {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }
}

@media (min-width: 768px) {
  body { font-size: 0.9375rem; }
  h1 { font-size: 2rem; }

  .magazine-breakout__wide {
    grid-column: 2 / 12;
  }

  .article-hero-bleed {
    aspect-ratio: 2.4 / 1;
  }
}

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

  .magazine-columns .card-featured {
    grid-column: span 2;
    grid-row: span 2;
  }
}

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

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 2px solid var(--primary);
    padding: var(--space-xs) var(--space-sm);
  }

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

  .site-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
  }

  .header-inner {
    position: relative;
    flex-wrap: wrap;
  }
}
