/* Pokédex: splash and phone frame around the live app */

.phone { justify-self: center; width: min(100%, 20rem); }

.phone__frame {
  position: relative;
  aspect-ratio: 9 / 19;
  padding: 10px;
  border-radius: 46px;
  background: linear-gradient(145deg, #3a3f4c, #14171f 40%, #262a35);
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.14),
    0 50px 80px -30px rgba(255, 206, 75, 0.25),
    0 30px 60px -20px rgba(0, 0, 0, 0.8);
}
.phone__screen {
  position: relative;
  height: 100%;
  border-radius: 37px;
  overflow: hidden;
  background: #f7f8fa;
  color: #1f2430;
}
.phone__iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.phone__note {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--ink-3);
}

.phone__home {
  position: absolute;
  left: 50%; bottom: 7px;
  width: 104px; height: 4px;
  margin-left: -52px;
  border-radius: 4px;
  background: #1f2430;
  z-index: 4;
  pointer-events: none;
}

.project--dex { padding-top: 0; }

.splash {
  --px: 0;
  --py: 0;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-top: clamp(4.5rem, 10vw, 8rem);
  margin-bottom: clamp(3rem, 6vw, 5rem);
  background:
    radial-gradient(55% 80% at 82% 25%, color-mix(in srgb, var(--dex) 26%, transparent), transparent 70%),
    radial-gradient(40% 60% at 10% 100%, color-mix(in srgb, #6c79db 22%, transparent), transparent 70%);
}
.splash__ball {
  position: absolute;
  z-index: -1;
  width: min(62rem, 130vw);
  right: -14rem;
  top: -10rem;
  color: var(--dex-text);
  opacity: 0.16;
  animation: spin 90s linear infinite;
  translate: calc(var(--px) * -10px) calc(var(--py) * -8px);
}
@keyframes spin { to { rotate: 360deg; } }

.splash__inner { position: relative; z-index: 2; }
.splash__kicker {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.splash__title {
  font-size: clamp(4rem, 14vw, 10.5rem);
  line-height: 0.85;
  letter-spacing: -0.01em;
  background: linear-gradient(100deg, var(--dex-text) 10%, color-mix(in srgb, var(--dex-text) 55%, #ff6b6b) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 0.05em;
}
.splash__tagline { max-width: 30rem; margin-top: 1.25rem; }

.splash__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2.5rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}
.splash__stats li { display: grid; gap: 0.1rem; }
.splash__stats strong {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1;
  color: var(--ink);
}
.splash__stats span { font-size: 0.85rem; color: var(--ink-3); }
.splash__cta { margin: 2rem 0 0; }

.splash__art { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.splash__mon {
  position: absolute;
  height: auto;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.35));
  translate: calc(var(--px) * var(--d, 1) * 18px) calc(var(--py) * var(--d, 1) * 14px);
  animation: bob 6s ease-in-out infinite;
  opacity: 0;
  transition: opacity 600ms ease;
}
.splash__mon.is-ready { opacity: 1; }
.splash__mon--a { width: clamp(11rem, 24vw, 19rem); right: 5%; top: 14%; }
.splash__mon--b { width: clamp(7rem, 14vw, 11.5rem); right: 31%; top: 9%; animation-delay: -2s; }
.splash__mon--c { width: clamp(7rem, 13vw, 10.5rem); right: 3%; bottom: 17%; animation-delay: -4s; }
.splash__mon--d { width: clamp(6rem, 10vw, 8.5rem); right: 27%; bottom: 20%; animation-delay: -1s; }
.splash__mon--e { width: clamp(6.5rem, 11vw, 9.5rem); right: 42%; top: 38%; animation-delay: -3s; }
@keyframes bob { 50% { transform: translateY(-14px) rotate(1.5deg); } }
@media (max-width: 52rem) {
  .splash__art { opacity: 0.38; }
  .splash__mon--c, .splash__mon--d, .splash__mon--e { display: none; }
  .splash__mon--a { right: -6%; top: 6%; }
  .splash__mon--b { right: 34%; top: 2%; }
}

.splash__types {
  margin-top: clamp(3rem, 6vw, 5rem);
  padding-block: 0.9rem;
  overflow: hidden;
  border-block: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.splash__track { display: flex; gap: 0.6rem; width: max-content; animation: marquee 48s linear infinite; }
.splash__types:hover .splash__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.tchip {
  padding: 0.3rem 1rem;
  border-radius: 999px;
  background: var(--c);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  white-space: nowrap;
}
@media (prefers-reduced-motion: reduce) {
  .splash__ball, .splash__mon, .splash__track { animation: none; }
  .splash__mon { translate: none; opacity: 1; }
  .splash__ball { translate: none; }
}

/* the phone moves in with the new views */
.project__row--dex { align-items: start; }
@media (min-width: 60rem) { .project__row--dex .phone { position: sticky; top: calc(var(--header-h) + 1.5rem); } }
