/* ===== Scene switching ===== */
.ps-scene {
  display: none;
}

.ps-scene.is-active {
  display: block;
  animation: scene-in 0.34s ease both;
}

@keyframes scene-in {
  from {
    opacity: 0;
    transform: scale(1.02);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ===== Process showcase entrance animations ===== */
.ps-scene.is-active .sc-chip {
  animation: rise-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.ps-scene.is-active .sc-chip:nth-child(2) {
  animation-delay: 0.12s;
}
.ps-scene.is-active .sc-chip:nth-child(3) {
  animation-delay: 0.24s;
}
.ps-scene.is-active .sc-chip:nth-child(4) {
  animation-delay: 0.36s;
}

.ps-scene.is-active .sc-line {
  animation: line-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.ps-scene.is-active .sc-line:nth-child(2) {
  animation-delay: 0.05s;
}
.ps-scene.is-active .sc-line:nth-child(3) {
  animation-delay: 0.22s;
}
.ps-scene.is-active .sc-line:nth-child(4) {
  animation-delay: 0.38s;
}
.ps-scene.is-active .sc-line:nth-child(5) {
  animation-delay: 0.54s;
}

.ps-scene.is-active .sc-board {
  animation: board-in 0.62s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.ps-scene.is-active .sc-board:nth-child(1) {
  animation-delay: 0.08s;
}
.ps-scene.is-active .sc-board:nth-child(2) {
  animation-delay: 0.22s;
}
.ps-scene.is-active .sc-board:nth-child(3) {
  animation-delay: 0.36s;
}

.ps-scene.is-active .sc-cell.is-done img {
  animation: cell-in 0.55s ease both;
}
.ps-scene.is-active .sc-cell:nth-child(2) img {
  animation-delay: 0.1s;
}
.ps-scene.is-active .sc-cell:nth-child(3) img {
  animation-delay: 0.2s;
}
.ps-scene.is-active .sc-cell:nth-child(4) img {
  animation-delay: 0.3s;
}
.ps-scene.is-active .sc-cell:nth-child(5) img {
  animation-delay: 0.4s;
}
.ps-scene.is-active .sc-cell:nth-child(6) img {
  animation-delay: 0.5s;
}
.ps-scene.is-active .sc-cell.is-match .sc-tag {
  animation: fade-in 0.3s ease 1s both;
}

.ps-scene.is-active .sc-clip {
  animation: clip-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.ps-scene.is-active .sc-clip:nth-child(2) {
  animation-delay: 0.08s;
}
.ps-scene.is-active .sc-clip:nth-child(3) {
  animation-delay: 0.16s;
}
.ps-scene.is-active .sc-clip:nth-child(4) {
  animation-delay: 0.24s;
}
.ps-scene.is-active .sc-clip:nth-child(5) {
  animation-delay: 0.32s;
}

.ps-scene.is-active .sc-subclip {
  animation: rise-in 0.4s ease both;
}
.ps-scene.is-active .sc-subclip + .sc-subclip {
  animation-delay: 0.18s;
}

.ps-scene.is-active .sc-wave {
  animation: wave-in 0.5s ease both;
}

.ps-scene.is-active .sc-export-bar i {
  animation: bar-grow 1.1s ease 0.15s both;
}

/* ===== Assistant showcase entrance animations ===== */
.ps-scene.is-active .ai-bubble,
.ps-scene.is-active .ai-card,
.ps-scene.is-active .ai-tag,
.ps-scene.is-active .ai-btn,
.ps-scene.is-active .ai-line,
.ps-scene.is-active .ai-tool,
.ps-scene.is-active .ai-bar,
.ps-scene.is-active .ai-free {
  animation: rise-in 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.ps-scene.is-active .ai-bubble--bot {
  animation-delay: 0.18s;
}
.ps-scene.is-active .ai-bubble--bot .ai-reply,
.ps-scene.is-active .ai-bubble--bot .ai-tags {
  animation: rise-in 0.4s ease 0.3s both;
}
.ps-scene.is-active .ai-card {
  animation-delay: 0.45s;
}
.ps-scene.is-active .ai-tag:nth-child(2) {
  animation-delay: 0.34s;
}
.ps-scene.is-active .ai-tag:nth-child(3) {
  animation-delay: 0.42s;
}
.ps-scene.is-active .ai-tag:nth-child(4) {
  animation-delay: 0.5s;
}
.ps-scene.is-active .ai-btn {
  animation-delay: 0.72s;
}
.ps-scene.is-active .ai-line:nth-child(2) {
  animation-delay: 0.18s;
}
.ps-scene.is-active .ai-line:nth-child(3) {
  animation-delay: 0.36s;
}
.ps-scene.is-active .ai-line:nth-child(4) {
  animation-delay: 0.54s;
}
.ps-scene.is-active .ai-line:nth-child(5) {
  animation-delay: 0.72s;
}
.ps-scene.is-active .ai-line:nth-child(6) {
  animation-delay: 0.9s;
}
.ps-scene.is-active .ai-tools {
  animation: rise-in 0.4s ease 0.55s both;
}
.ps-scene.is-active .ai-bar {
  animation-delay: 0.7s;
}
.ps-scene.is-active .ai-bar i {
  animation: bar-grow 0.9s ease 0.9s both;
}
.ps-scene.is-active .ai-free {
  animation-delay: 0.15s;
}
.ps-scene.is-active .ai-free-out img {
  animation: cell-in 0.6s ease 0.35s both;
}
.ps-scene.is-active .ai-free-badge,
.ps-scene.is-active .ai-phone-play {
  animation: fade-in 0.35s ease 0.9s both;
}
.ps-scene.is-active .ai-phone img {
  animation: cell-in 0.7s ease 0.2s both;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes line-in {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes board-in {
  from {
    opacity: 0;
    transform: translate(40px, var(--y)) rotate(calc(var(--r) * 3));
  }
  to {
    opacity: 1;
    transform: translateY(var(--y)) rotate(var(--r));
  }
}

@keyframes cell-in {
  from {
    opacity: 0;
    filter: blur(8px);
    transform: scale(1.06);
  }
  to {
    opacity: 1;
    filter: none;
    transform: none;
  }
}

@keyframes clip-in {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes wave-in {
  from {
    opacity: 0;
    transform: scaleY(0.2);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes bar-grow {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* ===== Hero fallback ===== */
.h3d-fallback[hidden] {
  display: none;
}

/* ===== Modal ===== */
.modal-overlay[hidden] {
  display: none;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  z-index: 2000;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid #333;
  background: #1f1f1f;
  color: #fafafa;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}
