/* 影程 landing 原型（2026-09-29 第三版）：v6 的引導（第一屏、捲動提示、五步主線、收尾）＋ MAP 的功能地圖。
   一章一座舞台：釘住一個畫面，左邊清單＋第幾項，捲一段換下一項。
   顏色取自設計 token（keyframes.prim）；字型沿用 legal.css 的系統字（正式站 CSP 不允許外部樣式表）。 */
:root {
  --void: #05060b; --ground: #0c0d14; --ground2: #08090e;
  --panel: #141826; --panel2: #1a1f30; --panel3: #232842;
  --hair: #2b3048; --line2: #3a4258;
  --ink: #f5f2e9; --dim: #b4b8d0; --faint: #898eb2;
  --amber: #f6b24a; --red: #ff5d63; --green: #5fd99c; --near-black: #0a0b12;
  --font: -apple-system, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --top: 57px; --rail: 44px;
  /* 動效 token：同 docs/設計/tokens.json 的 motion.*（2026-09-29 對齊，稽核 C11） */
  --m-fast: 120ms; --m-base: 200ms; --m-cv: cubic-bezier(.2, .7, .3, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top) + var(--rail)); scroll-snap-type: y proximity; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--font); line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--amber); text-decoration: none; }
em { font-style: normal; color: var(--amber); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

/* ── top bar ── */
.top { position: fixed; inset: 0 0 auto 0; z-index: 10; height: var(--top); display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 48px); background: color-mix(in srgb, var(--void) 78%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--hair); }
.brand { display: flex; align-items: baseline; gap: 8px; color: var(--ink); }
.brand b { font-size: 20px; font-weight: 900; }
.brand span { font-size: 12px; font-weight: 800; letter-spacing: .14em; color: var(--amber); }
.top nav { display: flex; align-items: center; gap: clamp(10px, 2vw, 24px); font-size: 14px; }
.top nav a { color: var(--dim); }
.cta { display: inline-block; background: var(--amber); color: var(--near-black) !important; font: 800 14px/1.6 var(--font); padding: 7px 16px;
  border: 0; border-radius: 2px; cursor: pointer; }
/* 按下的瞬間就有回饋（稽核 C6）：:active 不加轉場，放開才用 fast 淡回 */
.cta, .gbtn { transition: background-color var(--m-fast) var(--m-cv), filter var(--m-fast) var(--m-cv); }
.cta:active { filter: brightness(.88); transition: none; }
.gbtn:active { background: #e3e3e3; transition: none; }
/* 登入處理中：擋住重複點擊（login.js 加 .busy） */
.busy { opacity: .6; cursor: progress; pointer-events: none; }

/* Google 登入（landing v6 的 GoogleSignInButton：白底、四色 G、使用 Google 登入） */
.gbtn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; background: #fff; color: #1f1f1f;
  font: 600 15px/1 var(--font); height: 44px; padding: 0 22px; border-radius: 4px; border: 1px solid #dadce0; cursor: pointer; }
.login-msg { margin: 10px 0 0; padding: 10px 14px; max-width: 460px; border-left: 3px solid var(--amber); background: var(--panel2);
  color: var(--ink); font-size: 14px; text-align: left; }
.end .login-msg { margin: 10px auto 0; }
.gbtn .g { width: 20px; height: 20px; }
.gbtn.big { height: 52px; min-width: 280px; font-size: 17px; margin-top: 8px; }
@media (hover: hover) { .gbtn:hover { background: #f2f2f2; } }

/* ── first screen (v6): eyebrow, the line, sign in, the week ── */
.intro { position: relative; min-height: 100vh; display: grid; grid-template-columns: 6fr 7fr; gap: clamp(24px, 4vw, 64px);
  align-items: center; max-width: 1320px; margin: 0 auto; padding: 96px clamp(16px, 4vw, 48px) 96px; }
.eyebrow-slate { display: inline-block; margin: 0 0 18px; font-size: 12px; font-weight: 800; letter-spacing: .24em; color: var(--dim);
  padding-left: 30px; background: repeating-linear-gradient(120deg, var(--line2) 0 3px, transparent 3px 7px) left center / 24px 12px no-repeat; }
.intro h1 { margin: 0; font-size: clamp(34px, 4.1vw, 68px); line-height: 1.2; font-weight: 900; }
.intro h1 span, .intro h1 em { display: block; white-space: nowrap; }
.intro-copy > p:not(.eyebrow-slate):not(.fine-print) { font-size: clamp(16px, 1.4vw, 19px); color: var(--dim); margin: 20px 0 24px; max-width: 560px; }
.fine-print { margin: 12px 0 0; font-size: 13px; color: var(--faint); }
.intro-pic { width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line2); box-shadow: 0 30px 80px #000a; }
.scroll-hint { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center;
  gap: 8px; color: var(--faint); font-size: 13px; letter-spacing: .12em; }
.scroll-hint i { position: relative; width: 1px; height: 44px; background: var(--hair); overflow: hidden; }
.scroll-hint i::after { content: ""; position: absolute; left: 0; top: 0; width: 1px; height: 14px; background: var(--amber);
  transform: translateY(-14px); animation: drip 1.8s ease-in-out infinite; }
@keyframes drip { to { transform: translateY(44px); } }   /* 動 transform，不動 top（稽核 C9） */

/* ── the wall, scrubbed ── */
.hero { height: 240vh; position: relative; }
.hero .stage { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.hero video { position: absolute; top: var(--top); left: 0; width: 100%; height: calc(100% - var(--top) - 22vh); object-fit: contain;
  object-position: center top; }
.cap { position: absolute; left: 0; right: 0; bottom: 6vh; margin: 0; text-align: center; font-weight: 800;
  font-size: clamp(24px, 3.4vw, 48px); line-height: 1.35; padding: 0 16px; text-shadow: 0 2px 18px #000c;
  opacity: 0; transform: translateY(16px); transition: opacity var(--m-base) var(--m-cv), transform var(--m-base) var(--m-cv); }
.cap em { display: block; }
.cap.on { opacity: 1; transform: none; }

/* ── the rail ── */
.rail { position: sticky; top: var(--top); z-index: 6; height: var(--rail); background: color-mix(in srgb, var(--ground) 90%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--hair); }
.rail ol { list-style: none; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); max-width: 1320px; height: 100%; display: flex; gap: 4px;
  overflow-x: auto; scrollbar-width: none; }
.rail ol::-webkit-scrollbar { display: none; }
.rail li.sep { width: 1px; background: var(--hair); margin: 10px 8px; flex: none; }
.rail a { display: block; padding: 11px 12px 9px; color: var(--faint); font-size: 14px; font-weight: 700; white-space: nowrap;
  border-bottom: 2px solid transparent; }
.rail a i, .chap i { font-style: normal; font-size: 11px; color: var(--amber); margin-left: 4px; }
.rail a.on { color: var(--ink); border-bottom-color: var(--amber); }

/* ── stages: the walkthrough and every chapter ──
   The section is as tall as its stops; the stage inside is pinned; one picture, the list tells you where you are. */
.stage-sec { --per: 70vh; --pad: 60vh; position: relative; height: calc(var(--stops) * var(--per) + var(--pad)); max-width: 1320px;
  margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }
.stage-sec.walk { --per: 80vh; }
/* one snap point per stop (the middle of its stretch), never skipped by a fling: the stage advances one item per swipe */
.snaps { position: absolute; inset: 0; pointer-events: none; }
.snaps i { position: absolute; left: 0; width: 1px; height: 1px; scroll-snap-align: start; scroll-snap-stop: always;
  top: calc(var(--k) * (var(--stops) * var(--per) + var(--pad) - 100vh) + var(--top) + var(--rail)); }
.stage-sec > .stage { position: sticky; top: calc(var(--top) + var(--rail)); height: calc(100vh - var(--top) - var(--rail));
  display: grid; grid-template-columns: minmax(300px, 5fr) 8fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.list { align-self: center; }
.list ol { list-style: none; margin: 0; padding: 0; }
.kicker { margin: 0; color: var(--dim); font-size: 16px; }
.walk-title { margin: 6px 0 22px; font-size: clamp(26px, 2.6vw, 38px); font-weight: 900; line-height: 1.3; }
.chap { display: flex; align-items: baseline; gap: 6px; margin: 0 0 14px; font-size: 15px; letter-spacing: .2em; color: var(--dim); font-weight: 700; }
.chap small { margin-left: auto; letter-spacing: 0; color: var(--faint); font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.chap small b { color: var(--amber); }
.grp { margin: 14px 0 4px; font-size: 12px; letter-spacing: .24em; color: var(--faint); }
.stop { position: relative; padding: 10px 0 10px 18px; border-left: 2px solid var(--hair); cursor: pointer; }
.stop h3 { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; color: var(--faint);
  transition: color var(--m-fast) var(--m-cv); }   /* 不再轉場 font-size（版面屬性，清單會上下漂，稽核 C5） */
.stop .pos { position: absolute; left: -50px; top: 12px; margin: 0; font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; }
.walk .stop { margin-left: 50px; }
.stop .detail { display: grid; grid-template-rows: 0fr; }   /* 展開瞬間完成，內文再淡入；不轉場 grid-template-rows（稽核 C5） */
.stop .detail > .inner { overflow: hidden; min-height: 0; opacity: 0; }
.stop.on .detail > .inner { opacity: 1; transition: opacity var(--m-base) var(--m-cv); }
.stop:focus-visible { outline-offset: 2px; }
.stop.on { border-left-color: var(--amber); }
.stop.on h3 { color: var(--ink); font-size: clamp(26px, 2.4vw, 36px); }
.stop.on .pos { color: var(--amber); }
.stop.on .detail { grid-template-rows: 1fr; }
.eyebrow { margin: 6px 0 0; color: var(--amber); font-size: 15px; font-weight: 700; }
.line { margin: 8px 0 0; font-size: clamp(16px, 1.35vw, 19px); color: #dad6cc; font-weight: 600; }
.note { margin: 8px 0 0; color: var(--amber); font-size: 13px; }
.pro { font-size: 13px; font-weight: 800; color: var(--amber); border: 1.5px solid var(--amber); border-radius: 999px; padding: 0 9px; line-height: 1.6; }
.walked a { display: flex; align-items: baseline; gap: 10px; padding: 7px 0 7px 18px; border-left: 2px dotted var(--hair); color: var(--faint); font-size: 15px; }
.walked b { font-weight: 700; }
.walked em { color: var(--faint); font-size: 12px; }
@media (hover: hover) { .walked a:hover em { color: var(--amber); } }

.media { margin: 0; align-self: center; }
.frame { position: relative; border: 1px solid var(--line2); border-radius: 14px; overflow: hidden; background: var(--panel);
  box-shadow: 0 30px 80px #000a; aspect-ratio: 16 / 10; }
.frame video { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity var(--m-base) var(--m-cv); }
.frame.swap video { opacity: .15; }
.bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #ffffff14; }
.bar i { display: block; height: 100%; width: 100%; background: var(--amber); transform: scaleX(0); transform-origin: left;
  transition: transform .25s linear; }   /* 用 scaleX、不改 width（稽核 C10）；.25s 補 timeupdate 之間的空檔 */
figcaption { margin-top: 10px; min-height: 1.5em; text-align: right; font-size: 12px; color: var(--faint); }
/* 減少動態的靜態版：每一項自己的來源註記（landing.js 從 data-foot 帶出，稽核 C2） */
.still-foot { margin: 6px 0 0; font-size: 12px; color: var(--faint); }

.lede { max-width: 900px; margin: 0 auto; padding: 14vh clamp(16px, 4vw, 48px) 4vh; text-align: center; }
.lede p { font-size: clamp(24px, 3vw, 40px); font-weight: 800; margin: 0; }
.sub { color: var(--faint); font-size: 15px !important; font-weight: 500 !important; margin-top: 14px !important; }
main { display: block; }

/* ── one more thing ── */
.more { height: 170vh; position: relative; background: #05060b; }
.more .stage { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 0 16px; }
.omt { margin: 0; font-size: clamp(36px, 5vw, 72px); font-weight: 700; letter-spacing: -.01em; }
.badge { margin: 28px 0 0; font-size: clamp(48px, 7vw, 104px); font-weight: 900; color: var(--amber); border: 4px solid var(--amber);
  border-radius: 999px; padding: 0 .45em; line-height: 1.3; opacity: 0; transform: scale(.6); box-shadow: 0 0 60px #f6b24a55; }
.omt-sub { margin: 28px 0 0; color: var(--dim); font-size: 18px; opacity: 0; }
.omt-sub a { margin-left: 8px; }

/* ── film, end ── */
.film, .end { max-width: 1200px; margin: 0 auto; padding: 14vh clamp(16px, 4vw, 48px) 4vh; text-align: center; }
.film h2, .end h2 { font-size: clamp(32px, 4.6vw, 64px); font-weight: 900; margin: 0 0 8px; line-height: 1.25; }
.film video { width: 100%; margin-top: 28px; border-radius: 14px; border: 1px solid var(--line2); background: #000; }
.end h2 em { display: block; }
.end .gbtn { margin: 18px 0 6px; }
footer { border-top: 1px solid var(--hair); margin-top: 10vh; padding: 28px clamp(16px, 4vw, 48px) 40px; color: var(--faint); font-size: 14px;
  text-align: center; }
footer nav a { color: var(--dim); }
footer .fine { font-size: 12px; }

/* ── controls on the pinned picture ── */
.toggle { position: absolute; right: 10px; bottom: 12px; z-index: 2; background: #000b; color: var(--ink); border: 1px solid var(--line2);
  border-radius: 999px; font: 600 13px/1 var(--font); padding: 7px 12px; cursor: pointer; opacity: 0; transition: opacity var(--m-fast) var(--m-cv); }
.toggle:focus-visible, .frame.paused .toggle { opacity: 1; }
@media (hover: hover) { .frame:hover .toggle { opacity: 1; } }
/* 觸控裝置沒有 hover：暫停鈕一直在，點擊區至少 44px（稽核 C1，WCAG 2.2.2） */
@media (hover: none) { .toggle { opacity: 1; min-height: 44px; padding: 0 16px; right: 8px; bottom: 10px; } }
.play { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: transparent; border: 0; cursor: pointer; }
.play::after { content: "▶ 播放"; background: #000b; color: var(--ink); padding: 10px 18px; border-radius: 999px; font-size: 15px;
  border: 1px solid var(--line2); }
.frame.needs-tap .play { display: flex; }
.frame.needs-tap .toggle { display: none; }

/* ── phones: the picture on top, only the current item below it, a count ── */
@media (max-width: 760px) {
  :root { --top: 53px; }
  .top nav a:not(.cta):not([href="/pricing.html"]) { display: none; }
  .intro { grid-template-columns: 1fr; min-height: 0; padding-top: 84px; padding-bottom: 110px; }
  .intro .gbtn.big { width: 100%; min-width: 0; }
  .hero video { height: 62vh; top: 84px; object-fit: cover; object-position: center; }
  .cap { bottom: 10vh; }
  .stage-sec { --per: 70vh; --pad: 50vh; }
  .stage-sec.walk { --per: 80vh; }
  .stage-sec > .stage { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-items: start; gap: 12px; padding-top: 10px; }
  .media { order: -1; }
  .frame { aspect-ratio: 1 / 1; max-height: 46vh; margin: 0 auto; }
  figcaption { margin-top: 6px; min-height: 0; text-align: left; font-size: 11px; }   /* 手機也看得到來源註記（稽核 C2） */
  figcaption:empty { display: none; }
  .list { align-self: start; }
  .kicker, .walk-title { display: none; }
  .chap { margin-bottom: 6px; }
  .stop, .walked, .grp { display: none; }
  .stop.on { display: block; border-left: 0; padding-left: 0; }
  .walk .stop { margin-left: 0; }
  .stop.on .pos { position: static; display: inline; margin-right: 8px; }
  .stop.on h3 { display: inline-flex; font-size: 24px; }
}

/* ── 減少動態／省流量：不釘住、不自動播放、不刷格；每一項各一張封面圖，按了才播 ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-hint i::after { animation: none; transform: translateY(15px); }
  .hero { height: auto; padding-top: 12px; }
  .hero .stage { position: static; height: auto; }
  .hero video { position: static; display: block; width: 100%; height: auto; max-height: 70vh; margin-top: var(--top); }   /* 只顯示封面圖、不載影片（稽核 C3） */
  .cap { position: static; opacity: 1; transform: none; padding: 12px 16px 0; }
  html { scroll-snap-type: none; }
  .snaps { display: none; }
  .stage-sec, .stage-sec.walk { height: auto; padding-top: 6vh; padding-bottom: 6vh; }
  .stage-sec > .stage { position: static; height: auto; display: block; }
  .stage-sec .media { display: none; }
  .stop, .walked, .grp { display: block !important; }
  .stop { cursor: default; border-left-color: var(--amber); margin-bottom: 18px; }
  .stop h3 { color: var(--ink); font-size: 26px; }
  .stop .detail { grid-template-rows: 1fr; }
  .stop .detail > .inner { opacity: 1; }
  .stop .still { position: relative; margin: 12px 0 0; border: 1px solid var(--line2); border-radius: 12px; overflow: hidden; max-width: 860px; }
  .stop .still img, .stop .still video { display: block; width: 100%; height: auto; }
  .stop .still .play { display: flex; }
  .more { height: auto; padding: 18vh 0; }
  .more .stage { position: static; height: auto; }
  .badge, .omt-sub { opacity: 1; transform: none; }
}

.walk-title span { display: block; white-space: nowrap; }

/* 降低透明度（稽核 C14）：頂列與章節列改實色 */
@media (prefers-reduced-transparency: reduce) {
  .top { background: var(--void); backdrop-filter: none; }
  .rail { background: var(--ground); backdrop-filter: none; }
}
