/* Mousely download-access modal, legacy waitlist modal, and shared form states */

@font-face {
  font-family: "Mousely Sans";
  src: url("/assets/jA0hg3ToxxGdQVJd3NPiarTey4.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "Mousely Sans";
  src: url("/assets/4X9zTCJGNN1XMTvKKEuh8gyfwk.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 500;
}

@font-face {
  font-family: "Mousely Sans";
  src: url("/assets/xKmH7gYVxBZb5FSUFFckyvSgiNw.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 600;
}

:root {
  --mwl-ink: #151413;
  --mwl-muted: #706b67;
  --mwl-blue: #079ceb;
  --mwl-blue-deep: #0078d4;
  --mwl-error: #b42318;
  --mwl-error-bg: #fff1ef;
  --mwl-warning: #9a5b00;
  --mwl-warning-bg: #fff7e6;
  --mwl-warning-strong: #c76a00;
  --mwl-pending-bg: #eef8ff;
  --mwl-line: rgba(21, 20, 19, 0.12);
  --mwl-ease: cubic-bezier(0.19, 1, 0.22, 1);
}

#mwl-modal,
#mwl-invite-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  font-family: "Mousely Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 500;
}

#mwl-modal.open,
#mwl-invite-modal.open {
  display: flex;
}

#mwl-modal [hidden],
#mwl-invite-modal [hidden] {
  display: none !important;
}

.mwl-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 19, 19, 0.42);
  backdrop-filter: blur(14px) saturate(1.08);
  -webkit-backdrop-filter: blur(14px) saturate(1.08);
}

.mwl-card {
  position: relative;
  width: min(100%, 396px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--mwl-ink);
  box-shadow: 0 22px 70px rgba(18, 32, 43, 0.24);
  animation: mwl-pop 240ms var(--mwl-ease);
}

.mwl-card,
.mwl-card * {
  box-sizing: border-box;
}

.mwl-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--mwl-ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 170ms var(--mwl-ease),
    background-color 170ms ease,
    box-shadow 170ms ease;
}

.mwl-close:hover {
  background: rgba(21, 20, 19, 0.1);
}

.mwl-close:active {
  transform: translateY(1px) scale(0.94);
  background: rgba(21, 20, 19, 0.14);
}

#mwl-title,
#mwl-invite-title {
  max-width: calc(100% - 64px);
  margin: 0 0 10px;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: 0;
  text-wrap: balance;
}

.mwl-invite-heading {
  max-width: calc(100% - 64px);
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
}

.mwl-invite-heading #mwl-invite-title {
  max-width: none;
  margin: 0;
}

.mwl-lock-icon {
  width: 34px;
  height: 34px;
  display: block;
  color: var(--mwl-blue);
  overflow: visible;
  filter: drop-shadow(0 10px 20px rgba(7, 156, 235, 0.16));
  transform: translateZ(0);
  transition:
    color 280ms ease,
    filter 280ms ease,
    transform 180ms var(--mwl-ease);
}

.mwl-lock-shackle {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform-box: fill-box;
  transform-origin: 25% 85%;
  transition: transform 520ms var(--mwl-ease);
}

.mwl-lock-body {
  fill: currentColor;
}

.mwl-lock-keyhole {
  fill: none;
  stroke: #fff;
  stroke-width: 1.9;
  stroke-linecap: round;
}

.mwl-download-icon {
  width: 32px;
  height: 32px;
  display: block;
  color: var(--mwl-blue);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#mwl-invite-modal.mwl-unlocked .mwl-lock-icon {
  animation: mwl-lock-bloom 520ms var(--mwl-ease);
}

#mwl-invite-modal.mwl-unlocked .mwl-lock-shackle {
  transform: translate(-4px, -3px) rotate(-36deg);
  animation: mwl-lock-swing 720ms var(--mwl-ease);
}

#mwl-invite-modal.mwl-invite-missing-state .mwl-lock-icon {
  color: var(--mwl-error);
  filter: drop-shadow(0 10px 20px rgba(180, 35, 24, 0.16));
}

#mwl-invite-modal.mwl-invite-pending-state .mwl-lock-icon {
  color: var(--mwl-warning-strong);
  filter: drop-shadow(0 10px 20px rgba(199, 106, 0, 0.16));
}

#mwl-invite-modal.mwl-invite-jiggle .mwl-lock-icon {
  animation: mwl-lock-jiggle 520ms var(--mwl-ease);
}

.mwl-sub {
  max-width: 34ch;
  margin: 0 0 22px;
  color: #5f5a57;
  font-size: 15px;
  line-height: 1.5;
}

.mwl-form {
  display: grid;
  gap: 10px;
}

.mwl-hp {
  display: none !important;
}

.mwl-input {
  width: 100%;
  min-height: 50px;
  padding: 0 15px;
  border: 1px solid var(--mwl-line);
  border-radius: 12px;
  background: #fff;
  color: var(--mwl-ink);
  font: inherit;
  font-size: 16px;
  transition:
    border-color 170ms ease,
    box-shadow 170ms ease,
    background-color 170ms ease;
}

.mwl-input:focus {
  outline: 0;
  border-color: rgba(7, 156, 235, 0.55);
  box-shadow: 0 0 0 4px rgba(7, 156, 235, 0.16);
}

.mwl-label {
  margin-bottom: -2px;
  color: var(--mwl-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.mwl-turnstile {
  display: flex;
  justify-content: center;
  min-height: 0;
}

.mwl-turnstile:empty {
  display: none;
}

.mwl-submit {
  min-height: 50px;
  border: 0;
  border-radius: 12px;
  background: var(--mwl-ink);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  transform: translateY(0) scale(1);
  box-shadow: 0 12px 30px rgba(20, 19, 19, 0.15);
  transition:
    transform 210ms var(--mwl-ease),
    background-color 170ms ease,
    color 170ms ease,
    box-shadow 210ms var(--mwl-ease),
    opacity 170ms ease;
  will-change: transform;
}

.mwl-submit span {
  display: inline-block;
  white-space: nowrap;
  transform: translateY(0);
  transition: transform 210ms var(--mwl-ease);
}

.mwl-submit-label-swap {
  animation: mwl-submit-label-swap 300ms var(--mwl-ease);
}

.mwl-submit:hover {
  background: #302e2d;
  box-shadow: 0 16px 34px rgba(20, 19, 19, 0.17);
  transform: translateY(-1px);
}

.mwl-submit:active {
  background: #0d0c0c;
  box-shadow: 0 6px 16px rgba(20, 19, 19, 0.2);
  transform: translateY(2px) scale(0.985);
}

.mwl-submit:active span {
  transform: translateY(1px);
}

.mwl-submit:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.mwl-submit-loading:disabled {
  opacity: 0.88;
  cursor: wait;
  background: #242322;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.mwl-submit-complete:disabled {
  opacity: 1;
  background: var(--mwl-blue);
  box-shadow: 0 12px 26px rgba(7, 156, 235, 0.18);
}

.mwl-feedback {
  min-height: 46px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  margin: 2px 0 0;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.38;
  animation: mwl-feedback-in 260ms var(--mwl-ease);
}

.mwl-feedback a {
  color: inherit;
  font-weight: 600;
  text-underline-offset: 3px;
}

.mwl-feedback-icon,
.mwl-state-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 50%;
}

.mwl-feedback-icon {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
  margin-top: -1px;
}

.mwl-feedback-icon::before,
.mwl-feedback-icon::after,
.mwl-state-icon::before,
.mwl-state-icon::after {
  content: "";
  position: absolute;
}

.mwl-feedback-error {
  border-color: rgba(180, 35, 24, 0.2);
  background: var(--mwl-error-bg);
  color: var(--mwl-error);
}

.mwl-feedback-error .mwl-feedback-icon {
  background: var(--mwl-error);
  animation: mwl-error-knock 300ms ease;
}

.mwl-feedback-error .mwl-feedback-icon::before,
.mwl-feedback-error .mwl-feedback-icon::after {
  width: 10px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
}

.mwl-feedback-error .mwl-feedback-icon::before {
  transform: rotate(45deg);
}

.mwl-feedback-error .mwl-feedback-icon::after {
  transform: rotate(-45deg);
}

.mwl-feedback-missing {
  border-color: rgba(180, 35, 24, 0.2);
  background: var(--mwl-error-bg);
  color: var(--mwl-error);
}

.mwl-feedback-pending {
  border-color: rgba(199, 106, 0, 0.22);
  background: var(--mwl-warning-bg);
  color: var(--mwl-warning);
}

.mwl-feedback-pending .mwl-feedback-icon {
  border: 2px solid currentColor;
  animation: mwl-state-jiggle 440ms var(--mwl-ease);
}

.mwl-feedback-pending .mwl-feedback-icon::before {
  width: 8px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.mwl-feedback-missing .mwl-feedback-icon {
  border: 2px solid currentColor;
  animation: mwl-state-jiggle 440ms var(--mwl-ease);
}

.mwl-feedback-missing .mwl-feedback-icon::before {
  top: 5px;
  width: 2px;
  height: 8px;
  border-radius: 2px;
  background: currentColor;
}

.mwl-feedback-missing .mwl-feedback-icon::after {
  bottom: 4px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

.mwl-success:focus {
  outline: 0;
}

#mwl-modal.mwl-success-state #mwl-title,
#mwl-modal.mwl-success-state .mwl-sub,
#mwl-invite-modal.mwl-success-state .mwl-sub {
  display: none;
}

#mwl-invite-modal.mwl-success-state .mwl-success {
  margin-top: 18px;
}

.mwl-success {
  animation: mwl-success-rise 360ms var(--mwl-ease);
}

.mwl-state-icon-success {
  width: 32px;
  height: 32px;
  margin-bottom: 13px;
  background: var(--mwl-blue);
  box-shadow: 0 14px 30px rgba(7, 156, 235, 0.22);
  animation: mwl-success-pop 420ms var(--mwl-ease);
}

.mwl-state-icon-success::before {
  width: 14px;
  height: 7px;
  border-left: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: translateY(-1px) rotate(-45deg);
}

.mwl-success h3 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.08;
}

.mwl-success p {
  margin: 0;
  color: var(--mwl-muted);
  font-size: 15px;
  line-height: 1.42;
}

.mwl-continue {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
  padding: 0 18px;
  text-align: center;
  text-decoration: none;
}

@keyframes mwl-pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes mwl-feedback-in {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes mwl-submit-label-swap {
  0% {
    opacity: 0;
    transform: translateY(5px) scale(0.985);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes mwl-error-knock {
  0%,
  100% {
    transform: translateX(0);
  }

  28% {
    transform: translateX(-2px);
  }

  56% {
    transform: translateX(2px);
  }
}

@keyframes mwl-state-jiggle {
  0%,
  100% {
    transform: translateX(0) rotate(0deg);
  }

  18% {
    transform: translateX(-2px) rotate(-5deg);
  }

  36% {
    transform: translateX(2px) rotate(4deg);
  }

  56% {
    transform: translateX(-1px) rotate(-3deg);
  }

  76% {
    transform: translateX(1px) rotate(2deg);
  }
}

@keyframes mwl-missing-pulse {
  0% {
    transform: scale(0.84);
  }

  70% {
    transform: scale(1.06);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes mwl-pending-settle {
  0% {
    transform: translateY(-2px) scale(0.9);
  }

  70% {
    transform: translateY(1px) scale(1.04);
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes mwl-success-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes mwl-lock-jiggle {
  0%,
  100% {
    transform: translateX(0) rotate(0deg);
  }

  16% {
    transform: translateX(-3px) rotate(-7deg);
  }

  34% {
    transform: translateX(3px) rotate(6deg);
  }

  54% {
    transform: translateX(-2px) rotate(-4deg);
  }

  74% {
    transform: translateX(1px) rotate(2deg);
  }
}

@keyframes mwl-lock-swing {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }

  58% {
    transform: translate(-6px, -4px) rotate(-44deg);
  }

  78% {
    transform: translate(-4px, -2px) rotate(-32deg);
  }

  100% {
    transform: translate(-5px, -3px) rotate(-38deg);
  }
}

@keyframes mwl-lock-bloom {
  0% {
    transform: scale(0.94);
  }

  60% {
    transform: scale(1.08);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes mwl-success-pop {
  0% {
    transform: scale(0.72);
  }

  62% {
    transform: scale(1.08);
  }

  100% {
    transform: scale(1);
  }
}

@media (max-width: 480px) {
  .mwl-card {
    max-height: calc(100dvh - 24px);
    padding: 24px 20px 20px;
    border-radius: 18px;
  }

  #mwl-title,
  #mwl-invite-title {
    font-size: 25px;
  }

  .mwl-close {
    top: 18px;
    right: 14px;
  }
}

@media (max-width: 360px) {
  .mwl-card {
    padding: 24px 16px 18px;
  }

  #mwl-title,
  #mwl-invite-title {
    max-width: calc(100% - 56px);
    font-size: 23px;
  }

  .mwl-sub {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mwl-card,
  .mwl-feedback,
  .mwl-feedback-icon,
  .mwl-lock-icon,
  .mwl-lock-shackle,
  .mwl-success,
  .mwl-state-icon-success {
    animation: none;
  }

  .mwl-close,
  .mwl-submit,
  .mwl-submit span {
    transition: none;
  }

  .mwl-submit-label-swap {
    animation: none;
  }
}
