/* ==========================================================================
   キービジュアル：白と黒の Cear pavé を左右対称に。背景は製品レンダーと同じスタジオの色（色のにじみは置かない）。
   調整の目安：--hero-unit-width（製品の大きさ）／--hero-unit-offset（中心からの距離）／--hero-float-rise（浮き沈みの幅）
   ========================================================================== */
.hero {
  --hero-unit-width: min(40vw, 72vh, 620px);
  --hero-unit-offset: min(20vw, 36vh, 310px);
  --hero-float-rise: 2.2%;
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 580px; height: calc(100svh - var(--nav-height)); max-height: 1080px;
  background: var(--studio); text-align: center;
}
.hero-stage { position: relative; z-index: 1; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; }
.hero-copy { position: relative; z-index: 2; width: 100%; padding: clamp(36px, 7vh, 80px) 24px 0; }
.hero-eyebrow { font-size: 19px; font-weight: 550; letter-spacing: -.02em; margin-bottom: 18px; color: var(--ink-soft); }
.hero h1 { font-size: clamp(46px, 5vw, 72px); line-height: 1.16; letter-spacing: var(--display-tracking); font-weight: var(--display-weight); color: var(--ink); }
.hero-subtitle { font-size: 18px; font-weight: 500; margin-top: 22px; letter-spacing: .02em; color: var(--ink-soft); }

/* 左右の製品：同じ枠で切り出した画像（床の影の高さが揃う）を、中心から同じ距離に置く */
.hero-units { position: relative; flex: 1; width: 100%; min-height: calc(var(--hero-unit-width) * .62); }
.hero-unit {
  position: absolute; top: 50%; left: calc(50% + var(--side) * var(--hero-unit-offset)); margin: 0;
  width: var(--hero-unit-width); transform: translate(-50%, -54%);
  /* 画像の四隅だけを背景へ溶かす。製品は浮き上がったときも完全に不透明のまま */
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 48%, #000 72%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 48%, #000 72%, transparent 100%);
}
.hero-unit--white { --side: -1; --in-delay: .25s; --float: 7.6s; }
.hero-unit--black { --side: 1; --in-delay: .42s; --float: 9.2s; }
/* 2層：床（スタジオと影。製品は消してある）と、本体（輪郭をぼかした透過画像）。静止時は元のレンダーと同じ見え方 */
.hero-unit img { display: block; width: 100%; height: auto; }
.hero-unit-body { position: absolute; inset: 0; height: 100%; }
.hero-note { position: absolute; z-index: 2; left: 0; right: 0; bottom: 26px; font-size: 12px; letter-spacing: .18em; color: var(--faint); }


@media (max-width: 700px) {
  .hero { --hero-unit-width: 80vw; --hero-unit-offset: 23vw; height: auto; min-height: 0; max-height: none; padding-bottom: 76px; }
  .hero-units { flex: none; height: 64vw; min-height: 0; margin-top: 8px; }
  .hero-copy { padding-top: 52px; }
  .hero-eyebrow { font-size: 17px; margin-bottom: 16px; }
  .hero h1 { font-size: clamp(38px, 9vw, 58px); line-height: 1.24; }
  .hero-subtitle { font-size: 15px; margin-top: 18px; }
  .hero-note { bottom: 22px; font-size: 11px; }
}

/* ---------- 動き ---------- */
html[data-motion="on"] .hero-copy { opacity: calc(1 - var(--hp, 0) * 1.9); translate: 0 calc(var(--hp, 0) * -60px); }
html[data-motion="on"] .hero-eyebrow { animation: fade-up 1s var(--ease) .05s both; }
html[data-motion="on"] .hero h1 .line { display: block; overflow: hidden; padding: 0 .06em .1em; margin: 0 -.06em -.1em; }
html[data-motion="on"] .hero h1 .line-inner { display: inline-block; animation: line-up 1.35s var(--ease) both; animation-delay: calc(.16s + var(--l) * .12s); }
html[data-motion="on"] .hero-subtitle { animation: fade-up 1.2s var(--ease) .5s both; }
/* 現れたあとは、本体だけがゆっくり浮き沈みし、床の影は浮いたぶんだけ淡くなる（白と黒で周期をずらす） */
html[data-motion="on"] .hero-unit-floor { animation: hero-unit-in 1.9s var(--ease) var(--in-delay) both, hero-floor var(--float) var(--ease-float) calc(var(--in-delay) + 1.9s) infinite; }
html[data-motion="on"] .hero-unit-body { animation: hero-unit-in 1.9s var(--ease) var(--in-delay) both, hero-float var(--float) var(--ease-float) calc(var(--in-delay) + 1.9s) infinite; }
/* スクロールで、左右へわずかに開いて奥へ。ポインターで、ごくわずかに揺れる。 */
html[data-motion="on"] .hero-unit {
  translate: calc(var(--side) * var(--hp, 0) * 5vw + var(--hx, 0) * var(--depth) * 1px) calc(var(--hp, 0) * -7vh + var(--hy, 0) * var(--depth) * .6px);
  scale: calc(1 - var(--hp, 0) * .08);
}
.hero-unit--white { --depth: 12; }
.hero-unit--black { --depth: 16; }
@keyframes hero-unit-in { from { opacity: 0; transform: translate3d(0, 5%, 0) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes hero-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 calc(var(--hero-float-rise) * -1); } }
@keyframes hero-floor { 0%, 100% { opacity: 1; } 50% { opacity: .8; } }
