@font-face {
  font-family: "Inter";
  src: url("../fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #16324F;
  --text: #1F2933;
  --muted: #4F5B69;
  --line: #E3E8EE;
  --tint: #F6F8FA;
  --red: #C0392B;
  --header: 68px;
  /* 字級：標籤 14px、介面 16px、內文 17px、導言 20px */
  --fs-sm: 0.875rem;
  --fs-md: 1rem;
  --fs-lg: 1.25rem;
}

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

/* 語言：拉丁字母與數字用 Inter，中文依繁簡選字型、行距與字距 */
html {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.65;
  color: var(--text);
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--header);
}

html:lang(zh-Hant) {
  font-family: "Inter", "Source Han Sans TC", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

html:lang(zh-Hans) {
  font-family: "Inter", "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

html:lang(zh) {
  line-height: 1.85;
  letter-spacing: 0.02em;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  font-size: 1.0625rem;
  background: #fff;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

h1, h2, h3, h4 {
  color: var(--ink);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

html:lang(zh) :is(h1, h2, h3, h4) {
  line-height: 1.4;
  letter-spacing: 0.03em;
}

/* 中文的標題、問句、標籤與表格只在標點與空格處換行，避免拆開詞語 */
html:lang(zh) :is(h1, h2, h3, h4, summary, dt, th, .q) {
  word-break: keep-all;
}

h1 {
  font-size: clamp(2.5rem, 5.4vw, 4.25rem);
}

html:lang(en) h1 {
  font-size: clamp(2.25rem, 4.4vw, 3.5rem);
}

h2 {
  font-size: clamp(1.875rem, 3.4vw, 2.625rem);
}

h3 {
  font-size: 1.375rem;
}

h4 {
  font-size: 1.25rem;
}

p, dd, li {
  text-wrap: pretty;
}

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

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--min, 300px), 1fr));
  gap: 24px;
}

/* 頁首 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: var(--header);
}

.logo {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--ink);
}

.nav {
  display: flex;
  gap: 32px;
  margin-left: auto;
  font-size: var(--fs-md);
  color: var(--muted);
}

.nav a:hover {
  color: var(--ink);
}

.lang {
  display: flex;
  gap: 4px;
}

.lang button {
  min-height: 36px;
  padding: 0 10px;
  font: inherit;
  font-size: var(--fs-sm);
  letter-spacing: normal;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}

.lang button:hover {
  color: var(--ink);
}

.lang button[aria-pressed="true"] {
  font-weight: 600;
  color: var(--ink);
  background: var(--tint);
}

/* 區塊 */
section {
  padding: 120px 0;
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 720px;
  margin-bottom: 64px;
}

.eyebrow {
  margin-bottom: 16px;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink);
}

.lead {
  margin-top: 24px;
  font-size: var(--fs-lg);
  line-height: 1.7;
  color: var(--muted);
}

.note {
  margin-top: 20px;
  font-size: var(--fs-sm);
  color: var(--muted);
}

.card {
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 28px;
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 4px;
}

.btn:hover {
  background: var(--tint);
}

.btn-primary,
.btn-primary:hover {
  color: #fff;
  background: var(--ink);
}

.link {
  font-weight: 600;
  color: var(--ink);
}

.link:hover {
  text-decoration: underline;
}

/* 數字：數值在上，說明在下 */
.stats div {
  display: flex;
  flex-direction: column;
}

.stats dd {
  order: -1;
  font-size: 2.25rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.stats small {
  font-size: var(--fs-md);
  font-weight: 500;
  letter-spacing: normal;
}

.stats dt {
  margin-top: 8px;
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--muted);
  text-wrap: balance;
}

/* 主視覺 */
.hero {
  padding-top: 104px;
  border-top: 0;
}

.hero-inner {
  --min: 340px;
  gap: 72px;
  align-items: center;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 44px;
}

.hero-art {
  width: 100%;
  height: auto;
}

.specs {
  --min: 150px;
  margin-top: 104px;
}

.specs div {
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.specs dd {
  font-size: 2rem;
}

/* 01 挑戰 */
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 860px;
  font-size: var(--fs-md);
  line-height: 1.6;
  border-collapse: collapse;
}

caption {
  padding-bottom: 16px;
  font-size: var(--fs-sm);
  text-align: left;
  color: var(--muted);
}

th,
td {
  padding: 18px 20px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

thead th {
  font-weight: 600;
  color: var(--ink);
}

thead :is(th, td) {
  border-bottom-color: var(--ink);
}

tbody th {
  position: sticky;
  left: 0;
  width: 20%;
  font-weight: 600;
  background: #fff;
}

.group th {
  padding-top: 36px;
  font-size: var(--fs-sm);
  letter-spacing: 0.08em;
  color: var(--muted);
}

thead th:last-child {
  color: #fff;
  background: var(--ink);
}

td:last-child {
  font-weight: 600;
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 6%, #fff);
}

/* 中文表格內容都很短，維持單行 */
html:lang(zh) td {
  white-space: nowrap;
}

.revisit td:not(:last-child) {
  color: var(--red);
}

.closing {
  max-width: 720px;
  margin-top: 56px;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
}

/* 02 技術 */
.engine {
  display: grid;
  grid-template-columns: 1fr auto 1.1fr auto 1fr;
  gap: 24px;
  align-items: center;
  padding: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.io p {
  margin-bottom: 12px;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.io ul {
  display: grid;
  gap: 10px;
}

.io li {
  padding: 12px 16px;
  font-size: var(--fs-md);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.arrow {
  font-size: 1.5rem;
  color: var(--ink);
}

.core {
  display: grid;
  gap: 6px;
  padding: 48px 24px;
  text-align: center;
  color: #fff;
  background: var(--ink);
  border-radius: 6px;
}

.core strong {
  font-size: 1.375rem;
  font-weight: 600;
}

.engine figcaption {
  grid-column: 1 / -1;
  padding-top: 24px;
  font-size: var(--fs-md);
  text-align: center;
  color: var(--muted);
  border-top: 1px dashed var(--line);
}

.engine figcaption::before {
  content: "↺ ";
  color: var(--ink);
}

.steps {
  gap: 40px;
  margin-top: 64px;
}

.steps li {
  padding-top: 24px;
  border-top: 2px solid var(--ink);
}

.steps h3 {
  margin-bottom: 10px;
  font-size: 1.25rem;
}

.steps p {
  color: var(--muted);
}

/* 03 實測 */
.sites {
  --min: 320px;
}

.sites h3 + p {
  margin-top: 4px;
  font-size: var(--fs-md);
  color: var(--muted);
}

.sites .stats {
  --min: 180px;
  gap: 36px 24px;
  margin-top: 36px;
}

.after {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 32px;
  margin-top: 36px;
  font-size: var(--fs-md);
  color: var(--muted);
}

/* 04 方案 */
.module {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.module p {
  color: var(--muted);
}

.module .tag {
  align-self: flex-start;
  padding: 2px 12px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 999px;
}

.module .q {
  font-weight: 600;
  line-height: 1.6;
  color: var(--ink);
}

.module .for {
  margin-top: auto;
  padding-top: 18px;
  font-size: var(--fs-sm);
  border-top: 1px solid var(--line);
}

.module-base {
  justify-content: center;
  background: var(--ink);
  border-color: var(--ink);
}

.module-base h3,
.module-base p {
  color: #fff;
}

/* 05 規模 */
.icon {
  width: 52px;
  height: 52px;
  margin-bottom: 24px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
}

.scales dt {
  margin-top: 20px;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.scales dd {
  margin-top: 4px;
}

/* 06 導入 */
.process {
  --min: 150px;
  gap: 20px;
  counter-reset: step;
}

.process li {
  padding-top: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
  border-top: 2px solid var(--line);
  counter-increment: step;
}

.process li:last-child {
  border-top-color: var(--ink);
}

.process li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 8px;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--muted);
}

.sub {
  margin: 96px 0 28px;
  font-size: 1.5rem;
}

.pricing {
  --min: 320px;
}

.pricing h4 {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.pricing dt {
  margin-top: 20px;
  font-weight: 600;
  color: var(--text);
}

.pricing dd {
  margin-top: 2px;
  font-size: var(--fs-md);
  color: var(--muted);
}

/* 07 常見問題 */
.faq {
  max-width: 880px;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  position: relative;
  padding: 26px 48px 26px 0;
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 8px;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--muted);
  transform: translateY(-50%);
}

.faq details[open] summary::after {
  content: "−";
}

.faq details p {
  max-width: 760px;
  padding-bottom: 28px;
  color: var(--muted);
}

/* 聯絡 */
.contact {
  text-align: center;
  background: var(--tint);
}

.contact .lead {
  max-width: 640px;
  margin-inline: auto;
}

.contact .btn {
  margin-top: 40px;
}

.mail {
  margin-top: 14px;
  font-size: var(--fs-md);
  color: var(--muted);
}

.contact .note {
  margin-top: 36px;
  font-size: var(--fs-md);
}

/* 頁尾 */
.site-footer {
  padding: 40px 0;
  font-size: var(--fs-sm);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}

.site-footer strong {
  letter-spacing: 0.18em;
  color: var(--ink);
}

@media (max-width: 760px) {
  .container {
    padding: 0 20px;
  }

  section {
    padding: 80px 0;
  }

  .hero {
    padding-top: 56px;
  }

  .nav {
    display: none;
  }

  .lang {
    margin-left: auto;
  }

  .lang button {
    min-height: 40px;
  }

  .section-head {
    margin-bottom: 48px;
  }

  .lead {
    font-size: 1.125rem;
  }

  .specs {
    margin-top: 64px;
  }

  .stats dd {
    font-size: 2rem;
  }

  .specs dd {
    font-size: 1.625rem;
  }

  .closing {
    font-size: 1.25rem;
  }

  .engine {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .arrow {
    justify-self: center;
    transform: rotate(90deg);
  }

  .card {
    padding: 28px 24px;
  }

  .sub {
    margin-top: 72px;
  }
}
