/* stejoy.com：紙與墨。墨與朱照遊戲的起始頁；紙比遊戲白一點、少一點黃（使用者定） */
:root { --paper: #f4eee2; --paper-2: #ebe4d4; --ink: #1c1a17; --ink-2: #4a4238; --dim: #7d725f; --red: #b4392a; --line: rgba(28, 26, 23, .16);
  --zh: "LXGW WenKai TC", "Noto Serif TC", "Songti TC", serif; --sc: "Noto Serif SC", "Songti SC", serif; --en: Georgia, "Times New Roman", "LXGW WenKai TC", serif; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 18px/1.85 var(--zh); -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse at 50% 0%, #f9f6ee 0%, var(--paper) 45%, #ede6d6 100%); }   /* 紙的明暗：用固定的底層，手機上 background-attachment: fixed 不管用 */
body.lang-zh-Hans { font-family: var(--sc); }
body.lang-en { font-family: var(--en); font-size: 18px; line-height: 1.7; }
a { color: var(--red); text-underline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 頂欄 */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 24px; padding: 10px max(16px, calc(50vw - 560px));
  background: rgba(244, 238, 226, .86); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.studio { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font: 600 19px/1 var(--en); letter-spacing: .06em; }
body.lang-zh-Hant .studio { font: 400 23px/1 var(--zh); letter-spacing: .16em; }   /* 中文頁寫「長風」：繁中用霞鶩文楷 */
body.lang-zh-Hans .studio { font: 400 22px/1 var(--sc); letter-spacing: .16em; }   /* 简中用思源宋体 */
.sections { display: flex; gap: 20px; margin-left: auto; }
.sections a, .langs a { color: var(--ink-2); text-decoration: none; font-size: 15px; }
.sections a:hover, .langs a:hover { color: var(--red); }
.langs { display: flex; gap: 2px; border: 1px solid var(--line); border-radius: 6px; padding: 2px; }
.langs a { padding: 2px 9px; border-radius: 4px; font-family: var(--zh); }
.langs a[aria-current] { background: var(--ink); color: var(--paper); }

main > section { max-width: 1080px; margin: 0 auto; padding: 72px 16px 24px; }
h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 22px; font-size: 30px; font-weight: 400; letter-spacing: .12em; }
h2::before { content: ""; width: 14px; height: 14px; background: var(--red); border-radius: 2px; flex: none; }
body.lang-en h2 { letter-spacing: .02em; }
.lead, .note { color: var(--ink-2); margin: -8px 0 26px; }
.note { font-size: 14px; margin: 12px 0 0; color: var(--dim); }

/* 開頭：字標一筆一筆寫出水（跟遊戲起始頁同一段動畫） */
.hero { text-align: center; padding-top: 64px !important; }
.kicker { margin: 0 0 18px; color: var(--ink-2); letter-spacing: .3em; font-size: 16px; }
body.lang-en .kicker { letter-spacing: .12em; }
.hero h1 { margin: 0; }
#title-logo { display: block; width: min(820px, 92vw); height: auto; margin: 0 auto; }
.tagline { margin: 20px 0 30px; font-size: 22px; letter-spacing: .32em; }
body.lang-en .tagline { letter-spacing: .04em; font-style: italic; }
.cta { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.btn, .badge { display: inline-flex; align-items: center; min-height: 46px; padding: 0 22px; border-radius: 6px; font-size: 17px; text-decoration: none; }
.btn { border: 1px solid var(--ink); color: var(--ink); background: transparent; }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.primary { background: var(--ink); color: var(--paper); border: 1px solid var(--ink); }
.badge { color: var(--ink-2); border: 1px dashed rgba(28, 26, 23, .45); cursor: default; }   /* 還沒有商店頁：是一句話，不是按鈕 */
.lang-note { margin: 22px auto 0; max-width: 560px; font-size: 15px; color: var(--ink-2); border: 1px dashed var(--line); border-radius: 6px; padding: 8px 14px; }

#title-logo .shui-w { stroke-dasharray: 1 1.1; stroke-dashoffset: 1.05; animation: shui-write var(--d) cubic-bezier(.5, .05, .4, 1) var(--t) forwards, shui-wet .5s ease-out 3.05s forwards; }
#title-logo .shui-s1 { --t: .25s; --d: .5s; }
#title-logo .shui-s2 { --t: .85s; --d: .8s; }
#title-logo .shui-s3 { --t: 2.45s; --d: .55s; }
#title-logo .shui-boat { opacity: 0; animation: shui-fill .4s ease-out 1.75s forwards; }
#title-logo .shui-bleed { opacity: 0; animation: shui-fill .45s ease-in 3.3s forwards; }
#title-logo .shui-sail { opacity: 0; animation: shui-sail .7s ease-out 1.8s forwards; }
#title-logo .shui.inked { mask: none; }
#title-logo .shui.inked .shui-sail { animation: none; opacity: 1; }
@keyframes shui-write { to { stroke-dashoffset: 0; } }
@keyframes shui-wet { to { stroke-width: 100px; } }
@keyframes shui-fill { to { opacity: 1; } }
@keyframes shui-sail { from { opacity: 0; transform: translateX(-60px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #title-logo .shui-w, #title-logo .shui-bleed, #title-logo .shui-sail, #title-logo .shui-boat { animation: none; }
  #title-logo .shui { mask: none; }
  #title-logo .shui-w { stroke-dashoffset: 0; }
  #title-logo .shui-bleed, #title-logo .shui-sail, #title-logo .shui-boat { opacity: 1; }
}

/* 預告 */
.frame { position: relative; aspect-ratio: 16 / 9; background: var(--ink); border-radius: 6px; overflow: hidden; box-shadow: 0 18px 50px -24px rgba(28, 26, 23, .55); }
.frame video { display: block; width: 100%; height: 100%; }
video::cue { font-family: "LXGW WenKai TC", serif; color: #f6efdf; background: rgba(28, 26, 23, .55); }
body.lang-zh-Hans video::cue { font-family: "Noto Serif SC", serif; }
body.lang-en video::cue { font-family: Georgia, serif; }

/* 故事 */
.story p { max-width: 760px; margin: 0 0 1em; text-indent: 2em; }
body.lang-en .story p { text-indent: 0; }

/* 試玩場景：會動的小片段，捲到才載入 */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 24px; }
.clip { margin: 0; }
.clip:first-child { grid-column: 1 / -1; }
.clip video { display: block; width: 100%; aspect-ratio: 16 / 9; background: var(--paper-2); border-radius: 5px; border: 1px solid var(--line); cursor: pointer; object-fit: cover; }
.clip figcaption { margin-top: 10px; color: var(--ink-2); font-size: 16px; line-height: 1.6; }
.clip figcaption b { display: block; color: var(--ink); font-weight: 400; font-size: 21px; letter-spacing: .08em; margin-bottom: 2px; }
body.lang-en .clip figcaption b { letter-spacing: 0; }

/* 完整版 */
.feats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
.feat img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 5px; border: 1px solid var(--line); }
.feat h3 { margin: 14px 0 4px; font-size: 22px; font-weight: 400; letter-spacing: .08em; }
body.lang-en .feat h3 { letter-spacing: 0; }
.feat p { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.7; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 10px; list-style: none; padding: 0; margin: 36px 0 0; }
.facts li { border: 1px solid var(--line); border-radius: 999px; padding: 3px 14px; font-size: 15px; color: var(--ink-2); }

.contact p { margin: 0; }
footer { max-width: 1080px; margin: 64px auto 0; padding: 24px 16px 40px; border-top: 1px solid var(--line); color: var(--dim); font-size: 13px; }

/* 語言建議（照瀏覽器的語言，不自動跳） */
#lang-banner { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 20; display: flex; align-items: center; gap: 12px;
  background: var(--ink); color: var(--paper); border-radius: 8px; padding: 8px 10px 8px 16px; font-size: 15px; box-shadow: 0 10px 30px -12px rgba(0,0,0,.5); max-width: calc(100vw - 32px); }
#lang-banner[hidden] { display: none; }
#lang-banner a { color: #f3c9a6; }
#lang-banner button { border: 0; background: transparent; color: var(--paper); font-size: 20px; line-height: 1; cursor: pointer; padding: 4px 8px; }

@media (max-width: 760px) {
  body { font-size: 17px; }
  .sections { display: none; }
  .langs { margin-left: auto; }
  main > section { padding-top: 52px; }
  .grid, .feats { grid-template-columns: 1fr; }
  .tagline { font-size: 18px; letter-spacing: .18em; }
  h2 { font-size: 26px; }
}
