/* Component-only styles adapted from ../UI/breaking-news and ../UI/landscape-gallery. Standalone page styles are excluded. */
/* The ticker itself: a slender 7:1 broadcast ribbon. */
.ticker {
  position: relative;
  width: var(--ticker-width);
  aspect-ratio: 7 / 1;
  overflow: hidden;
  isolation: isolate;
  container-type: inline-size;
  border-radius: 2px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.14)),
    repeating-linear-gradient(115deg, transparent 0 22px, rgba(255, 255, 255, 0.035) 22px 23px),
    linear-gradient(180deg, var(--ticker-red-light) 0%, var(--ticker-red) 48%, var(--ticker-red-dark) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.24),
    0 2px 0 rgba(255, 255, 255, 0.08),
    0 26px 70px -26px rgba(233, 0, 30, 0.72),
    0 12px 28px -16px rgba(0, 0, 0, 0.9);
}

.ticker::before,
.ticker::after {
  position: absolute;
  inset-block: 0;
  z-index: 2;
  width: 7%;
  content: "";
  pointer-events: none;
}

.ticker::before {
  left: 0;
  background: linear-gradient(90deg, rgba(92, 0, 12, 0.24), transparent);
}

.ticker::after {
  right: 0;
  background: linear-gradient(270deg, rgba(92, 0, 12, 0.24), transparent);
}

.ticker__track {
  display: flex;
  align-items: center;
  width: max-content;
  height: 100%;
  animation: ticker-scroll var(--ticker-speed) linear infinite;
  will-change: transform;
}

.ticker__group {
  display: flex;
  flex: none;
  align-items: center;
  height: 100%;
}

.ticker__unit {
  display: inline-flex;
  flex: none;
  align-items: center;
  margin-right: clamp(34px, 5.1cqw, 68px);
  gap: clamp(14px, 2.3cqw, 28px);
  white-space: nowrap;
}

.ticker__dot {
  flex: none;
  width: clamp(8px, 1.05cqw, 14px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--ticker-white);
  box-shadow:
    0 0 0 clamp(3px, 0.5cqw, 6px) rgba(255, 255, 255, 0.22),
    0 0 16px rgba(255, 255, 255, 0.6);
  animation: live-pulse 2.1s ease-out infinite;
}

.ticker__text {
  font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(24px, 4.65cqw, 56px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(80, 0, 10, 0.18);
}

.ticker__slash {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(24px, 4.4cqw, 52px);
  font-weight: 300;
  line-height: 1;
  color: rgba(255, 255, 255, 0.48);
  transform: translateY(-0.03em) skewX(-12deg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes ticker-scroll {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(-50%, 0, 0);
  }
}

@keyframes live-pulse {
  0% {
    box-shadow:
      0 0 0 0 rgba(255, 255, 255, 0.38),
      0 0 16px rgba(255, 255, 255, 0.6);
  }

  70% {
    box-shadow:
      0 0 0 clamp(6px, 0.72cqw, 10px) rgba(255, 255, 255, 0),
      0 0 16px rgba(255, 255, 255, 0.6);
  }

  100% {
    box-shadow:
      0 0 0 0 rgba(255, 255, 255, 0),
      0 0 16px rgba(255, 255, 255, 0.6);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ticker__track {
    animation: none;
  }

  .ticker__dot {
    animation: none;
  }
}


/* The whole component is only this 5:2 display. */
.gallery {
  position: relative;
  width: min(1400px, 92vw);
  aspect-ratio: 5 / 2;
  overflow: hidden;
  isolation: isolate;
  border-radius: 0;
  background: #2a2722;
  box-shadow:
    0 0 0 1px rgba(23, 20, 17, 0.16),
    0 38px 90px -46px rgba(53, 38, 26, 0.6),
    0 20px 44px -32px rgba(53, 38, 26, 0.4);
  container-type: inline-size;
  cursor: grab;
  outline: none;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.gallery:focus-visible {
  box-shadow:
    0 0 0 2px var(--paper),
    0 0 0 4px var(--accent),
    0 38px 90px -46px rgba(53, 38, 26, 0.6);
}

.gallery.is-dragging {
  cursor: grabbing;
}

.gallery__viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
}

.gallery__track {
  display: flex;
  height: 100%;
  opacity: 0;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.gallery.is-ready .gallery__track {
  opacity: 1;
}

/* Slides */
.slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--slide-accent, #2a2722);
}

.slide__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  transform: scale(1.001);
  transition: opacity 0.5s var(--ease);
}

.slide__image.is-loaded {
  opacity: 1;
}

.slide__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(9, 9, 8, 0.34) 0%, transparent 19%, transparent 56%, rgba(9, 9, 8, 0.7) 100%),
    radial-gradient(ellipse 82% 62% at 50% 100%, rgba(5, 5, 4, 0.2), transparent 74%);
  pointer-events: none;
}

.slide__caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  padding: 0 clamp(22px, 4.3cqw, 46px) clamp(22px, 3.8cqw, 40px);
  color: var(--white);
  pointer-events: none;
}

.slide__category {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 250, 241, 0.62);
  font-family: var(--mono);
  font-size: clamp(7px, 1.05cqw, 10px);
  letter-spacing: 0.18em;
  line-height: 1.2;
}

.slide__category::before {
  width: clamp(16px, 1.9cqw, 22px);
  height: 1px;
  background: rgba(255, 250, 241, 0.46);
  content: "";
}

.slide__title {
  margin: clamp(8px, 1.2cqw, 13px) 0 clamp(7px, 1cqw, 10px);
  color: var(--white);
  font-family: var(--serif);
  font-size: clamp(30px, 5.7cqw, 62px);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 0.96;
  text-wrap: balance;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.2);
}

.slide__description {
  max-width: 44ch;
  margin: 0;
  color: rgba(255, 250, 241, 0.67);
  font-size: clamp(10px, 1.25cqw, 14px);
  line-height: 1.55;
}

/* Overlaid counter */
.gallery__top {
  position: absolute;
  z-index: 6;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: clamp(17px, 2.8cqw, 30px) clamp(17px, 3.4cqw, 34px);
  background: linear-gradient(180deg, rgba(9, 9, 8, 0.3), transparent);
  pointer-events: none;
}

.gallery__counter {
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: rgba(255, 250, 241, 0.9);
  font-family: var(--mono);
  font-size: clamp(9px, 1.05cqw, 11px);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.12em;
  line-height: 1;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.44);
}

.gallery__counter-sep {
  color: rgba(255, 250, 241, 0.38);
}

.gallery__grain {
  position: absolute;
  inset: 0;
  z-index: 7;
  background-image: var(--grain);
  opacity: 0.08;
  pointer-events: none;
  mix-blend-mode: soft-light;
}

.gallery__edge {
  position: absolute;
  inset: 10px;
  z-index: 8;
  border: 1px solid rgba(255, 250, 241, 0.12);
  border-radius: 0;
  pointer-events: none;
}


