/* =========================================================================
   BB TRUCK — 專案展示網站 (查核點 D)
   Brand: primary #2757A7 / #3E77BC · accent amber #F5B500
   ========================================================================= */

:root {
  --blue-900: #1b3c73;
  --blue-700: #2757A7;
  --blue-500: #3E77BC;
  --blue-300: #7aa3da;
  --blue-050: #eef3fb;
  --amber:    #F5B500;
  --amber-dk: #d99e00;
  --ink:      #15233b;
  --slate:    #51607a;
  --muted:    #8190a8;
  --line:     #e3e9f3;
  --bg:       #ffffff;
  --bg-soft:  #f6f8fc;
  --green:    #16a06a;
  --radius:   16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 3px rgba(21,35,59,.06), 0 1px 2px rgba(21,35,59,.04);
  --shadow:    0 10px 30px -12px rgba(27,60,115,.28);
  --shadow-lg: 0 24px 60px -20px rgba(27,60,115,.38);
  --maxw: 1200px;
  --ff: "Inter", "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang TC", "Microsoft JhengHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--ff);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16.5px;
  letter-spacing: .005em;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section--soft { background: var(--bg-soft); }
.section--ink { background: linear-gradient(135deg, var(--blue-900), var(--blue-700)); color: #fff; }

/* ---------- Typography helpers ---------- */
h1,h2,h3,h4 { line-height: 1.2; font-weight: 800; letter-spacing: -.01em; color: var(--ink); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--blue-700); background: var(--blue-050);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.section--ink .eyebrow { color: #fff; background: rgba(255,255,255,.14); }
.section-head { max-width: 740px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-bottom: 16px; }
.section-head p { color: var(--slate); font-size: 1.08rem; }
.section--ink .section-head p { color: rgba(255,255,255,.82); }
.lead { font-size: 1.12rem; color: var(--slate); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 700; font-size: .98rem; font-family: inherit;
  padding: 13px 26px; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: .22s ease; white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--amber); color: var(--ink); box-shadow: 0 8px 22px -8px rgba(245,181,0,.6); }
.btn--primary:hover { background: var(--amber-dk); transform: translateY(-2px); }
.btn--blue { background: var(--blue-700); color: #fff; box-shadow: var(--shadow); }
.btn--blue:hover { background: var(--blue-900); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--blue-700); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--blue-500); background: var(--blue-050); }
.btn--white { background: #fff; color: var(--blue-700); }
.btn--white:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn--lg { padding: 16px 32px; font-size: 1.05rem; }
.btn--sm { padding: 9px 18px; font-size: .9rem; gap: 7px; }
.btn--sm svg { width: 16px; height: 16px; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.86); backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand img.logo { height: 26px; width: auto; display: block; }
.site-footer .brand img.logo { height: 30px; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a {
  font-weight: 600; font-size: .96rem; color: var(--slate);
  padding: 9px 15px; border-radius: 9px; transition: .18s;
}
.nav-links a:hover { color: var(--blue-700); background: var(--blue-050); }
.nav-links a.active { color: var(--blue-700); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.lang-toggle {
  display: inline-flex; align-items: center; border: 1.5px solid var(--line);
  border-radius: 999px; overflow: hidden; font-weight: 700; font-size: .82rem;
}
.lang-toggle button {
  border: 0; background: transparent; cursor: pointer; padding: 7px 13px;
  color: var(--muted); font-family: inherit; font-weight: 700; transition: .18s;
  white-space: nowrap;
}
.lang-toggle button.active { background: var(--blue-700); color: #fff; }
.nav-links a.nav-login-m { display: none; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 24px; height: 2.5px; background: var(--ink); border-radius: 2px; margin: 5px 0; transition: .25s; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(62,119,188,.18), transparent 60%),
    radial-gradient(700px 460px at 8% 110%, rgba(245,181,0,.12), transparent 55%),
    linear-gradient(160deg, #fafcff 0%, #eef3fb 100%);
  border-bottom: 1px solid var(--line);
}
.hero .container { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; padding-top: 80px; padding-bottom: 80px; }
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); margin-bottom: 22px; }
.hero h1 .grad {
  background: linear-gradient(100deg, var(--blue-700), var(--blue-500) 55%, var(--amber-dk));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { margin-bottom: 32px; max-width: 560px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 36px; }
.hero-stats { display: flex; gap: 34px; flex-wrap: wrap; }
.hero-stats .stat strong { display: block; font-size: 1.85rem; color: var(--blue-700); font-weight: 800; letter-spacing: -.02em; }
.hero-stats .stat span { font-size: .9rem; color: var(--slate); }
.hero-visual { position: relative; }
.hero-visual .shot {
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  border: 1px solid var(--line); overflow: hidden; background: #fff;
  transform: perspective(1400px) rotateY(-7deg) rotateX(2deg);
}
.hero-visual .shot img { width: 100%; }
.hero-badge {
  position: absolute; bottom: -18px; left: -18px; background: #fff;
  border-radius: 14px; box-shadow: var(--shadow); padding: 14px 18px;
  display: flex; align-items: center; gap: 12px; border: 1px solid var(--line);
}
.hero-badge .ico { width: 40px; height: 40px; border-radius: 10px; background: var(--blue-050); display: grid; place-items: center; color: var(--blue-700); }
.hero-badge strong { display: block; font-size: 1.05rem; color: var(--ink); }
.hero-badge span { font-size: .8rem; color: var(--muted); }

/* ---------- Trust / ISO bar ---------- */
.trust { border-bottom: 1px solid var(--line); background: #fff; }
.trust .container { display: flex; align-items: center; gap: 28px; padding-top: 26px; padding-bottom: 26px; flex-wrap: wrap; justify-content: center; }
.trust .label { font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.iso-badge {
  display: inline-flex; align-items: center; gap: 9px; font-weight: 700; color: var(--blue-900);
  background: var(--blue-050); border: 1px solid #dde7f6; padding: 9px 16px; border-radius: 10px; font-size: .92rem;
}
.iso-badge svg { width: 17px; height: 17px; color: var(--green); }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow-sm); transition: .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d3e0f3; }
.card .ico {
  width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500)); color: #fff; margin-bottom: 18px;
}
.card .ico.amber { background: linear-gradient(135deg, var(--amber), var(--amber-dk)); color: #3a2e00; }
.card .ico svg { width: 26px; height: 26px; }
.card h3 { font-size: 1.18rem; margin-bottom: 10px; }
.card p { color: var(--slate); font-size: .98rem; }
.card .num { font-size: .85rem; font-weight: 800; color: var(--blue-300); letter-spacing: .05em; }

/* pain cards variant */
.pain .card { border-left: 4px solid var(--amber); }
.pain .card h3 { color: var(--blue-900); }

/* ---------- Feature / split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.reverse > .split-media { order: -1; }
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
.split-body h2 { font-size: clamp(1.55rem, 3vw, 2.2rem); margin-bottom: 18px; }
.split-body p { color: var(--slate); margin-bottom: 16px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 13px; color: var(--ink); font-weight: 500; }
.check-list li svg { width: 22px; height: 22px; flex: none; color: var(--green); margin-top: 2px; }
.section--ink .check-list li { color: #fff; }
.section--ink .check-list li svg { color: var(--amber); }

/* ---------- Stat band ---------- */
.kpi-band { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; }
.kpi {
  text-align: center; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--radius); padding: 36px 22px;
}
.kpi strong { display: block; font-size: 2.6rem; font-weight: 800; color: var(--amber); letter-spacing: -.02em; }
.kpi span { color: rgba(255,255,255,.85); font-size: 1rem; }

/* ---------- Methodology / formula ---------- */
.formula {
  background: var(--ink); color: #e8eefb; border-radius: var(--radius);
  padding: 26px 30px; font-family: "SFMono-Regular", "Consolas", "Menlo", monospace;
  font-size: .96rem; line-height: 2; overflow-x: auto; box-shadow: var(--shadow);
}
.formula .hl { color: var(--amber); font-weight: 700; }
.formula .cm { color: #8ea3c7; }

/* ---------- Process steps ---------- */
.steps { display: grid; grid-template-columns: repeat(5,1fr); gap: 14px; counter-reset: step; }
.step {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 24px 18px; text-align: center; position: relative;
}
.step .dot {
  width: 44px; height: 44px; border-radius: 50%; margin: 0 auto 14px;
  display: grid; place-items: center; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
}
.step h4 { font-size: 1rem; margin-bottom: 6px; }
.step p { font-size: .85rem; color: var(--slate); }
.step:not(:last-child)::after {
  content: "→"; position: absolute; right: -12px; top: 38px;
  color: var(--blue-300); font-weight: 800; font-size: 1.2rem; z-index: 2;
}

/* ---------- Screenshot gallery ---------- */
.shots { display: grid; grid-template-columns: repeat(2,1fr); gap: 26px; }
.shot-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: .25s;
}
.shot-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.shot-card .frame { background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.shot-card .frame .bar { display: flex; gap: 6px; padding: 11px 14px; border-bottom: 1px solid var(--line); background: #fff; }
.shot-card .frame .bar i { width: 11px; height: 11px; border-radius: 50%; background: #dde3ee; display: inline-block; }
.shot-card .frame img { width: 100%; }
.shot-card .meta { padding: 18px 22px; }
.shot-card .meta .tag { font-size: .76rem; font-weight: 800; letter-spacing: .06em; color: var(--blue-500); text-transform: uppercase; }
.shot-card .meta h4 { font-size: 1.08rem; margin: 5px 0 6px; }
.shot-card .meta p { font-size: .9rem; color: var(--slate); }

/* ---------- Access box ---------- */
.access {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line);
}
.access .col { padding: 30px 34px; }
.access .col.dark { background: linear-gradient(150deg, var(--blue-900), var(--blue-700)); color: #fff; }
.access .col.light { background: #fff; }
.access dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; align-items: center; margin-top: 10px; }
.access dt { font-size: .82rem; opacity: .75; font-weight: 600; }
.access dd { font-weight: 700; font-family: "Consolas", monospace; }
.access .col.dark a:not(.btn) { color: var(--amber); word-break: break-all; }
.cred { display: inline-flex; gap: 8px; align-items: center; background: rgba(255,255,255,.12); padding: 6px 12px; border-radius: 8px; font-family: monospace; }

/* ---------- OCR demo ---------- */
.ocr { display: grid; grid-template-columns: 300px auto 1fr; gap: 30px; align-items: center; }
.ocr .invoice { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; background: #fff; }
.ocr .arrow { display: grid; place-items: center; }
.extract-row { display: flex; justify-content: space-between; align-items: center; padding: 13px 18px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; background: #fff; }
.extract-row .k { color: var(--slate); font-size: .92rem; }
.extract-row .v { font-weight: 700; font-family: monospace; }
.extract-row .badge { font-size: .72rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: #e7f7ef; color: var(--green); }
.extract-row .badge.hitl { background: #fff4d6; color: var(--amber-dk); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow); }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 7px; color: var(--ink); }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px;
  font-family: inherit; font-size: .98rem; color: var(--ink); background: var(--bg-soft); transition: .18s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 0; border-color: var(--blue-500); background: #fff; box-shadow: 0 0 0 4px rgba(62,119,188,.12); }
.field textarea { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-note { font-size: .82rem; color: var(--muted); margin-top: 10px; }
.info-block { margin-bottom: 30px; }
.info-block h4 { font-size: 1.05rem; margin-bottom: 6px; color: var(--blue-900); }
.info-block .role { font-size: .8rem; font-weight: 700; color: var(--amber-dk); letter-spacing: .04em; text-transform: uppercase; }
.info-block p { color: var(--slate); font-size: .95rem; }
.info-block a { color: var(--blue-700); font-weight: 600; }

/* ---------- Page banner (sub pages) ---------- */
.page-banner {
  background: linear-gradient(135deg, var(--blue-900), var(--blue-700));
  color: #fff; padding: 72px 0 64px; text-align: center; position: relative; overflow: hidden;
}
.page-banner::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(600px 300px at 80% 0%, rgba(245,181,0,.16), transparent 60%);
}
.page-banner .container { position: relative; }
.page-banner h1 { color: #fff; font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: 14px; }
.page-banner p { color: rgba(255,255,255,.85); max-width: 640px; margin: 0 auto; font-size: 1.08rem; }
.breadcrumb { font-size: .85rem; color: rgba(255,255,255,.65); margin-bottom: 18px; }
.breadcrumb a { color: rgba(255,255,255,.85); }

/* ---------- CTA strip ---------- */
.cta-strip { text-align: center; }
.cta-strip h2 { color: #fff; font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin-bottom: 14px; }
.cta-strip p { color: rgba(255,255,255,.85); max-width: 560px; margin: 0 auto 28px; }
.cta-strip .hero-cta { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #b9c5da; padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 36px; margin-bottom: 38px; }
.site-footer p { font-size: .92rem; color: #93a2bd; margin-top: 14px; max-width: 320px; }
.footer-grid h5 { color: #fff; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 16px; }
.footer-grid a { display: block; font-size: .94rem; color: #b9c5da; padding: 5px 0; transition: .15s; }
.footer-grid a:hover { color: var(--amber); }
.footer-iso span { display: inline-block; font-size: .78rem; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); padding: 5px 11px; border-radius: 7px; margin: 0 6px 6px 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .85rem; color: #7d8ca8; }

/* ---------- i18n visibility ---------- */
[data-lang-show] { display: none; }
html[lang="zh-Hant"] [data-lang-show="zh"] { display: revert; }
html[lang="en"]      [data-lang-show="en"] { display: revert; }

/* reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: .6s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero .container { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual .shot { transform: none; }
  .split, .contact-grid, .ocr, .access { grid-template-columns: 1fr; }
  .ocr .arrow { transform: rotate(90deg); }
  .grid-3, .kpi-band { grid-template-columns: 1fr; }
  .grid-2, .shots { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step:not(:last-child)::after { display: none; }
  .split.reverse > .split-media { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .section { padding: 60px 0; }
  .nav-links, .nav-actions .btn { display: none; }
  .nav-toggle { display: block; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; position: absolute; top: 72px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 14px 24px; gap: 4px; box-shadow: var(--shadow);
  }
  .nav.open .nav-links a { padding: 12px 14px; }
  .nav.open .nav-links a.nav-login-m { display: block; align-self: stretch; text-align: center; margin-top: 8px; background: var(--blue-700); color: #fff; border-radius: 999px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
}
