/* Raiz do Mangue — manguebr.info | coastal-blue design system */

:root {
  /* coastal-blue palette */
  --cb-deep: #0b2d42;
  --cb-ocean: #145374;
  --cb-tide: #2a7a9b;
  --cb-spray: #6bb3c9;
  --cb-foam: #d4eaf2;
  --cb-sand: #f3ede4;
  --cb-mangrove: #2a4f3a;
  --cb-coral: #c4613a;
  --cb-ink: #152028;
  --cb-muted: #5c6d7a;
  --cb-line: #c8d8e0;
  --cb-white: #ffffff;

  /* spacing — tight scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;

  /* layout */
  --container: 1140px;
  --radius: 0;
  --shadow-card: 0 2px 8px rgba(11, 45, 66, 0.12), 0 1px 2px rgba(11, 45, 66, 0.08);
  --shadow-header: 0 1px 0 var(--cb-line);

  /* typography — mixed-newsroom */
  --font-display: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --font-meta: "Source Sans 3", system-ui, sans-serif;

  --header-height: 120px;
  --header-height-shrink: 64px;
}

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

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

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--cb-ink);
  background: var(--cb-white);
}

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

a {
  color: var(--cb-ocean);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--cb-tide);
}

/* ——— cookie top-strip ——— */
.cookie-strip {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--cb-deep);
  color: var(--cb-foam);
  font-size: 0.875rem;
  padding: var(--s-2) var(--s-4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-4);
  flex-wrap: wrap;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

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

.cookie-strip p {
  margin: 0;
  max-width: 720px;
}

.cookie-strip a {
  color: var(--cb-spray);
}

.cookie-strip__btn {
  font-family: var(--font-meta);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--cb-tide);
  color: var(--cb-white);
  border: none;
  padding: var(--s-2) var(--s-4);
  cursor: pointer;
  border-radius: var(--radius);
}

.cookie-strip__btn:hover {
  background: var(--cb-spray);
}

body.cookie-visible .site-header {
  top: 40px;
}

/* ——— container & grid ——— */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--s-4);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--s-4);
}

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

/* ——— stacked header ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--cb-white);
  border-bottom: 1px solid var(--cb-line);
  transition: padding 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-shrunk {
  box-shadow: var(--shadow-header);
}

.site-header.is-shrunk .header-brand {
  padding-block: var(--s-2);
}

.site-header.is-shrunk .header-brand__tagline {
  opacity: 0;
  max-height: 0;
  margin: 0;
  overflow: hidden;
}

.site-header.is-shrunk .header-brand__title {
  font-size: 1.25rem;
}

.header-brand {
  text-align: center;
  padding: var(--s-4) var(--s-4) var(--s-3);
  transition: padding 0.25s ease;
}

.header-brand__title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--cb-deep);
  letter-spacing: -0.02em;
  line-height: 1.15;
  transition: font-size 0.25s ease;
}

.header-brand__title a {
  color: inherit;
  text-decoration: none;
}

.header-brand__tagline {
  font-family: var(--font-meta);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--cb-tide);
  margin-top: var(--s-2);
  transition: opacity 0.25s ease, max-height 0.25s ease;
}

.header-nav {
  border-top: 1px solid var(--cb-line);
}

.header-nav__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--s-4);
  position: relative;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: var(--s-5);
}

.nav-list a {
  display: block;
  padding: var(--s-3) 0;
  font-family: var(--font-meta);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cb-ink);
  text-decoration: none;
}

.nav-list a:hover,
.nav-list a.is-active {
  color: var(--cb-ocean);
}

.nav-toggle {
  display: none;
  position: absolute;
  right: var(--s-4);
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 1px solid var(--cb-line);
  padding: var(--s-2);
  cursor: pointer;
  color: var(--cb-deep);
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
}

/* ——— hero full-width + overlay ——— */
.hero {
  position: relative;
  width: 100%;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

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

.hero__overlay {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: var(--s-5) var(--s-4) var(--s-5);
  background: linear-gradient(to top, rgba(11, 45, 66, 0.88) 0%, rgba(11, 45, 66, 0.4) 60%, transparent 100%);
}

.hero__category {
  font-family: var(--font-meta);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cb-spray);
  margin-bottom: var(--s-2);
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--cb-white);
  line-height: 1.2;
  max-width: 720px;
  margin-bottom: var(--s-3);
}

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

.hero__title a:hover {
  color: var(--cb-foam);
}

.hero__meta {
  font-size: 0.875rem;
  color: var(--cb-foam);
}

.hero__meta time {
  font-weight: 600;
}

/* ——— section headings ——— */
.section-label {
  font-family: var(--font-meta);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--cb-coral);
  margin-bottom: var(--s-3);
  padding-bottom: var(--s-2);
  border-bottom: 2px solid var(--cb-deep);
  display: inline-block;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cb-deep);
  margin-bottom: var(--s-4);
}

/* ——— horizontal article rows ——— */
.article-rows {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

.article-row {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--s-4);
  padding: var(--s-4);
  background: var(--cb-white);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius);
  align-items: start;
}

.article-row__thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--cb-foam);
}

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

.article-row__category {
  font-family: var(--font-meta);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cb-tide);
  margin-bottom: var(--s-1);
}

.article-row__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--s-2);
}

.article-row__title a {
  color: var(--cb-ink);
  text-decoration: none;
}

.article-row__title a:hover {
  color: var(--cb-ocean);
}

.article-row__excerpt {
  font-size: 0.9375rem;
  color: var(--cb-muted);
  margin-bottom: var(--s-3);
}

.article-row__meta {
  font-size: 0.8125rem;
  color: var(--cb-muted);
}

.article-row__byline {
  font-weight: 600;
  color: var(--cb-ink);
}

/* ——— hero-grid homepage layout ——— */
.home-main {
  padding-block: var(--s-5);
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--s-5);
}

.home-featured {
  grid-column: span 12;
}

.home-feed {
  grid-column: span 8;
}

.home-picks {
  grid-column: span 4;
}

.pick-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.pick-item {
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--cb-line);
}

.pick-item:last-child {
  border-bottom: none;
}

.pick-item__num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cb-spray);
  line-height: 1;
  margin-bottom: var(--s-1);
}

.pick-item__title {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.35;
}

.pick-item__title a {
  color: var(--cb-ink);
  text-decoration: none;
}

.pick-item__title a:hover {
  color: var(--cb-ocean);
}

/* ——— compact row for picks sidebar ——— */
.article-row--compact {
  grid-template-columns: 1fr;
  padding: var(--s-3);
  box-shadow: none;
  border: 1px solid var(--cb-line);
}

/* ——— page headers ——— */
.page-header {
  padding: var(--s-5) 0 var(--s-4);
  border-bottom: 1px solid var(--cb-line);
  margin-bottom: var(--s-5);
}

.page-header__title {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--cb-deep);
  line-height: 1.2;
}

.page-header__lead {
  font-size: 1.125rem;
  color: var(--cb-muted);
  margin-top: var(--s-3);
  max-width: 640px;
}

/* ——— prose content ——— */
.prose {
  max-width: 680px;
}

.prose p {
  margin-bottom: var(--s-4);
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--cb-deep);
  margin: var(--s-5) 0 var(--s-3);
}

.prose h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--cb-ocean);
  margin: var(--s-4) 0 var(--s-2);
}

.prose ul, .prose ol {
  margin: 0 0 var(--s-4) var(--s-5);
}

.prose li {
  margin-bottom: var(--s-2);
}

.prose blockquote {
  border-left: 3px solid var(--cb-tide);
  padding: var(--s-3) var(--s-4);
  margin: var(--s-4) 0;
  background: var(--cb-foam);
  font-family: var(--font-display);
  font-style: italic;
  color: var(--cb-deep);
}

/* ——— image-heavy article layout ——— */
.article-header {
  margin-bottom: var(--s-5);
}

.article-header__category {
  font-family: var(--font-meta);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cb-coral);
  margin-bottom: var(--s-2);
}

.article-header__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: var(--cb-deep);
  line-height: 1.2;
  margin-bottom: var(--s-3);
}

.article-header__deck {
  font-size: 1.1875rem;
  color: var(--cb-muted);
  line-height: 1.5;
  margin-bottom: var(--s-4);
  max-width: 720px;
}

.article-header__meta {
  font-size: 0.875rem;
  color: var(--cb-muted);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--cb-line);
}

.article-header__byline {
  font-weight: 600;
  color: var(--cb-ink);
}

.article-header__updated {
  display: block;
  margin-top: var(--s-1);
  font-size: 0.8125rem;
}

.figure-full {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-block: var(--s-5);
}

.figure-full img,
.figure-full svg {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
}

.figure-full figcaption {
  max-width: var(--container);
  margin: var(--s-2) auto 0;
  padding-inline: var(--s-4);
  font-size: 0.8125rem;
  color: var(--cb-muted);
  font-style: italic;
}

.article-body {
  padding-bottom: var(--s-5);
}

.article-body .prose {
  max-width: 680px;
  margin-inline: auto;
  padding-inline: var(--s-4);
}

/* ——— author bio inline ——— */
.author-bio {
  display: flex;
  gap: var(--s-4);
  padding: var(--s-4);
  margin: var(--s-5) auto;
  max-width: 680px;
  background: var(--cb-sand);
  border-left: 3px solid var(--cb-mangrove);
}

.author-bio__avatar {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--cb-foam);
}

.author-bio__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--cb-deep);
  margin-bottom: var(--s-1);
}

.author-bio__text {
  font-size: 0.875rem;
  color: var(--cb-muted);
  line-height: 1.5;
}

/* ——— related articles ——— */
.related {
  padding: var(--s-5) 0;
  border-top: 1px solid var(--cb-line);
  background: var(--cb-sand);
}

.related__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--cb-deep);
  margin-bottom: var(--s-4);
}

.related__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
}

.related-card {
  background: var(--cb-white);
  box-shadow: var(--shadow-card);
  padding: var(--s-3);
}

.related-card__thumb {
  aspect-ratio: 16 / 10;
  margin-bottom: var(--s-3);
  background: var(--cb-foam);
  overflow: hidden;
}

.related-card__title {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.35;
}

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

.related-card__title a:hover {
  color: var(--cb-ocean);
}

/* ——— contact form ——— */
.contact-form {
  max-width: 520px;
}

.form-group {
  margin-bottom: var(--s-4);
}

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--cb-ink);
  margin-bottom: var(--s-2);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: var(--s-3);
  border: 1px solid var(--cb-line);
  border-radius: var(--radius);
  background: var(--cb-white);
  color: var(--cb-ink);
}

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

.btn-primary {
  font-family: var(--font-meta);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--cb-ocean);
  color: var(--cb-white);
  border: none;
  padding: var(--s-3) var(--s-5);
  cursor: pointer;
  border-radius: var(--radius);
}

.btn-primary:hover {
  background: var(--cb-tide);
}

.contact-info {
  margin-top: var(--s-5);
  padding: var(--s-4);
  background: var(--cb-foam);
}

.contact-info p {
  margin-bottom: var(--s-2);
  font-size: 0.9375rem;
}

/* ——— two-column footer ——— */
.site-footer {
  background: var(--cb-deep);
  color: var(--cb-foam);
  padding: var(--s-5) 0 var(--s-4);
  margin-top: var(--s-5);
}

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

.footer-brand__name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--cb-white);
  margin-bottom: var(--s-3);
}

.footer-brand__desc {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--cb-spray);
  max-width: 360px;
}

.footer-nav__title {
  font-family: var(--font-meta);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cb-spray);
  margin-bottom: var(--s-3);
}

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

.footer-nav li {
  margin-bottom: var(--s-2);
}

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

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

.footer-bottom {
  padding-top: var(--s-4);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.75rem;
  color: var(--cb-spray);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-2);
}

/* ——— utility ——— */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.text-muted {
  color: var(--cb-muted);
}

.mb-4 { margin-bottom: var(--s-4); }
.mb-5 { margin-bottom: var(--s-5); }
.mt-5 { margin-top: var(--s-5); }

/* ——— responsive ——— */
@media (max-width: 960px) {
  .home-feed,
  .home-picks {
    grid-column: span 12;
  }

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

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

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

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

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

  .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--cb-white);
    border-bottom: 1px solid var(--cb-line);
    padding: var(--s-3) var(--s-4);
    gap: 0;
  }

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

  .nav-list a {
    padding: var(--s-3) 0;
    border-bottom: 1px solid var(--cb-line);
  }

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