/* Hero cinematic — discrete scene swaps (not one continuous 3D camera) */

.hero-cinematic {
  padding: 0 !important;
  overflow: visible !important;
  background:
    radial-gradient(ellipse 70% 55% at 88% 28%, rgba(255, 199, 46, 0.1), transparent 60%),
    var(--paper) !important;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  scroll-margin-top: 0;
}

.hero-cinematic .ambient-bg {
  display: none;
}

.hero-cinematic .hero-visual.reveal,
html.js-anim .hero-cinematic .hero-visual.reveal {
  opacity: 1 !important;
  transform: none !important;
}

.cine-root {
  /* Track MUST be a direct child of .cine-root (sibling of .cine-stage).
     Never nest .cine-track inside .cine-stage, and never close .cine-root
     before .cine-track — that breaks sticky scrub and leaves a huge blank. */
  position: relative;
}

.cine-stage {
  position: relative;
  top: auto;
  z-index: 2;
  height: auto;
  max-height: none;
  min-height: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  padding: 20px 0 28px;
  overflow: visible;
  background:
    radial-gradient(ellipse 70% 55% at 88% 28%, rgba(255, 199, 46, 0.1), transparent 60%),
    var(--paper);
}

/* ============================================================
   HERO MASTHEAD — 基礎樣式由 styles-main.css / evenly.css 的
   通用 .masthead 規則接管（flex / font / padding / border）。
   這裡只處理 Hero 情境下的微調：
     1. z-index/position 確保在 ambient-bg 之上
     2. 確保在桌面/平板下，.cine-stage 為 block 時寬度正確
   注意：不要覆寫 font-weight / line-height / font-size 等
   基礎屬性，避免與 .page-head .masthead 產生不一致。
   ============================================================ */
.hero-cinematic .hero-masthead,
.cine-stage .hero-masthead,
.hero-cinematic.hero-split .hero-masthead {
  position: relative;
  z-index: 3;
  width: 100%;
  box-sizing: border-box;
}

/* 手機版（≤720px）：隱藏右側，與 styles-main.css 中
   .masthead .r 的斷點完全對齊。 */
@media (max-width: 720px) {
  .hero-cinematic .hero-masthead .r,
  .cine-stage .hero-masthead .r {
    display: none;
  }
}

.cine-track,
.cine-pin {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
}

.hero-cinematic .hero-visual {
  position: relative;
  overflow: visible;
  z-index: 2;
}

.cine-viewport {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: clamp(260px, 40svh, 460px);
  aspect-ratio: 1.35 / 1;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background:
    radial-gradient(ellipse 70% 55% at 28% 42%, rgba(255, 199, 46, 0.07), transparent 62%),
    radial-gradient(ellipse 55% 45% at 78% 70%, rgba(80, 120, 180, 0.05), transparent 65%);
  box-shadow: none;
}

.cine-stage-tabs {
  position: relative;
  top: auto;
  right: auto;
  left: auto;
  z-index: 6;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px;
  width: 100%;
  margin: 0 0 12px;
  padding: 4px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 10px 28px rgba(40, 50, 45, 0.06);
}

.cine-stage-tabs::-webkit-scrollbar {
  display: none;
}

.cine-tab {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
  min-height: 34px;
  margin: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  color: rgba(40, 50, 45, 0.62);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.cine-tab:hover {
  color: #1f2a24;
  background: rgba(255, 255, 255, 0.55);
}

.cine-tab.is-active {
  background: #1f2a24;
  color: #f7f4ec;
  box-shadow: 0 4px 12px rgba(31, 42, 36, 0.18);
}

.cine-camera {
  position: absolute;
  inset: 0;
  overflow: visible;
  /* Soft edge — keep wide enough so scene-1 diagram (phone→person→store) stays visible */
  -webkit-mask-image: radial-gradient(ellipse 108% 102% at 50% 48%, #000 78%, transparent 100%);
  mask-image: radial-gradient(ellipse 108% 102% at 50% 48%, #000 78%, transparent 100%);
}

.cine-root[data-cine-stage="1"] .cine-camera,
.cine-root[data-cine-stage="3"] .cine-camera,
.cine-root[data-cine-stage="4"] .cine-camera,
.cine-root[data-cine-stage="5"] .cine-camera,
.cine-root[data-cine-stage="6"] .cine-camera {
  -webkit-mask-image: none;
  mask-image: none;
}

/* ---- Hard scene cuts: fluid, viewport-aware ---- */
.cine-scene {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
  /* Extra bottom room so toast never covers the graphic */
  padding: clamp(28px, 4vw, 40px) clamp(8px, 2vw, 20px) clamp(56px, 9vw, 72px);
}

.cine-scene.is-active {
  display: flex;
  z-index: 2;
  animation: cineSceneIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cine-scene[data-scene="1"].is-active {
  justify-content: center;
  align-items: center;
}

@keyframes cineSceneIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.cine-iso {
  width: 100%;
  height: auto; /* % height collapses to 0 in flex scene — size from viewBox */
  max-width: min(100%, 640px);
  max-height: min(100%, 520px);
  display: block;
  overflow: visible;
  margin: 0 auto;
}

.cine-scene .cine-iso {
  filter: drop-shadow(0 22px 40px rgba(40, 50, 45, 0.1));
  transform: scale(var(--cine-frame, 1));
  transform-origin: center center;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.cine-scene[data-scene="1"] .cine-iso {
  margin-left: auto;
  margin-right: auto;
  max-width: min(100%, 680px);
  max-height: min(100%, 420px);
  transform-origin: center center;
}

.cine-scene[data-scene="2"] .cine-iso {
  max-width: min(100%, 300px);
  max-height: min(100%, 500px);
}

.cine-scene[data-scene="3"] .cine-iso,
.cine-scene[data-scene="4"] .cine-iso {
  max-width: min(100%, 720px);
  max-height: min(100%, 440px);
}

.cine-scene[data-scene="5"] .cine-iso {
  max-width: min(100%, 760px);
  max-height: min(100%, 460px);
}

.cine-scene[data-scene="6"] .cine-iso {
  max-width: min(100%, 760px);
  max-height: min(100%, 460px);
}

.cine-ar-box-a {
  animation: cineArPulse 2.4s ease-in-out infinite;
}

.cine-ar-box-b {
  animation: cineArPulse 2.4s ease-in-out infinite 0.4s;
}

.cine-ar-box-c {
  animation: cineArPulse 2.4s ease-in-out infinite 0.8s;
}

@keyframes cineArPulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.cine-sound-arc {
  animation: cineSound 2.4s ease-out infinite;
}

.cine-sound-ring {
  transform-origin: center;
  transform-box: fill-box;
}

.cine-sound-ring-a {
  animation: cineSpatialPulse 2.2s ease-out infinite;
}

.cine-sound-ring-b {
  animation: cineSpatialPulse 2.2s ease-out infinite 0.35s;
}

.cine-sound-ring-c {
  animation: cineSpatialPulse 2.2s ease-out infinite 0.7s;
}

.cine-audio-dot {
  animation: cineAudioDot 1.1s ease-in-out infinite;
}

.cine-audio-dot-delay {
  animation-delay: 0.35s;
}

.cine-eq-bar {
  transform-origin: center bottom;
  transform-box: fill-box;
  animation: cineEq 0.85s ease-in-out infinite;
}

.cine-eq-bar:nth-child(2) { animation-delay: 0.1s; }
.cine-eq-bar:nth-child(3) { animation-delay: 0.2s; }
.cine-eq-bar:nth-child(4) { animation-delay: 0.05s; }
.cine-eq-bar:nth-child(5) { animation-delay: 0.28s; }

.cine-pulse-item {
  animation: cineFoundPulse 2.2s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}

.cine-scan-line {
  animation: cineScan 2.1s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center top;
}

@keyframes cineFoundPulse {
  0%, 100% {
    opacity: 0.75;
    filter: drop-shadow(0 0 0 rgba(255, 199, 46, 0));
  }
  50% {
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(255, 199, 46, 0.55));
  }
}

@keyframes cineScan {
  0% {
    transform: translateY(0);
    opacity: 0.25;
  }
  45% {
    transform: translateY(70px);
    opacity: 0.95;
  }
  100% {
    transform: translateY(108px);
    opacity: 0.15;
  }
}

/* Side feature board — not a second phone.
   Animate with the `translate` property, not `transform`: a CSS transform
   replaces the SVG transform attribute and stacks every card on the label. */
.cine-feat {
  animation: cineFeatIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cine-feat-orb {
  animation: cineFeatOrb 2.2s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}

.cine-feat-ring {
  animation: cineFeatRing 2.2s ease-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}

@keyframes cineFeatIn {
  from {
    opacity: 0;
    translate: 14px 0;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes cineFeatOrb {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

@keyframes cineFeatRing {
  0% { opacity: 0.85; transform: scale(0.92); }
  55% { opacity: 0.25; transform: scale(1.28); }
  100% { opacity: 0; transform: scale(1.4); }
}

/* City network map */
.cine-net-pulse {
  transform-origin: center;
  transform-box: fill-box;
  animation: cineNetPulse 2.8s ease-out infinite;
}

.cine-net-live {
  animation: cineNetLive 1.4s ease-in-out infinite;
}

.cine-net-line {
  stroke-dasharray: 6 7;
  animation: cineNetFlow 3.2s linear infinite;
}

.cine-net-node {
  animation: cineFeatIn 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cineNetPulse {
  0% { opacity: 0.55; transform: scale(0.88); }
  55% { opacity: 0.15; transform: scale(1.18); }
  100% { opacity: 0; transform: scale(1.28); }
}

@keyframes cineNetLive {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@keyframes cineNetFlow {
  to { stroke-dashoffset: -40; }
}

@keyframes cineSound {
  0% { opacity: 0.15; }
  40% { opacity: 0.55; }
  100% { opacity: 0.1; }
}

@keyframes cineSpatialPulse {
  0% { opacity: 0.15; transform: scale(0.86); }
  35% { opacity: 0.85; transform: scale(1); }
  100% { opacity: 0.1; transform: scale(1.12); }
}

@keyframes cineAudioDot {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

@keyframes cineEq {
  0%, 100% { transform: scaleY(0.45); opacity: 0.55; }
  50% { transform: scaleY(1); opacity: 1; }
}

@keyframes cinePulse {
  0% { transform: scale(0.55); opacity: 0.7; }
  70% { transform: scale(1.9); opacity: 0; }
  100% { transform: scale(1.9); opacity: 0; }
}

.cine-chips {
  /* Floating chips duplicated toast/caption and covered copy — keep DOM, hide UI */
  display: none !important;
  pointer-events: none;
}

.cine-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 8px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  border-radius: 999px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 14px 36px rgba(40, 50, 45, 0.08);
  font-size: 13px;
  line-height: 1.2;
  color: #24302a;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.chip-copy {
  font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: -0.01em;
}

.chip-orb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  box-shadow: 0 0 0 5px color-mix(in srgb, currentColor 14%, transparent);
}

.chip-orb svg {
  width: 14px;
  height: 14px;
  display: block;
}

.orb-coral { background: #f0c9c4; color: #c45b52; }
.orb-gold { background: #f3e0a8; color: #b88912; }
.orb-blue { background: #c9d7ee; color: #4a74b8; }
.orb-green { background: #cfe8d2; color: #2f9a4a; }
.orb-violet { background: #e0d0ea; color: #8660a0; }

.chip-enter { left: 4%; top: 14%; }
.chip-hw { left: 8%; top: 10%; }
.chip-ask { left: 5%; top: 16%; }
.chip-ui { left: 6%; top: 18%; }
.chip-ok { left: 8%; top: 58%; }
.chip-net { left: 6%; top: 62%; }

.cine-root[data-cine-stage="1"] .chip-enter,
.cine-root[data-cine-stage="2"] .chip-hw,
.cine-root[data-cine-stage="3"] .chip-ask,
.cine-root[data-cine-stage="4"] .chip-ui,
.cine-root[data-cine-stage="5"] .chip-ok,
.cine-root[data-cine-stage="6"] .chip-net {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.cine-toast {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100% - 20px);
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 12px 28px rgba(40, 50, 45, 0.08);
}

.toast-orb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex: 0 0 auto;
  background:
    radial-gradient(circle at 35% 30%, #fff 0 18%, transparent 19%),
    linear-gradient(145deg, #ffe08a, #ffc72e);
  box-shadow: 0 0 0 4px rgba(255, 199, 46, 0.16);
}

.toast-text {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: #24302a;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cine-kicker {
  position: relative;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy-2);
  margin: 0 0 6px;
  opacity: 0.8;
}

.cine-caption {
  position: relative;
  z-index: 2;
  margin: 0 0 14px;
  min-height: 0;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 48ch;
}

.cine-progress {
  display: none;
}

@media (min-width: 1100px) {
  .hero-cinematic .hero-grid-split {
    align-items: center;
    grid-template-columns: 1fr 1.05fr;
    gap: clamp(28px, 4vw, 56px);
    /* ★ 對齊 about.html .page-head .inner 的呼吸節奏：
       clamp(40px, 7vw, 84px)。但 Hero 有固定高度，
       所以保守使用 clamp(32px, 5vw, 56px) 避免撐破 100svh。 */
    padding-top: clamp(32px, 5vw, 56px);
  }
  .hero-cinematic .hero-visual {
    margin-right: -2vw;
  }
}

@media (min-width: 768px) and (max-width: 1099px) {
  .hero-cinematic .hero-grid-split {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    /* ★ 對齊 about.html 的呼吸節奏 */
    padding-top: clamp(28px, 5vw, 44px);
  }
  .hero-cinematic .hero-visual {
    margin-right: 0 !important;
  }
  .cine-stage {
    position: relative;
    top: auto;
    height: auto;
    max-height: none;
    min-height: 0;
    align-items: stretch;
    justify-content: center;
    padding: 24px 0 28px;
    overflow: visible;
    /* ★ 平板版改回 block，避免 flex column 壓縮 .container */
    display: block;
  }
  .cine-stage > .container {
    width: 100%;
  }
  .cine-viewport {
    max-width: 560px;
    margin: 0 auto;
    min-height: clamp(280px, 38svh, 380px);
    aspect-ratio: 1.45 / 1;
  }
  .cine-stage-tabs {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    margin: 0 0 12px;
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 767px) {
  .hero-cinematic {
    padding: 0 !important;
  }

  .cine-stage {
    position: relative;
    top: auto;
    height: auto !important;
    max-height: none !important;
    min-height: 0;
    align-items: stretch;
    justify-content: flex-start;
    padding: 8px 0 16px;
    overflow: visible;
  }

  .cine-track,
  .cine-pin {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
  }

  .cine-kicker {
    margin: 0 0 6px;
    font-size: 12px;
    letter-spacing: 0.1em;
  }

  .cine-caption {
    font-size: 16px;
    line-height: 1.45;
    margin: 0 0 12px;
    max-width: none;
  }

  .cine-viewport {
    position: relative;
    min-height: clamp(280px, 52svh, 420px);
    aspect-ratio: auto;
    height: clamp(300px, 54svh, 440px);
    margin-left: 0;
    margin-right: 0;
    padding-top: 0;
    box-sizing: border-box;
    border-radius: 16px;
    overflow: hidden;
    background:
      radial-gradient(ellipse 70% 55% at 30% 40%, rgba(255, 199, 46, 0.08), transparent 62%),
      radial-gradient(ellipse 55% 45% at 78% 70%, rgba(80, 120, 180, 0.06), transparent 65%),
      rgba(255, 255, 255, 0.28);
  }

  .cine-camera {
    top: 0;
    -webkit-mask-image: none !important;
    mask-image: none !important;
  }

  .cine-stage-tabs {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    width: 100%;
    max-width: none;
    margin: 0 0 10px;
    padding: 4px;
    gap: 2px;
    border-radius: 14px;
    overflow-x: auto;
  }

  .cine-tab {
    flex: 1 0 auto;
    min-height: 36px;
    min-width: 3.4em;
    padding: 0 12px;
    font-size: 13px;
    border-radius: 10px;
  }

  .cine-scene {
    padding: 12px 8px 44px;
  }

  .cine-iso {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
  }

  .cine-scene[data-scene="1"] .cine-iso {
    max-width: min(100%, 420px);
    transform: scale(var(--cine-frame, 1));
    transform-origin: center center;
  }

  .cine-scene[data-scene="2"] .cine-iso {
    max-width: min(100%, 220px);
    max-height: min(100%, 340px);
  }

  /* Keep the whole diagram in frame. Zooming past 100% stacks the shelf labels. */
  .cine-scene[data-scene="3"] .cine-iso,
  .cine-scene[data-scene="4"] .cine-iso,
  .cine-scene[data-scene="5"] .cine-iso,
  .cine-scene[data-scene="6"] .cine-iso {
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    height: auto;
    transform: none;
  }

  .cine-toast {
    bottom: 10px;
    padding: 8px 12px;
    gap: 8px;
    max-width: calc(100% - 16px);
  }

  .toast-orb {
    width: 20px;
    height: 20px;
  }

  .toast-text {
    font-size: 13px;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
  }

  /* Hero CTAs: readable touch targets */
  .hero-cinematic .hero-actions,
  .hero-cinematic.hero-split .hero-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    margin-top: 14px !important;
  }

  .hero-cinematic .hero-actions .btn,
  .hero-cinematic .hero-actions .btn-lg,
  .hero-cinematic.hero-split .hero-actions .btn,
  .hero-cinematic.hero-split .hero-actions .btn-lg {
    flex: none !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 44px !important;
    height: auto !important;
    padding: 10px 12px !important;
    font-size: 13.5px !important;
    line-height: 1.2 !important;
    justify-content: center !important;
    white-space: nowrap !important;
    border-radius: 12px !important;
  }

  .hero-cinematic .hero-actions .btn:first-child,
  .hero-cinematic.hero-split .hero-actions .btn:first-child {
    grid-column: 1 / -1 !important;
    flex: none !important;
    width: 100% !important;
    min-height: 46px !important;
    font-size: 14.5px !important;
  }

  .hero-cinematic .hero-actions .btn i {
    font-size: 14px !important;
    margin-right: 6px !important;
  }

  .hero-cinematic .hero-content .hero-desc {
    font-size: 16px !important;
    line-height: 1.5 !important;
  }
}

/* Left hero type: smaller, looser on phones. Desktop block sits higher. */
#heroSlogan {
  display: block;
  min-height: 1.45em;
}

#heroSlogan.is-swapping {
  animation: heroSloganSwap 0.72s cubic-bezier(0.22, 1, 0.36, 1) both !important;
}

@keyframes heroSloganSwap {
  0% { opacity: 1; transform: translateY(0); }
  40% { opacity: 0; transform: translateY(-14px); }
  60% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}

.hero-cinematic .hero-content h1,
.hero-cinematic .hero-content h1.hero-title {
  font-size: clamp(24px, 2.5vw, 34px) !important;
  line-height: 1.28 !important;
  letter-spacing: 0 !important;
}

html[data-lang="zh"] .hero-cinematic .hero-content h1 .zh-b {
  font-size: clamp(22px, 2.3vw, 32px) !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  letter-spacing: 0.04em !important;
}

@media (min-width: 1100px) {
  .hero-cinematic .cine-stage {
    /* Shorter than the viewport so the awards strip sits on the first screen.
       The two columns are centered in the space above that strip. */
    height: calc(100svh - 72px - clamp(168px, 20vh, 210px));
    max-height: calc(100svh - 72px - clamp(168px, 20vh, 210px));
    justify-content: center;
    padding: 0;
    overflow: hidden;
    /* ★ 桌面版改回 block，避免 .cine-stage 的 flex column 壓縮 .container */
    display: block;
  }
  .hero-cinematic .cine-stage > .container {
    width: 100%;
    height: 100%;
  }

  .hero-cinematic .hero-grid-split {
    align-items: center;
  }

  .hero-cinematic .cine-viewport {
    min-height: 0;
    aspect-ratio: auto;
    height: clamp(320px, 40svh, 440px);
  }

  .hero-cinematic .cine-scene {
    padding: 16px 4px 28px;
  }
}

@media (max-width: 900px) {
  #heroSlogan {
    min-height: 2.8em;
  }

  .hero-cinematic .hero-content .kicker {
    font-size: 11px !important;
    margin-bottom: 8px !important;
  }

  .hero-cinematic .hero-content h1,
  .hero-cinematic .hero-content h1.hero-title {
    font-size: clamp(20px, 5.2vw, 26px) !important;
    line-height: 1.35 !important;
  }

  html[data-lang="zh"] .hero-cinematic .hero-content h1 .zh-b {
    font-size: clamp(20px, 5.4vw, 26px) !important;
    line-height: 1.45 !important;
    letter-spacing: 0.06em !important;
    white-space: normal !important;
  }

  .hero-cinematic .hero-content .hero-desc {
    font-size: 14.5px !important;
    line-height: 1.55 !important;
    margin-top: 10px !important;
  }
}

/* Phone: headline, buttons, scene, and the lines under it fit one screen. */
@media (max-width: 767px) {
  .hero-cinematic {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    /* ★ 移除固定高度限制，讓區塊自然撐開。
       之前 height: calc(100svh - 64px) + overflow: hidden
       導致上方按鈕佔滿空間後 viewport 被壓到只剩 70-90px。
       移除後 grid-split / viewport 各取所需。 */
    height: auto !important;
    max-height: none !important;
    overflow: hidden !important;  /* ★ 明確覆蓋基礎規則的 overflow:visible!important */
  }

  .hero-cinematic .cine-root {
    display: flex;
    flex-direction: column;
  }

  .hero-cinematic .cine-root,
  .hero-cinematic .cine-stage,
  .hero-cinematic .cine-stage > .container,
  .hero-cinematic .hero-grid-split {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
  }

  .hero-cinematic .cine-stage > .container {
    display: flex;
    flex-direction: column;
  }

  .hero-cinematic .hero-grid-split {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    box-sizing: border-box;
    /* ★ 對齊 about.html @720px 的 32px 頂部留白。
       masthead 底部 20px + 此 20px ≈ 40px 視覺呼吸。 */
    padding-top: 20px;
    padding-bottom: 56px;
  }

  /* ★ 確保 .kicker 自身不殘留任何影響空間計算的 margin，
     所有頂部間距由 .hero-grid-split 的 padding-top 統一控制。 */
  .hero-cinematic .hero-content > .kicker,
  .hero-cinematic .hero-grid-split > .kicker {
    margin-top: 0 !important;
    margin-bottom: 6px !important;
  }

  .hero-cinematic .hero-content,
  .hero-cinematic .hero-visual {
    display: contents;
  }

  .hero-cinematic .hero-content > .kicker,
  .hero-cinematic #heroSlogan,
  .hero-cinematic .hero-actions,
  .hero-cinematic .cine-stage-tabs,
  .hero-cinematic .pilot-status,
  .hero-cinematic .hero-desc,
  .hero-cinematic .cine-kicker,
  .hero-cinematic .cine-caption {
    flex: 0 0 auto;
  }

  .hero-cinematic .hero-content > .kicker { order: 1; }
  .hero-cinematic #heroSlogan { order: 2; }
  .hero-cinematic .hero-desc { order: 3; }
  .hero-cinematic .pilot-status { order: 4; }
  .hero-cinematic .hero-actions { order: 5; }
  .hero-cinematic .cine-stage-tabs { order: 6; }
  .hero-cinematic .cine-viewport { order: 7; }
  .hero-cinematic .cine-kicker { order: 8; }
  .hero-cinematic .cine-caption { order: 9; }

  #heroSlogan {
    min-height: 1.35em;
    margin: 0 0 2px !important;
  }

  .hero-cinematic .hero-content .kicker {
    margin-bottom: 2px !important;
  }

  .hero-cinematic .hero-content h1,
  .hero-cinematic .hero-content h1.hero-title,
  html[data-lang="zh"] .hero-cinematic .hero-content h1 .zh-b {
    /* ★ 動態 slogan / 標題在手機版更大、更易讀。
       375px → 23px；480px → 28px；不超過 28px。
       同時放寬行高 1.35 與字距 0.01em，提升呼吸感。 */
    font-size: clamp(23px, 6.2vw, 28px) !important;
    line-height: 1.35 !important;
    letter-spacing: 0.01em !important;
  }

  .hero-cinematic .pilot-status {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 6px;
    width: max-content;
    max-width: 100%;
    margin: 0 !important;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink-soft) !important;
    font-family: var(--font-body);
    font-size: 12px !important;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: 0;
  }

  .hero-cinematic .pilot-dot {
    width: 6px;
    height: 6px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: none;
    animation: none;
  }

  .hero-cinematic .hero-content .hero-desc {
    margin: 6px 0 8px !important;
    padding: 0;
    border: 0;
    font-family: var(--font-body);
    font-weight: 400;
    /* ★ 與放大後的 h1 保持視覺比例，避免 desc 顯得過小 */
    font-size: 14.5px !important;
    line-height: 1.5 !important;
    color: var(--ink-soft) !important;
    max-width: none !important;
  }

  .hero-cinematic .hero-actions,
  .hero-cinematic.hero-split .hero-actions {
    /* ★ 水平換列：按鈕小一點、在 viewport 上方一行一行換列，
       viewport 固定 300px 在底部，上方按鈕區自然適應。 */
    grid-template-columns: 1fr 1fr !important;
    gap: 8px 10px !important;
    margin-top: 10px !important;
    margin-bottom: 10px !important;
  }

  .hero-cinematic .hero-actions .btn:not(:first-child),
  .hero-cinematic .hero-actions .btn-lg:not(:first-child),
  .hero-cinematic.hero-split .hero-actions .btn:not(:first-child),
  .hero-cinematic.hero-split .hero-actions .btn-lg:not(:first-child) {
    grid-column: auto !important;
    /* ★ min-height 44px：iOS / WCAG 最小觸控標準，份量適中 */
    min-height: 44px !important;
    padding: 10px 8px !important;
    font-size: 13px !important;
    width: 100% !important;
    justify-content: center !important;
    gap: 5px !important;
  }

  .hero-cinematic .hero-actions .btn i,
  .hero-cinematic.hero-split .hero-actions .btn i {
    font-size: 14px !important;
    margin-right: 4px !important;
  }

  .hero-cinematic .cine-kicker {
    display: inline-flex;
    align-self: flex-start;
    margin: 8px 0 0;
    padding: 3px 8px;
    background: var(--navy);
    color: var(--accent);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    opacity: 1;
  }

  .hero-cinematic .cine-caption {
    margin: 5px 0 0;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14.5px;
    line-height: 1.35;
    color: var(--ink);
  }

  .hero-cinematic .cine-stage-tabs {
    margin: 0 0 8px;
  }

  .hero-cinematic .cine-viewport {
    flex: 1 1 auto;
    margin-top: 0;
    /* ★ clamp：320px → 220px（最小），360px+ → 280px（更大視覺區）。
       800px 視窗下：masthead(55) + btn(88) + top(20) + viewport(280) + bottom(56) ≈ 499px << 736px。
       320px 視窗下：220px viewport + 上方 ≈ 439px < 684px，幾乎不溢出。 */
    height: auto !important;
    min-height: clamp(220px, 38svh, 280px) !important;
    max-height: none;
    padding-top: 0;
  }

  .hero-cinematic .cine-scene {
    padding: 6px 4px 32px;
  }

  .hero-cinematic .cine-camera {
    top: 0;
  }

  .hero-cinematic .cine-tab {
    min-height: 30px;
    padding: 0 8px;
    font-size: 12px;
  }
}

@keyframes pilotPulse {
  0% { box-shadow: 0 0 0 0 rgba(18, 22, 42, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(18, 22, 42, 0); }
  100% { box-shadow: 0 0 0 0 rgba(18, 22, 42, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .cine-track,
  .cine-pin {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
  }
  .cine-stage {
    position: relative;
    top: auto;
    min-height: 0;
  }
  .cine-scene.is-active,
  #heroSlogan.is-swapping {                      /* ★ 停用 slogan swap 動畫 */
    animation: none;
  }
  #heroSlogan.is-swapping { animation: none !important; }   /* 防覆蓋 */
  .cine-sound-arc,
  .cine-pulse-item,
  .hero-cinematic .pilot-dot {
    animation: none !important;
  }
}
