/* ═══════════════════════════════════════════
   NEOGEIA — Bioluminescência Profunda
   Stylesheet Principal
═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Raleway:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400&display=swap');

/* ── Variáveis ── */
:root {
  --bg-deep:     #030d18;
  --bg-mid:      #061624;
  --bg-surface:  #0b2338;
  --bg-card:     rgba(6, 22, 36, 0.85);
  --accent:      #00e5ff;
  --accent-dim:  #00bcd4;
  --accent-teal: #00e5b0;
  --accent-glow: rgba(0, 229, 255, 0.25);
  --text-primary: #dff0f8;
  --text-secondary: #7aaec2;
  --text-dim:    #446070;
  --border:      rgba(0, 229, 255, 0.12);
  --border-hover:rgba(0, 229, 255, 0.40);
  --font-display: 'Cinzel', serif;
  --font-body:   'Raleway', sans-serif;
  --transition:  0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.75;
  font-weight: 300;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-mid); }
::-webkit-scrollbar-thumb { background: var(--accent-dim); border-radius: 3px; }

/* ── Canvas de Estrelas ── */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ── Navegação ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(3, 13, 24, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-shadow: 0 0 20px var(--accent-glow);
}

.nav-links {
  display: flex;
  gap: 0.2rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0.45rem 0.85rem;
  border-radius: 4px;
  transition: color var(--transition), background var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  background: var(--accent-glow);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  /* padding-top creates the visual gap WITHOUT breaking hover continuity */
  padding-top: 10px;
  min-width: 200px;
  background: transparent;
}

/* Last dropdown (Mais) opens to the left so it doesn't overflow the screen */
.nav-links li.nav-dropdown:last-child .nav-dropdown-menu {
  left: auto;
  right: 0;
}

.nav-dropdown-menu-inner {
  background: rgba(6, 22, 36, 0.97);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
}

.nav-dropdown:hover .nav-dropdown-menu { display: block; }

.nav-dropdown-menu-inner a {
  display: block;
  padding: 0.55rem 1rem;
  border-radius: 4px;
  font-size: 0.78rem;
  letter-spacing: 1px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition), background var(--transition);
}

.nav-dropdown-menu-inner a:hover,
.nav-dropdown-menu-inner a.active {
  color: var(--accent);
  background: var(--accent-glow);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  width: 24px; height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── Conteúdo Principal ── */
.page-wrapper {
  position: relative;
  z-index: 1;
  padding-top: 64px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── Cabeçalho de Página ── */
.page-header {
  padding: 5rem 0 3.5rem;
  text-align: center;
  position: relative;
}

.page-header::after {
  content: '';
  display: block;
  width: 120px; height: 1px;
  background: linear-gradient(to right, transparent, var(--accent), transparent);
  margin: 1.5rem auto 0;
}

.page-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.8;
  margin-bottom: 0.75rem;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  color: var(--text-primary);
  text-shadow: 0 0 40px rgba(0, 229, 255, 0.3);
  line-height: 1.1;
}

.page-subtitle {
  margin-top: 1rem;
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text-secondary);
  font-style: italic;
  max-width: 600px;
  margin-inline: auto;
}

/* ── Divisor ── */
.divider {
  width: 100%; height: 1px;
  background: linear-gradient(to right, transparent, var(--border-hover), transparent);
  margin: 3rem 0;
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,229,255,0.03) 0%, transparent 60%);
  pointer-events: none;
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 30px rgba(0,229,255,0.07);
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* ── Grid de Cards ── */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; }

/* ── Tipografia ── */
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; }

h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--text-primary);
  margin-bottom: 1rem;
}

h2.section-title {
  position: relative;
  padding-left: 1.2rem;
}

h2.section-title::before {
  content: '';
  position: absolute;
  left: 0; top: 10%; bottom: 10%;
  width: 3px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-teal));
  border-radius: 2px;
}

h3 {
  font-size: 1.15rem;
  color: var(--accent-dim);
  margin-bottom: 0.6rem;
}

h4 {
  font-size: 0.95rem;
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1.2rem;
  color: var(--text-primary);
  font-weight: 300;
}

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

strong { color: var(--accent); font-weight: 600; }

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-teal); }

ul, ol { padding-left: 1.5rem; margin-bottom: 1.2rem; }
li { margin-bottom: 0.4rem; color: var(--text-primary); font-weight: 300; }

/* ── Seção ── */
section {
  padding: 4rem 0;
}

.section-lead {
  font-size: 1.05rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 2.5rem;
  max-width: 700px;
}

/* ── Tag / Badge ── */
.tag {
  display: inline-block;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid var(--border);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

/* ── Stat Box ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.stat-box {
  background: rgba(0, 229, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.2rem 1rem;
  text-align: center;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ── Info Row ── */
.info-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

.info-row:last-child { border-bottom: none; }

.info-key {
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  min-width: 160px;
  flex-shrink: 0;
}

.info-val {
  font-size: 0.95rem;
  color: var(--text-primary);
}

/* ── Citação ── */
blockquote {
  border-left: 2px solid var(--accent);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(0, 229, 255, 0.04);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text-secondary);
}

/* ── Timeline ── */
.timeline {
  position: relative;
  padding-left: 3rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.85rem; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
  animation: fadeInUp 0.6s ease both;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.15rem; top: 0.35rem;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  border: 2px solid var(--bg-deep);
}

.timeline-era {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 3px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.timeline-event {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.timeline-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 300;
}

/* ── Tabela ── */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}

thead th {
  background: rgba(0, 229, 255, 0.08);
  padding: 1rem 1.2rem;
  text-align: left;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--border-hover);
}

tbody td {
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  color: var(--text-primary);
  font-weight: 300;
}

tbody tr:hover { background: rgba(0, 229, 255, 0.03); }

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--text-secondary); }

/* ── Botão ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.8rem;
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  border: none;
}

.btn-primary {
  background: rgba(0, 229, 255, 0.12);
  border: 1px solid var(--accent);
  color: var(--accent);
}

.btn-primary:hover {
  background: rgba(0, 229, 255, 0.22);
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.3);
  color: var(--accent);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 1px;
  position: relative;
  z-index: 1;
}

footer .footer-logo {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--accent);
  letter-spacing: 4px;
  display: block;
  margin-bottom: 0.5rem;
}

/* ── Animações ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 229, 255, 0.3); }
  50% { box-shadow: 0 0 40px rgba(0, 229, 255, 0.6), 0 0 80px rgba(0, 229, 255, 0.2); }
}

.fade-in { animation: fadeIn 1s ease both; }
.fade-in-up { animation: fadeInUp 0.8s ease both; }

/* ── Reveal on Scroll ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  nav { padding: 0 1.2rem; }

  .nav-links { display: none; flex-direction: column; position: absolute;
    top: 64px; left: 0; right: 0; background: rgba(3, 13, 24, 0.98);
    border-bottom: 1px solid var(--border); padding: 1rem; gap: 0; }
  .nav-links.open { display: flex; }
  .nav-dropdown-menu { position: static; box-shadow: none; border: none;
    background: transparent; padding-left: 1rem; padding-top: 0; }
  .nav-dropdown-menu-inner { background: transparent; border: none; box-shadow: none; padding: 0; backdrop-filter: none; }
  .nav-dropdown:hover .nav-dropdown-menu { display: none; }
  .nav-dropdown.open .nav-dropdown-menu { display: block; }

  .hamburger { display: flex; }
  .container { padding: 0 1.2rem; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .info-key { min-width: 120px; }
  h2.section-title { font-size: 1.3rem; }
}
