/* capy 品牌網站。配色與圓角取自 app 自己的視覺規格 v2(internal/cli/webui/css/tokens.css):帶綠的深色、單一主色、
   系統字型。零外部資源:不抓字檔、不放分析、不設 cookie——隱私權政策寫的「這個網站不追蹤你」要名實相符。 */
:root {
  --ink: #0E1512;
  --surface: #16201B;
  --surface-2: #1E2A24;
  --line: #2B3A33;
  --line-hi: #6A7D73;
  --accent: #3FB27F;
  --accent-hi: #5CC596;
  --accent-dim: #2A6E52;
  --text: #DCE7E0;
  --text-hi: #F2F7F4;
  --muted: #8DA096;
  --warn: #D9A441;
  --r-lg: 16px;
  --r: 10px;
  --r-pill: 999px;
  --sans: -apple-system, "SF Pro Text", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, "Cascadia Mono", Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-hi); text-underline-offset: .2em; }
a:hover { color: var(--text-hi); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
code, kbd { font-family: var(--mono); font-size: .92em; background: var(--surface-2); padding: .1em .4em; border-radius: 6px; }

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.5rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: .5rem 1rem; border-radius: var(--r); z-index: 10; }

/* ── 頁首 ── */
.top { display: flex; align-items: center; gap: 1.5rem; padding: 1.25rem 0; }
.brand { font-family: var(--mono); font-weight: 700; font-size: 1.35rem; letter-spacing: -.03em; color: var(--text-hi); text-decoration: none; }
.brand span { color: var(--accent); }
.top nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; font-size: .9rem; }
.top nav a { color: var(--muted); text-decoration: none; padding: .25rem 0; }
.top nav a:hover, .top nav a[aria-current] { color: var(--text-hi); }
@media (max-width: 40rem) { .top { flex-wrap: wrap; gap: .5rem 1.5rem; } .top nav { margin-left: 0; width: 100%; } }
.top nav .lang { color: var(--text); border: 1px solid var(--line-hi); border-radius: var(--r-pill); padding: .1rem .7rem; }

/* ── 開場:左邊講話、右邊是牠。不置中。 ── */
.hero { display: grid; gap: 2.5rem; padding: 3rem 0 4.5rem; align-items: center; }
@media (min-width: 56rem) { .hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 3.5rem; padding-top: 4.5rem; } }
.eyebrow { font-size: .85rem; color: var(--accent-hi); letter-spacing: .04em; margin: 0 0 1rem; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); line-height: 1.12; letter-spacing: -.02em; color: var(--text-hi); margin: 0 0 1.25rem; text-wrap: balance; }
.lede { font-size: 1.1rem; max-width: 36rem; margin: 0 0 1rem; }
.lede--why { font-size: .95rem; color: var(--muted); border-left: 2px solid var(--accent-dim); padding-left: 1rem; margin-bottom: 2rem; }
.lede--why strong { color: var(--text); }
.cta { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; }
.btn { display: inline-block; text-decoration: none; font-weight: 600; border-radius: var(--r-pill); padding: .7rem 1.5rem; white-space: nowrap; transition: background 200ms var(--ease), transform 120ms var(--ease); }
.btn:active { transform: translateY(1px); }
.btn--go { background: var(--accent); color: var(--ink); }
.btn--go:hover { background: var(--accent-hi); color: var(--ink); }
.btn--quiet { color: var(--text-hi); border: 1px solid var(--line-hi); }
.btn--quiet:hover { background: var(--surface-2); }
.fine { font-size: .85rem; color: var(--muted); margin: 1.25rem 0 0; }

/* 路線示意:兩個平台之間,水豚站在虛線上,歌一首一首從牠腳下過去。純 CSS;reduced-motion 下是靜態構圖。 */
.route { background: var(--surface); border-radius: var(--r-lg); padding: 1.5rem 1.25rem 1.25rem; }
.route__ends { display: flex; justify-content: space-between; gap: 1rem; font-size: .85rem; }
.route__end { background: var(--surface-2); border-radius: var(--r); padding: .45rem .85rem; }
.route__end small { display: block; color: var(--muted); font-size: .72rem; line-height: 1.3; }
.route__lane { position: relative; height: 10.5rem; display: grid; place-items: end center; padding-bottom: 2.05rem; overflow: hidden; } /* 牠站在線上:svg 底緣離腳底約 .35rem */
.route__lane::before { content: ""; position: absolute; left: 0; right: 0; bottom: 2.4rem; border-top: 2px dashed var(--line); }
.route__song { position: absolute; bottom: .4rem; left: 0; font-size: .75rem; white-space: nowrap; background: var(--surface-2); color: var(--muted); border-radius: var(--r-pill); padding: .1rem .7rem; animation: carry 9s linear infinite; opacity: 0; }
.route__song:nth-of-type(2) { animation-delay: 3s; }
.route__song:nth-of-type(3) { animation-delay: 6s; }
@keyframes carry { 0% { transform: translateX(-30%); opacity: 0; } 8%, 88% { opacity: 1; } 100% { transform: translateX(24rem); opacity: 0; } }
.capy { position: relative; width: 13rem; max-width: 80%; height: auto; }
.capy__line { fill: var(--surface); stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.capy__ear { stroke-width: 3; transform-box: fill-box; transform-origin: 50% 100%; animation: ear 5.5s ease-in-out infinite; }
.capy__stroke { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }
.capy__dot { fill: var(--accent); }
.capy__eye { fill: var(--accent); transform-box: fill-box; transform-origin: center; animation: blink 4s ease-in-out infinite; }
@keyframes blink { 0%, 92%, 100% { transform: none; } 96% { transform: scaleY(.1); } }
@keyframes ear { 0%, 78%, 100% { transform: none; } 82% { transform: rotate(-16deg); } 86% { transform: rotate(5deg); } 90% { transform: rotate(-11deg); } 94% { transform: none; } }

/* ── 區塊 ── */
section { padding: 4rem 0; border-top: 1px solid var(--line); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.25; letter-spacing: -.01em; color: var(--text-hi); margin: 0 0 1rem; text-wrap: balance; }
h3 { font-size: 1.05rem; color: var(--text-hi); margin: 0 0 .35rem; }
p { margin: 0 0 1rem; max-width: 42rem; }
.split { display: grid; gap: 2rem; }
@media (min-width: 56rem) { .split { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 4rem; } .split > :first-child { position: sticky; top: 2rem; align-self: start; } }
.muted { color: var(--muted); }

.does { margin: 0; padding: 0; list-style: none; display: grid; gap: 1.75rem; }
.does li { padding-left: 1.1rem; border-left: 2px solid var(--accent-dim); }
.does p { margin: 0; color: var(--muted); }

.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 1.5rem; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: 1rem; }
.steps li::before { content: counter(s); width: 2.25rem; height: 2.25rem; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--accent-dim); color: var(--accent-hi); font-family: var(--mono); font-size: .9rem; }
.steps p { margin: 0; color: var(--muted); }

.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: .95rem; }
th, td { text-align: left; vertical-align: top; padding: .8rem 1rem .8rem 0; }
thead th { color: var(--accent-hi); font-weight: 600; border-bottom: 1px solid var(--accent-dim); white-space: nowrap; }
tbody tr + tr > * { border-top: 1px solid var(--line); }
tbody th { font-family: var(--mono); font-weight: 500; font-size: .85rem; color: var(--text-hi); white-space: nowrap; }
td { color: var(--muted); }

.where { margin: 0; display: grid; gap: 0; }
.where div { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 1rem; padding: .9rem 0; border-top: 1px solid var(--line); }
.where div:first-child { border-top: 0; }
.where dt { color: var(--text-hi); }
.where dd { margin: 0; color: var(--muted); }

pre { font-family: var(--mono); font-size: .88rem; line-height: 1.7; background: var(--surface); border-radius: var(--r-lg); padding: 1.25rem 1.4rem; overflow-x: auto; margin: 0 0 1rem; }
pre .p { color: var(--accent); user-select: none; }
pre .c { color: var(--muted); }

/* ── 文件頁(隱私權、條款) ── */
.doc { padding: 2.5rem 0 4rem; max-width: 46rem; }
.doc h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.doc h2 { font-size: 1.3rem; margin-top: 2.75rem; }
.doc .meta { color: var(--muted); font-size: .9rem; margin-bottom: 2rem; }
.doc ul { padding-left: 1.2rem; margin: 0 0 1rem; max-width: 42rem; }
.doc li { margin-bottom: .4rem; }
.doc .short { background: var(--surface); border-radius: var(--r-lg); padding: 1.25rem 1.4rem; margin: 0 0 2rem; }
.doc .short p:last-child { margin-bottom: 0; }

footer { border-top: 1px solid var(--line); padding: 2.5rem 0 3.5rem; color: var(--muted); font-size: .88rem; }
footer nav { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; margin-bottom: 1rem; }
footer a { color: var(--text); }
footer p { max-width: 46rem; margin: 0 0 .5rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .capy__eye, .capy__ear { animation: none; }
  .route__song { animation: none; opacity: 1; position: static; display: inline-block; margin: 0 .25rem; }
  .route__lane { height: auto; padding: 1rem 0 2.05rem; }
  .route__songs { position: absolute; bottom: .4rem; left: 0; right: 0; text-align: center; }
}
