/* ============================================================
   Sticky CTA bar
   Floating dark pill bottom-center on long pages.
   Appears after the hero is offscreen, hides when the final
   in-flow CTA section enters the viewport (no redundant stack).
   ============================================================ */

.sticky-cta {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(140%);
  z-index: 55;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 8px 8px 8px 22px;
  max-width: calc(100vw - 24px);
  background: rgba(7, 16, 30, 0.96);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 20px 50px -16px rgba(7, 16, 30, 0.55);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.24s ease;
  will-change: transform, opacity;
}

.sticky-cta.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.sticky-cta .ctx {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
}
.sticky-cta .ctx .e {
  color: #6FA9FF;
  font-weight: 600;
}
.sticky-cta .ctx .sep {
  color: rgba(255, 255, 255, 0.25);
}
.sticky-cta .ctx .d {
  color: rgba(255, 255, 255, 0.6);
}

.sticky-cta .q-btn.primary {
  background: #fff !important;
  color: var(--ink-1) !important;
  border-color: #fff !important;
  font-size: 13px;
  height: 40px;
  padding: 0 16px;
  white-space: nowrap;
}
.sticky-cta .q-btn.primary .arr {
  width: 14px;
  height: 14px;
}

.sticky-cta .dismiss {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-right: -4px;
  transition: color 0.15s, background 0.15s;
}
.sticky-cta .dismiss:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* Mobile: stretch wider, allow context line to truncate */
@media (max-width: 560px) {
  .sticky-cta {
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    transform: translateY(140%);
    max-width: none;
    padding: 8px 8px 8px 16px;
    gap: 10px;
  }
  .sticky-cta.is-visible {
    transform: translateY(0);
  }
  .sticky-cta .ctx .d {
    display: none;
  }
  .sticky-cta .q-btn.primary {
    font-size: 12.5px;
    height: 38px;
    padding: 0 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sticky-cta {
    transition: opacity 0.2s ease;
    transform: translateX(-50%) translateY(0);
  }
  @media (max-width: 560px) {
    .sticky-cta { transform: translateY(0); }
  }
}
