/* ==========================================================================
   晉昌貿易 JIN CHANG HARDWARE TRADING — 品牌一頁式網站
   設計語彙：勃根地紅 × 米白，精密工業感、留白、無襯線中文 + 襯線英文標籤
   ========================================================================== */

:root {
  /* 色彩 Palette */
  --burgundy: #6f2937;
  --burgundy-deep: #4c1b25;
  --burgundy-soft: rgba(111, 41, 55, 0.08);
  --cream: #f7f2e9;
  --cream-soft: #fbf8f2;
  --paper: #fffdf9;
  --ink: #2a2320;
  --ink-soft: #5b514c;
  --slate: #4b5b63;
  --slate-soft: rgba(75, 91, 99, 0.1);
  --line: rgba(42, 35, 32, 0.12);
  --line-strong: rgba(42, 35, 32, 0.22);

  /* 字體 Typography — 全系統字型堆疊，確保跨裝置／瀏覽器一致呈現 */
  --font-cjk: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Heiti TC",
    system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-en: Georgia, "Times New Roman", "STZhongsong", serif;

  --max-width: 1120px;
  --section-pad: clamp(72px, 11vw, 148px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-cjk);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

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

.eyebrow {
  font-family: var(--font-en);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--burgundy);
  margin: 0 0 14px;
}

h1, h2, h3 {
  font-family: var(--font-cjk);
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  letter-spacing: 0.03em;
}

h2 {
  font-size: clamp(26px, 3.4vw, 36px);
  letter-spacing: 0.06em;
}

h3 {
  font-size: 18px;
  letter-spacing: 0.03em;
}

p {
  margin: 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-lede {
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.9;
}

section {
  padding: var(--section-pad) 0;
}

.bg-cream {
  background: var(--cream);
}

.divider {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Nav ---------- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 253, 249, 0.88);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.site-nav.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 2px 20px rgba(42, 35, 32, 0.04);
}
.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand img {
  display: block;
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 3px 8px rgba(5, 48, 115, 0.14));
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.brand-text .zh {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.08em;
  color: #092f70;
}
.brand-text .en {
  font-family: var(--font-en);
  font-style: italic;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: #46658f;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  font-size: 14.5px;
  letter-spacing: 0.04em;
  color: var(--ink);
  position: relative;
  padding-bottom: 4px;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--burgundy);
  transition: right 0.28s ease;
}
.nav-links a:hover::after {
  right: 0;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--ink);
  padding: 9px 20px;
  border-radius: 2px;
  font-size: 13.5px;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.nav-cta:hover {
  background: var(--burgundy);
  border-color: var(--burgundy);
  color: #fff;
}

.cta-mobile-only {
  display: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 168px 0 120px;
  background: var(--cream);
  overflow: hidden;
}
.hero-watermark {
  position: absolute;
  top: 50%;
  right: -60px;
  width: min(46vw, 620px);
  transform: translateY(-46%);
  opacity: 0.55;
  pointer-events: none;
}
.hero .wrap {
  position: relative;
  z-index: 1;
}
.hero-inner {
  max-width: 660px;
}
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}
.hero-tags span {
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--burgundy);
  border: 1px solid var(--burgundy);
  padding: 5px 13px;
  border-radius: 999px;
}
.hero h1 {
  font-size: clamp(34px, 5.4vw, 54px);
  line-height: 1.32;
}
.hero-en {
  font-family: var(--font-en);
  font-style: italic;
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--ink-soft);
  margin-top: 16px;
  letter-spacing: 0.02em;
}
.hero-desc {
  margin-top: 26px;
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 540px;
  line-height: 1.9;
}
.hero-actions {
  margin-top: 42px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  font-size: 14.5px;
  letter-spacing: 0.06em;
  text-decoration: none;
  border-radius: 2px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color .25s ease;
}
.btn-primary {
  background: var(--burgundy);
  color: #fff;
  border: 1px solid var(--burgundy);
}
.btn-primary:hover {
  background: var(--burgundy-deep);
  border-color: var(--burgundy-deep);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(111, 41, 55, 0.24);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: center;
}
.about-copy p {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.95;
}
.stat-row {
  display: flex;
  gap: 40px;
  margin-top: 44px;
  flex-wrap: wrap;
}
.stat {
  min-width: 110px;
}
.stat .num {
  font-family: var(--font-en);
  font-size: 34px;
  color: var(--burgundy);
  line-height: 1;
}
.stat .label {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}
.about-media {
  position: relative;
  background: var(--cream-soft);
  border: 1px solid var(--line);
  padding: 36px 30px 26px;
  border-radius: 3px;
}
.about-media img {
  display: block;
  margin: 0 auto;
  width: 100%;
  max-height: 480px;
  object-fit: contain;
}
.about-media figcaption {
  margin-top: 18px;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-soft);
  letter-spacing: 0.05em;
}

/* ---------- Brand portfolio ---------- */
.brand-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.brand-card {
  border: 1px solid var(--line);
  padding: 40px 36px;
  border-radius: 3px;
  background: var(--paper);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.brand-card:hover {
  box-shadow: 0 18px 40px rgba(42, 35, 32, 0.08);
  transform: translateY(-3px);
}
.brand-card .tag {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #fff;
  background: var(--burgundy);
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.brand-card.alt .tag {
  background: var(--slate);
}
.brand-card h3 {
  font-family: var(--font-en);
  font-style: italic;
  font-size: 26px;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.brand-card .zh-sub {
  margin-top: 6px;
  font-size: 14px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}
.brand-card ul {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.brand-card li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 11px;
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.6;
}
.brand-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--burgundy);
}
.brand-card.alt li::before {
  background: var(--slate);
}

.material-row {
  margin-top: 40px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.material-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 0.03em;
  color: var(--ink);
  background: var(--paper);
}
.material-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--burgundy);
}

/* ---------- Core competencies ---------- */
.comp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.comp-card {
  padding: 34px 30px;
  border-radius: 3px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.comp-icon {
  width: 46px;
  height: 46px;
  margin-bottom: 22px;
}
.comp-card ul {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.comp-card li {
  font-size: 14.5px;
  color: var(--ink-soft);
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.comp-card li:first-child {
  border-top: none;
}

/* ---------- Ecosystem diagram ---------- */
.diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.diagram-core {
  width: 100%;
  max-width: 640px;
  border: 1.5px solid var(--burgundy);
  background: var(--burgundy-soft);
  border-radius: 4px;
  padding: 26px 32px;
  text-align: center;
}
.diagram-core .label {
  font-family: var(--font-en);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--burgundy);
  margin-bottom: 10px;
}
.diagram-core .items {
  display: flex;
  justify-content: center;
  gap: 34px;
  flex-wrap: wrap;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.diagram-connector {
  width: 1.5px;
  height: 40px;
  background: var(--line-strong);
}
.diagram-terminals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  width: 100%;
  max-width: 800px;
}
.diagram-terminal {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 22px 16px;
  text-align: center;
  background: var(--paper);
}
.diagram-terminal .name {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
}
.diagram-terminal .meta {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}
.diagram-top-line {
  width: 100%;
  max-width: 800px;
  height: 1.5px;
  background: var(--line-strong);
  margin-bottom: 0;
  position: relative;
}

/* ---------- Comparison table ---------- */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
.compare-table th, .compare-table td {
  padding: 18px 22px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.compare-table thead th {
  font-family: var(--font-en);
  font-style: italic;
  font-size: 15px;
  letter-spacing: 0.03em;
  color: var(--ink);
  border-bottom: 1.5px solid var(--ink);
}
.compare-table th:first-child, .compare-table td:first-child {
  color: var(--ink-soft);
  font-size: 13px;
  letter-spacing: 0.06em;
  width: 22%;
}
.compare-table td.b-torque {
  color: var(--burgundy-deep);
}
.compare-table thead th.b-torque-h {
  color: var(--burgundy);
}
.compare-table thead th.flowinn-h {
  color: var(--slate);
}

/* ---------- Track record ---------- */
.record-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.record-card {
  padding: 30px 24px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
}
.record-card .tag {
  font-family: var(--font-en);
  font-style: italic;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--burgundy);
}
.record-card h3 {
  margin-top: 12px;
  font-size: 16px;
}
.record-card p {
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.8;
}
.record-card .year {
  margin-top: 16px;
  font-family: var(--font-en);
  font-size: 12.5px;
  color: var(--ink-soft);
  letter-spacing: 0.05em;
}

.case-feature {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 40px;
  background: var(--cream-soft);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.case-feature h3 {
  font-size: 20px;
}
.case-feature .case-label {
  font-family: var(--font-en);
  font-style: italic;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--burgundy);
  margin-bottom: 10px;
}
.case-feature .case-title {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.case-feature p {
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.85;
}

/* ---------- Contact ---------- */
.contact-section {
  background: var(--burgundy);
  color: #fff;
}
.contact-section .eyebrow {
  color: #e7c9ce;
}
.contact-section h2 {
  color: #fff;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-top: 50px;
}
.contact-block .label {
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: #e7c9ce;
  margin-bottom: 8px;
}
.contact-block .value {
  font-size: 16px;
  margin-bottom: 26px;
  line-height: 1.7;
}
.contact-block a.value {
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  display: inline-block;
}
.contact-block a.value:hover {
  border-color: #fff;
}
.legal-box {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 3px;
  padding: 30px 32px;
}
.legal-box .name-zh {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.legal-box .name-en {
  font-family: var(--font-en);
  font-style: italic;
  font-size: 13.5px;
  color: #e7c9ce;
  margin-top: 6px;
}
.legal-box dl {
  margin: 22px 0 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px 18px;
  font-size: 13.5px;
}
.legal-box dt {
  color: #e7c9ce;
  letter-spacing: 0.04em;
}
.legal-box dd {
  margin: 0;
}

.map-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 13px;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--burgundy-deep);
  color: rgba(255, 255, 255, 0.72);
  padding: 26px 0;
  font-size: 12.5px;
  letter-spacing: 0.03em;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about-grid, .contact-grid {
    grid-template-columns: 1fr;
  }
  .about-media {
    order: -1;
  }
  .brand-cards, .comp-grid {
    grid-template-columns: 1fr;
  }
  .record-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .case-feature {
    grid-template-columns: 1fr;
  }
  .diagram-terminals {
    grid-template-columns: 1fr;
  }
  .hero-watermark {
    opacity: 0.35;
    width: 70vw;
  }
}

@media (max-width: 760px) {
  .brand img {
    width: 46px;
    height: 46px;
  }
  .brand-text .zh {
    font-size: 15px;
  }
  .brand-text .en {
    font-size: 9.5px;
  }
  .nav-links, .nav-cta {
    display: none;
  }
  .cta-mobile-only {
    display: none;
  }
  .nav-toggle {
    display: block;
  }
  .site-nav.open .nav-links {
    display: flex;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--paper);
    flex-direction: column;
    gap: 0;
    padding: 8px 28px 24px;
    border-bottom: 1px solid var(--line);
  }
  .site-nav.open .nav-links a {
    display: block;
    padding: 13px 0;
  }
  .site-nav.open .nav-links li.cta-mobile-only {
    display: block;
    margin-top: 10px;
    padding-top: 6px;
    border-top: 1px solid var(--line);
  }
  .site-nav.open .nav-links li.cta-mobile-only a {
    padding: 12px 0;
  }
  .hero {
    padding: 140px 0 90px;
  }
  .record-grid {
    grid-template-columns: 1fr;
  }
  section {
    padding: 72px 0;
  }
}
