/* ==========================================================================
 * Kymeet 官方網站樣式
 *
 * 刻意不使用 Tailwind：官網是一個獨立的靜態頁，不該為了幾百行樣式
 * 把建置流程、CSP 設定與會議程式綁在一起。純 CSS 也讓這一頁可以
 * 離線直接用瀏覽器開起來檢視。
 * ========================================================================== */

:root {
  --bg: #0e1016;
  --bg-soft: #151922;
  --bg-card: #191e29;
  --line: #262d3b;
  --line-soft: #1f2530;
  --fg: #eef1f7;
  --fg-dim: #a7b1c2;
  --fg-faint: #78839a;
  --accent: #6366f1;
  --accent-hi: #818cf8;
  --ok: #34d399;
  --warn: #fbbf24;
  --radius: 14px;
  --maxw: 1080px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Segoe UI', 'Microsoft JhengHei', 'PingFang TC', 'Noto Sans TC', system-ui,
    -apple-system, sans-serif;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-hi);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- 頁首 ---------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(14, 16, 22, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 62px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--fg);
  letter-spacing: 0.01em;
}

.brand:hover {
  text-decoration: none;
}

.mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
}

.navlinks {
  margin-left: auto;
  display: flex;
  gap: 22px;
  font-size: 0.9rem;
}

.navlinks a {
  color: var(--fg-dim);
}

.navlinks a:hover {
  color: var(--fg);
  text-decoration: none;
}

/* ---- 區塊 ---------------------------------------------------------------- */

section {
  padding: 76px 0;
  border-bottom: 1px solid var(--line-soft);
}

section:last-of-type {
  border-bottom: 0;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.2;
  margin: 0 0 18px;
  letter-spacing: -0.015em;
}

h2 {
  font-size: 1.5rem;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1rem;
  margin: 0 0 6px;
}

.lead {
  font-size: 1.1rem;
  color: var(--fg-dim);
  max-width: 62ch;
  margin: 0 0 32px;
}

.sub {
  color: var(--fg-faint);
  margin: 0 0 36px;
  max-width: 68ch;
}

/* ---- 按鈕 ---------------------------------------------------------------- */

.btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: 11px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, transform 0.15s;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hi);
}

.btn-ghost {
  background: var(--bg-card);
  border-color: var(--line);
  color: var(--fg);
}

.btn-ghost:hover {
  border-color: var(--fg-faint);
}

.btn-sub {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.3;
}

.btn-ghost .btn-sub {
  color: var(--fg-faint);
}

/* ---- 卡片格 -------------------------------------------------------------- */

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.card p {
  margin: 0;
  color: var(--fg-dim);
  font-size: 0.9rem;
}

.card .tag {
  font-size: 0.72rem;
  color: var(--fg-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
}

/* ---- 流程 ---------------------------------------------------------------- */

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.steps li {
  counter-increment: step;
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 20px 22px;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.16);
  color: var(--accent-hi);
  font-weight: 700;
  font-size: 0.82rem;
  margin-bottom: 10px;
}

.steps strong {
  display: block;
  margin-bottom: 4px;
}

.steps span {
  color: var(--fg-dim);
  font-size: 0.88rem;
}

/* ---- 功能清單 ------------------------------------------------------------ */

.features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px 26px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.features li {
  position: relative;
  padding-left: 24px;
  color: var(--fg-dim);
  font-size: 0.92rem;
}

.features li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 0.68em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.features li b {
  color: var(--fg);
  font-weight: 600;
}

/* ---- 下載 ---------------------------------------------------------------- */

.dl {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

.dl-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dl-card.suggested {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.35);
}

.dl-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.dl-head h3 {
  margin: 0;
}

.pill {
  font-size: 0.7rem;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.16);
  color: var(--accent-hi);
  white-space: nowrap;
}

.dl-meta {
  color: var(--fg-faint);
  font-size: 0.82rem;
  margin: 0;
}

.dl-card p.why {
  color: var(--fg-dim);
  font-size: 0.88rem;
  margin: 0;
  flex: 1;
}

.dl-card .btn {
  justify-content: center;
}

/* ---- 注意事項 ------------------------------------------------------------ */

.notes {
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--warn);
  border-radius: 10px;
  padding: 20px 24px;
  margin: 0;
}

.notes dt {
  font-weight: 600;
  margin-top: 14px;
  font-size: 0.93rem;
}

.notes dt:first-child {
  margin-top: 0;
}

.notes dd {
  margin: 4px 0 0;
  color: var(--fg-dim);
  font-size: 0.88rem;
}

/* ---- 表格 ---------------------------------------------------------------- */

.spec {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.spec th,
.spec td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}

.spec th {
  color: var(--fg-faint);
  font-weight: 500;
  white-space: nowrap;
  width: 11rem;
}

.spec tr:last-child th,
.spec tr:last-child td {
  border-bottom: 0;
}

/* ---- 頁尾 ---------------------------------------------------------------- */

footer {
  padding: 34px 0 48px;
  color: var(--fg-faint);
  font-size: 0.85rem;
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
}

footer .spacer {
  margin-left: auto;
}

/* ---- 手機 ---------------------------------------------------------------- */

@media (max-width: 640px) {
  section {
    padding: 52px 0;
  }

  .navlinks {
    display: none;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .spec th {
    width: auto;
  }
}

/* ---- 小工具類（避免 inline style，讓 CSP 可以維持嚴格） ------------------ */

.gap-top {
  margin-top: 26px;
}

.gap-top-sm {
  margin-top: 18px;
}

code {
  font-family: 'Cascadia Mono', Consolas, 'SF Mono', monospace;
  font-size: 0.86em;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
}

/* ==========================================================================
 *  多頁架構新增的樣式
 * ========================================================================== */

/* ---- 導覽列目前頁面 ------------------------------------------------------ */

.navlinks a.active {
  color: var(--fg);
  font-weight: 600;
}

.topbar .cta {
  padding: 7px 16px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
}

.topbar .cta:hover {
  background: var(--accent-hi);
  text-decoration: none;
}

/* 手機版導覽改成可橫向捲動的一列，不要整個藏起來 */
@media (max-width: 760px) {
  .topbar .wrap {
    height: auto;
    padding-top: 10px;
    padding-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px 16px;
  }

  .navlinks {
    display: flex;
    order: 3;
    width: 100%;
    margin-left: 0;
    gap: 16px;
    overflow-x: auto;
    font-size: 0.85rem;
    padding-bottom: 2px;
  }

  .navlinks a {
    white-space: nowrap;
  }

  .topbar .cta {
    margin-left: auto;
  }
}

/* ---- 頁首區塊（內頁用） -------------------------------------------------- */

.pagehead {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--line-soft);
}

.pagehead h1 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  margin-bottom: 12px;
}

.crumb {
  font-size: 0.8rem;
  color: var(--fg-faint);
  margin: 0 0 14px;
}

/* ---- 截圖 ---------------------------------------------------------------- */

.shots {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
}

figure.shot {
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

figure.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

figure.shot figcaption {
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--fg-dim);
}

.shot-wide {
  grid-column: 1 / -1;
}

.shot-note {
  font-size: 0.8rem;
  color: var(--fg-faint);
  margin: 14px 0 0;
}

/* ---- 教學 ---------------------------------------------------------------- */

.toc {
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 0 0 40px;
}

.toc h2 {
  font-size: 0.9rem;
  color: var(--fg-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 12px;
}

.toc ol {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 32px;
}

.toc li {
  margin-bottom: 6px;
  font-size: 0.9rem;
  break-inside: avoid;
}

@media (max-width: 640px) {
  .toc ol {
    columns: 1;
  }
}

.guide h2 {
  scroll-margin-top: 80px;
  margin-top: 54px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}

.guide h2:first-of-type {
  margin-top: 0;
  border-top: 0;
}

.guide h3 {
  margin-top: 28px;
  font-size: 1.02rem;
  color: var(--fg);
}

.guide p {
  color: var(--fg-dim);
  max-width: 72ch;
}

.guide ul,
.guide ol {
  color: var(--fg-dim);
  max-width: 72ch;
  padding-left: 22px;
}

.guide li {
  margin-bottom: 7px;
}

.guide li > strong {
  color: var(--fg);
}

/* 操作提示 */
.tip {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 18px 0;
  font-size: 0.88rem;
  color: var(--fg-dim);
  max-width: 72ch;
}

.tip strong {
  color: var(--accent-hi);
}

.warn {
  background: rgba(251, 191, 36, 0.07);
  border: 1px solid rgba(251, 191, 36, 0.32);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 18px 0;
  font-size: 0.88rem;
  color: var(--fg-dim);
  max-width: 72ch;
}

.warn strong {
  color: var(--warn);
}

/* 鍵盤 / 按鈕名稱 */
.ui {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  font-size: 0.85em;
  color: var(--fg);
  white-space: nowrap;
}

/* ---- 條款 ---------------------------------------------------------------- */

.legal {
  max-width: 76ch;
}

.legal h2 {
  font-size: 1.12rem;
  margin-top: 40px;
  scroll-margin-top: 80px;
}

.legal h2:first-of-type {
  margin-top: 0;
}

.legal p,
.legal li {
  color: var(--fg-dim);
  font-size: 0.93rem;
}

.legal ul,
.legal ol {
  padding-left: 22px;
}

.legal li {
  margin-bottom: 7px;
}

.legal .updated {
  color: var(--fg-faint);
  font-size: 0.85rem;
  margin-bottom: 34px;
}

/* ---- 頁尾導覽 ------------------------------------------------------------ */

.footnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 0.85rem;
}

.footnav a {
  color: var(--fg-faint);
}

.footnav a:hover {
  color: var(--fg-dim);
}
