/**
 * 築碼科技公司官網的樣式。
 *
 * 顏色全部從 Logo 來：紫 → 藍 → 青藍的漸層，加上字標的深海軍藍。
 * 元件裡不寫死色碼，一律用下面的變數 —— 深色模式只換這一組。
 *
 * 動態的規矩：
 *   - 沒有 JS 時所有內容都看得到（`.js` 這個 class 是 main.js 掛上去的，
 *     進場前的隱藏狀態只在它底下生效）
 *   - 裝置設定「減少動態」時，檔案最後那一段把動畫全部關掉
 */

:root {
  --violet: #6d1fff;
  --blue: #2f6bff;
  --cyan: #06d6f5;
  --grad: linear-gradient(100deg, var(--violet), var(--blue) 50%, var(--cyan));
  --grad-btn: linear-gradient(100deg, var(--violet), var(--blue));

  --bg: #fbfcff;
  --bg-soft: #f1f4fd;
  --surface: #ffffff;
  --ink: #0b1b3a;
  --ink-2: #44506b;
  --ink-3: #6b7690;
  --line: #dfe5f4;
  --code-bg: #0c1330;
  --code-ink: #cdd8ff;
  --shadow: 0 1px 2px rgb(11 27 58 / 5%), 0 12px 40px rgb(47 107 255 / 9%);
  --glow-a: rgb(109 31 255 / 14%);
  --glow-b: rgb(6 214 245 / 14%);

  --wrap: 1100px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 20px;
  --font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #070b18;
    --bg-soft: #0c1226;
    --surface: #101831;
    --ink: #eef2ff;
    --ink-2: #b6c0dc;
    --ink-3: #8792b3;
    --line: #1f2a4d;
    --code-bg: #050816;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 12px 40px rgb(0 0 0 / 35%);
    --glow-a: rgb(109 31 255 / 28%);
    --glow-b: rgb(6 214 245 / 18%);
  }
}

*, *::before, *::after { box-sizing: border-box; }

/* `hidden` 屬性要贏過任何 display 設定 —— .btn 是 inline-flex，沒有這條「上一步」在第一題也看得到 */
[hidden] { display: none !important; }

/* overflow-x: clip —— 開場的底光比畫面寬，不能讓它撐出橫向捲軸 */
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 10px;
  background: var(--ink); color: var(--bg);
}
.skip:focus { top: 12px; }

.wrap { width: min(var(--wrap), 100% - var(--gutter) * 2); margin-inline: auto; }

.grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

.eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: var(--blue);
}

/* ── 按鈕 ─────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 28px;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: 16px; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .2s;
  will-change: transform;
}
.btn-sm { min-height: 42px; padding: 0 20px; font-size: 14px; }
.btn-primary {
  background: var(--grad-btn); color: #fff;
  box-shadow: 0 8px 24px rgb(79 70 255 / 30%);
}
.btn-primary:hover { box-shadow: 0 12px 34px rgb(79 70 255 / 45%); }
.btn-ghost { border-color: var(--line); background: var(--surface); }
.btn-ghost:hover { border-color: var(--blue); }
.btn:active { transform: scale(.97); }

/* ── 頂欄 ─────────────────────────────────────────────────── */

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  height: 68px; padding-inline: var(--gutter);
  transition: background-color .3s, box-shadow .3s, backdrop-filter .3s;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .04em; }
.nav-links { display: flex; gap: 28px; margin-left: auto; font-size: 15px; color: var(--ink-2); }
.nav-links a { position: relative; padding: 6px 0; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--grad); transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav .btn { margin-left: auto; }
}

/* ── 捲動線 ───────────────────────────────────────────────── */

.page { position: relative; }
.page > section { position: relative; z-index: 1; }

.thread { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: visible; }
.thread path { fill: none; stroke-linecap: round; }
.thread-rail { stroke: var(--line); stroke-width: 2; stroke-dasharray: 2 10; }
.thread-ink { stroke: url(#thread-g); stroke-width: 3; }
.thread-head { fill: var(--cyan); filter: drop-shadow(0 0 10px var(--cyan)); opacity: 0; }
/* 沒有 JS 就沒有路徑，整個收起來 */
html:not(.js) .thread { display: none; }

/* ── 開場 ─────────────────────────────────────────────────── */

.hero {
  min-height: 100svh;
  display: grid; align-items: center; gap: clamp(24px, 4vw, 56px);
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  width: min(var(--wrap) + 120px, 100% - var(--gutter) * 2);
  margin-inline: auto;
  padding: 110px 0 90px;
}
.hero-copy { order: 1; }
.hero-stage { order: 2; }

/* 跟著游標走的底光。--mx / --my 由 main.js 更新 */
.hero-glow {
  position: absolute; inset: 0 -50vw; z-index: -1; pointer-events: none;
  /* 往下淡掉，不然深色模式看得到這一屏底部一條切齊的邊 */
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
  mask-image: linear-gradient(#000 55%, transparent);
  background:
    radial-gradient(520px circle at var(--mx, 70%) var(--my, 40%), var(--glow-a), transparent 70%),
    radial-gradient(640px circle at calc(var(--mx, 70%) + 16%) calc(var(--my, 40%) + 22%), var(--glow-b), transparent 70%);
}

.hero-title {
  margin-top: 18px;
  font-size: clamp(32px, 4.4vw, 62px); line-height: 1.22; font-weight: 900; letter-spacing: .01em;
}
/* 第二行十個字不准斷開 —— 字級是照「這一行塞得進欄寬」算的 */
.hero-title .grad { white-space: nowrap; }
.hero-sub { margin-top: 24px; max-width: 30em; font-size: clamp(17px, 1.5vw, 19px); color: var(--ink-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

.hero-stage { perspective: 900px; display: grid; place-items: center; touch-action: pan-y; }
.mark {
  width: min(100%, 520px); overflow: visible;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--s, 1));
  transform-style: preserve-3d;
  filter: drop-shadow(0 calc(18px + var(--lift, 0) * 14px) calc(28px + var(--lift, 0) * 26px) rgb(47 107 255 / calc(22% + var(--lift, 0) * 26%)));
  animation: float 7s ease-in-out infinite;
}
@keyframes float { 50% { translate: 0 -10px; } }

/* 進場：緞帶畫出來 */
.js .mark-ribbon path { stroke-dasharray: 100; stroke-dashoffset: 100; animation: draw 1.5s var(--ease) .15s forwards; }
.js .mark-ribbon path + path { animation-delay: .75s; animation-duration: .9s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* 光沿著緞帶流 */
.mark-flow path { stroke-dasharray: 9 91; opacity: .75; animation: flow 3.6s linear infinite; mix-blend-mode: overlay; }
.mark-flow path + path { stroke-dasharray: 14 86; animation-duration: 2.4s; animation-delay: -1s; }
@keyframes flow { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
html:not(.js) .mark-flow { display: none; }

.hero-hint {
  position: absolute; left: 0; right: 0; bottom: 26px;
  text-align: center; font-size: 13px; letter-spacing: .2em; color: var(--ink-3);
  animation: hint 2.4s ease-in-out infinite;
}
@keyframes hint { 50% { opacity: .35; translate: 0 4px; } }
.hint-touch { display: none; }
@media (hover: none) { .hint-pointer { display: none; } .hint-touch { display: inline; } }
html:not(.js) .hero-hint { display: none; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; align-content: center; padding: 96px 0 80px; text-align: center; }
  .hero-stage { order: 1; }
  .hero-copy { order: 2; }
  .mark { width: min(78%, 340px); }
  .hero-title { font-size: clamp(26px, 8.6vw, 44px); }
  .hero-sub { margin-inline: auto; }
  /* 只有首頁開場置中；內頁的開場是靠左的 */
  .hero .hero-actions { justify-content: center; }
}

/* ── 段落共用 ─────────────────────────────────────────────── */

.section { padding: clamp(80px, 12vw, 150px) 0; }
.section-last { padding-bottom: clamp(100px, 14vw, 170px); }
.section-title {
  margin-top: 14px;
  font-size: clamp(30px, 4.2vw, 50px); line-height: 1.25; font-weight: 900;
}
.section-lead { margin-top: 20px; max-width: 36em; color: var(--ink-2); }

/* 進場：只有掛了 .js 才先藏起來 */
.js .reveal { opacity: 0; translate: 0 28px; transition: opacity .8s var(--ease), translate .8s var(--ease); }
.js .reveal.in { opacity: 1; translate: 0 0; }

/* ── 關於：程式碼 → 介面 ──────────────────────────────────── */

.builder {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px;
  margin-top: 48px; align-items: stretch;
}

.editor {
  border-radius: var(--radius); overflow: hidden;
  background: var(--code-bg); color: var(--code-ink);
  box-shadow: var(--shadow);
  font-family: var(--mono); font-size: clamp(12px, 1.25vw, 15px); line-height: 2;
}
.editor-bar { display: flex; align-items: center; gap: 7px; padding: 14px 18px; border-bottom: 1px solid rgb(255 255 255 / 8%); }
.editor-bar i { width: 11px; height: 11px; border-radius: 50%; background: rgb(255 255 255 / 18%); }
.editor-bar span { margin-left: 10px; font-size: 12px; color: rgb(205 216 255 / 55%); }
.editor-lines { counter-reset: ln; padding: 18px 18px 26px; min-height: 11.5em; }
.editor-lines li { counter-increment: ln; display: flex; gap: 16px; white-space: pre-wrap; word-break: break-all; }
.editor-lines li::before { content: counter(ln); flex: none; width: 1.2em; text-align: right; color: rgb(205 216 255 / 35%); }
.editor-lines li.typing::after {
  content: ""; width: 2px; height: 1.3em; margin: .35em 0 0 -12px; background: var(--cyan);
  animation: caret .8s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

.built { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.block {
  display: flex; flex-direction: column; justify-content: center; gap: 6px;
  padding: 20px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.block strong { font-size: 19px; line-height: 1.35; }
/* 只管直接的那一層：大數字裡面也有 span，不能被這條縮小 */
.block > span, .block-company div span { font-size: 13px; color: var(--ink-3); }
.block-company { grid-column: 1 / -1; flex-direction: row; justify-content: flex-start; align-items: center; gap: 16px; }
.block-company div { display: flex; flex-direction: column; }
.block-years strong { font-size: 54px; line-height: 1; font-weight: 900; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.block-years small { font-size: 20px; margin-left: 4px; }
.block-product { grid-column: 1 / -1; }
.chip {
  align-self: flex-start; padding: 3px 12px; border-radius: 999px;
  background: var(--bg-soft); color: var(--blue) !important; font-size: 12px !important; font-weight: 700;
}
.chip-soon { background: var(--grad-btn); color: #fff !important; }

/* 還沒被「寫出來」的方塊 */
.js .block.pending { opacity: 0; transform: translateY(18px) scale(.94); }

.prose { margin-top: 56px; max-width: 40em; display: grid; gap: 22px; color: var(--ink-2); font-size: 18px; }

@media (max-width: 860px) {
  .builder { grid-template-columns: 1fr; }
}

/* ── 卡片 ─────────────────────────────────────────────────── */

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.card {
  padding: 32px 28px 36px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.card-no { font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--blue); }
.card h3 { margin-top: 26px; font-size: 22px; }
.card p { margin-top: 10px; color: var(--ink-2); font-size: 16px; }

/* 光暈跟著游標：--gx / --gy 由 main.js 更新；tilt 也是 */
.glow {
  position: relative; isolation: isolate;
  transform: perspective(900px) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg));
  transition: transform .35s var(--ease), border-color .3s;
}
.glow::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: radial-gradient(340px circle at var(--gx, 50%) var(--gy, 50%), var(--glow-a), transparent 65%);
  opacity: 0; transition: opacity .35s;
}
.glow:hover { border-color: color-mix(in srgb, var(--blue) 45%, var(--line)); }
.glow:hover::before { opacity: 1; }

@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } }

/* ── 產品：身分切換 ───────────────────────────────────────── */

.roles { margin-top: 44px; }
.role-tabs {
  display: inline-flex; gap: 4px; padding: 5px; border-radius: 999px;
  background: var(--bg-soft); border: 1px solid var(--line);
  max-width: 100%; overflow-x: auto;
}
.role-tabs button {
  min-height: 44px; padding: 0 22px; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink-2); font-weight: 700; font-size: 15px; white-space: nowrap; cursor: pointer;
  transition: background-color .25s, color .25s, box-shadow .25s;
}
.role-tabs button[aria-selected="true"] { background: var(--grad-btn); color: #fff; box-shadow: 0 6px 18px rgb(79 70 255 / 30%); }

.role-panel {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(28px, 6vw, 72px); align-items: center;
  margin-top: 36px;
}
.phone {
  width: min(280px, 78vw); padding: 10px; border-radius: 38px;
  background: var(--ink); box-shadow: var(--shadow);
}
@media (prefers-color-scheme: dark) { .phone { background: #1c2647; } }
.phone-screen {
  height: 400px; padding: 26px 16px; border-radius: 29px;
  background: var(--bg); overflow: hidden;
  transition: opacity .25s, transform .25s var(--ease);
}
.phone-screen.swap { opacity: 0; transform: translateX(14px); }
.phone-head { font-weight: 800; font-size: 17px; }
.phone-rows { display: grid; gap: 10px; margin-top: 18px; }
.phone-rows li {
  display: flex; align-items: center; gap: 10px; padding: 12px;
  border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
  font-size: 13px; line-height: 1.4;
}
.phone-rows b {
  flex: none; min-width: 46px; padding: 4px 6px; border-radius: 8px; text-align: center;
  background: var(--bg-soft); color: var(--blue); font-size: 12px;
}

.role-copy { transition: opacity .25s; }
.role-copy.swap { opacity: 0; }
.role-copy h3 { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.35; }
.role-copy ul { display: grid; gap: 14px; margin-top: 22px; color: var(--ink-2); }
.role-copy li { position: relative; padding-left: 26px; }
.role-copy li::before {
  content: ""; position: absolute; left: 0; top: .62em; width: 12px; height: 12px; border-radius: 50%;
  background: var(--grad);
}

@media (max-width: 720px) {
  .role-panel { grid-template-columns: 1fr; justify-items: center; }
  .role-copy { justify-self: stretch; }
}

/* ── 合作諮詢 ─────────────────────────────────────────────── */

.cta {
  padding: clamp(36px, 7vw, 76px); border-radius: 32px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.cta > p:not(.eyebrow) { margin-top: 20px; max-width: 34em; color: var(--ink-2); }
.cta .btn { margin-top: 32px; }
.cta .cta-note { margin-top: 14px; font-size: 14px; color: var(--ink-3); }

/* ── 聯絡 ─────────────────────────────────────────────────── */

.contact { text-align: center; }
.contact-mail {
  display: inline-block; margin-top: 30px;
  font-size: clamp(19px, 3.6vw, 40px); font-weight: 800; overflow-wrap: anywhere;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  border-bottom: 2px solid var(--line); padding-bottom: 6px;
  transition: border-color .3s;
}
.contact-mail:hover { border-color: var(--blue); }

/* ── 頁尾 ─────────────────────────────────────────────────── */

.footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 44px 0 max(44px, env(safe-area-inset-bottom)); }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 24px 40px; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand div { display: flex; flex-direction: column; line-height: 1.4; }
.footer-brand span { font-size: 13px; color: var(--ink-3); letter-spacing: .06em; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 15px; color: var(--ink-2); }
.footer-links a { padding: 6px 0; }
.footer-links a:hover { color: var(--blue); }
.footer-legal { grid-column: 1 / -1; font-size: 13px; color: var(--ink-3); }

@media (max-width: 720px) { .footer-inner { grid-template-columns: 1fr; } }

/* ══ 第二階段：內頁、手機版選單 ═════════════════════════════ */

/* ── 頂欄：目前這一頁 ＋ 手機版的開關 ─────────────────────── */

.nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }

.nav-toggle {
  display: none; position: relative; width: 44px; height: 44px; flex: none;
  border: 1px solid var(--line); border-radius: 50%; background: var(--surface); cursor: pointer;
}
.nav-toggle span {
  position: absolute; left: 13px; right: 13px; height: 2px; border-radius: 2px; background: var(--ink);
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 25px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 40;
  display: grid; align-content: center; padding: 96px var(--gutter) 48px;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  opacity: 0; transition: opacity .3s;
}
.menu[hidden] { display: none; }
.menu.open { opacity: 1; }
.menu nav { display: grid; gap: 6px; }
.menu a {
  padding: 14px 0; font-size: 30px; font-weight: 900; line-height: 1.3;
  border-bottom: 1px solid var(--line);
  translate: 0 16px; opacity: 0; transition: translate .45s var(--ease), opacity .45s;
}
.menu.open a { translate: 0 0; opacity: 1; }
.menu.open a:nth-child(2) { transition-delay: .05s; }
.menu.open a:nth-child(3) { transition-delay: .1s; }
.menu.open a:nth-child(4) { transition-delay: .15s; }
.menu.open a:nth-child(5) { transition-delay: .2s; }
.menu a[aria-current="page"] { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

@media (max-width: 860px) {
  /* 選單開關只有 JS 在的時候才有用；沒有 JS 就留著原本那顆按鈕 */
  .js .nav-toggle { display: block; }
  .js .nav .nav-cta { display: none; }
  .js .nav .nav-toggle { margin-left: auto; }
}

/* ── 語言切換 ─────────────────────────────────────────────── */

.nav-lang {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 36px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 13px; font-weight: 700; color: var(--ink-2);
  transition: border-color .25s, color .25s;
}
.nav-lang:hover { border-color: var(--blue); color: var(--ink); }
.menu a.menu-lang { font-size: 18px; font-weight: 700; color: var(--blue); border-bottom: 0; margin-top: 12px; }
.menu.open a:nth-child(6) { transition-delay: .25s; }
.footer-legal a { text-decoration: underline; text-underline-offset: 3px; }
.footer-legal a:hover { color: var(--blue); }
@media (max-width: 860px) { .nav-lang { margin-left: auto; } .js .nav .nav-toggle { margin-left: 0; } }

/* 沒有 JS 時四個身分的說明全部攤開，中間要有間隔 */
.role-text:not([hidden]) + .role-text:not([hidden]) { margin-top: 32px; }

/* ── 英文版的字級與字距 ───────────────────────────────────── */

/* 中文一個字佔一格，英文字窄而長：同樣的字級英文標題會顯得太擠，行高也要放鬆一點 */
:lang(en) body, html:lang(en) { letter-spacing: 0; }
html:lang(en) .hero-title,
html:lang(en) .page-title,
html:lang(en) .section-title,
html:lang(en) .vision blockquote { letter-spacing: -.02em; line-height: 1.12; font-weight: 800; }
html:lang(en) .nav-links { gap: 24px; }
/* 英文標題字數多，同樣的字級會折成三行 */
html:lang(en) .page-title { font-size: clamp(32px, 5vw, 60px); }
html:lang(en) .prose, html:lang(en) .page-lead, html:lang(en) .hero-sub { line-height: 1.65; }

/* ── 內頁的開場 ───────────────────────────────────────────── */

.page-hero { padding: clamp(140px, 20vw, 220px) 0 clamp(40px, 6vw, 70px); }
.page-hero-sm { padding-top: clamp(120px, 16vw, 170px); }
.page-hero::before {
  content: ""; position: absolute; inset: 0 -50vw; z-index: -1; pointer-events: none;
  background:
    radial-gradient(560px circle at 78% 30%, var(--glow-a), transparent 70%),
    radial-gradient(620px circle at 92% 70%, var(--glow-b), transparent 70%);
  -webkit-mask-image: linear-gradient(#000 50%, transparent);
  mask-image: linear-gradient(#000 50%, transparent);
}
.page-title { margin-top: 16px; font-size: clamp(34px, 6vw, 72px); line-height: 1.2; font-weight: 900; }
.page-lead { margin-top: 24px; max-width: 32em; font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); }
.page-hero .cta-note { margin-top: 14px; font-size: 14px; color: var(--ink-3); }

.more { display: inline-flex; gap: 8px; font-weight: 700; color: var(--blue); border-bottom: 2px solid transparent; transition: border-color .25s, gap .25s var(--ease); }
.more:hover { border-color: var(--blue); gap: 14px; }
.wrap > p:has(> .more) { margin-top: 32px; }

/* ── 關於：四個事實、兩欄、願景 ───────────────────────────── */

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 0; }
.fact { padding: 26px 24px 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.fact dt { font-size: 13px; font-weight: 700; letter-spacing: .12em; color: var(--ink-3); }
.fact dd {
  margin: 14px 0 0; font-size: clamp(34px, 4.4vw, 52px); line-height: 1.1; font-weight: 900;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.fact dd small { font-size: 16px; font-weight: 700; }
.fact dd.fact-text { font-size: clamp(26px, 3vw, 34px); line-height: 1.5; }

.split { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 80px); align-items: start; }
.split .prose { margin-top: 0; }

.vision { margin: 0; padding: clamp(40px, 8vw, 96px) clamp(28px, 6vw, 80px); border-radius: 32px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.vision blockquote { margin: 22px 0 0; font-size: clamp(28px, 4.6vw, 56px); line-height: 1.35; font-weight: 900; }

.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.cta-actions .btn { margin-top: 0; }

@media (max-width: 860px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
}

/* ── 產品：四步一圈 ───────────────────────────────────────── */

.loop { margin-top: 48px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.loop-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.loop-step {
  width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 18px;
  padding: 22px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; text-align: left;
  transition: border-color .3s, box-shadow .3s, transform .3s var(--ease), background-color .3s;
}
.loop-step b { font-family: var(--mono); font-size: 13px; color: var(--blue); }
.loop-step span { font-size: clamp(20px, 2.4vw, 26px); font-weight: 900; }
.loop-step:hover { border-color: var(--blue); }
.loop-step.on { background: var(--grad-btn); border-color: transparent; color: #fff; box-shadow: 0 14px 34px rgb(79 70 255 / 32%); transform: translateY(-4px); }
.loop-step.on b { color: rgb(255 255 255 / 75%); }

.loop-panels { display: grid; }
/* 四塊疊在同一格，高度取最高的那一塊 —— 切換時版面不會跳 */
.loop-panel { grid-area: 1 / 1; opacity: 0; visibility: hidden; translate: 0 12px; transition: opacity .4s, translate .4s var(--ease), visibility 0s .4s; }
.loop-panel.on { opacity: 1; visibility: visible; translate: 0 0; transition-delay: 0s; }
.loop-panel h3 { font-size: clamp(22px, 2.8vw, 32px); line-height: 1.35; }
.loop-panel p { margin-top: 14px; color: var(--ink-2); max-width: 30em; }
/* 沒有 JS：四塊全部攤開 */
html:not(.js) .loop-panel { grid-area: auto; opacity: 1; visibility: visible; translate: none; margin-bottom: 24px; }

@media (max-width: 860px) { .loop { grid-template-columns: 1fr; } }

/* ── 手機框裡放真的畫面 ───────────────────────────────────── */

.phone-screen { padding: 0; height: auto; aspect-ratio: 540 / 1090; }
.phone-screen img { width: 100%; height: 100%; object-fit: cover; }

/* ── 合作諮詢：兩欄卡片、三步 ─────────────────────────────── */

.cards-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .cards-2 { grid-template-columns: 1fr; } }

.steps { display: grid; gap: 0; margin-top: 44px; max-width: 46em; }
.steps li { display: flex; gap: 24px; padding: 26px 0; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps b {
  flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%;
  background: var(--grad-btn); color: #fff; font-family: var(--mono);
}
.back-to-form { margin-top: 44px; }
.steps h3 { font-size: 21px; }
.steps p { margin-top: 4px; color: var(--ink-2); }

/* ── 聯絡 ─────────────────────────────────────────────────── */

/* 卡片張數會變（電話那張拿掉過），所以不寫死欄數 */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; max-width: 820px; }
.contact-card {
  display: flex; flex-direction: column; gap: 14px; padding: 30px 28px 32px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.contact-card strong { font-size: clamp(18px, 1.7vw, 22px); line-height: 1.4; overflow-wrap: anywhere; }
.contact-hint { font-size: 14px; color: var(--ink-3); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.company { margin: 56px 0 0; display: grid; gap: 0; max-width: 40em; }
.company div { display: flex; gap: 24px; padding: 16px 0; border-top: 1px solid var(--line); }
.company dt { flex: none; width: 6em; color: var(--ink-3); font-size: 15px; }
.company dd { margin: 0; }
.company + .cta-note { margin-top: 28px; font-size: 14px; color: var(--ink-3); }

/* ── 隱私權政策 ───────────────────────────────────────────── */

/* 限寬放在每一段上，不放在容器上 —— 容器要跟上面的標題對齊同一條左邊線 */
.legal > * { max-width: 44em; }
.section:has(.legal) { padding-top: 20px; }
.legal h2 { margin-top: 48px; font-size: 22px; }
.legal p, .legal ul { margin-top: 14px; color: var(--ink-2); }
.legal ul { display: grid; gap: 8px; padding-left: 1.3em; list-style: disc; }
.legal a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.legal strong { color: var(--ink); }
.legal .legal-meta { margin-top: 0; padding: 16px 20px; border-radius: 14px; background: var(--bg-soft); font-size: 15px; }
.legal > .legal-meta:last-child { margin-top: 48px; }

/* ══ 第四階段：一次問一題的表單 ═════════════════════════════ */

.talk, .talk-done {
  margin-top: 44px; max-width: 760px;
  padding: clamp(26px, 5vw, 52px); border-radius: 28px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
/* 表單裡要打字，整塊跟著游標傾斜會很難對準 */
.talk.glow, .talk-done.glow { transform: none; }

.talk-bar { height: 4px; border-radius: 4px; background: var(--bg-soft); overflow: hidden; }
.talk-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--grad); transition: width .5s var(--ease); }
.talk-count { margin-top: 14px; font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--ink-3); }
/* 進度只有在一次一題的時候才有意義 */
html:not(.js) .talk-bar, html:not(.js) .talk-count { display: none; }

.talk-step { margin: 28px 0 0; padding: 0; border: 0; min-width: 0; }
.js .talk-step:not(.on) { display: none; }
.js .talk-step.on { animation: talk-in .45s var(--ease); }
@keyframes talk-in { from { opacity: 0; translate: 0 14px; } }

.talk-q { display: block; padding: 0; font-size: clamp(22px, 3.2vw, 34px); line-height: 1.35; font-weight: 900; }
.talk-sub { display: block; margin-top: 22px; font-size: 15px; font-weight: 700; color: var(--ink-2); }

.talk input[type="text"], .talk input[type="email"], .talk input[type="tel"], .talk textarea {
  width: 100%; margin-top: 18px; padding: 14px 2px;
  border: 0; border-bottom: 2px solid var(--line); border-radius: 0;
  background: transparent; color: var(--ink);
  font: inherit; font-size: clamp(18px, 2.2vw, 22px);
  transition: border-color .25s;
}
.talk .talk-sub + input { margin-top: 4px; }
.talk textarea { resize: vertical; min-height: 7em; line-height: 1.6; }
.talk input::placeholder { color: var(--ink-3); opacity: .7; }
.talk input:focus, .talk textarea:focus { outline: none; border-bottom-color: var(--blue); }
.talk input:focus-visible, .talk textarea:focus-visible { outline: none; box-shadow: 0 2px 0 var(--blue); }
.talk [aria-invalid="true"] { border-bottom-color: #d92d4b; }

.talk-choices { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.talk-choices label { position: relative; cursor: pointer; }
.talk-choices input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.talk-choices span {
  display: inline-flex; align-items: center; min-height: 52px; padding: 0 24px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg);
  font-weight: 700; transition: border-color .25s, background-color .25s, color .25s, box-shadow .25s;
}
.talk-choices label:hover span { border-color: var(--blue); }
.talk-choices input:checked + span { background: var(--grad-btn); border-color: transparent; color: #fff; box-shadow: 0 8px 22px rgb(79 70 255 / 30%); }
.talk-choices input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 3px; }

.talk-turnstile { margin-top: 22px; min-height: 65px; }
.talk-consent { margin-top: 14px; font-size: 14px; color: var(--ink-3); }
.talk-consent a, .talk-done a, .talk-noscript a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }

/* 蜜罐：移出畫面而不是 display:none —— 有些機器人會跳過 display:none 的欄位 */
.talk-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.talk-error { min-height: 1.75em; margin-top: 16px; font-size: 15px; font-weight: 700; color: #d92d4b; }
@media (prefers-color-scheme: dark) { .talk-error { color: #ff7a90; } .talk [aria-invalid="true"] { border-bottom-color: #ff7a90; } }

.talk-nav { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.talk-nav [data-next] { margin-left: auto; min-width: 140px; }
.talk-nav button { cursor: pointer; }
.talk-nav button:disabled { opacity: .6; cursor: progress; }
html:not(.js) .talk-nav { display: none; }

.talk-done h3 { font-size: clamp(24px, 3.4vw, 36px); line-height: 1.3; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.talk-done p { margin-top: 14px; color: var(--ink-2); }
.talk-done:focus { outline: none; }
.talk-noscript { margin-top: 20px; color: var(--ink-2); }

/* ── 減少動態 ─────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .block.pending { opacity: 1; translate: none; transform: none; }
  .js .mark-ribbon path { stroke-dashoffset: 0; }
  .mark-flow, .hero-hint, .thread-head { display: none; }
}
