/* ページ内リンク */
html { scroll-behavior: smooth; }

/* Footer：既存のホバー位置まで滑らかに変化 */
footer nav ul li a { transition: margin-top 400ms cubic-bezier(0.22, 1, 0.36, 1), height 400ms cubic-bezier(0.22, 1, 0.36, 1), opacity 250ms ease; }
footer nav ul li a:focus-visible { margin-top: 0; height: 150px; }
footer article { pointer-events: none; }

/* Main：背景と本文を同時に、下から上へフェードイン */
main > article.article-reveal { position: relative; animation: article-appear 1000ms ease-in-out both; }
main > article.article-reveal:focus-within { animation: none; }
@keyframes article-appear {
from { opacity: 0; top: 72px; }
to { opacity: 1; top: 0; }
}

@media only screen and (max-width: 767px) {
footer nav ul li:nth-child(n) a { height: 100px; transition: opacity 250ms ease; }
footer nav ul li:nth-child(n) a:hover, footer nav ul li:nth-child(n) a:focus-visible { margin-top: 0; height: 100px; }
footer nav li a span { transition: transform 250ms cubic-bezier(0.22, 1, 0.36, 1); }
}

@media only screen and (max-width: 767px) and (hover: hover) and (pointer: fine) {
footer nav ul li a:hover span, footer nav ul li a:focus-visible span { transform: translateY(-3px); }
}

@media (prefers-reduced-motion: reduce) {
html { scroll-behavior: auto; }
footer nav ul li:nth-child(n) a, footer nav li a span { transition: none; }
main > article.article-reveal { animation: none; }
}

@media print {
main > article.article-reveal { animation: none; }
}

/* Copyright：文字の色に合わせて8方向の影で縁取り */
footer small.pc { font-size: 84%; text-shadow: -1px -1px 0 #fff, 0 -1px 0 #fff, 1px -1px 0 #fff, -1px 0 0 #fff, 1px 0 0 #fff, -1px 1px 0 #fff, 0 1px 0 #fff, 1px 1px 0 #fff, 0 0 4px #fff, 0 2px 2px rgba(0, 0, 0, 0.5); }
footer small.mob { font-size: 75%; text-shadow: -1px -1px 0 #222, 0 -1px 0 #222, 1px -1px 0 #222, -1px 0 0 #222, 1px 0 0 #222, -1px 1px 0 #222, 0 1px 0 #222, 1px 1px 0 #222, 0 2px 3px #000; }
