/* ==========================================================
   Client Confidence section
   Renders via common_tpl/our_clients.php (home page)
   ========================================================== */

/* ---------------------------------------------------------
   Design tokens
--------------------------------------------------------- */
.confidence {
  --navy-900: #0e1b3d;
  --navy-700: #16265a;
  --blue-600: #2554eb;
  --blue-500: #3b6bf5;
  --ink: #1c2333;
  --muted: #5b6377;
  --line: #e6e9f2;
  --surface: #ffffff;
  --bg: #eef1f8;
  --panel: #ffffff;
  --focus: #1451e0;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(14, 27, 61, 0.06);
  --shadow-md: 0 8px 24px rgba(14, 27, 61, 0.08);
  --gap: 1.5rem;
  --maxw: 1200px;
}

.confidence img,
.confidence svg {
  display: block;
  max-width: 100%;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .confidence * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Visible focus ring everywhere; mouse users don't see it thanks to :focus-visible */
.confidence a:focus-visible,
.confidence button:focus-visible,
.confidence [tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------------------------------------------------------
   Section shell
--------------------------------------------------------- */
.confidence {
  padding: clamp(0.75rem, 1.5vw, 1.5rem) 1rem;
}

.confidence__card {
  max-width: var(--maxw);
  margin-inline: auto;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: clamp(1rem, 2vw, 1.75rem) clamp(1.25rem, 2.5vw, 2.5rem);
  position: relative;
  overflow: hidden;
}

/* Decorative world-map watermark, purely presentational */
.confidence__watermark {
  position: absolute;
  top: 0;
  right: 0;
  width: min(48%, 620px);
  height: 100%;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

.confidence__header {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-600);
  margin: 0 0 0.6rem;
  position: relative;
  padding-bottom: 0.6rem;
}

.eyebrow::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 2.25rem;
  height: 3px;
  background: var(--blue-600);
  border-radius: 2px;
}

.confidence__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.confidence__title strong {
  color: var(--navy-900);
  font-weight: 800;
}

.confidence__title span.rest {
  color: #4a5164;
  font-weight: 500;
}

.confidence__title .dot {
  color: var(--blue-600);
}

.confidence__lede {
  margin: 0;
  max-width: 44ch;
  color: var(--muted);
  font-size: 1rem;
}

.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--blue-600);
  text-decoration: none;
  border-bottom: 2px solid var(--blue-600);
  padding-bottom: 0.35rem;
  white-space: nowrap;
}

.cta-link:hover {
  color: var(--navy-900);
  border-color: var(--navy-900);
}

.cta-link svg {
  width: 1.1em;
  height: 1.1em;
  transition: transform 0.15s ease;
}

.cta-link:hover svg {
  transform: translateX(3px);
}

/* ---------------------------------------------------------
   Logo carousel
--------------------------------------------------------- */
.carousel {
  position: relative;
  z-index: 1;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0 3.25rem;
}

.carousel__viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.carousel__viewport::-webkit-scrollbar {
  display: none;
}

.carousel__track {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 1.75rem 0;
}

.carousel__item {
  flex: 0 0 auto;
  width: 180px;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.5rem;
  border-right: 1px solid var(--line);
}

.carousel__item:last-child {
  border-right: none;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  max-width: 100%;
}

.logo svg {
  flex: 0 0 auto;
}

.logo img {
  display: block;
  max-height: 40px;
  max-width: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.logo:hover img {
  opacity: 0.75;
}

.logo__text {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.logo__sub {
  display: block;
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--muted);
}

.carousel__btn {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--blue-600);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  z-index: 2;
}

.carousel__btn:hover {
  background: var(--blue-600);
  color: #fff;
}

.carousel__btn[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}

.carousel__btn[disabled]:hover {
  background: var(--surface);
  color: var(--blue-600);
}

.carousel__btn--prev {
  left: -1.375rem;
}

.carousel__btn--next {
  right: -1.375rem;
}

.carousel__btn svg {
  width: 1.15rem;
  height: 1.15rem;
}

/* Dots */
.carousel__dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  position: relative;
  z-index: 1;
}

.carousel__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  border: none;
  background: #cdd3e3;
  padding: 0;
  cursor: pointer;
}

.carousel__dot[aria-current="true"] {
  background: var(--blue-600);
  width: 1.5rem;
  border-radius: 999px;
}

.confidence__note {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 1rem 0 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.confidence__note::before,
.confidence__note::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ---------------------------------------------------------
   Stats row
--------------------------------------------------------- */
.stats {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 0;
  padding: 1.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.stats__item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.stats__icon {
  flex: 0 0 auto;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: #e7edfb;
  color: var(--blue-600);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stats__icon svg {
  width: 1.6rem;
  height: 1.6rem;
}

.stats__heading {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.3;
}

.stats__heading .accent {
  color: var(--blue-600);
}

.stats__desc {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------------------------------------------------------
   Responsive
--------------------------------------------------------- */
@media (max-width: 900px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .confidence__watermark {
    display: none;
  }
}

@media (max-width: 640px) {
  .confidence__card {
    padding: 1.25rem;
  }

  .confidence__header {
    align-items: flex-start;
  }

  .carousel {
    padding: 0 2.75rem;
  }

  .carousel__btn {
    width: 2.25rem;
    height: 2.25rem;
  }

  .carousel__btn--prev {
    left: -0.9rem;
  }

  .carousel__btn--next {
    right: -0.9rem;
  }

  .carousel__item {
    width: 150px;
    padding: 0 1rem;
  }

  .stats {
    grid-template-columns: 1fr;
  }
}

/* High contrast mode / forced colors support */
@media (forced-colors: active) {
  .carousel__btn,
  .stats__icon {
    border: 1px solid CanvasText;
  }
}