:root {
  --ink: #171b1d;
  --ink-soft: #4d565b;
  --paper: #ffffff;
  --mist: #f3f5f4;
  --line: #dce1df;
  --teal: #087e7b;
  --teal-dark: #075e5d;
  --gold: #b18b50;
  --dark: #151b1e;
  --max: 1180px;
  --shadow: 0 18px 44px rgba(15, 28, 31, 0.1);
}

/* Base styles keep typography and spacing consistent across every page. */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.container { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.section { padding: 104px 0; }
.section-sm { padding: 72px 0; }
.section-tint { background: var(--mist); }
.section-dark { color: #fff; background: var(--dark); }
.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}
.section-dark .eyebrow { color: #70d5cf; }
h1, h2, h3 { margin: 0; line-height: 1.3; letter-spacing: 0; }
h1 { font-size: clamp(2.4rem, 5vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 3vw, 2.75rem); }
h3 { font-size: 1.2rem; }
p { margin: 0; }
.lead { color: var(--ink-soft); font-size: 1.1rem; }
.section-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 520px); gap: 48px; align-items: end; margin-bottom: 48px; }
.section-heading.single { grid-template-columns: minmax(0, 760px); }
.section-heading .lead { padding-bottom: 4px; }
.section-dark .lead { color: #bac5c8; }

/* Header stays compact so contact and navigation remain easy to find. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(220, 225, 223, 0.9);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}
.nav { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: flex; align-items: center; gap: 13px; flex: 0 0 auto; }
.brand img { width: 52px; height: 40px; object-fit: cover; object-position: left; }
.brand-copy strong { display: block; font-size: 1.04rem; letter-spacing: 0.12em; }
.brand-copy small { display: block; color: var(--ink-soft); font-size: 0.65rem; letter-spacing: 0.14em; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links > a { position: relative; font-size: 0.92rem; font-weight: 700; }
.nav-links > a:not(.button)::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -10px; height: 2px; background: var(--teal); transition: right 180ms ease; }
.nav-links > a:hover::after, .nav-links > a.active::after { right: 0; }
.nav-contact { display: flex; align-items: center; gap: 8px; color: var(--teal-dark); font-weight: 800; }
.menu-toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.menu-toggle span, .menu-toggle::before, .menu-toggle::after { content: ""; display: block; width: 20px; height: 2px; margin: 4px auto; background: currentColor; transition: transform 180ms ease, opacity 180ms ease; }
.menu-toggle[aria-expanded="true"] span { opacity: 0; }
.menu-toggle[aria-expanded="true"]::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"]::after { transform: translateY(-6px) rotate(-45deg); }

/* Buttons use simple command styling and avoid decorative pill shapes. */
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 0 22px; border: 1px solid transparent; border-radius: 4px; font-weight: 800; transition: transform 160ms ease, background 160ms ease, border-color 160ms ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: #fff; background: var(--teal); }
.button-primary:hover { background: var(--teal-dark); }
.button-light { color: var(--ink); background: #fff; }
.button-outline { color: #fff; border-color: rgba(255, 255, 255, 0.65); background: transparent; }
.button-dark { color: #fff; background: var(--dark); }
.button-sm { min-height: 42px; padding-inline: 18px; }
.arrow { font-size: 1.15em; line-height: 1; }

/* The hero uses the original project image as a full-bleed first signal. */
.hero {
  min-height: min(820px, calc(100vh - 76px));
  display: flex;
  align-items: center;
  color: #fff;
  background-image: linear-gradient(90deg, rgba(13, 17, 19, 0.94) 0%, rgba(13, 17, 19, 0.76) 38%, rgba(13, 17, 19, 0.1) 70%), url("images/hero-industrial-integration.webp");
  background-position: center;
  background-size: cover;
}
.hero-content { width: min(680px, 62%); padding: 110px 0 132px; }
.hero .eyebrow { color: #86ddd7; }
.hero h1 { margin-bottom: 22px; }
.hero .hero-subtitle { margin-bottom: 14px; font-size: clamp(1.12rem, 2vw, 1.45rem); font-weight: 700; }
.hero .hero-copy { max-width: 640px; color: #d2d9da; font-size: 1.02rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-signals { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: -54px; background: #fff; box-shadow: var(--shadow); }
.hero-signal { min-height: 108px; padding: 24px 28px; border-right: 1px solid var(--line); }
.hero-signal:last-child { border-right: 0; }
.hero-signal strong { display: block; color: var(--teal-dark); font-size: 1.3rem; }
.hero-signal span { color: var(--ink-soft); font-size: 0.88rem; }

/* Repeatable content blocks are deliberately restrained for a B2B reading rhythm. */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pain-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pain-item { display: flex; gap: 16px; padding: 24px 0; border-top: 1px solid var(--line); }
.pain-index { flex: 0 0 auto; color: var(--gold); font-weight: 800; }
.pain-item strong { display: block; font-size: 1.02rem; }
.solution-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.solution-card { grid-column: span 2; min-height: 330px; position: relative; overflow: hidden; padding: 30px; border: 1px solid var(--line); border-radius: 6px; background: #fff; transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease; }
.solution-card:nth-child(4), .solution-card:nth-child(5) { grid-column: span 3; }
.solution-card:hover { transform: translateY(-5px); border-color: #a8c9c6; box-shadow: var(--shadow); }
.solution-number { color: var(--gold); font-size: 0.76rem; font-weight: 800; }
.solution-card h3 { margin: 56px 0 16px; font-size: 1.35rem; }
.solution-card ul, .feature-list { margin: 0; padding: 0; list-style: none; }
.solution-card li { padding: 5px 0; color: var(--ink-soft); }
.solution-card li::before, .feature-list li::before { content: "/"; margin-right: 10px; color: var(--teal); font-weight: 900; }
.solution-card .card-link { position: absolute; right: 28px; bottom: 24px; color: var(--teal-dark); font-weight: 800; }
.solution-card::after { content: ""; position: absolute; top: 0; left: 0; width: 0; height: 4px; background: var(--teal); transition: width 180ms ease; }
.solution-card:hover::after { width: 100%; }

.case-list { border-top: 1px solid #394246; }
.case-row { display: grid; grid-template-columns: 170px 1fr 1.25fr auto; gap: 32px; align-items: center; padding: 34px 0; border-bottom: 1px solid #394246; }
.case-type { color: #75d0ca; font-size: 0.78rem; font-weight: 800; }
.case-row h3 { font-size: 1.28rem; }
.case-row p { color: #aeb9bc; font-size: 0.93rem; }
.case-row .arrow-box { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #536065; color: #fff; transition: background 160ms ease; }
.case-row:hover .arrow-box { background: var(--teal); }

.tech-wrap { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 72px; align-items: start; }
.tech-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.tech-tag { padding: 12px 16px; border: 1px solid var(--line); border-radius: 3px; background: #fff; font-size: 0.9rem; font-weight: 750; }
.tech-tag.featured { color: #fff; border-color: var(--teal); background: var(--teal); }
.why-grid { grid-template-columns: repeat(5, 1fr); }
.why-item { padding: 26px 22px 28px; border-left: 1px solid var(--line); }
.why-item:first-child { border-left: 0; }
.why-item .why-number { display: block; margin-bottom: 48px; color: var(--gold); font-size: 0.75rem; font-weight: 800; }
.why-item p { margin-top: 12px; color: var(--ink-soft); font-size: 0.9rem; }

.process { display: grid; grid-template-columns: repeat(7, 1fr); counter-reset: process; }
.process-step { position: relative; padding: 24px 15px 0 0; border-top: 2px solid #465156; counter-increment: process; }
.process-step::before { content: counter(process, decimal-leading-zero); display: block; margin-bottom: 34px; color: #71d1cb; font-weight: 800; }
.process-step::after { content: ""; position: absolute; top: -6px; left: 0; width: 10px; height: 10px; border-radius: 50%; background: #71d1cb; }
.process-step h3 { font-size: 0.98rem; }

.contact-band { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 72px; align-items: center; }
.contact-band h2 { margin-bottom: 18px; }
.contact-band p { color: #c4cdcf; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.contact-details { border-left: 1px solid #465156; padding-left: 48px; }
.contact-line { display: grid; grid-template-columns: 70px 1fr; gap: 16px; padding: 15px 0; border-bottom: 1px solid #394246; }
.contact-line span { color: #8f9ca0; font-size: 0.8rem; }
.contact-line a { overflow-wrap: anywhere; font-weight: 700; }

/* Inner pages share a compact title band and content composition. */
.page-hero { padding: 96px 0 72px; color: #fff; background: var(--dark); }
.page-hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 80px; align-items: end; }
.page-hero h1 { font-size: clamp(2.35rem, 5vw, 4rem); }
.page-hero .lead { color: #b9c4c7; }
.breadcrumbs { margin-bottom: 28px; color: #7cd3ce; font-size: 0.78rem; font-weight: 800; }
.statement { max-width: 900px; font-size: clamp(1.6rem, 3.2vw, 2.8rem); line-height: 1.45; }
.statement em { color: var(--teal); font-style: normal; }
.split { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 72px; align-items: start; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fact { padding: 28px 20px; border-right: 1px solid var(--line); }
.fact:last-child { border-right: 0; }
.fact strong { display: block; color: var(--teal-dark); font-size: 1.65rem; }
.feature-list li { padding: 8px 0; color: var(--ink-soft); }
.detail-card { padding: 30px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.detail-card h3 { margin-bottom: 14px; }
.detail-card p { color: var(--ink-soft); }
.detail-card .feature-list { margin-top: 16px; }
.case-detail { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; padding: 44px 0; border-top: 1px solid var(--line); }
.case-detail:last-child { border-bottom: 1px solid var(--line); }
.case-detail .case-meta { color: var(--teal-dark); font-size: 0.8rem; font-weight: 800; }
.case-detail h2 { margin-top: 10px; font-size: 1.7rem; }
.case-columns { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.case-columns h3 { margin-bottom: 10px; font-size: 0.9rem; }
.case-columns p, .case-columns li { color: var(--ink-soft); font-size: 0.92rem; }
.case-result { grid-column: 1 / -1; padding: 18px 20px; border-left: 3px solid var(--gold); background: var(--mist); }

.contact-layout { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 64px; }
.contact-panel { padding: 30px; color: #fff; background: var(--dark); }
.contact-panel .contact-line { grid-template-columns: 60px 1fr; }
.contact-panel .button { width: 100%; margin-top: 24px; }
.inquiry-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.84rem; font-weight: 800; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #cbd2d0; border-radius: 3px; padding: 13px 14px; background: #fff; color: var(--ink); outline: none; }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8, 126, 123, 0.12); }
.form-note { grid-column: 1 / -1; color: var(--ink-soft); font-size: 0.78rem; }
.form-status { grid-column: 1 / -1; min-height: 24px; color: var(--teal-dark); font-weight: 700; }

/* Footer repeats the core positioning and keeps all contact paths visible. */
.site-footer { padding: 68px 0 24px; color: #d8dede; background: #0e1315; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 0.75fr 1fr; gap: 64px; }
.footer-brand { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.footer-brand img { width: 64px; height: auto; flex: 0 0 auto; filter: invert(1); }
.footer-brand strong { display: block; color: #fff; letter-spacing: 0.12em; }
.footer-brand small { color: #899599; letter-spacing: 0.12em; }
.footer-copy { max-width: 440px; color: #899599; font-size: 0.9rem; }
.footer-title { margin-bottom: 16px; color: #fff; font-size: 0.82rem; font-weight: 800; }
.footer-links { display: grid; gap: 9px; color: #aab4b7; font-size: 0.9rem; }
.footer-links a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 24px; margin-top: 54px; padding-top: 22px; border-top: 1px solid #283033; color: #6f7c80; font-size: 0.78rem; }
.floating-contact { position: fixed; right: 18px; bottom: 18px; z-index: 80; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #06c755; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22); font-size: 0.72rem; font-weight: 900; }

/* Motion is subtle and disabled for visitors who prefer reduced movement. */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 500ms ease, transform 500ms ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .reveal { opacity: 1; transform: none; transition: none; } }

@media (max-width: 980px) {
  .menu-toggle { display: block; }
  .nav-links { position: fixed; inset: 77px 0 auto; display: none; padding: 26px 20px 32px; flex-direction: column; align-items: flex-start; gap: 20px; border-bottom: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .nav-links .button { width: 100%; }
  .nav-contact { margin-left: auto; }
  .hero { min-height: 720px; background-position: 60% center; }
  .hero-content { width: 72%; }
  .section-heading, .page-hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .pain-grid { grid-template-columns: repeat(2, 1fr); }
  .solution-card { grid-column: span 3; }
  .solution-card:nth-child(5) { grid-column: 2 / span 4; }
  .why-grid { grid-template-columns: repeat(3, 1fr); }
  .why-item:nth-child(4) { border-left: 0; }
  .process { grid-template-columns: repeat(4, 1fr); row-gap: 36px; }
  .tech-wrap, .split, .contact-band, .contact-layout { grid-template-columns: 1fr; gap: 44px; }
  .contact-details { border-left: 0; padding-left: 0; }
  .footer-grid { grid-template-columns: 1.2fr 0.8fr; }
  .footer-grid > :last-child { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .container { width: min(calc(100% - 30px), var(--max)); }
  .section { padding: 76px 0; }
  .section-sm { padding: 56px 0; }
  .nav { min-height: 68px; }
  .brand img { width: 44px; height: 34px; }
  .brand-copy small { display: none; }
  .nav-contact { display: none; }
  .nav-links { top: 69px; }
  .hero { min-height: 650px; align-items: flex-end; background-image: linear-gradient(0deg, rgba(13,17,19,.96) 0%, rgba(13,17,19,.7) 62%, rgba(13,17,19,.28) 100%), url("images/hero-industrial-integration.webp"); background-position: 66% center; }
  .hero-content { width: 100%; padding: 150px 0 58px; }
  .hero h1 { font-size: 2.55rem; }
  .hero-actions .button { width: 100%; }
  .hero-signals { grid-template-columns: 1fr; margin-top: 0; box-shadow: none; }
  .hero-signal { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .section-heading { margin-bottom: 34px; }
  .grid-2, .grid-3, .pain-grid, .why-grid { grid-template-columns: 1fr; }
  .solution-grid { grid-template-columns: 1fr; }
  .solution-card, .solution-card:nth-child(4), .solution-card:nth-child(5) { grid-column: auto; min-height: 310px; }
  .case-row { grid-template-columns: 1fr auto; gap: 12px; }
  .case-row .case-type, .case-row p { grid-column: 1 / -1; }
  .why-item, .why-item:nth-child(4) { border-left: 0; border-top: 1px solid var(--line); padding-inline: 0; }
  .why-item .why-number { margin-bottom: 22px; }
  .process { grid-template-columns: repeat(2, 1fr); }
  .facts { grid-template-columns: 1fr; }
  .fact { border-right: 0; border-bottom: 1px solid var(--line); }
  .fact:last-child { border-bottom: 0; }
  .case-detail { grid-template-columns: 1fr; gap: 26px; }
  .case-columns, .inquiry-form { grid-template-columns: 1fr; }
  .field.full, .form-note, .form-status { grid-column: auto; }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid > :last-child { grid-column: auto; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 420px) {
  h1 { font-size: 2.3rem; }
  .brand-copy strong { font-size: 0.9rem; }
  .process { grid-template-columns: 1fr; }
  .contact-line { grid-template-columns: 56px 1fr; }
}
