/* クリニックC案: A案＋動きを盛った版（2026-11-26 本人「クリニックにも動きを盛ってみて」）
   動きの素材は名前の「こもれび」＝木もれ日の光だけ（さす・にじむ・揺れる）。工務店C案（墨）と同じ作り方
   外部の部品なし。動きを減らす設定の人には全部止める */
:root { --glow: 201,165,106; }

/* 1. 上の光の線＝読んだ量 */
.fx-progress { position: fixed; left: 0; top: 0; height: 3px; width: 100%; background: linear-gradient(90deg, rgba(var(--glow),.2), rgb(var(--glow))); transform-origin: left center; transform: scaleX(0); z-index: 60; pointer-events: none; }
.fx-progress::after { content: ""; position: absolute; right: -10px; top: -9px; width: 21px; height: 21px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--glow),.9) 0 20%, rgba(var(--glow),0) 70%); }

/* 2. ヘッダー: 下へ読む時は隠れ、戻ると出る */
.hd { transition: transform .45s cubic-bezier(.2,.7,.2,1); }
.hd.fx-hide { transform: translateY(-100%); }
.today-dot { animation: fx-pulse 2.4s ease-in-out infinite; }
@keyframes fx-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(var(--glow),.55); } 50% { box-shadow: 0 0 0 7px rgba(var(--glow),0); } }

/* 3. 最初の画面: 写真に光がさして現れ、ゆっくり寄る。木もれ日が写真の上で揺れる */
.fx .hero-photo { position: relative; }
.fx-hero-img { display: block; overflow: hidden; }
.fx-hero-img > img { animation: fx-dawn 2.2s cubic-bezier(.2,.7,.2,1) .1s both, fx-zoom 16s ease-out both; }
@keyframes fx-dawn { from { filter: brightness(1.9) saturate(.4) blur(10px); opacity: .2; } to { filter: none; opacity: 1; } }
@keyframes fx-zoom { from { transform: scale(1.12); } to { transform: scale(1); } }
.fx-hero-clip { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.fx-leaf.sh { background: radial-gradient(ellipse, rgba(48,62,36,.2) 0 20%, rgba(48,62,36,.08) 45%, rgba(48,62,36,0) 70%); mix-blend-mode: multiply; }
.fx-hero-clip::before { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(255,214,150,.22), rgba(255,214,150,0) 55%); animation: fx-fadein 3s ease 1.2s both; }
.fx-leaf { position: absolute; border-radius: 50%; background: radial-gradient(circle, rgba(255,232,170,.62) 0 14%, rgba(255,222,150,.26) 38%, rgba(255,222,150,0) 66%); animation: fx-sway var(--t, 9s) ease-in-out var(--dl, 0s) infinite alternate, fx-fadein 2s ease 1s both; }
@keyframes fx-sway { from { transform: translate(0,0) scale(1); opacity: .55; } to { transform: translate(var(--x, 30px), var(--y, -20px)) scale(1.18); opacity: 1; } }
@keyframes fx-fadein { from { opacity: 0; } }
.fx-ch { display: inline-block; opacity: 0; filter: blur(8px); transform: translateY(.35em); animation: fx-ch 1.1s cubic-bezier(.2,.7,.2,1) both; }
@keyframes fx-ch { to { opacity: 1; filter: blur(0); transform: none; } }
.fx .hero-place, .fx .hero-lead, .fx .hero-btns, .fx .hero-wait { opacity: 0; transform: translateY(18px); animation: fx-up .9s cubic-bezier(.2,.7,.2,1) both; }
.fx .hero-place { animation-delay: .4s; }
.fx .hero-lead { animation-delay: 1.9s; }
.fx .hero-btns { animation-delay: 2.05s; }
.fx .hero-wait { animation-delay: 2.2s; }
.fx .hero-doc { animation: fx-card 1s cubic-bezier(.2,.7,.2,1) 1.6s both; }
@keyframes fx-card { from { opacity: 0; transform: translate(-20px, 30px); } to { opacity: 1; transform: none; } }
@keyframes fx-up { to { opacity: 1; transform: none; } }

/* 4. 医院のことが流れる帯 */
.fx-marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 120px; padding: 18px 0; white-space: nowrap; }
.fx-marquee-in { display: inline-flex; gap: 48px; animation: fx-marq 44s linear infinite; font-family: var(--mincho); font-size: 24px; font-weight: 700; letter-spacing: .12em; color: var(--main); }
.fx-marquee-in span { display: inline-flex; align-items: center; gap: 48px; }
.fx-marquee-in span::after { content: ""; width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle, rgb(var(--glow)) 0 22%, rgba(var(--glow),.35) 42%, rgba(var(--glow),0) 70%); }
@keyframes fx-marq { to { transform: translateX(-50%); } }
.fx-marquee:hover .fx-marquee-in { animation-play-state: paused; }

/* 5. 章に入ると、光の中から浮かび上がる（少しずつ遅れて） */
.fx-r { opacity: 0; transform: translateY(36px); filter: blur(4px); transition: opacity 1.1s cubic-bezier(.2,.7,.2,1), transform 1.1s cubic-bezier(.2,.7,.2,1), filter 1.1s; transition-delay: var(--d, 0s); }
.fx-r.is-in { opacity: 1; transform: none; filter: none; }
/* 見出しは、光がにじんでから文字になる */
.fx-glow { opacity: 0; filter: blur(12px); letter-spacing: .3em; transition: opacity 1.4s ease, filter 1.4s ease, letter-spacing 1.6s cubic-bezier(.2,.7,.2,1); }
.fx-glow.is-in { opacity: 1; filter: none; letter-spacing: .06em; }
.policy-title.fx-glow.is-in, .week h2.fx-glow.is-in { letter-spacing: .06em; }

/* 6. 写真: 光がさして現れる＋枠の中でゆっくり動く＋木もれ日が通り過ぎる */
.fx-pic { display: block; overflow: hidden; position: relative; }
.fx-pic img { transform: translateY(var(--py, 0px)) scale(1.12); filter: brightness(1.8) saturate(.5) blur(6px); opacity: .3; transition: filter 1.6s cubic-bezier(.2,.7,.2,1), opacity 1.4s, transform .2s linear; will-change: transform; }
.fx-pic.is-in img { filter: none; opacity: 1; }
.fx-pic::after { content: ""; position: absolute; top: -30%; left: -60%; width: 50%; height: 160%; background: linear-gradient(100deg, rgba(255,248,230,0), rgba(255,248,230,.35), rgba(255,248,230,0)); transform: rotate(8deg); pointer-events: none; }
.fx-pic:hover::after { animation: fx-sheen 1.4s ease; }
.fx-pic:hover img { transform: translateY(var(--py, 0px)) scale(1.16); }
@keyframes fx-sheen { to { left: 120%; } }

/* 7. 今週の掲示板: 数字が数え上がり、1つずつ灯る */
.fx .pin dl div { opacity: 0; transform: translateY(16px); transition: opacity .8s, transform .8s cubic-bezier(.2,.7,.2,1); }
.fx .pin.is-in dl div { opacity: 1; transform: none; }
.fx .pin.is-in dl div:nth-child(2) { transition-delay: .15s; }
.fx .pin.is-in dl div:nth-child(3) { transition-delay: .3s; }
.fx .pin.is-in dl div:nth-child(4) { transition-delay: .45s; }
.fx .pin dd { text-shadow: 0 0 0 rgba(var(--glow),0); transition: text-shadow 1.6s ease .8s; }
.fx .pin.is-in dd { text-shadow: 0 0 22px rgba(var(--glow),.45); }

/* 8. 表・手順: 線が左から引かれ、行が順に出る */
.fx .med-table tr { opacity: 0; transform: translateX(-20px); transition: opacity .8s, transform .8s cubic-bezier(.2,.7,.2,1); }
.fx .med-table.is-in tr { opacity: 1; transform: none; }
.fx .med-table.is-in tr:nth-child(2) { transition-delay: .12s; }
.fx .med-table.is-in tr:nth-child(3) { transition-delay: .24s; }
.fx .med-table.is-in tr:nth-child(4) { transition-delay: .36s; }
.fx .med-table tr:hover th { color: var(--gold); }
.med-table th { transition: color .3s; }
.fx .first-list { position: relative; border-top-color: transparent; }
.fx .first-list::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: linear-gradient(90deg, var(--main), rgb(var(--glow))); transform: scaleX(0); transform-origin: left; transition: transform 1.8s cubic-bezier(.2,.7,.2,1); }
.fx .first-list.is-in::before { transform: scaleX(1); }

/* 9. ボタン: 光が走る */
.btn, .hd-btn, .r-web { position: relative; overflow: hidden; }
.btn::after, .hd-btn::after, .r-web::after { content: ""; position: absolute; top: 0; bottom: 0; left: -70%; width: 50%; background: linear-gradient(100deg, rgba(255,255,255,0), rgba(255,246,222,.45), rgba(255,255,255,0)); transform: skewX(-18deg); pointer-events: none; }
.btn:hover::after, .hd-btn:hover::after, .r-web:hover::after { animation: fx-sheen 0.9s ease; }
.r-web::after { animation: fx-sheen 1.6s ease 1s 2; }

/* 10. 院長の一言: 光で書かれるように左から色が付く */
.fx .quote p { background: linear-gradient(90deg, var(--ink) 45%, rgb(var(--glow)) 50%, rgba(34,48,45,.12) 55%); background-size: 220% 100%; background-position: 100% 0; -webkit-background-clip: text; background-clip: text; color: transparent; transition: background-position 2.2s cubic-bezier(.2,.7,.2,1) .2s; }
.fx .quote.is-in p { background-position: 0 0; }

/* 11. マウスに付いてくる木もれ日（PCだけ） */
.fx-cursor { position: fixed; left: 0; top: 0; width: 140px; height: 140px; margin: -70px 0 0 -70px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--glow),.28) 0 10%, rgba(var(--glow),.12) 35%, rgba(var(--glow),0) 70%); pointer-events: none; z-index: 70; opacity: 0; transition: opacity .4s, width .3s, height .3s, margin .3s; }
.fx-cursor.on { opacity: 1; }
.fx-cursor.big { width: 220px; height: 220px; margin: -110px 0 0 -110px; }

/* 12. 章の印（光の丸）がにじんだ後、ゆっくり息をする */
.fx .q.is-in .mark { animation: fx-breathe 4s ease-in-out 1.2s infinite; }
@keyframes fx-breathe { 50% { transform: scale(1.25); opacity: .7; } }

@media (max-width: 900px) {
  .fx-marquee { margin-top: 72px; padding: 12px 0; }
  .fx-marquee-in { font-size: 17px; gap: 28px; }
  .fx-marquee-in span { gap: 28px; }
  .fx-cursor { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .fx-r, .fx-glow, .fx-ch, .fx .hero-place, .fx .hero-lead, .fx .hero-btns, .fx .hero-wait, .fx .pin dl div, .fx .med-table tr { opacity: 1 !important; transform: none !important; filter: none !important; }
  .fx-pic img { filter: none !important; opacity: 1 !important; }
  .fx-cursor, .fx-progress, .fx-leaf { display: none; }
}
.fx-marquee + .week { margin-top: 100px; }
@media (max-width: 900px) { .fx-marquee + .week { margin-top: 64px; } }
