/* ============================================================
   Gancong Trading Co., Limited — corporate site styles
   ============================================================ */

:root {
  --ink: #0b1a2b;
  --ink-soft: #22374f;
  --muted: #5d6f84;
  --line: #e3eaf2;
  --bg: #ffffff;
  --soft: #f6f9fc;
  --brand: #1858e0;
  --brand-ink: #0e3aa8;
  --accent: #00b9a4;
  --maxw: 1120px;
  --radius: 16px;
  --shadow: 0 18px 40px -24px rgba(11, 26, 43, .45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

/* ---------- 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);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-right: auto;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--brand), #0a2f7a);
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .01em;
  flex: none;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 15px; letter-spacing: .14em; font-weight: 700; }
.brand-text small { font-size: 10.5px; color: var(--muted); letter-spacing: .06em; }

.nav { display: flex; gap: 26px; }
.nav a {
  font-size: 14.5px;
  color: var(--ink-soft);
  padding: 4px 0;
  position: relative;
  transition: color .18s ease;
}
.nav a:hover { color: var(--brand); }
.nav a.active { color: var(--ink); font-weight: 600; }
.nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border-radius: 11px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .16s ease, background .18s ease, box-shadow .18s ease,
    border-color .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 10px 24px -12px rgba(24, 88, 224, .8); }
.btn-primary:hover { background: var(--brand-ink); }
.btn-ghost { border-color: rgba(255, 255, 255, .28); color: #fff; background: rgba(255, 255, 255, .04); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .45); }
.btn-outline { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 13.5px; border-radius: 9px; }

.header-cta { height: 40px; padding: 0 18px; font-size: 14px; border-radius: 10px; }

/* ---------- language switch ---------- */

.lang-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  background: #fff;
  flex: none;
}

.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .02em;
  padding: 0 11px;
  height: 34px;
  cursor: pointer;
  font-family: inherit;
  transition: background .16s ease, color .16s ease;
  white-space: nowrap;
}
.lang-switch button:hover { color: var(--ink); background: var(--soft); }
.lang-switch button.is-active { background: var(--ink); color: #fff; }
.lang-switch button.is-active:hover { background: var(--ink); color: #fff; }

/* 繁体中文下标题字距略收紧，避免断行难看 */
html[data-lang="zh"] h1,
html[data-lang="zh"] h2 { letter-spacing: -.008em; }
html[data-lang="zh"] body { line-height: 1.78; }

/* 中文全形字宽约为英文字母 2 倍，max-width 的 ch/固定值都要放宽，
   否则会在一句话中间硬断开（如「穩定交付」被拆成「穩／定交付」）。 */
/* 中文标题断行：
   - 不要用 word-break: keep-all —— 中文没有空格，keep-all 会让整句变成一个不可断的词；
   - 不要用 text-wrap: balance —— Chrome 为了平衡行长，会把「，」挤到下一行行首，
     这正是中文排版最忌讳的「标点在行首」；
   - 靠 line-break: strict 让浏览器按中文禁则处理（逗号、句号不落行首）。 */
html[data-lang="zh"] .hero h1,
html[data-lang="zh"] .section-head h2,
html[data-lang="zh"] .page-head h1,
html[data-lang="zh"] .cta-band h2,
html[data-lang="zh"] .two-col h2 {
  line-break: strict;
  overflow-wrap: break-word;
}
html[data-lang="zh"] .section-head { max-width: 42em; }
html[data-lang="zh"] .section-head h2 { line-height: 1.4; }
/* 左栏只有约 0.95fr 宽，中文标题沿用英文那么大字号会剩下两三个字孤零零掉到第二行 */
html[data-lang="zh"] .two-col h2 {
  font-size: clamp(20px, 2.15vw, 28px);
  line-height: 1.45;
}
html[data-lang="zh"] .hero h1 { max-width: 15em; line-height: 1.3; }
html[data-lang="zh"] .page-head h1 { line-height: 1.32; max-width: 18em; }
html[data-lang="zh"] .page-head p { max-width: 34em; }
html[data-lang="zh"] .cta-band h2 { line-height: 1.4; }
html[data-lang="zh"] .cta-band p { max-width: 34em; }
html[data-lang="zh"] .legal h1 { letter-spacing: -.006em; }
html[data-lang="zh"] .legal h2 { line-height: 1.45; }
html[data-lang="zh"] .legal p,
html[data-lang="zh"] .legal li { line-height: 1.9; }

@media (max-width: 720px) {
  /* 中文标题在窄屏按「整句 15 字」估算：字号控制在 30px 以内，
     「數碼產品與預付服務，」才能完整落在第一行，逗号留在行尾。 */
  html[data-lang="zh"] .hero h1 {
    max-width: 100%;
    font-size: clamp(24px, 7.7vw, 30px);
    line-height: 1.42;
  }
  html[data-lang="zh"] .page-head h1 { max-width: 100%; font-size: clamp(21px, 6.4vw, 26px); line-height: 1.45; }
  html[data-lang="zh"] .section-head h2 { font-size: 21px; line-height: 1.5; }
  html[data-lang="zh"] .cta-band h2 { font-size: 20px; line-height: 1.5; }
  html[data-lang="zh"] .two-col h2 { font-size: 19px; line-height: 1.55; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  padding: 104px 0 112px;
  background:
    radial-gradient(1100px 520px at 82% -12%, rgba(24, 88, 224, .42), transparent 62%),
    radial-gradient(760px 480px at 2% 118%, rgba(0, 185, 164, .22), transparent 62%),
    linear-gradient(158deg, #07111d 0%, #0b1a2b 52%, #0f2942 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 55% 40%, #000 20%, transparent 78%);
  pointer-events: none;
}

.hero .wrap { position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #8fb4e8;
  margin: 0 0 20px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.hero h1 {
  font-size: clamp(34px, 4.9vw, 57px);
  line-height: 1.07;
  letter-spacing: -.024em;
  font-weight: 700;
  margin: 0 0 22px;
  max-width: 20ch;
}

.hero .lede {
  font-size: 18px;
  line-height: 1.68;
  color: rgba(233, 243, 255, .82);
  max-width: 620px;
  margin: 0 0 34px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- trust strip ---------- */

.strip { border-bottom: 1px solid var(--line); background: var(--bg); }
.strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  padding: 34px 24px;
}
.strip-grid > div { display: flex; flex-direction: column; gap: 3px; }
.strip-grid strong { font-size: 14.5px; font-weight: 650; letter-spacing: -.005em; }
.strip-grid span { font-size: 13px; color: var(--muted); }

/* ---------- sections ---------- */

.section { padding: 92px 0; }
.section.soft { background: var(--soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { max-width: 660px; margin-bottom: 46px; }
.section-head h2 {
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.18;
  letter-spacing: -.018em;
  font-weight: 700;
  margin: 12px 0 14px;
}
.section-head p { color: var(--muted); font-size: 16.5px; margin: 0; }

.eyebrow-dark { color: var(--brand); }
.eyebrow-dark::before { background: var(--brand); }

/* ---------- cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px 28px;
  transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: #cfdeef;
}

.card .icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, #eef4ff, #e6f6f4);
  color: var(--brand);
  margin-bottom: 18px;
}
.card .icon svg { width: 22px; height: 22px; }
.card h3 { font-size: 16.5px; font-weight: 650; margin: 0 0 8px; letter-spacing: -.005em; }
.card p { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.6; }

/* ---------- two column ---------- */

.two-col {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 64px;
  align-items: start;
}
.two-col h2 {
  font-size: clamp(24px, 2.8vw, 34px);
  line-height: 1.2;
  letter-spacing: -.018em;
  margin: 12px 0 0;
  font-weight: 700;
}

.prose p { color: var(--ink-soft); font-size: 16px; margin: 0 0 18px; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { font-weight: 650; color: var(--ink); }

/* ---------- facts table ---------- */

.facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 34px;
}
.facts div { background: #fff; padding: 18px 22px; }
.facts dt {
  font-size: 11.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 5px;
  font-weight: 600;
}
.facts dd { margin: 0; font-size: 14.5px; font-weight: 550; color: var(--ink); }

/* ---------- steps ---------- */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; counter-reset: step; }
.step { position: relative; padding-top: 8px; }
.step .num {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--brand);
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 16px;
}
.step h3 { font-size: 16.5px; margin: 0 0 8px; font-weight: 650; }
.step p { font-size: 14.5px; color: var(--muted); margin: 0; }

/* ---------- CTA band ---------- */

.cta-band {
  background: linear-gradient(150deg, #0b1a2b, #14345a);
  color: #fff;
  border-radius: 22px;
  padding: 56px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.cta-band h2 { font-size: clamp(23px, 2.6vw, 31px); margin: 0 0 10px; letter-spacing: -.018em; }
.cta-band p { margin: 0; color: rgba(233, 243, 255, .8); font-size: 15.5px; max-width: 52ch; }

/* ---------- page hero (inner pages) ---------- */

.page-head {
  background: linear-gradient(155deg, #07111d, #0f2942);
  color: #fff;
  padding: 72px 0 68px;
}
.page-head h1 {
  font-size: clamp(29px, 3.6vw, 44px);
  letter-spacing: -.022em;
  line-height: 1.12;
  margin: 14px 0 14px;
  font-weight: 700;
}
.page-head p { color: rgba(233, 243, 255, .8); max-width: 62ch; margin: 0; font-size: 17px; }

/* ---------- product list ---------- */

.plist { display: grid; gap: 18px; }
.pitem {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 22px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
}
.pitem .icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, #eef4ff, #e6f6f4);
  color: var(--brand);
}
.pitem .icon svg { width: 26px; height: 26px; }
.pitem h3 { margin: 0 0 6px; font-size: 17px; font-weight: 650; }
.pitem p { margin: 0; color: var(--muted); font-size: 14.5px; }
.pitem .tag {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--brand-ink);
  background: #eaf1ff;
  border-radius: 999px;
  padding: 6px 13px;
  white-space: nowrap;
}

/* ---------- contact ---------- */

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.contact-block h3 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; font-weight: 650; }
.contact-block p, .contact-block a { font-size: 16px; margin: 0 0 26px; display: block; color: var(--ink-soft); }
.contact-block a:hover { color: var(--brand); }

.contact-aside {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
}
.contact-aside h3 { margin: 0 0 14px; font-size: 17px; }
.contact-aside ul { margin: 0; padding-left: 18px; color: var(--ink-soft); font-size: 14.5px; }
.contact-aside li { margin-bottom: 10px; }
.contact-aside li:last-child { margin-bottom: 0; }

/* ---------- legal ---------- */

.legal { max-width: 780px; padding: 72px 0 96px; }
.legal h1 { font-size: clamp(26px, 3vw, 36px); letter-spacing: -.018em; margin: 0 0 8px; }
.legal .updated { color: var(--muted); font-size: 13.5px; margin: 0 0 40px; }
.legal h2 { font-size: 19px; margin: 38px 0 12px; letter-spacing: -.01em; }
.legal h3 { font-size: 15.5px; margin: 24px 0 8px; }
.legal p, .legal li { color: var(--ink-soft); font-size: 15px; line-height: 1.75; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }

.note {
  background: var(--soft);
  border-left: 3px solid var(--brand);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  font-size: 14.5px;
  color: var(--ink-soft);
  margin: 24px 0;
}

/* ---------- footer ---------- */

.site-footer { background: #07131f; color: #b9c9d9; padding: 62px 0 26px; margin-top: 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}
.site-footer .brand-text strong { color: #fff; }
.site-footer .brand-text small { color: #7f93a8; }
.site-footer .brand { margin-bottom: 16px; }
.footer-addr { font-size: 13.5px; line-height: 1.75; color: #8fa3b7; margin: 0; }
.footer-col h4 { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #7f93a8; margin: 0 0 14px; font-weight: 650; }
.footer-col a, .footer-col span { display: block; font-size: 14px; color: #b9c9d9; margin-bottom: 10px; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  font-size: 12.5px;
  color: #6f8499;
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .strip-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .two-col { grid-template-columns: 1fr; gap: 34px; }
  .steps { grid-template-columns: 1fr; gap: 22px; }
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .hero { padding: 76px 0 84px; }
}

@media (max-width: 720px) {
  .header-inner { height: auto; padding: 12px 20px; flex-wrap: wrap; gap: 10px; }
  .brand { margin-right: auto; }
  .lang-switch button { height: 30px; padding: 0 9px; font-size: 12px; }
  /* 手机上导航自成一行的横向滚动；「聯絡我們」按钮由 nav 里的 Contact 承担，避免挤成一团 */
  .nav {
    order: 3;
    width: 100%;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .header-cta { display: none; }
  .section { padding: 62px 0; }
  .cards { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .cta-band { padding: 38px 28px; }
  .pitem { grid-template-columns: 44px 1fr; gap: 16px; }
  .pitem .tag { grid-column: 2; justify-self: start; }
  .footer-grid { grid-template-columns: 1fr; }
  html[data-lang="zh"] .hero h1 { max-width: 100%; line-height: 1.34; }
  html[data-lang="zh"] .page-head h1 { max-width: 100%; line-height: 1.36; }
  html[data-lang="zh"] .two-col h2 { font-size: 20px; }
}
