/* motion.css — プロモーションビデオ風の演出レイヤー
   外すときは index.html の以下を消すだけで元に戻ります:
   ①<head>内の m-js を付ける小さな<script> ②<body>直後の .m-intro ブロック
   ③<link href="motion.css"> ④<script src="motion.js">
   「動きを減らす」設定の方・JavaScript無効の方には、いっさい動かしません。 */

/* ═════════ 0. 共通キーフレーム ═════════ */
@keyframes mUp{from{opacity:0;transform:translateY(28px)}to{opacity:1;transform:none}}
@keyframes mFail{to{opacity:1}}                       /* JSが動かなくても必ず表示する保険 */
@keyframes mOrbA{to{transform:translate(120px,70px) scale(1.15)}}
@keyframes mOrbB{to{transform:translate(-110px,-60px) scale(1.2)}}

/* ═════════ 1. オープニング（初回のみ・約2.5秒）═════════ */
.m-intro{display:none;position:fixed;inset:0;z-index:10000;background:#2a2320;color:#f6efe4;
  align-items:center;justify-content:center;flex-direction:column;text-align:center;overflow:hidden}
.m-intro-on .m-intro{display:flex;animation:mCurtain 1.05s cubic-bezier(.76,0,.24,1) 2.5s forwards}
.m-intro::before{content:"";position:absolute;width:640px;height:640px;border-radius:50%;left:50%;top:50%;margin:-320px 0 0 -320px;
  background:radial-gradient(circle,rgba(248,160,0,.28),transparent 65%);filter:blur(24px);animation:mGlow 2.6s ease-out both}
@keyframes mGlow{from{opacity:0;transform:scale(.4)}to{opacity:1;transform:scale(1)}}
@keyframes mCurtain{0%{clip-path:inset(0 0 0 0)}99%{visibility:visible}100%{clip-path:inset(0 0 100% 0);visibility:hidden}}
.m-intro-in{position:relative}
.m-intro p{margin:0;overflow:hidden;padding:.08em .1em}
.m-l1,.m-l2{font-size:clamp(2rem,6.4vw,3.9rem);font-weight:800;letter-spacing:.06em;line-height:1.35}
.m-l2 span{color:#F8A000}
.m-intro p span{display:block;transform:translateY(112%);animation:mRise 1s cubic-bezier(.2,.8,.2,1) forwards}
.m-l1 span{animation-delay:.25s}.m-l2 span{animation-delay:.6s}
@keyframes mRise{to{transform:none}}
.m-bar{display:block;height:2px;width:0;margin:22px auto 16px;background:linear-gradient(90deg,transparent,#F8A000,transparent);animation:mBar 1.1s ease 1.1s forwards}
@keyframes mBar{to{width:min(260px,60vw)}}
.m-brand{font-size:.82rem;letter-spacing:.34em;color:#cdbfae;opacity:0;animation:mFade 1.1s ease 1.4s forwards}
.m-brand span{transform:none!important;animation:none!important;display:inline!important}
@keyframes mFade{to{opacity:.85}}
.m-skip{position:absolute;right:22px;bottom:20px;background:none;border:1px solid rgba(246,239,228,.35);color:#e9dfd0;
  font-size:.7rem;letter-spacing:.2em;padding:7px 14px;border-radius:999px;cursor:pointer;font-family:inherit;opacity:.7}
.m-skip:hover{opacity:1;border-color:#F8A000}
.m-skipped .m-intro{animation:mQuick .4s ease forwards!important}
@keyframes mQuick{to{opacity:0;visibility:hidden}}

/* ═════════ 2. ヒーロー ═════════ */
.hero{position:relative;overflow:hidden;isolation:isolate}
.hero .wrap{position:relative;z-index:1}
.hero-net{position:absolute;inset:0;width:100%;height:100%;z-index:-1;pointer-events:none;opacity:0;transition:opacity 2s ease}
.hero-net.on{opacity:1}
.hero::before,.hero::after{content:"";position:absolute;z-index:-1;border-radius:50%;pointer-events:none;filter:blur(60px);opacity:.6}
.hero::before{width:440px;height:440px;left:-130px;top:-90px;background:radial-gradient(circle,rgba(253,219,153,.9),rgba(253,219,153,0) 70%)}
.hero::after{width:380px;height:380px;right:-100px;bottom:-120px;background:radial-gradient(circle,rgba(248,160,0,.3),rgba(248,160,0,0) 70%)}
.m-js .hero::before{animation:mOrbA 18s ease-in-out infinite alternate}
.m-js .hero::after{animation:mOrbB 22s ease-in-out infinite alternate}
.m-spot{position:absolute;inset:0;z-index:-1;pointer-events:none;opacity:0;transition:opacity .7s ease;
  background:radial-gradient(460px circle at var(--mx,70%) var(--my,30%),rgba(253,219,153,.5),transparent 62%)}
.hero:hover .m-spot{opacity:1}

/* 初期状態は隠し、m-go（オープニング明け）で順に登場。5秒後には必ず表示する保険つき */
.m-full .hero .eyebrow,.m-full .hero p.sub,.m-full .hero .hero-cta,.m-full .hero .hero-micro{opacity:0;animation:mFail 0s linear 5s forwards}
.m-full:not(.m-split) .hero h1{opacity:0;animation:mFail 0s linear 5s forwards}
.m-full.m-go .hero .eyebrow{animation:mUp .9s cubic-bezier(.2,.7,.2,1) .05s both}
.m-full.m-go .hero p.sub{animation:mUp 1s cubic-bezier(.2,.7,.2,1) 1.05s both}
.m-full.m-go .hero .hero-cta{animation:mUp 1s cubic-bezier(.2,.7,.2,1) 1.3s both}
.m-full.m-go .hero .hero-micro{animation:mUp 1s cubic-bezier(.2,.7,.2,1) 1.55s both}
.m-full.m-go.m-split .hero h1.m-h1fade{animation:mUp 1s cubic-bezier(.2,.7,.2,1) .2s both}
.m-full .hero h1.m-h1fade{opacity:0;animation:mFail 0s linear 5s forwards}
/* 見出しは1文字ずつ、ぼかしから立ち上がる */
.m-ch{display:inline-block;white-space:pre;opacity:0;transform:translateY(.55em) rotate(5deg);filter:blur(10px)}
.m-full.m-go .m-ch{animation:mChar 1s cubic-bezier(.2,.8,.2,1) both;animation-delay:calc(.2s + var(--i)*34ms)}
@keyframes mChar{to{opacity:1;transform:none;filter:blur(0)}}
.m-full .hero h1 .em{background-size:0% 100%;background-image:linear-gradient(transparent 68%,rgba(253,219,153,.95) 68%);background-repeat:no-repeat}
.m-full.m-go .hero h1 .em{animation:mUnderline 1.1s ease 1.3s forwards}
@keyframes mUnderline{to{background-size:100% 100%}}
/* イラスト：描かれるように現れ、視差で動く */
.hero-art{translate:0 var(--py,0px)}
.m-full .hero-scribble{clip-path:inset(0 100% 0 0);opacity:.2;animation:mFailClip 0s linear 5s forwards}
@keyframes mFailClip{to{clip-path:inset(0);opacity:1}}
.m-full.m-go .hero-scribble{animation:mWipe 1.8s cubic-bezier(.6,.1,.2,1) .9s both}
@keyframes mWipe{from{clip-path:inset(0 100% 0 0);opacity:.2}to{clip-path:inset(0 0 0 0);opacity:1}}
.m-full.m-go .hero-art{animation:mFloat 7s ease-in-out 3s infinite alternate}
@keyframes mFloat{to{transform:translateY(-12px)}}

/* ═════════ 3. ボタン ═════════ */
.m-js .btn-primary{position:relative;overflow:hidden}
.m-js .btn-primary::after{content:"";position:absolute;top:0;left:-60%;width:40%;height:100%;pointer-events:none;
  background:linear-gradient(100deg,transparent,rgba(255,255,255,.55),transparent);transform:skewX(-20deg);animation:mShine 4.8s ease-in-out 2.5s infinite}
@keyframes mShine{0%,60%{left:-60%}100%{left:130%}}
.btn .arw{display:inline-block;transition:transform .25s}
.btn:hover .arw{transform:translateX(5px)}

/* ═════════ 4. セクション演出 ═════════ */
/* 見出し：左から右へワイプして現れる（maskを使用：IntersectionObserverの判定に影響しない）*/
.m-js h2.head.reveal{-webkit-mask:linear-gradient(#000,#000) no-repeat left center/0% 100%;mask:linear-gradient(#000,#000) no-repeat left center/0% 100%;
  transition:opacity .6s ease,transform .9s cubic-bezier(.2,.7,.2,1),-webkit-mask-size 1.3s cubic-bezier(.7,0,.2,1) .1s,mask-size 1.3s cubic-bezier(.7,0,.2,1) .1s}
.m-js h2.head.reveal.in{-webkit-mask-size:104% 100%;mask-size:104% 100%}
.m-js .lead.reveal{transition-delay:.18s}
/* eyebrow の線が伸びる */
.m-js .eyebrow.reveal::before{transform:scaleX(0);transform-origin:left;transition:transform .8s ease .3s}
.m-js .eyebrow.reveal.in::before{transform:scaleX(1)}
/* 並んだカードは時間差で */
.m-stagger{opacity:0;transform:translateY(28px) scale(.98);transition:opacity .8s ease,transform .8s cubic-bezier(.2,.7,.2,1);transition-delay:calc(var(--i,0)*120ms)}
.m-stagger.in{opacity:1;transform:none}
.sb,.resp-item,.seminar-feature{transition:transform .35s ease,box-shadow .35s ease}
.seminar-feature:hover,.resp-item:hover{box-shadow:0 18px 40px -16px rgba(58,50,48,.3)}
/* 暗いセクションに、ゆっくり漂う光 */
.section--dark{position:relative;overflow:hidden;isolation:isolate}
.m-js .section--dark::before,.m-js .section--dark::after{content:"";position:absolute;z-index:-1;border-radius:50%;pointer-events:none;filter:blur(36px)}
.m-js .section--dark::before{width:560px;height:560px;right:-160px;top:-180px;background:radial-gradient(circle,rgba(248,160,0,.2),transparent 68%);animation:mOrbB 24s ease-in-out infinite alternate}
.m-js .section--dark::after{width:480px;height:480px;left:-140px;bottom:-200px;background:radial-gradient(circle,rgba(253,219,153,.12),transparent 68%);animation:mOrbA 28s ease-in-out infinite alternate}
/* チラシ・書影：マウスに合わせてわずかに傾く */
.m-tilt{transition:transform .3s ease;transform:perspective(900px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg))}

/* ═════════ 5. チャプターレール（右端の目印）／進捗バー ═════════ */
.m-rail{position:fixed;right:20px;top:50%;transform:translateY(-50%);z-index:90;display:none;flex-direction:column;gap:15px}
@media(min-width:1180px){.m-rail{display:flex}}
.m-rail a{position:relative;display:block;width:10px;height:10px;border-radius:50%;border:1.6px solid var(--accent);background:rgba(255,255,255,.55);transition:transform .3s,background .3s}
.m-rail a.on{background:var(--accent);transform:scale(1.35)}
.m-rail a span{position:absolute;right:22px;top:50%;transform:translateY(-50%) translateX(6px);white-space:nowrap;font-size:.72rem;font-weight:700;color:var(--ink);
  background:rgba(255,255,255,.95);padding:3px 10px;border-radius:999px;box-shadow:0 4px 14px -6px rgba(0,0,0,.3);opacity:0;pointer-events:none;transition:opacity .25s,transform .25s}
.m-rail a:hover span,.m-rail a:focus-visible span{opacity:1;transform:translateY(-50%)}
.m-progress{position:fixed;left:0;top:0;height:3px;width:100%;transform:scaleX(0);transform-origin:left;
  background:linear-gradient(90deg,var(--primary),var(--accent));z-index:9999;pointer-events:none}

@media (max-width:640px){
  .m-js .section--dark::before,.m-js .section--dark::after{display:none}
  .m-skip{bottom:16px;right:16px}
}
@media print{.m-intro,.m-rail,.m-progress,.hero-net,.m-spot{display:none!important}}

/* ═════════ 静かめ版（既定 .m-quiet）：オープニング・1文字分解なし。上品に短くフェードアップ ═════════ */
@keyframes mQ{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
.m-quiet .hero .eyebrow{animation:mQ .8s cubic-bezier(.2,.7,.2,1) .05s both}
.m-quiet .hero h1{animation:mQ .9s cubic-bezier(.2,.7,.2,1) .15s both}
.m-quiet .hero p.sub{animation:mQ .9s cubic-bezier(.2,.7,.2,1) .35s both}
.m-quiet .hero .hero-cta{animation:mQ .9s cubic-bezier(.2,.7,.2,1) .5s both}
.m-quiet .hero .hero-micro{animation:mQ .9s cubic-bezier(.2,.7,.2,1) .65s both}
.m-quiet .hero h1 .em{background-size:0% 100%;background-image:linear-gradient(transparent 68%,rgba(253,219,153,.95) 68%);background-repeat:no-repeat;animation:mUnderline 1s ease .9s forwards}
@keyframes mQScribble{from{opacity:0}to{opacity:1}}
.m-quiet .hero-scribble{animation:mQScribble 1.2s ease .5s both}
.m-quiet .hero::before,.m-quiet .hero::after{opacity:.45}
.m-quiet .m-stagger{transition-duration:.6s;transition-delay:calc(var(--i,0)*70ms)}
