/* 動きの演出（4案共通。案ごとの違いは .theme-N で指定） */
@keyframes m-fade{to{opacity:1}}
@keyframes m-float{50%{transform:translateY(-12px)}}
@keyframes m-bounce{0%,100%{transform:none}30%{transform:translateY(-9px)}55%{transform:translateY(0)}75%{transform:translateY(-4px)}}
@keyframes m-zoom{from{transform:scale(1)}to{transform:scale(1.07)}}
@keyframes m-marquee{to{transform:translateX(-50%)}}
@keyframes m-morph{0%{border-radius:48% 45% 39% 38%/44% 38% 46% 42%}50%{border-radius:40% 52% 44% 46%/50% 42% 52% 40%}100%{border-radius:52% 40% 46% 42%/40% 48% 40% 50%}}
@keyframes m-sway{0%,100%{transform:rotate(-2deg)}50%{transform:rotate(3deg)}}
@keyframes m-bird{from{opacity:0;transform:translate(90px,-50px) rotate(8deg)}to{opacity:1;transform:none}}

/* オープニング */
.opening{position:fixed;inset:0;z-index:200;display:grid;place-items:center;background:var(--paper);transition:opacity 1s ease,visibility 1s}
.opening.is-done{opacity:0;visibility:hidden}
.opening-logo{display:flex;align-items:center;gap:14px;opacity:0;animation:m-fade 1s .2s forwards;line-height:1.5}
.opening-logo .icon{width:46px;height:46px;color:var(--accent)}
.opening-logo span{font:600 18px var(--serif);letter-spacing:.06em}
.opening-logo small{display:block;font:9px var(--en);letter-spacing:.17em;margin-top:7px}
.opening-copy{writing-mode:vertical-rl;font:400 28px/2 var(--serif);letter-spacing:.28em;color:var(--accent)}
.opening-copy span{opacity:0;animation:m-fade .6s forwards}

/* ファーストビューの登場 */
.motion .hero-copy>*{opacity:0;transform:translateY(22px);transition:opacity 1s ease,transform 1s cubic-bezier(.2,.7,.2,1)}
.motion .hero-copy>:nth-child(2){transition-delay:.15s}
.motion .hero-copy>:nth-child(3){transition-delay:.3s}
.motion .hero-copy>:nth-child(4){transition-delay:.45s}
.motion .hero-copy>:nth-child(5){transition-delay:.6s}
.motion.is-loaded .hero-copy>*{opacity:1;transform:none}
.motion .organic-photo,.motion .arch-photo{opacity:0;transform:translateY(80px);transition:opacity 1.2s ease .2s,transform 1.4s cubic-bezier(.2,.7,.2,1) .2s}
.motion .editorial-photo{opacity:0;transition:opacity 1.8s ease}
.motion .hero-two .hero-image{opacity:0;transform:scale(1.06);transition:opacity 1.6s ease,transform 3s ease-out}
.motion.is-loaded :is(.organic-photo,.arch-photo,.editorial-photo){opacity:1;transform:none}
.motion.is-loaded .hero-two .hero-image{opacity:1;transform:none}

/* スクロールで表示 */
.motion .reveal{opacity:0;transform:translateY(var(--rise,30px));transition:opacity .9s ease var(--d,0s),transform 1s cubic-bezier(.2,.7,.2,1) var(--d,0s)}
.motion .reveal.is-in{opacity:1;transform:none}
.theme-3{--rise:60px}
.motion .reveal.pop{transform:scale(.86)}
.motion .reveal.pop.is-in{transform:none;transition-timing-function:ease,cubic-bezier(.34,1.56,.64,1)}

/* スライドショー */
.slide{animation:m-zoom 14s ease-in-out infinite alternate}
.slide-layer{position:absolute!important;inset:0;width:100%;height:100%!important;opacity:0;transition:opacity 1.8s ease}
.slide-layer.is-active{opacity:1}
.slide-ctrl{position:absolute;z-index:2;right:14px;bottom:14px;display:flex;align-items:center;gap:8px;padding:6px 6px 6px 16px;background:#fffffff0;font:11px var(--en);letter-spacing:.12em}
.slide-ctrl span{margin-right:8px}
.slide-ctrl button{width:34px;height:34px;border:1px solid var(--line);border-radius:50%;background:none;transition:background .2s}
.slide-ctrl button:hover{background:var(--pale)}
/* 写真のズームが枠からはみ出さないよう、枠側で切り抜く */
.clinic-picture,.editorial-photo,.arch-photo{overflow:hidden}
.theme-1 .clinic-picture{border-radius:50% 50% 8px 8px}
.theme-4 .clinic-picture{border-radius:48% 48% 30px 30px}
.editorial-photo{border-radius:0 120px 0 0}
.arch-photo{border-radius:48% 48% 5px 5px}
.image-caption,.editorial-photo>span{z-index:2}

/* 動画 */
.hero-video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;filter:brightness(.83);opacity:0;transition:opacity 1.5s ease}
.hero-video.is-ready{opacity:1}
.movie-circle{position:relative;width:190px;height:190px;margin-top:40px;border-radius:50%;overflow:hidden}
.movie-circle video{width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity 1s}
.movie-circle video.is-ready{opacity:1}
.movie-circle span{position:absolute;left:50%;bottom:22px;transform:translateX(-50%);padding:5px 16px;border-radius:20px;background:#ffffffd9;font:italic 14px 'Cormorant Garamond',serif;letter-spacing:.06em}

/* 背景の大きな文字・流れる欧文 */
body{overflow-x:clip}
.concept{position:relative;isolation:isolate}
.bg-word{position:absolute;z-index:-1;top:-40px;left:-6%;white-space:nowrap;pointer-events:none;font:600 clamp(80px,13vw,200px)/1 var(--en);letter-spacing:.02em;color:var(--pale)}
.theme-2 .bg-word{font:italic 400 clamp(110px,17vw,260px)/1 'Cormorant Garamond',serif;color:#e3eaeb}
.marquee{overflow:hidden;white-space:nowrap;padding:40px 0 0;font:italic 400 clamp(46px,6vw,88px)/1.2 'Cormorant Garamond',serif;color:var(--line)}
.marquee-track{display:inline-flex;animation:m-marquee 60s linear infinite}
.marquee-track span{padding-right:.4em}

/* 揺れ・弾み */
.theme-1 .organic-photo img{animation:m-morph 12s ease-in-out infinite alternate}
.theme-1 .organic-photo img.slide{animation:m-morph 12s ease-in-out infinite alternate,m-zoom 14s ease-in-out infinite alternate}
.theme-1 .photo-tag{animation:m-float 6s ease-in-out infinite;z-index:2}
.theme-1 .care-item:hover>.icon,.theme-4 .care-item:hover>.icon{animation:m-bounce .7s ease}
.theme-4 .button:hover,.theme-4 .mobile-cta button:active{animation:m-bounce .6s ease}
.theme-4 .sun{animation:m-float 5s ease-in-out infinite}
.hero-four{overflow-x:clip}
.deco{position:absolute;pointer-events:none;z-index:3;height:auto}
.deco-bird{width:110px;top:40px;right:7%;opacity:0}
.motion.is-loaded .deco-bird{animation:m-bird 1.4s cubic-bezier(.2,.7,.2,1) .6s both,m-float 5s ease-in-out 2.2s infinite}
.deco-branch{width:200px;left:-20px;top:0;transform-origin:left center;animation:m-sway 7s ease-in-out infinite}

@media(max-width:800px){
  .bg-word{top:-10px;font-size:22vw}
  .theme-2 .bg-word{font-size:26vw}
  .marquee{padding-top:24px}
  .movie-circle{width:150px;height:150px;margin-top:25px}
  .deco-bird{width:72px;top:10px;right:5%}
  .deco-branch{width:120px;top:-4px;left:-14px}
  .editorial-photo{border-top-right-radius:75px}
}
@media(prefers-reduced-motion:reduce){
  .motion .reveal,.motion .hero-copy>*,.motion :is(.organic-photo,.arch-photo,.editorial-photo),.motion .hero-two .hero-image,.deco-bird{opacity:1!important;transform:none!important}
}
