/* ═══════════════════════════════════════════════════════════════
   YANKEE — Mission Protocol Section
   Agent Yankee | Whiskey-7 Engineering
   ═══════════════════════════════════════════════════════════════
   Asymmetric command-center layout. Left = context panel,
   Right = deployment pipeline console. All classes prefixed mp-.
   ═══════════════════════════════════════════════════════════════ */

/* ── Section Container ── */
.mp-section {
  position: relative;
  padding: clamp(5rem, 10vw, 8rem) 0;
  overflow: hidden;
}

.mp-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 70% 50%, rgba(var(--purple-rgb), 0.06), transparent),
    radial-gradient(ellipse 40% 50% at 20% 60%, rgba(var(--cyan-rgb), 0.04), transparent);
  pointer-events: none;
}

/* ── Layout Grid: Asymmetric Split ── */
.mp-layout {
  display: grid;
  grid-template-columns: 38% 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

/* ═══════════════════════════════════════
   LEFT PANEL — Context / Framing
   ═══════════════════════════════════════ */
.mp-context {
  position: sticky;
  top: 8rem;
  padding-right: 2rem;
}

.mp-label-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.mp-label-line {
  width: 2.5rem;
  height: 1px;
  background: var(--purple);
  flex-shrink: 0;
}

.mp-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--purple-light);
}

.mp-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.mp-heading .mp-heading-accent {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mp-tagline {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 32ch;
}

/* Status indicator block */
.mp-status-block {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(var(--purple-rgb), 0.03);
}

.mp-status-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.mp-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 6px rgba(var(--emerald-rgb), 0.6);
  animation: mp-pulse 2.5s ease-in-out infinite;
}

.mp-status-dot--amber {
  background: var(--amber);
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.6);
  animation-delay: 0.8s;
}

.mp-status-dot--cyan {
  background: var(--cyan);
  box-shadow: 0 0 6px rgba(var(--cyan-rgb), 0.6);
  animation-delay: 1.6s;
}

.mp-status-value {
  color: var(--text-dim);
  margin-left: auto;
}

/* ═══════════════════════════════════════
   RIGHT PANEL — Pipeline Console
   ═══════════════════════════════════════ */
.mp-console {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}

/* Scanline overlay */
.mp-console::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.008) 2px,
    rgba(255, 255, 255, 0.008) 4px
  );
  pointer-events: none;
  z-index: 1;
}

/* Console header bar */
.mp-console-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--elevated);
}

.mp-console-dots {
  display: flex;
  gap: 6px;
}

.mp-console-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-ghost);
}

.mp-console-dot:nth-child(1) { background: rgba(139, 92, 246, 0.35); }
.mp-console-dot:nth-child(2) { background: rgba(139, 92, 246, 0.35); }
.mp-console-dot:nth-child(3) { background: rgba(139, 92, 246, 0.35); }

.mp-console-title {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.mp-console-body {
  padding: clamp(1.5rem, 3vw, 2.5rem);
  position: relative;
  z-index: 2;
}

/* ═══════════════════════════════════════
   PIPELINE STAGES
   ═══════════════════════════════════════ */
.mp-pipeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Individual stage */
.mp-stage {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.mp-stage.mp-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Timeline column */
.mp-timeline {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 0.25rem;
}

/* Stage number badge */
.mp-stage-num {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--elevated);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--purple-light);
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.mp-stage:hover .mp-stage-num {
  border-color: rgba(var(--purple-rgb), 0.4);
  box-shadow: 0 0 20px rgba(var(--purple-rgb), 0.15);
}

/* Connector line between stages */
.mp-connector {
  width: 1px;
  flex: 1;
  min-height: 1.5rem;
  position: relative;
  overflow: hidden;
}

.mp-connector-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, var(--purple), rgba(var(--cyan-rgb), 0.3));
  transition: height 0.8s ease 0.3s;
}

.mp-stage.mp-visible .mp-connector-line {
  height: 100%;
}

/* Stage content */
.mp-stage-content {
  padding-bottom: 2.5rem;
}

.mp-stage:last-child .mp-stage-content {
  padding-bottom: 0;
}

.mp-stage:last-child .mp-connector {
  display: none;
}

.mp-stage-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.625rem;
}

.mp-stage-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px rgba(var(--emerald-rgb), 0.5);
  animation: mp-pulse 2.5s ease-in-out infinite;
}

.mp-stage:nth-child(2) .mp-stage-indicator {
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(var(--cyan-rgb), 0.5);
  animation-delay: 0.5s;
}

.mp-stage:nth-child(3) .mp-stage-indicator {
  background: var(--purple-light);
  box-shadow: 0 0 8px rgba(var(--purple-rgb), 0.5);
  animation-delay: 1s;
}

.mp-stage-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

.mp-stage-desc {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 48ch;
}

/* Progress bar under each stage */
.mp-stage-progress {
  margin-top: 1rem;
  height: 2px;
  background: var(--border);
  border-radius: 1px;
  overflow: hidden;
  max-width: 200px;
}

.mp-stage-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 1px;
  transition: width 1.2s ease 0.5s;
}

.mp-stage.mp-visible .mp-stage-progress-fill {
  width: 100%;
}

.mp-stage:nth-child(1) .mp-stage-progress-fill {
  background: linear-gradient(90deg, var(--emerald), rgba(var(--emerald-rgb), 0.3));
}

.mp-stage:nth-child(2) .mp-stage-progress-fill {
  background: linear-gradient(90deg, var(--cyan), rgba(var(--cyan-rgb), 0.3));
}

.mp-stage:nth-child(3) .mp-stage-progress-fill {
  background: linear-gradient(90deg, var(--purple-light), rgba(var(--purple-rgb), 0.3));
}

/* Console footer */
.mp-console-footer {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--elevated);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-faint);
}

.mp-console-cursor {
  display: inline-block;
  width: 7px;
  height: 14px;
  background: var(--purple);
  animation: mp-blink 1s step-end infinite;
}

/* ═══════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════ */
@keyframes mp-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

@keyframes mp-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Context panel reveal */
.mp-context {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.mp-context.mp-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Console reveal */
.mp-console {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease 0.2s, transform 0.7s ease 0.2s;
}

.mp-console.mp-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 900px) {
  .mp-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .mp-context {
    position: static;
    padding-right: 0;
    text-align: center;
  }

  .mp-label-group {
    justify-content: center;
  }

  .mp-tagline {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .mp-status-block {
    max-width: 320px;
    margin: 0 auto;
  }

  .mp-heading {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
  }
}

@media (max-width: 480px) {
  .mp-section {
    padding: 4rem 0;
  }

  .mp-console-body {
    padding: 1.25rem;
  }

  .mp-stage {
    gap: 0 1rem;
  }

  .mp-stage-num {
    width: 34px;
    height: 34px;
    font-size: var(--text-xs);
  }

  .mp-stage-name {
    font-size: var(--text-base);
  }

  .mp-stage-desc {
    font-size: var(--text-xs);
  }
}
