/* The homepage template uses these viewport-scaled units in its three breakpoints. */
.edition-waitlist {
  --unit: calc(100vw / 390);
  --invite-size: calc(134 * var(--unit));
  --invite-text: calc(14 * var(--unit));
  --invite-inset: calc(20 * var(--unit));
}
@media (min-width: 768px) {
  .edition-waitlist {
    --unit: calc(100vw / 768); --invite-size: calc(215 * var(--unit));
    --invite-inset: calc(30 * var(--unit));
  }
}
@media (min-width: 1024px) {
  .edition-waitlist { --unit: calc(100vw / 1024); --invite-text: calc(18 * var(--unit)); }
}
@media (min-width: 1200px) {
  .edition-waitlist { --unit: calc(100vw / 1440); }
}

.edition-waitlist {
  position: relative; display: grid; place-items: center; height: 100dvh; overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(ellipse calc(1.1 * var(--invite-size)) calc(1.6 * var(--invite-size)) at center,
      color-mix(in srgb, var(--pomo-orb-green) 6%, transparent), transparent 95%),
    linear-gradient(180deg, color-mix(in srgb, var(--pomo-orb-green) 8%, var(--paper)), var(--paper) 19%);
}
.edition:has(.edition-waitlist.at-end) .edition-header:not(:has(details[open])) { background: transparent; box-shadow: none; }
.edition-waitlist .footer__circles { position: relative; }
.edition-waitlist .infinite-rotation {
  position: absolute; top: 50%; height: 100dvh; translate: 0 -50%; pointer-events: none;
  animation: waitlist-orbit-turn 10s linear infinite; animation-play-state: paused;
}
.edition-waitlist .left-0 { left: 0; rotate: 180deg; }
.edition-waitlist .right-0 { right: 0; }
.edition-waitlist .infinite-rotation svg { display: block; width: auto; height: 100%; }
.edition-waitlist.show-rings .infinite-rotation { animation-play-state: running; }
@keyframes waitlist-orbit-turn { to { transform: rotate(1turn); } }
.edition-waitlist .circle-button {
  position: relative; z-index: 1; display: grid; place-items: center; width: var(--invite-size);
  aspect-ratio: 1; padding: 0 var(--invite-inset); background: transparent; color: var(--ink);
  border: 1px solid var(--rule); border-radius: 50%; font-size: var(--invite-text); line-height: 1; text-align: center;
  perspective: 1000px;
}
.edition-waitlist .circle-button-circle-1, .edition-waitlist .circle-button-circle-2 {
  position: absolute; inset: -1px; border: 1px solid var(--rule); border-radius: 50%; pointer-events: none;
  transition: transform .6s cubic-bezier(.25,.75,.25,1);
}
@media (hover: hover) {
  .edition-waitlist .circle-button:hover .circle-button-circle-1 { transform: rotateX(60deg); }
  .edition-waitlist .circle-button:hover .circle-button-circle-2 { transform: rotateX(35deg); transition-delay: .1s; }
}

html:has(.edition #waitlist-dialog[open]) { overflow: hidden; }
.edition #waitlist-dialog .popup-overlay { background: rgb(18 37 51 / 35%); }
@media (prefers-reduced-motion: no-preference) {
  .edition #waitlist-dialog[open] .popup-el { animation: waitlist-arrive .36s cubic-bezier(.22,.75,.24,1) both; }
  .edition #waitlist-dialog[open] .popup-overlay { animation: waitlist-dim .2s ease-out both; }
  .edition #waitlist-dialog.closing .popup-el { animation: waitlist-arrive .18s ease-out reverse both; }
  .edition #waitlist-dialog.closing .popup-overlay { animation: waitlist-dim .18s ease-out reverse both; }
}
@keyframes waitlist-arrive { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes waitlist-dim { from { opacity: 0; } to { opacity: 1; } }

@supports (view-timeline-name: --invite) {
  @media (prefers-reduced-motion: no-preference) {
    .edition-waitlist { view-timeline-name: --invite; }
    .edition-waitlist .footer__circles {
      animation: waitlist-dim linear both;
      animation-timeline: --invite; animation-range: entry 48% entry 100%;
    }
  }
}
