/* QNSET Enterprise page. Builds on qx.css (tokens, page hero, pillars,
   service rows, CTA). */

/* ---------- Existing enterprise account notice ---------- */

.qe-account {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  margin-top: 2.5rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid rgba(157, 77, 255, 0.45);
  border-radius: 1.25rem;
  background: rgba(157, 77, 255, 0.08);
}

.qe-account-title {
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.qe-account p {
  max-width: 60ch;
  margin: 0;
  line-height: 1.55;
  color: var(--qx-muted);
}

.qe-account a:not(.qx-btn) {
  color: var(--qx-ink);
}

/* ---------- The route: typical vendor vs. a direct line ---------- */

.qe-compare {
  display: grid;
  gap: clamp(2.5rem, 5vw, 3.5rem);
}

.qe-route-label {
  margin: 0 0 1rem;
  font-family: var(--qx-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--qx-faint);
}

/* a chip: solid border for the two ends, dashed for the hops in between */
.qe-node,
.qe-hops li {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1rem;
  border: 1px solid rgba(244, 244, 247, 0.25);
  border-radius: 0.8rem;
  background: var(--qx-surface);
  font-weight: 600;
  white-space: nowrap;
}

.qe-node--lit {
  border-color: transparent;
  background: var(--qx-ink);
  color: #050507;
}

/* the slow route: every hop joined to the next by a small arrow */
.qe-hops {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem 2.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.qe-hops li {
  position: relative;
}

.qe-hops li.qe-hop {
  border-style: dashed;
  border-color: rgba(244, 244, 247, 0.22);
  background: none;
  color: var(--qx-muted);
}

.qe-hops li + li::before {
  content: '\2192';
  position: absolute;
  left: -1.6rem;
  color: var(--qx-faint);
}

/* the direct route: one wire, full width */
.qe-direct {
  display: flex;
  align-items: center;
}

.qe-wire {
  position: relative;
  flex: 1;
  height: 2px;
  margin-inline: 0.75rem;
  background: var(--qx-spectrum);
  transform-origin: left;
}

/* a small packet travelling the line */
.qe-wire i {
  position: absolute;
  top: 50%;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 14px #fff;
  transform: translate(-50%, -50%);
  opacity: 0;
}

/* choreography: hops appear one by one, the slow route recedes, then the wire draws */
.qx-js .qe-hops li {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.45s ease, transform 0.6s var(--qx-ease);
}

.qx-js .qe-compare.is-in .qe-hops li { opacity: 1; transform: none; }
.qx-js .qe-compare.is-in .qe-hops li:nth-child(1) { transition-delay: 0.1s; }
.qx-js .qe-compare.is-in .qe-hops li:nth-child(2) { transition-delay: 0.35s; }
.qx-js .qe-compare.is-in .qe-hops li:nth-child(3) { transition-delay: 0.6s; }
.qx-js .qe-compare.is-in .qe-hops li:nth-child(4) { transition-delay: 0.85s; }
.qx-js .qe-compare.is-in .qe-hops li:nth-child(5) { transition-delay: 1.1s; }
.qx-js .qe-compare.is-in .qe-hops li:nth-child(6) { transition-delay: 1.35s; }

.qe-route--slow {
  transition: opacity 0.8s ease 2s;
}

.qe-compare.is-in .qe-route--slow {
  opacity: 0.5;
}

.qx-js .qe-route--direct .qe-node {
  opacity: 0;
  transition: opacity 0.5s ease 1.9s;
}

.qx-js .qe-route--direct .qe-node--lit {
  transition-delay: 2.45s;
}

.qx-js .qe-wire {
  transform: scaleX(0);
  transition: transform 0.55s cubic-bezier(0.65, 0, 0.35, 1) 2s;
}

.qx-js .qe-compare.is-in .qe-route--direct .qe-node { opacity: 1; }
.qx-js .qe-compare.is-in .qe-wire { transform: scaleX(1); }

.qe-compare.is-in .qe-wire i {
  animation: qe-packet 2.4s cubic-bezier(0.65, 0, 0.35, 1) 2.7s infinite;
}

/* ---------- Compliance ---------- */

.qe-compliance {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(3rem, 6vw, 6rem);
  align-items: start;
}

.qe-compliance-text {
  max-width: 50ch;
  margin: 1.5rem 0 0;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--qx-muted);
}

.qe-badges {
  display: flex;
  gap: 0.6rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}

.qe-badges li {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--qx-line);
  border-radius: 999px;
  font-family: var(--qx-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

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

.qe-links a {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding-block: 1.35rem;
  border-bottom: 1px solid var(--qx-line);
  color: var(--qx-ink);
  text-decoration: none;
}

.qe-link-kind {
  font-family: var(--qx-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--qx-faint);
}

.qe-link-name {
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  transition: transform 0.5s var(--qx-ease);
}

.qe-links svg {
  opacity: 0.5;
  transition: transform 0.5s var(--qx-ease), opacity 0.3s ease;
}

.qe-links a:hover .qe-link-name { transform: translateX(0.4rem); }
.qe-links a:hover svg { opacity: 1; transform: translateX(4px); }

@keyframes qe-packet {
  0% { left: 0; opacity: 0; }
  10% { opacity: 1; }
  80% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

/* ---------- Mobile ---------- */

@media (max-width: 899px) {
  .qe-compliance {
    grid-template-columns: 1fr;
  }

  .qe-links a {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .qe-link-kind {
    grid-column: 1 / -1;
  }

  .qe-direct {
    flex-direction: column;
    align-items: flex-start;
  }

  .qe-wire {
    flex: none;
    width: 2px;
    height: 3rem;
    margin: 0.6rem 0 0.6rem 1.5rem;
    background: linear-gradient(var(--qx-red), var(--qx-purple), var(--qx-blue));
    transform-origin: top;
  }

  .qx-js .qe-wire {
    transform: scaleY(0);
  }

  .qx-js .qe-compare.is-in .qe-wire {
    transform: scaleY(1);
  }

  .qe-wire i {
    display: none;
  }
}
