/* =========================================================
   SEDICAL motion — 2026-11-16
   方針：クワイエットラグジュアリー。動きは小さく、ゆっくり静かに止まる。
   ========================================================= */
:root{
  --ease-quiet:cubic-bezier(.16,1,.3,1);   /* 出だしは自然に、最後は静かに止まる */
  --ease-soft:cubic-bezier(.4,0,.2,1);
}

/* ---- スクロールで現れる要素 ---- */
/* JSが動かない環境では最初から表示 */
.fade,.fade.up,.fade.left{opacity:1;transform:none;transition:none;}
html.js-motion .fade{
  opacity:0;
  transform:translate3d(0,13px,0);
  transition:opacity .9s var(--ease-soft),transform 1.2s var(--ease-quiet);
  transition-delay:var(--fade-delay,0s);
}
html.js-motion .fade.active{opacity:1;transform:none;}

/* ---- トップのロゴ（マーク → ロゴタイプ）約2秒で静かに切り替え ---- */
.mv-ttl .off.hidden{animation:sedicalLogoOut .9s var(--ease-soft) .5s both;}
.mv-ttl .on.show.delay-25{animation:sedicalLogoIn 1.2s var(--ease-soft) .9s both;}
@keyframes sedicalLogoOut{from{opacity:1}to{opacity:0}}
@keyframes sedicalLogoIn{from{opacity:0}to{opacity:1}}
/* 同じ訪問中の2回目以降は演出なし */
html.intro-seen .mv-ttl .off.hidden{animation:none;opacity:0;}
html.intro-seen .mv-ttl .on.show.delay-25{animation:none;opacity:1;}

/* ---- ロゴ下の一文と相談リンクは最初から表示（演出はロゴの切り替えだけ） ---- */

/* ---- ホバー：薄くなり方を統一 ---- */
a{transition:opacity .4s var(--ease-soft);}
a:hover,.sedical-oem-link:hover,.sedical-news-more:hover{opacity:.7;}

/* ---- メニュー：ずれる距離を小さく、フェード中心に ---- */
.header-nav{top:59px;visibility:hidden;transition:opacity .45s var(--ease-soft),top .6s var(--ease-quiet),visibility 0s linear .6s;}
.header-nav.on{visibility:visible;transition-delay:0s;}  /* 閉じている間はTabで隠れたリンクに入らない */
@media screen and (min-width:768px){.header-nav{top:66px;}}

/* ---- 端末で「視差効果を減らす」がオンの人には動きを出さない ---- */
@media (prefers-reduced-motion:reduce){
  html.js-motion .fade{transform:none;transition:opacity .4s linear;transition-delay:0s;}
  .mv-ttl .off.hidden,.mv-ttl .on.show.delay-25{animation-duration:.01s;animation-delay:0s;}
  .header-nav{transition:opacity .2s linear;}
  a{transition:none;}
}
