/* 第四版：暗場＋圓角框。排在 style.css（線上版的樣式）後面載入，色彩與字體用它的變數，這裡只加上半頁新的東西 */
:root {
  --radius: 20px;
  --top-h: clamp(84px, 13vh, 124px);
  --ease: cubic-bezier(.16, 1, .3, 1);
}
body { overflow-x: hidden; }
/* 下半頁原本是蓋在全螢幕 reel 上的布幕；第四版接在 reel 放大之後，不需要圓角與陰影 */
.sheet { margin-top: 0; border-radius: 0; box-shadow: none; }

/* ── 載入畫面 ── */
.loader { position: fixed; inset: 0; z-index: 100; background: #000; display: grid; place-items: center; transition: transform .9s var(--ease); }
.ld-wall { display: grid; grid-template-columns: repeat(4, 34px); gap: 6px; }
.ld-cell { display: block; height: 20px; border-radius: 3px; background: #17181c; transition: background .25s; }
.ld-cell.on { background: var(--ink); }
.ld-cell.on:last-child { background: var(--tally); box-shadow: 0 0 18px var(--tally); }
.ld-num { position: absolute; left: var(--gutter); bottom: calc(var(--gutter) - 8px); font-family: var(--mono); font-size: clamp(56px, 9vw, 112px); line-height: 1; letter-spacing: -.04em; }
.ld-tag { position: absolute; right: var(--gutter); bottom: var(--gutter); font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: var(--mute); }
.ready .loader { transform: translateY(-100%); }

/* ── 頂列 ── */
.v4top { position: fixed; top: 0; left: 0; right: 0; z-index: 20; height: var(--top-h); padding: 0 var(--gutter); display: flex; align-items: center; gap: 24px; pointer-events: none; transition: background .35s; }
.v4top > * { pointer-events: auto; }
.scrolled .v4top { background: linear-gradient(rgba(11, 12, 16, .92) 40%, rgba(11, 12, 16, 0)); }
.v4top .nav { margin-left: auto; }
.v4top .pill { text-decoration: none; }
.v4brand { text-decoration: none; font-family: var(--mono); font-weight: 500; font-size: 15px; letter-spacing: .22em; }
.top-line { margin-left: clamp(24px, 9vw, 150px); font-size: clamp(14px, 1.35vw, 19px); line-height: 1.5; color: var(--ink); transition: opacity .4s; }
.scrolled .top-line { opacity: 0; }
.pill { display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border-radius: 999px; background: rgba(255, 255, 255, .08); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-size: 13px; letter-spacing: .06em; white-space: nowrap; transition: background .25s; }
.pill:hover { background: rgba(255, 255, 255, .16); }
.pill-solid { background: var(--ink); color: #0B0C10; }
.pill-solid:hover { background: #fff; }

/* ── 首屏 ── */
.v4hero { height: 100vh; height: 100svh; min-height: 520px; padding: var(--top-h) var(--gutter) 0; display: flex; flex-direction: column; }
.stage { position: relative; flex: 1; min-height: 0; border-radius: var(--radius); overflow: hidden; background: #10131A; transform: scale(.94); opacity: 0; transition: transform 1.2s var(--ease) .25s, opacity .8s ease .25s; }
.ready .stage { transform: none; opacity: 1; }
#gl { display: block; width: 100%; height: 100%; }
.hud { position: absolute; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--ink); pointer-events: none; text-shadow: 0 1px 8px rgba(0, 0, 0, .8); }
.hud b { font-family: var(--sans); font-weight: 400; letter-spacing: .02em; color: var(--mute); }
.hud-tl { top: 18px; left: 20px; right: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-br { right: 20px; bottom: 16px; }
.hud-bl { left: 20px; bottom: 16px; color: var(--mute); }
.stage.can-open { cursor: pointer; }
.hud, .marks, .ld-num, .ld-tag { margin: 0; }
.marks { height: 44px; display: flex; align-items: center; justify-content: space-between; font-family: var(--mono); font-size: 14px; color: var(--mute); }
.marks i { font-style: normal; }
.marks span { font-size: 11px; letter-spacing: .16em; }

/* ── 標題段 ── */
.intro { position: relative; padding: clamp(70px, 14vh, 150px) var(--gutter) clamp(40px, 8vh, 90px); }
.intro-in { position: relative; max-width: var(--max); margin: 0 auto; }
.intro h1 { margin: 0; font-family: var(--serif); font-weight: 700; font-size: clamp(34px, 7.2vw, 112px); line-height: 1.16; letter-spacing: -.01em; }
.intro h1 span { display: block; }
.intro h1 span:first-child { padding-left: 1.6em; }
.intro-side { margin: clamp(32px, 6vh, 64px) 0 0 auto; width: min(100%, 440px); }
.intro-side p { font-size: 16px; line-height: 1.85; color: #CFCBC3; margin: 0 0 24px; }
.line { position: absolute; left: 0; top: 0; width: 100%; height: calc(100% + 30vh); pointer-events: none; overflow: visible; }
.line path { fill: none; stroke: var(--tally); stroke-width: 10px; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; }

/* ── Reel 放大 ── */
.reel-sec { position: relative; height: 240vh; }
.reel-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; padding: var(--top-h) var(--gutter) 0; display: flex; flex-direction: column; justify-content: flex-start; }
.reel-frame { position: relative; width: 36%; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; --w: 320px; will-change: width, height; }
.reel-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: calc(var(--w) * .03); border: 0; background: linear-gradient(rgba(0, 0, 0, .18), rgba(0, 0, 0, .18)); color: #fff; cursor: pointer; font-family: var(--mono); font-weight: 500; font-size: calc(var(--w) * .092); letter-spacing: -.02em; }
.reel-play i { display: block; width: calc(var(--w) * .12); height: calc(var(--w) * .066); border-radius: 999px; background: #fff; position: relative; transition: transform .35s var(--ease); }
.reel-play i::after { content: ""; position: absolute; left: 53%; top: 50%; transform: translate(-50%, -50%); border-left: calc(var(--w) * .017) solid #0B0C10; border-top: calc(var(--w) * .011) solid transparent; border-bottom: calc(var(--w) * .011) solid transparent; }
.reel-play:hover i { transform: scale(1.12); }
.marks-reel { margin-top: 6px; }


@media (max-width: 900px) {
  .top-line { display: none; }
  .v4top .pill { margin-left: auto; }
  .intro h1 span:first-child { padding-left: 0; }
  .line path { stroke-width: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .loader, .stage { transition: none; }
}
