/* Jiin-Tech — industrial, grid-based design */

/* Inter is self-hosted (no requests to Google). Chinese uses system fonts. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/inter-latin.woff2") format("woff2");
}

:root {
  --ink: #16191d;
  --ink-2: #3b4148;
  --muted: #6b737c;
  --line: #d9dde1;
  --bg: #ffffff;
  --bg-alt: #f3f4f6;
  --dark: #1c2026;
  --accent: #0a5aa8;        /* links, labels, thin rules */
  --accent-fill: #0a5aa8;   /* buttons and blue bands (white text on top) */
  --accent-dark: #084a8a;
  --header-bg: rgba(255, 255, 255, 0.97);
  --stripe: rgba(0, 0, 0, 0.025);
  --footer-border: transparent;
  --flag-edge: rgba(0, 0, 0, 0.12);
  --show-logo-light: block;
  --show-logo-dark: none;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --font: "Inter", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

/* Dark mode: follows the system by default; the header button can force
   light or dark (sets data-theme on <html>). Keep both blocks identical. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e8eaed;
    --ink-2: #b9bfc7;
    --muted: #8d959e;
    --line: #2d333b;
    --bg: #121418;
    --bg-alt: #1a1e24;
    --dark: #0b0d10;
    --accent: #5ea3ec;
    --accent-fill: #0a5aa8;
    --accent-dark: #0c66be;
    --header-bg: rgba(18, 20, 24, 0.97);
    --stripe: rgba(255, 255, 255, 0.03);
    --footer-border: var(--line);
    --flag-edge: rgba(255, 255, 255, 0.18);
    --show-logo-light: none;
    --show-logo-dark: block;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #e8eaed;
  --ink-2: #b9bfc7;
  --muted: #8d959e;
  --line: #2d333b;
  --bg: #121418;
  --bg-alt: #1a1e24;
  --dark: #0b0d10;
  --accent: #5ea3ec;
  --accent-fill: #0a5aa8;
  --accent-dark: #0c66be;
  --header-bg: rgba(18, 20, 24, 0.97);
  --stripe: rgba(255, 255, 255, 0.03);
  --footer-border: var(--line);
  --flag-edge: rgba(255, 255, 255, 0.18);
  --show-logo-light: none;
  --show-logo-dark: block;
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0; font-weight: 700; letter-spacing: -0.01em; text-wrap: balance; }
p { margin: 0 0 1em; }

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

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}

.brand img { height: 40px; width: auto; }
.logo-light { display: var(--show-logo-light); }
.logo-dark { display: var(--show-logo-dark); }

.nav { display: flex; gap: 28px; }
.nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 24px 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* Language dropdown */
.lang { position: relative; }
.lang-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px 0 11px;
  background: none;
  border: 1px solid var(--line);
  color: var(--ink);
  font: 600 14px/1 var(--font);
  cursor: pointer;
  white-space: nowrap;
}
.lang-btn:hover, .lang-btn[aria-expanded="true"] { border-color: var(--muted); }
.lang-btn .globe { width: 17px; height: 17px; color: var(--muted); }
.lang-btn .chevron { width: 14px; height: 14px; color: var(--muted); transition: transform 0.15s; }
.lang-btn[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.lang-short { display: none; }

.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  min-width: 180px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
}
.lang-menu[hidden] { display: none; }
.lang-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.lang-menu a:hover { background: var(--bg-alt); }
.lang-menu a[aria-current="true"] { font-weight: 700; }
.lang-menu a[aria-current="true"]::after {
  content: "";
  width: 6px;
  height: 11px;
  margin-left: auto;
  border: solid var(--accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-2px, -2px);
}
.flag {
  width: 20px;
  height: 14px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px var(--flag-edge);
  flex: 0 0 auto;
}

.theme-btn {
  background: none;
  border: 1px solid var(--line);
  color: var(--ink);
  width: 36px;
  height: 36px;
  padding: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.theme-btn:hover { border-color: var(--muted); }
.theme-btn svg { width: 18px; height: 18px; display: none; }
.theme-btn[data-mode="auto"] [data-icon="auto"],
.theme-btn[data-mode="light"] [data-icon="light"],
.theme-btn[data-mode="dark"] [data-icon="dark"] { display: block; }

.menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--line);
  width: 40px;
  height: 40px;
  cursor: pointer;
  padding: 0;
}
.menu-btn span,
.menu-btn span::before,
.menu-btn span::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  margin: 0 auto;
  position: relative;
}
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; }
.menu-btn span::before { top: -6px; }
.menu-btn span::after { top: 6px; }

@media (max-width: 800px) {
  .menu-btn { display: block; order: 3; }
  .nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 0 var(--gutter);
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: 0; }
  .nav a[aria-current="page"] { border-bottom-color: var(--line); color: var(--accent); }
  .brand img { height: 32px; }
  .site-header .wrap { gap: 10px; }
  .lang-name { display: none; }
  .lang-short { display: inline; }
  .lang-btn { gap: 6px; padding: 0 8px; }
  .theme-btn, .menu-btn { width: 36px; height: 36px; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background: var(--dark) url("../assets/img/factory.jpg") center / cover no-repeat;
  color: #fff;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(16, 19, 23, 0.92) 0%, rgba(16, 19, 23, 0.75) 50%, rgba(16, 19, 23, 0.35) 100%);
}
.hero .wrap {
  position: relative;
  padding-top: clamp(80px, 14vw, 160px);
  padding-bottom: clamp(80px, 12vw, 140px);
}
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9cc4ec;
  margin-bottom: 20px;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
}
.hero h1 {
  font-size: clamp(34px, 5.5vw, 60px);
  max-width: 16em;
  margin-bottom: 24px;
}
.hero p {
  font-size: clamp(17px, 1.6vw, 20px);
  color: rgba(255, 255, 255, 0.85);
  max-width: 36em;
  margin-bottom: 36px;
}

.btn {
  display: inline-block;
  padding: 14px 26px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 2px solid var(--accent-fill);
  background: var(--accent-fill);
  color: #fff;
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-ghost { background: transparent; border-color: rgba(255, 255, 255, 0.6); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Page header (inner pages) */
.page-head {
  background: var(--dark);
  color: #fff;
}
.page-head .wrap { padding-top: 72px; padding-bottom: 64px; }
.page-head h1 { font-size: clamp(32px, 4.5vw, 48px); }

/* ---------- Key facts ---------- */

.facts {
  border-bottom: 1px solid var(--line);
}
.facts .wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.fact {
  padding: 36px 24px 32px;
  border-left: 1px solid var(--line);
}
.fact:first-child { border-left: 0; padding-left: 0; }
.fact-value { font-size: clamp(26px, 3vw, 36px); font-weight: 700; letter-spacing: -0.02em; }
.fact-label { font-size: 14px; color: var(--muted); margin-top: 4px; }

@media (max-width: 800px) {
  .facts .wrap { grid-template-columns: 1fr 1fr; }
  .fact { padding: 24px 0 24px 20px; }
  .fact:nth-child(odd) { border-left: 0; padding-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------- Sections ---------- */

.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-alt { background: var(--bg-alt); }

.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 32px;
  margin-bottom: 56px;
}
.section-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 10px;
  border-top: 2px solid var(--ink);
}
.section-head h2 { font-size: clamp(26px, 3.2vw, 38px); margin-bottom: 16px; }
.section-head p { color: var(--ink-2); max-width: 40em; margin: 0; }

@media (max-width: 800px) {
  .section-head { grid-template-columns: 1fr; gap: 20px; margin-bottom: 40px; }
  .section-label { justify-self: start; padding-right: 24px; }
}

/* Capability cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.card {
  padding: 36px 32px 40px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.card-num {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 40px;
}
.card h3 { font-size: 21px; margin-bottom: 12px; }
.card p { color: var(--ink-2); font-size: 16px; margin: 0; }

@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; }
  .card-num { margin-bottom: 16px; }
}

/* Two-column split */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.split h2 { font-size: clamp(24px, 2.8vw, 32px); margin-bottom: 20px; }
.split h2 + p { color: var(--ink-2); }

/* Spec table */
.spec {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}
.spec th, .spec td {
  text-align: left;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.spec thead th {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 2px solid var(--ink);
  padding-top: 0;
}
.spec td:last-child, .spec th:last-child { text-align: right; }
.spec tfoot td { font-weight: 700; border-bottom: 0; }

/* Plain list with rules */
.rule-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rule-list li {
  display: grid;
  grid-template-columns: 10em 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.rule-list .k { color: var(--muted); font-size: 15px; }
@media (max-width: 560px) {
  .rule-list li { grid-template-columns: 1fr; gap: 2px; }
}

.prose { max-width: 42em; }
.prose p { color: var(--ink-2); }
.prose p:first-child { font-size: 20px; color: var(--ink); }

/* Call to action band */
.cta {
  background: var(--accent-fill);
  color: #fff;
}
.cta .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 56px;
  padding-bottom: 56px;
}
.cta h2 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 8px; }
.cta p { margin: 0; color: rgba(255, 255, 255, 0.85); }
.cta .btn { background: #fff; color: #0a5aa8; border-color: #fff; }
.cta .btn:hover { background: #e8eef5; border-color: #e8eef5; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 2px solid var(--ink);
}
.contact-item { padding: 28px 24px 28px 0; }
.contact-item + .contact-item { padding-left: 24px; border-left: 1px solid var(--line); }
.contact-item .k {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.contact-item a, .contact-item .v {
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  word-break: break-word;
}
.contact-item a:hover { color: var(--accent); }
@media (max-width: 800px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-item, .contact-item + .contact-item { padding: 20px 0; border-left: 0; border-bottom: 1px solid var(--line); }
}

.map {
  width: 100%;
  height: 420px;
  border: 0;
  margin-top: 48px;
  filter: grayscale(0.6);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--footer-border);
  background: var(--dark);
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
}
.site-footer .wrap {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  padding-top: 56px;
  padding-bottom: 40px;
}
.site-footer h3 {
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.site-footer a { color: rgba(255, 255, 255, 0.85); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer p { margin: 0 0 6px; }
.footer-logo { height: 36px; width: auto; margin-bottom: 18px; }
.footer-name { color: #fff; font-weight: 700; font-size: 17px; margin-bottom: 8px !important; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}
.footer-bottom .wrap { display: block; padding-top: 20px; padding-bottom: 20px; }
@media (max-width: 800px) {
  .site-footer .wrap { grid-template-columns: 1fr; }
}

/* German-language service note */
.lang-note {
  margin: 32px 0 0 !important;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
  font-size: 17px !important;
  font-weight: 600;
  color: #fff !important;
}

/* Click-to-load map: Google is contacted only after the visitor agrees */
.map-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: center;
  padding: 24px;
  background: var(--bg-alt) repeating-linear-gradient(45deg, transparent 0 14px, var(--stripe) 14px 28px);
  border: 1px solid var(--line);
  filter: none;
}
.map-placeholder p { margin: 0; max-width: 32em; color: var(--ink-2); font-size: 15px; }
.map-placeholder .btn { cursor: pointer; font-family: inherit; }
