/*
 * =============================================================================
 * NOTTWORKS — REFERENCE LOGOS CONTINUOUS STRIP
 * assets/css/logo-strip.css
 *
 * Clean white horizontal reference logos continuous loop:
 * - Mathematical Ink Navy (#111827) monochrome resting appearance via SVG filter
 * - Subtle 280ms reveal of original brand colors on mouse hover
 * - Touch device brief interactive color reveal via .is-touch-active
 * - Strict non-distortion preservation of logo proportions (480x160 -> 126x42 / 96x32)
 * - Pause on hover/focus-within and prefers-reduced-motion
 * =============================================================================
 */

.nw-logos {
  background-color: #ffffff;
  border-top: 1px solid rgba(17, 24, 39, 0.06);
  border-bottom: 1px solid rgba(17, 24, 39, 0.06);
  padding: 28px 0;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
}

/* Desktop first-viewport composition: vertical height clamped and vertically centered */
@media (min-width: 1025px) {
  .nw-logos {
    height: var(--nw-logos-height-desktop, 92px);
    min-height: var(--nw-logos-height-desktop, 92px);
    padding: 0;
    display: flex;
    align-items: center;
  }
}

.nw-logos__inner {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.nw-logos__heading {
  flex-shrink: 0;
  max-width: 240px;
  border-right: 1px solid rgba(17, 24, 39, 0.08);
  padding-right: 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.nw-logos__heading .nw-label {
  margin-bottom: 5px;
  align-self: flex-start;
}

.nw-logos__title {
  font-size: var(--text-sm, 0.875rem);
  font-weight: var(--weight-semibold, 600);
  color: var(--color-ink-navy, #111827);
  margin: 0;
  line-height: 1.25;
}

.nw-logos__marquee-wrapper {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  position: relative;
  /* Smooth dissolve effect preserved, starting tightly against the divider line */
  mask-image: linear-gradient(to right, transparent 0px, #000 28px, #000 calc(100% - 48px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0px, #000 28px, #000 calc(100% - 48px), transparent 100%);
}

.nw-logos__track {
  display: flex;
  width: max-content;
  animation: nw-marquee 42s linear infinite;
  animation-play-state: paused;
  will-change: transform;
}

.nw-logos__track.is-loaded {
  animation-play-state: running;
}

@media (scripting: none) {
  .nw-logos__track {
    animation-play-state: running !important;
  }
}

.nw-logos__group {
  display: flex;
  align-items: center;
  gap: clamp(2.5rem, 4vw, 3.75rem);
  padding-right: clamp(2.5rem, 4vw, 3.75rem);
}

/* =============================================================================
   LOGO ITEM & DUAL-LAYER PRESENTATION FRAME
   ============================================================================= */

.nw-logo-item {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  outline: none;
  cursor: default;
  border-radius: var(--radius-sm, 6px);
  padding: 2px 4px;
  box-sizing: border-box;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

.nw-logo-frame {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  width: auto;
  box-sizing: border-box;
  transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

.nw-logo-img {
  display: block;
  height: 36px;
  width: auto;
  max-width: 135px;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
  transition: opacity 280ms cubic-bezier(0.16, 1, 0.3, 1), transform 280ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

/* Default State: Mathematical Monochrome Ink Navy (#111827) Presentation */
.nw-logo-img--mono {
  position: relative;
  opacity: 0.92;
  filter: grayscale(100%) brightness(0.25) sepia(100%) hue-rotate(185deg) saturate(300%);
  filter: url('#nw-ink-navy-monochrome');
  z-index: 1;
}

/* Original Brand Color Layer (Transparent at Rest for Mono, Fully Opaque for Standalone) */
.nw-logo-img--color {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 2;
}

.nw-logo-img--standalone {
  position: relative;
  opacity: 1 !important;
  z-index: 1;
}

/* Desktop Hover: Smooth 280ms Color Reveal */
@media (hover: hover) and (pointer: fine) {
  .nw-logo-item:hover .nw-logo-img--color {
    opacity: 1;
  }

  .nw-logo-item:hover .nw-logo-img--mono {
    opacity: 0;
  }

  .nw-logo-item:hover .nw-logo-frame {
    transform: scale(1.05);
  }
}

/* Touch Device Interactive Reveal State */
.nw-logo-item.is-touch-active .nw-logo-img--color {
  opacity: 1 !important;
}

.nw-logo-item.is-touch-active .nw-logo-img--mono {
  opacity: 0 !important;
}

.nw-logo-item.is-touch-active .nw-logo-frame {
  transform: scale(1.05);
}

/* =============================================================================
   INFINITE RIGHT-TO-LEFT MARQUEE ANIMATION
   ============================================================================= */

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

/* =============================================================================
   RESPONSIVE BREAKPOINTS (Mobile & Tablet)
   ============================================================================= */

@media (max-width: 768px) {
  /* Concept B: Reference logos are integrated into the translucent glass strip at the bottom of the hero on mobile */
  .nw-logos {
    display: none !important;
  }
}

/* Accessibility: Respect Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
  .nw-logos__track {
    animation: none;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
  }

  .nw-logo-img,
  .nw-logo-frame,
  .nw-logo-item {
    transition-duration: 0.01ms !important;
  }
}
