/* Phos motion base: reduced-motion safety, dialog backdrops, smooth disclosure anchors & tactile press. */
:root {
  --motion-ease: cubic-bezier(.16, 1, .3, 1);
  --motion-press: 120ms;
  --motion-hover: 180ms;
  --motion-enter: 200ms;
  --motion-dialog: 240ms;
}

/* Keep crisp hero spacing aligned across desktop & mobile */
.signature-hero { padding-top: 30px; }
.signature-copy h1 { width: clamp(340px, 37vw, 550px); margin-bottom: 18px; }
.signature-description { margin-top: 12px; }
.signature-copy .hero-actions { margin-top: 20px; }
.signature-copy .requirements { margin-top: 12px; }
.signature-product { margin-top: 34px; transform-origin: center center; }

/* Tactile hover lift & press feedback for interactive controls */
.motion-lift {
  position: relative;
  isolation: isolate;
  transition: transform var(--motion-hover) var(--motion-ease);
}
.motion-lift::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  box-shadow: 0 18px 32px var(--hover-shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--motion-hover) var(--motion-ease);
}
@media (hover: hover) and (pointer: fine) and (min-width: 761px) {
  html[data-motion=on] .motion-lift:hover { transform: translateY(-4px); }
  html[data-motion=on] .motion-lift:hover::after { opacity: 1; }
}
html[data-motion=on] button:active,
html[data-motion=on] .button:active,
html[data-motion=on] .nav-download:active {
  transform: translateY(1px) scale(.98);
  transition-duration: var(--motion-press);
}

/* Native dialogs retain focus containment while exit animation completes */
html body dialog::backdrop {
  background: var(--scrim);
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
html body dialog[open]::backdrop {
  animation: motion-backdrop-in 240ms var(--motion-ease) both;
}
html body dialog.motion-closing::backdrop {
  animation: motion-backdrop-out 200ms var(--motion-ease) both;
}
@keyframes motion-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes motion-backdrop-out { from { opacity: 1; } to { opacity: 0; } }

/* Smooth FAQ & try-editor disclosure container */
.faq-list { overflow-anchor: none; }
.motion-details-content { transform-origin: top center; }

@media (max-width: 760px) {
  .signature-product { transform: none !important; }
  .signature-hero { padding-top: 26px; }
  .signature-copy h1 { width: min(100%, 340px); margin-bottom: 17px; }
  .signature-product { margin-top: 26px; }
}

/* Strict accessibility & manual motion-off bypass */
html[data-motion=off] { scroll-behavior: auto; }
html[data-motion=off] body *,
html[data-motion=off] body *::before,
html[data-motion=off] body *::after {
  animation: none !important;
  transition: none !important;
}
html[data-motion=off] .signature-product,
html[data-motion=off] .motion-lift,
html[data-motion=off] .button:hover,
html[data-motion=off] button:active,
html[data-motion=off] .nav-download:hover { transform: none !important; }
html[data-motion=off] body dialog[open]::backdrop { animation: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  html body *,
  html body *::before,
  html body *::after {
    animation: none !important;
    transition: none !important;
  }
  html body dialog[open]::backdrop { animation: none !important; }
  .signature-product,
  .motion-lift,
  .button:hover,
  button:active,
  .nav-download:hover { transform: none !important; }
}
