/* =========================================================
   亞信科技國際（香港）有限公司 — 極簡樣式（整體優化版）
   ========================================================= */

:root {
  --ink:      #15181f;
  --ink-soft: #2b313b;
  --muted:    #6b7280;
  --muted-2:  #939aa4;
  --line:     #eceef1;
  --line-2:   #dde3ea;
  --bg:       #ffffff;
  --bg-alt:   #f7f9fb;
  --brand:    #1b5da8;   /* Logo 藍 */
  --brand-dk: #14487e;
  --brand-50: #eef4fb;   /* 極淡品牌底 */
  --orange:   #ef8318;
  --green:    #3faa4c;
  --radius:   14px;
  --max:      1040px;
  --shadow:   0 16px 38px -22px rgba(20, 72, 126, .28);
}

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

html { scroll-behavior: smooth; }

/* 頂部品牌細線（常駐） */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand) 0%, #3f8ad6 100%);
  z-index: 60;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC",
    "PingFang SC", "Hiragino Sans", "Microsoft JhengHei", "Microsoft YaHei",
    "Noto Sans TC", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 30px; }
.wrap.narrow { max-width: 780px; }
.center { text-align: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease, border-color .25s ease;
}
.site-header.scrolled {
  box-shadow: 0 8px 28px -20px rgba(0, 0, 0, .4);
  border-bottom-color: transparent;
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 30px;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-logo { height: 28px; width: auto; }
.brand-name {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav { display: flex; gap: 30px; }
.nav a {
  position: relative;
  font-size: 14px;
  color: var(--muted);
  transition: color .18s ease;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: var(--brand);
  border-radius: 2px;
  transition: width .22s ease;
}
.nav a:hover { color: var(--brand); }
.nav a:hover::after { width: 100%; }

/* 語言切換 */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}
.lang-switch button {
  min-width: 36px;
  height: 30px;
  padding: 0 9px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
}
.lang-switch button:hover { color: var(--brand); }
.lang-switch button.active {
  background: var(--brand);
  color: #fff;
}

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
  padding: 10px 9px;
  flex-direction: column;
  justify-content: space-between;
}
.nav-toggle span {
  display: block; height: 2px; width: 100%;
  background: var(--ink); border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  padding: 124px 0 112px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(130% 90% at 50% -15%, var(--brand-50) 0%, rgba(238, 244, 251, 0) 58%),
    #fff;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 600;
  margin-bottom: 24px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--brand);
  border-radius: 2px;
}
.hero h1 {
  font-size: clamp(34px, 5.6vw, 56px);
  line-height: 1.18;
  letter-spacing: -0.015em;
  font-weight: 700;
}
.hero .lead {
  margin-top: 28px;
  font-size: clamp(18px, 2.3vw, 23px);
  color: var(--ink-soft);
  font-weight: 500;
}
.hero .sub {
  margin-top: 16px;
  font-size: 15px;
  color: var(--muted);
}
.hero-actions {
  margin-top: 42px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 13px 28px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.btn:hover { background: var(--brand-dk); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-2);
}
.btn-ghost:hover { background: #f4f6f9; color: var(--ink); box-shadow: none; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; border-bottom: 1px solid var(--line); }
.section-alt { background: var(--bg-alt); }

.label {
  font-size: 18px;
  letter-spacing: .08em;
  color: var(--brand);
  font-weight: 700;
  margin-bottom: 18px;
}
.section h2 {
  font-size: clamp(23px, 3vw, 31px);
  line-height: 1.35;
  letter-spacing: -0.01em;
  font-weight: 700;
  margin-bottom: 22px;
}
.body { font-size: 16px; color: #3a4048; }

/* facts */
.facts {
  margin-top: 42px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 28px;
  border-top: 1px solid var(--line);
  padding-top: 30px;
}
.facts > div { padding: 4px 0; }
.facts dt {
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--muted-2);
  margin-bottom: 7px;
}
.facts dd { font-size: 15.5px; font-weight: 600; color: var(--ink); }

/* service cards */
.grid {
  margin-top: 46px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 38px 32px 42px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: #d9e4f1;
}
.card .num {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: .08em;
  padding: 4px 12px;
  border: 1px solid var(--brand-50);
  border-radius: 999px;
  background: var(--brand-50);
}
.card h3 {
  margin-top: 20px;
  font-size: 18.5px;
  font-weight: 700;
}
.card p {
  margin-top: 12px;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.78;
}

/* quote / goal */
.quote {
  margin-top: 10px;
  font-size: clamp(19px, 2.6vw, 25px);
  line-height: 1.6;
  font-weight: 500;
  color: var(--ink);
}
.quote::before {
  content: "";
  display: block;
  width: 44px; height: 3px;
  background: var(--brand);
  border-radius: 2px;
  margin: 0 0 28px;
}
.br-desktop { display: inline; }

/* contact */
.contact-list {
  margin-top: 36px;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.contact-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.contact-k { font-size: 13px; color: var(--muted); letter-spacing: .04em; }
.contact-v { font-size: 16px; font-weight: 600; }
a.contact-v { color: var(--brand); }
a.contact-v:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 36px 0;
  font-size: 13px;
  color: var(--muted);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-en { letter-spacing: .02em; color: var(--muted-2); }

/* ---------- 滾動漸入 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s cubic-bezier(.2, .7, .2, 1),
              transform .7s cubic-bezier(.2, .7, .2, 1);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .facts { grid-template-columns: 1fr; gap: 18px; }
  .grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .wrap, .nav-inner { padding-left: 20px; padding-right: 20px; }
  .brand-name { display: none; }
  .nav-toggle { display: flex; }
  .nav {
    position: absolute;
    top: 66px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 8px 20px 16px;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a {
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
  }
  .nav a:last-child { border-bottom: none; }
  .nav a::after { display: none; }
  .hero { padding: 80px 0 72px; }
  .section { padding: 66px 0; }
  .contact-item { grid-template-columns: 1fr; gap: 6px; }
  .br-desktop { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
