/* ============================================================
   MapleForge Studio — 設計系統
   極簡遊戲技術流：炭黑底 / 楓紅單主色 / 等寬數據字
   ============================================================ */

:root {
  /* 三層底色階：頁面 → 卡片表面 → 強調面（柔和深色，非純黑） */
  --bg: #1b1e23;
  --bg-2: #1c1f24;
  --bg-3: #23272e;
  --line: #2c3138;
  --line-strong: #40464f;
  --text: #dddad3;
  --text-dim: #a9adb4;
  --text-faint: #7b8088;
  --text-soft: #d9a04a;
  --red: #e05a50;
  --red-dim: #b03e36;
  --amber: #d9a04a;
  --green: #58b878;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  --sans: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  /* 極淡菱格點陣 */
  background-image: radial-gradient(circle, #24272e 1px, transparent 1px);
  background-size: 28px 28px;
}

::selection { background: var(--red); color: #fff; }

a { color: inherit; text-decoration: none; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- 導覽列 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(27,30,35,.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; gap: 32px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .02em; }
.brand svg { display: block; }
.brand small {
  font-family: var(--mono); font-size: 10px; color: var(--text-faint);
  display: block; letter-spacing: .18em;
}
.nav-links { margin-left: auto; display: flex; gap: 4px; }
.nav-links a {
  font-size: 14px; color: var(--text-dim);
  padding: 8px 12px; border: 1px solid transparent;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.on { color: var(--red); border-color: var(--line); background: var(--bg-2); }
.nav-cta {
  font-family: var(--mono); font-size: 13px !important;
  border: 1px solid var(--red) !important; color: var(--red) !important;
  padding: 8px 16px !important;
}
.nav-cta:hover { background: var(--red); color: #fff !important; }

/* ---------- Hero ---------- */
.hero { padding: 96px 0 72px; position: relative; overflow: hidden; }
.hero-tag {
  font-family: var(--mono); font-size: 12px; color: var(--red);
  letter-spacing: .22em; margin-bottom: 20px;
}
.hero-tag::before { content: "[ "; color: var(--text-faint); }
.hero-tag::after { content: " ]"; color: var(--text-faint); }
.hero h1 {
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.15; letter-spacing: -.01em; font-weight: 800;
}
.hero h1 em { font-style: normal; color: var(--red); }
.hero p.lead {
  max-width: 640px; margin-top: 24px;
  color: var(--text-dim); font-size: 18px;
}
.hero-actions { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-block; cursor: pointer;
  font-family: var(--mono); font-size: 14px; letter-spacing: .04em;
  padding: 13px 26px; border: 1px solid var(--line-strong);
  color: var(--text); background: transparent;
  transition: all .15s ease;
}
.btn:hover { border-color: var(--text-dim); transform: translateY(-1px); }
.btn-red { background: var(--red); border-color: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dim); border-color: var(--red-dim); }
.btn-ghost { border-color: var(--line-strong); }

/* ---------- 數據列 ---------- */
.stats {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat {
  padding: 28px 24px; border-right: 1px solid var(--line);
}
.stat:last-child { border-right: none; }
.stat b {
  display: block; font-family: var(--mono); font-size: 34px;
  font-weight: 700; color: var(--text); line-height: 1.1;
}
.stat b small { font-size: 15px; color: var(--text-faint); font-weight: 400; margin-left: 2px; }
.stat b i { font-style: normal; color: var(--red); }
.stat span { font-size: 13px; color: var(--text-faint); letter-spacing: .08em; }

/* ---------- 章節 ---------- */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-head { margin-bottom: 52px; }
.sec-no {
  font-family: var(--mono); font-size: 12px; color: var(--text-faint);
  letter-spacing: .22em; display: block; margin-bottom: 10px;
}
.sec-no b { color: var(--red); font-weight: 400; }
.sec-head h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; letter-spacing: -.01em; }
.sec-head p { color: var(--text-dim); margin-top: 12px; max-width: 620px; }

/* ---------- 卡片柵格 ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.card {
  background: var(--bg); padding: 30px 26px; transition: background .15s;
}
.section-alt .card, .card.on-alt { background: var(--bg-2); }
.card:hover { background: var(--bg-3); }
.card .no { font-family: var(--mono); font-size: 11px; color: var(--text-faint); letter-spacing: .15em; }
.card h3 { font-size: 19px; margin: 14px 0 10px; font-weight: 700; }
.grid-3 > .card h3 { font-size: 26px; margin: 16px 0 22px; }
.card h3::before { content: "▸ "; color: var(--red); }
.card p { font-size: 15px; color: var(--text-soft); }
.card .meta {
  margin-top: 16px; font-family: var(--mono); font-size: 12px; color: var(--amber);
}

/* ---------- 規格表 ---------- */
.spec { border: 1px solid var(--line); }
.spec-row {
  display: grid; grid-template-columns: 220px 1fr;
  border-bottom: 1px solid var(--line);
}
.spec-row:last-child { border-bottom: none; }
.spec-row dt {
  padding: 16px 20px; font-family: var(--mono); font-size: 13px;
  color: var(--text-faint); background: var(--bg-2);
  border-right: 1px solid var(--line); letter-spacing: .05em;
}
.spec-row dd { padding: 16px 20px; font-size: 15px; color: var(--text); }
.spec-row dd em { font-style: normal; color: var(--green); font-family: var(--mono); font-size: 13px; }

/* ---------- 跑馬燈 ---------- */
.marquee {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  overflow: hidden; background: var(--bg-2); padding: 14px 0;
}
.marquee-track {
  display: flex; gap: 48px; width: max-content;
  animation: mq 30s linear infinite;
  font-family: var(--mono); font-size: 13px; color: var(--text-faint);
  letter-spacing: .12em; white-space: nowrap;
}
.marquee-track span i { color: var(--amber); font-style: normal; margin-right: 8px; }
@keyframes mq { to { transform: translateX(-50%); } }

/* ---------- 功能清單卡 ---------- */
.card ul.feat { list-style: none; margin-top: 14px; }
.card ul.feat li {
  font-size: 13.5px; color: var(--text-dim); padding: 5px 0;
  border-bottom: 1px dashed var(--line);
}
.card ul.feat li:last-child { border-bottom: none; }
.card ul.feat li::before { content: "+ "; color: var(--amber); font-family: var(--mono); }
.card .feat-count {
  float: right; font-family: var(--mono); font-size: 11px;
  color: var(--text-faint); letter-spacing: .1em;
}

/* ---------- 承諾列 ---------- */
.pledges {
  display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: center;
  font-family: var(--mono); font-size: 13.5px; color: var(--text);
}
.pledges span::before { content: "✔ "; color: var(--green); }

/* ---------- 方案卡 ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.plans.cols-4 { grid-template-columns: repeat(4, 1fr); gap: 14px; }
.plans.cols-4 .plan { padding: 26px 20px; }
.plans.cols-4 .plan .price b { font-size: 28px; }
.plans.cols-4 .plan h3 { font-size: 17px; }
.plan { border: 1px solid var(--line); background: var(--bg); padding: 32px 28px; position: relative; }
.plan.hot { border-color: var(--red); }
.plan-hot-tag {
  position: absolute; top: -1px; right: -1px;
  background: var(--red); color: #fff;
  font-family: var(--mono); font-size: 11px; letter-spacing: .15em;
  padding: 5px 12px;
}
.plan h3 { font-size: 20px; }
.plan .for { font-size: 13px; color: var(--text-faint); margin-top: 4px; }
.plan .price { margin: 22px 0 4px; font-family: var(--mono); }
.plan .price b { font-size: 40px; font-weight: 700; }
.plan .price span { font-size: 14px; color: var(--text-faint); }
.plan ul { list-style: none; margin: 22px 0 26px; }
.plan li {
  font-size: 14px; color: var(--text-dim); padding: 7px 0;
  border-bottom: 1px dashed var(--line);
}
.plan li::before { content: "+ "; color: var(--amber); font-family: var(--mono); }
.plan .btn { width: 100%; text-align: center; }

/* ---------- FAQ ---------- */
.faq { border: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: none; }
.faq summary {
  cursor: pointer; padding: 20px 24px; font-weight: 700; font-size: 15.5px;
  list-style: none; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 24px;
  font-family: var(--mono); color: var(--red); font-size: 18px;
}
.faq details[open] summary::after { content: "-"; }
.faq details p { padding: 0 24px 22px; color: var(--text-dim); font-size: 14.5px; }

/* ---------- CTA 區 ---------- */
.cta {
  border-top: 1px solid var(--line);
  padding: 88px 0; text-align: center;
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
}
.cta h2 { font-size: clamp(26px, 3.6vw, 40px); font-weight: 800; }
.cta p { color: var(--text-dim); margin: 16px auto 32px; max-width: 520px; }

/* ---------- 頁尾 ---------- */
footer { border-top: 1px solid var(--line); padding: 44px 0; background: var(--bg-2); }
.foot-grid { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.foot-brand small { display: block; color: var(--text-faint); font-size: 12.5px; margin-top: 8px; max-width: 320px; line-height: 1.6; }
.foot-col b { display: block; font-family: var(--mono); font-size: 11px; color: var(--text-faint); letter-spacing: .2em; margin-bottom: 12px; }
.foot-col a { display: block; font-size: 14px; color: var(--text-dim); padding: 3px 0; }
.foot-col a:hover { color: var(--red); }
.copyright {
  margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 12px; color: var(--text-faint);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}

/* ---------- 進場動畫（輕，不花俏） ---------- */
.rv { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.rv.in { opacity: 1; transform: none; }

/* ---------- 頁面截圖 ---------- */
.shot {
  display: block; width: 100%;
  border: 1px solid var(--line-strong);
}

/* ---------- 價格試算 ---------- */
.calc-group {
  font-family: var(--mono); font-size: 12px; color: var(--text-faint);
  letter-spacing: .18em; margin: 34px 0 12px;
}
.calc-group:first-of-type { margin-top: 0; }
.calc { border: 1px solid var(--line); }
.calc-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 18px; border-bottom: 1px solid var(--line);
  cursor: pointer; background: var(--bg); transition: background .12s;
}
.calc-item:last-child { border-bottom: none; }
.calc-item:hover { background: var(--bg-3); }
.section-alt .calc-item { background: var(--bg-2); }
.section-alt .calc-item:hover { background: var(--bg-3); }
.calc-item input { width: 16px; height: 16px; accent-color: var(--red); cursor: pointer; }
.calc-item .nm { flex: 1; font-size: 16.5px; color: var(--text); }
.calc-item .nm small { display: block; font-size: 13px; color: var(--amber); }
.calc-item .pr { font-family: var(--mono); font-size: 17px; font-weight: 700; color: var(--amber); white-space: nowrap; }
.totalbar {
  position: sticky; bottom: 0; z-index: 60;
  background: var(--bg-2); border-top: 1px solid var(--line-strong);
}
.totalbar-inner {
  max-width: 1120px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
}
.totalbar .tt { font-family: var(--mono); font-size: 12px; color: var(--text-faint); letter-spacing: .1em; }
.totalbar .tv { font-family: var(--mono); font-size: 22px; color: var(--text); }
.totalbar .tv em { font-style: normal; color: var(--amber); }
.totalbar .btn { margin-left: auto; padding: 9px 18px; font-size: 13px; }

/* ---------- RWD ---------- */
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
  .plans.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .plans.cols-4 { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .spec-row { grid-template-columns: 1fr; }
  .spec-row dt { border-right: none; border-bottom: 1px dashed var(--line); }
}

