:root {
  --indigo: #3a3897;
  --indigo-deep: #1f1e5c;
  --purple: #6f6cdc;
  --lavender: #8f8deb;
  --pink: #d8406f;
  --yellow: #f6cf45;
  --teal: #6cd3d6;
  --ink: #2b2a45;
  --muted: #6b6a85;
  --line: #dcdce8;
  --paper: #f5f5fa;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: #fff;
  background: var(--indigo-deep);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Stage ---------- */

.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  overflow: hidden;
  background: radial-gradient(120% 80% at 50% 40%, var(--indigo) 0%, var(--indigo-deep) 75%);
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
}

.backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ring {
  position: absolute;
  top: 42%;
  left: 50%;
  width: max(150vw, 150vh);
  aspect-ratio: 1;
  translate: -50% -50%;
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 50%;
  opacity: 0;
  animation: stage-ring 9s linear infinite;
}
.ring:nth-child(2) { animation-delay: -2.25s; }
.ring:nth-child(3) { animation-delay: -4.5s; }
.ring:nth-child(4) { animation-delay: -6.75s; }

.dot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  opacity: 0.8;
  animation: drift 12s ease-in-out infinite;
}
.dot:nth-of-type(3n + 1) { animation-duration: 6s; }
.dot:nth-of-type(3n + 2) { animation-duration: 4s; animation-delay: -3s; }
.dot.teal { background: var(--teal); }
.dot.white { background: #fff; }
.dot.yellow { background: var(--yellow); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 48px 0 24px;
  text-align: center;
}

.logo {
  --u: clamp(22px, 7vw, 34px);
  display: flex;
  align-items: flex-end;
  gap: calc(var(--u) * 0.5);
  margin-bottom: 8px;
}
.logo .l,
.logo .t {
  display: flex;
  flex-direction: column;
}
.logo .t {
  align-items: center;
}
.block {
  display: block;
  transform-origin: bottom;
  animation: block-in 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.stem { width: calc(var(--u) * 1.2); height: calc(var(--u) * 2.6); background: var(--lavender); }
.foot { width: calc(var(--u) * 2.4); height: calc(var(--u) * 1.2); background: var(--pink); animation-delay: 0.08s; }
.bar { width: calc(var(--u) * 2.8); height: calc(var(--u) * 1.2); background: #fff; animation-delay: 0.16s; }
.post {
  position: relative;
  width: calc(var(--u) * 1.2);
  height: calc(var(--u) * 2.6);
  background: #fff;
  animation-delay: 0.24s;
}
.ball {
  position: absolute;
  left: 50%;
  bottom: calc(var(--u) * 0.3);
  width: calc(var(--u) * 0.9);
  aspect-ratio: 1;
  margin-left: calc(var(--u) * -0.45);
  border-radius: 50%;
  background: var(--yellow);
  animation: ball-hop 2.43s 0.6s infinite;
}

h1 {
  margin: 0;
  font-size: clamp(40px, 11vw, 72px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  animation: rise-in 0.5s 0.3s cubic-bezier(0.34, 1.3, 0.64, 1) both;
}

.tagline {
  margin: 0;
  max-width: 40ch;
  text-wrap: balance;
  font-size: clamp(16px, 4.2vw, 19px);
  line-height: 1.5;
  color: rgb(255 255 255 / 0.78);
  animation: rise-in 0.5s 0.4s cubic-bezier(0.34, 1.3, 0.64, 1) both;
}

.next-show {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.12);
  font-size: 15px;
  font-weight: 700;
}
.next-show[hidden] { display: none; }
.next-show .live {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--pink);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.play {
  margin-top: 12px;
  min-width: 220px;
  padding: 18px 48px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--indigo);
  font: 900 22px/1 var(--font);
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.3), 0 0 0 0 rgb(255 255 255 / 0.5);
  animation:
    rise-in 0.5s 0.5s cubic-bezier(0.34, 1.3, 0.64, 1) both,
    pulse 2.4s 1.2s ease-out infinite;
  transition: transform 0.15s ease, background 0.15s ease;
}
.play:hover { transform: scale(1.04); }
.play:active { transform: scale(0.97); }
.play:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; }

footer {
  position: relative;
  padding: 16px 0 20px;
  text-align: center;
  font-size: 13px;
  color: rgb(255 255 255 / 0.55);
}

/* ---------- Get-the-app sheet ---------- */

.sheet {
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100svh - 32px);
  padding: 32px 24px 24px;
  border: 0;
  border-radius: 24px;
  background: #fff;
  color: var(--ink);
  text-align: center;
  box-shadow: 0 24px 80px rgb(0 0 0 / 0.4);
}
.sheet[open] { animation: pop-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.sheet::backdrop {
  background: rgb(15 14 50 / 0.6);
  backdrop-filter: blur(4px);
}

.close-form { margin: 0; }
.close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.close:hover { color: var(--ink); }

.sheet h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.sub {
  margin: 0 auto 24px;
  max-width: 30ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.stores {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.store {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 60px;
  border-radius: 14px;
  background: #000;
  color: #fff;
  text-decoration: none;
  transition: transform 0.15s ease;
}
.store:hover { transform: translateY(-2px); }
.store:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
.store svg { width: 28px; height: 28px; flex: none; }
.store .label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 120px;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.store small {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
/* A store with no listing yet. */
.store[aria-disabled="true"] {
  background: var(--paper);
  color: var(--muted);
  pointer-events: none;
}
.store[aria-disabled="true"] svg { opacity: 0.5; filter: grayscale(1); }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.continue {
  display: block;
  padding: 16px;
  border-radius: 999px;
  background: var(--indigo);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease;
}
.continue:hover { background: var(--purple); }
.continue:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

/* ---------- Motion ---------- */

@keyframes stage-ring {
  from { transform: scale(0.15); opacity: 0; }
  15% { opacity: 1; }
  to { transform: scale(1); opacity: 0; }
}
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.55; }
  25% { transform: translate(4px, -8px) scale(1.15); opacity: 0.95; }
  50% { transform: translate(-2px, -2px) scale(1); opacity: 0.6; }
  75% { transform: translate(-4px, 6px) scale(1.1); opacity: 0.9; }
}
@keyframes block-in {
  from { transform: scaleY(0.2) scaleX(0.2); opacity: 0; }
}
/* A rest, a hop up the T's stem, a bouncy landing. */
@keyframes ball-hop {
  0%, 66% { transform: translateY(0); animation-timing-function: cubic-bezier(0.3, 0, 0.6, 1); }
  77% { transform: translateY(calc(var(--u) * -1)); animation-timing-function: cubic-bezier(0.34, 1.8, 0.64, 1); }
  100% { transform: translateY(0); }
}
@keyframes rise-in {
  from { opacity: 0; transform: translateY(24px); }
}
@keyframes pop-in {
  from { opacity: 0; transform: scale(0.85); }
}
@keyframes pulse {
  0% { box-shadow: 0 10px 30px rgb(0 0 0 / 0.3), 0 0 0 0 rgb(255 255 255 / 0.45); }
  70%, 100% { box-shadow: 0 10px 30px rgb(0 0 0 / 0.3), 0 0 0 18px rgb(255 255 255 / 0); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .ring { display: none; }
}
