/* Static, readable highlights are the default if JS or animation is unavailable. */
.ticker-window {
  margin-right: 0;
}

.ticker-track {
  width: 100%;
  animation: none;
  transform: none;
}

.ticker-group:first-child {
  width: 100%;
  min-width: 0;
  min-height: 0;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
  padding: 18px 20px;
}

.ticker-group:first-child > span {
  gap: 12px;
  padding: 0;
  white-space: normal;
}

.ticker-group:first-child > span:last-child::after {
  display: none;
}

.ticker-group:not(:first-child),
.ticker-pause,
.ticker-toggle {
  display: none;
}

/* JS measures one natural-width cycle, then adds enough copies to cover the
   window throughout its travel. Each diamond sits on a label's left edge;
   equal padding puts the text halfway between it and the next diamond. */
@media (prefers-reduced-motion: no-preference) {
  .intro-strip:is(.ticker-preparing, .ticker-ready) .ticker-window {
    margin-right: 62px;
  }

  .intro-strip:is(.ticker-preparing, .ticker-ready) .ticker-track {
    width: max-content;
  }

  .intro-strip:is(.ticker-preparing, .ticker-ready) .ticker-group {
    display: flex;
    flex: 0 0 auto;
    width: max-content;
    min-width: 0;
    min-height: 72px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 0;
    padding: 0;
  }

  .intro-strip:is(.ticker-preparing, .ticker-ready) .ticker-group > span {
    position: relative;
    display: block;
    padding: 0 23px;
    white-space: nowrap;
  }

  .intro-strip:is(.ticker-preparing, .ticker-ready) .ticker-group > span::after {
    display: none;
  }

  .intro-strip:is(.ticker-preparing, .ticker-ready) .ticker-group > span::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 7px;
    height: 7px;
    background: var(--gold);
    transform: translate(-50%, -50%) rotate(45deg);
  }

  .intro-strip.ticker-ready .ticker-track {
    animation: refined-ticker-left var(--ticker-duration, 34s) linear infinite;
  }

  .intro-strip.ticker-ready .ticker-pause {
    display: block;
  }

  .intro-strip.ticker-ready .ticker-toggle {
    display: grid;
  }

  @keyframes refined-ticker-left {
    to { transform: translateX(calc(0px - var(--ticker-distance))); }
  }

  @media (max-width: 700px) {
    .intro-strip:is(.ticker-preparing, .ticker-ready) .ticker-group {
      min-height: 66px;
    }

    .intro-strip:is(.ticker-preparing, .ticker-ready) .ticker-group > span {
      padding-inline: 20px;
    }
  }
}

/* The existing button remains the lightbox trigger; the photo keeps its
   16:9 frame, while its original caption now flows underneath on the section. */
.gallery-grid {
  row-gap: 24px;
}

.gallery-item,
.gallery-large,
.gallery-tall,
.gallery-medium {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: auto;
  aspect-ratio: auto;
  background: transparent;
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  clip-path: inset(0);
  transition: transform .8s cubic-bezier(.2,.65,.2,1),
              clip-path .8s cubic-bezier(.2,.65,.2,1), filter .5s;
}

.gallery-overlay {
  position: static;
  width: 100%;
  padding: 8px 0 0;
  border: 0;
  background: transparent;
  gap: 2px;
}

.gallery-overlay > span {
  font-size: 9px;
  line-height: 1.4;
}

.gallery-overlay strong {
  font-size: 16px;
  line-height: 1.3;
}

/* Match the existing 1.045 zoom with an equal inset so it stays inside the
   image frame instead of spilling over the caption. */
.gallery-item:focus-visible img {
  clip-path: inset(2.1531%);
}

@media (hover: hover) and (pointer: fine) {
  .gallery-item:hover img {
    clip-path: inset(2.1531%);
  }
}

@media (max-width: 700px) {
  .gallery-grid { row-gap: 20px; }
  .gallery-overlay > span { font-size: 8px; }
  .gallery-overlay strong { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-item:hover img,
  .gallery-item:focus-visible img {
    clip-path: none;
  }
}
