@import url('https://fonts.googleapis.com/css2?family=Onest:wght@600&display=swap');

/**
 * Integrations Hero Section
 * Rotating icon wheel (pure CSS, no JS) behind a centered heading + CTA.
 *
 * How the rotation works:
 * - .integrations-hero__track is a full 360° circle of icons, spinning continuously.
 * - Its center sits below the section's bottom edge (--wheel-center-y), so with
 *   overflow:hidden on the section, only the top portion of the circle is ever
 *   visible — icons quietly pass through the hidden bottom arc and reappear,
 *   which reads as a continuous "tire" rotation.
 * - Each icon has its own counter-rotation animation (.integrations-hero__spin)
 *   running with the exact same duration/timing as the track's spin, so the two
 *   cancel out and the badge itself never visually tilts — only its position
 *   moves along the ring.
 *
 * Tuning: adjust --wheel-radius / --wheel-center-y / section min-height together
 * to control how much of the arc is visible and how wide it spans.
 */

.integrations-section {
  position: relative;
  min-height: 760px;
  background: url('../images/integrations/integration-section-bg.avif') center center / cover no-repeat;
  overflow: hidden;
  transition: background-color 0.85s cubic-bezier(0.22, 0.61, 0.36, 1),
              background-image 0.85s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.integrations-hero,
.integrations-hero * {
  box-sizing: border-box;
}

.integrations-hero {
  --wheel-radius: 590px;
  --wheel-center-y: 500px;
  --wheel-ring-thickness: 120px;
  --wheel-duration: 130s;
  width: 100%;
  position: relative;
  z-index: 1;

  --int-purple: #4b3fa1;
  --int-olive: #92a93a;
  --int-teal: #63c1d6;
  --int-forest: #3e5148;
  --int-orange: #e2542b;
  --int-rust: #a9705c;
  --int-blue: #3b4de3;
  --int-blue-dark: #2c3bc4;

  position: relative;
  overflow: hidden;
  min-height: 760px;
  padding: 0 20px 70px;
  /* background: linear-gradient(180deg, #c7d9f7 0%, #e9f0fb 45%, #ffffff 78%); */
  font-family: 'Onest', sans-serif;
}

/* ============================================================
   STATIC ARC BAND (the thick light ring behind the icons)
   ============================================================ */

.integrations-hero__visual {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.integrations-hero__visual::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 180px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.849) 40%, rgb(255, 255, 255) 100%);
  pointer-events: none;
}

.integrations-hero__arc {
  position: absolute;
  top: 20%;
  left: 50%;
  width: calc(var(--wheel-radius) * 2);
  height: calc(var(--wheel-radius) * 2);
  border-radius: 50%;
  border: var(--wheel-ring-thickness) solid rgba(255, 255, 255, 0.78);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.06) 52%, rgba(255, 255, 255, 0) 100%);
  box-shadow:
    0 24px 60px rgba(31, 61, 46, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  transform: translate(-50%, calc(var(--wheel-center-y) - var(--wheel-radius) + 12px));
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 58%, rgba(0,0,0,0.5) 76%, rgba(0,0,0,0.08) 88%, rgba(0,0,0,0) 100%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 58%, rgba(0,0,0,0.5) 76%, rgba(0,0,0,0.08) 88%, rgba(0,0,0,0) 100%);
}

/* ============================================================
   ROTATING WHEEL
   ============================================================ */

.integrations-hero__wheel {
  position: absolute;
  top: 20%;
  left: 50%;
  width: 0;
  height: 0;
  transform: translate(0, calc(var(--wheel-center-y) + 12px));
  opacity: 0.96;
}

.integrations-hero__track {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  animation: rfz-int-orbit var(--wheel-duration) linear infinite;
  will-change: transform;
}

@keyframes rfz-int-orbit {
  to {
    transform: rotate(360deg);
  }
}

.integrations-hero__slot {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  transform: rotate(var(--angle));
}

.integrations-hero__pos {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(calc(var(--wheel-radius) - (var(--wheel-ring-thickness) * 0.6) + 6px), 0);
}

.integrations-hero__spin {
  position: absolute;
  top: 0;
  left: 0;
  animation: rfz-int-counter-spin var(--wheel-duration) linear infinite;
  will-change: transform;
}

@keyframes rfz-int-counter-spin {
  from {
    transform: translate(-50%, -50%) rotate(calc(-1 * var(--angle)));
  }
  to {
    transform: translate(-50%, -50%) rotate(calc(-1 * var(--angle) - 360deg));
  }
}

/* Keep the wheel continuously rotating at all times. */
.integrations-hero__visual:hover .integrations-hero__track,
.integrations-hero__visual:hover .integrations-hero__spin {
  animation-play-state: running;
}

/* ============================================================
   ICON BADGES
   ============================================================ */

.integrations-hero__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  color: #ffffff;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.integrations-hero__badge img {
  display: block;
  width: 82px;;
  height: 83px;
  max-width: none;
  object-fit: contain;
  flex-shrink: 0;
}

.integrations-hero__badge--sm,
.integrations-hero__badge--md,
.integrations-hero__badge--lg {
  width: 53px;
  height: 53px;
}

.integrations-hero__badge--purple { background: var(--int-purple); }
.integrations-hero__badge--olive  { background: var(--int-olive); }
.integrations-hero__badge--teal   { background: var(--int-teal); }
.integrations-hero__badge--forest { background: var(--int-forest); }
.integrations-hero__badge--orange { background: var(--int-orange); }
.integrations-hero__badge--rust   { background: var(--int-rust); }

/* ============================================================
   CONTENT (heading, subtitle, CTA)
   ============================================================ */

.integrations-hero__content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
  padding-top: 300px;
  text-align: center;
  background: transparent;
}

.integrations-hero__eyebrow {
  display: inline-block;
  color: var(--int-blue);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.integrations-hero__title {
  font-family: 'Onest', sans-serif;
  font-size: 64px;
  font-weight: 600;
  line-height: 77px;
  letter-spacing: -0.02em;
  color: rgb(12, 12, 12);
  margin-bottom: 22px;
}

.integrations-hero__title-accent {
  color: var(--int-blue);
}

.integrations-hero__subtitle {
  font-size: clamp(15px, 1.8vw, 18px);
  line-height: 1.6;
  color: #55606b;
  max-width: 560px;
  margin: 0 auto 32px;
}

.integrations-hero__cta {
  display: inline-block;
  background: var(--int-blue);
  color: #ffffff;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  padding: 15px 32px;
  border-radius: 40px;
  box-shadow: 0 14px 28px rgba(59, 77, 227, 0.28);
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.integrations-hero__cta:hover,
.integrations-hero__cta:focus-visible {
  background: var(--int-blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(59, 77, 227, 0.34);
  color: #ffffff;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 991px) {
  .integrations-hero {
    --wheel-radius: 440px;
    --wheel-center-y: 430px;
    min-height: 600px;
  }

  .integrations-hero__content {
    padding-top: 220px;
  }
}

@media (max-width: 640px) {
  .integrations-section {
    background-image: url('../images/integrations/integration-section-bg.avif');
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    border: 0;
    box-shadow: none;
  }

  .integrations-hero {
    --wheel-radius: 300px;
    --wheel-center-y: 300px;
      --wheel-ring-thickness: 72px;
    min-height: 700px;
    padding: 0 16px 50px;
    background: transparent !important; /* Added background declaration */
  }

  .integrations-hero__visual {
    display: block;
    height: 245px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 88%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 88%, transparent 100%);
  }

  .integrations-hero__visual::after {
    display: none;
  }

  .integrations-hero__arc,
  .integrations-hero__wheel {
    top: 20%;
  }

  .integrations-hero__content {
    padding-top: 245px;
    background: transparent;
    border: 0;
  }

  .integrations-hero__title {
    font-size: 36px;
    line-height: 44px;
    letter-spacing: -0.01em;
    margin-bottom: 18px;
  }

  .integrations-hero__eyebrow {
    font-size: 13px;
    margin-bottom: 16px;
  }

  .integrations-hero__subtitle {
    max-width: 320px;
    font-size: 16px;
    line-height: 24px;
    margin-bottom: 24px;
  }

  .integrations-hero__badge,
  .integrations-hero__badge--sm,
  .integrations-hero__badge--md,
  .integrations-hero__badge--lg {
    width: 54px;
    height: 54px;
  }

  .integrations-hero__badge img {
    width: 54px;
    height: 54px;
  }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .integrations-hero__track,
  .integrations-hero__spin {
    animation: none;
  }

  /* Falls back to each icon's starting position (0% keyframe) — a fully
     static, evenly-spaced arc with every badge upright. */
  .integrations-hero__spin {
    transform: translate(-50%, -50%) rotate(calc(-1 * var(--angle)));
  }
}
