/* ==========================================================================
   NEXORA — Launch Sequence Section
   Section-scoped styles. Reuses the shared design tokens/type-scale;
   composition is deliberately different from the ownership section above
   it — a single console panel (status rail + compact module strip +
   detail readout) rather than a flanking editorial layout.
   ========================================================================== */

.launch {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.launch__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.launch__bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.launch__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(150px);
  opacity: 0.12;
}

.launch__glow--cyan {
  width: 500px;
  height: 500px;
  top: -140px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-primary);
}

.launch__glow--violet {
  width: 360px;
  height: 360px;
  bottom: -120px;
  right: -80px;
  background: var(--accent-secondary);
  opacity: 0.1;
}

/* --------------------------------------------------------------------------
   Heading
   -------------------------------------------------------------------------- */
.launch__head {
  max-width: 620px;
  margin-inline: auto;
  text-align: center;
  margin-bottom: clamp(48px, 7vw, 80px);
}

.launch__head .text-eyebrow {
  justify-content: center;
  width: fit-content;
  margin-inline: auto;
  margin-bottom: var(--space-4);
}

.launch__heading {
  font-size: var(--text-h2);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: var(--space-4);
}

.launch__lead {
  font-size: var(--text-body-lg);
  color: var(--text-secondary);
  line-height: var(--lh-normal);
}

/* --------------------------------------------------------------------------
   Console panel
   -------------------------------------------------------------------------- */
.console {
  max-width: 780px;
  margin: 0 auto clamp(32px, 5vw, 48px);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 40px);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.console__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
}

.console__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
  color: var(--accent-primary-strong);
  transition: color 0.3s ease;
}

.console__status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: launch-pulse 2.2s ease-in-out infinite;
}

.console__status.is-live {
  color: var(--success);
}

/* Segmented progress rail — deliberately not the reference's single line */
.console__rail {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.console__segment {
  flex: 1;
  height: 3px;
  border-radius: var(--radius-pill);
  background: var(--border-color);
  overflow: hidden;
}

.console__segment-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
  border-radius: inherit;
}

.console__segment.is-complete .console__segment-fill {
  width: 100%;
}

/* Compact module strip */
.console__modules {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.console__module {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
  opacity: 0.5;
  transition:
    opacity 0.4s var(--ease-premium),
    border-color 0.4s var(--ease-premium),
    background 0.4s var(--ease-premium),
    box-shadow 0.4s var(--ease-premium),
    transform 0.3s var(--ease-premium);
}

.console__module-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  transition: background 0.4s var(--ease-premium), color 0.4s var(--ease-premium);
}

.console__module-label {
  font-size: 10.5px;
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  transition: color 0.4s var(--ease-premium);
}

.console__module.is-complete {
  opacity: 0.85;
}

.console__module.is-complete .console__module-icon {
  background: rgba(52, 211, 153, 0.14);
  color: var(--success);
}

.console__module.is-complete .console__module-label {
  color: var(--text-secondary);
}

.console__module.is-active {
  opacity: 1;
  border-color: var(--border-accent);
  background: var(--accent-gradient-soft);
  box-shadow: 0 0 24px -10px rgba(34, 211, 238, 0.5);
  transform: translateY(-2px);
}

.console__module.is-active .console__module-icon {
  background: var(--accent-gradient);
  color: #05121a;
  animation: launch-pulse-icon 2s ease-in-out infinite;
}

.console__module.is-active .console__module-label {
  color: var(--text-primary);
}

/* Detail readout — the "current step detail panel" */
.console__detail {
  border-top: 1px solid var(--border-color);
  padding-top: var(--space-5);
  transition:
    opacity 0.24s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.24s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.24s cubic-bezier(0.4, 0, 0.2, 1);
  filter: blur(0);
  min-height: 8.5em;
}

.console__detail.is-out {
  opacity: 0;
  transform: translateY(-8px);
  filter: blur(2px);
}

.console__detail.is-prep {
  opacity: 0;
  transform: translateY(8px);
  filter: blur(2px);
  transition: none;
}

.console__detail-eyebrow {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.console__detail-eyebrow span {
  color: var(--accent-primary);
  font-family: var(--font-display);
}

.console__detail-title {
  font-size: var(--text-card-title);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--space-2);
}

.console__detail-desc {
  font-size: var(--text-body);
  color: var(--text-secondary);
  line-height: var(--lh-normal);
  max-width: 480px;
  margin-bottom: var(--space-3);
}

.console__detail-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--success);
}

.console__detail-status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  animation: launch-pulse 2.2s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   Stage navigation — click/tap to jump
   -------------------------------------------------------------------------- */
.launch__nav {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.stage-tab {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.55em 1.1em;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: border-color 0.35s var(--ease-premium), color 0.35s var(--ease-premium), background 0.35s var(--ease-premium), transform 0.25s var(--ease-premium);
}

.stage-tab:hover {
  color: var(--text-primary);
  transform: translateY(-1px);
}

.stage-tab.is-active {
  border-color: var(--border-accent);
  background: var(--accent-gradient-soft);
  color: var(--text-primary);
}

.stage-tab__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.stage-tab.is-active .stage-tab__dot {
  opacity: 1;
  background: var(--accent-primary);
}

/* --------------------------------------------------------------------------
   Keyframes
   -------------------------------------------------------------------------- */
@keyframes launch-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

@keyframes launch-pulse-icon {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.5); }
  50% { box-shadow: 0 0 0 5px rgba(34, 211, 238, 0); }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 639px) {
  .console__modules {
    grid-template-columns: repeat(2, 1fr);
  }

  .console__module-label {
    font-size: 10px;
  }

  .launch__nav {
    gap: var(--space-2);
  }

  .stage-tab {
    padding: 0.5em 0.85em;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .console__status .dot,
  .console__detail-status .dot,
  .console__module.is-active .console__module-icon {
    animation: none !important;
    opacity: 0.9;
  }

  .console__detail {
    transition: none;
  }
}
