/*
 * Parts adapted from yui540/css-animations (retrieved 2026-09-29).
 * Sources:
 * https://github.com/yui540/css-animations/blob/main/2026-04-17/tips-1.html
 * https://github.com/yui540/css-animations/blob/main/2026-04-17/tips-2.html
 *
 * Adapted: popup -> yui540-seal-pop (gentle settling, slower fade);
 * translate -> yui540-paper-enter (smaller travel and calmer easing);
 * border-radius -> yui540-paper-unfold (same keyframes, scoped new name).
 * Colors, geometry, sequence, selectors and all artwork are site-specific.
 * No third-party images, fonts, text, JavaScript or complete website copied.
 * The two `daienkai-*` keyframes below are newly authored for this site.
 *
 * MIT License
 *
 * Copyright (c) 2026 yui540
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

/* Progressive enhancement: the base layout is fully visible without this file. */
@media (prefers-reduced-motion: no-preference) {
  .page-home .art-paper {
    animation:
      yui540-paper-enter 1.6s cubic-bezier(.25, .1, .25, 1) .15s both,
      yui540-paper-unfold 2.3s ease-in-out .15s both;
  }

  .page-home .art-seal {
    animation: yui540-seal-pop 1.25s ease-in-out .65s both;
  }

  .page-home .title-mask > span {
    animation: daienkai-letter-arrive 1.45s cubic-bezier(.25, .1, .25, 1)
      calc(.12s + var(--order) * .14s) both;
  }

  .page-home .hero-emblem {
    animation: daienkai-emblem-arrive 1.5s ease-in-out .35s both;
  }
}

/* Modified from tips-1.html, @keyframes popup. */
@keyframes yui540-seal-pop {
  from { opacity: 0; }
  40%, to { opacity: 1; }
  from { transform: scale(0, 0); }
  50% { transform: scale(1.015, 1.025); }
  75% { transform: scale(.997, .995); }
  to { transform: scale(1, 1); }
}

/* Modified from tips-2.html, @keyframes translate. */
@keyframes yui540-paper-enter {
  from { transform: translate(-10%, 32%); opacity: 0; }
  to { transform: translate(0%, 0%); opacity: 1; }
}

/* Renamed from tips-2.html, @keyframes border-radius. */
@keyframes yui540-paper-unfold {
  from { border-radius: 0 100% 0 0; }
  to { border-radius: 0 0 0 0; }
}

/* Newly authored title and emblem movement. */
@keyframes daienkai-letter-arrive {
  from { transform: translateY(108%) rotate(2deg); opacity: 0; }
  to { transform: translateY(0) rotate(0deg); opacity: 1; }
}

@keyframes daienkai-emblem-arrive {
  from { transform: translateY(6px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* A change to reduced motion takes effect even during the initial sequence. */
@media (prefers-reduced-motion: reduce) {
  .page-home .art-paper,
  .page-home .art-seal,
  .page-home .title-mask > span,
  .page-home .hero-emblem { animation: none; }
}
