:root {
  --text: #1c1d1f;
  --muted: #5d5f63;
  --line: #d8d5ce;
  --bg: #fbfaf7;
  --bg-gray: #efede8;
  --dark: #1f2326;
  --dark-2: #2a2f33;
  --dark-line: #3b4146;
  --accent: #c8521f;
  --accent-dark: #a8431a;
  --font: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", sans-serif;
  --num: "Barlow Condensed", "Arial Narrow", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 68px; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.85;
  color: var(--text);
  background: var(--bg);
}

h1, h2, h3, p, figure { margin: 0; }

/* Line breaking: avoid orphaned characters and punctuation at line start */
p, li, td { text-wrap: pretty; line-break: strict; }
h1, h2, h3 { text-wrap: balance; line-break: strict; }
/* Keeps a phrase together; lines break between phrases first */
.nw { display: inline-block; }
html[lang="en"] .nw { display: inline; }
.keep { white-space: nowrap; }
a { color: inherit; }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Buttons */
.btn {
  display: inline-block;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  padding: 12px 32px;
  color: #fff;
  background: var(--accent);
  border: 0;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s;
}
.btn:hover { background: var(--accent-dark); }
.btn-light { background: #fff; color: var(--accent); }
.btn-light:hover { background: var(--bg-gray); }

.link-arrow {
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
.link-arrow:hover { color: var(--accent); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 250, 247, .96);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-mark {
  width: 22px;
  height: 22px;
  background: var(--accent);
  clip-path: polygon(0 0, 100% 0, 100% 60%, 60% 100%, 0 100%);
}
.logo strong { font-size: 19px; letter-spacing: .06em; white-space: nowrap; }
.logo-en { font-size: 11px; letter-spacing: .12em; color: var(--muted); }

.site-nav { display: flex; align-items: center; gap: 30px; margin-left: auto; }
.site-nav a {
  font-size: 15px;
  text-decoration: none;
  color: var(--muted);
}
.site-nav a:hover { color: var(--text); }
.site-nav .nav-contact {
  color: #fff;
  background: var(--dark);
  padding: 7px 18px;
}
.site-nav .nav-contact:hover { background: var(--accent); color: #fff; }

/* Language switch */
.header-tools { display: flex; align-items: center; gap: 12px; margin-left: 28px; }
.lang-switch { display: flex; border: 1px solid var(--line); }
.lang-switch button {
  font: inherit;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
  min-width: 40px;
  padding: 5px 10px;
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
}
.lang-switch button + button { border-left: 1px solid var(--line); }
.lang-switch button:hover { color: var(--text); }
.lang-switch button[aria-pressed="true"] { background: var(--dark); color: #fff; }

/* English mode: hide the English sub-labels that duplicate the headings */
html[lang="en"] .logo-en,
html[lang="en"] .industry-tag,
html[lang="en"] .solutions h3 small { display: none; }
html[lang="en"] .hero h1 { letter-spacing: 0; }
html[lang="en"] .section-title { letter-spacing: .01em; }

.nav-toggle {
  display: none;
  white-space: nowrap;
  font: inherit;
  font-size: 14px;
  background: none;
  border: 1px solid var(--line);
  padding: 4px 12px;
  cursor: pointer;
}

/* Hero */
.hero {
  padding: 80px 0 96px;
  background-color: var(--bg);
  background-image:
    linear-gradient(90deg, rgba(0,0,0,.045) 1px, transparent 1px),
    linear-gradient(rgba(0,0,0,.045) 1px, transparent 1px);
  background-size: 32px 32px;
}
.hero-text { max-width: 760px; }
.hero-label {
  display: inline-block;
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--accent);
  border-left: 3px solid var(--accent);
  padding-left: 10px;
  line-height: 1.4;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(30px, 5.6vw, 64px);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: .03em;
  margin-bottom: 28px;
}
.hero-text > p:not(.hero-label) { color: var(--muted); max-width: 30em; }
.hero-text > p + p { margin-top: 8px; }
.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 36px;
}
.hero-fields {
  list-style: none;
  padding: 0;
  margin: 72px 0 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 2px solid var(--text);
}
.hero-fields a {
  display: block;
  padding: 18px 20px 4px 0;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  transition: color .2s;
}
.hero-fields a:hover { color: var(--accent); }
.hero-fields span {
  display: block;
  font-family: var(--num);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Sections */
.section { padding: 96px 0; }
.section-gray { background: var(--bg-gray); }
.section-dark { background: var(--dark); color: #fff; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  margin-bottom: 48px;
  border-bottom: 2px solid currentColor;
}
.section-title {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: .05em;
  line-height: 1.3;
}
.section-head p { color: var(--muted); font-size: 15px; }
.section-dark .section-head { border-color: #fff; }
.section-dark .section-head p { color: #a9adb1; }

/* Services */
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--dark-line);
  border-left: 1px solid var(--dark-line);
}
.services article {
  padding: 32px 30px 36px;
  border-right: 1px solid var(--dark-line);
  border-bottom: 1px solid var(--dark-line);
  transition: background .25s;
}
.services article:hover { background: var(--dark-2); }
.services .num {
  display: block;
  font-family: var(--num);
  font-size: 44px;
  font-weight: 600;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 18px;
}
.services h3 { font-size: 20px; margin-bottom: 6px; }
.services p { color: #a9adb1; font-size: 15px; }

/* Industries */
.industries {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px 64px;
}
.industry { border-top: 3px solid var(--dark); padding-top: 24px; }
.industry:hover { border-top-color: var(--accent); }
.industry-tag {
  display: inline-block;
  font-family: var(--num);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}
.industry h3 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.industry-text p { color: var(--muted); max-width: 34em; }
.industry-text p + p { margin-top: 8px; }
.industry .note {
  margin-top: 16px !important;
  padding: 12px 16px;
  background: var(--bg-gray);
  border-left: 3px solid var(--accent);
  color: var(--text);
}

/* Feature band */
.feature-band {
  background: var(--accent);
  color: #fff;
  padding: 72px 0;
}
.feature-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.feature-label {
  font-size: 14px;
  letter-spacing: .1em;
  opacity: .85;
  margin-bottom: 10px;
}
.feature-band h2 {
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 900;
  line-height: 1.35;
}
.feature-inner p { line-height: 1.9; }
.feature-inner .btn { margin-top: 24px; }

/* Solutions */
.solutions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.solutions article {
  padding: 32px 32px 34px;
  background: var(--bg);
  border-top: 3px solid var(--dark);
  transition: border-color .25s;
}
.solutions article:hover { border-top-color: var(--accent); }
.solutions h3 {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  align-items: baseline;
  font-size: 21px;
  margin-bottom: 14px;
}
.solutions h3 span {
  grid-row: span 2;
  font-family: var(--num);
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
  color: var(--accent);
}
.solutions h3 small {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: .03em;
}
.solutions p { color: var(--muted); font-size: 15px; }
.solutions p + p { margin-top: 6px; }

/* Process */
.process {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
}
.process li {
  counter-increment: step;
  position: relative;
  padding: 0 18px 0 0;
}
.process li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--num);
  font-size: 52px;
  font-weight: 600;
  line-height: 1;
  color: var(--dark);
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 2px solid var(--line);
}
.process li::after {
  content: "";
  position: absolute;
  left: 0;
  top: 64px;
  width: 10px;
  height: 10px;
  background: var(--accent);
}
.process li:hover::before { color: var(--accent); }
.process h3 { font-size: 18px; margin-bottom: 6px; }
.process p { font-size: 14px; color: var(--muted); }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}
.contact-intro { color: var(--muted); margin-bottom: 28px; }
.info-table { width: 100%; border-collapse: collapse; }
.info-table th,
.info-table td {
  text-align: left;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.info-table th { width: 80px; font-weight: 500; color: var(--muted); }
.info-table a { text-decoration: none; }
.info-table a:hover { color: var(--accent); }

.contact-form {
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 36px;
  background: var(--bg);
  border-top: 3px solid var(--accent);
}
.contact-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.contact-form input,
.contact-form select,
.contact-form textarea {
  font: inherit;
  font-size: 15px;
  color: var(--text);
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #c4c0b7;
  border-radius: 0;
}
.contact-form textarea { resize: vertical; }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.contact-form .invalid { border-color: var(--accent); }
.contact-form .btn { justify-self: start; padding: 12px 48px; }
.form-note { font-size: 14px; color: var(--muted); min-height: 1.5em; }
.form-note.error { color: var(--accent); }

/* Footer */
.site-footer {
  background: var(--dark);
  color: #a9adb1;
  font-size: 14px;
  padding-top: 56px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-name { display: block; color: #fff; font-size: 18px; letter-spacing: .06em; margin-bottom: 10px; }
.footer-nav { display: grid; gap: 6px; align-content: start; }
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid var(--dark-line);
  padding-top: 18px;
  padding-bottom: 18px;
  font-size: 12px;
}

/* Responsive */
@media (max-width: 960px) {
  .contact-grid, .feature-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-fields { grid-template-columns: 1fr 1fr; }
  .services { grid-template-columns: repeat(2, 1fr); }
  .industries { gap: 40px 32px; }
  .solutions { grid-template-columns: 1fr; }
  .process { grid-template-columns: repeat(3, 1fr); row-gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }

  .nav-toggle { display: block; }
  .header-tools { margin-left: auto; }
  .site-nav {
    display: none;
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 0 24px 20px;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 14px 0; border-top: 1px solid var(--line); }
  .site-nav .nav-contact { margin-top: 12px; text-align: center; }
}

@media (max-width: 640px) {
  body { font-size: 15px; line-height: 1.75; }
  .container { padding: 0 20px; }
  .logo-en { display: none; }
  .header-inner { height: 60px; }
  .site-nav { top: 60px; padding: 0 20px 16px; }
  html { scroll-padding-top: 60px; }
  .header-tools { gap: 8px; margin-left: 12px; }
  .lang-switch button { min-width: 34px; padding: 4px 8px; font-size: 12px; }
  .nav-toggle { padding: 3px 10px; font-size: 13px; }
  .logo strong { font-size: 17px; }

  /* Hero */
  .hero { padding: 40px 0 48px; }
  .hero-label { font-size: 12px; margin-bottom: 18px; }
  .hero h1 { font-size: 28px; margin-bottom: 18px; }
  .hero-text > p:not(.hero-label) { font-size: 14.5px; }
  .hero-actions { margin-top: 28px; gap: 20px; }
  .btn { font-size: 14px; padding: 10px 24px; }
  .hero-fields { margin-top: 40px; }
  .hero-fields a { font-size: 14.5px; padding: 14px 12px 2px 0; }
  .hero-fields span { font-size: 12px; }

  /* Sections */
  .section { padding: 56px 0; }
  .section-head { margin-bottom: 28px; padding-bottom: 12px; gap: 6px; }
  .section-title { font-size: 22px; }
  .section-head p { font-size: 13.5px; }

  /* Services: number on the left, compact rows */
  .services { grid-template-columns: 1fr; }
  .services article {
    display: grid;
    grid-template-columns: 44px 1fr;
    column-gap: 8px;
    padding: 16px 16px 16px 14px;
  }
  .services .num { grid-row: span 2; font-size: 26px; margin: 2px 0 0; }
  .services h3 { font-size: 16px; margin-bottom: 2px; }
  .services p { font-size: 13.5px; }

  /* Industries */
  .industries { grid-template-columns: 1fr; gap: 32px; }
  .industry { padding-top: 16px; }
  .industry-tag { font-size: 12px; }
  .industry h3 { font-size: 19px; margin-bottom: 12px; padding-bottom: 12px; }
  .industry-text p { font-size: 14.5px; }
  .industry .note { padding: 10px 12px; }

  /* Feature band */
  .feature-band { padding: 44px 0; }
  .feature-inner { gap: 20px; }
  .feature-label { font-size: 12px; }
  .feature-band h2 { font-size: 22px; }
  .feature-inner p { font-size: 14.5px; }
  .feature-inner .btn { margin-top: 18px; }

  /* Solutions */
  .solutions { gap: 12px; }
  .solutions article { padding: 20px 18px 22px; }
  .solutions h3 { font-size: 17px; column-gap: 10px; margin-bottom: 10px; }
  .solutions h3 span { font-size: 22px; }
  .solutions h3 small { font-size: 12px; }
  .solutions p { font-size: 14px; }

  /* Process: single column, number on the left */
  .process { grid-template-columns: 1fr; gap: 0; }
  .process li {
    display: grid;
    grid-template-columns: 44px 1fr;
    column-gap: 8px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }
  .process li:first-child { padding-top: 0; }
  .process li::before {
    grid-row: span 2;
    font-size: 26px;
    padding: 0;
    margin: 0;
    border: 0;
    color: var(--accent);
  }
  .process li::after { display: none; }
  .process h3 { font-size: 16px; margin-bottom: 2px; }
  .process p { font-size: 13.5px; }

  /* Contact */
  .contact-grid { gap: 32px; }
  .contact-intro { font-size: 14.5px; margin-bottom: 20px; }
  .info-table th, .info-table td { font-size: 14px; padding: 10px 0; }
  .contact-form { padding: 22px 18px; gap: 14px; }
  .contact-form .row { grid-template-columns: 1fr; gap: 14px; }
  .contact-form label { font-size: 13px; }
  .contact-form input, .contact-form select, .contact-form textarea { font-size: 16px; padding: 9px 10px; }
  .contact-form .btn { width: 100%; }

  /* Footer */
  .site-footer { padding-top: 40px; font-size: 13px; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; padding-bottom: 28px; }
  .footer-name { font-size: 16px; }
}

@media (max-width: 360px) {
  .logo { gap: 8px; min-width: 0; }
  .logo strong { font-size: 16px; letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; }
  .logo-mark { width: 18px; height: 18px; flex-shrink: 0; }
  .header-tools { gap: 6px; margin-left: 8px; }
  .lang-switch button { min-width: 0; padding: 4px 7px; }
  .nav-toggle { padding: 4px 8px; }
  .hero-fields { grid-template-columns: 1fr; }
}
