/* A restrained enhancement of the selected design. No layout or type changes. */
@media (prefers-reduced-motion: no-preference) {
  html[data-motion="on"] .button {
    transition: transform 240ms cubic-bezier(.22, 1, .36, 1),
      background-color 220ms ease, border-color 220ms ease, color 220ms ease;
  }
  html[data-motion="on"] :is(.segmented, .sample-menu) button {
    transition: background-color 220ms ease, color 220ms ease;
  }
  html[data-motion="on"] .nav-links > a:not(.button) {
    background-image: linear-gradient(currentColor, currentColor);
    background-position: left bottom;
    background-repeat: no-repeat;
    background-size: 0 1px;
    transition: background-size 260ms cubic-bezier(.22, 1, .36, 1);
  }
  html[data-motion="on"] :is(.text-link, .footer-links a) {
    transition: text-underline-offset 220ms ease;
  }
  html[data-motion="on"] .contact :is(input, textarea) {
    transition: border-color 220ms ease, background-color 220ms ease;
  }
  html[data-motion="on"] .contact :is(input, textarea):focus-visible {
    border-color: var(--paper);
    background-color: #ffffff06;
  }
  @media (hover: hover) and (pointer: fine) {
    html[data-motion="on"] .button:not(:disabled):hover { transform: translateY(-2px); }
    html[data-motion="on"] .button:not(:disabled):active { transform: translateY(0); }
    html[data-motion="on"] .button.light:hover {
      background-color: #e7e7e3;
      border-color: #e7e7e3;
    }
    html[data-motion="on"] .nav-links > a:not(.button):hover { background-size: 100% 1px; }
    html[data-motion="on"] :is(.text-link, .footer-links a):hover { text-underline-offset: 8px; }
    html[data-motion="on"] :is(.segmented, .sample-menu) button[aria-pressed="false"]:hover {
      background-color: var(--soft);
    }
  }
}

/* Reduced motion also removes the base stylesheet's existing transitions. */
html[data-motion="off"] { scroll-behavior: auto; }
html[data-motion="off"] *,
html[data-motion="off"] *::before,
html[data-motion="off"] *::after { transition: none !important; }
