/**
 * The loop — six-step points exchange shared by About, the homepage
 * and How Flustle Works. Self-contained so it does not need inner-shared.css.
 */

.ab-loop {
  --fp-display: "Inter Tight", var(--f-ff-font-2, "Inter Tight"), sans-serif;
  --fp-sans: "Inter", var(--f-ff-font-1, "Inter"), sans-serif;
  --fp-label: "Inter", var(--f-ff-font-1, "Inter"), sans-serif;
  --fp-rail: 1400px;
  position: relative;
  z-index: 3;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse 80% 48% at 88% 6%, rgba(255, 92, 72, 0.34), transparent 58%),
    radial-gradient(ellipse 70% 42% at 8% 94%, rgba(255, 60, 48, 0.22), transparent 55%),
    linear-gradient(168deg, #6e0101 0%, #9b0000 42%, #7a0101 68%, #52010a 100%);
  color: #fff;
  border-bottom: 0;
}

.ab-loop::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(122deg, transparent 0, transparent 11px, rgb(255 255 255 / 4%) 11px, rgb(255 255 255 / 0%) 12.2px);
}

.ab-loop .ip-rail {
  position: relative;
  z-index: 1;
  max-width: var(--fp-rail);
  margin: 0 auto;
  padding: 88px 28px 96px;
}

.ab-loop__intro {
  max-width: 58ch;
  margin-bottom: 40px;
}

.ab-loop .ip-kicker {
  display: block;
  font-family: var(--fp-label);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.3;
  color: #ffb4a8;
}

.ab-loop .ip-title {
  margin: 18px 0 0;
  font-family: var(--fp-display);
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  text-wrap: balance;
  color: #fff;
}

.ab-loop .ip-lead {
  margin: 20px 0 0;
  max-width: 48ch;
  font-family: var(--fp-sans);
  font-size: 19px;
  font-weight: 400;
  line-height: 1.62;
  color: rgba(255, 255, 255, 0.72);
  text-wrap: pretty;
}

.ab-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ab-step {
  position: relative;
  padding: 0 0 8px;
}

.ab-step__stage {
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  padding: 10px 12px 6px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 14% 6%, color-mix(in srgb, var(--ab-accent) 28%, transparent), transparent 62%),
    #0b0d12;
  box-shadow: 0 20px 44px -34px rgba(11, 13, 18, 0.85);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ab-step.is-live .ab-step__stage,
.ab-step:hover .ab-step__stage {
  transform: translateY(-3px);
  box-shadow: 0 28px 56px -34px rgba(11, 13, 18, 0.9);
}

.ab-step__n {
  position: absolute;
  top: 12px;
  left: 14px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  border-radius: 50%;
  background: var(--ab-accent, #ff5c4a);
  color: #0b0d12;
  font-family: var(--fp-display);
  font-size: 12px;
  font-weight: 800;
}

.ab-art {
  display: block;
  width: 100%;
  height: auto;
}

.ab-art * {
  animation-play-state: paused;
}

.ab-loop.is-inview .ab-art *,
.ab-step.is-live .ab-art *,
.fp-how.is-inview .ab-art * {
  animation-play-state: running;
}

/* Homepage: same band as the platform How it works section, with six steps. */
.fp-how--loop .fp-how__steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fp-how--loop .fp-how__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--fp-display);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 5px;
  transition: text-decoration-color 0.2s ease, gap 0.2s ease;
}

.fp-how--loop .fp-how__link:hover,
.fp-how--loop .fp-how__link:focus-visible {
  gap: 11px;
  color: #fff;
  text-decoration-color: #fff;
}

.fp-how--loop .fp-how__link i {
  font-size: 12px;
}

.ab-art__card,
.ab-art__plate {
  fill: rgba(255, 255, 255, 0.07);
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 2;
}

.ab-art__soft,
.ab-art__line,
.ab-art__baseline {
  fill: rgba(255, 255, 255, 0.18);
}

.ab-art__ink {
  fill: rgba(255, 255, 255, 0.88);
}

.ab-art__red,
.ab-art__heart,
.ab-art__send,
.ab-art__bar {
  fill: var(--ab-accent, #ff5c4a);
}

.ab-art__pulse {
  fill: color-mix(in srgb, var(--ab-accent, #ff5c4a) 34%, transparent);
  transform-origin: center;
  transform-box: fill-box;
  animation: ab-pulse 2.6s ease-out infinite;
}

.ab-art__tick {
  fill: none;
  stroke: #0b0d12;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ab-art__chip {
  transform-box: fill-box;
  transform-origin: center;
  animation: ab-float 4.2s ease-in-out infinite;
}

.ab-art__chip-text {
  fill: #0b0d12;
  font-family: var(--fp-label);
  font-size: 15px;
  font-weight: 700;
}

.ab-art__bar--1 { animation: ab-bar 2.8s ease-in-out infinite; }
.ab-art__bar--2 { animation: ab-bar 2.8s ease-in-out 0.2s infinite; }
.ab-art__bar--3 { animation: ab-bar 2.8s ease-in-out 0.4s infinite; }
.ab-art__heart--2 { animation: ab-pulse 2.2s ease-out 0.4s infinite; }

.ab-art__send {
  animation: ab-send 2.4s ease-in-out infinite;
}

@keyframes ab-pulse {
  0% { opacity: 0.7; transform: scale(0.72); }
  70%, 100% { opacity: 0; transform: scale(1.5); }
}

@keyframes ab-float {
  0%, 10% { opacity: 0; transform: translateY(10px) scale(0.9); }
  28%, 72% { opacity: 1; transform: translateY(0) scale(1); }
  90%, 100% { opacity: 0; transform: translateY(-12px) scale(0.95); }
}

@keyframes ab-bar {
  0%, 100% { transform: scaleY(0.7); transform-origin: bottom; }
  50% { transform: scaleY(1); transform-origin: bottom; }
}

@keyframes ab-send {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(8px); }
}

.ab-step h3 {
  margin: 0;
  font-family: var(--fp-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: #fff;
}

.ab-step p {
  margin: 8px 0 0;
  font-family: var(--fp-sans);
  font-size: 15.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
}

.ab-loop__more {
  margin: 28px 0 0;
  max-width: 62ch;
  font-family: var(--fp-sans);
  font-size: 16px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.7);
}

.ab-loop__more a {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.ab-loop__more a:hover,
.ab-loop__more a:focus-visible {
  border-bottom-color: #fff;
}

@media (max-width: 1199px) {
  .fp-how--loop .fp-how__steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991px) {
  .ab-loop .ip-rail {
    padding-left: 20px;
    padding-right: 20px;
  }

  .ab-steps {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 575px) {
  .fp-how--loop .fp-how__steps {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  .ab-loop .ip-kicker {
    font-size: 14px;
  }

  .ab-loop .ip-lead {
    font-size: 16.5px;
  }

  .ab-loop .ip-rail {
    padding: 56px 20px 64px;
  }

  .ab-steps {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ab-step__stage,
  .ab-step.is-live .ab-step__stage,
  .ab-step:hover .ab-step__stage {
    transform: none;
    transition: none;
  }

  .ab-art * {
    animation: none !important;
  }
}
