.site-curtain {
  position: fixed;
  z-index: 100;
  inset: 0;
  place-items: center;
  background: #050607;
  pointer-events: auto;
}

.site-curtain img {
  display: block;
  width: clamp(144px, 23vw, 280px);
  height: auto;
  visibility: hidden;
}

.has-site-intro { --hero-entry-delay: 525ms; }

@media (prefers-reduced-motion: no-preference) {
  :root[data-page-motion] .site-curtain[hidden] { display: grid !important; }

  :root[data-page-motion="intro"] .site-curtain {
    animation: site-uncover 570ms 320ms cubic-bezier(.65, 0, .22, 1) both;
  }

  :root[data-page-motion="intro"] .site-curtain img {
    visibility: visible;
    animation: site-logo 720ms cubic-bezier(.23, .75, .25, 1) both;
  }

  :root[data-page-motion="arrival"] .site-curtain { animation: site-fade-away 350ms ease-out both; }
  :root[data-page-motion="departure"] .site-curtain { animation: site-fade-in 190ms ease-in both; }

  :root[data-page-motion="intro"] .page-case .site-curtain {
    animation-duration: 420ms;
    animation-delay: 90ms;
    pointer-events: none;
  }

  :root[data-page-motion="intro"] .page-case .site-curtain img { animation-duration: 420ms; }
  :root[data-page-motion="arrival"] .page-case .site-curtain { pointer-events: none; }

  @keyframes site-uncover {
    from { clip-path: inset(0 0 0 0); }
    to { clip-path: inset(0 0 100% 0); visibility: hidden; }
  }

  @keyframes site-logo {
    0% { opacity: 0; scale: .97; }
    24%, 61% { opacity: 1; scale: 1; }
    100% { opacity: 0; scale: 1; }
  }

  @keyframes site-fade-in { from { opacity: 0; } }
  @keyframes site-fade-away { to { opacity: 0; visibility: hidden; } }
  @keyframes site-rise { from { opacity: 0; translate: 0 13px; } }
  @keyframes site-divider { from { opacity: 0; scale: 0 1; } }

  .has-site-motion .hero :is(.hero-identity > p, .hero-identity > h1, .hero-bottom > *) {
    animation: site-rise 590ms calc(var(--hero-entry-delay, 130ms) + var(--hero-stagger, 0ms)) cubic-bezier(.2, .75, .22, 1) both;
  }

  .hero-identity > h1 { --hero-stagger: 60ms; }
  .hero-description { --hero-stagger: 120ms; }
  .hero-bottom .specular-button { --hero-stagger: 180ms; }

  .has-site-motion .hero-identity > span {
    animation: site-divider 690ms calc(var(--hero-entry-delay, 130ms) + 30ms) cubic-bezier(.2, .75, .22, 1) both;
  }

  [data-site-reveal-state="shown"] {
    transition: opacity 470ms ease-out, translate 570ms cubic-bezier(.2, .75, .22, 1),
      var(--site-reveal-interaction, color 180ms ease-out);
  }

  [data-site-reveal-state="waiting"]:not(:focus):not(:focus-within) {
    opacity: 0;
    translate: var(--site-reveal-offset, 0 16px);
  }

  .page-case [data-site-reveal-state="waiting"]:not(:focus):not(:focus-within) {
    opacity: .78;
    translate: none;
  }

  [data-site-reveal="surface"] { --site-reveal-offset: none; }

  :is(.back-link, .footer-email, .footer-link):not([data-site-reveal-state="shown"]) {
    transition: color 180ms ease-out;
  }

  .has-site-motion [data-motion-dialog][open] {
    animation: site-dialog-in 340ms cubic-bezier(.19, .75, .22, 1) both;
  }

  .has-site-motion [data-motion-dialog][open]::backdrop {
    animation: site-fade-in 280ms ease-out both;
  }

  .has-site-motion [data-motion-dialog][open][data-closing] {
    animation: site-dialog-out 185ms ease-in both;
    pointer-events: none;
  }

  .has-site-motion [data-motion-dialog][open][data-closing]::backdrop {
    animation: site-fade-away 185ms ease-in both;
  }

  .has-site-motion .modal[open]:not([data-closing]) :is(.modal-inner > h2, .modal-form > *) {
    animation: site-rise 440ms var(--dialog-stagger, 52ms) cubic-bezier(.2, .75, .22, 1) both;
  }

  .modal-form label { --dialog-stagger: 94ms; }
  .modal-form .modal-message { --dialog-stagger: 126ms; }
  .modal-actions { --dialog-stagger: 153ms; }

  @keyframes site-dialog-in {
    from { opacity: 0; transform: var(--dialog-from, translateY(14px) scale(.98)); }
  }

  @keyframes site-dialog-out {
    to { opacity: 0; transform: var(--dialog-from, translateY(14px) scale(.98)); }
  }
}
