/* Operation Serval — /credits/ only, loaded from the page via $headExtra.
 *
 * A colophon, laid out as a spec sheet: a numbered spine on the left naming
 * each record, the record itself on the right. Nothing here is new vocabulary —
 * Bebas display, Chakra Petch stencil labels, JetBrains Mono for machine
 * values, square hairline panels and the amber accent are the same ones the
 * rest of the site is built from. The page reads differently because of
 * hierarchy and rhythm, not because it borrowed another site's look.
 *
 * The old version was four identical grey boxes in an auto-fit grid: every
 * heading the same 12px, every body the same 14px, and a third of the width
 * left empty. Scale is what it was missing.
 *
 * All selectors are prefixed `.cr-` and scoped under `.cr-page`; nothing here
 * is used by another page.
 */

/* --- Hero ----------------------------------------------------------------
   The title is the largest type on the site outside the home hero, and the
   watermark behind it is the same word at display scale, barely lit. It is
   decorative: aria-hidden in the markup, and clipped rather than allowed to
   widen the page. */
.cr-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-bottom: clamp(28px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(36px, 5vw, 64px);
}
.cr-hero-mark {
  position: absolute;
  z-index: -1;
  top: 50%;
  right: -.22em;
  transform: translateY(-52%);
  font-family: var(--f-display);
  font-size: clamp(120px, 21vw, 300px);
  line-height: .8;
  letter-spacing: .02em;
  color: transparent;
  /* Faint enough to read as texture, not as the word a second time — and bled
     off the right edge for the same reason. */
  -webkit-text-stroke: 1px rgba(232, 227, 214, .032);
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
}
.cr-title {
  font-family: var(--f-display);
  font-size: clamp(54px, 10vw, 132px);
  font-weight: 700;
  line-height: .86;
  letter-spacing: .01em;
  margin-top: 14px;
}
.cr-lede {
  max-width: 46ch;
  margin-top: clamp(18px, 2.4vw, 26px);
  color: var(--ink-soft);
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.65;
  text-wrap: pretty;
}
.cr-body + .cr-body { margin-top: 14px; }

/* --- Records -------------------------------------------------------------
   One hairline between records and none around them: the old cards drew four
   boxes to say "these are four things", which the numbers already say. */
.cr-rec {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: clamp(18px, 3vw, 44px);
  padding: clamp(30px, 4.5vw, 58px) 0;
  border-top: 1px solid var(--line-soft);
}
.cr-rec:first-child { border-top: 0; padding-top: 0; }

/* Sticky so the number and name stay beside the record while it is being
   read — the label belongs to the block, it is not a nav. */
.cr-spine {
  position: sticky;
  top: calc(var(--header-h) + 18px);
  align-self: start;
}
.cr-num {
  display: block;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--amber);
  padding-left: 11px;
  border-left: 2px solid var(--amber);
  line-height: 1.1;
}
.cr-rec-title {
  margin-top: 12px;
  font-family: var(--f-display);
  font-size: clamp(26px, 3.2vw, 42px);
  font-weight: 700;
  line-height: .95;
  letter-spacing: .015em;
  color: var(--ink);
  text-wrap: balance;
}
.cr-rec-body { min-width: 0; }
.cr-body {
  max-width: 64ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
  text-wrap: pretty;
}

/* --- The byline ----------------------------------------------------------
   A machine-readable card rather than a sentence in the flow: it is the one
   line on the page naming a person, and the amber edge is the site's marker
   for "this one is current" (back-office nav, active build). */
.cr-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin-top: 24px;
  padding: 15px 18px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-left: 2px solid var(--amber);
  font-family: var(--f-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted-2);
}
.cr-byline-role {
  color: var(--muted-2);
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 10px;
}
.cr-byline-who { color: var(--ink); font-size: 13px; }
.cr-byline a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--amber-line-strong);
  text-underline-offset: 3px;
  transition: color .15s ease;
}
.cr-byline a:hover,
.cr-byline a:focus-visible { color: var(--amber); }
.cr-handle { color: var(--muted-2); }

/* --- Attribution rows ----------------------------------------------------
   Model credits and third-party assets are the same shape — a thing on the
   left, what it is in the middle, its licence on the right — so they are one
   component. The dotted leader carries the eye across to the licence, which is
   the column that actually matters on a credits page. */
.cr-list {
  list-style: none;
  margin-top: 26px;
  border-top: 1px solid var(--line-faint);
}
.cr-item {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 15px 2px;
  border-bottom: 1px solid var(--line-faint);
  transition: background .18s ease, padding-left .18s ease;
}
.cr-item:hover { background: rgba(232, 227, 214, .022); padding-left: 8px; }

/* The CC roundels, at a size that reads as a stamp rather than as noise.
   Decorative: the licence is named in text at the end of the same row. */
.cr-marks {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 3px;
  font-size: 16px;
  color: var(--muted-4);
  transition: color .18s ease;
}
.cr-item:hover .cr-marks { color: var(--muted-2); }

.cr-item-name {
  flex: 0 0 auto;
  font-family: var(--f-stencil);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.cr-lead {
  flex: 1 1 40px;
  min-width: 24px;
  align-self: center;
  height: 0;
  border-bottom: 1px dotted var(--muted-3);
}
.cr-item-meta {
  flex: 0 1 auto;
  font-family: var(--f-mono);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted-2);
  text-align: right;
}
.cr-item-meta a,
.cr-item-name a {
  color: #8f8869;
  text-decoration: underline;
  text-decoration-color: rgba(143, 136, 105, .4);
  text-underline-offset: 2px;
  transition: color .15s ease, text-decoration-color .15s ease;
}
.cr-item-meta a:hover,
.cr-item-meta a:focus-visible,
.cr-item-name a:hover,
.cr-item-name a:focus-visible {
  color: var(--amber);
  text-decoration-color: var(--amber-line-strong);
}

/* The licence, as a chip — the one value a reader is scanning for. */
.cr-lic {
  flex: 0 0 auto;
  min-width: 84px;
  text-align: center;
  padding: 4px 10px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: .05em;
  color: var(--muted-2);
  border: 1px solid var(--line-soft);
  text-decoration: none;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
a.cr-lic:hover,
a.cr-lic:focus-visible {
  color: var(--amber);
  border-color: var(--amber-line);
  background: rgba(232, 163, 23, .06);
}

/* Each typeface set in its own face. They are all already loaded by
   fonts.css, and a colophon that lists five fonts in a sixth is a wasted
   opportunity. Sizes are nudged per family so they read as one line. */
.cr-faces {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 9px;
  justify-content: flex-end;
}
.cr-face {
  font-size: 14px;
  color: var(--ink-soft);
  letter-spacing: .01em;
}
.cr-face-sep { color: var(--muted-3); }

.cr-empty {
  margin-top: 20px;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--muted-4);
}
.cr-note {
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--muted-2);
  line-height: 1.6;
}

/* --- Entrance ------------------------------------------------------------
   `mfade` is the site's existing fade-and-rise (base.css). Staggered by
   record, on load rather than on scroll: the page is four short records and a
   scroll-driven timeline would leave the last one half-faded on a viewport
   tall enough to show it without scrolling. */
.cr-hero,
.cr-rec { animation: mfade .55s cubic-bezier(.2, .7, .3, 1) both; }
.cr-rec:nth-child(1) { animation-delay: .06s; }
.cr-rec:nth-child(2) { animation-delay: .12s; }
.cr-rec:nth-child(3) { animation-delay: .18s; }
.cr-rec:nth-child(4) { animation-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  .cr-hero,
  .cr-rec { animation: none; }
  .cr-item,
  .cr-marks,
  .cr-lic { transition-duration: .01ms; }
  .cr-item:hover { padding-left: 2px; }
}

/* --- Narrow --------------------------------------------------------------
   The spine stops being a gutter and becomes a heading above its record. */
@media (max-width: 880px) {
  .cr-rec { grid-template-columns: 1fr; gap: 16px; }
  .cr-spine { position: static; }
  .cr-rec-title { margin-top: 8px; }
}
@media (max-width: 620px) {
  .cr-item { gap: 6px 10px; }
  /* The leader needs two solid columns either side of it to be worth drawing;
     under ~600px the row wraps and it would dangle mid-line. */
  .cr-lead { display: none; }
  /* Reorder rather than restack: the licence belongs beside the name it
     applies to, and letting it fall below the source line put it alone on a
     third row with the row above ending short. */
  .cr-lic { order: 1; margin-left: auto; }
  .cr-item-meta { order: 2; text-align: left; flex-basis: 100%; }
  .cr-faces { justify-content: flex-start; }
}
