/* ==========================================================================
   Sheet Metal Fabrication - B2B export site
   Original design system. Light / industrial / technical-drawing aesthetic.
   ========================================================================== */

:root {
  --ink: #0e1b2a;
  --ink-2: #46586d;
  --ink-3: #7c8b9e;
  --brand: #0b4a8f;
  --brand-dark: #073066;
  --brand-light: #eaf1fa;
  --accent: #e8631a;
  --accent-dark: #c44f0f;
  --line: #e2e7ee;
  --line-2: #cfd7e2;
  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --bg-dark: #0e1b2a;
  --ok: #1d9e75;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;

  --wrap: 1200px;
  --pad: 24px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--accent); }

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 42px; }
h2 { font-size: 30px; }
h3 { font-size: 19px; }
h4 { font-size: 16px; }
p { margin: 0 0 1em; }

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

.eyebrow {
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin: 0 0 10px;
}

.lead { font-size: 17px; color: var(--ink-2); }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.center { text-align: center; }
.mono { font-family: var(--mono); }

.section { padding: 78px 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--bg-dark); color: #fff; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .lead, .section-dark .muted { color: #a9b8c9; }
.section-head { max-width: 760px; margin: 0 auto 46px; text-align: center; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--r-sm);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: .16s ease;
  font-family: inherit;
  line-height: 1.2;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--brand); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--brand); background: var(--brand-light); color: var(--brand); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn-ghost-light:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-lg { padding: 15px 30px; font-size: 16px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- top bar ---------- */
.topbar {
  background: var(--bg-dark);
  color: #b9c6d6;
  font-size: 13px;
  padding: 8px 0;
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar-left { display: flex; gap: 20px; flex-wrap: wrap; }
.topbar a { color: #dbe4ee; }
.topbar a:hover { color: #fff; }
.topbar-item { display: inline-flex; align-items: center; gap: 6px; }

.lang-switch { display: inline-flex; border: 1px solid rgba(255,255,255,.25); border-radius: 4px; overflow: hidden; }
.lang-switch button {
  background: transparent; border: 0; color: #b9c6d6; font-family: inherit;
  font-size: 12px; font-weight: 600; padding: 4px 11px; cursor: pointer;
}
.lang-switch button.active { background: var(--accent); color: #fff; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 60;
  background: #fff; border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 26px; height: 74px; }

.logo { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.logo-mark { width: 38px; height: 38px; flex-shrink: 0; }
.logo-text { line-height: 1.12; }
.logo-text b { display: block; font-size: 17px; color: var(--ink); letter-spacing: -.02em; }
.logo-text span { display: block; font-size: 11px; color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a {
  font-size: 15px; font-weight: 500; color: var(--ink-2);
  padding: 9px 12px; border-radius: var(--r-sm); white-space: nowrap;
}
.nav a:hover { color: var(--brand); background: var(--brand-light); }
.nav a.active { color: var(--brand); font-weight: 700; }
.head-cta { flex-shrink: 0; }

.burger { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.burger span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  background:
    linear-gradient(180deg, #f7fafd 0%, #ffffff 100%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero .wrap {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px;
  align-items: center; padding-top: 66px; padding-bottom: 66px;
}
.hero h1 { font-size: 46px; margin-bottom: 18px; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero .lead { font-size: 18px; max-width: 520px; margin-bottom: 26px; }
.hero-points { display: flex; flex-direction: column; gap: 9px; margin: 24px 0 0; padding: 0; list-style: none; }
.hero-points li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--ink-2); }
.hero-points svg { flex-shrink: 0; margin-top: 3px; }

.hero-visual { position: relative; }
.hero-visual svg { width: 100%; height: auto; }

.hero-badge {
  position: absolute; bottom: -6px; left: 0;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 12px 16px; box-shadow: 0 6px 22px rgba(14,27,42,.08);
}
.hero-badge b { display: block; font-size: 22px; color: var(--brand); line-height: 1.1; }
.hero-badge span { font-size: 12px; color: var(--ink-3); }

/* ---------- page banner ---------- */
.page-hero {
  background: var(--bg-dark); color: #fff; padding: 62px 0 56px;
  background-image: linear-gradient(180deg, #12243a 0%, #0e1b2a 100%);
}
.page-hero h1 { color: #fff; font-size: 38px; margin-bottom: 12px; }
.page-hero p { color: #a9b8c9; max-width: 720px; margin: 0; font-size: 17px; }
.crumb { font-size: 13px; color: var(--ink-3); margin-bottom: 14px; }
.crumb a { color: #8ea2b8; }
.crumb a:hover { color: var(--accent); }

/* ---------- stats ---------- */
.stats { border-bottom: 1px solid var(--line); background: #fff; }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 30px 20px; text-align: center; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat b { display: block; font-size: 34px; color: var(--brand); line-height: 1.1; letter-spacing: -.02em; }
.stat span { font-size: 13px; color: var(--ink-2); }

/* ---------- grids ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- cards ---------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px; transition: .18s ease;
}
.card:hover { border-color: var(--line-2); box-shadow: 0 8px 26px rgba(14,27,42,.07); transform: translateY(-2px); }
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.card-ico { width: 44px; height: 44px; margin-bottom: 16px; color: var(--brand); }
.card-ico svg { width: 100%; height: 100%; }
.card-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; margin-top: 12px; }

.card-flat { background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.card-flat h3 { font-size: 17px; }

/* spec list inside cards */
.spec { list-style: none; margin: 14px 0 0; padding: 0; font-size: 14px; }
.spec li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px dashed var(--line); }
.spec li:first-child { border-top: 0; }
.spec span:last-child { color: var(--ink); font-weight: 600; font-family: var(--mono); font-size: 13px; }

/* ---------- numbered process ---------- */
.steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; counter-reset: s; }
.step { padding: 0 14px; position: relative; text-align: center; }
.step:before {
  counter-increment: s; content: counter(s, decimal-leading-zero);
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; margin: 0 auto 12px; border-radius: 50%;
  background: var(--brand-light); color: var(--brand);
  font-family: var(--mono); font-size: 14px; font-weight: 700;
}
.step b { display: block; font-size: 15px; margin-bottom: 4px; }
.step p { font-size: 13px; color: var(--ink-2); margin: 0; }
.step:after {
  content: ""; position: absolute; top: 21px; right: -8px; width: 16px;
  border-top: 1px dashed var(--line-2);
}
.step:last-child:after { display: none; }

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
table.spec-table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
table.spec-table th, table.spec-table td { padding: 13px 18px; text-align: left; border-bottom: 1px solid var(--line); }
table.spec-table th { background: var(--bg-alt); font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
table.spec-table tr:last-child td { border-bottom: 0; }
table.spec-table td:first-child { font-weight: 600; width: 32%; }

/* ---------- material chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 16px;
  font-size: 14px; font-weight: 500; color: var(--ink); background: #fff;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- two-column feature ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }

/* ---------- accordion ---------- */
.acc { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: #fff; }
.acc-item { border-bottom: 1px solid var(--line); }
.acc-item:last-child { border-bottom: 0; }
.acc-q {
  width: 100%; text-align: left; background: none; border: 0; font-family: inherit;
  font-size: 16px; font-weight: 600; color: var(--ink); padding: 18px 50px 18px 22px;
  cursor: pointer; position: relative; line-height: 1.5;
}
.acc-q:hover { color: var(--brand); }
.acc-q:after {
  content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  font-size: 22px; font-weight: 400; color: var(--accent); line-height: 1;
}
.acc-item.open .acc-q:after { content: "\2013"; }
.acc-a { display: none; padding: 0 22px 20px; color: var(--ink-2); font-size: 15px; }
.acc-item.open .acc-a { display: block; }

/* ---------- quote band ---------- */
.cta-band { background: var(--brand); color: #fff; padding: 56px 0; }
.cta-band h2 { color: #fff; margin-bottom: 10px; }
.cta-band p { color: #c5d8ee; margin-bottom: 0; max-width: 620px; }
.cta-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 34px; flex-wrap: wrap; }

/* ---------- footer ---------- */
.site-foot { background: var(--bg-dark); color: #93a3b7; padding: 58px 0 0; font-size: 14px; }
.site-foot h4 { color: #fff; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 16px; }
.site-foot a { color: #93a3b7; }
.site-foot a:hover { color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 44px; }
.foot-list { list-style: none; margin: 0; padding: 0; }
.foot-list li { margin-bottom: 9px; }
.foot-bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px;
}
.foot-logo { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; }
.foot-logo b { color: #fff; font-size: 17px; }

/* ---------- float cta ---------- */
.float-cta {
  position: fixed; right: 22px; bottom: 22px; z-index: 70;
  display: flex; flex-direction: column; gap: 10px;
}
.float-cta button, .float-cta a {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--accent); color: #fff; border: 0; border-radius: 999px;
  padding: 13px 20px; font-family: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer; box-shadow: 0 8px 24px rgba(232,99,26,.34);
}
.float-cta button:hover, .float-cta a:hover { background: var(--accent-dark); color: #fff; }
.float-cta .wa { background: #1d9e75; box-shadow: 0 8px 24px rgba(29,158,117,.3); }
.float-cta .wa:hover { background: #16815f; }

/* ---------- modal ---------- */
.modal {
  display: none; position: fixed; inset: 0; z-index: 90;
  background: rgba(14,27,42,.62); padding: 24px; overflow-y: auto;
}
.modal.open { display: block; }
.modal-box {
  background: #fff; border-radius: var(--r-lg); max-width: 720px; margin: 40px auto;
  padding: 34px; position: relative;
}
.modal-close {
  position: absolute; right: 16px; top: 14px; background: none; border: 0;
  font-size: 26px; line-height: 1; color: var(--ink-3); cursor: pointer;
}
.modal-close:hover { color: var(--ink); }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: 15px; color: var(--ink);
  padding: 11px 13px; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: #fff; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-light);
}
.field textarea { min-height: 104px; resize: vertical; }
.form-note { font-size: 13px; color: var(--ink-3); margin: 14px 0 0; }
.form-ok {
  display: none; background: #e8f7f1; border: 1px solid #9ad9c1; color: #0f6e56;
  border-radius: var(--r-sm); padding: 13px 16px; font-size: 14px; margin-top: 16px;
}
.form-ok.show { display: block; }
.form-ok a { color: inherit; text-decoration: underline; }
.ok-files { font-size: 13px; font-weight: 500; }

/* ---------- dropzone (drawing upload) ---------- */
.dropzone {
  display: block; cursor: pointer; outline: none;
  border: 1.6px dashed #b9c6d6; border-radius: var(--r-sm);
  background: #f7fafd; padding: 22px 18px; transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone:focus, .dropzone.drag { border-color: var(--brand); background: #eef4fb; }
.dropzone input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.dz-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; color: var(--ink-2); }
.dz-inner svg { color: var(--brand); }
.dz-hint { margin: 0; font-size: 13px; color: var(--ink-3); }
.dz-files { font-size: 13px; font-weight: 600; color: var(--brand); }

/* ---------- info list ---------- */
.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.info-list li:last-child { border-bottom: 0; }
.info-list svg { flex-shrink: 0; color: var(--brand); margin-top: 2px; }
.info-list b { display: block; font-size: 14px; }
.info-list span { font-size: 15px; color: var(--ink-2); }

/* ---------- notice ---------- */
.notice {
  background: #fff8f1; border: 1px solid #f6d2b4; border-left: 3px solid var(--accent);
  border-radius: var(--r-sm); padding: 16px 20px; font-size: 14px; color: #7a4212;
}
.notice b { color: #5c3009; }

/* ---------- product tiles ---------- */
.tile { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: #fff; transition: .18s ease; }
.tile:hover { border-color: var(--line-2); box-shadow: 0 8px 26px rgba(14,27,42,.07); }
.tile-media { background: var(--bg-alt); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: center; padding: 22px; }
.tile-media svg { width: 100%; max-width: 190px; height: auto; }
/* 卡片内嵌照片：有图时替换线稿占位图 */
.tile-photos { display: none; width: 100%; }
.tile-media.media-replaced { padding: 0; display: block; }
.tile-media.media-replaced svg { display: none; }
.tile-media.media-replaced .tile-photos { display: grid; grid-template-columns: 1fr; }
.tile-media.media-replaced .tile-photos.multi { grid-template-columns: 1fr 1fr; }
.tile-photos .gallery-item { border: none; border-radius: 0; }
.tile-photos .gallery-item img { height: 160px; }
.tile-photos .gallery-item figcaption { font-size: 12px; padding: 6px 10px; border-top: 1px solid var(--line); }
.tile-body { padding: 20px 22px 24px; }
.tile-body h3 { font-size: 17px; margin-bottom: 6px; }
.tile-body p { font-size: 14px; color: var(--ink-2); margin-bottom: 0; }

/* ---------- misc ---------- */
.hr { height: 1px; background: var(--line); border: 0; margin: 0; }
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { position: relative; padding: 0 0 12px 30px; font-size: 15px; color: var(--ink-2); }
.check-list li:before {
  content: ""; position: absolute; left: 4px; top: 8px; width: 9px; height: 5px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
.check-list li b { color: var(--ink); }

/* photo gallery (populated from /api/photos) */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
  margin-top: 6px;
}
.gallery-item { margin: 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: #fff; }
.gallery-item img { width: 100%; height: 190px; object-fit: cover; display: block; }
.gallery-item figcaption { padding: 9px 12px; font-size: 13px; color: var(--ink-2); }
.gallery-empty { color: var(--ink-3); font-size: 14px; padding: 22px; text-align: center; border: 1px dashed var(--line); border-radius: var(--r-lg); }
@media (max-width: 620px) { .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; } .gallery-item img { height: 120px; } }

@media (max-width: 1080px) {
  .nav a { padding: 9px 9px; font-size: 14px; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 30px 0; }
  .step:nth-child(3n):after { display: none; }
}

@media (max-width: 900px) {
  h1 { font-size: 34px; }
  .hero h1 { font-size: 34px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; padding-top: 44px; padding-bottom: 44px; }
  .split { grid-template-columns: 1fr; gap: 34px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .stats .wrap { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat { border-top: 1px solid var(--line); }
  .stat:nth-child(-n+2) { border-top: 0; }

  .burger { display: block; margin-left: auto; }
  .head-cta { display: none; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0; padding: 10px 16px 18px;
    box-shadow: 0 14px 26px rgba(14,27,42,.09);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 10px; font-size: 16px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .site-head .wrap { position: relative; }
}

@media (max-width: 620px) {
  h2 { font-size: 24px; }
  .section { padding: 54px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .stat b { font-size: 27px; }
  .page-hero h1 { font-size: 29px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step:after { display: none; }
  .float-cta { right: 14px; bottom: 14px; }
  .float-cta button, .float-cta a { padding: 11px 16px; font-size: 14px; }
  .modal { padding: 0; }
  .modal-box { margin: 0; border-radius: 0; min-height: 100vh; padding: 26px 20px; }
}

/* five-column process strip (quality gates) */
.steps-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1080px) {
  .steps-5 { grid-template-columns: repeat(3, 1fr); }
  .steps-5 .step:nth-child(3n):after { display: none; }
}
@media (max-width: 620px) {
  .steps-5 { grid-template-columns: repeat(2, 1fr); }
  .steps-5 .step:after { display: none; }
}

/* timeline list */
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { display: grid; grid-template-columns: 120px 1fr; gap: 24px; padding: 20px 0; border-top: 1px solid var(--line); }
.tl li:first-child { border-top: 0; }
.tl b { font-family: var(--mono); color: var(--brand); font-size: 16px; }
.tl span { color: var(--ink-2); font-size: 15px; }

@media (max-width: 620px) {
  .tl li { grid-template-columns: 1fr; gap: 4px; }
}
