/* ==========================================================================
   Homepage — Our Clients (trusted brands marquee)
   ========================================================================== */

.htb {
  --htb-ink: #061b2c;
  --htb-muted: #5a7086;
  --htb-line: #e8edf3;
  --htb-surface: #ffffff;
  --htb-bg: #f7f9fc;
  --htb-card-w: 180px;
  --htb-card-h: 90px;
  --htb-gap: 18px;
  background: var(--htb-bg);
  color: var(--htb-ink);
  font-family: "Outfit", "Outfit Placeholder", sans-serif;
  padding: clamp(52px, 6vw, 72px) 0 clamp(48px, 5.5vw, 64px);
}

.htb-inner {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  text-align: center;
}

.htb-head {
  max-width: min(1120px, 100%);
  margin: 0 auto clamp(32px, 4.5vw, 48px);
  text-align: center;
}

.htb-eyebrow {
  margin: 0 0 14px;
  color: #0b66c3;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
  text-align: center;
}

.htb-head h2 {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.3em;
  width: 100%;
  max-width: min(1120px, 100%);
  margin: 0 auto 14px;
  font-size: clamp(1.55rem, 2.8vw, 2.1rem);
  font-weight: 700 !important;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--htb-ink);
  text-align: center;
  white-space: nowrap;
}

.htb-head h2 span {
  display: inline;
  margin-left: 0;
  background: linear-gradient(100deg, #0b66c3 5%, #8fc5ff 52%, #c9a8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.htb-intro {
  width: 100%;
  max-width: 54ch;
  margin: 0 auto;
  padding: 0 4px;
  text-align: center;
  color: var(--htb-muted);
  font-size: clamp(0.94rem, 2.8vw, 1.06rem);
  line-height: 1.65;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}

.htb-marquee {
  position: relative;
  margin: 0 auto;
  max-width: 100%;
}

.htb-marquee-viewport {
  overflow: hidden;
  padding: 8px clamp(12px, 2vw, 24px) 28px;
  cursor: grab;
  touch-action: pan-y;
  outline: none;
}

.htb-marquee-viewport.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.htb-track {
  display: flex;
  gap: var(--htb-gap);
  width: max-content;
  will-change: transform;
}

.htb-group {
  display: flex;
  align-items: stretch;
  gap: var(--htb-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.htb-card {
  flex: 0 0 auto;
}

.htb-card-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: var(--htb-card-w);
  height: var(--htb-card-h);
  padding: 22px 28px;
  border: 1px solid var(--htb-line);
  border-radius: 14px;
  background: var(--htb-surface);
  box-shadow: 0 6px 24px rgba(7, 31, 61, 0.05);
  text-decoration: none;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.htb-card-link:focus-visible {
  outline: 2px solid #0b66c3;
  outline-offset: 3px;
}

.htb-card-link:hover,
.htb-card-link:focus-visible {
  border-color: #d5e0ec;
  box-shadow: 0 10px 28px rgba(7, 31, 61, 0.08);
  transform: translateY(-1px);
}

.htb-card-link picture,
.htb-card-link img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.htb-card-link img {
  filter: grayscale(1);
  opacity: 0.6;
  transition:
    filter 0.3s ease,
    opacity 0.3s ease;
}

.htb-card-link:hover img,
.htb-card-link:focus-visible img {
  filter: none;
  opacity: 1;
}

.htb-card-hint {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 2;
  width: max-content;
  max-width: 220px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #061b2c;
  color: #f4f8fc;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.01em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 6px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.htb-card-hint::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 8px;
  height: 8px;
  background: #061b2c;
  transform: translate(-50%, -4px) rotate(45deg);
}

.htb-card-link:hover .htb-card-hint,
.htb-card-link:focus-visible .htb-card-hint {
  opacity: 1;
  transform: translate(-50%, 0);
}

.htb-marquee-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  width: clamp(28px, 5vw, 72px);
  pointer-events: none;
}

.htb-marquee-fade--left {
  left: 0;
  background: linear-gradient(90deg, var(--htb-bg) 15%, rgba(247, 249, 252, 0));
}

.htb-marquee-fade--right {
  right: 0;
  background: linear-gradient(270deg, var(--htb-bg) 15%, rgba(247, 249, 252, 0));
}

.htb-proof {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  margin: clamp(20px, 3vw, 28px) 0 0;
  color: var(--htb-muted);
  font-size: clamp(0.86rem, 1vw, 0.95rem);
  font-weight: 500;
  line-height: 1.5;
}

.htb-proof-sep {
  color: #9eb0c3;
  font-weight: 400;
}

.htb--reduced-motion .htb-marquee-viewport {
  overflow: visible;
  cursor: default;
  padding-bottom: 8px;
}

.htb--reduced-motion .htb-track {
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--htb-gap);
  width: 100%;
  transform: none !important;
}

.htb--reduced-motion .htb-group {
  flex-wrap: wrap;
  justify-content: center;
}

.htb--reduced-motion .htb-group[aria-hidden="true"] {
  display: none;
}

.htb--reduced-motion .htb-marquee-fade {
  display: none;
}

@media (max-width: 900px) {
  .htb {
    --htb-gap: 16px;
  }

  .htb-head h2 {
    flex-direction: column;
    align-items: center;
    white-space: normal;
  }

  .htb-head h2 span {
    display: block;
    text-align: center;
  }

  .htb-intro {
    max-width: 42ch;
    font-size: clamp(0.92rem, 3.4vw, 1.02rem);
  }
}

@media (max-width: 560px) {
  .htb-inner {
    width: min(1240px, calc(100% - 32px));
  }

  .htb {
    --htb-card-w: 168px;
    --htb-card-h: 84px;
    --htb-gap: 14px;
    padding-top: 44px;
    padding-bottom: 40px;
  }

  .htb-intro {
    max-width: 100%;
    padding: 0 2px;
    font-size: 0.94rem;
    line-height: 1.6;
  }

  .htb-card-link {
    padding: 18px 22px;
  }

  .htb-card-hint {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .htb-card-link,
  .htb-card-link img,
  .htb-card-hint {
    transition: none;
  }
}
