/* ==========================================================================
   Credits
   ========================================================================== */

.credits-hero {
  position: relative;
  padding: calc(var(--header-top) + clamp(40px, 7vw, 80px)) 0 clamp(32px, 5vw, 52px);
  border-bottom: 1px solid var(--line);
  isolation: isolate;
}
.credits-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(0deg, var(--ink) 0%, rgb(14 19 17 / .88) 45%, rgb(14 19 17 / .72) 100%),
    url('../img/shot-night-road.webp') center 40% / cover no-repeat;
}
.credits-hero-inner { display: grid; gap: 18px; justify-items: start; }
.credits-title { font-size: clamp(2.4rem, 6vw, 4rem); }

.credits-stats {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}
.credits-stats li {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgb(25 33 30 / .85);
  color: var(--muted);
  font-size: .95rem;
}
.credits-stats strong { color: var(--gold); font-family: var(--font-display); font-weight: 400; margin-right: 4px; }

.credits-body { padding-top: 28px; padding-bottom: 90px; }

/* Jump menu */
.credits-nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.credits-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
  transition: background-color .15s, color .15s;
}
.credits-nav a:hover { background: var(--panel-2); color: var(--cream); }
.credits-nav a span { font-size: .8rem; color: var(--faint); font-weight: 500; }

/* Sections */
.credit-section { padding: clamp(36px, 5vw, 56px) 0 0; }
.credit-head { display: grid; gap: 6px; margin-bottom: 20px; }
.credit-head h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.1;
}
.credit-count {
  padding: 2px 10px;
  border-radius: 999px;
  background: rgb(236 184 72 / .14);
  color: var(--gold);
  font-size: .9rem;
}
.credit-head p { color: var(--muted); max-width: 70ch; }
.credit-head a, .credits-note a { color: var(--cream); text-decoration-color: rgb(236 184 72 / .6); text-underline-offset: 3px; }
.credit-head a:hover, .credits-note a:hover { color: var(--gold); }

/* Asset cards */
.credit-grid {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 12px;
}
.credit {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--panel);
}

.credit-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-platform, .chip-lic {
  padding: 2px 9px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: .62rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  line-height: 1.7;
}
.chip-platform { background: rgb(246 241 228 / .08); color: var(--muted); }
.chip-lic { background: rgb(236 184 72 / .14); color: var(--gold); }
.chip-lic.lic-cc0 { background: rgb(127 211 160 / .14); color: #8fdcae; }
.chip-lic.lic-pro { background: var(--purple-soft); color: #b9a2f2; }
.chip-lic.lic-free, .chip-lic.lic-ofl { background: rgb(127 211 240 / .12); color: #8fd3ea; }

.credit-name { font-size: 1.05rem; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.credit-name a { color: var(--cream); text-decoration: none; }
.credit-name a:hover { color: var(--gold); }
.ext { display: inline-block; width: .85em; height: .85em; margin-left: 6px; vertical-align: -1px; opacity: .55; }

.credit-by { color: var(--muted); }
.credit-by a { color: var(--gold); text-decoration: none; overflow-wrap: anywhere; }
.credit-by a:hover { text-decoration: underline; text-underline-offset: 3px; }

.credit-meta {
  display: grid;
  gap: 4px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: .9rem;
}
.credit-meta div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; }
.credit-meta dt { color: var(--faint); }
.credit-meta dd { color: #d8d2c3; overflow-wrap: anywhere; }
.credit-meta a { color: inherit; text-decoration-color: rgb(236 184 72 / .6); text-underline-offset: 3px; }
.credit-meta a:hover { color: var(--gold); }

/* Sound artists */
.sound-grid {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sound-grid li > * {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--panel);
  color: #d8d2c3;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.sound-grid a { color: var(--cream); text-decoration: none; transition: background-color .15s, color .15s; }
.sound-grid a:hover { background: var(--panel-2); color: var(--gold); }

.credits-note {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  max-width: 80ch;
}

@media (max-width: 520px) {
  .credit { padding: 16px; }
  .credit-meta div { grid-template-columns: 88px minmax(0, 1fr); }
}

/* Ukrainian labels ("Опубліковано") need a wider label column */
.credit-meta:lang(uk) div,
.credit-track .credit-meta:lang(uk) div { grid-template-columns: 116px minmax(0, 1fr); }

/* Soundtrack */
.credit-track .credit-meta div { grid-template-columns: 110px minmax(0, 1fr); }
.credit-meta code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88rem;
  letter-spacing: .04em;
  color: var(--cream);
}
