/* 首屏「地平線」：標題居中在上半屏，一顆很大的星球從下方升起，只露上沿。 */
#hero {
  --hero-h: clamp(720px, 100svh, 1040px);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  isolation: isolate;
  height: var(--hero-h);
  overflow: hidden;
  background:
    radial-gradient(70% 55% at 50% 64%, rgba(120, 160, 220, 0.07) 0%, rgba(120, 160, 220, 0) 70%),
    var(--bg);
}
/* 底部和下一塊銜接：星球往下漸隱到頁面底色 */
#hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 22%; z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(14, 16, 18, 0), var(--bg) 92%); }

#hero .hero-globe { position: absolute; inset: 0; z-index: 0; }
#hero .hero-globe canvas { width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s var(--ease); }
#hero .hero-globe.is-ready canvas { opacity: 1; }

/* ---------- 文案 ---------- */
#hero .hero-inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: calc(var(--nav-h) + clamp(40px, 6.5vh, 88px)) var(--pad) 0; pointer-events: none; }
#hero .hero-inner > * { pointer-events: auto; }
#hero .hero-kicker { display: inline-flex; align-items: center; gap: 12px; font-size: 13px; letter-spacing: .32em; color: var(--ink-3); padding-left: .32em; }
#hero .hero-kicker i { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-4); }
#hero .hero-title { margin-top: 22px; font-size: clamp(40px, 5.2vw, 78px); line-height: 1.12; font-weight: 700; letter-spacing: -0.03em; color: var(--ink-1); }
#hero .hero-title .ln { display: block; background: linear-gradient(180deg, #fbfaf6 20%, #b3b9c0 110%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .04em; }
#hero .hero-lede { margin-top: 22px; font-size: clamp(16px, 1.2vw, 18px); line-height: 1.7; color: var(--ink-2); max-width: 36em; }
#hero .hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
#hero .hero-btn { display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 22px; border-radius: 23px; font-size: 15px; font-weight: 600;
  color: var(--ink-1); background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .1); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: background .3s var(--ease), border-color .3s var(--ease); }
#hero .hero-btn:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); }
#hero .hero-btn svg { transition: transform .3s var(--ease); }
#hero .hero-btn:hover svg { transform: translateX(3px); }
#hero .hero-btn--primary { background: var(--ink-1); border-color: var(--ink-1); color: var(--bg); }
#hero .hero-btn--primary:hover { background: #fff; border-color: #fff; }

/* 開場：文案依次浮現 */
@keyframes hero-in { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
#hero .hero-kicker { animation: hero-in .9s var(--ease-expo) .1s both; }
#hero .hero-title .ln:nth-child(1) { animation: hero-in 1s var(--ease-expo) .2s both; }
#hero .hero-title .ln:nth-child(2) { animation: hero-in 1s var(--ease-expo) .32s both; }
#hero .hero-lede { animation: hero-in 1s var(--ease-expo) .5s both; }
#hero .hero-cta { animation: hero-in 1s var(--ease-expo) .62s both; }

/* ---------- 地名：只有字和當地時間，一根細線連到城市點 ---------- */
#hero .globe-tags { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
#hero .globe-tag { position: absolute; left: 0; top: 0; display: inline-flex; align-items: baseline; gap: 8px; padding: 4px 2px; border: 0; background: none;
  font-size: 13px; color: var(--ink-1); white-space: nowrap; pointer-events: auto; cursor: pointer;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .9); transition: opacity .5s var(--ease); opacity: 0; animation: tag-in .8s var(--ease) 2.6s forwards; }
@keyframes tag-in { to { opacity: 1; } }
#hero .globe-tag b { font-weight: 600; letter-spacing: .04em; }
#hero .globe-tag time { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
#hero .globe-tag--r { translate: -100% -50%; }
#hero .globe-tag--l { translate: 0 -50%; }
#hero .globe-tag.is-origin b { color: var(--amber); }
#hero .globe-tag:hover b, #hero .globe-tag:focus-visible b { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
#hero .globe-tag.is-hidden { opacity: 0 !important; pointer-events: none; }
#hero .globe-tag--far { translate: -50% -100%; gap: 6px; color: var(--ink-2); }
#hero .globe-tag--far span { color: var(--amber); }

/* 暫停 */
#hero .hero-pause { position: absolute; right: var(--pad); bottom: 28px; z-index: 3; width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, .1); background: rgba(14, 16, 18, .5); color: var(--ink-3); cursor: pointer; }
#hero .hero-pause svg { width: 12px; height: 12px; fill: currentColor; }
#hero .hero-pause .i-play, #hero .hero-pause[aria-pressed="true"] .i-pause { display: none; }
#hero .hero-pause[aria-pressed="true"] .i-play { display: block; }
#hero .hero-pause:hover { color: var(--ink-1); }

/* 沒有 WebGL：留一條地平線光 */
#hero .hero-globe.is-nogl { background: radial-gradient(120% 60% at 50% 120%, #1a2230 0%, #11161c 45%, transparent 46%); }

@media (max-width: 720px) {
  #hero { --hero-h: clamp(640px, 100svh, 860px); }
  #hero .hero-inner { padding-top: calc(var(--nav-h) + 48px); }
  #hero .hero-kicker { font-size: 12px; letter-spacing: .26em; }
  #hero .hero-title { margin-top: 20px; font-size: min(8.6vw, 40px); }
  #hero .hero-lede { margin-top: 18px; max-width: 19em; }
  #hero .hero-cta { margin-top: 28px; }
  #hero .hero-btn { height: 44px; padding: 0 18px; font-size: 14px; }
  #hero .globe-tag { font-size: 12px; }
  #hero .globe-tag time { display: none; }
  #hero .hero-pause { bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  #hero .hero-kicker, #hero .hero-title .ln, #hero .hero-lede, #hero .hero-cta { animation: none; }
  #hero .globe-tag { animation: none; opacity: 1; }
  #hero .hero-globe canvas { transition: none; }
}
