/* Memória — academic-stone editorial palette */
:root {
  --stone-50: #f7f5f1;
  --stone-100: #ede9e2;
  --stone-200: #ddd8cf;
  --stone-300: #c8c2b8;
  --stone-400: #a39d93;
  --stone-500: #8a8279;
  --stone-600: #6b6560;
  --stone-700: #4a4540;
  --stone-800: #2c2825;
  --accent: #7a6f63;
  --accent-dark: #5c5349;
  --paper: #f4f1ec;
  --ink: #2c2825;
  --muted: #6b6560;
  --border: #d4cfc7;
  --radius-soft: 6px;
  --container: 960px;
  --reading: 640px;
  --font-serif: "Georgia", "Times New Roman", "Palatino Linotype", serif;
  --font-sans: "Helvetica Neue", Arial, sans-serif;
  --shadow-soft: 0 2px 12px rgba(44, 40, 37, 0.06);
  --transition: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 18px;
}

body {
  margin: 0;
  font-family: var(--font-serif);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--transition);
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 0;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--stone-50);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 1.25rem 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
  text-transform: lowercase;
}

.logo span {
  font-style: italic;
}

.tagline {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-soft);
  padding: 0.5rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--ink);
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.75rem;
}

.site-nav a {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
}

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--narrow {
  max-width: var(--reading);
}

main {
  padding: 2.5rem 0 4rem;
}

.hero-carousel {
  margin-bottom: 3.5rem;
  position: relative;
}

.carousel-viewport {
  overflow: hidden;
  border-radius: var(--radius-soft);
  background: var(--stone-200);
}

.carousel-track {
  display: flex;
  transition: transform 0.4s ease;
}

.carousel-slide {
  min-width: 100%;
  position: relative;
}

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

.carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 2.25rem 1.75rem;
  background: linear-gradient(transparent, rgba(44, 40, 37, 0.82));
  color: var(--stone-50);
}

.carousel-caption h2 {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.3;
}

.carousel-caption h2 a {
  color: inherit;
  text-decoration: none;
}

.carousel-caption h2 a:hover {
  text-decoration: underline;
}

.carousel-caption p {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  opacity: 0.9;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.carousel-btn {
  background: var(--stone-100);
  border: 1px solid var(--border);
  border-radius: var(--radius-soft);
  width: 2.5rem;
  height: 2.5rem;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--ink);
  transition: background var(--transition);
}

.carousel-btn:hover {
  background: var(--stone-200);
}

.carousel-dots {
  display: flex;
  gap: 0.5rem;
}

.carousel-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  border: none;
  background: var(--stone-300);
  cursor: pointer;
  padding: 0;
}

.carousel-dot[aria-selected="true"] {
  background: var(--accent-dark);
}

.home-intro {
  margin-bottom: 3rem;
  padding-right: 8%;
}

.home-intro h1 {
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.25;
  margin: 0 0 1rem;
}

.home-intro .lede {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
  max-width: 38rem;
}

.home-intro p {
  margin: 0 0 1rem;
}

.feed-section h2 {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.numbered-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: feed;
}

.numbered-feed li {
  counter-increment: feed;
  margin-bottom: 3rem;
  padding-left: 3.5rem;
  position: relative;
}

.numbered-feed li::before {
  content: counter(feed, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.15rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--stone-400);
}

.feed-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feed-card__image {
  border-radius: var(--radius-soft);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

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

.feed-card__meta {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.feed-card__title {
  margin: 0.35rem 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.3;
}

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

.feed-card__title a:hover {
  text-decoration: underline;
}

.feed-card__excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.breakout {
  margin: 3rem -2rem;
  padding: 2rem;
  background: var(--stone-100);
  border-radius: var(--radius-soft);
}

.breakout blockquote {
  margin: 0;
  font-size: 1.2rem;
  font-style: italic;
  color: var(--accent-dark);
  border-left: 3px solid var(--stone-400);
  padding-left: 1.25rem;
}

.page-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 400;
  margin: 0 0 0.5rem;
}

.page-header p {
  margin: 0;
  color: var(--muted);
  max-width: 36rem;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 900px) {
  .article-layout {
    grid-template-columns: 200px minmax(0, var(--reading));
    align-items: start;
  }

  .article-layout--full {
    grid-template-columns: 1fr;
    max-width: var(--reading);
    margin: 0 auto;
  }
}

.article-toc {
  font-family: var(--font-sans);
  font-size: 0.78rem;
}

@media (min-width: 900px) {
  .article-toc {
    position: sticky;
    top: 7rem;
  }
}

.article-toc h2 {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.article-toc ol {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.article-toc a {
  text-decoration: none;
  color: var(--muted);
}

.article-toc a:hover {
  color: var(--ink);
}

.article-header {
  margin-bottom: 2rem;
}

.article-header h1 {
  font-size: 2.1rem;
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 1rem;
}

.article-meta {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-bottom: 1.5rem;
}

.article-hero {
  margin-bottom: 2rem;
  border-radius: var(--radius-soft);
  overflow: hidden;
}

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

.article-body h2 {
  font-size: 1.35rem;
  font-weight: 400;
  margin: 2.25rem 0 0.75rem;
}

.article-body h3 {
  font-size: 1.1rem;
  font-weight: 400;
  margin: 1.75rem 0 0.5rem;
}

.article-body p {
  margin: 0 0 1.1rem;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.1rem;
  padding-left: 1.4rem;
}

.article-body li {
  margin-bottom: 0.35rem;
}

.author-box {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin: 2.5rem 0;
  padding: 1.25rem;
  background: var(--stone-100);
  border-radius: var(--radius-soft);
}

.author-box img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  flex-shrink: 0;
}

.author-box h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.author-box .role {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.author-box p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.related-section {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.related-section h2 {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.25rem;
}

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

.related-list li {
  margin-bottom: 0.75rem;
}

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

.related-list a:hover {
  text-decoration: underline;
}

.articles-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.article-list-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 640px) {
  .article-list-item {
    grid-template-columns: 240px 1fr;
    gap: 1.5rem;
  }
}

.article-list-item img {
  border-radius: var(--radius-soft);
  aspect-ratio: 3 / 2;
  object-fit: cover;
  width: 100%;
}

.article-list-item h2 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  font-weight: 400;
}

.article-list-item h2 a {
  color: var(--ink);
  text-decoration: none;
}

.article-list-item h2 a:hover {
  text-decoration: underline;
}

.contact-grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 700px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-info address {
  font-style: normal;
  line-height: 1.8;
}

.contact-form label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  margin-bottom: 0.35rem;
  color: var(--muted);
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-soft);
  font-family: var(--font-serif);
  font-size: 1rem;
  background: var(--stone-50);
  margin-bottom: 1rem;
}

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

.btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  background: var(--accent-dark);
  color: var(--stone-50);
  border: none;
  border-radius: var(--radius-soft);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background var(--transition);
}

.btn:hover {
  background: var(--ink);
}

.policy-body h2 {
  font-size: 1.2rem;
  font-weight: 400;
  margin: 2rem 0 0.75rem;
}

.policy-body p,
.policy-body li {
  margin-bottom: 0.85rem;
}

.policy-body ul {
  padding-left: 1.4rem;
}

.updated-note {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--stone-100);
  padding: 2.5rem 0;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
  }
}

.footer-brand .logo {
  font-size: 1.35rem;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 22rem;
}

.footer-nav h3 {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

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

.footer-nav li {
  margin-bottom: 0.4rem;
}

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

.footer-bottom {
  max-width: var(--container);
  margin: 2rem auto 0;
  padding: 1.25rem 1.5rem 0;
  border-top: 1px solid var(--border);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--muted);
}

.cookie-popup {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  max-width: 320px;
  padding: 1.25rem;
  background: var(--stone-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-soft);
  box-shadow: var(--shadow-soft);
  z-index: 200;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  line-height: 1.5;
  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 p {
  margin: 0 0 0.85rem;
  color: var(--muted);
}

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

.cookie-actions {
  display: flex;
  gap: 0.5rem;
}

.cookie-actions .btn {
  flex: 1;
  text-align: center;
  padding: 0.5rem 0.75rem;
  font-size: 0.78rem;
}

.cookie-actions .btn--outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
}

.cookie-actions .btn--outline:hover {
  background: var(--stone-200);
}

@media (max-width: 768px) {
  .header-inner {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .header-brand {
    flex: 1;
    text-align: center;
  }

  .nav-toggle {
    display: block;
    order: -1;
  }

  .site-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(280px, 85vw);
    background: var(--stone-50);
    border-right: 1px solid var(--border);
    padding: 5rem 1.5rem 2rem;
    z-index: 150;
    transform: translateX(-100%);
    transition: transform var(--transition);
    overflow-y: auto;
  }

  .site-nav.is-open {
    display: block;
    transform: translateX(0);
  }

  .site-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }

  .site-nav a {
    font-size: 0.95rem;
  }

  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(44, 40, 37, 0.4);
    z-index: 140;
  }

  .nav-overlay.is-visible {
    display: block;
  }

  .breakout {
    margin-left: 0;
    margin-right: 0;
  }

  .numbered-feed li {
    padding-left: 2.75rem;
  }
}

@media (min-width: 769px) {
  .nav-overlay {
    display: none !important;
  }
}
