/* 首頁英雄區「思想之海」旅程（js/journey.js） */
.hero.journey { display: block; min-height: 0; height: 860vh; padding: 0; position: relative; }
.journey__stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; isolation: isolate; }
.journey__stage::before { content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(60% 55% at 50% 52%, rgba(255,45,31,.07), transparent 70%), radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(0,0,0,.55)); }
.journey__gl { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
#field { transition: opacity .9s var(--ease); }
html.journey-deep #field { opacity: 0; }

.hero__inner { position: absolute; inset: 0; z-index: 6; display: grid; grid-template-rows: auto 1fr auto; padding: calc(var(--bar-h) + 4vh) var(--gutter) 12vh; transform-origin: 50% 45%; will-change: transform, opacity; }

/* 人物：由 JS 依 3D 投影設定位置與縮放 */
.journey__figs { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.jfig { position: absolute; left: 0; top: 0; width: 733px; height: 1100px; max-width: none; transform-origin: 0 0; opacity: 0; will-change: transform, opacity;
  filter: drop-shadow(0 40px 60px rgba(0,0,0,.65)); backface-visibility: hidden; }

/* 問題碎片 */
.journey__shards { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.jshard { position: absolute; left: 0; top: 0; white-space: nowrap; font-family: var(--serif); font-weight: 700; font-size: clamp(14px, 1.25vw, 20px); color: rgba(243,238,230,.86);
  opacity: 0; will-change: transform, opacity; text-shadow: 0 0 22px rgba(255,140,90,.25); }
.jshard.is-red { color: var(--red); text-shadow: 0 0 24px rgba(255,45,31,.45); }

/* 問題卡 */
.jcard { position: absolute; z-index: 7; top: 50%; margin-top: -9em; width: min(40vw, 560px); visibility: hidden; opacity: 0; will-change: transform, opacity; pointer-events: none; }
.jcard.is-live { pointer-events: auto; }
.jcard[data-side="1"] { right: 7vw; }
.jcard[data-side="-1"] { left: 7vw; }
.jcard[data-side="0"] { left: 50%; width: min(86vw, 900px); margin-left: calc(min(86vw, 900px) / -2); margin-top: 0; top: auto; bottom: 13vh; text-align: center; }
.jcard__eye { color: var(--red); margin: 0 0 18px; }
.jcard h2 { font-family: var(--serif); font-weight: 900; font-size: clamp(38px, 4.4vw, 76px); line-height: 1.12; margin: 0 0 22px; text-shadow: 0 6px 40px rgba(0,0,0,.8); }
.jcard[data-side="0"] h2 { font-size: clamp(40px, 5.6vw, 96px); }
.jl { display: block; overflow: hidden; padding-bottom: .06em; }
.jch { display: inline-block; will-change: transform; transform: translate3d(0,105%,0); }
.jcard p:not(.jcard__eye) { margin: 0 0 22px; color: var(--bone-dim); font-size: clamp(15px, 1.2vw, 18px); text-shadow: 0 2px 20px #000; }
.jcard .text-link { font-weight: 700; }
.jcard__cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.jcap { position: absolute; left: 50%; bottom: 17vh; transform: translateX(-50%); z-index: 7; margin: 0; color: var(--bone-dim); letter-spacing: .3em; font-size: 11px; opacity: 0; visibility: hidden; }

/* HUD */
.jhud { position: absolute; z-index: 8; left: var(--gutter); right: var(--gutter); bottom: 4vh; display: flex; align-items: center; gap: 22px; pointer-events: none; opacity: 0; transition: opacity .6s; }
html.journey-deep .jhud { opacity: 1; }
.jhud__name { min-width: 150px; color: var(--bone); font-size: 11px; letter-spacing: .18em; }
.jhud__bar { flex: 1; height: 1px; background: var(--bone-faint); overflow: hidden; }
.jhud__bar i { display: block; height: 100%; background: var(--red); transform-origin: 0 50%; transform: scaleX(0); box-shadow: 0 0 12px var(--red); }
.jhud__next { pointer-events: auto; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--bone-faint); background: rgba(6,6,7,.55); font-size: 11px; letter-spacing: .12em; transition: border-color .3s, background .3s; }
.jhud__next:hover { border-color: var(--red); background: rgba(255,45,31,.15); }
.journey.is-end .jhud__next { visibility: hidden; }
.jhud__dots { position: absolute; z-index: 8; right: 22px; top: 50%; transform: translateY(-50%); display: grid; gap: 6px; opacity: 0; transition: opacity .6s; }
html.journey-deep .jhud__dots { opacity: 1; }
.jhud__dots button { font-family: var(--mono); font-size: 10px; color: var(--bone-dim); padding: 6px 8px; position: relative; transition: color .3s; }
.jhud__dots button[aria-current="true"] { color: var(--bone); }
.jhud__dots button[aria-current="true"]::after { content: ""; position: absolute; right: -2px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); }

@media (max-width: 760px) {
  .hero.journey { height: 700vh; }
  .jcard, .jcard[data-side="1"], .jcard[data-side="-1"] { left: 20px; right: 20px; width: auto; top: auto; bottom: 11vh; margin: 0; text-align: left; }
  .jcard[data-side="0"] { left: 20px; right: 20px; width: auto; margin: 0; text-align: center; }
  .jcard h2 { font-size: clamp(30px, 8.6vw, 40px); margin-bottom: 12px; }
  .jcard[data-side="0"] h2 { font-size: clamp(34px, 10vw, 46px); }
  .jcard p:not(.jcard__eye) { font-size: 14px; margin-bottom: 12px; }
  .jcard__eye { margin-bottom: 10px; font-size: 10px; }
  .jshard { font-size: 13px; }
  .jhud { bottom: 2.4vh; gap: 12px; }
  .jhud__name { min-width: 92px; font-size: 10px; letter-spacing: .08em; }
  .jhud__next { padding: 8px 12px; font-size: 10px; }
  .jhud__dots { display: none; }
  .jcap { bottom: 30vh; }
}

/* 不支援 WebGL 或減少動態：改成一般直排內容 */
.journey--static.hero.journey { height: auto; }
.journey--static .journey__stage { position: relative; height: auto; overflow: visible; display: grid; gap: 12vh; padding-bottom: 14vh; }
.journey--static .hero__inner { position: relative; min-height: 100vh; }
.journey--static .journey__gl, .journey--static .journey__shards, .journey--static .jhud, .journey--static .jhud__dots, .journey--static .journey__figs { display: none; }
.journey--static .jcard { position: relative; inset: auto; margin: 0 var(--gutter); width: auto; visibility: visible; opacity: 1; pointer-events: auto; text-align: left; }
.journey--static .jch { transform: none; }
.journey--static .hero__inner { order: -1; }
.journey--static .jcard__cta { justify-content: flex-start; }
