/* ==========================================================================
   1. IMPORTAÇÕES
   ========================================================================== */
@import url('./variables.css');

/* ==========================================================================
   2. RESET MODERNO
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background-color: var(--color-bg);
  color: var(--color-text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  border: none;
  background: none;
  font: inherit;
  cursor: pointer;
}

/* ==========================================================================
   3. EFEITOS ATMOSFÉRICOS GLOBAIS (Ruído e Scanline)
   ========================================================================== */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

#scanline {
  position: fixed;
  top: -5%;
  left: 0;
  right: 0;
  height: 36px;
  pointer-events: none;
  z-index: 9997;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.015), transparent);
  animation: scan 8s linear infinite;
}

@keyframes scan {
  0% { top: -5%; }
  100% { top: 105%; }
}

/* ==========================================================================
   4. INTERFACE GLOBAL (Navbar, Progresso, Contador, Cursor)
   ========================================================================== */

/* --- Barra de Progresso --- */
#prog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-primary);
  transform-origin: left;
  transform: scaleX(0);
  z-index: 2000;
  box-shadow: 0 0 6px var(--color-primary);
}

/* --- Navbar --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  padding: var(--space-2) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(3, 3, 3, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0; 
  transform: translateY(-100%);
}

.nav-id { display: flex; flex-direction: column; gap: 2px; }
.nav-code { font-family: var(--font-dossier); font-size: var(--text-xs); color: var(--color-primary); letter-spacing: 0.15em; }
.nav-name { font-family: var(--font-display); font-size: var(--text-lg); letter-spacing: 0.08em; }

.nav-links { display: none; gap: var(--space-3); align-items: center; }
@media (min-width: 768px) { .nav-links { display: flex; } }

.nav-link {
  font-family: var(--font-dossier); font-size: var(--text-xs);
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--color-text-muted); transition: color var(--transition-base);
}
.nav-link::before { content: '//'; margin-right: 4px; color: var(--color-primary); opacity: 0.6; }
.nav-link:hover { color: var(--color-text-highlight); }

.nav-badge {
  font-family: var(--font-dossier); font-size: var(--text-xs);
  letter-spacing: 0.1em; color: var(--color-primary);
  border: 1px solid rgba(229, 9, 20, 0.3); padding: 4px 10px; border-radius: var(--radius-sm);
}

/* --- Contador de Segredos --- */
#eggc {
  position: fixed;
  bottom: var(--space-3); right: var(--space-3); z-index: var(--z-nav);
  background: var(--color-surface); border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm); padding: 6px 14px;
  font-family: var(--font-dossier); font-size: var(--text-xs);
  letter-spacing: 0.15em; color: var(--color-text-muted);
  opacity: 0; transform: translateY(10px); transition: all var(--transition-base);
}
#eggc.show { opacity: 1; transform: translateY(0); }
#eggc.found { border-color: #c8850a; color: #c8850a; }

/* --- Cursor Customizado --- */
#cdot, #cring {
  position: fixed; top: 0; left: 0; border-radius: 50%;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%); display: none;
}

/* O JavaScript adiciona essa classe no body se detectar um mouse */
body.custom-cursor-active #cdot,
body.custom-cursor-active #cring { display: block; }

#cdot {
  width: 8px; height: 8px; background: var(--color-primary);
  box-shadow: 0 0 8px var(--color-primary), 0 0 16px var(--color-primary-glow);
  transition: width var(--transition-fast), height var(--transition-fast);
}

#cring {
  width: 32px; height: 32px; border: 1px solid rgba(229, 9, 20, 0.5);
  transition: width var(--transition-base), height var(--transition-base), border-color var(--transition-base);
}

body.chover #cdot { width: 4px; height: 4px; }
body.chover #cring { width: 48px; height: 48px; border-color: var(--color-primary); }

/* Esconde a seta branca padrão apenas onde o cursor vermelho estiver ativo */
@media (pointer: fine) {
  body.custom-cursor-active,
  body.custom-cursor-active a, 
  body.custom-cursor-active button, 
  body.custom-cursor-active .redacted {
    cursor: none;
  }
}

/* ==========================================================================
   5. ACESSIBILIDADE
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  #scanline { display: none; }
}

/* ==========================================================================
   6. SEÇÃO HERO (A Capa Principal)
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 8rem; 
  padding-bottom: 2rem;
  z-index: 1;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0; /* Kravado perfeitamente nas bordas, sem sobras */
  background-image: url('../../assets/images/hero2.jpg'); 
  background-size: cover;
  background-position: center top; 
  opacity: 0.45; 
  filter: saturate(1.2) contrast(1.1);
}

/* Gradientes para mesclar a imagem suavemente com o fundo preto do site */
.hero-grad {
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(to bottom, rgba(3,3,3,0.3) 0%, rgba(3,3,3,0) 30%, rgba(3,3,3,0.7) 70%, var(--color-bg) 100%),
    linear-gradient(to right, rgba(3,3,3,0.6) 0%, transparent 50%);
}

.hero-content {
  position: relative;
  z-index: var(--z-base);
  padding: 0 var(--space-4);
  max-width: 900px;
}

/* Tipografia e Selos */
.hero-stamp {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  letter-spacing: 0.5em;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  padding: 4px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-3);
  box-shadow: 0 0 12px var(--color-primary-glow);
  rotate: -1.5deg; /* Levemente torto para parecer um carimbo real */
}

.hero-eyebrow {
  font-family: var(--font-dossier);
  font-size: var(--text-xs);
  letter-spacing: 0.25em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  line-height: 0.9;
  letter-spacing: 0.02em;
  color: var(--color-text-highlight);
  text-shadow: 0 0 60px rgba(229, 9, 20, 0.25), 0 4px 8px rgba(0, 0, 0, 0.9);
}

/* Efeito vermelho vazado na palavra "THINGS" */
.hero-title em {
  font-style: normal;
  display: block;
  -webkit-text-stroke: 1.5px var(--color-primary);
  color: transparent;
  text-shadow: 0 0 50px rgba(229, 9, 20, 0.4);
}

.hero-rule {
  width: 60px;
  height: 1px;
  background: var(--color-primary);
  margin: var(--space-3) 0;
  transform-origin: left;
}

.hero-desc {
  font-family: var(--font-dossier);
  font-size: var(--text-lg);
  color: var(--color-text-main);
  max-width: 540px;
  line-height: 1.7;
}

/* Grid de Meta-Informações do Arquivo */
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.hero-meta-item { display: flex; flex-direction: column; gap: 3px; }
.hero-meta-label { font-family: var(--font-dossier); font-size: var(--text-xs); letter-spacing: 0.2em; color: var(--color-text-muted); }
.hero-meta-value { font-family: var(--font-dossier); font-size: var(--text-sm); color: var(--color-text-main); }

/* Botões e Interações */
.hero-cta { margin-top: var(--space-4) !important; 

}

.btn-cl {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  border: 1px solid var(--color-primary);
  color: var(--color-text-highlight);
  font-family: var(--font-dossier);
  font-size: var(--text-xs);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition: background var(--transition-base), box-shadow var(--transition-base);
}

.btn-cl::before { content: '▶'; color: var(--color-primary); font-size: 0.6em; }
.btn-cl:hover { background: rgba(229, 9, 20, 0.15); box-shadow: 0 0 30px var(--color-primary-glow); }

/* Indicador de Rolar para Baixo */
.hero-scroll {
  position: absolute;
  bottom: var(--space-4);
  right: var(--space-4);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hero-scroll-text {
  font-family: var(--font-dossier);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  color: var(--color-text-muted);
  writing-mode: vertical-rl;
}

.hero-scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--color-primary));
  animation: lgrow 2s ease-in-out infinite;
}

@keyframes lgrow {
  0%, 100% { transform: scaleY(0); transform-origin: top; opacity: 0; }
  50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
}

/* ==========================================================================
   7. SEÇÃO INTRO (Dossiê Confidencial)
   ========================================================================== */
.intro {
  padding: var(--space-12) var(--space-4);
  position: relative;
}

/* Linha vermelha guia à esquerda */
.intro::before {
  content: '';
  position: absolute;
  left: calc(2rem - 1px);
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--color-primary) 20%, var(--color-primary) 80%, transparent);
  opacity: 0.25;
}

.intro-wrap {
  max-width: 760px;
  margin-inline: auto;
  padding-left: var(--space-4);
}

.file-hdr {
  font-family: var(--font-dossier);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.15em;
  margin-bottom: var(--space-4);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.fhdr-field { display: flex; flex-direction: column; gap: 3px; }
.fhdr-label { color: var(--color-text-muted); }
.fhdr-value { color: var(--color-text-main); }

.intro-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  letter-spacing: 0.05em;
  color: var(--color-text-highlight);
  margin-bottom: var(--space-3);
  line-height: 1;
}

.dtxt {
  font-family: var(--font-dossier);
  font-size: var(--text-lg);
  color: var(--color-text-main);
  opacity: 0.8;
  line-height: 1.85;
  margin-bottom: var(--space-3);
}

.dtxt strong { color: var(--color-text-highlight); }

/* Texto Censurado Interativo */
.redacted {
  display: inline-block;
  background: var(--color-text-main);
  color: transparent;
  user-select: none;
  border-radius: 2px;
  padding: 0 0.5rem;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.redacted.on {
  background: rgba(200, 133, 10, 0.12);
  border: 1px solid #c8850a;
  color: #c8850a;
}

.rhint {
  font-family: var(--font-dossier);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.1em;
  margin-top: var(--space-1);
  display: block;
}

/* ==========================================================================
   8. LINHA DO TEMPO (Timeline)
   ========================================================================== */
.tl {
  padding: 0 var(--space-4) var(--space-12);
  position: relative;
}

.wrap {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
}

.tl-hdr {
  text-align: center;
  padding: var(--space-8) 0 var(--space-4);
  position: relative;
}

.tl-label {
  font-family: var(--font-dossier);
  font-size: var(--text-xs);
  letter-spacing: 0.35em;
  color: var(--color-primary);
  display: block;
  margin-bottom: var(--space-2);
}

.tl-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  letter-spacing: 0.06em;
}

/* Linha vertical central removida a pedido do design (Clean Look) */
.tl-spine {
  display: none !important;
}

.divred {
  width: 40px;
  height: 1px;
  background: var(--color-primary);
  margin: 0.75rem auto;
}

/* Divisores de Intervalo entre Temporadas */
.sdiv {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-8) 0;
  position: relative;
  z-index: var(--z-base);
}

.sdiv-line {
  flex: 1;
  height: 1px;
  background: rgba(180, 30, 30, 0.2); /* Mesma cor da linha vertical da timeline */
}

.sdiv-txt {
  font-family: var(--font-dossier);
  font-size: var(--text-xs);
  letter-spacing: 0.25em;
  color: var(--color-text-muted);
  white-space: nowrap; /* Impede que o texto quebre em duas linhas */
}
/* Cabeçalho de cada Temporada */
/* 1. Técnica segura para Full Bleed sem quebrar o ScrollTrigger */
.season {
  position: relative;
  width: 100vw;
  /* O truque mágico: joga a margem para a esquerda baseado na largura da tela */
  margin-left: calc(-50vw + 50%); 
  overflow: hidden;
  
  /* Mantém o respiro interno para a imagem não colar nos cards */
  padding: var(--space-4) 1rem 6rem;
  
  /* Cria um "abismo negro" padronizado muito maior entre as temporadas.
     Isso garante que a próxima imagem não apareça antes da hora. */
  margin-top: 10rem;
  margin-bottom: 10rem;
}

.season-hdr {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
  position: relative;
  z-index: var(--z-base);
}

.sline {
  flex: 1;
  max-width: 200px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(180, 30, 30, 0.2));
}

.sline.r { background: linear-gradient(to left, transparent, rgba(180, 30, 30, 0.2)); }

.sbadge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: var(--space-2) var(--space-4);
  border: 1px solid rgba(180, 30, 30, 0.2);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  position: relative;
}

.sbadge::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -32px;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 12px var(--color-primary);
  border: 2px solid var(--color-bg);
}

.snum { font-family: var(--font-dossier); font-size: var(--text-xs); letter-spacing: 0.2em; color: var(--color-primary); }
.syear { font-family: var(--font-display); font-size: var(--text-2xl); letter-spacing: 0.05em; color: var(--color-text-highlight); }
.sclass { font-family: var(--font-dossier); font-size: var(--text-xs); letter-spacing: 0.15em; color: var(--color-text-muted); }

/* Grid de Eventos */
.evgrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  position: relative;
  z-index: var(--z-base);
}

@media(min-width: 768px) {
  .evgrid { grid-template-columns: 1fr 80px 1fr; }
  .ev:nth-child(odd) { grid-column: 1; }
  .ev:nth-child(even) { grid-column: 3; }
}

/* Cards de Evento */
.ev {
  background: rgba(212, 200, 168, 0.05);
  border: 1px solid rgba(212, 200, 168, 0.12);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  position: relative;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

/* --- Temporada 1: Teste Imersivo (Full Bleed GSAP-Friendly) --- */

/* 2. Mantém o grid perfeitamente centralizado */
.season-hdr, .evgrid {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

/* Restaura o respiro (margem inferior) entre o selo da temporada e os cards */
.season-hdr {
  margin-bottom: var(--space-4); /* ou 3rem caso a variável não exista */
}

/* 3. Fundo Fixo e Estático (Sem Parallax) */
.season-bg {
  position: absolute;
  inset: 0; /* Crava a imagem nas bordas exatas da seção */
  width: 100%;
  height: 100%; /* Sem sobras para movimento */
  background-size: cover;
  background-position: center center;
  filter: saturate(1.3) contrast(1.2);
  z-index: 0;
}

/* Define a imagem específica para T1, T2, T3 e T4 */
#t1 .season-bg {
  background-image: url('../../assets/images/temporada1.jpg'); opacity: 0.070;
}
#t2 .season-bg {
  background-image: url('../../assets/images/temporada2.jpg'); opacity: 0.050;
}
#t3 .season-bg {
  background-image: url('../../assets/images/temporada3.jpg'); opacity: 0.020;
}
#t4 .season-bg {
  background-image: url('../../assets/images/temporada4.jpg'); opacity: 0.030;
}

#t5 .season-bg { 
  background-image: url('../../assets/images/temporada5.jpg'); opacity: 0.060;
}

/* 3. Efeito de Vidro (Glassmorphism) agrupado para as temporadas imersivas */
#t1 .ev, #t2 .ev, #t3 .ev, #t4 .ev {
  background: rgba(18, 18, 18, 0.7); 
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%); /* Suporte para iOS/Safari */
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1;
}

/* Garante que o grid de eventos fique acima do background em todas */
#t1 .evgrid, #t2 .evgrid, #t3 .evgrid, #t4 .evgrid {
  position: relative;
  z-index: 1;
}

.ev:hover {
  border-color: rgba(212, 200, 168, 0.28);
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.6);
}

/* Detalhe de "papel dobrado" no canto */
.ev::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 20px;
  height: 20px;
  background: linear-gradient(225deg, #13101a 50%, rgba(212, 200, 168, 0.12) 50%);
  border-bottom-left-radius: var(--radius-sm);
}

.ev-num { font-family: var(--font-dossier); font-size: var(--text-xs); letter-spacing: 0.2em; color: var(--color-primary); margin-bottom: 0.75rem; }
.ev-title { font-family: var(--font-dossier); font-size: var(--text-xl); color: var(--color-text-main); margin-bottom: 0.75rem; line-height: 1.3; }
.ev-body { font-family: var(--font-dossier); font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.7; }

/* Tags do Evento */
.ev-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.tag { font-family: var(--font-dossier); font-size: var(--text-xs); letter-spacing: 0.1em; padding: 2px 8px; border: 1px solid rgba(255,255,255,0.06); border-radius: 2px; color: var(--color-text-muted); }
.tag.alert { border-color: rgba(196, 17, 17, 0.3); color: var(--color-primary); }

/* Botão de Arquivo Secreto */
.sec-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-family: var(--font-dossier);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  border: 1px dashed rgba(255,255,255,0.06);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-base), color var(--transition-base);
}

.sec-btn::before { content: '⚠'; font-size: 0.8em; }
.sec-btn:hover { border-color: #c8850a; color: #c8850a; }

/* Conteúdo do Arquivo Complementar (Oculto por padrão) */
.sec-body {
  display: none;
  margin-top: 1rem;
  padding: var(--space-3);
  background: rgba(200, 133, 10, 0.12); /* Fundo amarelado translúcido */
  border: 1px solid rgba(200, 133, 10, 0.3);
  border-radius: var(--radius-sm);
  font-family: var(--font-dossier);
  font-size: var(--text-sm);
  color: #c8850a; /* Cor âmbar característica */
  line-height: 1.7;
}

/* Estado Aberto (Acionado pelo JavaScript) */
.sec-body.open {
  display: block;
}

/* ==========================================================================
   9. MODAL DE ARQUIVO CONFIDENCIAL
   ========================================================================== */
#emodal {
  position: fixed;
  inset: 0;
  z-index: 5000; /* Fica acima do site, mas abaixo do cursor (que é 9999) */
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: var(--space-4);
  background: rgba(3, 3, 3, 0.93);
  backdrop-filter: blur(12px);
  border: none;
  opacity: 0; /* O GSAP vai controlar a opacidade */
}

/* Quando o modal estiver aberto, forçamos o display flex para centralizar a caixa */
#emodal[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ebox {
  background: var(--color-surface);
  border: 1px solid #c8850a;
  border-radius: var(--radius-md);
  padding: var(--space-4);
  max-width: 480px;
  width: 100vw;
  box-shadow: 0 0 60px rgba(200, 133, 10, 0.2);
}

.ebadge { font-family: var(--font-dossier); font-size: var(--text-xs); letter-spacing: 0.25em; color: #c8850a; margin-bottom: var(--space-2); display: block; }
.etitle { 
  font-family: var(--font-display); 
  font-size: 1.875rem; 
  /* Trocamos o branco puro por um cinza claro para evitar o "sangramento" de luz */
  color: var(--color-text-main); 
  text-shadow: none; /* Garante que não há brilho herdado */
  font-weight: 400; /* Reduz o peso da fonte */
  letter-spacing: 0.05em; /* Dá um leve respiro entre as letras */
  margin-bottom: var(--space-2); 
}
.etext { font-family: var(--font-dossier); font-size: var(--text-base); color: var(--color-text-main); opacity: 0.85; line-height: 1.7; margin-bottom: var(--space-3); }

.eclose {
  font-family: var(--font-dossier);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  color: var(--color-text-muted);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 8px 24px;
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-base), color var(--transition-base);
}

.eclose:hover { border-color: var(--color-text-muted); color: var(--color-text-highlight); }

/* ==========================================================================
   10. AGENTES IDENTIFICADOS (Grid de Personagens)
   ========================================================================== */
.chars {
  padding: var(--space-12) var(--space-4);
  background: var(--color-surface);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.chars-hdr {
  text-align: center;
  margin-bottom: var(--space-8);
}

.chars-label {
  font-family: var(--font-dossier);
  font-size: var(--text-xs);
  letter-spacing: 0.3em;
  color: var(--color-primary);
  display: block;
  margin-bottom: 0.75rem;
}

.chars-title {
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 5vw, 3.75rem);
  letter-spacing: 0.05em;
  color: var(--color-text-highlight);
}

.chars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr));
  gap: var(--space-3);
  max-width: 1100px;
  margin-inline: auto;
}

/* Card Individual de Agente */
.ccard {
  background: rgba(3, 3, 3, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: var(--space-4) var(--space-2);
  text-align: center;
  transition: border-color var(--transition-base), transform var(--transition-base);
  position: relative;
  overflow: hidden;
}

.ccard:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-4px);
}

/* Linha de cor customizada no rodapé do card (via variável inline --ccolor) */
.ccard::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--ccolor, var(--color-primary));
  transform: scaleX(0);
  transition: transform var(--transition-base);
  transform-origin: left;
}

.ccard:hover::after {
  transform: scaleX(1);
}

.ccard-av {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-2);
  overflow: hidden; /* Corta a imagem em círculo perfeito */
}

.ccard-av img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Garante que a foto preencha o espaço sem amassar */
  filter: grayscale(100%) contrast(1.2); /* Efeito dossiê: foto em preto e branco com alto contraste */
  transition: filter var(--transition-base);
}

/* A foto ganha cor quando passa o mouse no card */
.ccard:hover .ccard-av img {
  filter: grayscale(0%) contrast(1);
}

.ccard-name { font-family: var(--font-dossier); font-size: var(--text-base); color: var(--color-text-highlight); margin-bottom: 4px; }
.ccard-role { font-family: var(--font-dossier); font-size: var(--text-xs); letter-spacing: 0.1em; color: var(--color-text-muted); }

/* Status do Agente */
.ccard-st {
  display: inline-block;
  margin-top: 0.75rem;
  font-family: var(--font-dossier);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  padding: 2px 8px;
  border-radius: 2px;
}

.st-alive { color: #4caf88; border: 1px solid rgba(76, 175, 136, 0.25); }
.st-dead { color: var(--color-primary); border: 1px solid rgba(229, 9, 20, 0.3); }
.st-unk { color: #c8850a; border: 1px solid rgba(200, 133, 10, 0.25); }

/* ==========================================================================
   11. EPÍLOGO E RODAPÉ
   ========================================================================== */
.epilogue {
  padding: var(--space-12) var(--space-4);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Brilho vermelho no fundo do epílogo */
.epilogue::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(229, 9, 20, 0.08) 0%, transparent 70%);
}

.ep-wrap { position: relative; z-index: var(--z-base); max-width: 640px; margin-inline: auto; }
.ep-label { font-family: var(--font-dossier); font-size: var(--text-xs); letter-spacing: 0.35em; color: var(--color-primary); display: block; margin-bottom: var(--space-3); }
.ep-title { font-family: var(--font-display); font-size: clamp(2.25rem, 7vw, 3.75rem); letter-spacing: 0.05em; color: var(--color-text-highlight); line-height: 1; margin-bottom: var(--space-3); }
.ep-text { font-family: var(--font-dossier); font-size: var(--text-lg); color: var(--color-text-main); opacity: 0.72; line-height: 1.8; margin-bottom: var(--space-3); }

.ep-sig {
  font-family: var(--font-dossier);
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  color: var(--color-text-muted);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ep-sig p + p { margin-top: 0.5rem; }

footer {
  padding: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column; /* Empilha os parágrafos verticalmente */
  gap: 1rem;
  align-items: center; /* Centraliza horizontalmente */
  justify-content: center;
  text-align: center;
}

footer p {
  font-family: var(--font-dossier);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.1em;
}

/* ==========================================================================
   12. REFINAMENTOS MOBILE (Responsividade)
   ========================================================================== */
@media (max-width: 768px) {
  /* Reduz levemente o texto descritivo para restaurar a hierarquia visual */
  .hero-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.85; /* Deixa o texto sutilmente mais apagado que o título brilhante */
  }

  /* Ajuste 1: Texto superior (Departamento de Energia) com respiro */
  .hero-eyebrow {
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    line-height: 1.5;
    margin-bottom: var(--space-3);
  }
  
  /* Ajuste do selo CLASSIFICADO no topo */
  .nav-badge, .header-badge {
    font-size: 0.7rem;
    padding: 0.3rem 0.5rem;
    letter-spacing: 0.05em;
  }
  /* Ajuste 2: Metadados espremidos para caber sem barra de rolagem */
  .hero-meta {
    gap: 1rem; /* Espaço mínimo entre as colunas */
    flex-wrap: nowrap; /* Impede que o 'REF.' caia para a linha de baixo */
    overflow-x: visible; /* Remove a barra de rolagem */
    padding-bottom: 0;
    width: 100%;
  }

  .hero-meta-label {
    font-size: 0.70rem; /* Letra miudinha */
    letter-spacing: 0; /* Remove o espaçamento largo para economizar espaço */
  }

  .hero-meta-value {
    font-size: 0.55rem;
    white-space: nowrap; /* Impede que os valores quebrem em duas linhas */
  }

  /* Ajuste 3: Reduzir a caixa do contador de segredos */
  #eggc {
    font-size: 0.65rem;
    padding: 0.4rem 0.75rem;
    bottom: var(--space-3);
    right: var(--space-3);
  }

  /* Ajuste 4: Troca a imagem de fundo pela versão retrato (9:16) no mobile */
  .hero-bg {
    background-image: url('../../assets/images/hero-mobile.jpg');
    background-size: cover; /* Garante que preencha a tela perfeitamente */
    background-position: center center; /* Centraliza a nova imagem */
  }

  /* Desativa o cursor customizado em telas touch */
  #cdot, #cring, .cursor {
    display: none !important;
  }

  /* 1. Força todas as imagens dos agentes a ficarem coloridas no mobile */
  .ccard .ccard-av img {
    filter: grayscale(0%) sepia(0%) contrast(1.1) !important;
    opacity: 1 !important;
    transition: none !important; /* Remove qualquer atraso ou animação */
  }

  /* 2. Anula bugs de hover/toque no celular (remove tremedeiras ou bordas piscando) */
  .ccard:hover, .ccard:active {
    transform: none !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: none !important;
  }
}

/* --- CORREÇÕES DEFINITIVAS MOBILE (NÃO VAZA PARA DESKTOP) --- */
@media (max-width: 768px) {
  
  /* 1. Ajuste da Hero: Espaço para o subtítulo no topo e botão no rodapé */
  .hero {
    min-height: 100dvh !important;
    padding-top: 6rem !important;    /* Garante que o "Laboratório Nacional" não suma */
    padding-bottom: 10rem !important; /* Empurra o botão pra cima da caixa de segredos */
  }

  /* 2. Ajuste do Título: Fluido para não cortar o "R" de Stranger */
  .hero-title {
    font-size: 13.5vw !important;
    line-height: 0.9 !important;
    letter-spacing: -0.02em !important;
  }
}