/* ============================================
   UI Elements — Buttons, Footer, Back-to-top,
   Scroll animations, Section headers
   ============================================ */

/* --- Buttons --- */
.btn-group {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--speed);
  border-radius: 6px;
  text-decoration: none;
}

.btn-primary {
  border-color: var(--text);
  color: var(--bg-deep);
  background: var(--text);
}

.btn-primary:hover {
  background: #33322c;
  border-color: #33322c;
}

.btn-secondary {
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--humanoid);
  color: var(--humanoid);
  background: var(--humanoid-bg);
}

.char-filter-btn.active {
  border-color: var(--humanoid);
  color: var(--humanoid);
  background: var(--humanoid-bg);
}

/* --- Section Header --- */
.section-header {
  text-align: center;
  margin-bottom: 52px;
}

.section-header h2 {
  position: relative;
  display: inline-block;
}

.section-header h2::before {
  content: '// ';
  color: var(--human);
  font-weight: 400;
}

.section-header h2::after {
  content: ' //';
  color: var(--humanoid);
  font-weight: 400;
}

.section-header .sub {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  margin-top: 10px;
}

/* --- Footer --- */
footer {
  padding: 36px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 1.25rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.footer-inner .split-brand {
  color: var(--text);
}

/* --- Back to Top Button --- */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 900;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-dim);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, background 0.3s ease, border-color 0.3s ease;
  box-shadow: 0 2px 8px rgba(28, 27, 24, 0.08);
  line-height: 1;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--text);
  color: var(--bg-deep);
  border-color: var(--text);
}

/* --- Scroll Animations (triggered by JS) --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Shared: Emphasis blocks --- */
.emphasis {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 2.0rem;
  color: var(--text);
  padding: 24px 28px;
  background: var(--bg-surface);
  border-left: 3px solid var(--human);
  border-radius: 4px;
  margin: 28px 0;
  line-height: 1.5;
}

.emphasis.humanoid-em {
  border-left-color: var(--humanoid);
}

/* --- Shared: Pull quotes --- */
.pull-quote {
  text-align: center;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--text);
  padding: 32px 0;
  margin: 40px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.pull-quote .attribution {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-style: normal;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-top: 10px;
  text-transform: uppercase;
}

/* --- Shared: Return section --- */
.return-section {
  text-align: center;
  padding: 60px 0 80px;
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
}

.return-section p {
  color: var(--text-dim);
  margin-bottom: 24px;
  font-size: 1rem;
}

/* --- Shared: Tagline block --- */
.tagline-block {
  text-align: center;
  padding: 48px 0 24px;
}

.tagline-block .tagline {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-style: italic;
  color: var(--text);
}

.tagline-block .tagline-source {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ============================================
   Voice POV End — closing tagline block
   ============================================ */

.voice-pov-end {
  text-align: center;
  padding: 40px 0 20px;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.6;
}

.voice-pov-end strong {
  color: var(--text);
}