/* ═══════════════════════════════════════════════════════════════
   Perihelion X — Credits Page
   ═══════════════════════════════════════════════════════════════ */

html, body {
  background-color: var(--bg);
  color: var(--white);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-y: auto;
}

/* ── Canvas / vignette ───────────────────────────────────────── */
#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    transparent 30%,
    rgba(4, 4, 10, 0.6) 65%,
    rgba(2, 2, 8, 0.92) 100%
  );
}

/* ── Mute toggle ─────────────────────────────────────────────── */
.mute-toggle {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  right: auto;
  z-index: 100;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.mute-toggle:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
  background-color: rgba(255, 255, 255, 0.05);
}

.mute-toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.mute-icon {
  width: 18px;
  height: 18px;
  position: absolute;
  transition: opacity 0.2s ease;
}

.mute-icon.mute-off { opacity: 0; }
.mute-toggle[aria-pressed="true"] .mute-icon.mute-on  { opacity: 0; }
.mute-toggle[aria-pressed="true"] .mute-icon.mute-off { opacity: 1; }

/* ── Layout ──────────────────────────────────────────────────── */
.credits-main {
  position: relative;
  z-index: 10;
  max-width: 720px;
  margin: 0 auto;
  padding: 6rem 2rem 8rem;
  min-height: 100svh;
}

/* ── Header ──────────────────────────────────────────────────── */
.credits-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6rem;
}

.credits-back {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.25s ease;
}

.credits-back:hover { color: #fff; }

.credits-back:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 4px;
  border-radius: 2px;
}

.credits-back svg {
  width: 16px;
  height: 16px;
}

.credits-wordmark {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.25);
  text-transform: uppercase;
}

/* ── Body sections ───────────────────────────────────────────── */
.credits-body {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.credits-section {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 2.5rem;
}

.credits-section:first-child {
  border-top: none;
  padding-top: 0;
}

.credits-intro {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 300;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.65);
}

.credits-section-title {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 1.5rem;
}

.credits-text {
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 1.25rem;
}

.credits-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.credits-list li {
  font-size: 0.9rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.5;
}

.credits-item-label {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  margin-right: 0.5rem;
}

.credits-source {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.3);
}

.credits-link {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.2);
  text-underline-offset: 3px;
  transition: color 0.25s ease, text-decoration-color 0.25s ease;
}

.credits-link:hover {
  color: #fff;
  text-decoration-color: rgba(255, 255, 255, 0.6);
}

.credits-link:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── Byline ──────────────────────────────────────────────────── */
.credits-byline {
  padding-bottom: 1rem;
}

.credits-name {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  margin-bottom: 0.75rem;
}

.credits-contact {
  font-size: 0.85rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.4);
}

/* ── Footer ──────────────────────────────────────────────────── */
.credits-footer {
  margin-top: 6rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.credits-return {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  transition: color 0.25s ease;
}

.credits-return:hover { color: #fff; }

.credits-return:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 4px;
  border-radius: 2px;
}

.credits-return svg {
  width: 18px;
  height: 18px;
}

.credits-footer-note {
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.18);
  text-transform: uppercase;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 600px) {
  .credits-main { padding: 4rem 1.5rem 6rem; }
  .credits-header { margin-bottom: 4rem; }
  .credits-footer { flex-direction: column; align-items: flex-start; }
}
