/* Home: annotated plate over the hero engraving */

.plate {
  position: absolute;
  inset: 0;
  display: none;
  pointer-events: none;
}

.is-live .plate {
  display: block;
}

.plate-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.lead {
  opacity: 0;
  transition: opacity 120ms linear 150ms;
}

.lead.is-on {
  opacity: 1;
  transition: none;
}

.lead path {
  fill: none;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  stroke-linecap: round;
  transition: stroke-dashoffset 0s linear 400ms;
}

.lead.is-on path {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 650ms cubic-bezier(0.3, 0, 0.2, 1) 400ms;
}

.lead-case {
  stroke: var(--p-color-ink-0);
  stroke-width: 6;
}

.lead-ink {
  stroke: var(--p-color-ink-950);
  stroke-width: 2;
}

.pin-case,
.pin {
  transform: scale(0);
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0s linear 400ms;
}

.pin-case {
  fill: var(--p-color-ink-0);
}

.pin {
  fill: var(--p-color-ink-950);
}

.lead.is-on .pin-case,
.lead.is-on .pin {
  transform: none;
  transition: transform 220ms var(--p-motion-easing-snap) 400ms;
}

.note {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  justify-items: start;
  gap: var(--p-space-1);
  width: max-content;
  max-width: min(19rem, 58%);
  padding: var(--p-space-2) var(--p-space-3) var(--p-space-3);
  border: 2px solid var(--p-color-ink-950);
  background: var(--surface-base);
  color: var(--text-primary);
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 120ms linear 150ms,
    transform 120ms linear 150ms;
}

.note.is-on {
  opacity: 1;
  transform: none;
  transition:
    opacity 120ms linear 800ms,
    transform 250ms var(--p-motion-easing-snap) 800ms;
}

/* Text shows only while its backing is fully opaque. */
.note > span {
  opacity: 0;
  transition: opacity 150ms linear;
}

.note.is-on > span {
  opacity: 1;
  transition: opacity 150ms linear 920ms;
}

.note-name {
  padding: 0.12em 0.3em 0.06em;
  background: var(--field);
  color: var(--on-field);
  font-family: var(--p-font-family-poster);
  font-size: var(--p-font-size-xs);
  font-stretch: var(--p-font-width-wide);
  font-weight: var(--p-font-weight-black);
  line-height: 1;
}

.note-figure {
  font-family: var(--p-font-family-poster);
  font-size: clamp(1.25rem, 0.8rem + 1.8vw, 2.75rem);
  font-stretch: var(--p-font-width-condensed);
  font-weight: var(--p-font-weight-black);
  line-height: 1;
  white-space: nowrap;
}

.note-text {
  font-size: var(--p-font-size-2xs);
  line-height: var(--p-font-leading-snug);
  text-wrap: pretty;
}

.note-short {
  display: none;
}

.hero .strips li {
  position: relative;
}

.hero .strips li::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -4px;
  left: 0;
  height: 4px;
  background: var(--text-primary);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 300ms var(--p-motion-easing-snap);
}

.hero .strips li.is-active::after,
.hero .strips li:hover::after,
.hero .strips li:focus-within::after {
  transform: none;
}

.plate-pause {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 4.5rem;
  min-height: 36px;
  padding: var(--p-space-2) var(--p-space-3);
  border: 0;
  background: var(--surface-base);
  color: var(--text-primary);
  font: inherit;
  font-size: var(--p-font-size-xs);
  font-weight: var(--p-font-weight-bold);
  cursor: pointer;
}

.plate-pause:hover {
  text-decoration: underline;
  text-decoration-thickness: var(--link-underline-width);
  text-underline-offset: var(--link-underline-offset);
}

.plate-pause[hidden] {
  display: none;
}

@media (max-width: 600px) {
  .note {
    max-width: min(14rem, 52%);
    padding: var(--p-space-1) var(--p-space-2) var(--p-space-2);
  }

  .note-text {
    font-size: 0.6875rem;
  }

  .note-long {
    display: none;
  }

  .note-short {
    display: inline;
  }

  .plate-pause {
    min-height: 32px;
    padding: var(--p-space-1) var(--p-space-2);
  }
}
