/* Credits — Spotlight Bands. Same palette as ../ai-policy/ai-policy.css so it reads as one site.
   Each band's accent is the in-game Credits screen's accent for that section (CreditsScreen.ACCENT_*),
   passed in as --accent on the band. */

:root {
  --bg: #151816;
  --line: #3a413b;
  --ink: #e4e8e1;
  --muted: #99a397;
  --link: #8cc45e;
  --gold: #e0b56a;
  --skel: rgba(228, 232, 225, 0.09); /* loading placeholders */
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--sans); }
body::before {
  content: ""; position: fixed; left: 0; bottom: 0; width: 1280px; height: 1040px; pointer-events: none; z-index: 0;
  background: url("../mods/bricks.svg") left bottom / contain no-repeat; opacity: 0.6;
  -webkit-mask-image: radial-gradient(ellipse 100% 100% at 0 100%, #000 25%, rgba(0,0,0,0.5) 55%, transparent 85%);
          mask-image: radial-gradient(ellipse 100% 100% at 0 100%, #000 25%, rgba(0,0,0,0.5) 55%, transparent 85%);
}
main, .foot { position: relative; z-index: 1; }
a { color: var(--link); }
.in { width: 100%; max-width: 1000px; margin: 0 auto; padding: 0 20px; }

/* ---- hero: a ride photo behind the title ---------------------------------------------------- */
.hero { position: relative; z-index: 1; min-height: 380px; display: flex; align-items: flex-end; padding: 0 0 34px;
  background: linear-gradient(180deg, rgba(21,24,22,.15), rgba(21,24,22,.6) 55%, var(--bg)),
              url("../support/backdrops/ride-07.webp") center 40% / cover; }
.kicker { margin: 0 0 4px; text-transform: uppercase; letter-spacing: 0.12em; font-size: 12px; }
.kicker a { color: var(--link); text-decoration: none; }
.kicker a:hover, .kicker a:focus-visible { text-decoration: underline; }
h1 { margin: 0 0 10px; font-size: clamp(44px, 8vw, 72px); font-weight: 700; line-height: 1.05; }
.lede { margin: 0; font-size: 18px; }

/* ---- Brennan: the timeline band ------------------------------------------------------------- */
.tl { padding: 40px 0 34px; background: linear-gradient(180deg, rgba(224,181,106,.07), transparent), #191d1a;
  border-top: 1px solid #4d4532; border-bottom: 1px solid var(--line); }
.tl .intro { display: grid; grid-template-columns: 240px 1fr; gap: 26px; align-items: center; }
/* the portrait: photo and in-game skin stacked, cross-fading (spotlight.js toggles .skin-on) */
.me { position: relative; isolation: isolate; width: 240px; height: 240px; border-radius: 10px; overflow: hidden;
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--gold);
  background: radial-gradient(circle at 50% 70%, rgba(224,181,106,.35), #1a1e1b 70%); }
.me-photo, .me-skin { position: absolute; inset: 0; transition: opacity .6s ease; }
/* Square, and the whole photo: the award badges down its left edge must never be cropped. */
.me-photo { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.me-skin { opacity: 0; }
.me-skin canvas { width: 100%; height: 100%; display: block; }
.me.skin-on .me-photo { opacity: 0; }
.me.skin-on .me-skin { opacity: 1; }
.me.swappable { cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .me-photo, .me-skin { transition: none; } }
.tag { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin: 0 0 4px; }
.tl .name { font-size: 32px; font-weight: 700; margin: 0; }
.tl .role { color: var(--gold); margin: 2px 0 10px; }
.tl .bio { color: #c5ccc2; margin: 0; font-size: 17px; }
.track { position: relative; list-style: none; padding: 0; margin: 34px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.track::before { content: ""; position: absolute; left: 12px; right: 12px; top: 9px; height: 4px;
  background: repeating-linear-gradient(90deg, #4d4532 0 14px, transparent 14px 22px), linear-gradient(#2c322d, #2c322d); }
.track li { position: relative; padding-top: 30px; }
.track li::before { content: ""; position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg); box-shadow: inset 0 0 0 4px var(--gold); }
.track li:last-child::before { background: var(--gold); box-shadow: 0 0 0 6px rgba(224,181,106,.25); }
.track b { display: block; font-size: 22px; color: #f1ead9; }
.track span { color: var(--muted); font-size: 14px; }
.track a { color: var(--gold); }
.track strong { color: #f1ead9; }

/* ---- the Spotlight Band: one per section --------------------------------------------------- */
.band { padding: 30px max(20px, calc(50vw - 480px)); display: grid; grid-template-columns: 260px 1fr; gap: 10px 40px; align-items: center;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 14%, transparent), transparent 55%), rgba(24,28,25,.7);
  border-bottom: 1px solid var(--line); }
.band.right { grid-template-columns: 1fr 260px;
  background: linear-gradient(270deg, color-mix(in srgb, var(--accent) 14%, transparent), transparent 55%), rgba(20,24,21,.7); }
.band.right > :first-child { order: 2; }
.band h2 { font-size: 30px; line-height: 1.2; margin: 0; }
.band h2::after { content: ""; display: block; width: 36px; height: 3px; margin: 8px 0 12px; background: var(--accent); border-radius: 2px; }
.band p { margin: 0 0 8px; }
.desc { color: var(--muted); }
.foot-note { color: var(--muted); font-size: 14px; margin-top: 10px !important; }

/* Name and title take only the width they need, so the bio starts right beside them, left-aligned. */
.band.wilson { grid-template-columns: 200px max-content 1fr; }
.wilson .portrait { text-align: center; }
.wilson .portrait img { width: 140px; height: 140px; image-rendering: pixelated; border-radius: 10px;
  box-shadow: 0 0 0 1px var(--line), 0 16px 34px rgba(0,0,0,.5); }
.wilson .name { font-weight: 700; font-size: 20px; margin: 4px 0 0 !important; }
.wilson .role { color: var(--accent); margin: 0 0 8px !important; }
.wilson .bio { color: var(--muted); max-width: 60ch; margin: 0 !important; }

/* the lists: two columns of "Name — figure" */
.list { list-style: none; margin: 0; padding: 0; columns: 2 220px; column-gap: 28px; }
.list li { break-inside: avoid; padding: 3px 0; border-bottom: 1px solid rgba(58, 65, 59, 0.5); overflow-wrap: anywhere; }
.list .who { color: var(--ink); }
.list li.has-skin { cursor: pointer; }
.list li.has-skin:hover .who, .list li.showing .who, .list li.locked .who { color: var(--accent, var(--link)); }
.list li.locked .who { text-decoration: underline; text-underline-offset: 3px; }
/* Arrived from a link to this translator (?translator=): a glow that fades. */
.list li.found { animation: found 2.4s ease-out 1; border-radius: 4px; }
.list li.found .who { color: var(--accent, var(--link)); }
@keyframes found { from { background: rgba(95, 191, 95, 0.35); } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .list li.found { animation: none; background: rgba(95, 191, 95, 0.18); } }
.list .what { color: var(--muted); }
.list .what::before { content: " · "; }
.list .anon { font-style: italic; color: var(--muted); }
.list li.empty { font-style: italic; color: var(--muted); border-bottom: 0; column-span: all; }
.more { margin-top: 10px; background: none; border: 1px solid var(--line); color: var(--link);
  font: inherit; font-size: 14px; padding: 4px 12px; border-radius: 4px; cursor: pointer; }
.more:hover, .more:focus-visible { border-color: var(--link); }

/* the top contributor: an animated player on a lit floor, name plate under */
.spot { text-align: center; }
.spot .stage { position: relative; width: 240px; height: 330px; margin: 0 auto; }
.spot .stage::after { content: ""; position: absolute; left: 50%; bottom: 8px; width: 170px; height: 30px; transform: translateX(-50%);
  background: radial-gradient(ellipse, color-mix(in srgb, var(--accent) 45%, transparent), transparent 70%); z-index: 0; }
.spot canvas { position: relative; z-index: 1; width: 240px; height: 330px; display: block; cursor: grab; }
.spot canvas:active { cursor: grabbing; }
.spot.no-3d .stage { height: 40px; }
.spot.no-3d canvas { display: none; }
.spot-label { margin: 2px 0 0 !important; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
/* A hovered name swaps the plate (spotlight.js attachHover): one line of name and a fixed two-line
   detail box, so the band never changes height under the mouse. */
.spot-name { margin: 0 !important; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spot-name.anon { font-style: italic; color: var(--muted); font-weight: 400; }
.spot-what { margin: 0 !important; font-size: 13px; line-height: 1.4; color: var(--muted); height: 2.8em;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.spot:not(.named) .spot-label { visibility: hidden; }

/* ---- loading placeholders: every band paints at once (index.html), its list and player follow ---- */
/* Skeleton rows stand where the names will (credits.js's first fill replaces them); the stage shows a
   faint player-shaped block until spotlight.js mounts the model (.ready) and the plate a name-width bar
   until it names someone (.named). */
.list li.skel { height: 1.6em; border-bottom: 0; padding: 0; margin: 3px 0 4px; }
.list li.skel::before { content: ""; display: block; height: 100%; width: 70%; border-radius: 4px; background: var(--skel); }
.list li.skel:nth-child(2n)::before { width: 55%; }
.list li.skel:nth-child(3n)::before { width: 80%; }
.spot:not(.ready) .stage::before { content: ""; position: absolute; z-index: 1; left: 50%; top: 14%; width: 30%; height: 72%;
  transform: translateX(-50%); border-radius: 8px; background: var(--skel); }
.spot:not(.named):not(.ready) .spot-name::before { content: ""; display: inline-block; width: 120px; height: 1em; vertical-align: middle;
  border-radius: 4px; background: var(--skel); }
.spot:not(.named):not(.ready) .spot-label { visibility: visible; }
.list li.skel::before, .spot:not(.ready) .stage::before, .spot:not(.named):not(.ready) .spot-name::before { animation: skel-pulse 1.4s ease-in-out infinite; }
@keyframes skel-pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) {
  .list li.skel::before, .spot:not(.ready) .stage::before, .spot:not(.named):not(.ready) .spot-name::before { animation: none; }
}

.status { color: var(--muted); font-size: 14px; margin: 16px auto; }
.status:empty { display: none; }

.foot { padding: 30px 20px 50px; color: var(--muted); font-size: 14px; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }

@media (max-width: 700px) {
  body::before { width: 600px; height: 488px; opacity: 0.4; }
  /* phones: the Conductor layout — a tall lit stage, then the bio; no timeline */
  .tl { padding: 24px 0 26px; background: radial-gradient(ellipse at 50% 30%, rgba(224,181,106,.2), transparent 55%), #1a1e1b; }
  .tl .intro { grid-template-columns: 1fr; gap: 14px; }
  .me { width: 220px; height: 220px; margin: 0 auto; border-radius: 12px; overflow: visible; box-shadow: none; background: none; }
  .me::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 140px; height: 26px; transform: translateX(-50%);
    background: radial-gradient(ellipse, rgba(224,181,106,.5), transparent 70%); z-index: -1; }
  .me-photo { border-radius: 12px; box-shadow: 0 0 0 2px var(--gold), 0 16px 34px rgba(0,0,0,.5); }
  .tl .name { font-size: 28px; }
  .track { display: none; }
  .band, .band.right, .band.wilson { grid-template-columns: 1fr; padding: 24px 16px; }
  .band.right > :first-child { order: 0; }
  .spot .stage, .spot canvas { width: 150px; height: 210px; }
  .spot .stage::after { width: 110px; height: 22px; }
  .band h2 { font-size: 24px; }
  .wilson .portrait img { width: 96px; height: 96px; }
}
