/* The mods page: Smokey Studio's two mods, one row each. Each has a picture of its own (RailCom Pro's radio
   display, a string of Holiday Lights); everything else is quiet. */

.mods-page {
  width: min(var(--content), calc(100% - var(--gutter) * 2));
  margin: 0 auto;
  padding: clamp(36px, 7vw, 84px) 0 96px;
}

.mods-head h1 {
  font: 800 clamp(46px, 7.4vw, 88px) / 0.95 var(--display);
  font-stretch: 82%;
  letter-spacing: -0.02em;
}

.mods-lead {
  max-width: 32em;
  margin-top: 18px;
  color: var(--haze);
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.5;
}

.mods-list {
  display: grid;
  gap: 22px;
  margin-top: clamp(32px, 5vw, 52px);
}

.mod {
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
}

.mod h2 {
  font: 780 clamp(30px, 3.6vw, 40px) / 1.05 var(--display);
  font-stretch: 86%;
}

.mod h2 a {
  color: inherit;
  text-decoration: none;
}

.mod h2 a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.mod-pitch {
  margin-top: 8px;
  color: var(--moon);
  font-size: 18px;
  line-height: 1.45;
}

/* How many times it's been downloaded from RailroaderHub. */
.mod-count {
  margin-top: 10px;
  color: var(--haze);
  font-size: 15px;
}

.mod-count b {
  margin-right: 2px;
  color: var(--amber);
  font: 760 22px / 1 var(--display);
  font-stretch: 88%;
  font-variant-numeric: tabular-nums;
}

.mod-new {
  max-width: 34em;
  margin-top: 10px;
  color: var(--haze);
  font-size: 15px;
  line-height: 1.5;
}

.mod-new b {
  color: var(--moon);
  font-weight: 700;
}

.mod-new a {
  color: var(--moon);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}

.mod-new a:hover {
  text-decoration-color: currentColor;
}

.mod-facts {
  display: grid;
  gap: 6px;
  margin: 16px 0 0;
  padding-left: 20px;
  color: var(--haze);
  line-height: 1.5;
}

.mod-facts a {
  color: var(--moon);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}

.mod-facts a:hover {
  text-decoration-color: currentColor;
}

.mod-facts li::marker {
  color: var(--pink);
}

.mod-get {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin-top: 22px;
}

.mod-get svg {
  width: 19px;
  height: 19px;
}

.mod-note {
  margin-top: 10px;
  color: var(--dim);
  font-size: 15px;
}

/* RailCom Pro's picture: the handheld radio's display, on channel 1 with someone talking. */
.mod-art-radio {
  justify-self: center;
  width: min(280px, 100%);
  padding: 18px;
  border-radius: 26px;
  background: linear-gradient(160deg, #2b2058, #1a1238 70%);
  box-shadow: inset 0 0 0 1px rgba(196, 176, 255, 0.2), 0 22px 50px rgba(4, 2, 14, 0.45);
}

.mod-lcd {
  padding: 14px 16px 12px;
  border-radius: 12px;
  background: radial-gradient(120% 140% at 20% 0%, #3a2a08, #150e03 70%);
  box-shadow: inset 0 0 0 1px rgba(255, 195, 92, 0.25), inset 0 6px 18px rgba(0, 0, 0, 0.55);
  color: var(--amber);
  font-family: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-shadow: 0 0 10px rgba(255, 195, 92, 0.55);
}

.mod-lcd-top,
.mod-lcd-talk {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mod-lcd-top {
  align-items: baseline;
  justify-content: space-between;
}

.mod-lcd-ch {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}

.mod-lcd-talk {
  margin-top: 10px;
}

.mod-lcd-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 15px;
}

.mod-lcd-bars i {
  width: 4px;
  border-radius: 1px;
  background: currentColor;
  transform-origin: bottom;
  animation: mod-talk 1.1s ease-in-out infinite;
}

.mod-lcd-bars i:nth-child(1) { height: 30%; animation-delay: -0.2s; }
.mod-lcd-bars i:nth-child(2) { height: 70%; animation-delay: -0.5s; }
.mod-lcd-bars i:nth-child(3) { height: 100%; animation-delay: -0.8s; }
.mod-lcd-bars i:nth-child(4) { height: 55%; animation-delay: -0.1s; }

@keyframes mod-talk {
  0%,
  100% {
    transform: scaleY(0.35);
  }

  50% {
    transform: scaleY(1);
  }
}

/* Holiday Lights' picture: a string of bulbs (web/tools/make_lights.py), twinkling in two sets, in turn. */
.mod-art-lights {
  justify-self: center;
  width: min(320px, 100%);
}

.mod-strand-art {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.mod-strand-art .lights-a,
.mod-strand-art .lights-b {
  animation: mod-twinkle 3.4s ease-in-out infinite;
}

.mod-strand-art .lights-b {
  animation-delay: -1.7s;
}

@keyframes mod-twinkle {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mod-lcd-bars i,
  .mod-strand-art .lights-a,
  .mod-strand-art .lights-b {
    animation: none;
  }
}

.mods-before {
  margin-top: clamp(48px, 7vw, 80px);
}

.mods-before h2 {
  font: 750 clamp(24px, 3vw, 30px) / 1.15 var(--display);
  font-stretch: 88%;
}

.mods-before p {
  max-width: 44em;
  margin-top: 10px;
  color: var(--haze);
  line-height: 1.6;
}

.mods-before a {
  color: var(--moon);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}

.mods-before a:hover {
  text-decoration-color: currentColor;
}

@media (max-width: 760px) {
  .mod {
    grid-template-columns: 1fr;
  }

  .mod-art-radio {
    width: min(240px, 100%);
  }
}

.mods-lead a {
  color: var(--moon);
  text-underline-offset: 3px;
}
