/* ===== 2026-11-12：トップの、スクロールに合わせて動くところ（ファーストビューの「Dの中へ」は css/fv.css の .fvx） =====
   ① MVVの説明文：スクロールに合わせて、文字が1字ずつ濃くなる（js/scrollfx.js が --p を入れる）
   ② ABOUTとSERVICEのあいだ：流れる文字の帯。スクロールすると速くなり、上へもどすと逆に流れる（js/scrollfx.js）
   ③ SERVICEのカードの写真：枠の中で、写真が少しずれて動く（奥行き）
   ④ CONTACTの本棚の写真：まるい窓から、画面いっぱいに開いていく
   ③④はCSSだけで動かす（animation-timeline）。使えないブラウザでは、ふつうに止まった形で見える
   「動きを減らす」設定の人には、どれも動かさない */

/* ① 1字ずつ濃くなる */
.ink-ch { opacity: clamp(.16, calc((var(--p, 1) * (var(--n) + 10) - var(--i)) / 10), 1); }

/* ② 流れる文字の帯 */
.sfx-marquee {
  width: 100vw; margin: 40px 0 0 calc(50% - 50vw); padding: 18px 0;
  overflow: hidden; border-top: 1px solid #e8efed; border-bottom: 1px solid #e8efed;
  pointer-events: none; user-select: none; -webkit-user-select: none;
}
.sfx-marquee__track { display: flex; align-items: center; width: max-content; will-change: transform; }
.sfx-marquee__item {
  flex: none; padding: 0 .45em;
  font-family: Helvetica, Arial, sans-serif; font-weight: bold; font-size: clamp(44px, 7.4vw, 112px); line-height: 1.1; letter-spacing: .01em; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1.5px #41b79c;
}
.sfx-marquee__item i { font-style: normal; color: #41b79c; -webkit-text-stroke: 0; }
.sfx-marquee__dot { flex: none; width: .32em; height: .32em; margin: 0 .3em; border-radius: 50%; background: #e3e3e3; font-size: clamp(44px, 7.4vw, 112px); }
@media screen and (max-width: 575px) {
  .sfx-marquee { margin-top: 24px; padding: 12px 0; }
  .sfx-marquee__item { -webkit-text-stroke-width: 1px; }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    /* ③ カードの写真が、枠の中で少しずれて動く（ホバーで大きくなる動きは、そのまま） */
    .svc-card__media img {
      scale: 1.14;
      animation: sfx-parallax linear both;
      animation-timeline: view();
    }
    @keyframes sfx-parallax { from { translate: 0 -6%; } to { translate: 0 6%; } }

    /* ④ 本棚の写真が、まるい窓から開いていく */
    .CONTACT_bees {
      animation: sfx-open linear both;
      animation-timeline: view();
      animation-range: entry 10% cover 45%;
    }
    @keyframes sfx-open {
      from { clip-path: inset(16% 26% round 999px); }
      to { clip-path: inset(0% 0% round 0px); }
    }
  }
}
