.object-window[open]::backdrop {
  backdrop-filter: blur(var(--object-backdrop-blur, 7px));
}

@media (prefers-reduced-motion: no-preference) {
  .object-window[open] {
    animation: object-window-enter 320ms cubic-bezier(.2, .7, .25, 1) both;
  }

  .object-window[open]::backdrop {
    animation: object-backdrop-enter 320ms ease-out both;
  }

  .object-window[open].is-closing {
    animation: object-window-exit 250ms ease-in both;
  }

  .object-window[open].is-closing::backdrop {
    animation: object-backdrop-exit 250ms ease-in both;
  }

  .mobile-call {
    transition: transform 300ms cubic-bezier(.2, .7, .25, 1),
      opacity 240ms ease, visibility 300ms;
  }
}

.mobile-call:not(.is-visible) {
  visibility: hidden;
  opacity: 0;
  transform: translateY(calc(100% + 24px));
  pointer-events: none;
}

@media (max-width: 760px) {
  .object-window { --object-window-offset: 28px; }

  .object-window[open]::backdrop {
    --object-backdrop-blur: 3px;
    background: #14251e70;
  }

  .escape {
    height: clamp(320px, 84vw, 370px);
  }
}

@media (max-width: 760px) and (prefers-reduced-motion: no-preference) {
  #rules details[open] > .rule-body {
    animation: rule-text-enter 300ms cubic-bezier(.22, .61, .36, 1) both;
  }

  .object-window[open]:not(.is-closing) {
    animation-duration: 310ms;
    animation-timing-function: cubic-bezier(.22, .61, .36, 1);
  }

  .object-window[open]:not(.is-closing)::backdrop {
    animation-duration: 310ms;
  }

  .object-window[open].is-closing,
  .object-window[open].is-closing::backdrop {
    animation-timing-function: cubic-bezier(.4, 0, .68, .65);
  }

  .mobile-call {
    transition: transform 360ms cubic-bezier(.22, .61, .36, 1),
      opacity 280ms ease, visibility 360ms;
  }
}

@keyframes rule-text-enter {
  from { opacity: 0; transform: translateY(-7px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes object-window-exit {
  to { opacity: 0; transform: translateY(var(--object-window-offset, 12px)); }
}

@keyframes object-backdrop-exit {
  to { opacity: 0; backdrop-filter: blur(0); }
}

@keyframes object-window-enter {
  from {
    opacity: 0;
    transform: translateY(var(--object-window-offset, 12px));
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes object-backdrop-enter {
  from {
    opacity: 0;
    backdrop-filter: blur(0);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(var(--object-backdrop-blur, 7px));
  }
}
