/* Entry 005 — The handoff console
   Scene art direction: mission control at night. Cold navy depth,
   a faint aurora of machine activity, one warm amber interruption. */

.console-scene {
  display: grid;
  place-items: center;
  min-height: 760px;
  padding: 72px 32px;
  border-color: rgba(14, 20, 38, 0.6);
  /* background-first: a sleek dark fold, the console floating in the dark */
  background-image:
    linear-gradient(180deg, rgba(6, 9, 16, 0.55) 0%, rgba(8, 12, 22, 0.34) 45%, rgba(5, 8, 16, 0.66) 100%),
    url("../../public/media/backgrounds/night-06-anton.jpg");
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}

/* machine-activity aurora */
.aurora {
  position: absolute;
  inset: -10%;
  z-index: 0;
  background:
    radial-gradient(ellipse 50% 9% at 30% 30%, rgba(110, 190, 200, 0.13), transparent 70%),
    radial-gradient(ellipse 60% 10% at 72% 48%, rgba(120, 150, 230, 0.11), transparent 70%),
    radial-gradient(ellipse 45% 8% at 45% 68%, rgba(110, 190, 200, 0.09), transparent 70%);
  filter: blur(28px);
  animation: pulse 9s ease-in-out infinite alternate;
}

@keyframes pulse {
  from { opacity: 0.7; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .aurora { animation: none; }
}

/* ---- the console: dark glass slab -------------------------------------- */

.console {
  position: relative;
  z-index: 2;
  width: min(660px, 100%);
  display: grid;
  gap: 16px;
  border-radius: 32px;
  background: linear-gradient(170deg, rgba(28, 40, 64, 0.6), rgba(14, 20, 38, 0.72));
  border: 1px solid rgba(160, 190, 235, 0.18);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 48px 110px rgba(2, 6, 18, 0.65);
  backdrop-filter: blur(24px) saturate(1.25);
  -webkit-backdrop-filter: blur(24px) saturate(1.25);
  padding: 26px;
  font-family: var(--ui-sans);
  color: #e8eefa;
}

.console-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 2px 6px 10px;
}

.console-kicker {
  margin: 0 0 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(170, 196, 235, 0.65);
}

.console-head h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f4f7fd;
}

.console-clock {
  font-size: 12px;
  color: rgba(170, 196, 235, 0.55);
}

/* ---- lanes ----------------------------------------------------------------- */

.lane {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(160, 190, 235, 0.12);
  padding: 18px;
  transition: background 300ms ease, border-color 300ms ease, opacity 300ms ease;
}

/* let the running lanes recede so the one that needs you is the focal point */
.console .lane:not(.lane-alert) { opacity: 0.86; }

.lane-glyph {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.3), transparent 50%),
    linear-gradient(150deg, #3f5f8f, #22344f);
  position: relative;
}

.lane-glyph::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8fe0d0;
  box-shadow: 0 0 12px rgba(143, 224, 208, 0.9);
  animation: blink 2.4s ease-in-out infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .lane-glyph::after { animation: none; }
}

.lane[data-state="drifting"] .lane-glyph::after {
  background: #9fb0d0;
  box-shadow: 0 0 10px rgba(159, 176, 208, 0.7);
}

.lane-body { display: grid; gap: 8px; }

.lane-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
}

.lane-top strong {
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: #f4f7fd;
}

.lane-status {
  flex: none;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8fe0d0;
}

.lane[data-state="drifting"] .lane-status { color: #9fb0d0; }

.lane-detail {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(232, 238, 250, 0.66);
}

/* confidence meter */
.confidence {
  display: flex;
  align-items: center;
  gap: 10px;
}

.confidence i {
  position: relative;
  width: 120px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.confidence i::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--c, 50%);
  border-radius: 999px;
  background: linear-gradient(90deg, #5f86c4, #8fe0d0);
  transition: width 700ms ease;
}

.confidence span {
  font-size: 11px;
  color: rgba(170, 196, 235, 0.6);
}

/* ---- the interruption: one warm lane ----------------------------------------- */

.lane-alert {
  background: rgba(228, 160, 70, 0.12);
  border-color: rgba(240, 184, 108, 0.55);
  box-shadow: 0 0 60px rgba(240, 184, 108, 0.2);
  opacity: 1;
}

.lane-alert .lane-glyph {
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.35), transparent 50%),
    linear-gradient(150deg, #b07a32, #74501f);
}

.lane-alert .lane-glyph::after {
  background: #ffce7e;
  box-shadow: 0 0 14px rgba(255, 206, 126, 1);
  animation-duration: 1.3s;
}

.lane-alert .lane-status { color: #ffce7e; }

.lane-alert .confidence i::after {
  background: linear-gradient(90deg, #b07a32, #ffce7e);
}

.decision {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 4px;
}

.decide {
  border: 1px solid rgba(255, 206, 126, 0.5);
  border-radius: 999px;
  background: transparent;
  padding: 10px 16px;
  font: 600 12.5px/1 var(--ui-sans);
  color: #ffe2b0;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.decide:hover {
  background: rgba(255, 206, 126, 0.14);
}

.decide.picked,
.decide:focus-visible {
  background: #ffce7e;
  border-color: #ffce7e;
  color: #3a2a10;
}

/* resolved state */
.lane-alert.resolved {
  background: rgba(143, 224, 208, 0.06);
  border-color: rgba(143, 224, 208, 0.3);
  box-shadow: none;
}

.lane-alert.resolved .lane-status { color: #8fe0d0; }

.lane-alert.resolved .lane-glyph {
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.3), transparent 50%),
    linear-gradient(150deg, #3f5f8f, #22344f);
}

.lane-alert.resolved .lane-glyph::after {
  background: #8fe0d0;
  box-shadow: 0 0 12px rgba(143, 224, 208, 0.9);
  animation-duration: 2.4s;
}

.lane-alert.resolved .confidence i::after {
  background: linear-gradient(90deg, #5f86c4, #8fe0d0);
}

.console-foot {
  padding: 8px 6px 2px;
  font-size: 12.5px;
  color: rgba(170, 196, 235, 0.55);
}

@media (max-width: 640px) {
  .console-scene { padding: 44px 16px; min-height: 0; }

  .lane { grid-template-columns: 1fr; }

  .lane-glyph { display: none; }

  .lane-top { flex-direction: column; gap: 4px; }
}
