/* Tea ceremony rhythm: a short arrival, a long breath, then room to read. */
@media (max-width: 700px) and (prefers-reduced-motion: no-preference) {
  .tea-motion-active .tea-motion-photo.tea-motion-seen {
    animation: tea-photo-arrive .75s cubic-bezier(.2,.65,.3,1) both;
  }
  .tea-motion-active .tea-motion-ink.tea-motion-seen {
    animation: tea-leaf-breathe 9s ease-in-out infinite alternate;
    animation-play-state: paused;
  }
  .tea-motion-active .tea-motion-ink.tea-motion-live { animation-play-state: running; }
  .tea-motion-active .tea-motion-ink.tea-motion-seen path {
    animation: tea-ink-arrive 1.8s ease-out both;
  }
  .tea-motion-active .tea-motion-ink.tea-motion-seen path:nth-child(2) { animation-delay: .12s; }
  .tea-motion-active .tea-motion-ink.tea-motion-seen path:nth-child(3) { animation-delay: .24s; }
  .tea-motion-active .tea-motion-ink.tea-motion-seen path:nth-child(4) { animation-delay: .36s; }
  .tea-motion-active.tea-motion-paused :is(.tea-motion-photo,.tea-motion-ink,.tea-motion-ink path) {
    animation-play-state: paused;
  }
  /* Opacity feedback preserves button positions and carousel transforms. */
  body[data-page] :is(.button-outline,.text-link,.mobile-gallery-button,.tea-registration-submit,.menu-toggle) {
    transition: opacity .18s ease, background-color .22s ease, border-color .22s ease;
  }
  body[data-page] :is(.button-outline,.text-link,.mobile-gallery-button,.tea-registration-submit,.menu-toggle):active {
    opacity: .72;
  }
  /* A short curtain reveal keeps the menu calm and quick to use. */
  body[data-page] .mobile-nav:not([hidden]):not(.is-closing) {
    transform-origin: top center;
    animation: tea-menu-open .58s cubic-bezier(.2,.65,.3,1) both;
  }
  body[data-page] .mobile-nav:not([hidden]):not(.is-closing) > a {
    animation: tea-menu-link .42s cubic-bezier(.2,.65,.3,1) both;
    animation-delay: var(--menu-link-delay, 100ms);
  }
  body[data-page] .mobile-nav > a:nth-child(2) { --menu-link-delay: 180ms; }
  body[data-page] .mobile-nav > a:nth-child(3) { --menu-link-delay: 260ms; }
  body[data-page] .mobile-nav > a:nth-child(4) { --menu-link-delay: 340ms; }
  body[data-page] .mobile-nav > a:nth-child(5) { --menu-link-delay: 420ms; }
  body[data-page] .mobile-nav > a:nth-child(6) { --menu-link-delay: 500ms; }
  body[data-page] .mobile-nav.is-closing {
    pointer-events: none;
    animation: tea-menu-close .22s ease-in both;
  }
  body[data-page] .menu-toggle span {
    transition: transform .32s cubic-bezier(.2,.65,.3,1), background-color .2s ease;
    transform-origin: center;
  }
  @keyframes tea-menu-open {
    from { opacity: .5; clip-path: inset(0 0 100% 0); translate: 0 -6px; }
    to { opacity: 1; clip-path: inset(0); translate: 0 0; }
  }
  @keyframes tea-menu-close {
    from { opacity: 1; clip-path: inset(0); translate: 0 0; }
    to { opacity: .4; clip-path: inset(0 0 100% 0); translate: 0 -6px; }
  }
  @keyframes tea-menu-link {
    from { opacity: 0; translate: 0 -6px; }
    to { opacity: 1; translate: 0 0; }
  }
  @keyframes tea-photo-arrive {
    from { opacity: .82; translate: 0 8px; }
    to { opacity: 1; translate: 0 0; }
  }
  @keyframes tea-ink-arrive {
    from { stroke-dasharray: 1; stroke-dashoffset: 1; }
    to { stroke-dasharray: 1; stroke-dashoffset: 0; }
  }
  @keyframes tea-leaf-breathe {
    from { translate: 0 0; }
    to { translate: -4px -6px; }
  }
}
