/* トップのヒーロー（パターン1：水面の線＋スクロールで沈む・深度計） */
/* z-index：本文の部品（static-page）の中の要素は z-index 1〜21 を使うので、それより上に重ねる */
.hero-dive { position: relative; z-index: 25; height: 230vh; background: #141416; --ui: 0px; }
/* 画面いっぱいに貼り付く。スマホのアドレスバーが縮んでも隙間が出ないよう大きい方の高さ（lvh）にし、
   文字などはアドレスバーの分（lvh と svh の差）だけ上げる */
.hd-stage { position: sticky; top: 0; height: 100vh; overflow: hidden; background: #0b1a28; }
@supports (height: 100lvh) {
  .hero-dive { height: 230lvh; --ui: calc(100lvh - 100svh); }
  .hd-stage { height: 100lvh; }
}
/* 縦長の画面（スマホ縦）：貼り付けず、スクロールで流れていきながら沈む */
@media (max-aspect-ratio: 4/5) {
  .hero-dive, .hero-dive { height: auto; --ui: 0px; }
  .hd-stage { position: relative; height: 112vw; max-height: 86svh; }
}

.hd-video, .hd-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hd-video { object-fit: cover; transform-origin: 50% 45%; }
.hd-canvas { opacity: 0; transition: opacity .4s ease; }
.hero-dive.gl .hd-canvas { opacity: 1; }

/* 見出し：水面の線が通り過ぎた所は、少し沈んで淡い水色 */
.hd-copy { position: absolute; left: 6vw; bottom: calc(12svh + var(--ui)); pointer-events: none; --L: -20%; will-change: transform, opacity;
  clip-path: inset(-10% 100% -10% 0); animation: hdIn 2s cubic-bezier(.35,.72,.3,1) .4s forwards; }
@keyframes hdIn { to { clip-path: inset(-10% -25% -10% 0); } }
.hd-layer { margin: 0; color: #fff; text-shadow: 0 2px 22px rgba(0, 25, 50, .30);
  font-family: "Assistant", Helvetica, Arial, sans-serif; font-weight: 700; font-style: italic;
  font-size: clamp(40px, 7vw, 104px); line-height: 1.08; letter-spacing: .01em; }
.hd-top { clip-path: inset(var(--L) -5% -10% -5%); }
.hd-bot { position: absolute; inset: 0; clip-path: inset(-10% -5% calc(100% - var(--L)) -5%); }
.hd-bot .hd-layer { color: #cdebf6; transform: translateY(.09em); text-shadow: 0 2px 26px rgba(0, 40, 70, .35); }
.hd-wl { position: absolute; left: -3%; width: 106%; top: var(--L); height: 1px; opacity: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.95) 12%, rgba(255,255,255,.95) 88%, rgba(255,255,255,0));
  box-shadow: 0 0 10px rgba(200, 240, 255, .55); }

/* 深度計：0（水面）〜 decision layer（最深部） */
.hd-gauge { position: absolute; right: 4vw; top: 22svh; bottom: calc(22svh + var(--ui)); width: 40px; pointer-events: none;
  font: 600 12px/1 "Assistant", Helvetica, Arial, sans-serif; letter-spacing: .14em; color: rgba(255,255,255,.88);
  text-shadow: 0 1px 8px rgba(0, 25, 50, .35); }
.hd-gauge i { position: absolute; right: 0; display: block; }
.hd-rail { top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,.28); }
.hd-fill { top: 0; width: 1px; height: 0; background: rgba(255,255,255,.9); }
.hd-tick { width: 5px; height: 1px; background: rgba(255,255,255,.5); }
.hd-tick.t0 { top: 0; } .hd-tick.t1 { top: 100%; }
.hd-mark { right: -3px !important; width: 7px; height: 1px; background: #fff; top: 0; }
.hd-end { position: absolute; right: 14px; transform: translateY(-50%); white-space: nowrap; transition: opacity .4s ease; }
.hd-end.top { top: 0; }
.hd-end.bot { top: 100%; opacity: .6; }
.hd-end.bot.on { opacity: 1; }

.hd-hint { position: absolute; left: 50%; bottom: calc(3.5svh + var(--ui)); transform: translateX(-50%); color: rgba(255,255,255,.85);
  font: 600 11px/1 "Assistant", Helvetica, Arial, sans-serif; letter-spacing: .2em; pointer-events: none; }

@media (max-width: 1023px) {
  .hd-copy { left: 20px; }
  .hd-gauge { right: 16px; font-size: 10px; }
}
@media (max-aspect-ratio: 4/5) {
  .hd-copy { bottom: 14%; }
  .hd-gauge { top: 16%; bottom: 18%; }
  .hd-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hd-copy { animation: none; clip-path: none; }
}
