/* ==========================================================================
   Portfolio — 共用樣式
   1. Tokens / Base
   2. 版面容器
   3. 導覽列 / 頁尾
   4. 首頁
   5. 專案卡片
   6. 內頁通用（頁首、圖廊）
   7. 案例頁元件
   8. RWD
   ========================================================================== */

/* ---------- 1. Tokens / Base ---------- */
:root{
  --ink:#191B1C;          /* 碳黑（微冷調） */
  --ink-2:#464A4C;
  --muted:#82898C;
  --accent:#00809D;       /* 主青：白底 4.59:1，小字達 WCAG AA */
  --accent-bright:#00A0C4; /* 亮青：僅用於 24px 以上大字（門檻 3:1） */
  --accent-hover:#00637A;
  --accent-2:#7EC6DA;      /* 中階青：圖表次要節點、路線圖第二階 */
  --accent-soft:#E9F8FC;
  --accent-line:#BEE6F0;
  --bg:#FBFCFC;
  --surface:#ffffff;
  --line:#E3E6E7;
  --warn:#f5b942;
  --info:#4a90d9;
  --nav-h:64px;
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  font-family:"Noto Sans TC",ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
  background:var(--bg); color:var(--ink);
  line-height:1.75; -webkit-font-smoothing:antialiased;
}
img{max-width:100%}
a{color:inherit}
.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;
}

/* ---------- 2. 版面容器 ---------- */
.wrap{max-width:1080px; margin:0 auto; padding:0 32px}

/* ---------- 3. 導覽列 / 頁尾 ---------- */
.nav{
  position:sticky; top:0; z-index:50;
  height:var(--nav-h); display:flex; align-items:center;
  background:rgba(251,252,252,.9); backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
.nav .wrap{display:flex; align-items:center; justify-content:space-between; width:100%}
.nav-logo{
  font-size:16px; font-weight:700; letter-spacing:-.01em;
  text-decoration:none; color:var(--ink);
}
.nav-links{display:flex; gap:28px; list-style:none}
.nav-links a{
  font-size:14.5px; color:var(--ink-2); text-decoration:none;
  padding:4px 0; border-bottom:1.5px solid transparent;
}
.nav-links a:hover{color:var(--ink)}
.nav-links a[aria-current="page"]{color:var(--accent); border-bottom-color:var(--accent); font-weight:600}
.nav-right{display:flex; align-items:center; gap:26px}
.nav-cta{
  font-size:13.5px; font-weight:600; text-decoration:none;
  background:var(--ink); color:#fff; padding:9px 18px; border-radius:999px;
  white-space:nowrap;
}
.nav-cta:hover{background:#33383A}

.site-footer{
  margin-top:0; background:var(--ink); color:#fff;
  padding:64px 0 28px;
}
.site-footer .wrap{display:block}
.foot-top{
  display:flex; flex-wrap:wrap; gap:40px 80px;
  align-items:flex-start; justify-content:space-between;
}
.foot-brand{max-width:34ch}
.foot-name{font-size:17px; font-weight:700; letter-spacing:-.01em; margin-bottom:4px}
.foot-name a{text-decoration:none; color:#fff; border-bottom:1px solid transparent}
.foot-name a:hover{border-bottom-color:rgba(255,255,255,.5)}
.foot-note{font-size:14px; color:#9AA1A4; letter-spacing:.02em}
.foot-desc{font-size:14px; color:#C3C8CA; margin-top:14px; line-height:1.8}
.foot-nav{display:flex; gap:64px}
.foot-col ul{list-style:none; display:flex; flex-direction:column; gap:12px}
.foot-col-title{
  font-size:14px; font-weight:700; letter-spacing:.08em;
  color:#9AA1A4; text-transform:uppercase; margin-bottom:16px;
}
.foot-col a{
  font-size:16px; color:#D6DADB; text-decoration:none;
  border-bottom:1px solid transparent; padding-bottom:1px;
}
.foot-col a:hover{color:var(--accent-bright); border-bottom-color:var(--accent-bright)}
.foot-bottom{
  margin-top:56px; padding-top:22px; border-top:1px solid rgba(255,255,255,.12);
  display:flex; flex-wrap:wrap; gap:8px 24px; justify-content:space-between;
  font-size:14px; color:#9AA1A4;
}

/* ---------- 4. 首頁 ---------- */
.home-hero{padding:96px 0 100px}
.hero-center{display:flex; justify-content:center; text-align:center}
.hero-center .hero-text{max-width:44em}

/* 進場動效：由下往上淡入，靠 --d 控制每個元素的延遲 */
@keyframes reveal-up{
  from{opacity:0; transform:translateY(14px)}
  to  {opacity:1; transform:none}
}
.reveal{
  opacity:0;
  animation:reveal-up .62s cubic-bezier(.22,.61,.36,1) both;
  animation-delay:var(--d,0ms);
}
/* 尊重系統的「減少動態效果」設定 */
@media(prefers-reduced-motion:reduce){
  .reveal{animation:none; opacity:1; transform:none}
}

.home-hero .greeting{
  font-size:17px; font-weight:600; color:var(--ink-2); margin-bottom:14px;
}
.home-hero .greeting b{color:var(--ink); font-weight:700}
.home-hero h1{
  font-size:clamp(36px,5.6vw,64px); line-height:1.16; font-weight:700;
  letter-spacing:-.035em;
}
.home-hero h1 .accent{color:var(--accent-bright)}
.home-hero .intro{
  margin:30px auto 0; max-width:36em; font-size:16px; color:var(--ink-2);
}
.home-hero .intro + .intro{margin-top:18px}
.home-tags{margin-top:32px; display:flex; flex-wrap:wrap; gap:10px; justify-content:center}
/* 內頁 hero 為左對齊排版，標籤也跟著靠左 */
.hero .home-tags{justify-content:flex-start}
.label{
  display:inline-flex; align-items:center; gap:9px;
  font-size:14px; line-height:1.4; font-weight:600;
  padding:6px 12px; border-radius:8px;
  background:transparent; border:1px solid var(--accent-line);
  color:var(--ink);
}
/* Lucide 圖示（24×24、stroke-width 2） */
.label svg{
  flex:none; width:18px; height:18px;
  fill:none; stroke:var(--accent); stroke-width:2;
  stroke-linecap:round; stroke-linejoin:round;
}

.section{padding:72px 0; border-top:1px solid var(--line)}
.section-head{
  display:flex; align-items:baseline; justify-content:space-between;
  gap:20px; margin-bottom:36px; flex-wrap:wrap;
}
.section-head h2{font-size:clamp(20px,2.4vw,26px); font-weight:700; letter-spacing:-.01em}
.section-head .more{
  font-size:14.5px; color:var(--accent); text-decoration:none; font-weight:600;
}
.section-head .more:hover{text-decoration:underline}
.section-desc{margin:-24px 0 34px; max-width:40em; font-size:15.5px; color:var(--ink-2)}

/* 分類入口 */
.cat-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:16px}
.cat{
  display:block; text-decoration:none;
  background:var(--surface); border:1px solid var(--line); border-radius:10px;
  padding:26px 26px 24px; transition:border-color .15s, transform .15s;
}
.cat:hover{border-color:var(--accent-line); transform:translateY(-2px)}
.cat h3{font-size:16.5px; font-weight:700; margin-bottom:8px}
.cat p{font-size:14.5px; color:var(--ink-2); line-height:1.75}
.cat .cat-count{
  display:block; font-size:12.5px; font-weight:700; letter-spacing:.08em;
  color:var(--muted); margin-bottom:10px;
}

/* 關於我 */
.about-grid{display:grid; grid-template-columns:1.25fr 1fr; gap:56px; align-items:start}
.about-grid p{font-size:16px; color:var(--ink-2); margin-bottom:18px}
.about-grid p:last-child{margin-bottom:0}
.skill-block{margin-bottom:26px}
.skill-block:last-child{margin-bottom:0}
.skill-block dt{
  font-size:13.5px; font-weight:700; color:var(--muted);
  letter-spacing:.04em; margin-bottom:8px;
}
.skill-block dd{font-size:15.5px; color:var(--ink-2); line-height:1.85}

/* 聯絡 */
.contact{padding:76px 0 84px; border-top:1px solid var(--line); background:var(--surface)}
.contact h2{font-size:clamp(22px,2.8vw,30px); font-weight:700; letter-spacing:-.01em}
.contact p{margin-top:16px; max-width:34em; font-size:16px; color:var(--ink-2)}
.contact-list{margin-top:30px; display:flex; flex-wrap:wrap; gap:14px}
.btn{
  display:inline-block; text-decoration:none; font-size:15px; font-weight:600;
  padding:13px 24px; border-radius:8px;
  background:var(--accent); color:#fff; border:1px solid var(--accent);
}
.btn:hover{background:var(--accent-hover); border-color:var(--accent-hover)}
.btn.is-ghost{background:var(--surface); color:var(--ink); border-color:var(--line)}
.btn.is-ghost:hover{background:#F6F9FA; border-color:#C6D2D6}

/* ---------- 5. 專案卡片 ---------- */
.cards{display:grid; grid-template-columns:repeat(2,1fr); gap:28px}
.cards.is-single{grid-template-columns:1fr}
.cards.is-three{grid-template-columns:repeat(3,1fr); gap:20px}

.card{
  display:flex; flex-direction:column; text-decoration:none;
  background:var(--surface); border:1px solid var(--line); border-radius:12px;
  overflow:hidden; transition:border-color .15s, transform .15s, box-shadow .15s;
}
a.card:hover{
  border-color:var(--accent-line); transform:translateY(-3px);
  box-shadow:0 8px 22px rgba(16,44,54,.09);
}
.card-thumb{
  aspect-ratio:16/10; overflow:hidden;
  background:linear-gradient(180deg,#F7FAFB 0%,#E9F1F4 100%);
  display:flex; align-items:center; justify-content:center; padding:26px 26px 0;
}
.card-thumb img{
  display:block; width:100%; height:auto;
  filter:drop-shadow(0 8px 18px rgba(16,44,54,.13));
}
.card-thumb.is-empty{
  background:#F1F4F5; color:var(--muted);
  font-size:13.5px; padding:0;
}
/* 滿版縮圖（整張簡報當封面用） */
.card-thumb.is-flat{padding:0; background:#fff}
.card-thumb.is-flat img{
  width:100%; height:100%; object-fit:cover; filter:none;
}
.card-body{padding:24px 26px 26px; display:flex; flex-direction:column; flex:1}
.card-kicker{
  font-size:12.5px; font-weight:700; letter-spacing:.06em;
  color:var(--accent); margin-bottom:10px;
}
.card h3{font-size:18px; font-weight:700; line-height:1.5; letter-spacing:-.01em}
.card .card-desc{margin-top:10px; font-size:15px; color:var(--ink-2); line-height:1.75}
.card-meta{
  margin-top:16px; padding-top:14px; border-top:1px solid var(--line);
  font-size:13.5px; color:var(--muted);
  display:flex; flex-wrap:wrap; gap:6px 16px;
}
.card-tag{
  display:inline-block; margin-left:8px; vertical-align:2px;
  font-size:13px; font-weight:700; letter-spacing:.02em;
  color:var(--ink-2); background:#EFF2F3;
  border:1px solid var(--line); border-radius:999px; padding:1px 10px;
}
.card.is-wip .card-thumb img{opacity:.86}

.card.is-soon{opacity:.72}
.card.is-soon .card-kicker{color:var(--muted)}

/* 分組列表（總覽頁） */
/* 分隔線畫在 .wrap 內，寬度與內容對齊（不滿版）；標題下方的第一個分類也有 */
.group{padding:0 0 66px}
.group:first-of-type{margin-top:40px}
.group > .wrap::before{
  content:""; display:block; padding-top:66px;
  border-top:1px solid var(--line);
}
.group-head{margin-bottom:32px}
.group-head h2{font-size:clamp(19px,2.2vw,24px); font-weight:700; letter-spacing:-.01em}
.group-head p{margin-top:10px; max-width:40em; font-size:15.5px; color:var(--ink-2)}

/* ---------- 6. 內頁通用 ---------- */
.page-head{padding:72px 0 8px}
.page-head .eyebrow{
  font-size:14px; letter-spacing:.06em; color:var(--accent);
  font-weight:700; margin-bottom:14px;
}
.page-head h1{
  font-size:clamp(28px,3.8vw,42px); line-height:1.34; font-weight:700;
  letter-spacing:-.02em; max-width:18em;
}
.page-head .page-desc{
  margin-top:18px; max-width:40em; font-size:16.5px; color:var(--ink-2);
}
.back-link{
  display:inline-block; margin-bottom:22px;
  font-size:14.5px; color:var(--ink-2); text-decoration:none;
}
.back-link:hover{color:var(--accent)}

/* 圖廊 */
.gallery{
  margin-top:44px; padding-bottom:80px;
  display:grid; grid-template-columns:repeat(3,1fr); gap:18px;
}
.g-item{
  background:var(--surface); border:1px solid var(--line); border-radius:10px;
  overflow:hidden;
}
.g-item img{display:block; width:100%; height:auto}
.g-empty{
  aspect-ratio:4/3; display:flex; align-items:center; justify-content:center;
  background:#F1F4F5; color:var(--muted); font-size:13.5px;
}
.g-cap{padding:14px 16px 16px; font-size:13.5px; color:var(--ink-2); line-height:1.65}
.g-cap b{display:block; color:var(--ink); font-weight:600; margin-bottom:2px}

/* 簡報式案例（整頁圖依序呈現，無縫接合） */
.slides{display:block; padding-bottom:76px}
.slide{
  border:0; border-radius:0; box-shadow:none;
  margin:0; font-size:0; line-height:0;
}
.slide img{display:block; width:100%; height:auto; vertical-align:top}
/* 圖片之間留間距的版本（插畫等作品集） */
.slides.is-spaced{display:flex; flex-direction:column; gap:16px}

/* 嵌入式簡報（Figma Slides） */
.embed-block{margin:56px 0 12px}
.embed-frame{
  position:relative; aspect-ratio:16/9; width:100%;
  border:1px solid var(--line); border-radius:10px; overflow:hidden;
  background:var(--surface);
}
.embed-frame iframe{
  position:absolute; inset:0; width:100%; height:100%; border:0; display:block;
}
.embed-block .cap{
  margin-top:12px; font-size:14px; line-height:1.6; color:var(--ink-2);
}
.embed-block .cap a{color:var(--accent); text-decoration:underline}
.embed-block .cap a:hover{color:var(--accent-hover)}

/* 下一個專案 */
.next-project{border-top:1px solid var(--line); padding:56px 0 64px}
.next-project a{
  display:flex; align-items:baseline; justify-content:space-between; gap:20px;
  text-decoration:none; flex-wrap:wrap;
}
.next-project .np-label{font-size:13.5px; color:var(--muted); font-weight:700; letter-spacing:.06em}
.next-project .np-title{font-size:clamp(19px,2.4vw,26px); font-weight:700; letter-spacing:-.01em}
.next-project a:hover .np-title{color:var(--accent)}

/* 待補標記 */
.tbd{color:var(--muted); font-weight:600}

/* ---------- 7. 案例頁元件 ---------- */
.hero{padding:20px 0 80px; border-bottom:1px solid var(--line)}
.eyebrow{
  font-size:14px; letter-spacing:.06em; color:var(--accent);
  font-weight:700; margin-bottom:16px;
}
.hero h1{
  font-size:clamp(30px,4.6vw,52px); line-height:1.32; font-weight:700;
  letter-spacing:-.02em; max-width:16em;
}
/* 產品主視覺 */
.hero-shot{
  margin-top:44px; border-radius:12px; overflow:hidden;
  background:linear-gradient(180deg,#F7FAFB 0%,#E9F1F4 100%);
  display:flex; justify-content:center;
  padding:44px 40px 36px;
}
.hero-shot img{
  display:block; width:100%; max-width:820px; height:auto;
  filter:drop-shadow(0 14px 30px rgba(16,44,54,.14));
}

/* 專案資訊卡：橫向三欄 */
.brief{
  margin-top:52px; display:grid; grid-template-columns:0.72fr 0.78fr 1.5fr;
  background:var(--surface); border:1px solid var(--line); border-radius:8px;
  overflow:hidden;
}
.brief > div{padding:28px 30px; border-right:1px solid var(--line)}
.brief > div:last-child{border-right:0}
.brief dt{
  font-size:14px; color:var(--muted); letter-spacing:.04em; margin-bottom:8px;
}
.brief dd{font-size:16px; color:var(--ink-2); line-height:1.9}
.brief dd b{color:var(--ink); font-weight:600}
.caption{
  margin-top:14px; font-size:16px; line-height:1.75; color:var(--ink-2);
}
.caption b{color:var(--ink); font-weight:600; display:block; margin-bottom:2px}
.hero-cap{margin-top:20px; max-width:50em; font-size:16px}

/* 前後對比 */
.ctx{padding:88px 0 96px}
/* 簡報圖段落：標題在圖裡（HTML 標題設 sr-only），不需要文字段落那麼大的呼吸 */
.ctx.is-slide{padding:48px 0}
.sec-label{
  font-size:14px; letter-spacing:.06em; color:var(--muted);
  font-weight:700; margin-bottom:18px;
}
.ctx h2{
  font-size:clamp(20px,2.4vw,27px); font-weight:700; line-height:1.5;
  max-width:28em; letter-spacing:-.005em;
  text-wrap:balance;
}
/* 畫面比對 */
.ba{margin-top:48px; display:grid; grid-template-columns:1fr 1fr; gap:28px}
.ba-tag{
  display:inline-block; font-size:13.5px; font-weight:700; letter-spacing:.04em;
  padding:6px 12px; border-radius:5px; margin-bottom:12px;
}
.ba-tag.is-before{background:#f1f2f1; color:#6c7570}
.ba-tag.is-after{background:var(--accent-soft); color:#00637A}
.ba-img{
  background:var(--surface); border:1px solid var(--line); border-radius:8px;
  overflow:hidden; height:400px; display:flex; align-items:flex-start;
}
.ba-img img, .ba-img svg{display:block; width:100%; height:auto}
.ba-cap{
  margin-top:14px; font-size:14.5px; line-height:1.7; color:var(--ink-2);
}
.ba-list{
  margin:18px 0 0; padding:0; list-style:none; counter-reset:ba;
  display:grid; gap:13px;
}
.ba-list li{
  counter-increment:ba; position:relative; padding-left:29px;
  font-size:15px; line-height:1.72; color:var(--ink-2);
}
.ba-list li::before{
  content:counter(ba); position:absolute; left:0; top:2px;
  width:20px; height:20px; border-radius:50%;
  background:#f0f1f0; color:#6c7570;
  font-size:11.5px; font-weight:700; line-height:20px; text-align:center;
}
.ba-list.is-after li::before{background:var(--accent-soft); color:#00637A}
.ba-list b{
  display:block; color:var(--ink); font-weight:600; font-size:15px;
  margin-bottom:1px;
}

/* 功能比對表 */
.cmp-wrap{
  margin-top:52px; border:1px solid var(--line); border-radius:8px;
  overflow:hidden; background:var(--surface);
}
.cmp{width:100%; border-collapse:collapse; font-size:15.5px}
.cmp th, .cmp td{
  text-align:left; padding:15px 20px; border-bottom:1px solid var(--line);
  vertical-align:top; line-height:1.7;
}
.cmp thead th{
  font-size:14px; font-weight:700; color:var(--muted); letter-spacing:.04em;
  background:#fafbfa; padding-top:13px; padding-bottom:13px;
}
.cmp thead th:last-child{color:#00637A; background:var(--accent-soft)}
.cmp tbody th{font-weight:600; color:var(--ink); width:22%}
.cmp td{width:39%}
.cmp td.no{color:var(--muted)}
.cmp td.yes{color:var(--ink-2); background:#F5FCFD}
.cmp tbody tr:last-child th, .cmp tbody tr:last-child td{border-bottom:0}

/* 設計核心 */
.decision{padding:80px 0; border-top:1px solid var(--line)}
.dgrid{
  display:grid; grid-template-columns:0.92fr 1.08fr; gap:60px; align-items:center;
}
.dgrid.flip .dtext{order:2}
.dgrid.top{align-items:start}
.dnum{
  font-size:14px; letter-spacing:.14em; font-weight:700; color:var(--accent);
  margin-bottom:14px;
}
.dtext h3{
  font-size:clamp(19px,2.2vw,25px); font-weight:700; line-height:1.5;
  letter-spacing:-.005em; margin-bottom:22px;
}
.qa{display:grid; gap:16px}
.qa div{display:grid; grid-template-columns:60px 1fr; gap:14px; align-items:baseline}
.qa dt, .qa .k{
  font-size:13.5px; font-weight:700; color:var(--muted); letter-spacing:.06em;
  padding-top:3px;
}
.qa .v{font-size:16.5px; color:var(--ink-2); line-height:1.8}
.qa .v b{color:var(--ink); font-weight:600}
.qa-wide div{grid-template-columns:94px 1fr}

.fig{
  background:var(--surface); border:1px solid var(--line); border-radius:8px;
  padding:26px 24px 18px;
}
.fig svg{display:block; width:100%; height:auto}
/* 圖例本身是為窄欄畫的，滿版時限制寬度避免被放太大 */
.fig.is-narrow svg{max-width:640px; margin:0 auto}
.fig.is-narrow .cap{max-width:640px; margin-left:auto; margin-right:auto}
/* 靠左版：圖例貼齊卡片左緣，與上方 fig-label 對齊 */
.fig.is-narrow.is-left svg,
.fig.is-narrow.is-left .cap{margin-left:0; margin-right:auto}
/* ---- Roadmap（三階段路線圖）：三欄等分、隨容器伸縮 ---- */
.roadmap{
  display:grid; grid-template-columns:repeat(3,1fr); gap:0 16px;
  align-items:start; margin-top:4px;
}
.rm-line{
  grid-column:1 / -1; grid-row:2; align-self:center;
  position:relative; height:2px; background:var(--accent-line);
}
.rm-line::after{
  content:""; position:absolute; right:0; top:50%;
  width:9px; height:9px; border-top:2px solid var(--accent-line);
  border-right:2px solid var(--accent-line); border-radius:1px;
  transform:translateY(-50%) rotate(45deg);
}
.rm-stage{
  grid-row:1; text-align:center; margin-bottom:8px;
  font-size:16px; font-weight:700; color:var(--accent-hover);
}
.rm-mark{
  grid-row:2; justify-self:center; z-index:1;
  display:flex; align-items:center; justify-content:center;
  width:22px; height:22px; background:var(--surface); border-radius:50%;
}
.rm-mark svg{width:16px; height:16px; fill:none}
.rm-card{
  grid-row:3; align-self:stretch; margin-top:14px; padding:16px 18px 18px;
  background:var(--accent-soft); border-radius:8px;
}
.rm-card h4{font-size:16px; font-weight:700; color:var(--ink); line-height:1.5}
.rm-card ul{margin-top:8px; padding-left:2px; list-style:none}
.rm-card li{
  font-size:14px; line-height:1.9; color:var(--ink-2);
  padding-left:14px; position:relative;
}
.rm-card li::before{
  content:""; position:absolute; left:2px; top:.85em;
  width:4px; height:4px; border-radius:50%; background:var(--accent);
}
.roadmap .c1{grid-column:1}
.roadmap .c2{grid-column:2}
.roadmap .c3{grid-column:3}

.fig-label{
  font-size:13px; font-weight:700; letter-spacing:.04em; color:var(--muted);
  margin-bottom:10px;
}
.fig-label.with-rule{
  margin-top:18px; padding-top:16px; border-top:1px solid var(--line);
}
.fig-img{
  display:block; width:60%; max-width:320px; height:auto; margin:6px auto 0;
  filter:drop-shadow(0 3px 10px rgba(16,44,54,.11));
}
.fig-img.is-wide{width:100%; max-width:none; border-radius:16px}

/* 文字在上、兩張圖並排在下 */
.dtext-wide{max-width:56em}
.dtext-wide .qa{max-width:52em}
.figs-2{
  margin-top:44px; display:grid; grid-template-columns:1fr 1fr; gap:24px;
  align-items:stretch;
}
.figs-2 .fig{display:flex; flex-direction:column}
.figs-2 .fig-img{width:72%; max-width:300px}
.figs-2 .fig-img.is-wide{width:100%; max-width:none}
.figs-2 .cap{margin-top:auto; padding-top:14px}
.fig .cap{
  margin-top:12px; font-size:14px; line-height:1.6; color:var(--ink-2);
}
.fig .cap b{color:var(--ink); font-weight:600; display:block; margin-bottom:2px}

/* 破格全寬 */
.decision.feature{background:#F2F6F7; border-top-color:#DFE6E8}
.decision.feature .dnum{color:var(--accent)}
.decision.feature .lead-block{max-width:none}
.decision.feature h3{
  font-size:clamp(21px,2.8vw,31px); line-height:1.45; margin-bottom:20px;
  max-width:22em;
}
/* 三個設計核心共用：問答改成三欄並排，沿用 .infocard / .ic-item 的樣式語彙 */
.decision .dtext-wide{max-width:none}
.decision .qa{
  margin-top:28px; max-width:none; gap:16px;
  grid-template-columns:repeat(3,1fr); align-items:stretch;
  /* 外層白卡：與「問題狀況 / 產品目標」同一組陰影與圓角 */
  background:var(--surface); border-radius:16px; padding:24px;
  box-shadow:0 3px 3px rgba(163,163,163,.10), 0 11px 5.5px rgba(163,163,163,.09),
             0 25px 7.5px rgba(163,163,163,.05), 0 44px 8.5px rgba(163,163,163,.01);
}
/* 內層色塊：問題用橘色系、其餘用綠色系，與「問題狀況 / 產品目標」一致 */
.decision .qa > div{
  display:block; border-radius:10px; padding:20px 22px; border:0;
  background:rgba(0,164,109,.05);
}
.decision .qa > div.is-problem{background:rgba(248,113,64,.05)}
.decision .qa dt{
  display:block; margin-bottom:8px; padding:0;
  font-size:14px; font-weight:700; letter-spacing:.04em; line-height:1.5;
  color:#00895C; background:none;
}
.decision .qa > div.is-problem dt{color:#D9542B}
.decision .qa .v{
  display:block; font-size:15.5px; line-height:1.7; color:var(--ink);
}
.decision .qa .v b{color:var(--ink); font-weight:700}
@media(max-width:860px){
  .decision .qa{grid-template-columns:1fr}
  .decision.feature h3{max-width:none}
}

/* 兩欄版的問答卡（背景 / 核心功能） */
.decision .qa.is-two{grid-template-columns:1fr 1fr}

/* ---- 畫面 + 編號註解：左圖右卡 ---- */
.shotset{
  margin-top:28px; display:grid; grid-template-columns:minmax(0,1fr) 300px;
  gap:16px; align-items:center;
}
.shotset + .shotset{margin-top:16px}
/* 換一組畫面時用分隔線斷開 */
.shotset.is-sep{
  margin-top:44px; padding-top:44px; border-top:1px solid var(--line);
}
.shot{
  display:block; width:100%; height:auto;
  border-radius:12px; overflow:hidden;
}
.notes{display:grid; gap:12px; align-content:start}
.note{
  background:var(--surface); border-radius:12px; padding:18px 20px;
  box-shadow:0 3px 3px rgba(163,163,163,.10), 0 11px 5.5px rgba(163,163,163,.09),
             0 25px 7.5px rgba(163,163,163,.05), 0 44px 8.5px rgba(163,163,163,.01);
}
.note h4{
  font-size:15px; font-weight:700; color:var(--ink); line-height:1.5;
  display:flex; gap:8px; align-items:baseline;
}
.note h4 .n{
  flex:none; font-size:14px; font-weight:900; letter-spacing:.06em; color:var(--accent);
}
.note p{margin-top:8px; font-size:14px; line-height:1.75; color:var(--ink-2)}
/* 註解卡裡的動畫展示：預設是靜態圖，Lottie 載入後才換掉 */
.motion{
  margin-top:14px; width:100%; max-width:200px; aspect-ratio:1;
  margin-inline:auto; position:relative;
}
/* 靜態圖與動畫都絕對定位：容器尺寸只由 aspect-ratio 決定，
   Lottie 初始化時量到的才會是正方形（否則 canvas 會被畫成兩倍高） */
.motion img, .motion .motion-stage{position:absolute; inset:0; width:100%; height:100%}
.motion img{object-fit:contain}
.motion .motion-stage canvas{display:block; width:100%; height:100%}
.motion.is-playing img{display:none}

.figs{margin-top:44px; display:grid; gap:20px}

/* ---------- 7b. 案例頁：資訊卡組（團隊資訊 / 問題狀況 / 產品目標） ---------- */
/* 白底卡片 + 內層淡色色塊：online-game / naniclub 共用 */
.infoset{
  margin-top:52px; padding-top:37px; border-top:1px solid var(--line);
  display:grid; gap:16px;
}
.infocard{
  background:var(--surface); border-radius:16px; padding:24px;
  box-shadow:0 3px 3px rgba(163,163,163,.10), 0 11px 5.5px rgba(163,163,163,.09),
             0 25px 7.5px rgba(163,163,163,.05), 0 44px 8.5px rgba(163,163,163,.01);
}
.infocard-title{
  display:flex; align-items:center; gap:8px;
  font-size:20px; font-weight:700; letter-spacing:.02em; color:var(--ink);
}
.infocard-title svg{
  flex:none; width:24px; height:24px;
  fill:none; stroke:currentColor; stroke-width:1.8;
  stroke-linecap:round; stroke-linejoin:round;
}
.infocard-title.is-team svg{stroke:#338CF1}
.infocard-title.is-problem svg{stroke:#F87140}
.infocard-title.is-goal svg{stroke:#00A46D}

.infocard-body{display:flex; gap:16px; padding-top:14px; align-items:stretch}

/* 團隊資訊：前兩欄依內容寬、第三欄撐滿 */
.ic-meta{
  background:rgba(51,140,241,.05); border-radius:10px;
  padding:20px 22px; display:flex; flex-direction:column;
  gap:8px; justify-content:center;
}
.ic-meta:last-child{flex:1 1 0; min-width:0}
.ic-meta dt{font-size:13px; color:#50565A}
.ic-meta dd{font-size:15.5px; color:var(--ink); line-height:1.5}

/* 條列項：編號 + 內文並排 */
.ic-item{
  flex:1 1 0; min-width:0; border-radius:10px; padding:20px 22px;
  display:flex; gap:12px; align-items:center;
}
.ic-item .n{
  flex:none; font-size:15px; font-weight:900; letter-spacing:.07em; line-height:1.45;
}
.ic-item p{flex:1 1 0; min-width:0; font-size:15.5px; color:var(--ink); line-height:1.6}
.ic-item.is-problem{background:rgba(248,113,64,.05)}
.ic-item.is-problem .n{color:rgba(248,113,64,.8)}
.ic-item.is-goal{background:rgba(0,164,109,.05)}
.ic-item.is-goal .n{color:rgba(0,164,109,.8)}

/* ---------- 7c. 案例頁：主視覺滿版圖 ---------- */
.hero-full{margin-top:24px; border-radius:16px; overflow:hidden; display:block}
.hero-full img{display:block; width:100%; height:auto}

/* 流程長圖：整張先給概觀，點擊在新分頁看原尺寸（規格文字才讀得到） */
.flowshot{
  display:block; margin-top:28px; border:1px solid var(--line); border-radius:12px;
  overflow:hidden; background:var(--surface); position:relative;
}
.flowshot img{display:block; width:100%; height:auto}
.flowshot:hover{border-color:var(--accent)}
.flowshot-hint{
  margin-top:10px; font-size:14px; color:var(--muted);
  display:flex; align-items:center; gap:6px;
}
.flowshot-hint svg{width:15px; height:15px; stroke:currentColor; fill:none; stroke-width:1.8}

/* ---------- 7d. UI 介面介紹：深色底 + 兩欄步驟卡 ---------- */
/* 整段深色，讓遊戲場景截圖不被白底切斷 */
.ctx.is-dark{
  background:#1D1D1F; color:#F4F5F6;
  padding-top:88px; padding-bottom:96px;
}
.ctx.is-dark .sec-label{color:#9AA1A4}
.ctx.is-dark h2{color:#FFFFFF}

.uisteps{margin-top:40px; display:grid; gap:24px}
.uirow{
  display:grid; grid-template-columns:1fr 1fr; gap:44px;
  position:relative; align-items:start;
}
/* 兩欄之間、以及每列之間的流向箭頭 */
.uirow::before{
  content:""; position:absolute; top:32%; left:50%; transform:translateX(-50%);
  width:20px; height:10px; pointer-events:none;
  background:no-repeat center/contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 10'%3E%3Cpath d='M0 5h17M13 1l4 4-4 4' fill='none' stroke='%2382898C' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.uicard{
  background:var(--surface); border-radius:14px; overflow:hidden;
  box-shadow:0 3px 3px rgba(163,163,163,.10), 0 11px 6px rgba(163,163,163,.08),
             0 25px 8px rgba(163,163,163,.05);
  display:flex; flex-direction:column; height:100%;
}
/* 深色底上不需要淺色陰影，改用微亮邊界 */
.ctx.is-dark .uicard{box-shadow:0 10px 26px rgba(0,0,0,.32)}
/* 箭頭在深色底上要提亮才看得到 */
.ctx.is-dark .uirow::before{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 10'%3E%3Cpath d='M0 5h17M13 1l4 4-4 4' fill='none' stroke='%23AEB4B7' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.uicard img{display:block; width:100%; height:auto}
.uicard-body{padding:13px 25px 16px}
.uicard-head{display:flex; align-items:baseline; gap:8px; margin-bottom:6px}
.uicard-head .n{
  font-size:15px; font-weight:900; letter-spacing:.07em; color:var(--accent);
}
.uicard-head h3{font-size:17px; font-weight:700; letter-spacing:.02em; color:var(--ink)}
.uicard-body ul{margin:0; padding-left:18px; list-style:none}
.uicard-body li{
  position:relative; font-size:15px; line-height:1.6; color:var(--ink-2);
}
.uicard-body li + li{margin-top:4px}
.uicard-body li::before{
  content:"・"; position:absolute; left:-18px; color:var(--muted);
}

/* ---------- 7e. 元件系統 & 場景設計 ---------- */
.sysgrid{
  margin-top:40px; display:grid; grid-template-columns:minmax(0,612px) minmax(0,380px);
  gap:24px; align-items:start; justify-content:space-between;
}
.sysshots{display:grid; grid-template-columns:1fr 1fr; gap:12px}
.sysshot{display:grid; gap:11px; align-content:start}
.sysshot img{display:block; width:100%; height:auto; border-radius:8px}
.sysnotes{display:grid; gap:24px; align-content:start; padding-top:44px}
.sysnote{
  background:var(--surface); border-radius:16px; padding:24px;
  box-shadow:0 3px 3px rgba(163,163,163,.10), 0 11px 5.5px rgba(163,163,163,.09),
             0 25px 7.5px rgba(163,163,163,.05);
}
.sysnote h3{font-size:17px; font-weight:700; letter-spacing:.02em; margin-bottom:8px}
.sysnote p{font-size:15px; line-height:1.7; color:var(--ink-2)}

.scenes{margin-top:44px; display:grid; grid-template-columns:1fr 1fr; gap:24px}
.scene img{display:block; width:100%; height:auto; border-radius:10px}
.scene-meta{
  margin-top:12px; display:flex; align-items:center; justify-content:space-between;
  gap:16px; flex-wrap:wrap;
}
.scene-meta h3{font-size:16px; font-weight:700; letter-spacing:.02em}
.swatches{display:flex; gap:8px}
.swatches span{
  width:32px; height:32px; border-radius:6px; display:block;
  border:1px solid rgba(25,27,28,.06);
}

/* 圖片尚未匯出時的佔位：保住版面高度，圖檔放進來就自動生效 */
.is-pending{
  background:#EEF1F2; border:1px dashed #C6D2D6; border-radius:8px;
  color:transparent; font-size:0;
}
.sysshot .is-pending{aspect-ratio:16/9; object-fit:cover}
.scene .is-pending{aspect-ratio:16/10; object-fit:cover; width:100%}

/* ---------- 8. RWD ---------- */
@media(max-width:900px){
  .sysgrid{grid-template-columns:1fr; gap:28px}
  .sysnotes{padding-top:0}
}
@media(max-width:820px){
  .infoset{margin-top:36px; padding-top:28px}
  .infocard{padding:20px}
  .infocard-body{flex-direction:column; gap:12px}
  .uirow{grid-template-columns:1fr; gap:20px}
  .uirow::before{display:none}
  .scenes{grid-template-columns:1fr; gap:28px}
  .sysshots{grid-template-columns:1fr}
}

/* ---------- 8. RWD（原有） ---------- */
@media(max-width:900px){
  .about-grid{grid-template-columns:1fr; gap:32px}
  .cat-grid{grid-template-columns:1fr}
  .cards, .cards.is-three{grid-template-columns:1fr; gap:20px}
  .roadmap{grid-template-columns:1fr; gap:0}
  .roadmap .c1, .roadmap .c2, .roadmap .c3{grid-column:1}
  .rm-line{display:none}
  .rm-stage{grid-row:auto; text-align:left; margin-bottom:6px}
  .rm-mark{grid-row:auto; justify-self:start; display:none}
  .rm-card{grid-row:auto; margin-top:0; margin-bottom:12px}
  .gallery{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:820px){
  .wrap{padding:0 20px}

  .dgrid{grid-template-columns:1fr; gap:32px}
  .dgrid.flip .dtext{order:0}
  .decision{padding:56px 0}
  .qa div{grid-template-columns:1fr; gap:2px}

  .hero-shot{padding:26px 20px 22px; margin-top:32px}
  .brief{grid-template-columns:1fr; margin-top:36px}
  .brief > div{border-right:0; border-bottom:1px solid var(--line); padding:24px 22px}
  .brief > div:last-child{border-bottom:0}
  .figs-2{grid-template-columns:1fr; gap:20px; margin-top:32px}
  .shotset{grid-template-columns:1fr; gap:14px}
  .decision .qa.is-two{grid-template-columns:1fr}
  .ba{grid-template-columns:1fr; gap:36px; margin-top:34px}
  .ba-img{height:auto; max-height:340px}
  .cmp-wrap{overflow-x:auto}
  .cmp{min-width:640px}
  .hero{padding:16px 0 56px}
  .ctx{padding:56px 0 64px}
  .ctx.is-slide{padding:36px 0}

  .nav-links{gap:18px}
  .nav-links a{font-size:14px}
  .nav-cta{display:none}
  .home-hero{padding:56px 0 60px}
  .section{padding:52px 0}
  .contact{padding:56px 0 64px}
  .group{padding:0 0 48px}
  .group:first-of-type{margin-top:32px}
  .group > .wrap::before{padding-top:48px}
  .page-head{padding:48px 0 4px}
  .gallery{grid-template-columns:1fr; margin-top:32px}
  .site-footer{padding:48px 0 24px}
  .foot-top{gap:32px}
  .foot-nav{gap:40px}
  .foot-bottom{margin-top:36px}
}

/* 流程箭頭：串接同一階段的畫面（取代分隔線），對齊左側畫面欄置中 */
.flow-arrow{
  display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:16px;
  margin:22px 0;
}
.flow-arrow svg{ grid-column:1; justify-self:center; color:var(--muted); display:block }
@media(max-width:820px){
  .flow-arrow{grid-template-columns:1fr; margin:14px 0}
}

/* 背景/核心功能卡片與下方畫面之間 */
.decision.feature .lead-block{
  margin-bottom:40px;               /* 分隔線 → 下方畫面 */
  padding-bottom:40px;              /* 卡片 → 分隔線 */
  border-bottom:1px solid var(--line);
}
.decision.feature .lead-block + .shotset{margin-top:0}
@media(max-width:820px){
  .decision.feature .lead-block{margin-bottom:26px; padding-bottom:26px}
}

/* Phase 02：GA 追蹤圖表小面板（左欄取代單張大圖） */
.ga-grid{ display:grid; grid-template-columns:1fr 1fr; gap:12px; align-items:start }
.ga-grid img{
  display:block; width:100%; height:auto; border-radius:10px;
  border:1px solid var(--line); background:var(--surface);
}
.ga-grid .ga-tall{ grid-row:span 2 }
@media(max-width:820px){
  .ga-grid{grid-template-columns:1fr}
  .ga-grid .ga-tall{grid-row:auto}
}

/* Phase 標題高亮字（核心流程／多篇批改／批改紀錄） */
.decision.feature h3 .hl{ color:var(--accent-bright) }

/* 同階段多個獨立功能：用間距斷開（非連續流程，不用箭頭或分隔線） */
.shotset.is-gap{ margin-top:52px }

/* 數據埋設區：純標題 lead-block，不加卡片下分隔線 */
.lead-block.is-plain{ border-bottom:0; margin-bottom:0; padding-bottom:0 }

/* 子區段標題（01 / 02） */
.subsec{
  display:flex; gap:10px; align-items:baseline;
  font-size:19px; font-weight:800; color:var(--ink); margin-top:40px; line-height:1.5;
}
.subsec .n{ flex:none; color:var(--accent); font-weight:900; letter-spacing:.04em }
.subsec.is-gap2{ margin-top:64px }

/* GA 追蹤卡：圖 + 參數/目的 */
.ga-cards{ margin-top:20px; display:grid; grid-template-columns:repeat(3,1fr); gap:16px; align-items:start }
.ga-card{
  background:var(--surface); border-radius:14px; padding:16px;
  box-shadow:0 3px 3px rgba(163,163,163,.10),0 11px 5.5px rgba(163,163,163,.09),0 25px 7.5px rgba(163,163,163,.05);
}
.ga-card > img{ display:block; width:100%; height:auto; border-radius:8px; border:1px solid var(--line) }
.ga-meta{ margin-top:14px; display:grid; gap:8px }
.ga-meta > div{ display:grid; grid-template-columns:40px 1fr; gap:10px; align-items:baseline }
.ga-meta dt{ font-size:13px; font-weight:700; color:var(--accent) }
.ga-meta dd{ font-size:14px; line-height:1.7; color:var(--ink-2) }

/* 批改紀錄註解裡的細項清單 */
.note-ul{ margin:6px 0 2px; padding-left:18px }
.note-ul li{ font-size:14px; line-height:1.75; color:var(--ink-2); list-style:disc }

/* Clarity 分析卡內分段（觀察／優化建議…） */
.nb{ margin-top:12px }
.nb:first-of-type{ margin-top:6px }
.nb .k{ display:inline-block; font-size:13px; font-weight:700; color:var(--accent); margin-bottom:4px }
.nb p{ font-size:14px; line-height:1.75; color:var(--ink-2) }

@media(max-width:820px){
  .ga-cards{ grid-template-columns:1fr }
  .shotset.is-gap{ margin-top:34px }
  .subsec{ margin-top:32px }
  .subsec.is-gap2{ margin-top:44px }
}
