/* Home page sample deck (home.js): six sample sites in phones, one in front, its neighbours fanned behind.
   --k scales a 375px site into the screen; the phone is 375 / 0.914 = 410.3px per unit of --k. */
.deck {
  --k: 0.46;
  --w: calc(var(--k) * 410.3px);
  margin: 24px 0 0;
}
.deck-stage {
  position: relative;
  height: calc(var(--w) * 2.07 + 24px);
  margin: 0 calc(-1 * var(--gutter));
  overflow-x: clip;
  touch-action: pan-y;
}
.deck .phone {
  position: absolute;
  top: 6px;
  left: 50%;
  width: var(--w);
  margin-left: calc(var(--w) / -2);
  transform-origin: 50% 85%;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.deck .phone .screen {
  filter: none;
}
/* data-pos: 0 front, 1 right, -1 left, x waiting behind (home.js moves them) */
.deck .phone {
  z-index: 1;
  opacity: 0;
  transform: scale(0.7);
}
.deck [data-pos="0"] {
  z-index: 3;
  opacity: 1;
  transform: none;
}
.deck [data-pos="1"],
.deck [data-pos="-1"] {
  z-index: 2;
  opacity: 1;
  transform: translateX(48%) rotate(7deg) scale(0.84);
}
.deck [data-pos="-1"] {
  transform: translateX(-48%) rotate(-7deg) scale(0.84);
}

/* Tap the front phone: a note says where its button goes on a real site */
.deck-tip {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 30%;
  width: max-content;
  max-width: min(250px, 78%);
  margin: 0;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 10px) scale(0.92);
  pointer-events: none;
}
.deck-tip.on {
  opacity: 1;
  transform: translate(-50%, 0);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 16px 0 0;
}
.deck:not(.js) .chips {
  display: none;
}
.chips button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 10px;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
}
.chips button::before {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
}
.chips [aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
}
.deck-now {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.play {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}
.play::before {
  content: "";
  width: 12px;
  height: 14px;
  border-radius: 0;
  background: linear-gradient(
    90deg,
    currentColor 0 35%,
    transparent 35% 65%,
    currentColor 65%
  );
  box-shadow: none;
}
.play.paused::before {
  background: currentColor;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.play[hidden],
.deck:not(.js) .play {
  display: none;
}
.deck-cap {
  margin: 0;
  font-weight: 800;
  font-size: 0.9375rem;
  text-align: center;
  text-wrap: balance;
}
.deck-more {
  max-width: 28em;
  margin: 2px auto 0;
  color: var(--muted);
  font-size: 0.9375rem;
  text-align: center;
  text-wrap: balance;
}

@media (prefers-reduced-motion: no-preference) {
  .deck .phone {
    transition:
      transform 0.75s cubic-bezier(0.2, 0.8, 0.2, 1),
      opacity 0.5s;
  }
  .deck-tip {
    transition:
      transform 0.25s cubic-bezier(0.3, 1.5, 0.5, 1),
      opacity 0.2s;
  }
}
@media (max-width: 359px) {
  .deck {
    --k: 0.4;
  }
}
@media (min-width: 720px) {
  .deck {
    --k: 0.56;
  }
}
@media (min-width: 960px) {
  .deck {
    --k: 0.62;
  }
  .deck-stage {
    margin: 0;
    overflow-x: visible;
  }
}
