/* ============================================
   biodiversidade TERESOPOLIS - ESTILOS PRINCIPAIS
   Conceito: Atlas de Historia Natural Digital
   ============================================ */

:root {
  /* Base */
  --paper: #14201a;
  --paper-deep: #1c2b22;
  --paper-elev: #233629;
  --ink: #f2ede0;
  --ink-soft: #b9c4b1;
  --ink-mute: #6f7d6b;

  /* Linhas */
  --line: rgba(242, 237, 224, 0.14);
  --line-soft: rgba(242, 237, 224, 0.07);
  --line-strong: rgba(242, 237, 224, 0.24);

  /* Acento principal */
  --accent: #c9a869;
  --accent-soft: rgba(201, 168, 105, 0.12);
  --accent-strong: #d4b574;
  --accent-glow: rgba(201, 168, 105, 0.32);

  /* Acentos secundarios */
  --botanical: #7a9471;
  --botanical-soft: rgba(122, 148, 113, 0.15);
  --earth: #8b6f47;
  --warm: #d4a574;

  /* Sombras */
  --shadow-deep: rgba(0, 0, 0, 0.45);
  --shadow-soft: rgba(0, 0, 0, 0.25);
  --shadow-card: 0 6px 16px rgba(0, 0, 0, 0.32);
  --shadow-card-hover: 0 18px 38px rgba(0, 0, 0, 0.45),
                       0 0 0 1px var(--accent-soft);

  /* Glassmorphism */
  --glass: rgba(28, 43, 34, 0.65);
  --glass-border: rgba(242, 237, 224, 0.08);
  --glass-blur: blur(14px) saturate(140%);

  /* Transicoes */
  --t-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --t-base: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow: 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  --t-elegant: 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

html {
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink-soft);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image:
    radial-gradient(ellipse 1200px 800px at 50% -10%,
      rgba(201, 168, 105, 0.04) 0%,
      transparent 60%),
    radial-gradient(ellipse 1000px 600px at 100% 100%,
      rgba(122, 148, 113, 0.04) 0%,
      transparent 60%);
  background-attachment: fixed;
}

.wrap {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px 40px 32px;
}

/* ============================================
   HEADER
   ============================================ */
.masthead {
  margin-bottom: 0;
  padding: 16px 0 0;
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line-soft);
  opacity: 0;
  animation: fadeIn 1.1s ease 0.1s forwards;
}

.masthead-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

/* Título do site no header */
.site-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--ink, #f2ede0);
  text-decoration: none;
  display: inline-block;
  transition: color var(--t-fast, 0.2s);
}
.site-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent, #c9a869);
}
.site-title:hover {
  color: var(--accent, #c9a869);
}

/* Botão voltar para a página inicial (páginas internas) */
.btn-voltar-home {
  margin-left: auto;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  white-space: nowrap;
  transition: color var(--t-fast), border-color var(--t-fast);
}

.btn-voltar-home:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.brand {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--ink-mute);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.brand a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all var(--t-fast);
}

.brand a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.brand-link {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all var(--t-fast);
  margin-left: auto;
}

.brand-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* MENU PRINCIPAL (HEADER) */
.primary-nav {
  margin: 18px 0 0;
  padding: 14px 0 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.primary-nav-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  margin: 0;
  padding: 0;
  justify-content: space-between;
}

.primary-nav-list > li {
  flex: 0 0 auto;
}

.primary-nav-link {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.005em;
  position: relative;
  padding: 4px 0;
  transition: color var(--t-fast);
  white-space: nowrap;
}

.primary-nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.primary-nav-link:hover {
  color: var(--accent);
}

.primary-nav-link:hover::after,
.primary-nav-link.active::after {
  transform: scaleX(1);
}

.primary-nav-link.active {
  color: var(--accent);
}

.hero {
  padding: 24px 0 12px;
  position: relative;
}

.hero-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  animation: slideUp 0.9s ease 0.2s forwards;
}

.hero-eyebrow::before,
.hero-eyebrow::after {
  content: '';
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--accent);
  opacity: 0.6;
}

.hero h1.hero-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.6rem, 4.8vw, 3.6rem);
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.0;
  margin-bottom: 10px;
  white-space: nowrap;
  opacity: 0;
  animation: slideUp 1s ease 0.35s forwards;
}

.hero h1.hero-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

.hero h2.hero-subtitle-1 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  letter-spacing: -0.005em;
  color: var(--botanical);
  line-height: 1.15;
  margin: 0 0 8px;
  font-style: italic;
  opacity: 0;
  animation: slideUp 0.9s ease 0.45s forwards;
}

.hero h2.hero-subtitle-1 em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}

.hero p.hero-subtitle-2 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(0.78rem, 1vw, 0.9rem);
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin: 0 0 22px;
  opacity: 0;
  animation: slideUp 0.9s ease 0.55s forwards;
}

/* TYPED (efeito de digitacao) */
.typed {
  display: inline;
  min-height: 1em;
  vertical-align: baseline;
}

.hero p.lead {
  white-space: nowrap;
  max-width: none;
  width: max-content;
  max-width: 100%;
}

.typed-caret {
  display: inline-block;
  color: var(--accent);
  font-weight: 300;
  margin-left: 1px;
  animation: caretBlink 0.9s steps(2) infinite;
}

@keyframes caretBlink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .typed-caret { animation: none; opacity: 1; }
}

/* ROTATOR (fade in/out contínuo) */
.rotator {
  display: inline-block;
  position: relative;
  min-height: 1.4em;
  line-height: 1.4;
}

.rotator-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
}

.rotator-word.is-active {
  opacity: 1;
  transform: translateY(0);
  position: relative;
}

.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  display: inline;
  font-size: 1em;
  letter-spacing: -0.03em;
}

.hero h1 .subline {
  display: block;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--botanical);
  font-size: 0.46em;
  margin-top: 12px;
  letter-spacing: 0.06em;
  opacity: 0.95;
}

.hero p.lead {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: clamp(0.78rem, 1.05vw, 0.95rem);
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 8px;
  font-style: italic;
  opacity: 0;
  animation: slideUp 0.9s ease 0.5s forwards;
}

.hero-stats {
  display: flex;
  gap: 0;
  margin: 24px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0;
  opacity: 0;
  animation: slideUp 0.9s ease 0.6s forwards;
}

.hero-stat {
  flex: 1;
  padding: 16px 20px;
  border-right: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  transition: background var(--t-base);
}

.hero-stat:last-child {
  border-right: none;
}

.hero-stat:hover {
  background: var(--paper-deep);
}

.hero-stat-number {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 1.85rem;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.02em;
  font-feature-settings: 'tnum';
}

.hero-stat-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.66rem;
  font-weight: 500;
  color: var(--ink-mute);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 6px;
}

.navbar {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 28px;
  position: relative;
}

.nav-link {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: none;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.02em;
  padding: 14px 20px;
  position: relative;
  transition: color var(--t-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: -1px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base);
}

.nav-link:hover {
  color: var(--ink);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.nav-link.active {
  color: var(--accent);
}

.nav-link-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  color: var(--ink-mute);
  font-weight: 400;
}

/* ============================================
   CONTEUDO
   ============================================ */
.content {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 36px;
  flex: 1;
  margin-top: 8px;
  min-height: 0;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
  display: flex;
  flex-direction: column;
  opacity: 0;
  animation: fadeIn 0.9s ease 0.4s forwards;
  position: sticky;
  top: 24px;
  align-self: start;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding-right: 8px;
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 2px;
}

.sidebar-header {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.sidebar-header-count {
  color: var(--ink-mute);
  font-size: 0.65rem;
}

.category-group {
  margin-bottom: 18px;
}

.category-group-label {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--ink);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--line-soft);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.category-group-count {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  color: var(--ink-mute);
  font-weight: 400;
}

.categories-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.category-item {
  padding: 8px 12px 8px 14px;
  color: var(--ink-soft);
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: all var(--t-base);
  font-size: 0.92rem;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  text-decoration: none;
}

.category-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink-mute);
  transform: translateY(-50%) scale(0);
  transition: transform var(--t-base), background var(--t-base);
}

.category-item:hover {
  color: var(--ink);
  background: var(--paper-deep);
  padding-left: 20px;
}

.category-item:hover::before {
  transform: translateY(-50%) scale(1);
  background: var(--accent);
}

.category-item.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 500;
  padding-left: 18px;
}

.category-item.active::before {
  transform: translateY(-50%) scale(1);
  background: var(--accent);
}

.category-item-count {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  color: var(--ink-mute);
  font-weight: 400;
}

.category-item.active .category-item-count,
.category-item:hover .category-item-count {
  color: var(--accent);
}

.subcategory {
  padding-left: 32px;
  font-size: 0.85rem;
  opacity: 0.85;
}

.subcategory .category-item-count {
  font-size: 0.68rem;
}

.sidebar-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  color: var(--ink-mute);
  line-height: 1.6;
  letter-spacing: 0.04em;
}

.sidebar-footer-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.sidebar-footer-row strong {
  color: var(--ink-soft);
  font-weight: 500;
}

/* ============================================
   Área PRINCIPAL
   ============================================ */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 28px;
  opacity: 0;
  animation: fadeIn 0.9s ease 0.5s forwards;
  min-width: 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.section-title {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 1.45rem;
  color: var(--ink);
  letter-spacing: -0.01em;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.section-title em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}

.section-title-count {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  color: var(--ink-mute);
  font-weight: 400;
  letter-spacing: 0.05em;
}

.section-lead {
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin-top: 4px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.section-tools {
  display: flex;
  gap: 8px;
  align-items: center;
}

.search-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 16px;
  width: 16px;
  height: 16px;
  color: var(--ink-mute);
  pointer-events: none;
  transition: color var(--t-fast);
}

.search-input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  border: 1px solid var(--line);
  background: var(--paper-deep);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  border-radius: 2px;
  transition: all var(--t-base);
  letter-spacing: 0.01em;
}

.search-input::placeholder {
  color: var(--ink-mute);
  font-style: italic;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--paper-elev);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-input:focus + .search-icon,
.search-box:focus-within .search-icon {
  color: var(--accent);
}

.filter-section {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  color: var(--ink-mute);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-right: 6px;
}

.filter-btn {
  padding: 6px 14px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  border-radius: 2px;
  font-size: 0.85rem;
  font-weight: 400;
  transition: all var(--t-base);
  font-family: 'Inter', sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.filter-btn-count {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  color: var(--ink-mute);
  font-weight: 400;
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.filter-btn:hover .filter-btn-count {
  color: var(--accent);
}

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
  font-weight: 500;
}

.filter-btn.active .filter-btn-count {
  color: var(--paper);
  opacity: 0.7;
}

.sort-select {
  padding: 6px 12px;
  border: 1px solid var(--line);
  background: var(--paper-deep);
  color: var(--ink-soft);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: 2px;
  transition: all var(--t-fast);
}

.sort-select:hover,
.sort-select:focus {
  border-color: var(--accent);
  color: var(--ink);
  outline: none;
}

/* ============================================
   SEÇÕES DE CONTEÚDO (publicações / Objetivos / Colaboradores)
   ============================================ */
.info-section {
  padding: 80px 24px;
  border-top: 1px solid var(--line);
  text-align: center;
  background: var(--bg-soft, var(--bg));
  scroll-margin-top: 20px;
}

.info-section:nth-of-type(odd) {
  background: var(--bg);
}

.info-section-inner {
  max-width: 720px;
  margin: 0 auto;
}

.info-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.info-eyebrow::before,
.info-eyebrow::after {
  content: '';
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--accent);
  opacity: 0.6;
}

.info-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 18px;
  text-wrap: balance;
}

.info-text {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 1.05rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0 0 28px;
}

.info-placeholder {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  padding: 20px 0;
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  margin-top: 64px;
  padding: 36px 0 24px;
  border-top: 2px double var(--line);
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--paper),
              0 0 0 5px var(--accent-soft);
}

.footer-colophon {
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  color: var(--ink-mute);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.footer-colophon-divider {
  display: inline-block;
  margin: 0 12px;
  opacity: 0.4;
}

.footer-content {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 28px;
}

.footer-section h4 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--ink);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.footer-section p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.footer-section ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-section a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color var(--t-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid transparent;
}

.footer-section a::before {
  content: '\2192';
  color: var(--accent);
  font-size: 0.75rem;
  opacity: 0;
  transform: translateX(-4px);
  transition: all var(--t-fast);
}

.footer-section a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent-soft);
}

.footer-section a:hover::before {
  opacity: 1;
  transform: translateX(0);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  color: var(--ink-mute);
  letter-spacing: 0.08em;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color var(--t-fast);
}

.footer-bottom a:hover {
  color: var(--accent);
}

/* ============================================
   BOTAO VOLTAR AO TOPO
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--accent-soft);
  border-radius: 2px;
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: all var(--t-base);
  box-shadow: var(--shadow-card);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 12px 24px var(--accent-glow);
}

.back-to-top svg {
  width: 18px;
  height: 18px;
}

/* ============================================
   ANIMACOES
   ============================================ */
@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes enter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   ESTADO VAZIO
   ============================================ */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--ink-soft);
  grid-column: 1 / -1;
}

.empty-state-icon {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 3rem;
  color: var(--accent);
  opacity: 0.4;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 1.4rem;
  color: var(--ink);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.empty-state p {
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 420px;
  margin: 0 auto;
  font-style: italic;
  opacity: 0.8;
}

/* ============================================
   ACESSIBILIDADE
   ============================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ============================================
   RESPONSIVO
   ============================================ */
@media (max-width: 1100px) {
  .wrap {
    padding: 20px 28px 28px;
  }

  .content {
    grid-template-columns: 210px 1fr;
    gap: 28px;
  }

  .hero-stat {
    padding: 14px 16px;
  }

  .hero-stat-number {
    font-size: 1.6rem;
  }
}

@media (max-width: 900px) {
  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .wrap {
    padding: 16px 20px 20px;
  }

  .content {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 24px;
  }

  .sidebar {
    order: -1;
    position: static;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .hero h1 {
    font-size: clamp(1.6rem, 6.5vw, 3.4rem);
    white-space: nowrap;
  }

  .hero h1 em {
    font-size: 1em;
  }

  .hero-stats {
    flex-wrap: wrap;
  }

  .hero-stat {
    flex: 1 1 33%;
    border-bottom: 1px solid var(--line-soft);
  }

  .navbar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-link {
    white-space: nowrap;
    padding: 12px 16px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
  }
}

@media (max-width: 480px) {
  .wrap {
    padding: 14px 14px 18px;
  }

  .hero {
    padding: 20px 0 20px;
  }

  .hero-stat-number {
    font-size: 1.4rem;
  }

  .hero-stat-label {
    font-size: 0.6rem;
  }

  .section-title {
    font-size: 1.2rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (hover: none) {
  .nav-link,
  .filter-btn,
  .category-item {
    transition: opacity var(--t-fast);
  }

  .search-input {
    transition: border-color var(--t-fast);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Skip link - accessibility */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  padding: 8px 16px;
  background: var(--accent);
  color: var(--paper);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  z-index: 10000;
  text-decoration: none;
}
.skip-link:focus {
  position: fixed;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  overflow: visible;
  border-radius: 4px;
}

/* Nav link active via aria-current */
.primary-nav-link[aria-current="page"],
.primary-nav-link[aria-current="page"]::after {
  color: var(--accent);
}
.primary-nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}
