/* Logo score on the sheet (direction B §4.3 C): six violet-deep lines, the 41 marks sitting on them like notes on tablature.
   js/score.js renders the marks and their motion; this file owns their look. A line is a row of slots: a line segment, then a
   mark cell whose 12px sides break the line around the mark. */
.score {
  --step: 72px;
  --lift: 3px;
  --break: 12px;
  --label-gap: 8px;
  position: relative;
  width: 100%;
  overflow-x: clip;
}
@media (max-width: 639px) {
  .score {
    --step: 52px;
  }
}
/* In a network section the score runs to the screen edge at every width, as the old --bleed did: past --page the section's frame
   padding widens with the screen, and a --frame margin cannot cancel it here (its 100% would resolve against the section's already
   inset box), so the reach is written in viewport units, the way the reel's edge is (css/home.css). */
.network .score {
  width: auto;
  margin-inline: calc(-1 * max(var(--margin), (100vw - var(--page)) / 2));
}

.score__row {
  position: relative;
  display: flex;
  align-items: center;
  height: var(--step);
}
/* The engine's string for the line: straight and unseen until plucked, then it sounds in the line's own colour. */
.score .score__str {
  --amax: 4;
  --crest: var(--violet-deep);
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
}
.score .score__str .string__svg {
  opacity: min(1, calc(var(--p, 0) * 40));
}
.score .score__str path {
  stroke-width: 1px;
}
.score__track {
  flex: none;
  display: flex;
  align-items: stretch;
  will-change: transform;
  animation: score-drift var(--dur) linear infinite;
}
/* The drift runs one whole copy: js/score.js measures that copy from the row the score fills and puts its width in --shift, so the
   track's second copy lands exactly where the first began and the loop wraps on its own pattern at any row width. */
@keyframes score-drift {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-1 * var(--shift)));
  }
}
.score__row.is-paused .score__track,
.score.is-offscreen .score__track {
  animation-play-state: paused;
}

.score__slot {
  display: flex;
  align-items: center;
  flex: none;
}
.score__seg {
  flex: none;
  align-self: center;
  height: 1px;
  background: var(--violet-deep);
  opacity: 0.7;
}
.score__cell {
  position: relative;
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  box-sizing: border-box;
}
.score__lift {
  position: relative;
  display: block;
  transition: transform var(--micro) var(--ease-tick);
}
.score__cell.is-on .score__lift {
  transform: translateY(calc(-1 * var(--lift)));
}

.mark {
  display: block;
  width: 100%;
  height: 100%;
  background: currentColor;
  color: var(--sheet-ink);
  -webkit-mask: var(--mark-src) center / contain no-repeat;
  mask: var(--mark-src) center / contain no-repeat;
  transition: color var(--micro) linear;
}
.mark:focus-visible,
.score__cell.is-on .mark {
  color: var(--violet-deep);
}
.mark:focus-visible {
  outline: none;
}

.score__label {
  position: absolute;
  top: calc(100% + var(--label-gap));
  left: 50%;
  translate: -50% 0;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.3;
  color: var(--violet-deep);
  font-variation-settings:
    'wdth' 100,
    'wght' 650;
}
.score__cell.is-on .score__label {
  animation: score-label var(--micro) linear both;
}
@keyframes score-label {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* On night (the music hub, .score--night): violet lines, night-ink marks, the engaged mark and its string vermilion. Home's sheet values above stay as they are. */
.score--night .score__str {
  --crest: var(--vermilion);
}
.score--night .score__seg {
  background: var(--violet);
  opacity: 0.55;
}
.score--night .mark {
  color: color-mix(in oklab, var(--night-ink) 78%, var(--night));
}
.score--night .mark:focus-visible,
.score--night .score__cell.is-on .mark {
  color: var(--vermilion);
}
.score--night .score__label {
  color: var(--night-ink);
}

/* Reduced motion: no drift, no lift; each line shows its marks once and wraps. */
.score[data-static] .score__row {
  height: auto;
  min-height: var(--step);
}
.score[data-static] .score__track {
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: wrap;
  row-gap: 32px;
  animation: none;
  padding: 0 var(--margin);
}
.score[data-static] .score__slot {
  display: contents;
}
.score[data-static] .score__seg {
  flex: 1 1 24px;
}
.score[data-static] .score__cell.is-on .score__lift {
  transform: none;
}
