/* 臥遊 Talevoyage 總首頁
   數值照 DEMO/ 四版設計稿的行內樣式；760px 以下為手機版。 */

@font-face {
  font-family: "Talevoyage Serif";
  src: url("/assets/fonts/tv-serif-400.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Talevoyage Serif";
  src: url("/assets/fonts/tv-serif-500.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Talevoyage Serif";
  src: url("/assets/fonts/tv-serif-600.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #fcf7ef;
  --ink: #1c1c1c;
  --mute: #55574f;
  --line: #b9bcb0;
  --red: #a8351f;
  --blue: #1b5069; /* 緣起頁小標 */
  --serif: "Talevoyage Serif", "Noto Serif TC", serif;
  --display: "TV Cormorant", "Talevoyage Serif", Georgia, serif; /* 英文標題：Cormorant Garamond 子集；中文字退回思源宋體 */
  --text: "TV Noto Serif", "Talevoyage Serif", Georgia, serif; /* 英文內文：Noto Serif 子集；中文字退回思源宋體 */
  --gutter: 96px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.7;
  font-weight: 400;
}
body.en { font-family: var(--display); }
a { color: var(--ink); text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
img { display: block; }
.v { writing-mode: vertical-rl; margin: 0; font-weight: 400; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@font-face {
  font-family: "TV Cormorant";
  src: url("/assets/fonts/cormorant-500.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TV Cormorant";
  src: url("/assets/fonts/cormorant-600.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TV Cormorant";
  src: url("/assets/fonts/cormorant-500-italic.woff") format("woff");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "TV Noto Serif";
  src: url("/assets/fonts/noto-serif-400.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TV Noto Serif";
  src: url("/assets/fonts/noto-serif-400-italic.woff") format("woff");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ---------- 英文提示條（中文頁） ---------- */
.en-hint {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  background: var(--ink); color: var(--paper);
  font-family: var(--text); font-size: 14px; letter-spacing: .5px;
  padding: 0 8px 0 20px; min-height: 44px;
}
.en-hint[hidden] { display: none; }
.en-hint a { color: var(--paper); border-bottom: 1px solid currentColor; }
.en-hint button {
  margin-left: auto; width: 44px; height: 44px; border: 0; background: none;
  color: var(--paper); font: inherit; font-size: 22px; line-height: 1; cursor: pointer;
}
.en-hint p { margin: 0; margin-left: auto; }

/* ---------- 首屏 ---------- */
.hero { position: relative; height: 720px; }
.hero picture img {
  position: absolute; left: 0; bottom: 0; width: 100%; height: 720px;
  object-fit: cover; object-position: center bottom;
}
.site-header {
  position: absolute; left: var(--gutter); right: var(--gutter); top: 32px; z-index: 1;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 15px; letter-spacing: 2px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 44px; height: 44px; border-radius: 50%; mix-blend-mode: multiply; }
.brand span { font-size: 20px; }
.site-nav { display: flex; gap: 32px; }
.site-nav a { padding: 10px; }

.hero h1.v {
  position: absolute; left: 200px; top: 140px;
  font-size: 52px; letter-spacing: 16px; line-height: 1.9;
}

/* ---------- 西遊記 ---------- */
.works {
  display: flex; flex-direction: row; gap: 80px; align-items: center;
  padding: 160px var(--gutter);
}
.works figure { margin: 0; flex: 1.4; min-width: 0; }
.works figure img {
  width: 100%; height: 420px; object-fit: cover; mix-blend-mode: multiply;
}
.works-text {
  display: flex; flex-direction: row-reverse; gap: 28px;
  justify-content: flex-start; align-items: flex-start;
}
.works-text h2 { font-size: 64px; letter-spacing: 12px; }
.works-text p { font-size: 18px; letter-spacing: 6px; line-height: 2.4; height: 240px; }
.works-text .cta { align-self: flex-end; display: flex; flex-direction: column; gap: 12px; }
.btn-start {
  background: var(--red); color: #fff;
  padding: 18px 10px; font-size: 20px; letter-spacing: 8px; min-width: 24px;
}
.map-link-row { text-align: right; padding: 0 var(--gutter); }
.map-link {
  display: inline-block; padding: 12px 0; border-bottom: 1px solid var(--ink); letter-spacing: 4px;
}

/* ---------- 展卷中 ---------- */
.soon {
  margin: 140px var(--gutter) 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 24px 0 40px;
}
.soon-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 16px; }
.soon-label { font-size: 14px; letter-spacing: 6px; color: var(--mute); }
.soon-tools { display: flex; gap: 12px; align-items: center; }
.pager {
  display: flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; flex: 0 0 46px; padding: 0; /* 設計稿為 44px＋1px 框（content-box） */
  border: 1px solid var(--line); border-radius: 50%; background: none;
  color: var(--ink); cursor: pointer;
}
.pager svg { display: block; }
.pager[aria-disabled="true"] { cursor: default; }
.soon-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none;
}
.soon-track::-webkit-scrollbar { display: none; }
.soon-page { display: flex; flex: 0 0 100%; scroll-snap-align: start; }
.scroll-card {
  flex: 0 0 50%; scroll-snap-align: start;
  display: flex; flex-direction: row-reverse; justify-content: center; gap: 18px;
  height: 240px; border-left: 1px solid var(--line);
}
.scroll-card h3 { font-size: 36px; letter-spacing: 10px; }
.scroll-card p { font-size: 15px; letter-spacing: 5px; color: var(--mute); }
.scroll-card .tag { font-size: 13px; letter-spacing: 4px; color: var(--red); align-self: flex-end; }
.dots { display: flex; justify-content: center; gap: 10px; padding-top: 16px; }
.dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.dots span[aria-current="true"] { background: var(--ink); }

/* ---------- 觀影 ---------- */
.films { text-align: center; padding: 56px var(--gutter) 0; }
.films span { display: inline-block; padding: 12px; letter-spacing: 6px; }

/* ---------- 頁尾 ---------- */
.site-footer {
  display: flex; flex-direction: column; align-items: center; gap: 28px;
  padding: 160px var(--gutter) 64px;
}
.site-footer .motto { font-size: 34px; letter-spacing: 14px; height: 200px; }
.seal { width: 14px; height: 14px; background: var(--red); }
.site-footer .colophon {
  margin: 0; color: var(--mute); font-size: 14px; letter-spacing: 2px; text-align: center;
}
.colophon a {
  color: var(--mute);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
}
.colophon a:hover, .site-nav a:hover, .map-link:hover { color: var(--red); }

/* ====================== 英文頁 ====================== */
.en .site-header { letter-spacing: 1px; }
.en .brand span { font-size: 24px; font-weight: 600; letter-spacing: 1px; }
.en .hero h1 {
  position: absolute; margin: 0; font-weight: 500;
  left: 96px; top: 150px; font-size: 76px; line-height: 1.08; width: 560px;
}
.en .lede {
  position: absolute; margin: 0; font-family: var(--text); color: var(--mute);
  left: 100px; top: 370px; font-size: 17px; width: 380px; line-height: 1.8;
}
.en .works { gap: 72px; padding: 150px var(--gutter); }
.en .works-text { flex: 1; flex-direction: column; gap: 16px; align-items: flex-start; }
.en .works-text h2 { margin: 0; font-weight: 500; font-size: 60px; line-height: 1.1; letter-spacing: 0; }
.en .works-text p {
  margin: 0; font-family: var(--text); font-size: 17px; line-height: 1.9;
  letter-spacing: 0; height: auto;
}
.en .actions { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; margin-top: 8px; }
.en .btn-start {
  padding: 13px 30px; font-family: var(--text); font-size: 16px; letter-spacing: 1px; min-width: 0;
}
.en .map-link {
  padding: 12px 0; font-family: var(--text); font-size: 15px; letter-spacing: 0;
}
.en .soon { margin-top: 40px; padding-bottom: 36px; }
.en .soon-label {
  font-family: var(--text); font-size: 13px; letter-spacing: 3px; text-transform: uppercase;
}
.en .scroll-card {
  display: block; padding: 8px 32px; min-height: 190px; height: auto;
  container-type: inline-size;
}
.en .scroll-card .tag {
  display: block; font-family: var(--text); font-size: 12px; letter-spacing: 3px; text-transform: uppercase;
}
/* 標題最多兩行（Sean 2026-12-03）：字級＝min(設計稿字級, 卡片內寬 × 9.4%)。
   9.4% 由最長標題「Strange Tales from a / Chinese Studio (Liaozhai)」較長那行約 10.2 em 算出，tests 會用字型實寬驗算。 */
.en .scroll-card h3 {
  margin: 10px 0 8px; font-weight: 500; font-size: 38px; font-size: min(38px, 9.4cqi); /* 前者為不支援 cqi 的舊瀏覽器後備 */ line-height: 1.15; letter-spacing: 0;
  text-wrap: balance;
}
.en .scroll-card p { margin: 0; font-family: var(--text); font-size: 14px; line-height: 1.8; letter-spacing: 0; }
.en .films { padding-top: 48px; }
.en .films span { letter-spacing: 2px; font-family: var(--text); font-size: 15px; }
.en .site-footer { gap: 24px; padding: 130px var(--gutter) 56px; text-align: center; }
.en .site-footer .motto { margin: 0; font-size: 40px; font-style: italic; font-weight: 500; letter-spacing: 0; height: auto; }
.en .site-footer .colophon {
  max-width: 560px; font-family: var(--text); line-height: 1.9; letter-spacing: 0;
}

/* ====================== 子頁（緣起、參考文獻） ====================== */
.sub .site-header { position: static; padding: 32px var(--gutter) 0; }
.sub main { min-height: 50vh; padding: 120px var(--gutter) 80px; text-align: center; }
.sub main h1 { margin: 0 0 24px; font-weight: 400; font-size: 40px; letter-spacing: 12px; }
.sub.en main h1 { font-weight: 500; letter-spacing: 0; }
.sub main p { margin: 0; color: var(--mute); font-size: 15px; letter-spacing: 2px; }
.sub .site-footer { padding-top: 80px; }

/* ====================== 緣起頁（設計稿：DEMO/緣起・電腦.pdf、Origin・Desktop.pdf） ======================
   設計稿是整頁圖；數值由圖量出（中文稿版面寬 1400、英文稿 1280，內文欄寬都是 640 置中）。 */
.banner { position: relative; height: 300px; overflow: hidden; }
.banner > img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  object-position: 50% 40%;
  /* 設計稿：圖以頁寬縮放、上緣切掉 131px（太陽只露下半）；窄螢幕不讓圖底露白 */
  object-position: 50% min(0px, max(-131px, calc(300px - 49.45vw)));
}
.essay { max-width: 640px; margin: 0 auto; padding: 93px 0 0; }
.essay h1 {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin: 0 0 128px; font-size: 52px; font-weight: 400; line-height: 1.2; letter-spacing: 14px;
}
.essay h1 .seal { flex: none; }
.essay h2 { margin: 0 0 23.5px; color: var(--blue); font-size: 24px; font-weight: 600; line-height: 1.4; letter-spacing: 6px; }
.essay section + section { margin-top: 67.5px; }
.essay p { margin: 0 0 19px; font-size: 19px; line-height: 2.26; letter-spacing: 1px; }
.essay blockquote {
  margin: 36px 0; padding: 28.5px 0 28.5px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center;
}
.essay blockquote p { margin: 0; font-size: 26px; line-height: 1.78; letter-spacing: 4px; }
/* 參考文獻頁：沿用緣起頁版面；條目清單＋各卷「完整參考資料」先不能點 */
.ref-list { margin: 0; padding: 0 0 0 1.2em; }
.ref-list li { margin: 0 0 12px; font-size: 17px; line-height: 2; letter-spacing: 1px; }
.ref-list li::marker { color: var(--red); }
.ref-list a { color: var(--mute); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.ref-list a:hover { color: var(--red); }
.ref-link { color: var(--mute); opacity: 0.7; cursor: default; }
/* 各卷：書名一欄、「— 完整參考資料 →」一欄，起點對齊最長書名（Sean 2026-12-04）。
   li 改成 grid 會失去清單圓點，改用 ::before 畫紅點。 */
.scroll-refs { display: grid; grid-template-columns: max-content 1fr; column-gap: 0.8em; padding-left: 0; list-style: none; }
.scroll-ref { position: relative; display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; padding-left: 1.2em; }
.scroll-ref::before {
  content: ""; position: absolute; left: 0.3em; top: calc(1em - 2.5px);
  width: 5px; height: 5px; border-radius: 50%; background: var(--red);
}
.en .ref-list li { font-family: var(--text); line-height: 1.9; letter-spacing: 0; }
/* 文末署名（Sean 2026-12-04）：靠右，名字＋email */
.essay .signature { margin: 56px 0 0; text-align: right; font-size: 17px; line-height: 2; letter-spacing: 1px; }
.essay .signature a {
  color: var(--mute); font-size: 15px; letter-spacing: 0.5px;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
}
.essay .signature a:hover { color: var(--red); }
.origin .site-footer { gap: 0; padding: 77px var(--gutter) 80px; }
.back {
  margin-top: 32.5px; padding: 0 14px 12px; border-bottom: 1px solid var(--ink);
  font-size: 16px; letter-spacing: 5px;
}
.back:hover { color: var(--red); border-color: var(--red); }

/* 英文緣起：內文 Noto Serif 18px、小標 Cormorant 32px、引文 Cormorant 斜體 28px */
.en .essay h1 { margin-bottom: 130.5px; font-family: var(--display); font-size: 52px; font-weight: 500; letter-spacing: 0; }
.en .essay h2 { margin-bottom: 24px; font-family: var(--display); font-size: 32px; font-weight: 500; letter-spacing: 0; }
.en .essay .signature { font-family: var(--text); font-size: 17px; line-height: 2; }
.en .essay p { margin-bottom: 20px; font-family: var(--text); font-size: 18px; line-height: 1.95; letter-spacing: 0; }
.en .essay blockquote { padding-bottom: 8px; }
.en .essay section + section { margin-top: 69px; }
.en .essay blockquote p { font-family: var(--display); font-size: 28px; font-style: italic; font-weight: 500; line-height: 1.8; letter-spacing: 0; }
.en.origin .site-footer .motto { margin: 20.5px 0 0; font-family: var(--text); font-size: 26px; font-style: italic; font-weight: 400; }
.en .back { margin-top: 52px; padding: 0 12px 12px; font-family: var(--text); font-size: 16px; letter-spacing: 1px; }

/* ====================== 手機版 ====================== */
@media (max-width: 760px) {
  :root { --gutter: 24px; }
  .site-header { top: 20px; }
  .site-nav { gap: 8px; }
  .site-nav .wide { display: none; }

  .hero { height: 700px; }
  .hero picture img { height: 700px; }
  .hero h1.v { left: auto; right: 40px; top: 100px; font-size: 34px; letter-spacing: 10px; }

  .works { flex-direction: column; gap: 32px; padding: 80px var(--gutter); align-items: stretch; }
  .works figure img { height: 230px; }
  .works-text { gap: 20px; justify-content: center; }
  .works-text h2 { font-size: 48px; }
  .map-link-row { text-align: center; }

  .soon { margin-top: 80px; }
  .scroll-card h3 { font-size: 30px; letter-spacing: 6px; }

  .site-footer { padding-top: 96px; }
  .site-footer .motto { font-size: 28px; }

  /* 英文手機 */
  .en .hero { height: 820px; }
  .en .hero picture img { height: auto; object-fit: initial; }
  .en .hero h1 { left: 24px; right: 24px; top: 110px; width: auto; font-size: 46px; line-height: 1.1; }
  .en .lede { left: 24px; right: 24px; top: 250px; width: auto; font-size: 15px; }
  .en .works { gap: 32px; padding: 80px var(--gutter); }
  .en .works-text h2 { font-size: 44px; }
  .en .soon { margin-top: 20px; }
  .en .scroll-card { padding: 8px 16px; }
  .en .scroll-card h3 { font-size: 28px; font-size: min(28px, 9.4cqi); }
  /* 手機英文卡片改單欄（Sean 2026-12-03 選定）：並排時卡片太窄，長標題會縮到 13px */
  .en .soon-page { flex-direction: column; gap: 20px; }
  .en .scroll-card { flex: 0 0 auto; min-height: 0; padding-bottom: 12px; }
  .en .site-footer { padding-top: 80px; }
  .en .site-footer .motto { font-size: 30px; }

  .sub main { padding-top: 80px; }

  /* 緣起手機版（設計稿只有電腦版；依電腦版比例縮） */
  .banner { height: 200px; }
  /* 圖放大到 160% 靠左：太陽落在品牌字與語言鈕之間，不壓字 */
  .banner > img { inset: auto; left: 0; top: -40px; width: 160%; height: auto; object-fit: initial; }
  .essay { padding: 64px var(--gutter) 0; }
  .essay h1 { margin-bottom: 72px; font-size: 38px; letter-spacing: 14px; }
  .essay h2 { margin-bottom: 18px; font-size: 21px; letter-spacing: 5px; }
  .essay section + section { margin-top: 56px; }
  .essay p { font-size: 16px; line-height: 2.2; letter-spacing: 1px; }
  .essay blockquote { padding: 20px 0 18px; }
  .essay blockquote p { font-size: 19px; letter-spacing: 3px; }
  .origin .site-footer { padding-top: 72px; padding-bottom: 64px; }
  .en .essay h1 { font-size: 46px; letter-spacing: 0; }
  .en .essay h2 { font-size: 28px; letter-spacing: 0; }
  .en .essay p { font-size: 16px; line-height: 1.9; letter-spacing: 0; }
  .en .essay blockquote p { font-size: 23px; letter-spacing: 0; }
  .en.origin .site-footer .motto { font-size: 22px; }
  .ref-list li { font-size: 15px; letter-spacing: 0.5px; }
  /* 手機英文書名太長：書名與「Full references →」分兩行 */
  .en .scroll-refs { display: block; }
  .en .scroll-ref { display: block; }
  .en .scroll-ref .ref-more { display: block; }
  .en .ref-list li { letter-spacing: 0; }
}
