/* C案: A案＋動きを盛った版（2026-11-26 本人「エフェクトもりもりにしてみて」）
   動きは全部 CSS と自前の JS だけ（外部の部品なし・重くしない）。動きを減らす設定の人には全部止める */

/* 1. 上の墨の線＝読んだ量 */
.fx-progress { position: fixed; left: 0; top: 0; height: 3px; width: 100%; background: var(--ink); transform-origin: left center; transform: scaleX(0); z-index: 60; pointer-events: none; }
.fx-progress::after { content: ""; position: absolute; right: -4px; top: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); }

/* 2. ヘッダー: 下へ読む時は隠れ、戻ると出る */
.hd { transition: transform .45s cubic-bezier(.2,.7,.2,1), background .3s; }
.hd.fx-hide { transform: translateY(-100%); }

/* 3. 最初の画面: 写真が墨の幕から現れ、ゆっくり寄る／見出しが1文字ずつ立ち上がる */
.fx .hero-photo { overflow: hidden; position: relative; }
.fx .hero-photo::after { content: ""; position: absolute; inset: 0; background: var(--ink); transform-origin: right center; animation: fx-curtain 1.3s cubic-bezier(.77,0,.18,1) .15s both; }
.fx .hero-photo img { animation: fx-zoom 14s ease-out both; }
@keyframes fx-curtain { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes fx-zoom { from { transform: scale(1.18); } to { transform: scale(1.02); } }
.fx-ch { display: inline-block; opacity: 0; transform: translateY(.6em) rotate(4deg); filter: blur(6px); animation: fx-ch .9s cubic-bezier(.2,.7,.2,1) both; }
@keyframes fx-ch { to { opacity: 1; transform: none; filter: blur(0); } }
.fx .hero-place, .fx .hero-lead, .fx .hero-btns, .fx .tally > div { opacity: 0; transform: translateY(18px); animation: fx-up .9s cubic-bezier(.2,.7,.2,1) both; }
.fx .hero-place { animation-delay: .5s; }
.fx .hero-lead { animation-delay: 1.5s; }
.fx .hero-btns { animation-delay: 1.7s; }
.fx .tally > div:nth-child(1) { animation-delay: 1.9s; }
.fx .tally > div:nth-child(2) { animation-delay: 2.0s; }
.fx .tally > div:nth-child(3) { animation-delay: 2.1s; }
.fx .tally > div:nth-child(4) { animation-delay: 2.2s; }
@keyframes fx-up { to { opacity: 1; transform: none; } }
.fx .hero-copy::before { transform-origin: top; animation: fx-vline 1.4s cubic-bezier(.2,.7,.2,1) .3s both; }
@keyframes fx-vline { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* 4. 地名が流れる帯（伺う町） */
.fx-marquee { overflow: hidden; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); margin-top: 110px; padding: 18px 0; white-space: nowrap; }
.fx-marquee-in { display: inline-flex; gap: 56px; animation: fx-marq 38s linear infinite; font-family: var(--mincho); font-size: 30px; font-weight: 700; letter-spacing: .12em; }
.fx-marquee-in span { display: inline-flex; align-items: center; gap: 56px; }
.fx-marquee-in span::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }
.fx-marquee-in small { font-family: var(--sans); font-size: 13px; font-weight: 400; color: var(--ink-sub); margin-left: 12px; letter-spacing: .06em; }
@keyframes fx-marq { to { transform: translateX(-50%); } }
.fx-marquee:hover .fx-marquee-in { animation-play-state: paused; }

/* 5. 章に入ると、下からせり上がる（少しずつ遅れて） */
.fx-r { opacity: 0; transform: translateY(40px); transition: opacity 1s cubic-bezier(.2,.7,.2,1), transform 1s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0s); }
.fx-r.is-in { opacity: 1; transform: none; }
/* 見出しは墨の幕がめくれて出る */
.fx-wipe { position: relative; }
.fx-wipe::after { content: ""; position: absolute; inset: -4px -6px; background: var(--paper); transform-origin: right center; transition: transform 1.1s cubic-bezier(.77,0,.18,1) .15s; }
.week .fx-wipe::after, .consult .fx-wipe::after { background: var(--ink); }
.boss .fx-wipe::after { background: var(--paper-2); }
.fx-wipe.is-in::after { transform: scaleX(0); }

/* 6. 写真: 枠の中でゆっくり動く（視差）＋めくれて出る＋触ると寄る */
.fx-pic { display: block; overflow: hidden; position: relative; }
.fx-pic img { transform: translateY(var(--py, 0px)) scale(1.12); transition: transform .2s linear, filter .6s; will-change: transform; }
.fx-pic::before { content: ""; position: absolute; inset: 0; background: var(--ink); z-index: 1; transform-origin: left center; transition: transform 1.2s cubic-bezier(.77,0,.18,1); pointer-events: none; }
.fx-pic.is-in::before { transform: scaleX(0); transform-origin: right center; }
.fx-pic:hover img { transform: translateY(var(--py, 0px)) scale(1.17); }

/* 7. 黒板: 1行ずつチョークで書かれるように */
.fx .board tbody tr { opacity: 0; transform: translateX(-24px); transition: opacity .7s, transform .7s cubic-bezier(.2,.7,.2,1); }
.fx .board.is-in tbody tr { opacity: 1; transform: none; }
.fx .board.is-in tbody tr:nth-child(2) { transition-delay: .15s; }
.fx .board.is-in tbody tr:nth-child(3) { transition-delay: .3s; }
.fx .board.is-in tbody tr:nth-child(4) { transition-delay: .45s; }
.fx .board.is-in tbody tr:nth-child(5) { transition-delay: .6s; }
.fx .board tbody tr:hover td { color: #fff; background: rgba(255,255,255,.04); }

/* 8. 件数の行: 線が左から引かれる */
.fx .calls li { position: relative; border-bottom-color: transparent; }
.fx .calls li::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--line); transform: scaleX(0); transform-origin: left; transition: transform 1.2s cubic-bezier(.2,.7,.2,1) calc(var(--d, 0s) + .2s); }
.fx .calls li.is-in::after { transform: scaleX(1); }
.fx .calls li:hover .n { color: var(--wood); }
.calls .n { transition: color .3s; }

/* 9. ボタン: 墨が左から満ちる */
.btn { position: relative; overflow: hidden; z-index: 0; }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--paper); transform: scaleX(0); transform-origin: left; transition: transform .5s cubic-bezier(.77,0,.18,1); }
.btn:hover { background: var(--ink); color: var(--ink); }
.btn:hover::before { transform: scaleX(1); }
.btn-line::before { background: var(--ink); }
.btn-line:hover { background: transparent; color: var(--paper); }
.doors a { position: relative; overflow: hidden; }
.doors a::before { content: ""; position: absolute; inset: 0; background: var(--paper); transform: translateY(101%); transition: transform .5s cubic-bezier(.77,0,.18,1); z-index: 0; }
.doors a > * { position: relative; z-index: 1; transition: color .4s; }
.doors a:hover::before { transform: none; }
.doors a:hover b, .doors a:hover span { color: var(--ink); }

/* 10. 最後の山なみが墨で描かれる */
.fx .ridge path { stroke-dasharray: 2400; stroke-dashoffset: 2400; transition: stroke-dashoffset 3.2s cubic-bezier(.4,0,.2,1); }
.fx .ridge.is-in path { stroke-dashoffset: 0; }
.fx .ridge { color: #9d9588; }

/* 11. マウスに付いてくる墨の点（PCだけ） */
.fx-cursor { position: fixed; left: 0; top: 0; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #fff; pointer-events: none; z-index: 70; mix-blend-mode: difference; transition: width .25s, height .25s, margin .25s, opacity .3s; opacity: 0; }
.fx-cursor.on { opacity: 1; }
.fx-cursor.big { width: 54px; height: 54px; margin: -27px 0 0 -27px; }

/* 12. 引用: 1行が墨で書かれるように左から出る */
.fx .quote p { background: linear-gradient(90deg, var(--ink) 50%, rgba(29,27,24,.12) 50%); background-size: 200% 100%; background-position: 100% 0; -webkit-background-clip: text; background-clip: text; color: transparent; transition: background-position 1.8s cubic-bezier(.2,.7,.2,1) .2s; }
.fx .quote.is-in p { background-position: 0 0; }

@media (max-width: 900px) {
  .fx-marquee { margin-top: 64px; padding: 12px 0; }
  .fx-marquee-in { font-size: 20px; gap: 32px; }
  .fx-marquee-in span { gap: 32px; }
  .fx-cursor { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .fx-r, .fx-ch, .fx .hero-place, .fx .hero-lead, .fx .hero-btns, .fx .tally > div, .fx .board tbody tr { opacity: 1 !important; transform: none !important; filter: none !important; }
  .fx-wipe::after, .fx-pic::before, .fx .hero-photo::after { display: none; }
  .fx-cursor, .fx-progress { display: none; }
}
