/* App shelf in the hero: the apps as they sit on a phone. */

.shelf { --ink: #0B1636; --line: #BCD0F2; --panel: #EAF1FD; --live: #0B7A4F; --surface: #fff; color: #0B1636; background: var(--panel); border-radius: 40px; padding: clamp(24px, 4vw, 40px) clamp(18px, 3vw, 32px) 22px; max-width: 460px; width: 100%; justify-self: center; }
.shelf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px 8px; }
.app { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; text-decoration: none; font-weight: 700; font-size: .95rem; line-height: 1.2; min-width: 0; }
.app-name { overflow-wrap: anywhere; hyphens: auto; }
.app-tile {
  position: relative; width: clamp(70px, 20vw, 92px); aspect-ratio: 1; border-radius: 23%;
  background: var(--line);
}
.app-tile img { width: 100%; height: 100%; border-radius: 23%; object-fit: cover; }
.app-tile .pad { background: #fff; padding: 12%; }
.app-live .app-tile::after {
  content: ""; position: absolute; right: -4px; top: -4px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--live); border: 3px solid var(--panel);
}
.app-live:hover .app-tile img { transform: scale(1.06); }
.app-tile img { transition: transform .2s; }
.app-ghost .app-tile { background: transparent; border: 2px dashed var(--ink); display: grid; place-items: center; }
.app-ghost .mono { font-family: var(--display); font-size: 1.9rem; }
.app-ghost:hover .app-tile { background: var(--surface); }
.app-ring { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); pointer-events: none; }
.app-ring circle { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.shelf-note { margin: 26px 0 0; font-weight: 700; font-size: .95rem; text-align: center; }

/* Each live app "installs" once on load */
@media (prefers-reduced-motion: no-preference) {
  .app-live .app-tile img { animation: pop .45s cubic-bezier(.2, 1.4, .4, 1) both; animation-delay: calc(var(--i) * .32s + .75s); }
  .app-live .app-tile::after { animation: pop .3s ease-out both; animation-delay: calc(var(--i) * .32s + 1.1s); }
  .app-ring circle { stroke-dasharray: 100; stroke-dashoffset: 100; animation: ring .7s ease-in-out forwards, fade .2s ease-out forwards; animation-delay: calc(var(--i) * .32s), calc(var(--i) * .32s + .7s); }
  .app-ghost .app-tile { animation: fadein .5s both; animation-delay: 1.9s; }
  .app-ghost .app-name { animation: fadein .5s both; animation-delay: 1.9s; }
}
@keyframes pop { from { opacity: 0; transform: scale(.55); } to { opacity: 1; transform: scale(1); } }
@keyframes ring { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 0; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .app-ring { display: none; } }
