/* 設計系統：工程筆記本 —— 暖白紙、墨色字、訊號橘強調、方格紙底紋、等寬字標註 */
:root {
  --paper: #f4f1ea;
  --paper-2: #ebe6da;
  --card: #fbfaf6;
  --ink: #17191a;
  --ink-2: #3b3e3c;
  --muted: #6d6a62;
  --line: #d9d3c5;
  --line-strong: #b9b09c;
  --accent: #c8431a;
  --accent-ink: #ffffff;
  --accent-soft: #f6dccf;
  --pcb: #1d5a44;
  --pcb-soft: #d5e5da;
  --ok: #1d6b45;
  --bad: #b3261e;
  --grid: rgb(23 25 26 / .055);
  --shadow: 0 1px 0 rgb(23 25 26 / .04), 0 12px 32px -18px rgb(23 25 26 / .28);
  --sans: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --radius: 14px;
  --wrap: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #101211;
    --paper-2: #161917;
    --card: #181b19;
    --ink: #ece8df;
    --ink-2: #c9c5bb;
    --muted: #9a978d;
    --line: #2b302d;
    --line-strong: #444a46;
    --accent: #ff7a45;
    --accent-ink: #1a0d06;
    --accent-soft: #3a2117;
    --pcb: #67bf95;
    --pcb-soft: #1b2e25;
    --ok: #67bf95;
    --bad: #f2837a;
    --grid: rgb(236 232 223 / .045);
    --shadow: 0 1px 0 rgb(0 0 0 / .3), 0 16px 40px -20px rgb(0 0 0 / .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #101211;
  --paper-2: #161917;
  --card: #181b19;
  --ink: #ece8df;
  --ink-2: #c9c5bb;
  --muted: #9a978d;
  --line: #2b302d;
  --line-strong: #444a46;
  --accent: #ff7a45;
  --accent-ink: #1a0d06;
  --accent-soft: #3a2117;
  --pcb: #67bf95;
  --pcb-soft: #1b2e25;
  --ok: #67bf95;
  --bad: #f2837a;
  --grid: rgb(236 232 223 / .045);
  --shadow: 0 1px 0 rgb(0 0 0 / .3), 0 16px 40px -20px rgb(0 0 0 / .7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.7 var(--sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.mono { font-family: var(--mono); letter-spacing: 0; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -48px; background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; }

/* ---------- 頁首 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: .02em; }
.brand-mark { width: 30px; height: 30px; flex: none; color: var(--ink); }
.brand-mark .pin { stroke: var(--accent); }
.brand small { font: 500 12px/1 var(--mono); color: var(--muted); letter-spacing: 0; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  text-decoration: none; font-size: 14px; color: var(--ink-2); padding: 6px 12px; border-radius: 999px;
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--paper-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--paper-2); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { background: var(--paper-2); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-sun { display: none; }
:root[data-theme="dark"] .theme-sun { display: block; }
:root[data-theme="dark"] .theme-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-sun { display: block; }
  :root:not([data-theme="light"]) .theme-moon { display: none; }
}

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  font: 600 15px/1 var(--sans); text-decoration: none; cursor: pointer;
  padding: 12px 18px; border-radius: 999px; border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper);
  transition: transform .15s, background .15s, border-color .15s, color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 16px; height: 16px; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.sm { padding: 8px 14px; font-size: 14px; }
.btn[disabled] { opacity: .55; cursor: default; transform: none; }

/* ---------- 共用排版 ---------- */
.eyebrow {
  font: 500 12.5px/1.4 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em;
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; }
.section { padding: 112px 0 0; }
.section-head { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 40px; }
.section-num { font: 500 13px/1 var(--mono); color: var(--accent); }
.section-title { font-size: clamp(28px, 4vw, 40px); line-height: 1.2; margin: 0; letter-spacing: -.01em; font-weight: 800; }
.section-lead { color: var(--ink-2); max-width: 46em; margin: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; font: 500 13px/1 var(--sans);
  padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}

/* ---------- 首頁 Hero ---------- */
.hero { position: relative; padding: 72px 0 24px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 70% at 30% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 30%, #000 30%, transparent 75%);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero h1 {
  font-size: clamp(38px, 5.2vw, 60px); line-height: 1.12; letter-spacing: -.02em; margin: 18px 0 22px; font-weight: 900;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--ink-2); max-width: 32em; margin: 0 0 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.now {
  margin-top: 40px; display: inline-flex; align-items: center; gap: 10px;
  font: 13px/1.5 var(--mono); color: var(--muted);
  padding: 8px 14px 8px 12px; border: 1px dashed var(--line-strong); border-radius: 999px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pcb); box-shadow: 0 0 0 4px var(--pcb-soft); flex: none; }

.plate { position: relative; padding: 14px; margin: 0; justify-self: end; width: 100%; max-width: 460px; }
.plate::before, .plate::after {
  content: ""; position: absolute; width: 22px; height: 22px; border: 0 solid var(--ink);
}
.plate::before { top: 0; left: 0; border-top-width: 1.5px; border-left-width: 1.5px; }
.plate::after { bottom: 0; right: 0; border-bottom-width: 1.5px; border-right-width: 1.5px; }
.plate img { border-radius: 10px; aspect-ratio: 4 / 5; object-fit: cover; width: 100%; background: var(--paper-2); }
.plate figcaption { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; font: 12px/1.4 var(--mono); color: var(--muted); }
.plate figcaption b { color: var(--ink); font-weight: 600; white-space: nowrap; }
.plate figcaption span { text-align: right; }

/* ---------- 關於 ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.about-text p { margin: 0 0 16px; color: var(--ink-2); font-size: 17px; }
.about-text p:first-child { font-size: 20px; color: var(--ink); line-height: 1.6; }
.skill-groups { display: grid; gap: 14px; }
.skill-group { padding: 20px 22px; }
.skill-group h3 { margin: 0 0 12px; font-size: 14px; display: flex; align-items: center; gap: 8px; font-weight: 700; }
.skill-group h3 .mono { color: var(--muted); font-weight: 500; font-size: 12px; margin-left: auto; }

/* ---------- 作品 ---------- */
.work-feature {
  display: grid; grid-template-columns: .9fr 1.1fr; overflow: hidden; text-decoration: none; color: inherit;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.work-feature:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.work-feature:hover .arrow { transform: translateX(4px); }
.work-media { position: relative; background: var(--paper-2); min-height: 360px; }
.work-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.work-media .badge {
  position: absolute; left: 16px; top: 16px; font: 600 12px/1 var(--mono);
  background: var(--accent); color: var(--accent-ink); padding: 7px 10px; border-radius: 6px;
}
.work-body { padding: 36px 40px; display: flex; flex-direction: column; gap: 18px; }
.work-body h3 { margin: 0; font-size: clamp(24px, 3vw, 32px); line-height: 1.25; letter-spacing: -.01em; font-weight: 800; }
.work-body h3 small { display: block; font-size: 16px; font-weight: 600; color: var(--muted); margin-top: 6px; letter-spacing: 0; }
.work-body p { margin: 0; color: var(--ink-2); }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric { padding: 16px 14px 14px 0; }
.metric + .metric { padding-left: 14px; border-left: 1px solid var(--line); }
.metric b { display: block; font: 700 26px/1.1 var(--mono); letter-spacing: -.02em; }
.metric span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.more { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--accent); margin-top: auto; }
.arrow { transition: transform .2s; width: 18px; height: 18px; }
.work-next {
  margin-top: 16px; padding: 22px 26px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted);
}
.work-next b { color: var(--ink); }

/* ---------- 經歷 ---------- */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 1.5px solid var(--line); }
.timeline li { position: relative; padding: 0 0 32px 28px; display: grid; grid-template-columns: 150px 1fr; gap: 16px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -6px; top: 8px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--paper); border: 1.5px solid var(--ink-2);
}
.timeline li.now-item::before { background: var(--pcb); border-color: var(--pcb); box-shadow: 0 0 0 4px var(--pcb-soft); }
.timeline time { font: 13px/1.9 var(--mono); color: var(--muted); }
.timeline h3 { margin: 0 0 4px; font-size: 17px; }
.timeline p { margin: 0; color: var(--ink-2); font-size: 15px; }

/* ---------- 頁尾 ---------- */
.site-footer { margin-top: 128px; border-top: 1px solid var(--line); padding: 32px 0 48px; font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.site-footer a { color: var(--ink-2); }

/* ---------- 作品頁 ---------- */
.case-hero { padding: 56px 0 8px; position: relative; }
.back { display: flex; width: fit-content; align-items: center; gap: 6px; text-decoration: none; color: var(--muted); font-size: 14px; margin-bottom: 28px; }
.back:hover { color: var(--ink); }
.case-hero h1 { font-size: clamp(38px, 6vw, 68px); line-height: 1.08; letter-spacing: -.02em; margin: 16px 0 10px; font-weight: 900; }
.case-hero .subtitle { font-size: clamp(19px, 2.4vw, 26px); color: var(--ink-2); margin: 0 0 32px; font-weight: 600; }
.case-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--ink); margin: 0; }
.case-meta div { padding: 16px 16px 0 0; }
.case-meta div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.case-meta dt { font: 12px/1.4 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.case-meta dd { margin: 6px 0 0; font-size: 15px; font-weight: 600; }
.case-gallery { display: grid; grid-template-columns: 1fr 1.25fr .7fr; gap: 16px; margin-top: 48px; }
.case-gallery figure { margin: 0; min-width: 0; }
.case-gallery img {
  width: 100%; height: clamp(240px, 32vw, 420px); object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--card);
}
figcaption.cap { font: 12px/1.5 var(--mono); color: var(--muted); margin-top: 8px; }

.case-layout { display: grid; grid-template-columns: 200px 1fr; gap: 56px; margin-top: 96px; align-items: start; }
.toc { position: sticky; top: 96px; font-size: 14px; }
.toc p { font: 12px/1 var(--mono); color: var(--muted); margin: 0 0 14px; text-transform: uppercase; letter-spacing: .06em; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: toc; }
.toc a { display: flex; gap: 10px; padding: 6px 10px; border-radius: 8px; text-decoration: none; color: var(--muted); counter-increment: toc; }
.toc a::before { content: counter(toc, decimal-leading-zero); font: 12px/1.9 var(--mono); }
.toc a:hover { color: var(--ink); background: var(--paper-2); }
.toc a.active { color: var(--ink); background: var(--paper-2); font-weight: 600; }
.toc a.active::before { color: var(--accent); }

.prose { min-width: 0; }
.prose > section { padding-bottom: 88px; }
.prose h2 { font-size: clamp(26px, 3.4vw, 34px); line-height: 1.25; margin: 10px 0 20px; letter-spacing: -.01em; font-weight: 800; }
.prose h3 { font-size: 18px; margin: 0 0 8px; }
.prose p { color: var(--ink-2); margin: 0 0 16px; max-width: 42em; font-size: 17px; }
.prose strong { color: var(--ink); }
.pull {
  margin: 28px 0; padding: 24px 28px; border-left: 3px solid var(--accent); background: var(--card);
  border-radius: 0 var(--radius) var(--radius) 0; font-size: 20px; line-height: 1.55; font-weight: 600; max-width: 38em;
}
.pull span { display: block; font: 12px/1 var(--mono); color: var(--muted); margin-top: 12px; font-weight: 400; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 28px; }
.feature { padding: 24px; }
.feature .ico {
  width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 16px;
  background: var(--accent-soft); color: var(--accent);
}
.feature .ico svg { width: 22px; height: 22px; }
.feature p { font-size: 15px; margin: 0; }

.diagram { padding: 24px; margin-top: 24px; overflow-x: auto; }
.diagram svg { width: 100%; min-width: 640px; height: auto; display: block; }
.diagram .node { fill: var(--card); stroke: var(--line-strong); stroke-width: 1.5; }
.diagram .node.hl { fill: var(--accent-soft); stroke: var(--accent); }
.diagram .node.pcb { fill: var(--pcb-soft); stroke: var(--pcb); }
.diagram .t { fill: var(--ink); font: 700 15px var(--sans); }
.diagram .s { fill: var(--muted); font: 12px var(--mono); }
.diagram .edge { stroke: var(--ink-2); stroke-width: 1.5; fill: none; }
.diagram .edge.dash { stroke-dasharray: 5 5; }
.diagram .lbl { fill: var(--ink-2); font: 600 12px var(--mono); }
.diagram .lbl-bg { fill: var(--paper); }
.diagram .arrowhead { fill: var(--ink-2); }

.steps { display: grid; gap: 14px; margin-top: 28px; }
.step { display: grid; grid-template-columns: 56px 1fr auto; gap: 18px; padding: 22px 24px; align-items: start; }
.step .n { font: 700 28px/1 var(--mono); color: var(--line-strong); }
.step p { font-size: 15px; margin: 0; }
.verdict { font: 600 12.5px/1 var(--mono); padding: 7px 10px; border-radius: 6px; white-space: nowrap; }
.verdict.no { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.verdict.yes { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.step.win { border-color: var(--pcb); }
.step.win .n { color: var(--pcb); }
.photo-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 20px; }
.photo-row figure { margin: 0; }
.photo-row img { aspect-ratio: 3 / 4; object-fit: cover; width: 100%; border-radius: 12px; border: 1px solid var(--line); background: var(--card); }
.photo-row .wide img { aspect-ratio: 4 / 3; }

.phones { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 28px; }
.phone { margin: 0; }
.phone .frame {
  border-radius: 28px; padding: 7px; background: var(--ink); box-shadow: var(--shadow);
}
.phone img { border-radius: 22px; aspect-ratio: 9 / 19.5; object-fit: cover; object-position: top; width: 100%; background: #fff; }
.phone figcaption { margin-top: 12px; font-size: 14px; font-weight: 600; }
.phone figcaption span { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 28px; }
.compare .card { padding: 24px; }
.compare h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.compare ul { margin: 12px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 15px; }
.compare li { margin-bottom: 6px; }
.compare .chosen { border-color: var(--pcb); }
.report { margin-top: 18px; }
.report img { border-radius: 12px; border: 1px solid var(--line); background: #fff; }

.log { margin-top: 24px; padding: 8px 0; font: 13.5px/1.6 var(--mono); overflow: hidden; }
.log li { list-style: none; display: grid; grid-template-columns: 76px 1fr; gap: 12px; padding: 12px 22px; border-top: 1px solid var(--line); }
.log li:first-child { border-top: 0; }
.log ul { margin: 0; padding: 0; }
.log .tag { font-weight: 700; }
.log .tag.err { color: var(--bad); }
.log .tag.fix { color: var(--ok); }
.log code { color: var(--ink); background: var(--paper-2); padding: 1px 6px; border-radius: 4px; font-size: 12.5px; word-break: break-word; }
.log .m { color: var(--ink-2); }

.big-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 28px; }
.big-metrics .card { padding: 22px; }
.big-metrics b { display: block; font: 800 34px/1 var(--mono); letter-spacing: -.03em; color: var(--accent); }
.big-metrics span { display: block; margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.big-metrics + p { margin-top: 24px; }

.next-case { margin-top: 8px; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 28px 32px; }

/* ---------- 登入 ---------- */
.auth-body { min-height: 100vh; display: flex; flex-direction: column; }
.auth-main { flex: 1; display: grid; place-items: center; padding: 48px 16px; position: relative; }
.auth-main::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at 50% 45%, #000 20%, transparent 65%);
  -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 20%, transparent 65%);
}
.auth-card { width: min(400px, 100%); padding: 36px 32px 30px; }
.auth-card h1 { font-size: 26px; margin: 14px 0 6px; letter-spacing: -.01em; }
.auth-card > p { margin: 0 0 26px; color: var(--muted); font-size: 14.5px; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.input {
  font: 16px/1.4 var(--sans); color: var(--ink); background: var(--paper); width: 100%;
  border: 1px solid var(--line-strong); border-radius: 10px; padding: 11px 13px;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.auth-card .btn { width: 100%; margin-top: 8px; padding: 13px 18px; }
.form-msg { min-height: 22px; margin: 12px 0 0; font-size: 14px; color: var(--bad); }
.auth-note { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; }
.auth-note svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }

/* ---------- 404 ---------- */
.notfound { text-align: center; }
.notfound .code { font: 800 clamp(72px, 14vw, 140px)/1 var(--mono); letter-spacing: -.04em; color: var(--accent); }
.notfound p { color: var(--ink-2); }

/* ---------- 進場動畫 ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- 響應式 ---------- */
@media (max-width: 960px) {
  .hero-grid, .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero .plate { max-width: 440px; justify-self: start; }
  .work-feature { grid-template-columns: 1fr; }
  .work-media { min-height: 0; aspect-ratio: 4 / 3; }
  .case-layout { grid-template-columns: 1fr; gap: 0; margin-top: 64px; }
  .toc { display: none; }
  .phones { grid-template-columns: repeat(2, 1fr); }
  .big-metrics { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nav { display: none; }
  .header-actions { margin-left: auto; }
  .section { padding-top: 80px; }
  .hero { padding-top: 40px; }
  .work-body { padding: 26px 22px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(3) { padding-left: 0; border-left: 0; }
  .metric:nth-child(n+3) { border-top: 1px solid var(--line); }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .case-meta { grid-template-columns: 1fr 1fr; }
  .case-meta div:nth-child(3) { padding-left: 0; border-left: 0; }
  .case-gallery { grid-template-columns: 1fr 1fr; }
  .case-gallery figure:first-child { grid-column: 1 / -1; }
  .case-gallery img { height: 240px; }
  .features, .compare { grid-template-columns: 1fr; }
  .step { grid-template-columns: 40px 1fr; }
  .step .verdict { grid-column: 2; justify-self: start; }
  .photo-row { grid-template-columns: 1fr 1fr; }
  .log li { grid-template-columns: 1fr; gap: 2px; padding: 12px 16px; }
  .work-next, .next-case { flex-direction: column; align-items: flex-start; }
  .brand small { display: none; }
}

a.card { text-decoration: none; color: inherit; }
.next-case:hover .arrow { transform: translateX(4px); }
.next-case .arrow { color: var(--accent); }
