/* 小海豚介紹網站：海上航行，迎向日昇與光之樹 */
@font-face { font-family: HomeSerif; src: url("home-serif.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: HomeSans; src: url("home-sans.woff2") format("woff2"); font-display: swap; }

:root {
  /* 文字後方暗化色：夜裡是藍黑，天亮後轉成帶暖的深色，不把日昇天色壓成灰 */
  --sr: calc(1 + 24 * var(--dawn, 0)); --sg: calc(8 + 6 * var(--dawn, 0)); --sb: calc(12 - 4 * var(--dawn, 0));
  --sea-top: #0a2b32;
  --sea: #061b25;
  --abyss: #01080c;
  --teal: #a2eac8;
  --teal-dim: #6fbfa0;
  --ice: #edf5f3;
  --mist: #bed0ce;
  --mist-dim: #8ba6a3;
  --sun: #f5d889;
  --focus: #e4ac45;
  --hair: rgba(162, 234, 200, 0.2);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --rise: 0;
  --hero-out: 0;
  --serif: HomeSerif, "Noto Serif CJK TC", "Noto Serif TC", serif;
  --sans: HomeSans, "Noto Sans CJK TC", "Noto Sans TC", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--sea);
  color: var(--ice);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: 0.02em;
}
::selection { background: var(--teal); color: var(--sea); }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--abyss); }
::-webkit-scrollbar-thumb { background: #2c5a57; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 5px; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
[hidden] { display: none !important; }
p, li { text-wrap: pretty; }
h1, h2, .interlude .glow-text, .promise { text-wrap: balance; }
.nw, .word { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; z-index: 50; top: -60px; left: 16px; padding: 10px 16px; background: var(--ice); color: var(--sea); }
.skip:focus { top: 12px; }

/* 海面畫布 */
.ocean { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 1.6s var(--ease); }
.gl-ready .ocean { opacity: 1; }
/* 整頁共用一層暗化：依目前領域在左或右柔和換邊，領域之間不出現界線；在太陽位置挖洞 */
.veil { position: fixed; inset: 0; z-index: 0; pointer-events: none; display: none; -webkit-mask-image: radial-gradient(circle at var(--sun-x, -999px) var(--sun-y, -999px), transparent 7vmin, #000 14vmin); mask-image: radial-gradient(circle at var(--sun-x, -999px) var(--sun-y, -999px), transparent 7vmin, #000 14vmin); }
.motion.gl .veil { display: block; }
.veil i { position: absolute; inset: 0; }
/* 天越亮（後段領域）暗化越深，小字對比維持 4.5：1 以上 */
.veil-l { opacity: var(--veil-l, 0); background: linear-gradient(90deg, rgb(var(--sr) var(--sg) var(--sb) / calc(0.55 + var(--dawn, 0) * 0.3)) 0%, rgb(var(--sr) var(--sg) var(--sb) / calc(0.26 + var(--dawn, 0) * 0.16)) 40%, rgb(var(--sr) var(--sg) var(--sb) / 0) 58%); }
.veil-r { opacity: var(--veil-r, 0); background: linear-gradient(270deg, rgb(var(--sr) var(--sg) var(--sb) / calc(0.58 + var(--dawn, 0) * 0.3)) 0%, rgb(var(--sr) var(--sg) var(--sb) / calc(0.28 + var(--dawn, 0) * 0.16)) 36%, rgb(var(--sr) var(--sg) var(--sb) / 0) 50%); }
.veil-m { display: none; opacity: var(--veil-m, 0); background: rgb(var(--sr) var(--sg) var(--sb) / calc(0.5 + var(--dawn, 0) * 0.15)); }
main, .site-footer { position: relative; z-index: 1; }

/* 頁首 */
.site-header {
  position: fixed; z-index: 10; inset: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  padding: 22px clamp(20px, 4vw, 56px);
}
.site-header::before { content: ""; position: absolute; inset: 0 0 -64px; z-index: -1; pointer-events: none; background: linear-gradient(180deg, rgb(1, 8, 12) 0%, rgba(1, 8, 12, 0.9) 42%, rgba(1, 8, 12, 0)); }
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { width: 54px; height: auto; }
.brand-name { font-family: var(--serif); font-size: 21px; letter-spacing: 0.12em; }
.brand-latin { font-size: 12px; letter-spacing: 0.34em; color: var(--mist-dim); padding-left: 14px; border-left: 1px solid var(--hair); }
.header-cta {
  font-size: 13px; letter-spacing: 0.2em; padding: 11px 20px; border: 1px solid rgba(237, 245, 243, 0.32);
  transform: translate(var(--mx, 0), var(--my, 0)); transition: transform 0.5s var(--ease), border-color 0.4s, color 0.4s;
}
.header-cta:hover { border-color: var(--sun); color: var(--sun); }

/* 深度尺 */
.depth > * { opacity: calc(1 - var(--rise)); transition: opacity 0.3s; }
.depth {
  position: fixed; z-index: 9; right: clamp(16px, 2.6vw, 40px); top: 50%; transform: translateY(-50%);
  display: grid; justify-items: end; gap: 22px;
}
.depth-readout { display: flex; align-items: baseline; gap: 6px; font-family: var(--serif); font-variant-numeric: tabular-nums; }
.depth::before { content: ""; position: absolute; inset: -40px -30px -40px -60px; z-index: -1; pointer-events: none; background: radial-gradient(closest-side, rgba(1, 8, 12, 0.5), rgba(1, 8, 12, 0)); } /* 草叢或亮光帶經過時刻度仍看得清楚 */
.depth-readout { text-shadow: 0 0 3px rgba(1, 8, 12, 0.95), 0 0 12px rgba(1, 8, 12, 0.9); }
.depth-label { font-family: var(--sans); font-size: 12px; letter-spacing: 0.24em; color: var(--mist); margin-right: 4px; }
.depth-value { font-size: 30px; color: var(--ice); min-width: 3.2ch; text-align: right; }
.depth-unit { font-size: 13px; color: var(--mist); }
.depth-scale { display: grid; gap: 4px; justify-items: end; }
.depth-scale a { position: relative; display: flex; align-items: center; gap: 12px; padding: 4px 0; color: var(--mist-dim); font-size: 12px; text-shadow: 0 0 3px rgba(1, 8, 12, 1), 0 0 10px rgba(1, 8, 12, 0.95); } /* 亮光帶、草葉或跑馬燈經過時數字仍看得清楚 */
.depth-scale a::after { content: ""; width: 34px; height: 1px; background: currentColor; opacity: 0.6; transform: scaleX(0.42); transform-origin: right; transition: transform 0.6s var(--ease), background 0.4s; }
.depth-scale .tick-name { position: absolute; right: calc(100% + 12px); white-space: nowrap; opacity: 0; transform: translateX(8px); transition: opacity 0.5s, transform 0.6s var(--ease); letter-spacing: 0.14em; }
.depth-scale .tick-no { font-variant-numeric: tabular-nums; letter-spacing: 0.08em; }
.depth-scale a:hover .tick-name, .depth-scale a:focus-visible .tick-name, .depth-scale a[aria-current] .tick-name { opacity: 1; transform: none; }
.depth-scale a[aria-current] { color: var(--sun); }
.depth-scale a[aria-current]::after { transform: none; background: var(--sun); opacity: 1; }

/* 按鈕：直角細框，淡金只給主要行動 */
.cta {
  position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 38px;
  border: 1px solid rgba(245, 216, 137, 0.75); color: var(--sun); font-size: 14px; letter-spacing: 0.24em; overflow: hidden;
  transform: translate(var(--mx, 0), var(--my, 0)); transition: transform 0.6s var(--ease), color 0.5s var(--ease);
}
.cta::before { content: ""; position: absolute; inset: 0; background: var(--sun); clip-path: inset(0 100% 0 0); transition: clip-path 0.7s var(--ease); }
.cta span { position: relative; }
.cta:hover { color: var(--sea); }
.cta:hover::before { clip-path: inset(0 0 0 0); }
.cta-gold, .cta-gold:hover, .cta-gold span { background: var(--sun); color: var(--sea); }
.cta-gold span { background: none; }
.cta-gold::before { background: var(--ice); }

/* 首屏：海面 */
.surface-hero {
  position: relative; min-height: 100vh; min-height: 100svh; display: grid; align-content: end;
  padding: 0 clamp(20px, 7vw, 120px) clamp(72px, 15vh, 160px); overflow: hidden;
}
.hero-photo { position: absolute; inset: 0; z-index: -1; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 62%; transition: opacity 1.8s var(--ease); }
.gl-ready .hero-photo { opacity: 0; transition: opacity 2s var(--ease); }
.no-gl .hero-photo, .reduced:not(.gl) .hero-photo { position: fixed; }
.surface-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(1, 8, 12, 0.55), rgba(1, 8, 12, 0) 60%), linear-gradient(0deg, rgba(1, 8, 12, 0) 0%, rgba(1, 8, 12, 0.5) 16%, rgba(1, 8, 12, 0) 48%); -webkit-mask-image: linear-gradient(0deg, transparent 0, #000 24%); mask-image: linear-gradient(0deg, transparent 0, #000 24%); } /* 底緣整層淡到 0，與宣言之間沒有硬邊 */
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(3, 21, 29, 0.78), rgba(3, 21, 29, 0.15) 70%), linear-gradient(0deg, var(--sea) 0%, transparent 38%); }
.hero-copy { max-width: 980px; opacity: calc(1 - var(--hero-out) * 1.2); transform: translate3d(calc(var(--px, 0) * -14px), calc(var(--py, 0) * -10px + var(--hero-out) * -60px), 0); }
.hero-title { font-family: var(--serif); font-weight: 400; font-size: clamp(46px, 7.2vw, 96px); line-height: 1.24; letter-spacing: 0.04em; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero-title .line > span { display: inline-block; }
.hero-title em { position: relative; display: inline-block; line-height: 1.12; font-style: normal; padding-bottom: 0.04em; }
.hero-title em::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--sun); }
.hero-sub { margin-top: 30px; max-width: 34em; font-size: clamp(15px, 1.25vw, 18px); line-height: 2; color: var(--mist); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 36px; margin-top: 44px; }
.dive-link { display: inline-flex; align-items: center; gap: 12px; font-size: 13px; letter-spacing: 0.3em; color: var(--mist); }
.dive-link svg { width: 18px; height: 18px; }
.dive-link:hover { color: var(--teal); }

/* 宣言與金句：隨捲動點亮 */
.manifesto, .interlude { min-height: 92vh; display: grid; place-content: center; padding: 14vh clamp(24px, 10vw, 180px); }
.glow-text { font-family: var(--serif); font-size: clamp(26px, 3.3vw, 50px); line-height: 1.75; letter-spacing: 0.04em; max-width: 21em; }
.interlude .glow-text { font-size: clamp(30px, 4.4vw, 66px); max-width: 14em; text-align: center; }
.ch { display: inline-block; will-change: opacity, transform, filter; }
.values { display: flex; flex-wrap: wrap; gap: 14px 0; margin-top: 64px; font-size: 13px; letter-spacing: 0.32em; color: var(--mist); }
.values li + li { margin-left: 28px; padding-left: 28px; border-left: 1px solid var(--hair); }

/* 十個領域：基本排版（減少動態、無立體繪圖時使用） */
.chapter { padding: 14vh clamp(24px, 7vw, 120px); }
.stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 6vw; align-items: center; min-height: 86vh; --col: 1; }
.chapter.flip .stage { --col: 2; }
.stage > .ch-col, .stage > .scene { grid-column: var(--col); max-width: 560px; }
.rays { display: none; }
.chapter-icon { display: none; }
.no-gl .chapter-icon, .reduced .chapter-icon { display: block; grid-column: calc(3 - var(--col)); grid-row: 1 / span 2; justify-self: center; width: min(34vw, 360px); height: auto; color: var(--teal); stroke-width: 0.7; }
.chapter-name { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 18px; font-weight: 400; }
.chapter-name .num { font-family: var(--serif); font-size: 15px; color: #c4f5df; letter-spacing: 0.16em; font-variant-numeric: tabular-nums; opacity: calc(1 - var(--shrink, 0) * 1.4); text-shadow: 0 0 3px rgba(1, 8, 12, 1), 0 0 10px rgba(1, 8, 12, 0.95); }
.chapter-name .name { font-family: var(--serif); font-size: clamp(42px, 5.4vw, 80px); line-height: 1.2; letter-spacing: 0.08em; perspective: 700px; }
.chapter-name .nc { display: inline-block; transform-origin: 50% 90%; }
.chapter-name .group { grid-column: 2; margin-top: 10px; font-size: 13px; letter-spacing: 0.34em; color: rgba(237, 245, 243, 0.9); text-shadow: 0 0 2px rgba(1, 8, 12, 1), 0 0 6px rgba(1, 8, 12, 0.95), 0 1px 14px rgba(1, 8, 12, 0.95); }
.scene { margin-top: 30px; }
.promise { font-family: var(--serif); font-size: clamp(20px, 1.9vw, 27px); line-height: 1.6; color: var(--ice); }
.desc { margin-top: 18px; font-size: 15px; line-height: 2; color: var(--mist); }
.points { display: grid; }
.points li { display: grid; grid-template-columns: 34px 1fr; padding: 13px 0; border-top: 1px solid var(--hair); font-size: 15px; line-height: 1.7; color: var(--ice); }
.pt-no { font-family: var(--serif); font-size: 13px; color: var(--teal); letter-spacing: 0.1em; padding-top: 0.15em; }
.chat { display: grid; gap: 14px; }
.bubble.q { justify-self: end; max-width: 72%; padding: 14px 20px; border: 1px solid rgba(162, 234, 200, calc(0.22 * var(--bg, 1))); border-radius: 20px 20px 4px 20px; background: linear-gradient(rgba(162, 234, 200, calc(0.1 * var(--bg, 1))), rgba(162, 234, 200, calc(0.1 * var(--bg, 1)))), rgba(1, 8, 12, calc(0.55 * var(--bg, 1))); font-family: var(--serif); font-size: 17px; line-height: 1.7; }
.bubble.a { display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: start; max-width: 90%; justify-self: start; }
.avatar { width: 38px; height: auto; margin-top: 6px; }
.a-text { padding: 14px 20px; border: 1px solid rgba(162, 234, 200, calc(0.22 * var(--bg, 1))); border-radius: 4px 20px 20px 20px; background: rgba(1, 8, 12, calc(0.6 * var(--bg, 1))); font-size: 15px; line-height: 1.95; color: var(--ice); min-height: 4em; }
.pt-text { text-wrap: balance; }

/* 十個領域：分鏡舞台（動態模式），每章停駐一段，捲動控制每一場 */
.motion.gl .chapter { height: 240vh; padding: 0; --col-left: clamp(24px, 7vw, 120px); --col-w: min(38vw, 560px); --chat-left: 57vw; --chat-w: min(calc(43vw - 250px), 380px); }
.motion.gl .chapter.flip { --col-left: 54vw; --chat-left: clamp(24px, 7vw, 120px); }
.motion.gl .stage { position: sticky; top: 0; height: 100vh; min-height: 0; display: block; }
/* 文字板在立體空間裡飛進飛出，可能超出舞台；只在橫向裁掉，不產生左右捲動（裁切不會讓黏住失效） */
.motion.gl [data-chapters] { overflow-x: clip; }
.motion.gl .ch-col { position: absolute; left: var(--col-left); width: var(--col-w); top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: center; padding: 84px 0 4vh; }
.motion.gl .ch-col, .motion.gl .scene-chat { text-shadow: 0 0 2px rgba(1, 8, 12, 0.7), 0 1px 14px rgba(1, 8, 12, 0.85); }
/* 空間文字：每塊文字是立體世界裡的一片板子，位置與透視由程式依場景攝影機逐格算出 */
.motion.gl .ch-head, .motion.gl .scene-intro, .motion.gl .points li, .motion.gl .bubble { opacity: 0; visibility: hidden; transform-origin: 0 0; }
.motion.gl .scene { margin-top: 22px; }
.motion.gl .chapter-name .name { font-size: min(clamp(46px, 5.4vw, 80px), calc((var(--col-w) - 60px) / (var(--chars, 4) * 1.1))); letter-spacing: 0.06em; white-space: nowrap; }
.motion.gl .promise { font-size: clamp(22px, 2.2vw, 32px); line-height: 1.45; }
.motion.gl .desc { margin-top: 14px; font-size: 15.5px; line-height: 1.95; max-width: 34em; }
.motion.gl .points li { padding: 9px 0; font-size: 15px; line-height: 1.65; }
.motion.gl .scene-chat { position: absolute; left: var(--chat-left); width: var(--chat-w); bottom: 11vh; margin: 0; }
/* 對話：有厚度的玻璃板 */
.motion.gl .bubble.q, .motion.gl .a-text {
  background: linear-gradient(140deg, rgba(162, 234, 200, 0.2), rgba(6, 27, 37, 0.66) 46%, rgba(1, 8, 12, 0.76));
  border: 1px solid rgba(162, 234, 200, 0.42);
  box-shadow: 1px 1px 0 rgba(162, 234, 200, 0.26), 2px 2px 0 rgba(162, 234, 200, 0.19), 3px 3px 0 rgba(130, 210, 190, 0.14), 4px 4px 0 rgba(110, 190, 180, 0.1), 5px 5px 0 rgba(90, 170, 170, 0.07), 6px 6px 0 rgba(70, 150, 160, 0.05), 16px 24px 40px rgba(1, 8, 12, 0.6), inset 0 1px 0 rgba(237, 245, 243, 0.28);
}
/* 有說話的海豚時，回答框不再放頭像，海豚就站在頭像原本的位置 */
.speakers .bubble.a { display: block; }
.speakers .bubble.a .avatar { display: none; }
.motion.gl .rays { display: block; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.ray { fill: rgba(162, 234, 200, 0.62); stroke: none; }
.ray-dot { fill: var(--teal); }
.ray-no { fill: var(--teal); font-family: var(--serif); font-size: 13px; letter-spacing: 0.08em; }
@media (max-height: 820px) and (min-width: 901px) {
  .motion.gl .promise { font-size: clamp(20px, 2vw, 28px); }
  .motion.gl .desc { font-size: 14.5px; line-height: 1.8; }
  .motion.gl .points li { padding: 6px 0; font-size: 14px; }
  .motion.gl .scene { margin-top: 16px; }
}

/* 跑馬燈：十個領域空心大字 */
.marquee { padding: 6vh 0 10vh; overflow: hidden; }
.marquee-row { white-space: nowrap; overflow: hidden; }
.marquee-track { display: inline-flex; align-items: center; gap: 3.2vw; will-change: transform; }
.mq { font-family: var(--serif); font-size: clamp(48px, 7vw, 96px); line-height: 1.3; letter-spacing: 0.08em; color: transparent; -webkit-text-stroke: 1px rgba(162, 234, 200, 0.5); transition: color 0.5s var(--ease), -webkit-text-stroke-color 0.5s; }
.mq:hover, .mq:focus-visible { color: var(--teal); -webkit-text-stroke-color: var(--teal); }
.marquee-row.reverse .mq { -webkit-text-stroke-color: rgba(190, 208, 206, 0.28); }
.mq-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(162, 234, 200, 0.45); flex: none; }

/* 游標圓環（只在滑鼠裝置） */
.cursor { position: fixed; left: 0; top: 0; z-index: 30; width: 78px; height: 78px; margin: -39px 0 0 -39px; display: grid; place-items: center; pointer-events: none; opacity: 0; transition: opacity 0.4s; }
.cursor::before { content: ""; position: absolute; inset: 0; border: 1px solid rgba(237, 245, 243, 0.55); border-radius: 50%; transform: scale(0.44); transition: transform 0.45s var(--ease), background 0.4s, border-color 0.4s; }
.cursor.on { opacity: 1; }
.cursor.grow::before { transform: scale(1); background: rgba(162, 234, 200, 0.12); border-color: var(--teal); }
.cursor-label { position: relative; }
.cursor-label { font-size: 12px; letter-spacing: 0.2em; color: var(--ice); }

/* 結尾：航向日昇小島 */
.end-stage::before, .interlude::before, .manifesto::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(60% 46% at 50% 62%, rgba(1, 8, 12, 0.62), rgba(1, 8, 12, 0)); }
.manifesto, .interlude { position: relative; }
.manifesto::before { background: radial-gradient(70% 55% at 35% 50%, rgba(1, 8, 12, 0.55), rgba(1, 8, 12, 0)); }
.surface-end { position: relative; }
.end-stage {
  position: relative; min-height: 100vh; min-height: 100svh; display: grid; justify-items: center; align-content: end; text-align: center;
  padding: 0 24px 14vh; overflow: hidden;
}
/* 結尾是停留式舞台：抵達小島這段鏡頭移動拉長，不再急轉晃動 */
.motion.gl .surface-end { height: 180vh; overflow-x: clip; } /* 升空時結尾文字往鏡頭放大飛過，只裁橫向，不撐出左右捲動 */
.motion.gl .end-stage { position: sticky; top: 0; height: 100vh; }
.end-logo { display: none; }
.reduced .end-logo, .no-gl .end-logo { display: block; width: min(300px, 60vw); height: auto; margin-bottom: 36px; }
.reduced .end-stage, .no-gl .end-stage { padding-top: 22vh; }
.surface-end h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 5.2vw, 76px); line-height: 1.3; letter-spacing: 0.04em; }
.end-sub { margin-top: 26px; font-size: 16px; color: rgba(237, 245, 243, 0.94); max-width: 30em; text-shadow: 0 0 3px rgba(1, 8, 12, 0.9), 0 1px 12px rgba(1, 8, 12, 0.9); }
.end-stage .cta { margin-top: 48px; }

/* 光之樹：側看是樹，升到正上方就是 LINE 條碼（減少動態、無立體繪圖時直接放條碼圖） */
.tree-code { position: relative; padding: 16vh clamp(24px, 7vw, 120px); }
.code-stage { display: flex; flex-wrap: wrap; align-items: center; gap: 40px 64px; }
.code-img { width: min(300px, 72vw); height: auto; }
.code-copy { max-width: 520px; }
.code-copy h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4.2vw, 60px); line-height: 1.32; letter-spacing: 0.04em; }
.code-sub { margin-top: 24px; font-size: 16px; line-height: 2; color: var(--mist); max-width: 30em; }
.code-copy .cta { margin-top: 40px; }
.motion.gl .surface-end { opacity: clamp(0, calc(1 - var(--top, 0) * 10), 1); } /* 升空一開始就淡掉，放大的按鈕不留殘影 */
.motion.gl .end-stage { transform: perspective(1100px) translate3d(0, 0, calc(var(--top, 0) * 1400px)); } /* 升空時結尾文字往鏡頭飛過、消失在後方 */
.motion.gl .tree-code { height: 200vh; padding: 0; }
.motion.gl .code-stage { position: sticky; top: 0; height: 100vh; display: grid; align-content: center; padding: 0 clamp(24px, 7vw, 120px); }
.motion.gl .code-stage::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: var(--top, 0); background: linear-gradient(90deg, rgba(1, 8, 12, 0.7), rgba(1, 8, 12, 0.35) 38%, rgba(1, 8, 12, 0) 52%); }
.motion.gl .code-img { display: none; }
.motion.gl .code-copy { max-width: min(36vw, 500px); opacity: clamp(0, calc((var(--top, 0) - 0.6) * 3), 1); filter: blur(calc(clamp(0, (0.95 - var(--top, 0)) * 3, 1) * 6px)); transform: perspective(1100px) translate3d(0, 0, calc(clamp(0, (0.95 - var(--top, 0)) * 3, 1) * -420px)); text-shadow: 0 1px 14px rgba(1, 8, 12, 0.75); }

.site-footer { display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: 4px 26px; padding: 40px 24px 36px; text-align: center; color: var(--mist); font-size: 13px; letter-spacing: 0.12em; background: linear-gradient(0deg, var(--abyss), rgba(1, 8, 12, 0.82)); }
.footer-brand { display: flex; align-items: center; gap: 12px; font-family: var(--serif); font-size: 17px; color: var(--ice); }
.footer-brand img { width: 44px; height: auto; }
.site-footer .fine { font-size: 12px; color: var(--mist-dim); letter-spacing: 0.04em; max-width: 46em; }
.handoff-link { flex-basis: 100%; margin-top: 18px; font-size: 14px; letter-spacing: 0.24em; color: var(--teal); }
.handoff-link:hover { color: var(--mist); }
.handoff-veil { position: fixed; inset: 0; z-index: 50; background: #01080c; opacity: 0; pointer-events: none; transition: opacity 0.7s ease; }
.handoff-veil.on { opacity: 1; }

/* 進場：先可見，有動態偏好時才收起再揭示 */
.motion .hc { display: inline-block; opacity: 0; filter: blur(14px); transform: translate3d(0, 0.45em, 0); transition: opacity 0.9s var(--ease), filter 1.1s var(--ease), transform 1.3s var(--ease); transition-delay: calc(var(--k) * 40ms); }
.motion.loaded .hc { opacity: 1; filter: blur(0); transform: none; }
.motion .hero-sub, .motion .hero-actions, .motion .site-header, .motion .depth { opacity: 0; transition: opacity 1.2s var(--ease) 0.2s; }
.motion.loaded .hero-sub, .motion.loaded .hero-actions, .motion.loaded .site-header, .motion.loaded .depth { opacity: 1; }
.motion .manifesto .values { opacity: 0; transform: translateY(20px); transition: opacity 1.1s var(--ease), transform 1.2s var(--ease); }
.motion .manifesto .values.in { opacity: 1; transform: none; }
.motion .end-stage > * { opacity: 0; filter: blur(8px); transform: scale(0.94); transition: opacity 2.2s var(--ease), transform 2.6s var(--ease), filter 2.2s var(--ease); }
.motion .surface-end.in .end-stage > * { opacity: 1; filter: blur(0); transform: none; }
.motion .surface-end.in .end-sub { transition-delay: 0.25s; }
.motion .surface-end.in .cta { transition-delay: 0.5s; }

/* 減少動態：背景是靜止的海岸畫面，文字區塊整片加深 */
.reduced .manifesto, .reduced .marquee, .reduced .dive, .reduced .surface-end, .reduced .tree-code { background: rgba(1, 8, 12, 0.62); }

/* 寬螢幕右側留給深度尺 */
@media (min-width: 901px) {
  .chapter, .manifesto, .interlude { padding-right: max(clamp(24px, 7vw, 120px), 210px); }
  .motion.gl .chapter { padding-right: 0; }
  .motion.gl .chapter.flip { --col-w: min(calc(46vw - 220px), 520px); }
  .motion.gl .end-stage { justify-items: start; text-align: left; align-content: center; padding: 0 clamp(24px, 7vw, 120px); }
  .motion.gl .end-stage::before { background: radial-gradient(48% 52% at 22% 50%, rgba(1, 8, 12, 0.6), rgba(1, 8, 12, 0)); }
}

/* 中等寬度：右欄起點往左，欄寬不要窄到標題失去層次 */
@media (min-width: 901px) and (max-width: 1180px) {
  .depth { display: none; } /* 中等寬度畫面太擠：雕塑與飛魚會壓到航程尺，和手機一樣不顯示 */
  .motion.gl .chapter.flip { --col-left: 46vw; --col-w: calc(54vw - 230px); }
  .motion.gl .chapter { --chat-w: min(calc(46vw - 200px), 330px); }
  .motion.gl .scene-chat { bottom: 7vh; }
  .motion.gl .bubble.q, .motion.gl .a-text { font-size: 14px; padding: 10px 14px; }
}

/* 窄螢幕 */
@media (max-width: 900px) {
  .depth { top: 76px; right: 12px; transform: none; gap: 14px; }
  .depth-scale { gap: 0; }
  .depth-scale a { padding: 3px 0 3px 14px; gap: 0; }
  .depth-scale .tick-no, .depth-scale .tick-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .depth-scale a::after { width: 18px; }
  .depth-value { font-size: 22px; }
  .chapter { padding: 14vh 24px 10vh; }
  .stage { display: flex; flex-direction: column; min-height: 0; }
  .stage > .ch-col, .stage > .scene { max-width: none; }
  .no-gl .chapter-icon, .reduced .chapter-icon { order: -1; width: 160px; margin: 0 auto 32px; }
  .motion.gl .chapter, .motion.gl .chapter.flip { height: auto; padding: 20vh 24px; --col-w: calc(100vw - 48px); }
  .motion.gl .stage { position: relative; height: auto; overflow: visible; }
  .motion.gl .ch-col { position: relative; left: auto; width: auto; top: auto; bottom: auto; display: block; padding: 0; }
  .motion.gl .scene-chat { position: relative; left: auto; width: auto; bottom: auto; margin-top: 30px; }
  .motion.gl .chapter-name .name { font-size: min(clamp(40px, 11vw, 54px), calc((var(--col-w) - 60px) / (var(--chars, 4) * 1.1))); }
  .motion.gl .promise { font-size: clamp(22px, 6.4vw, 28px); }
  .motion.gl .rays { display: none; }
  .motion.gl .bubble.a { max-width: 76%; } /* 右側留位置給說話的海豚 */
  .motion.gl .end-stage { padding-bottom: 6vh; }
  .veil-l, .veil-r { display: none; }
  .veil-m { display: block; }
  .depth { display: none; } /* 手機章節跟著捲動，航程尺會蓋到文字，直接不顯示 */
  .end-stage::before { background: radial-gradient(85% 38% at 50% 76%, rgba(1, 8, 12, 0.62), rgba(1, 8, 12, 0)); }
  .motion.gl .code-stage { align-content: end; padding-bottom: 7vh; }
  .motion.gl .code-stage::before { background: linear-gradient(0deg, rgba(1, 8, 12, 0.82), rgba(1, 8, 12, 0.5) 40%, rgba(1, 8, 12, 0) 54%); }
  .motion.gl .code-copy { max-width: none; }
  .code-copy h2 { font-size: clamp(30px, 8.4vw, 40px); }
  .code-sub { margin-top: 16px; font-size: 15px; line-height: 1.85; }
  .code-copy .cta { margin-top: 26px; }
}
@media (max-width: 640px) {
  .site-header { padding: 16px 20px; }
  .brand img { width: 42px; }
  .brand-name { font-size: 18px; }
  .brand-latin { display: none; }
  .header-cta { font-size: 12px; letter-spacing: 0.12em; padding: 9px 14px; }
  .surface-hero { padding: 0 24px 96px; }
  .hero-title { font-size: clamp(34px, 9.6vw, 52px); }
  .hero-sub br { display: none; }
  .cta { min-height: 52px; padding: 0 28px; }
  .manifesto, .interlude { min-height: 80vh; padding: 12vh 24px; }
  .values { letter-spacing: 0.1em; font-size: 12px; }
  .values li + li { margin-left: 12px; padding-left: 12px; }
  .chapter-name .name { font-size: 44px; }
  .bubble.q, .a-text { font-size: 15px; padding: 12px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}
