/* 画面の動き（2026-10-07 村松さん指示「トップページとテンプレートを選ぶページに動きをつけて素敵なサイトに」） */
/* 動きを減らす設定の端末では、すべて止める */

/* ---- スクロールで見えたら、順にふわっと出す（JavaScript があるときだけ隠す） ---- */
.js-motion .rv { opacity: 0; transform: translateY(18px); transition: opacity .55s cubic-bezier(.2, .7, .2, 1) var(--rv-delay, 0ms), transform .55s cubic-bezier(.2, .7, .2, 1) var(--rv-delay, 0ms); }
.js-motion .rv.is-in { opacity: 1; transform: none; }

/* ---- ヘッダー：スクロールしたら影 ---- */
.site-header { transition: box-shadow .25s; }
.is-scrolled .site-header { box-shadow: 0 2px 14px rgba(8, 31, 50, .08); }
.header-search-space { flex: 1 1 280px; }

/* ---- トップのヒーロー ---- */
.hero { position: relative; overflow: hidden; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; filter: blur(8px); }
.hero::before { width: 46vw; height: 46vw; max-width: 620px; max-height: 620px; right: -8vw; top: -18vw; background: radial-gradient(circle at 40% 40%, rgba(1, 124, 136, .16), rgba(1, 124, 136, 0) 65%); animation: hero-drift 16s ease-in-out infinite alternate; }
.hero::after { width: 30vw; height: 30vw; max-width: 420px; max-height: 420px; left: -10vw; bottom: -16vw; background: radial-gradient(circle at 50% 50%, rgba(230, 160, 60, .14), rgba(230, 160, 60, 0) 65%); animation: hero-drift 20s ease-in-out infinite alternate-reverse; }
.hero .wrap { position: relative; z-index: 1; }
@keyframes hero-drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(-4vw, 3vw) scale(1.08); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero h1 { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.hero p.lead { animation: rise .8s .1s cubic-bezier(.2, .7, .2, 1) both; }
.hero-search { animation: rise .8s .2s cubic-bezier(.2, .7, .2, 1) both; }
.hero-note { animation: rise .8s .28s cubic-bezier(.2, .7, .2, 1) both; }
.hero-make { animation: rise .8s .36s cubic-bezier(.2, .7, .2, 1) both; }
.hero-visual a { display: block; animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.hero-visual a:nth-child(1) { animation-delay: .25s; }
.hero-visual a:nth-child(2) { animation-delay: .4s; }
.hero-visual a:nth-child(3) { animation-delay: .55s; }
.hero-visual img { animation: float 6s ease-in-out infinite alternate; transition: transform .35s, box-shadow .35s; }
.hero-visual a:nth-child(2) img { animation-duration: 7s; animation-delay: -2s; }
.hero-visual a:nth-child(3) img { animation-duration: 8s; animation-delay: -4s; }
.hero-visual a:hover img { animation-play-state: paused; box-shadow: 0 16px 32px rgba(8, 31, 50, .2); }
@keyframes float { from { transform: translateY(0); } to { transform: translateY(-10px); } }
.hero-search input { transition: box-shadow .2s; }
.hero-search input:focus { outline: none; box-shadow: 0 0 0 4px rgba(1, 124, 136, .18); }

/* ヒーローの「デザインを作る」 */
.hero-make { margin-top: 18px; display: grid; gap: 10px; }
.hero-make-btn { display: inline-flex; flex-direction: column; justify-self: start; gap: 2px; padding: 12px 22px; border-radius: 999px; background: linear-gradient(120deg, var(--navy), var(--teal)); background-size: 200% 100%; color: #fff; text-decoration: none; box-shadow: 0 6px 18px rgba(1, 124, 136, .28); transition: transform .2s, box-shadow .2s, background-position .5s; }
.hero-make-btn strong { font-size: 1.05rem; letter-spacing: .06em; }
.hero-make-btn span { font-size: .78rem; opacity: .9; }
.hero-make-btn:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(1, 124, 136, .34); background-position: 100% 0; }
.hero-make-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.hero-make-list a { display: inline-block; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); font-size: .82rem; color: var(--ink, #333); text-decoration: none; transition: border-color .2s, color .2s, transform .2s; }
.hero-make-list a:hover { border-color: var(--teal); color: var(--teal-dark); transform: translateY(-2px); }

/* ---- カード（テンプレート一覧・トップ・作る画面） ---- */
.card { transition: transform .25s cubic-bezier(.2, .7, .2, 1), box-shadow .25s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(8, 31, 50, .14); }
.card-thumb img { transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.card a:hover .card-thumb img { transform: scale(1.04); }
.scenes a { transition: transform .25s, box-shadow .25s; }
.scenes a:hover { transform: translateY(-3px); }
.scenes a img { transition: transform .45s; }
.scenes a:hover img { transform: scale(1.05); }
.chips a { transition: border-color .2s, color .2s, background .2s, transform .2s; }
.chips a:hover { transform: translateY(-1px); }

/* 何を作りますか（/editor） */
.ep-media-card { transition: transform .22s cubic-bezier(.2, .7, .2, 1), box-shadow .22s, border-color .22s; }
.ep-media-card:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(8, 31, 50, .12); }
.ep-media-shape { transition: transform .3s cubic-bezier(.2, .7, .2, 1), border-color .3s; }
.ep-media-card:hover .ep-media-shape { transform: scale(1.12) rotate(-3deg); border-color: var(--teal); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js-motion .rv { opacity: 1; transform: none; }
}
