/* The hero's living device wall: four phones of different ages run the same
   agent commands. js/wall.js adds one state class at a time to .wall
   (is-nav, is-loaded, is-found, is-tapped, is-form, is-filled, is-shot);
   everything visible here follows from those classes. */

.wall {
  position: relative;
}

.wall-shelf {
  display: grid;
  grid-template-columns: 0.92fr 1fr 1fr 0.96fr;
  gap: clamp(8px, 1.4vw, 16px);
  align-items: end;
  padding: 0 4px;
}

/* Shown instead of the phones when scripts are off. */
.wall-still {
  width: 100%;
  height: auto;
  border-radius: 16px;
}

.wall-caption {
  margin-top: 14px;
  color: var(--k-muted);
  font-size: 14px;
  text-align: center;
}

/* States */
.is-nav .mini-progress {
  animation: wall-progress 900ms ease calc(var(--i) * 110ms) both;
}

.is-loaded .mini-view--home,
.is-form .mini-view--form {
  opacity: 1;
}

.is-form .mini-view--home {
  opacity: 0;
}

.is-found .mini-cta::before {
  opacity: 1;
}

.is-tapped .mini-cta {
  transform: scale(0.94);
}

.is-tapped .mini-cta::after {
  animation: wall-ripple 520ms ease-out calc(var(--i) * 90ms) both;
}

.is-form .mini-cta::before {
  opacity: 0;
}

.is-filled .mini-field {
  border-color: var(--k-pink);
}

.is-filled .mini-field span {
  max-width: 100%;
  transition: max-width 700ms steps(14) calc(var(--i) * 90ms);
}

.is-shot .mini-flash {
  animation: wall-flash 520ms ease-out calc(var(--i) * 120ms) both;
}

@keyframes wall-progress {
  0% {
    width: 0;
    opacity: 1;
  }

  80% {
    width: 100%;
    opacity: 1;
  }

  100% {
    width: 100%;
    opacity: 0;
  }
}

@keyframes wall-ripple {
  0% {
    opacity: 0.9;
    transform: scale(0.3);
  }

  100% {
    opacity: 0;
    transform: scale(2.2);
  }
}

@keyframes wall-flash {
  0% {
    opacity: 0;
  }

  18% {
    opacity: 0.95;
  }

  100% {
    opacity: 0;
  }
}

/* Agent console under the phones. */
.console {
  position: relative;
  z-index: 2;
  margin: 18px clamp(0px, 3vw, 28px) 0;
  border-radius: 14px;
  background: var(--k-ink);
  box-shadow: 0 30px 60px -28px rgba(0, 12, 48, 0.7);
  color: #fff;
}

.console-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.62);
  font-size: 12.5px;
  font-weight: 600;
}

.console-bar i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--k-mint);
  box-shadow: 0 0 0 3px rgba(66, 244, 188, 0.2);
}

.console-bar span {
  margin-left: auto;
  font-family: var(--k-mono);
  font-weight: 400;
}

.console-log {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  height: 124px;
  margin: 0;
  padding: 10px 14px 14px;
  list-style: none;
  font-family: var(--k-mono);
  font-size: 12.5px;
  line-height: 1.5;
}

.console-log li {
  overflow: hidden;
  flex: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  animation: wall-line 260ms ease both;
}

/* Console lines, here and under the Mac window (engines.css). */
.log-call b {
  color: var(--k-mint);
  font-weight: 500;
}

.log-call::before {
  margin-right: 8px;
  color: var(--k-pink);
  content: "→";
}

.log-ok {
  color: rgba(255, 255, 255, 0.66);
}

.log-ok::before {
  margin-right: 8px;
  color: var(--k-mint);
  content: "✓";
}

@keyframes wall-line {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

@media (max-width: 560px) {
  .console-log {
    height: 112px;
    font-size: 11px;
  }

  .phone {
    padding: 4px;
    border-radius: 16px;
  }

  .phone-screen {
    border-radius: 12px;
  }

  .phone--home {
    padding: 14px 4px 18px;
  }

  .phone--home::before {
    top: 6px;
  }

  .phone--home::after {
    bottom: 3px;
    width: 11px;
    height: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wall *,
  .wall *::before,
  .wall *::after {
    animation: none !important;
    transition: none !important;
  }
}
