/* Credentials marquee – horizontal scroll inside a crafted cultural frame */

.cred-marquee {
  margin-top: 0.35rem;
  max-width: 100%;
  overflow: hidden;
}

.cred-marquee__frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-card);
  border: 1px solid rgba(201, 169, 98, 0.28);
  background-color: var(--color-white);
  box-shadow:
    0 12px 40px rgba(45, 80, 22, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

/* Kanga-inspired border bands */
.cred-marquee__frame::before,
.cred-marquee__frame::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: 3;
  height: 5px;
  pointer-events: none;
  background: repeating-linear-gradient(
    90deg,
    var(--color-brand) 0,
    var(--color-brand) 10px,
    var(--color-gold) 10px,
    var(--color-gold) 20px,
    var(--color-brand-light) 20px,
    var(--color-brand-light) 30px,
    rgba(201, 169, 98, 0.45) 30px,
    rgba(201, 169, 98, 0.45) 40px
  );
  opacity: 0.42;
}

.cred-marquee__frame::before {
  top: 0;
}

.cred-marquee__frame::after {
  bottom: 0;
}

/* Textile lattice – subtle craft texture */
.cred-marquee__pattern {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 10px,
      rgba(201, 169, 98, 0.045) 10px,
      rgba(201, 169, 98, 0.045) 11px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 10px,
      rgba(38, 136, 72, 0.035) 10px,
      rgba(38, 136, 72, 0.035) 11px
    ),
    radial-gradient(
      ellipse at 18% 50%,
      rgba(38, 136, 72, 0.06) 0%,
      transparent 42%
    ),
    radial-gradient(
      ellipse at 82% 50%,
      rgba(201, 169, 98, 0.07) 0%,
      transparent 42%
    );
}

/* Corner brackets – safari-card craft language */
.cred-marquee__corner {
  position: absolute;
  width: 14px;
  height: 14px;
  z-index: 4;
  border: 1.5px solid rgba(201, 169, 98, 0.65);
  pointer-events: none;
}

.cred-marquee__corner--tl {
  top: 0.85rem;
  left: 0.85rem;
  border-right: none;
  border-bottom: none;
}

.cred-marquee__corner--br {
  right: 0.85rem;
  bottom: 0.85rem;
  border-left: none;
  border-top: none;
}

.cred-marquee__viewport {
  position: relative;
  z-index: 1;
  overflow: hidden;
  padding: clamp(1.35rem, 3vw, 1.85rem) 0 clamp(1.5rem, 3vw, 2rem);
  mask-image: linear-gradient(
    90deg,
    transparent 0%,
    #000 6%,
    #000 94%,
    transparent 100%
  );
}

.cred-marquee__track {
  display: flex;
  align-items: flex-start;
  gap: clamp(1.5rem, 3vw, 2.25rem);
  width: max-content;
  padding-inline: clamp(0.75rem, 2vw, 1.25rem);
  animation: cred-marquee-scroll 52s linear infinite;
}

.cred-marquee:hover .cred-marquee__track,
.cred-marquee:focus-within .cred-marquee__track {
  animation-play-state: paused;
}

@keyframes cred-marquee-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.cred-marquee__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  min-width: 5.75rem;
  padding: 0;
  background: transparent;
  border: none;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.cred-marquee__slot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5.75rem;
  height: 3.35rem;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-soft);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(201, 169, 98, 0.22);
  box-shadow:
    0 4px 14px rgba(45, 80, 22, 0.05),
    inset 0 0 0 1px rgba(255, 255, 255, 0.7);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.cred-marquee__item:hover .cred-marquee__slot,
.cred-marquee__item:focus-visible .cred-marquee__slot {
  transform: translateY(-2px);
  border-color: rgba(38, 136, 72, 0.28);
  box-shadow:
    0 10px 24px rgba(38, 136, 72, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.85);
}

.cred-marquee__logo {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  opacity: 0.92;
  filter: grayscale(0.1);
  transition:
    opacity 0.22s ease,
    filter 0.22s ease;
}

.cred-marquee__item:hover .cred-marquee__logo,
.cred-marquee__item:focus-visible .cred-marquee__logo {
  opacity: 1;
  filter: none;
}

.cred-marquee__logo--wide {
  max-height: 2.15rem;
  max-width: 5rem;
}

.cred-marquee__logo--emblem {
  max-height: 2.85rem;
  max-width: 2.85rem;
}

.cred-marquee__logo--emblem-crop {
  max-height: 2.85rem;
  max-width: 2.85rem;
  object-fit: cover;
  object-position: 78% center;
}

.cred-marquee__logo--compact {
  max-height: 2.55rem;
  max-width: 3.5rem;
  object-position: center top;
}

.cred-marquee__name {
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-align: center;
  color: var(--color-muted);
  line-height: 1.3;
  max-width: 6.5rem;
}

@media (min-width: 768px) {
  .cred-marquee__slot {
    width: 6.25rem;
    height: 3.5rem;
  }

  .cred-marquee__item {
    min-width: 6.25rem;
  }

  .cred-marquee__name {
    font-size: 0.625rem;
    max-width: 7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cred-marquee__track {
    animation: none;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
    gap: 1.25rem 1.75rem;
    padding-inline: 1rem;
  }

  .cred-marquee__viewport {
    mask-image: none;
  }

  .cred-marquee__slot,
  .cred-marquee__logo,
  .cred-marquee__item {
    transition: none;
  }
}
