/* Town Crier's setup animation: four steps. Town Crier is in it from the first beat.
   1 the folder in your AI app  2 the chat  3 the plan  4 drafts every morning */
.tc-folder { position: absolute; z-index: 5; left: 6%; top: 40%; width: 17%; aspect-ratio: 1.25; opacity: 0; transform: translateY(-40%) scale(.6) rotate(-6deg); transition: transform .7s var(--pop), opacity .3s ease; }
.tc-folder .tab { position: absolute; left: 0; top: 0; width: 42%; height: 18%; border-radius: 1cqw 1cqw 0 0; background: #e3a12b; }
.tc-folder .body { position: absolute; left: 0; right: 0; top: 12%; bottom: 0; border-radius: 0 1.2cqw 1.2cqw 1.2cqw; background: linear-gradient(180deg, #f6c766, #e09a22); box-shadow: 0 1.6cqw 3cqw -1cqw rgba(120, 80, 10, .55); display: grid; place-items: end start; padding: 1.2cqw; }
.tc-folder .body b { font: 800 1.5cqw/1 var(--display); color: #262523; letter-spacing: -.01em; }
.at-1 .tc-folder { opacity: 1; transform: none; }
/* Town Crier hops onto the folder */
.tc-a0 { left: 8%; bottom: 52%; height: 26%; transform: translateY(-80%) scale(.5); }
.at-1 .tc-a0 { opacity: 1; transform: none; transition-delay: .5s; animation: tchop .6s ease-in-out 1.3s 2; }
@keyframes tchop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-14%) scale(1.03, .97); } }
.tc-win { left: 31%; top: 20%; width: 63%; height: 72%; opacity: 0; transform: translateY(8%) scale(.94); transition: transform .7s var(--pop), opacity .3s ease; }
.tc-win .chip-mini { font-style: normal; margin-left: .6cqw; padding: .3cqw .7cqw; border-radius: 99px; background: #fff; box-shadow: 0 0 0 1px #e6dece; font: 700 1cqw/1 var(--body); color: #4e4b47; }
.tc-win .bar span { margin-right: auto; }
.at-1 .tc-win { opacity: 1; transform: none; transition-delay: 1.4s; }
.tc-chat { position: absolute; inset: 3.4cqw 0 0 0; padding: 1.8cqw 2cqw; background: linear-gradient(180deg, #fdfbf6, #f8f3e8); }
.tc-chat .an-bub { position: relative; display: table; margin: 0 0 1cqw; }
.tc-chat .an-bub.me { margin-left: auto; }
.tc-chat .an-bub.files { display: flex; width: max-content; margin-left: auto; align-items: center; gap: .6cqw; }
.tc-chat .files svg { width: 1.6cqw; height: 1.6cqw; }
.at-2 .tc-chat .an-bub { opacity: 1; transform: none; transition-delay: calc(.25s + var(--i) * 1s); }
.tc-plan { position: absolute; z-index: 12; left: 50%; top: 30%; width: 34%; padding: 2cqw 2.2cqw; border-radius: 1.6cqw; background: #fff; box-shadow: 0 2cqw 5cqw -1cqw rgba(40, 30, 15, .4); display: grid; gap: 1cqw; opacity: 0; transform: translate(-30%, 10%) scale(.9); transition: transform .6s var(--pop), opacity .3s ease; }
.tc-plan b { font: 800 2cqw/1 var(--display); letter-spacing: -.02em; color: #1c1b19; }
.tc-plan span { display: flex; align-items: center; gap: .8cqw; font: 700 1.5cqw/1.2 var(--body); color: #4e4b47; opacity: .35; transition: opacity .3s ease, color .3s ease; }
.tc-plan svg { width: 1.8cqw; height: 1.8cqw; padding: .3cqw; border-radius: 50%; background: #ece5d6; color: #fff; transition: background .3s ease; }
.at-3 .tc-plan { opacity: 1; transform: translate(-30%, 0); }
.at-3 .tc-plan span { opacity: 1; color: #1c1b19; transition-delay: calc(.4s + var(--i) * .5s); }
.at-3 .tc-plan span svg { background: #2f8a4c; transition-delay: calc(.4s + var(--i) * .5s); }
.tc-a1 { left: 4%; bottom: 4%; height: 40%; transform: translateY(10%) scale(.7); }
.at-3 .tc-a0 { opacity: 0; animation: none; }
.at-3 .tc-folder { opacity: 0; transform: scale(.7); }
.at-3 .tc-a1 { opacity: 1; transform: none; }
.at-4 .tc-plan { opacity: 0; transform: translate(-30%, -10%) scale(.9); }
.at-4 .tc-a1 { opacity: 0; }
.tc-a2 { left: 3%; bottom: 3%; height: 46%; transform: scale(.6); }
.at-4 .tc-a2 { opacity: 1; transform: none; animation: ring .5s ease-in-out .5s 4; }
@keyframes ring { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
.tc-d { left: calc(36% + var(--i) * 19.5%); top: 34%; width: 18.5%; }
.at-4 .tc-d { opacity: 1; transform: rotate(calc((var(--i) - 1) * 2deg)); transition-delay: calc(.8s + var(--i) * .35s); }
.at-4 .tc-win { opacity: .35; filter: blur(1px); transition: opacity .4s ease, filter .4s ease; }

/* phones: bigger words, fewer bubbles, the plan beside the chat */
@media (max-width: 640px) {
  .tc-chat .an-bub { font-size: 2.9cqw; padding: 1.3cqw 1.8cqw; margin-bottom: 1.4cqw; }
  .tc-chat .an-bub:nth-child(n+5) { display: none; }
  .tc-plan { width: 48%; left: 46%; padding: 2.6cqw; }
  .tc-plan b { font-size: 3.2cqw; }
  .tc-plan span { font-size: 2.6cqw; }
  .tc-plan svg { width: 2.8cqw; height: 2.8cqw; }
  .tc-folder .body b { font-size: 2.4cqw; }
  .tc-d { width: 20%; left: calc(33% + var(--i) * 21.5%); }
  .tc-d.d3 { display: none; }
}
