/* =========================================================================
   Best Partner Tech Limited - single shared stylesheet
   Hand-written for index.html / about.html / contact.html.
   No CDN, no framework, no theme CSS. Icons are inline SVG in the pages.
   ========================================================================= */

:root {
  --ink: #0a1622;
  --ink-2: #12283d;
  --paper: #ffffff;
  --paper-2: #f4f7fa;
  --line: #dde6ee;
  --muted: #54677a;
  --accent: #12a594;
  --accent-dark: #0a6f65;
  --accent-soft: #e6f5f3;
  --amber: #f5a524;
  --radius: 14px;
  --wrap: 1120px;
  --shadow-sm: 0 1px 2px rgba(10,22,34,.06), 0 6px 18px rgba(10,22,34,.05);
  --shadow-md: 0 14px 36px rgba(10,22,34,.12);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, "Noto Sans TC", "PingFang TC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: var(--accent-dark); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

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

.skip-link {
  position: absolute; left: 12px; top: -70px; z-index: 60;
  background: var(--ink); color: #fff; padding: 10px 16px;
  border-radius: 0 0 8px 8px; font-weight: 600;
}
.skip-link:focus { top: 0; text-decoration: none; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.93);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; min-height: 76px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 32px; width: auto; }
.brand-name { font-weight: 700; font-size: 15px; line-height: 1.2; color: var(--ink); }
.brand-name span { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }

.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav a { padding: 9px 14px; border-radius: 999px; color: var(--ink-2); font-weight: 600; font-size: 15px; }
.nav a:hover { background: var(--paper-2); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-dark); }
.nav .nav-cta { background: var(--accent); color: #fff; margin-left: 6px; }
.nav .nav-cta:hover { background: var(--accent-dark); color: #fff; }

/* ------------------------------------------------------------------ hero */
.hero {
  position: relative; overflow: hidden; color: #eaf3f8;
  background:
    radial-gradient(1100px 520px at 12% 8%, rgba(18,165,148,.38), transparent 62%),
    radial-gradient(900px 480px at 88% 0%, rgba(60,130,246,.30), transparent 60%),
    linear-gradient(158deg, #06121d 0%, #0a2137 46%, #0d3450 100%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 28%, transparent 78%);
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 28%, transparent 78%);
}
.hero .wrap { position: relative; z-index: 1; padding-top: 92px; padding-bottom: 92px; }
.hero--compact .wrap { padding-top: 66px; padding-bottom: 66px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  margin: 0 0 20px; padding: 6px 14px 6px 11px;
  font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: #b6e8e1; background: rgba(18,165,148,.16);
  border: 1px solid rgba(129,222,210,.35); border-radius: 999px;
}
.eyebrow svg { width: 15px; height: 15px; flex: none; }

.hero h1 {
  margin: 0; max-width: 24ch;
  font-size: clamp(2.05rem, 5.2vw, 3.5rem);
  line-height: 1.09; letter-spacing: -.02em; font-weight: 750;
}
.hero .lede { margin: 22px 0 0; max-width: 64ch; font-size: clamp(1rem,1.6vw,1.18rem); color: #c6d8e5; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 34px; }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 24px; border-radius: 999px; font-weight: 650; font-size: 16px;
  border: 1px solid transparent; transition: transform .18s ease, background .18s ease, color .18s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #04120f; }
.btn-primary:hover { background: #16c0ab; color: #04120f; }
.btn-ghost { border-color: rgba(198,216,229,.45); color: #eaf3f8; }
.btn-ghost:hover { border-color: #eaf3f8; background: rgba(255,255,255,.07); }
.btn svg { width: 17px; height: 17px; }

/* -------------------------------------------------------------- sections */
.section { padding: 78px 0; }
.section--tight { padding: 56px 0; }
.section--tint { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 68ch; margin-bottom: 40px; }
.section-head h2, .section h2 {
  margin: 0 0 12px; font-size: clamp(1.5rem, 3vw, 2.15rem);
  line-height: 1.18; letter-spacing: -.015em; font-weight: 720;
}
.section-head p { margin: 0; color: var(--muted); font-size: 1.05rem; }
.kicker {
  display: block; margin-bottom: 12px; font-size: 13px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--accent-dark);
}

/* ----------------------------------------------------------------- cards */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(272px, 1fr)); }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #c9d8e4; }
.card h3 { margin: 16px 0 8px; font-size: 1.13rem; line-height: 1.3; font-weight: 700; }
.card p { margin: 0; color: var(--muted); font-size: .98rem; }
.icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-dark);
}
.icon svg { width: 23px; height: 23px; }

/* ----------------------------------------------------------------- steps */
.steps { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); counter-reset: step; }
.step { position: relative; padding: 26px 24px 26px 24px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.step-num {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--ink); color: #fff; font-weight: 700; font-size: .95rem;
  margin-bottom: 14px;
}
.step h3 { margin: 0 0 8px; font-size: 1.1rem; }
.step p { margin: 0; color: var(--muted); font-size: .98rem; }

/* ------------------------------------------------------------- cta band */
.cta-band {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 24px; padding: 36px 38px; border-radius: 18px;
  background:
    radial-gradient(600px 280px at 8% 0%, rgba(18,165,148,.30), transparent 65%),
    linear-gradient(120deg, #0a2137, #103b58);
  color: #eaf3f8; box-shadow: var(--shadow-md);
}
.cta-band h2 { margin: 0 0 8px; font-size: clamp(1.25rem, 2.4vw, 1.7rem); letter-spacing: -.01em; }
.cta-band p { margin: 0; color: #c6d8e5; max-width: 56ch; }
.cta-band .btn-primary { flex: none; }

/* --------------------------------------------------------------- clients */
.client-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); }
.client {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); color: var(--ink);
}
.client:hover { border-color: #bcd5cf; text-decoration: none; box-shadow: var(--shadow-sm); }
.client .badge {
  flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: var(--paper-2); color: var(--accent-dark);
}
.client .badge svg { width: 19px; height: 19px; }
.client .client-name { font-weight: 650; font-size: .99rem; line-height: 1.3; }
.client .client-meta { display: block; font-weight: 500; font-size: .86rem; color: var(--muted); }
.client .zh { display: block; }

/* ----------------------------------------------------------- prose / facts */
.prose { max-width: 72ch; }
.prose p { margin: 0 0 18px; color: var(--ink-2); }
.prose p:last-child { margin-bottom: 0; }

.facts { margin: 0; display: grid; gap: 2px; }
.facts > div {
  display: grid; grid-template-columns: 132px 1fr; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.facts > div:first-child { padding-top: 0; }
.facts dt { margin: 0; font-weight: 650; color: var(--muted); font-size: .95rem; letter-spacing: .01em; }
.facts dd { margin: 0; font-weight: 600; color: var(--ink); }

.panel {
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px;
  padding: 34px; box-shadow: var(--shadow-sm);
}
.panel h2 { margin: 0 0 20px; }

.note {
  margin-top: 26px; padding: 18px 20px; border-left: 4px solid var(--accent);
  background: var(--accent-soft); border-radius: 0 12px 12px 0;
  color: var(--ink-2); font-size: .98rem;
}
.note strong { color: var(--ink); }

.two-col { display: grid; gap: 40px; grid-template-columns: 1fr 1fr; align-items: start; }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--ink); color: #b9cbd9; padding: 54px 0 30px; }
.site-footer a { color: #dceaf3; }
.site-footer .cols {
  display: grid; gap: 32px; grid-template-columns: 1.6fr 1fr 1fr; align-items: start;
  padding-bottom: 34px; border-bottom: 1px solid rgba(255,255,255,.12);
}
.site-footer h2 { margin: 0 0 12px; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: #8fb0c4; }
.site-footer p { margin: 0 0 10px; font-size: .95rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; font-size: .95rem; }
.site-footer .brand img { height: 30px; }
.site-footer .brand-name { color: #eaf3f8; }
.site-footer .brand-name span { color: #8fb0c4; }
.site-footer .bottom {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  padding-top: 22px; font-size: .88rem; color: #8fb0c4;
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; gap: 28px; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
  .site-footer .cols > :first-child { grid-column: 1 / -1; }
  .cta-band { padding: 28px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .site-header .wrap { min-height: 66px; }
  .hero .wrap { padding-top: 62px; padding-bottom: 62px; }
  .hero--compact .wrap { padding-top: 48px; padding-bottom: 48px; }
  .section { padding: 56px 0; }
  .panel { padding: 24px; }
  .facts > div { grid-template-columns: 1fr; gap: 4px; }
}

@media (max-width: 560px) {
  .wrap { padding: 0 18px; }
  .brand-name { display: none; }
  .nav { gap: 2px; }
  .nav a { padding: 8px 10px; font-size: 14px; }
  .nav .nav-cta { margin-left: 0; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .site-footer .cols { grid-template-columns: 1fr; }
  .section { padding: 46px 0; }
}

@media (max-width: 360px) {
  .wrap { padding: 0 14px; }
  .nav a { padding: 7px 8px; font-size: 13px; }
  .card, .step { padding: 20px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .card:hover, .btn:hover { transform: none; }
}

/* ----------------------------------------------------- about: client groups */
.client-group { margin-top: 34px; }
.client-group:first-of-type { margin-top: 0; }
.group-title {
  margin: 0 0 16px; font-size: 13px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}

/* ------------------------------------------------------------ hero inline */
.hero a { color: #d8f3ee; }
