/* 首頁：大量留白、左對齊閱讀；開場的即時 3D 醫院是唯一的大動作 */
.page-home main { overflow-x: clip; }
.wrap, .value, .robots, .day, .start, .platform, .twin, .trust { max-width: 1160px; margin: 0 auto; padding-left: 28px; padding-right: 28px; }

/* ---------- 按鈕與連結 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  font-size: 15px; font-weight: 500; padding: 13px 22px; border-radius: 10px;
  transition: background .25s var(--ease), color .25s, box-shadow .25s, transform .25s var(--ease);
}
.btn.primary { background: var(--brand-deep); color: #fff; }
.btn.primary:hover { background: var(--brand-press); transform: translateY(-1px); }
.btn.ghost { color: var(--ink); box-shadow: inset 0 0 0 1px #C9D3DA; }
.btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--brand-deep); color: var(--brand-deep); }
.btn.small { font-size: 14px; padding: 10px 16px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.text-link {
  display: inline-block; font-size: 14px; font-weight: 500; color: var(--brand-deep); text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .3s var(--ease);
}
.text-link:hover { background-size: 100% 1px; }

/* ---------- 開場 ---------- */
.hero {
  display: grid; grid-template-columns: minmax(460px, 6fr) 7fr; gap: 0;
  min-height: calc(100vh - var(--head-h)); min-height: calc(100svh - var(--head-h));
}
.hero-copy {
  display: flex; flex-direction: column; justify-content: center; gap: 28px;
  padding: 64px 56px 64px max(28px, calc((100vw - 1160px) / 2 + 28px));
}
.hero h1 {
  margin: 0; font-size: clamp(36px, 3.6vw, 56px); font-weight: 500; line-height: 1.25; letter-spacing: -.01em; text-wrap: balance;
  animation: rise .8s var(--ease) both;
}
html[lang="en"] .hero h1 { font-size: clamp(36px, 3.8vw, 56px); line-height: 1.12; letter-spacing: -.02em; }
.hero-lead { margin: 0; font-size: 16px; line-height: 1.9; color: var(--ink-2); max-width: 30em; animation: rise .8s .08s var(--ease) both; }
.hero .cta-row { animation: rise .8s .16s var(--ease) both; }
.now {
  display: grid; grid-template-columns: auto auto 1fr; align-items: baseline; column-gap: 10px; row-gap: 2px;
  margin-top: 8px; padding-top: 22px; border-top: 1px solid var(--line); text-decoration: none; max-width: 30em;
  animation: rise .8s .24s var(--ease) both;
}
.now-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); align-self: center; box-shadow: 0 0 0 0 rgba(31,157,99,.5); animation: live 2s infinite; }
.now-label { font-size: 13px; color: var(--muted); }
.now-title { font-size: 14px; font-weight: 500; color: var(--ink); }
.now-open { grid-column: 2 / -1; font-size: 13px; color: var(--brand-deep); }
.now:hover .now-open { text-decoration: underline; }
.now.swap .now-title { animation: rise .45s var(--ease); }
@keyframes live { 70% { box-shadow: 0 0 0 7px rgba(31,157,99,0); } 100% { box-shadow: 0 0 0 0 rgba(31,157,99,0); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

.hero-stage {
  position: relative; overflow: hidden; background: var(--stage);
  border-radius: 24px 0 0 24px; margin: 20px 0 20px; cursor: grab;
}
.hero-stage:active { cursor: grabbing; }
.hero-stage canvas { position: absolute; inset: 0; display: block; }
/* 主視覺載入畫面：鋪滿 3D 區，進度條放在模型會出現的右側（窄螢幕在下方） */
.boot-hero { position: absolute; inset: 0; z-index: 3; }
.boot-hero .boot-in { position: absolute; left: 72%; top: 50%; width: min(360px, 34vw); transform: translate(-50%, -50%); }
@media (max-width: 1024px) { .boot-hero .boot-in { left: 50%; top: 74%; width: min(360px, 76vw); } }
.hero-stage canvas, .hero-stage .label-layer { transition: opacity .35s var(--ease); }
.hero-stage.fading canvas, .hero-stage.fading .label-layer { opacity: 0; }
.hero-stage .zlabel, .hero-stage .elabel { display: none; }
.hero-floor {
  position: absolute; z-index: 2; top: 22px; left: 30px; pointer-events: none;
  font: 300 88px/1 var(--en); letter-spacing: -.03em; color: var(--c, var(--brand-deep)); opacity: .9;
}
.hero-floor.swap { animation: floorIn .6s var(--ease); }
@keyframes floorIn { from { opacity: 0; transform: translateY(-14px); } }

/* ---------- 共用段落 ---------- */
section { scroll-margin-top: calc(var(--head-h) + 16px); }
.value, .robots, .day, .start, .platform, .twin, .trust { padding-top: 136px; padding-bottom: 8px; }
.sec-head { margin-bottom: 48px; }
.sec-head h2, .platform h2, .twin h2, .trust h2, .final h2 { margin: 0 0 14px; font-size: clamp(26px, 2.4vw, 34px); font-weight: 500; line-height: 1.35; }
.sec-head p, .twin-copy p { margin: 0; font-size: 15px; line-height: 1.9; color: var(--ink-2); max-width: 36em; }

/* ---------- 效益（給決策者） ---------- */
.value h2 { margin: 0 0 28px; font-size: 15px; font-weight: 500; color: var(--muted); }
.value-sentence { margin: 0; font-size: clamp(24px, 2.5vw, 34px); line-height: 1.75; font-weight: 400; max-width: 26em; }
html[lang="en"] .value-sentence { line-height: 1.5; }
.value-sentence .num { font: 300 1.4em/1 var(--en); color: var(--brand-deep); letter-spacing: -.02em; white-space: nowrap; margin: 0 .08em; }
.source { margin: 28px 0 0; font-size: 13px; color: var(--muted); max-width: 44em; }

/* ---------- 三台機器人 ---------- */
.robot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.robot-card h3 { margin: 24px 0 2px; font-size: 22px; font-weight: 500; }
.robot-card h3 a { text-decoration: none; }
.robot-card h3 a:hover { color: var(--brand-deep); }
.robot-card .role { margin: 0 0 12px; font-size: 14px; font-weight: 500; color: color-mix(in srgb, var(--c) 85%, black); }
.robot-card .desc { margin: 0 0 16px; font-size: 14px; line-height: 1.85; color: var(--ink-2); }
.robot-view {
  position: relative; aspect-ratio: 4 / 4.4; border-radius: 18px; overflow: hidden; cursor: grab;
  background: radial-gradient(110% 80% at 50% 30%, #FFFFFF 0%, var(--stage) 70%);
}
.robot-view:active { cursor: grabbing; }
.robot-view canvas { display: block; width: 100%; height: 100%; }
.floor-list { display: flex; gap: 6px; margin: 0 0 18px; }
.floor-list span { font: 400 13px var(--en); padding: 2px 8px; border-radius: 6px; color: var(--ink-2); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }

/* ---------- 導入後的一天：方案分頁 × 導入前後 ---------- */
.day-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.day-tabs { display: flex; gap: 8px; }
.day-tabs button {
  position: relative; display: grid; grid-template-columns: auto auto; column-gap: 10px; align-items: baseline; text-align: left;
  padding: 12px 20px 14px 2px; margin-right: 16px; color: var(--muted); transition: color .25s var(--ease);
}
.day-tabs button i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); align-self: center; opacity: .45; transition: opacity .25s; }
.day-tabs button b { font: 400 20px/1.2 var(--en); letter-spacing: -.01em; }
.day-tabs button span { grid-column: 2; font-size: 13px; }
.day-tabs button::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--c);
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.day-tabs button:hover { color: var(--ink-2); }
.day-tabs button[aria-selected="true"] { color: var(--ink); }
.day-tabs button[aria-selected="true"] i { opacity: 1; }
.day-tabs button[aria-selected="true"]::after { transform: scaleX(1); }
/* 導入前／後切換：滑動底塊 */
.day-mode { position: relative; display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 12px; padding: 4px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.day-mode::before {
  content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px;
  background: var(--ink); transition: transform .4s var(--ease), background .4s var(--ease);
}
.day-mode[data-mode="after"]::before { transform: translateX(100%); background: var(--brand-deep); }
.day-mode button { position: relative; z-index: 1; padding: 8px 22px; font-size: 14px; font-weight: 500; color: var(--ink-2); transition: color .3s; white-space: nowrap; }
.day-mode button[aria-checked="true"] { color: #fff; }

.day-board { --human: #8B98A5; margin-top: 28px; }
.day-board.swap > * { animation: rise .4s var(--ease) both; }
.day-sub { margin: 0 0 20px; font-size: 14px; color: var(--ink-2); }
.day-chart { display: grid; grid-template-columns: 84px 1fr; gap: 0 16px; }
.d-labels { display: grid; grid-template-rows: 56px 56px; gap: 8px; font-size: 13px; color: var(--ink-2); }
.d-labels span { display: flex; flex-direction: column; justify-content: center; font-weight: 500; }
.d-labels i { font: 400 12px var(--en); font-style: normal; color: var(--muted); }
.d-tracks { position: relative; display: grid; grid-template-rows: 56px 56px auto; gap: 8px; }
.d-lane { border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.d-tracks .hours { margin-top: 2px; }
.d-lane[data-empty] { display: flex; align-items: center; justify-content: center; }
.d-lane[data-empty]::after { content: attr(data-empty); font-size: 13px; color: var(--muted); opacity: 0; transition: opacity .4s var(--ease); }
.day-board[data-mode="before"] .d-lane[data-empty]::after { opacity: 1; transition-delay: .3s; }
.d-col { position: absolute; top: 0; height: calc(112px + 8px); padding: 0; cursor: pointer; }
.d-col .d-h, .d-col .d-r { position: absolute; left: 0; border-radius: 7px; transition: width .7s var(--ease), opacity .5s var(--ease), transform .7s var(--ease), background .3s; }
.d-col .d-h { top: 9px; height: 38px; width: var(--wb); background: color-mix(in srgb, var(--human) 32%, white); box-shadow: inset 3px 0 0 var(--human); }
.d-col .d-r { top: calc(56px + 8px + 9px); height: 38px; width: 100%; background: color-mix(in srgb, var(--c) 24%, white); box-shadow: inset 3px 0 0 var(--c); transform-origin: left; transform: scaleX(0); opacity: 0; }
.day-board[data-mode="after"] .d-col .d-h { width: var(--wa); background: color-mix(in srgb, var(--human) 55%, white); }
.day-board[data-mode="after"] .d-col .d-r { transform: none; opacity: 1; }
/* 讓各段依時間先後依序移動 */
.d-col:nth-child(4) span { transition-delay: .04s; } .d-col:nth-child(5) span { transition-delay: .08s; }
.d-col:nth-child(6) span { transition-delay: .12s; } .d-col:nth-child(7) span { transition-delay: .16s; }
.d-col:nth-child(8) span { transition-delay: .2s; } .d-col:nth-child(9) span { transition-delay: .24s; }
.d-col:nth-child(10) span { transition-delay: .28s; } .d-col:nth-child(11) span { transition-delay: .32s; }
/* 滑過只加一圈細框提示「可以點」，不改填色，避免看起來像已經切換到這個時段（只有點選才切換） */
.d-col:hover .d-h, .d-col:hover .d-r { outline: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); outline-offset: 1px; }
.day-board[data-mode="before"] .d-col.on .d-h { background: var(--human); }
.day-board[data-mode="after"] .d-col.on .d-r { background: var(--c); }
.day-board[data-mode="after"] .d-col.on .d-h { background: var(--human); }
.d-col:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 8px; }

.day-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 28px; }
.d-m { padding: 22px 24px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.d-m-label { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); }
.d-m-label small { color: var(--muted); font-size: 12px; }
.d-m p { display: flex; align-items: baseline; gap: 6px; margin: 10px 0 14px; }
.d-m p b { font: 300 40px/1 var(--en); letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.d-m p b.d-m-text { font: 500 22px/1.3 var(--zh, inherit); letter-spacing: 0; }
.d-m p small { font-size: 13px; color: var(--muted); }
.d-m p em { margin-left: auto; font: 500 13px var(--en); font-style: normal; padding: 3px 8px; border-radius: 6px; color: #fff; background: var(--brand-deep); opacity: 0; transform: translateY(4px); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.day-board[data-mode="after"] .d-m p em { opacity: 1; transform: none; }
.d-m-bar { display: block; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--human) 22%, white); overflow: hidden; }
.d-m-bar i { display: block; height: 100%; border-radius: 3px; background: var(--human); transition: width .7s var(--ease), background .4s; }
.day-board[data-mode="after"] .d-m-bar i { background: var(--c); }
.d-m-log .d-m-bar i { background: var(--c); }
.d-m-ref { display: block; margin-top: 10px; font-size: 12px; color: var(--muted); visibility: hidden; }
.day-board[data-mode="after"] .d-m-ref { visibility: visible; }
.day-source { max-width: none; }

/* 時段說明：導入前 / 導入後 兩欄並排 */
.hours { position: relative; height: 28px; margin-top: 8px; }
.hours span { position: absolute; transform: translateX(-50%); font: 400 12px var(--en); color: var(--muted); }
.hours span:first-child { transform: none; }
.hours span:last-child { transform: translateX(-100%); }
.slot-detail {
  display: grid; grid-template-columns: 200px 1fr auto; align-items: start; gap: 32px;
  margin-top: 36px; padding: 28px 32px; border-radius: 16px; background: var(--surface);
  box-shadow: inset 4px 0 0 var(--k), 0 1px 2px rgba(20,36,48,.04);
}
/* 換時段：時間與內容輕柔淡入（位移很小），內容比時間晚一點點出現；按鈕維持不動 */
.slot-detail.swap .slot-time, .slot-detail.swap .slot-body { animation: slotIn .42s var(--ease) both; }
.slot-detail.swap .slot-body { animation-delay: .05s; }
@keyframes slotIn { from { opacity: 0; transform: translateY(4px); } }
.slot-time { margin: 0; font: 300 30px/1.2 var(--en); letter-spacing: -.01em; color: var(--ink); }
.slot-body h3 { margin: 0 0 4px; font-size: 18px; font-weight: 500; }
.slot-body h3 { margin-bottom: 14px; }
.ba-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.ba { padding-left: 14px; border-left: 2px solid var(--line); color: var(--muted); transition: color .3s, border-color .3s; }
.ba h4 { margin: 0 0 4px; font-size: 12px; font-weight: 500; letter-spacing: .02em; }
.ba p { margin: 0 0 6px; font-size: 14px; line-height: 1.75; }
.ba small { font: 400 12px var(--en); }
.ba.cur { color: var(--ink-2); border-color: var(--k, var(--ink)); }
.ba.cur h4 { color: var(--ink); }

/* ---------- 平台 ---------- */
.platform h2 { max-width: 18em; margin-bottom: 48px; }

/* ---------- 數位孿生 ---------- */
.twin { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: center; }
.twin-copy .text-link { margin-top: 24px; }
.twin-media { aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: var(--stage); }
.twin-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.placeholder { height: 100%; display: grid; place-items: center; text-align: center; padding: 24px; border: 1.5px dashed #C3CED6; border-radius: 18px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.placeholder code { font: 400 13px var(--en); color: var(--ink-2); }

/* ---------- 信任 ---------- */
.logos { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.logos li { height: 80px; display: grid; place-items: center; border-radius: 12px; background: var(--surface); }
.logos img { max-width: 70%; max-height: 48px; object-fit: contain; filter: grayscale(1); opacity: .8; transition: filter .3s, opacity .3s; }
.logos img:hover { filter: none; opacity: 1; }
.logos .slot-empty { background: transparent; border: 1.5px dashed #C9D3DA; color: var(--muted); font-size: 13px; }
.policy { margin: 28px 0 0; font-size: 14px; color: var(--ink-2); }

/* ---------- 收尾 ---------- */
.final {
  margin-top: 136px; padding: 120px 28px; text-align: center; background: var(--brand-ink); color: #fff;
}
.final h2 { max-width: 18em; margin: 0 auto 14px; }
.final p { margin: 0 auto 36px; color: #BDD0E8; font-size: 15px; }
.final .cta-row { justify-content: center; }
.final .btn.primary { background: #fff; color: var(--brand-deep); }
.final .btn.primary:hover { background: var(--wash); }
.final .btn.ghost { color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.4); }
.final .btn.ghost:hover { box-shadow: inset 0 0 0 1px #fff; color: #fff; }

.site-foot {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center;
  padding: 28px; font-size: 13px; color: var(--muted); max-width: 1160px; margin: 0 auto;
}
/* 頁尾左側：公司 Logo（依語系）＋版權宣告 */
.foot-brand { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; }
.foot-logo { display: block; height: 26px; width: auto; }

/* ---------- 窄螢幕 ---------- */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { padding: 56px 28px 32px; }
  .hero-stage { height: 60vh; min-height: 380px; margin: 0 20px; border-radius: 20px; }
  .robot-grid { grid-template-columns: 1fr; gap: 56px; }
  .robot-view { max-width: 420px; }
  .twin { grid-template-columns: 1fr; }
  .slot-detail { grid-template-columns: 1fr; gap: 12px; }
  .day-bar { flex-direction: column; align-items: stretch; }
  .day-mode { align-self: flex-start; }
  .day-metrics { grid-template-columns: 1fr; }
  .logos { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .value, .robots, .day, .start, .platform, .twin, .trust { padding-left: 16px; padding-right: 16px; padding-top: 96px; }
  .hero-copy { padding: 40px 16px 24px; }
  .hero-stage { margin: 0 12px; }
  .hero-floor { font-size: 60px; left: 20px; }
  .hours span:nth-child(even) { display: none; }
  .day-tabs button { padding-right: 8px; margin-right: 4px; }
  .day-tabs button span { display: none; }
  .day-chart { grid-template-columns: 52px 1fr; gap: 0 8px; }
  .ba-row { grid-template-columns: 1fr; gap: 14px; }
  .logos { grid-template-columns: repeat(2, 1fr); }
  .final { padding: 88px 16px; margin-top: 96px; }
}

/* ---------- 實績影片：捲動放大；最終以原始 16:9 完整呈現（不裁切上下字卡），四周以暗場作為外框 ---------- */
.case { position: relative; height: 300vh; margin-top: 96px; }
.case-sticky {
  --dim: 0;
  --bar-h: 64px;
  /* 影片寬度：同時受螢幕寬與高限制，保證 16:9 完整放得下，下方保留控制列空間 */
  --vw: min(calc(100vw - 64px), calc((100vh - var(--head-h) - var(--bar-h) - 56px) * 16 / 9), 1760px);
  position: sticky; top: var(--head-h); height: calc(100vh - var(--head-h)); overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: color-mix(in srgb, #0B151C calc(var(--dim) * 100%), var(--paper));
}
.case-head { position: absolute; top: 9vh; left: 0; right: 0; text-align: center; padding: 0 24px; will-change: opacity, transform; }
.case-head h2 { margin: 0 0 12px; font-size: clamp(26px, 2.4vw, 34px); font-weight: 500; }
.case-head p { margin: 0 auto; max-width: 34em; font-size: 15px; line-height: 1.85; color: var(--ink-2); }
.case-frame {
  position: relative; flex: none; width: var(--vw); aspect-ratio: 16 / 9; overflow: hidden; background: #0E1A22;
  transform-origin: 50% 50%; will-change: transform; box-shadow: 0 30px 80px rgba(11,21,28,.22);
}
.case-media, .case-media video { width: 100%; height: 100%; }
.case-media video { display: block; object-fit: contain; background: #000; }
.placeholder.dark { border: 0; border-radius: 0; color: #9FB3C1; background: radial-gradient(70% 70% at 50% 50%, #1A2B36, #0E1A22); font-size: 18px; }
.placeholder.dark code { color: #D3E2EC; font-size: 15px; }
.case-bar {
  flex: none; width: var(--vw); height: var(--bar-h); display: flex; justify-content: space-between; align-items: center; gap: 16px;
  color: #E6EEF3; opacity: 0; transform: translateY(10px); transition: opacity .4s var(--ease), transform .4s var(--ease); pointer-events: none;
}
.case-bar.show { opacity: 1; transform: none; pointer-events: auto; }
.case-caption { font-size: 15px; font-weight: 500; }
.case-ctrl { display: flex; gap: 8px; }
.case-ctrl button { font-size: 13px; padding: 8px 14px; border-radius: 8px; color: #fff; background: rgba(255,255,255,.12); transition: background .2s; }
.case-ctrl button:hover { background: rgba(255,255,255,.24); }
@media (max-width: 760px) {
  .case { height: 220vh; }
  .case-sticky { --vw: calc(100vw - 24px); --bar-h: 96px; }
  .case-bar { flex-direction: column; align-items: flex-start; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .case { height: auto; }
  .case-sticky { position: relative; height: auto; padding: 48px 0; --dim: 1; }
  .case-head { display: none; }
  .case-bar { opacity: 1; transform: none; pointer-events: auto; }
}

/* ---------- 開場改為全版主視覺：3D 鋪滿整區，文字疊在左側漸層安全區上 ---------- */
.hero { position: relative; display: block; overflow: hidden; isolation: isolate; }
.hero-stage {
  position: absolute; inset: 0; z-index: 0; margin: 0; border-radius: 0;
  background: var(--paper); cursor: grab;
}
/* 安全區：左側背景色 100% → 0% 的漸層承載文字；底部再漸層融進下一段 */
.hero::before, .hero::after { content: ""; position: absolute; z-index: 1; pointer-events: none; transition: opacity .45s var(--ease); }
.hero::before {
  inset: 0 auto 0 0; width: min(62%, 980px);
  background: linear-gradient(90deg, var(--paper) 0%, var(--paper) 38%, color-mix(in srgb, var(--paper) 72%, transparent) 62%, color-mix(in srgb, var(--paper) 0%, transparent) 100%);
}
.hero::after { inset: auto 0 0 0; height: 22%; background: linear-gradient(0deg, var(--paper) 0%, color-mix(in srgb, var(--paper) 0%, transparent) 100%); }
.hero-copy {
  position: relative; z-index: 2; pointer-events: none;
  width: min(calc(max(28px, (100vw - 1160px) / 2 + 28px) + 600px), 56vw); min-height: calc(100vh - var(--head-h)); min-height: calc(100svh - var(--head-h)); box-sizing: border-box;
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.hero-copy a, .hero-copy button { pointer-events: auto; }
/* 拖曳 3D 時文字與漸層退場，放開後再回來 */
.hero.dragging::before { opacity: .12; }
.hero.dragging .hero-copy { opacity: .08; transform: translateX(-8px); }
@media (prefers-reduced-motion: reduce) { .hero::before, .hero-copy { transition: none; } }

@media (max-width: 1024px) {
  .hero { min-height: 0; }
  .hero-stage { height: auto; min-height: 0; margin: 0; border-radius: 0; }
  /* 窄螢幕：文字在上、模型在下，漸層改為由上往下 */
  .hero::before { inset: 0 0 auto 0; width: auto; height: 62%; background: linear-gradient(180deg, var(--paper) 0%, var(--paper) 46%, color-mix(in srgb, var(--paper) 0%, transparent) 100%); }
  .hero-copy { width: auto; min-height: 0; padding-bottom: 46vh; }
}

/* ---------- 可點擊元素區隔 ---------- */
.text-link { background-size: 100% 1px; background-image: linear-gradient(color-mix(in srgb, var(--brand-deep) 35%, transparent), color-mix(in srgb, var(--brand-deep) 35%, transparent)); }
.text-link:hover { background-image: linear-gradient(var(--brand-deep), var(--brand-deep)); }
.text-link::after { content: " ›"; }
.robot-card h3 a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .25s var(--ease), color .2s; }
.robot-card h3 a:hover { background-size: 100% 1px; }
.robot-card h3 a::after { content: " ›"; color: var(--muted); font-weight: 400; }
.day-tabs button { border-radius: 10px; transition: background .2s, color .2s; }
.day-tabs button:hover { background: color-mix(in srgb, var(--brand) 5%, transparent); }
.btn.ghost { background: rgba(255,255,255,.7); }

/* 底部 CTA：「預約現場評估」與「進入物流情境」一樣用深藍字（淺白底），在深藍背景上清楚可讀 */
.final .btn.ghost { color: var(--brand-deep); background: rgba(255,255,255,.86); box-shadow: none; }
.final .btn.ghost:hover { color: var(--brand-deep); background: #fff; box-shadow: none; }

/* ---------- 建議從哪裡開始 ---------- */
.start-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.start-card {
  display: flex; flex-direction: column; border-radius: 16px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); position: relative; overflow: hidden;
}
.start-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--c); z-index: 1; }
/* 卡片上方情境圖（4:3）；還沒有圖時顯示預留位置 */
.start-img { aspect-ratio: 4 / 3; background: color-mix(in srgb, var(--c) 7%, var(--stage)); }
.start-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.start-img p { height: 100%; margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--muted); text-align: center; }
.start-img svg { width: 30px; height: 30px; fill: none; stroke: color-mix(in srgb, var(--c) 60%, var(--muted)); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.start-img small { font: 400 11px var(--en); opacity: .8; }
.start-body { flex: 1; display: flex; flex-direction: column; gap: 14px; padding: 20px 22px 22px; }
/* 標題、第一步、為什麼先做都固定兩行：每行一個 span，不自動換行，四張卡片高度一致 */
.two span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.start-card h3 { margin: 0; font-size: 17px; font-weight: 500; line-height: 1.6; }
.start-card dl { margin: 0; display: grid; gap: 12px; }
.start-card dt { margin: 0 0 2px; font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: .02em; }
.start-card dd { margin: 0; font-size: 14px; line-height: 1.75; color: var(--ink-2); }
.start-card .text-link { margin-top: auto; padding-top: 6px; align-self: flex-start; }
.start-help {
  margin-top: 20px; padding: 22px 26px; border-radius: 16px; background: var(--wash);
  display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap;
}
.start-help p { margin: 0; font-size: 15px; line-height: 1.8; color: var(--ink-2); }
.start-help b { font-weight: 500; color: var(--ink); margin-right: .5em; }
.start-act { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; }

/* ---------- 平台：對照表＋四張重點卡 ---------- */
.platform .sec-head h2 { max-width: 22em; margin-bottom: 14px; text-wrap: balance; }
.vs-wrap { margin-bottom: 0; }
.vs { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; line-height: 1.7; }
.vs th, .vs td { padding: 15px 20px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.vs thead th { vertical-align: bottom; padding-top: 0; padding-bottom: 12px; font-size: 13px; font-weight: 500; color: var(--muted); }
.vs thead th.us { padding-top: 16px; color: var(--brand-deep); border-radius: 12px 12px 0 0; }
.vs tbody th { width: 18%; font-weight: 500; color: var(--ink); }
.vs td { width: 36%; color: var(--muted); }
.vs td.us { width: 46%; color: var(--ink); }
.vs .us { background: var(--wash); border-bottom-color: color-mix(in srgb, var(--brand-deep) 12%, var(--wash)); }
.vs tbody tr:last-child > * { border-bottom: 0; }
.vs tbody tr:last-child td.us { border-radius: 0 0 12px 12px; }
/* ORber 欄：每句前面一個綠色打勾 */
.vs-ok { display: flex; align-items: flex-start; gap: 10px; }
.ok-i { flex: none; width: 18px; height: 18px; margin-top: 2px; }
.ok-i circle { fill: var(--ok); }
.ok-i path { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 1024px) {
  .start-grid { grid-template-columns: repeat(2, 1fr); }
  .start-grid { gap: 16px; }
}
/* 手機：對照表改成每個比較項目一張小卡，上下堆疊 */
@media (max-width: 760px) {
  .vs, .vs tbody, .vs tr, .vs th, .vs td { display: block; width: auto; }
  .vs thead { display: none; }
  .vs tbody { display: grid; gap: 12px; }
  .vs tr { border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; background: var(--surface); }
  .vs tbody th { width: auto; padding: 14px 18px 4px; border: 0; }
  .vs td, .vs td.us { width: auto; padding: 8px 18px 12px; border: 0; }
  .vs td::before { content: attr(data-l); display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
  .vs td.us { padding-top: 10px; padding-bottom: 14px; border-radius: 0 !important; }
  .vs td.us::before { color: var(--brand-deep); }
}
@media (max-width: 640px) {
  .start-grid { grid-template-columns: 1fr; }
  .start-help { padding: 20px; }
}

/* 核心技術：標題＋技術夥伴 Logo，樣式與信任區一致 */
.tech { max-width: 1160px; margin: 0 auto; padding: 136px 28px 8px; }
.tech h2 { margin: 0 0 14px; font-size: clamp(26px, 2.4vw, 34px); font-weight: 500; line-height: 1.35; }
.tech-logos { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 16px; }
.tech-logos li { min-width: 260px; height: 96px; padding: 0 36px; display: grid; place-items: center; border-radius: 12px; background: var(--surface); }
.tech-logos img { height: 40px; width: auto; max-width: 100%; }
@media (max-width: 640px) {
  .tech { padding: 96px 16px 8px; }
  .tech-logos li { min-width: 0; width: 100%; }
}

/* 核心技術：NVIDIA Logo＋技術／標準名稱卡，五張等寬 */
.tech-logos { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tech-logos li { min-width: 0; padding: 0 20px; }
.tech-logos img { height: auto; width: 100%; max-width: 170px; }
.tech-name { display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; }
.tech-name small { font: 500 11.5px/1.2 var(--en); letter-spacing: .08em; color: var(--muted); }
.tech-name b { font: 500 21px/1.2 var(--en); color: var(--ink); white-space: nowrap; }
@media (max-width: 1024px) { .tech-logos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .tech-logos { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tech-logos li { width: auto; height: 84px; } }

/* 合作醫院：沒有 logo 時的文字卡 */
.logos .logo-name { padding: 0 16px; text-align: center; font-size: 16px; font-weight: 500; line-height: 1.5; color: var(--ink); }

/* 核心技術：每張卡都是「圖示＋名稱」同一種排法（NVIDIA 用官方橫式 Logo）；圖示同高、名稱同字級 */
.tech-logos li { height: 96px; }
.tech-logos li:first-child img { max-width: 150px; }
.tech-lock { display: flex !important; align-items: center; justify-content: center; gap: 10px; }
.tech-lock img { flex: none; width: auto !important; height: 34px !important; max-width: none !important; }
.tech-lock b { font: 600 19px/1.2 var(--en); letter-spacing: -.01em; color: var(--ink); white-space: nowrap; }
@media (max-width: 1180px) and (min-width: 1025px) { .tech-lock b { font-size: 17px; } .tech-lock { gap: 8px; } .tech-logos li { padding: 0 12px; } }

/* 核心技術：五個官方 Logo 放進同樣大小的框（等寬卡片、圖片框 80% × 52px，依比例縮放置中） */
.tech-logos li { height: 104px; padding: 0 12px; }
.tech-logos li img, .tech-logos li:first-child img { width: 80%; height: 52px; max-width: none; object-fit: contain; }
@media (max-width: 640px) { .tech-logos li { height: 88px; } .tech-logos li img { height: 44px; } }

/* 核心技術 Logo 大小：依長寬比換算成相同的視覺面積（約 5300px²），寬的 Logo 不會顯得比較小 */
.tech-logos li img, .tech-logos li:first-child img { width: auto; max-width: 92%; }
.tech-logos li:nth-child(1) img { height: 29px; }  /* nvidia */
.tech-logos li:nth-child(2) img { height: 38px; }  /* omniverse */
.tech-logos li:nth-child(3) img { height: 40px; }  /* isaac */
.tech-logos li:nth-child(4) img { height: 36px; }  /* fhir */
.tech-logos li:nth-child(5) img { height: 49px; }  /* hipaa */
@media (max-width: 640px) { .tech-logos li img { zoom: .82; } }

/* 核心技術：拿掉白色卡片，Logo（已去白底）直接放在頁面底色上 */
.tech-logos li { background: transparent; }

/* 合作醫院：三家官方 Logo，彩色顯示、等寬卡片；北市聯醫為院徽＋院名 */
.trust .logos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.trust .logos li { height: 104px; padding: 0 20px; }
.trust .logos img { filter: none; opacity: 1; max-width: 88%; max-height: 50px; width: auto; height: auto; }
.trust .logos .logo-lock { display: flex; align-items: center; justify-content: center; gap: 12px; }
.trust .logos .logo-lock img { height: 50px; max-width: none; }
.logo-lock span { display: flex; flex-direction: column; gap: 2px; }
.logo-lock b { font-size: 19px; font-weight: 700; letter-spacing: .06em; color: #005735; line-height: 1.25; white-space: nowrap; }
.logo-lock small { font-size: 14px; font-weight: 500; letter-spacing: .3em; color: #023886; }
@media (max-width: 760px) { .trust .logos { grid-template-columns: 1fr; } }

/* 合作醫院：灰色向量標誌＋院名（統一字級、灰色），三張卡片同一種排法 */
.trust .logos .logo-lock { gap: 14px; justify-content: flex-start; padding: 0 26px; }
.trust .logos .logo-lock img { height: 52px; width: auto; max-width: none; flex: none; }
.trust .logos .logo-lock.is-wide img { height: 44px; }
.logo-lock span { min-width: 0; }
.logo-lock b { font-size: 17px; font-weight: 700; letter-spacing: .04em; color: var(--ink-2); }
.logo-lock small { font-size: 12px; font-weight: 500; letter-spacing: .02em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 「模擬這個情境」的播放圖示（全站一致） */
.play-i { width: 1em; height: 1em; fill: currentColor; flex: none; }
.btn-play { display: inline-flex; align-items: center; gap: 7px; }

/* 建議從哪裡開始：整張卡片可點；懸停時浮起、圖片微放大、底部按鈕變實心 */
a.start-card { color: inherit; text-decoration: none; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.start-img { overflow: hidden; }
.start-img img { transition: transform .5s var(--ease); }
.start-go {
  margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 12px; border-radius: 99px; font-size: 14px; font-weight: 500;
  color: color-mix(in srgb, var(--c) 82%, black); background: color-mix(in srgb, var(--c) 10%, white);
  transition: background .25s var(--ease), color .25s var(--ease), gap .25s var(--ease);
}
.start-go .play-i { width: 13px; height: 13px; }
a.start-card:hover, a.start-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 40%, var(--line)), 0 16px 36px rgba(20,36,48,.12);
}
a.start-card:hover .start-img img, a.start-card:focus-visible .start-img img { transform: scale(1.04); }
a.start-card:hover .start-go, a.start-card:focus-visible .start-go { background: var(--c); color: #fff; gap: 10px; }
a.start-card:focus-visible { outline: 2px solid var(--c); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { a.start-card:hover { transform: none; } a.start-card:hover .start-img img { transform: none; } }

/* ============================================================
   手機版調整（860px 以下）
   ============================================================ */
/* 3D 畫布：上下滑動捲動頁面，左右拖曳才旋轉模型；手機上碰到主視覺時文字不淡出 */
@media (max-width: 860px) {
  .hero-stage canvas, .robot-view canvas { touch-action: pan-y !important; }
  .hero.dragging::before { opacity: 1; }
  .hero.dragging .hero-copy { opacity: 1; transform: none; }
}
/* 實績影片：手機不做捲動放大，改成「標題 → 滿寬 16:9 影片 → 控制列」的一般區塊 */
@media (max-width: 760px) {
  .case { height: auto; margin-top: 96px; padding: 0 16px; }
  .case-sticky { position: relative; top: auto; height: auto; overflow: visible; display: block; background: none !important; }
  .case-head { position: static; opacity: 1 !important; transform: none !important; padding: 0; margin-bottom: 24px; }
  .case-frame { width: 100%; transform: none !important; border-radius: 14px !important; box-shadow: 0 12px 32px rgba(11,21,28,.16); }
  .case-bar { width: 100%; height: auto; margin-top: 12px; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; color: var(--ink); opacity: 1; transform: none; pointer-events: auto; }
  .case-caption { font-size: 14px; }
  .case-ctrl button { color: var(--ink-2); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hit-line); }
  .case-ctrl button:hover { background: var(--surface); box-shadow: inset 0 0 0 1px var(--hit-hover); }
}
@media (max-width: 640px) {
  /* 機器人 3D 卡：高度略縮，少滑一些 */
  .robot-view { aspect-ratio: 4 / 3.4; }
  /* 導入後的一天：數據卡兩欄，最後一張單數時滿寬 */
  .day-metrics { grid-template-columns: 1fr 1fr; gap: 10px; }
  .d-m { padding: 16px; border-radius: 14px; }
  .d-m:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .d-m-label { flex-wrap: wrap; gap: 0 6px; font-size: 12.5px; }
  .d-m p { flex-wrap: wrap; gap: 4px; margin: 8px 0 10px; }
  .d-m p b { font-size: 30px; }
  .d-m p b.d-m-text { font-size: 18px; }
  .d-m p em { font-size: 12px; padding: 2px 6px; }
  /* 建議從哪裡開始：卡片改左右滑動，右側露出下一張提示可滑 */
  .start-grid { display: flex; gap: 12px; margin: 0 -16px; padding: 4px 16px 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; scrollbar-width: none; overscroll-behavior-x: contain; }
  .start-grid::-webkit-scrollbar { display: none; }
  .start-grid::after { content: ""; flex: 0 0 4px; }
  .start-card { flex: 0 0 84%; scroll-snap-align: start; }
  a.start-card:hover { transform: none; }
  .start-body { gap: 12px; padding: 18px 20px 20px; }
  /* 導入後的一天：分頁籤三等分，機器人名稱下方顯示方案名稱 */
  .day-bar { gap: 14px; }
  .day-tabs { gap: 0; }
  .day-tabs button { flex: 1 1 0; min-width: 0; margin: 0; padding: 10px 6px 12px 2px; column-gap: 7px; }
  .day-tabs button b { font-size: 18px; }
  .day-tabs button span { display: block; font-size: 12px; line-height: 1.35; }
}

/* 按鈕統一為圓角矩形（--btn-r 定義在 site.css） */
.btn, .start-go, .case-ctrl button, .day-tabs button { border-radius: var(--btn-r); }
.day-mode { border-radius: 10px; }
.day-mode::before { border-radius: 7px; }
