/* QNSET Products page. Builds on qx.css (tokens, page hero, buttons, CTA). */

.qp-c--red { --c: var(--qx-red); }
.qp-c--purple { --c: var(--qx-purple); }
.qp-c--blue { --c: var(--qx-blue); }
.qp-c--white { --c: var(--qx-ink); }

/* ---------- Explorer: service index on the left, detail stage on the right ---------- */

.qp-explorer {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(3rem, 6vw, 6rem);
  align-items: start;
  padding-bottom: clamp(5rem, 12vh, 8rem);
}

.qp-group {
  margin: 2.5rem 0 0;
  padding-bottom: 0.9rem;
  font-family: var(--qx-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--qx-faint);
}

.qp-group:first-child {
  margin-top: 0;
}

.qp-rows {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--qx-line);
}

.qp-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem 1.5rem;
  padding: clamp(1.25rem, 2.6vw, 2rem) 0 clamp(1.25rem, 2.6vw, 2rem) 1.25rem;
  border-bottom: 1px solid var(--qx-line);
  color: var(--qx-faint);
  text-decoration: none;
  transition: color 0.4s ease;
}

/* colour bar at the left edge of the current row */
.qp-row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 22%;
  bottom: 22%;
  width: 3px;
  border-radius: 999px;
  background: var(--c);
  transform: scaleY(0);
  transition: transform 0.5s var(--qx-ease);
}

.qp-row.is-active,
.qp-row:hover,
.qp-row:focus-visible {
  color: var(--qx-ink);
}

.qp-row.is-active::before {
  transform: scaleY(1);
}

.qp-row-title {
  font-size: clamp(1.75rem, 3.2vw, 3rem);
  font-weight: 650;
  line-height: 1.02;
  letter-spacing: -0.03em;
  transition: transform 0.6s var(--qx-ease);
}

.qp-row.is-active .qp-row-title {
  transform: translateX(0.5rem);
}

.qp-row-desc {
  display: none;
  grid-column: 1;
  max-width: 52ch;
  line-height: 1.55;
  color: var(--qx-muted);
}

.qp-row-arrow {
  grid-column: 2;
  grid-row: 1;
  opacity: 0.5;
  transition: transform 0.5s var(--qx-ease), opacity 0.3s ease;
}

.qp-row.is-active .qp-row-arrow,
.qp-row:hover .qp-row-arrow {
  opacity: 1;
  transform: translateX(4px);
}

/* the stage: all panels share one cell; only the active one is shown */
.qp-stage {
  position: sticky;
  top: 7rem;
  display: grid;
}

.qp-panel {
  grid-area: 1 / 1;
  position: relative;
  padding: clamp(1.75rem, 3vw, 2.75rem);
  overflow: hidden;
  border: 1px solid var(--qx-line);
  border-top: 2px solid var(--c);
  border-radius: 1.5rem;
  background: var(--qx-surface);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.6s var(--qx-ease), visibility 0s linear 0.35s;
}

.qp-panel.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.45s ease 0.05s, transform 0.7s var(--qx-ease) 0.05s, visibility 0s;
}

/* a soft glow in the service colour behind the panel */
.qp-panel::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -30%;
  width: 80%;
  aspect-ratio: 1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 22%, transparent), transparent);
  pointer-events: none;
}

.qp-panel-cat,
.qp-panel-label {
  margin: 0;
  font-family: var(--qx-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--qx-faint);
}

.qp-panel-title {
  margin: 0.9rem 0 1rem;
  font-size: clamp(1.75rem, 2.6vw, 2.5rem);
  font-weight: 650;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.qp-panel-desc {
  margin: 0 0 2rem;
  line-height: 1.6;
  color: var(--qx-muted);
}

.qp-features {
  margin: 0.9rem 0 2rem;
  padding: 0;
  list-style: none;
}

.qp-features li {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-block: 0.7rem;
  border-top: 1px solid var(--qx-line);
}

.qp-features li::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 10px var(--c);
}

/* features slide in one after another when a panel becomes active */
.qp-panel .qp-features li {
  opacity: 0;
  transform: translateX(-10px);
}

.qp-panel.is-active .qp-features li {
  opacity: 1;
  transform: none;
  transition: opacity 0.4s ease, transform 0.6s var(--qx-ease);
}

.qp-panel.is-active .qp-features li:nth-child(1) { transition-delay: 0.12s; }
.qp-panel.is-active .qp-features li:nth-child(2) { transition-delay: 0.18s; }
.qp-panel.is-active .qp-features li:nth-child(3) { transition-delay: 0.24s; }
.qp-panel.is-active .qp-features li:nth-child(4) { transition-delay: 0.3s; }
.qp-panel.is-active .qp-features li:nth-child(5) { transition-delay: 0.36s; }
.qp-panel.is-active .qp-features li:nth-child(n + 6) { transition-delay: 0.42s; }

/* ---------- Who it is for ---------- */

.qp-audience-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: end;
}

.qp-audience-body p {
  margin: 0 0 1.75rem;
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--qx-muted);
}

.qp-audience-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.1rem;
  border-block: 1px solid var(--qx-line);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--qx-ink);
  text-decoration: none;
}

.qp-audience-link svg {
  transition: transform 0.5s var(--qx-ease);
}

.qp-audience-link:hover svg {
  transform: translateX(6px);
}

/* ---------- Mobile: no stage; each row carries its own description ---------- */

@media (max-width: 999px) {
  .qp-explorer,
  .qp-audience-grid {
    grid-template-columns: 1fr;
  }

  .qp-stage {
    display: none;
  }

  .qp-row {
    padding-left: 0;
    color: var(--qx-ink);
  }

  .qp-row::before {
    display: none;
  }

  .qp-row.is-active .qp-row-title {
    transform: none;
  }

  .qp-row-desc {
    display: block;
  }
}
