/* AI Toolkit — Figma "New / Crafted by humans. Accelerated by AI" (85376:51172).
   One 554x617 pale-blue card centred on the homepage gradient, the
   neighbours shown as 400x400 cards at 50% that sit mostly beyond the
   viewport edge (62px visible at 1440), 853px between card centres. The
   final slide is the "Bring your next idea" CTA. Everything scales from
   --card-w so narrower screens keep the proportions. */

.ai-toolkit-body {
  background-color: #02021e;
}

/* Three classes so this outranks halo-lab.css's .bg-home-gradient.mod--ai. */
.bg-home-gradient.mod--ai.ai-toolkit-bg {
  overflow: hidden;
  /* Navy holds to 18.6% and runs into blue, with no light stop before the footer. */
  background-image: linear-gradient(#000218 18.6%, #1964d1 100%);
}

.ai-toolkit {
  --card-w: min(554px, calc(100vw - 2.5rem));
  --card-h: calc(var(--card-w) * 617 / 554);
  --side-scale: calc(400 / 554);
  --peek: 62px;
  /* Neighbour centre = half viewport - visible peek + half of the scaled card. */
  --step: max(calc(50vw - var(--peek) + var(--card-w) * var(--side-scale) / 2), calc(var(--card-w) + 2rem));
  --slide-gap: calc(var(--step) - var(--card-w));
  --ease-slide: cubic-bezier(.645, .045, .355, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 12.5rem 0 20rem;
  color: #fff;
}

.ai-toolkit .stars-canvas {
  z-index: 0;
  pointer-events: none;
}

.ai-toolkit__head,
.ai-toolkit__slider {
  position: relative;
  z-index: 1;
}

/* Homepage entrance: hidden until text-animation.js reveals them. */
[data-gsap-line],
[data-gsap-blur] {
  opacity: 0;
}

/* Head ---------------------------------------------------------------- */

.ai-toolkit__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(60rem, calc(100% - 2.5rem));
  margin-bottom: 6rem;
  text-align: center;
}

.ai-toolkit__eyebrow.h2-label {
  margin-bottom: .75rem;
  color: rgba(255, 255, 255, .6);
  letter-spacing: .02em;
  opacity: 1;
}

.ai-toolkit__heading {
  margin: 0;
  font-family: Suisse, Arial, sans-serif;
  font-size: 3.5rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.03em;
  text-transform: none;
}

/* Slider --------------------------------------------------------------- */

.ai-toolkit__slider {
  position: relative;
  width: 100%;
  height: var(--card-h);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.ai-toolkit__track {
  position: absolute;
  top: 0;
  left: 50%;
  display: flex;
  gap: var(--slide-gap);
  height: 100%;
  margin-left: calc(var(--card-w) / -2);
  will-change: transform;
  transition: transform .6s var(--ease-slide);
}

.ai-toolkit__slider.is-dragging .ai-toolkit__track {
  transition: none;
}

/* During the loop jump nothing may animate, or the real slide replays its activation. */
.ai-toolkit__slider.is-jumping .ai-toolkit__card,
.ai-toolkit__slider.is-jumping .ai-toolkit__content,
.ai-toolkit__slider.is-jumping .ai-toolkit__motion {
  transition: none !important;
}

.ai-toolkit__slide {
  flex: none;
  width: var(--card-w);
  height: 100%;
}

.ai-toolkit__card-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  /* Per-card perspective, as the reference sets on each card wrapper. */
  perspective: 1200px;
  transform-style: preserve-3d;
  opacity: 0;
  transform: translateY(2.5rem);
  animation: ai-toolkit-enter .9s cubic-bezier(.215, .61, .355, 1) forwards;
  animation-delay: calc(var(--i, 0) * 90ms + 120ms);
}

@keyframes ai-toolkit-enter {
  to { opacity: 1; transform: none; }
}

.ai-toolkit__motion {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  /* The reference smooths the pointer over 500ms. */
  transition: transform .5s ease-out;
  will-change: transform;
}

/* Card ----------------------------------------------------------------- */

.ai-toolkit__card {
  position: absolute;
  /* Inactive: the frame's 400x400 side card, centred on the 554x617 card. */
  inset: calc((617 - 400) / 2 / 617 * 100%) calc((554 - 400) / 2 / 554 * 100%);
  overflow: hidden;
  border-radius: 40px;
  background: #96b4e4;
  box-shadow: 0 10px 84px rgba(1, 2, 24, 0);
  opacity: .5;
  transform: translateZ(0);
  transition: inset .6s var(--ease-slide), opacity .6s var(--ease-slide), box-shadow .6s var(--ease-slide);
}

.ai-toolkit__slide.is-active .ai-toolkit__card {
  inset: 0;
  opacity: 1;
  box-shadow: 0 10px 84px rgba(1, 2, 24, .2);
}

/* The glow lives in the top three quarters of the card. */
.ai-toolkit__glow {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 100%;
  height: 75%;
  overflow: hidden;
  border-radius: 40px 40px 0 0;
  /* Fade out toward the middle so the half boundary has no hard edge. */
  -webkit-mask-image: linear-gradient(#000 55%, transparent 100%);
  mask-image: linear-gradient(#000 55%, transparent 100%);
  pointer-events: none;
}

.ai-toolkit__spot {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: calc(var(--card-w) * 2.6);
  height: calc(var(--card-w) * 2.6);
  margin: calc(var(--card-w) * -1.3) 0 0 calc(var(--card-w) * -1.3);
  border-radius: 50%;
  background: radial-gradient(circle closest-side, #e6edfe 0%, rgba(230, 237, 254, .7) 30%, rgba(230, 237, 254, 0) 72%);
  filter: blur(calc(var(--card-w) * .1));
  opacity: 0;
  transition: opacity .4s ease, transform .5s ease-out;
  pointer-events: none;
  will-change: transform;
}

.ai-toolkit__slider.is-tilting .ai-toolkit__slide.is-active .ai-toolkit__spot {
  opacity: 1;
}

.ai-toolkit__content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: calc(var(--card-w) * 84 / 554);
  text-align: center;
  opacity: 0;
  /* Leaving: fade out fast, before the card starts shrinking in earnest. */
  transition: opacity .15s ease;
  pointer-events: none;
}

.ai-toolkit__slide.is-active .ai-toolkit__content {
  opacity: 1;
  /* Arriving: wait for the card to grow, then fade in. */
  transition: opacity .4s ease .25s;
}

/* Figma BETA pill (87159:162360): 48x22, 26px from the card's top and right. */
.ai-toolkit__beta {
  position: absolute;
  top: calc(var(--card-w) * 26 / 554);
  right: calc(var(--card-w) * 26 / 554);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: calc(var(--card-w) * 22 / 554);
  padding: 0 calc(var(--card-w) * 7 / 554);
  border-radius: 3px;
  background: rgba(0, 2, 24, .4);
  color: #dae5fa;
  font-size: calc(var(--card-w) * 12 / 554);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.ai-toolkit__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(var(--card-w) * 162 / 554);
  height: calc(var(--card-w) * 162 / 554);
  margin-bottom: calc(var(--card-w) * 78 / 554);
  overflow: hidden;
  border-radius: calc(var(--card-w) * 36 / 554);
  box-shadow: 0 24px 60px rgba(1, 2, 24, .25);
}

.ai-toolkit__logo.is-mark {
  /* Figma Product Logo (87131:46033): deep red at the top, near-black by half way. */
  background: linear-gradient(180deg, #360000 0%, #0d0003 53.8%, #000004 100%);
}

.ai-toolkit__mark {
  display: block;
  width: calc(var(--card-w) * 85 / 554);
  height: auto;
}

.ai-toolkit__logo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The supplied product SVGs keep their full Figma export canvas so their
   built-in shadows remain intact. Position that canvas around the existing
   logo slot instead of shrinking the visible 162px badge inside it. */
.ai-toolkit__logo:not(.is-mark) {
  overflow: visible;
  box-shadow: none;
}

.ai-toolkit__logo:not(.is-mark) .ai-toolkit__logo-img {
  width: calc(var(--card-w) * 281 / 554);
  height: auto;
  max-width: none;
  transform: translateY(calc(var(--card-w) * 22 / 554));
}

.ai-toolkit__title {
  margin: 0 0 calc(var(--card-w) * 24 / 554);
  font-family: Suisse, Arial, sans-serif;
  font-size: calc(var(--card-w) * 64 / 554);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.02em;
  text-transform: none;
  color: #010218;
}

.ai-toolkit__solution {
  margin-bottom: calc(var(--card-w) * 40 / 554);
  font-size: calc(var(--card-w) * 14 / 554);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--blue-dark);
  opacity: .7;
}

.ai-toolkit__text {
  width: calc(var(--card-w) * 377 / 554);
  margin: 0;
  font-size: calc(var(--card-w) * 18 / 554);
  line-height: 1.6;
  color: var(--blue-dark);
}

/* CTA slide ------------------------------------------------------------- */

.ai-toolkit__slide.is-cta .ai-toolkit__content {
  justify-content: flex-start;
  gap: 1.75rem;
  padding: calc(var(--card-w) * 44 / 554) calc(var(--card-w) * 48 / 554) 0;
}

.ai-toolkit__slide.is-cta.is-active .ai-toolkit__content {
  pointer-events: auto;
}

/* Figma "logos" (86647:46862): two 368px glass renders whose centres sit
   215px apart, the sparkle turned 11.77deg. Scaled to the card. */
.ai-toolkit__cta-art {
  position: relative;
  width: calc(var(--card-w) * 380 / 554);
  aspect-ratio: 583 / 368;
  margin-bottom: calc(var(--card-w) * -12 / 554);
}

.ai-toolkit__cta-cloud,
.ai-toolkit__cta-sparkle {
  position: absolute;
  top: 0;
  width: calc(368 / 583 * 100%);
  height: auto;
}

.ai-toolkit__cta-cloud {
  left: 0;
}

.ai-toolkit__cta-sparkle {
  right: 0;
  transform: rotate(11.77deg);
}

.ai-toolkit__cta-title {
  max-width: 33.5rem;
  margin: 0;
  font-family: Suisse, Arial, sans-serif;
  font-size: calc(var(--card-w) * 42 / 554);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.02em;
  text-transform: none;
  color: var(--blue-dark);
}

/* Click areas and custom cursor ---------------------------------------- */

.ai-toolkit__area {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 12;
  width: calc(50% - var(--card-w) / 2);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: none;
  -webkit-appearance: none;
  appearance: none;
}

.ai-toolkit__area.is-prev { left: 0; }
.ai-toolkit__area.is-next { right: 0; }

.ai-toolkit__area:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: -2px;
  border-radius: 20px;
}

.ai-toolkit__cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  margin: -40px 0 0 -40px;
  border-radius: 50%;
  background: rgba(2, 2, 30, .9);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(255, 255, 255, .08);
  color: #fff;
  opacity: 0;
  transform: scale(.6);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
  will-change: transform;
}

.ai-toolkit__cursor.is-visible {
  opacity: 1;
  transform: scale(1);
}

.ai-toolkit__cursor.is-pressed {
  transform: scale(.85);
}

.ai-toolkit__cursor svg {
  transition: transform .25s ease;
}

.ai-toolkit__cursor.is-prev svg {
  transform: rotate(180deg);
}

/* Responsive ------------------------------------------------------------- */

@media (max-width: 991px) {
  .ai-toolkit {
    padding-top: 9rem;
    padding-bottom: 9rem;
  }

  .ai-toolkit__head {
    margin-bottom: 5rem;
  }

  .ai-toolkit__heading {
    font-size: 2.75rem;
  }

}

@media (max-width: 767px) {
  .ai-toolkit {
    --card-w: min(calc(100vw - 3rem), calc((100svh - 12rem) * 554 / 617));
    --peek: 24px;
    padding-top: 7.5rem;
    padding-bottom: 7.5rem;
  }

  .ai-toolkit__head {
    margin-bottom: 3rem;
  }

  .ai-toolkit__heading {
    font-size: 2rem;
  }

  .ai-toolkit__heading br {
    display: none;
  }

  .ai-toolkit__area {
    width: 1.5rem;
  }

  .ai-toolkit__cta-art {
    width: calc(var(--card-w) * 320 / 554);
  }
}

@media (hover: none), (pointer: coarse) {
  .ai-toolkit__cursor,
  .ai-toolkit__spot {
    display: none;
  }

  .ai-toolkit__area {
    cursor: pointer;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ai-toolkit__card-wrap {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .ai-toolkit__track,
  .ai-toolkit__motion,
  .ai-toolkit__card,
  .ai-toolkit__content {
    transition: none;
  }

  .ai-toolkit__card {
    transition: none;
  }

  .ai-toolkit__spot {
    display: none;
  }
}
