/* =========================================================
   SKOFFICE — motion.css（2026-11-29）
   「LPで使える動き」16種類の見た目。style.css（と web.css）の後に読む。
   色は style.css の変数（白黒＋青）だけを使う。
   ========================================================= */

/* ---------- 10 スティッキーヘッダー：メニューを上に移し、スクロールで縮めて固定 ---------- */
:root { --nav-h: 76px; }
body { padding-bottom: 0; }
.gnav {
  top: 0; bottom: auto; left: 0; right: 0; height: var(--nav-h);
  background: transparent; border-radius: 0;
  transition: top .5s var(--ease), left .5s var(--ease), right .5s var(--ease), height .5s var(--ease),
              border-radius .5s var(--ease), background-color .5s var(--ease), box-shadow .5s var(--ease), padding .5s var(--ease);
}
.gnav::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg, rgba(10,10,12,.55), rgba(10,10,12,0)); opacity: 1; transition: opacity .4s; pointer-events: none; z-index: -1; }
.gnav__logo img { transition: height .5s var(--ease); }
.gnav.is-scrolled {
  top: 12px; left: max(12px, calc(50% - 600px)); right: max(12px, calc(50% - 600px));
  height: 58px; border-radius: 999px; padding: 0 10px 0 22px;
  background-color: rgba(17, 17, 19, .86);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(247, 245, 241, .08);
}
.gnav.is-scrolled::before { opacity: 0; }
.gnav.is-scrolled .gnav__logo img { height: 24px; }
.gnav.is-scrolled .gnav__cta { padding: 9px 16px; }
.drawer { inset: 0; padding: calc(var(--nav-h) + 36px) 28px 44px; justify-content: flex-end; clip-path: inset(0 0 100% 0); }
.is-menu-open .gnav.is-scrolled { background-color: var(--ink); }
.hero { height: 100svh; }
.is-shot .gnav { position: absolute; }
@media (max-width: 860px) {
  :root { --nav-h: 64px; }
  .gnav.is-scrolled { top: 8px; left: 8px; right: 8px; height: 52px; padding: 0 16px 0 18px; }
  .gnav.is-scrolled .gnav__logo img { height: 22px; }
}

/* ---------- 11 読了バー ---------- */
.readbar { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 60; pointer-events: none; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--blue), var(--powder) 45%, var(--cobalt)); box-shadow: 0 0 12px rgba(47, 91, 255, .45); }

/* ---------- 15 ページ遷移：色の帯 ---------- */
.pt { position: fixed; inset: 0; z-index: 150; pointer-events: none; }
.pt i { position: absolute; inset: 0; transform: translate3d(0, 101%, 0); }
.pt i:nth-child(1) { background: var(--blue); }
.pt i:nth-child(2) { background: var(--cobalt); }
.pt i:nth-child(3) { background: var(--ink); display: grid; place-items: center; }
.pt i:nth-child(3) img { width: 44px; height: 44px; opacity: 0; transform: scale(.8); transition: opacity .3s, transform .5s var(--ease); }
.pt-out .pt { pointer-events: auto; }
.pt-out .pt i { transform: none; transition: transform .56s cubic-bezier(.7, 0, .25, 1); }
.pt-out .pt i:nth-child(2) { transition-delay: .06s; }
.pt-out .pt i:nth-child(3) { transition-delay: .12s; }
.pt-out .pt i:nth-child(3) img { opacity: 1; transform: none; transition-delay: .4s; }
.pt-in .pt i { transform: none; transition: none; }
.pt-in .pt i:nth-child(3) img { opacity: 1; transform: none; transition: none; }
.pt-in.pt-in-go .pt i { transform: translate3d(0, -101%, 0); transition: transform .72s cubic-bezier(.7, 0, .25, 1); }
.pt-in.pt-in-go .pt i:nth-child(3) { transition-delay: 0s; }
.pt-in.pt-in-go .pt i:nth-child(2) { transition-delay: .07s; }
.pt-in.pt-in-go .pt i:nth-child(1) { transition-delay: .14s; }
.pt-in.pt-in-go .pt i:nth-child(3) img { opacity: 0; transition: opacity .2s; }
.pt-in .loader { display: none; }

/* ---------- 06 スプリットテキスト ---------- */
[data-split] .ch { display: inline-block; white-space: pre; opacity: 0; translate: 0 .55em; rotate: 6deg; filter: blur(4px); }
[data-split].is-in .ch { animation: chIn .9s var(--ease) both; animation-delay: calc(var(--i) * var(--step, 42ms) + var(--d, 0s)); }
@keyframes chIn { from { opacity: 0; translate: 0 .55em; rotate: 6deg; filter: blur(4px); } to { opacity: 1; translate: 0 0; rotate: 0deg; filter: blur(0); } }

/* スクロールに合わせて言葉が順に濃くなる一文（06 の応用） */
[data-hilite] .ch { display: inline; opacity: clamp(.16, calc(var(--hl, 9999) - var(--i)), 1); transition: opacity .25s linear; }

/* ---------- 02 スタッガー ---------- */
[data-stagger]:not(.is-in) > * { opacity: 0; }
[data-stagger].is-in > * { animation: stagIn .95s var(--ease) both; animation-delay: calc(var(--i, 0) * var(--step, 90ms) + var(--d, 0s)); }
@keyframes stagIn { from { opacity: 0; translate: 0 38px; scale: .97; } to { opacity: 1; translate: 0 0; scale: 1; } }

/* ---------- 04 カウントアップ ---------- */
[data-count] { font-variant-numeric: tabular-nums; }

/* ---------- 05 マーキー ---------- */
.mq { overflow: hidden; position: relative; }
.mq__track { display: flex; width: max-content; animation: mq var(--mq-dur, 42s) linear infinite; }
.mq--rev .mq__track { animation-direction: reverse; }
.mq__track > * { flex: none; }
@media (hover: hover) { .mq:hover .mq__track { animation-play-state: paused; } }
@keyframes mq { to { transform: translate3d(-50%, 0, 0); } }

/* ---------- 07 タイプライター ---------- */
[data-type] { white-space: nowrap; }
.type__caret { display: inline-block; width: .08em; min-width: 2px; height: 1.02em; margin-left: .08em; vertical-align: -.14em; background: currentColor; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

/* ---------- 08 ホバーで浮く ---------- */
.lift { transition: transform .55s var(--ease), box-shadow .55s var(--ease); }
@media (hover: hover) {
  .lift:hover { transform: translateY(-8px); box-shadow: 0 30px 56px -26px rgba(17, 17, 19, .5); }
}

/* ---------- 09 シャイン ---------- */
.shine { position: relative; overflow: hidden; isolation: isolate; }
.shine::after { content: ""; position: absolute; top: -20%; bottom: -20%; left: -70%; width: 45%; z-index: 1; pointer-events: none; background: linear-gradient(100deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.85) 50%, rgba(255,255,255,0) 100%); transform: skewX(-22deg); animation: shineRun 3.6s cubic-bezier(.4, 0, .2, 1) infinite; animation-delay: var(--shine-d, 1s); }
@keyframes shineRun { 0% { left: -70%; } 38%, 100% { left: 135%; } }

/* ---------- 12 ケンバーンズ ---------- */
.kb { overflow: hidden; }
.kb img { transform-origin: var(--kb-o, 30% 30%); animation: kb var(--kb-dur, 18s) ease-in-out infinite alternate; animation-play-state: paused; will-change: transform; }
.kb.is-in img { animation-play-state: running; }
@keyframes kb { from { transform: scale(1.02) translate3d(0, 0, 0); } to { transform: scale(1.16) translate3d(-2.5%, -2%, 0); } }

/* ---------- 03 パララックス ---------- */
[data-bg-parallax] { will-change: transform; }

/* ---------- 13 アコーディオン ---------- */
details.acc summary .pm { transition: transform .5s var(--ease), background .3s; }
details.acc[open]:not(.is-closing) summary .pm { transform: rotate(180deg); }
details.acc.is-closing summary .pm { transform: rotate(0); background: var(--ink); }
details.acc.is-closing summary .pm::after { transform: rotate(90deg); background: var(--paper); }
details.acc.is-closing summary .pm::before { background: var(--paper); }

/* ---------- 14 スライダー ---------- */
.sl { position: relative; --sl-dur: 7s; }
.sl__view { overflow: hidden; border-radius: var(--radius); touch-action: pan-y; }
.sl__track { display: flex; transition: transform .9s var(--ease); will-change: transform; }
.sl__slide { flex: 0 0 100%; min-width: 0; }
.sl__bar { display: flex; align-items: center; gap: 18px; margin-top: 22px; }
.sl__count { font-family: var(--font-en); font-weight: 700; font-size: 13px; letter-spacing: .12em; min-width: 7ch; }
.sl__dots { display: flex; gap: 8px; flex: 1; }
.sl__dots button { position: relative; flex: 1; max-width: 90px; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; padding: 0; }
.sl__dots button::before { content: ""; position: absolute; inset: -10px 0; }
.sl__dots button::after { content: ""; position: absolute; inset: 0; background: var(--ink); transform-origin: 0 50%; transform: scaleX(0); }
.sl__dots button.is-active::after { transform: scaleX(1); }
.sl.is-tick .sl__dots button.is-active::after { animation: slProg var(--sl-dur) linear; }
.sl.is-paused .sl__dots button.is-active::after { animation-play-state: paused; }
@keyframes slProg { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.sl__nav { display: flex; gap: 8px; }
.sl__nav button { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; transition: background .3s, color .3s; }
.sl__nav button:hover { background: var(--ink); color: var(--paper); }
.sl__nav svg { width: 18px; height: 18px; }

/* ---------- 16 ラインアニメーション ---------- */
[data-draw] .draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
[data-draw].is-in .draw { stroke-dashoffset: 0; transition: stroke-dashoffset var(--draw-dur, 1.6s) var(--ease) var(--d, 0s); }
[data-draw] .draw-head { opacity: 0; }
[data-draw].is-in .draw-head { opacity: 1; transition: opacity .3s calc(var(--d, 0s) + var(--draw-dur, 1.6s) * .8); }
[data-draw="scroll"] .draw { stroke-dashoffset: calc(1 - var(--draw, 0)); transition: none; }
[data-draw="scroll"] .draw-head { opacity: clamp(0, calc((var(--draw, 0) - .94) * 20), 1); transition: none; }

/* ---------- いま見えている章の動き（左下の札） ---------- */
.mnow { position: fixed; left: 16px; bottom: 16px; z-index: 45; display: inline-flex; align-items: center; gap: 10px; max-width: calc(100% - 32px); padding: 8px 14px 8px 10px; border-radius: 999px; background: rgba(17, 17, 19, .86); color: var(--paper); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-size: 12px; font-weight: 700; letter-spacing: .04em; box-shadow: 0 12px 30px -14px rgba(0,0,0,.6); opacity: 0; translate: 0 14px; pointer-events: none; transition: opacity .4s, translate .5s var(--ease); }
.mnow.is-show { opacity: 1; translate: 0 0; pointer-events: auto; }
.mnow > span { font-family: var(--font-en); font-size: 10.5px; letter-spacing: .14em; padding: 3px 8px; border-radius: 999px; background: var(--blue); color: var(--ink); flex: none; }
.mnow b { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mnow.is-swap b { animation: mnowSwap .5s var(--ease); }
@keyframes mnowSwap { from { opacity: 0; translate: 0 6px; } }
@media (max-width: 600px) { .mnow { left: 10px; bottom: 10px; font-size: 11px; max-width: calc(100% - 20px); } }

/* ---------- 動きを減らす設定・撮影用 ---------- */
@media (prefers-reduced-motion: reduce) {
  [data-split] .ch, [data-stagger] > * { opacity: 1 !important; translate: none !important; rotate: none !important; filter: none !important; scale: none !important; }
  [data-draw] .draw { stroke-dashoffset: 0 !important; }
  [data-draw] .draw-head { opacity: 1 !important; }
  .pt { display: none; }
  .readbar { display: none; }
}
.is-shot [data-split] .ch, .is-shot [data-stagger] > * { opacity: 1 !important; translate: none !important; rotate: none !important; filter: none !important; scale: none !important; animation: none !important; }
.is-shot [data-draw] .draw { stroke-dashoffset: 0 !important; }
.is-shot [data-draw] .draw-head { opacity: 1 !important; }
.is-shot .mnow, .is-shot .readbar, .is-shot .pt { display: none; }
