/* ===================== MORE WAYS TO CONNECT ===================== */
.connect {
  position: relative;
  padding: clamp(70px, 8vw, 120px) clamp(20px, 4vw, 60px) clamp(70px, 8vw, 110px);
  background: #ffffff;
  overflow: hidden;
}

/* ---------- Heading ---------- */
.conn-head {
  text-align: center;
  max-width: 820px;
  margin: 0 auto clamp(40px, 5vw, 64px);
}
.conn-heading {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 4.2vw, 3.3rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: #16202f;
}
.conn-heading .grad {
  background: linear-gradient(100deg, #5b8def 0%, #2f6bd8 60%, #6aa0ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.conn-sub {
  margin-top: 16px;
  font-size: clamp(1rem, 1.3vw, 1.16rem);
  font-weight: 300;
  line-height: 1.6;
  color: #6b7689;
}

/* ---------- Grid ---------- */
.conn-carousel {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
}
.conn-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(22px, 2.4vw, 36px);
}

/* mobile-only controls hidden on desktop */
.conn-arrow,
.conn-mnav { display: none; }

/* ---------- Card ---------- */
.conn-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 22px 50px rgba(40, 60, 110, 0.13);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s ease;
}
.conn-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 34px 70px rgba(40, 60, 110, 0.20);
}

.conn-media {
  position: relative;
  height: clamp(260px, 26vw, 340px);
}
.conn-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top; /* keep the top of the image, crop only the bottom */
  display: block;
  /* fade the image into the card body */
  -webkit-mask-image: linear-gradient(to bottom, #000 66%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 66%, transparent 100%);
}

.conn-body {
  position: relative;
  margin-top: -36px; /* pull text up under the faded image */
  padding: 0 clamp(24px, 2.2vw, 32px) clamp(26px, 2.4vw, 34px);
}
.conn-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: clamp(1.4rem, 1.9vw, 1.75rem);
  color: #16202f;
  margin-bottom: 12px;
}
.conn-title .b {
  color: #2f6bd8;
}
.conn-desc {
  font-size: clamp(0.95rem, 1.1vw, 1.04rem);
  font-weight: 400;
  line-height: 1.6;
  color: #5a6478;
  margin-bottom: 24px;
}

/* Learn More button (soft raised pill) */
.conn-btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: 999px;
  background: #ffffff;
  color: #2f6bd8;
  text-decoration: none;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.96rem;
  box-shadow: 0 10px 24px rgba(47, 107, 216, 0.18),
              inset 0 0 0 1px rgba(47, 107, 216, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.conn-btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(120deg, #4a90f0, #2f6bd8);
  color: #fff;
  box-shadow: 0 14px 30px rgba(47, 107, 216, 0.36);
}

/* ---------- Reveal ---------- */
.connect .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.connect .reveal.in-view { opacity: 1; transform: translateY(0); }

/* ===================== Responsive: mobile carousel ===================== */
@media (max-width: 880px) {
  .conn-grid {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 24px 5% 18px;
  }
  .conn-grid::-webkit-scrollbar { display: none; }
  .conn-card {
    flex: 0 0 90%;
    margin: 0 5px;
    scroll-snap-align: center;
    will-change: transform;
  }
  .connect .conn-card { transition: none; }
  .conn-media { height: clamp(280px, 64vw, 360px); }

  /* arrows */
  .conn-arrow {
    display: grid;
    place-items: center;
    position: absolute;
    top: 42%;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #2f6bd8;
    box-shadow: 0 10px 26px rgba(40, 60, 110, 0.22);
    cursor: pointer;
    z-index: 6;
    transform: translateY(-50%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  }
  .conn-arrow.next { right: 4px; }
  .conn-arrow.prev { left: 4px; }
  .conn-arrow svg { width: 24px; height: 24px; }
  .conn-arrow:active { transform: translateY(-50%) scale(0.9); }
  .conn-arrow.is-hidden { opacity: 0; pointer-events: none; }
  .conn-arrow.next.is-hidden { transform: translateY(-50%) translateX(14px) scale(0.8); }
  .conn-arrow.prev.is-hidden { transform: translateY(-50%) translateX(-14px) scale(0.8); }

  /* dots + swipe hint */
  .conn-mnav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-top: 22px;
  }
  .conn-dots { display: flex; gap: 8px; }
  .conn-dot {
    width: 9px; height: 9px;
    border-radius: 999px;
    border: none; padding: 0;
    background: #c3cce0;
    cursor: pointer;
    transition: width 0.3s ease, background 0.3s ease;
  }
  .conn-dot.active { width: 26px; background: #2f6bd8; }
  .conn-swipe {
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: #7a86a0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .conn-card { transition: none; }
}
