/**
 * Home — "How it works" section
 * Light bg matching quoteflow-value-prop style, glassmorphism cards, pink accents
 */

.how-it-works-nexx {
  --how-navy: #252c41;
  --how-muted: #5c6577;
  --how-pink: #ff00bf;
  --how-pink-dark: #d6009e;
  --how-border: rgba(37, 44, 65, 0.09);
  --how-card-bg: rgba(255, 255, 255, 0.7);

  position: relative;
  overflow: hidden;
  padding: clamp(2.75rem, 7vw, 5.25rem) 1.25rem;
  background:
    radial-gradient(
      ellipse 130% 90% at 50% -35%,
      rgba(255, 0, 191, 0.14),
      transparent 58%
    ),
    linear-gradient(165deg, #fafbfd 0%, #f0f2f8 48%, #f7f5fa 100%);
  text-align: center;
}

.how-it-works-nexx::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 85% 60%,
    rgba(99, 102, 241, 0.06),
    transparent 45%
  );
  pointer-events: none;
  z-index: 0;
}

/* ─── Intro ───────────────────────────────── */

.how-it-works-nexx__intro {
  position: relative;
  z-index: 1;
  max-width: 38rem;
  margin-left: auto;
  margin-right: auto;
}

.how-it-works-nexx__eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--how-pink);
  margin: 0 0 0.6rem;
}

.how-it-works-nexx__intro h2 {
  font-size: clamp(1.7rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--how-navy);
  margin: 0 0 1rem;
  line-height: 1.2;
}

.how-it-works-nexx__lede {
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--how-muted);
  margin: 0;
}

.how-it-works-nexx__lede strong {
  color: var(--how-navy);
  font-weight: 600;
}

/* ─── Track (card grid + connectors) ──────── */

.how-it-works-nexx__track {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 3rem;
  text-align: left;
}

@media (min-width: 992px) {
  .how-it-works-nexx__track {
    grid-template-columns: 1fr auto 1fr auto 1fr;
    gap: 0;
    align-items: stretch;
    column-gap: 1.25rem;
  }
}

/* ─── Connector arrows (desktop) ─────────── */

.how-it-works-nexx__arrow {
  display: none;
}

@media (min-width: 992px) {
  .how-it-works-nexx__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 2rem;
  }

  .how-it-works-nexx__arrow-line {
    display: flex;
    align-items: center;
    gap: 0;
  }

  .how-it-works-nexx__arrow-line::before {
    content: "";
    display: block;
    width: 2rem;
    height: 2px;
    background: linear-gradient(
      90deg,
      rgba(255, 0, 191, 0.4),
      rgba(255, 0, 191, 0.18)
    );
  }

  .how-it-works-nexx__arrow-line::after {
    content: "";
    display: block;
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 7px solid rgba(255, 0, 191, 0.35);
    flex-shrink: 0;
  }
}

/* ─── Mobile vertical connectors ──────────── */

.how-it-works-nexx__arrow-mobile {
  display: flex;
  justify-content: center;
  padding: 0.25rem 0;
}

.how-it-works-nexx__arrow-mobile-line {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.how-it-works-nexx__arrow-mobile-line::before {
  content: "";
  display: block;
  width: 2px;
  height: 1.25rem;
  background: linear-gradient(
    180deg,
    rgba(255, 0, 191, 0.35),
    rgba(255, 0, 191, 0.12)
  );
}

.how-it-works-nexx__arrow-mobile-line::after {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid rgba(255, 0, 191, 0.3);
  flex-shrink: 0;
}

@media (min-width: 992px) {
  .how-it-works-nexx__arrow-mobile {
    display: none;
  }
}

/* ─── Cards ───────────────────────────────── */

.how-it-works-nexx__card {
  position: relative;
  z-index: 1;
  background: var(--how-card-bg);
  border: 1px solid var(--how-border);
  border-radius: 16px;
  padding: 1.75rem 1.5rem 1.75rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow:
    0 4px 24px rgba(37, 44, 65, 0.06),
    0 1px 3px rgba(37, 44, 65, 0.03);
  transition:
    box-shadow 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease;
}

.how-it-works-nexx__card:hover {
  border-color: rgba(255, 0, 191, 0.22);
  box-shadow:
    0 12px 48px rgba(255, 0, 191, 0.1),
    0 0 0 1px rgba(255, 0, 191, 0.08);
  transform: translateY(-3px);
}

/* ─── Card head (step number + icon) ──────── */

.how-it-works-nexx__card-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
}

.how-it-works-nexx__step {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(145deg, var(--how-pink) 0%, var(--how-pink-dark) 100%);
  box-shadow: 0 4px 14px rgba(255, 0, 191, 0.3);
}

.how-it-works-nexx__icon-wrap {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.how-it-works-nexx__icon-wrap--pick {
  color: #c2410c;
  background: rgba(194, 65, 12, 0.1);
}

.how-it-works-nexx__icon-wrap--run {
  color: #15803d;
  background: rgba(21, 128, 61, 0.1);
}

.how-it-works-nexx__icon-wrap--console {
  color: #6d28d9;
  background: rgba(109, 40, 217, 0.1);
}

/* ─── Card text ───────────────────────────── */

.how-it-works-nexx__card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--how-navy);
  margin: 0 0 0.6rem;
  line-height: 1.3;
  text-align: left;
}

.how-it-works-nexx__card > p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--how-muted);
  margin: 0 0 1rem;
  flex-grow: 1;
}

/* ─── Solution badges (step 1) ────────────── */

.how-it-works-nexx__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.35rem;
}

.how-it-works-nexx__badge {
  display: inline-block;
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--how-navy);
  background: rgba(255, 0, 191, 0.06);
  border: 1px solid rgba(255, 0, 191, 0.2);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.how-it-works-nexx__badge:hover {
  color: #ffffff;
  background: var(--how-pink);
  border-color: var(--how-pink);
  box-shadow: 0 2px 12px rgba(255, 0, 191, 0.25);
}

/* ─── Responsive ──────────────────────────── */

@media (max-width: 991px) {
  .how-it-works-nexx {
    padding: 2.75rem 1rem 3rem;
  }

  .how-it-works-nexx__track {
    gap: 0;
  }

  .how-it-works-nexx__card {
    border-radius: 14px;
  }
}
