:root {
  --bg: #f7f8f6;
  --surface: #ffffff;
  --surface-muted: #eef2ef;
  --ink: #151716;
  --muted: #5f6763;
  --soft: #8a928e;
  --line: rgba(21, 23, 22, 0.12);
  --line-strong: rgba(21, 23, 22, 0.22);
  --accent: #0f6a61;
  --accent-soft: #e5f0ed;
  --amber: #c68b3c;
  --shadow: 0 20px 54px rgba(21, 23, 22, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  margin-right: auto;
  margin-bottom: 24px;
  margin-left: auto;
  font-size: clamp(3rem, 5.7vw, 5.35rem);
  font-weight: 740;
  line-height: 1.05;
  white-space: pre-line;
  text-wrap: balance;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 3.4vw, 3.35rem);
  font-weight: 700;
  line-height: 1.12;
  text-wrap: balance;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.32rem;
  font-weight: 700;
  line-height: 1.24;
}

p {
  color: var(--muted);
}

.site-header,
main,
.site-footer {
  width: min(1180px, calc(100% - 40px));
  margin-right: auto;
  margin-left: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 248, 246, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 0;
}

.brand-logo {
  width: clamp(188px, 19vw, 260px);
  height: auto;
  object-fit: contain;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 640;
}

.site-nav a,
.nav-contact,
.lang-toggle {
  border: 0;
  background: transparent;
  color: inherit;
  white-space: nowrap;
}

.site-nav a,
.nav-contact {
  padding: 8px 0;
}

.site-nav a:hover,
.nav-contact:hover {
  color: var(--ink);
}

.nav-contact {
  color: var(--accent);
}

.lang-toggle {
  min-width: 44px;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
}

.hero {
  padding: 88px 0 64px;
  text-align: center;
}

.hero-copy {
  max-width: 980px;
  margin: 0 auto;
}

.eyebrow {
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 760;
}

.hero-lead {
  max-width: 760px;
  margin-right: auto;
  margin-bottom: 0;
  margin-left: auto;
  color: #38413d;
  font-size: 1.13rem;
  line-height: 1.82;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 17px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-weight: 680;
  line-height: 1.2;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
  border-color: var(--ink);
}

.button.primary {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.button.primary:hover {
  background: #000;
}

.button.secondary {
  background: var(--surface);
}

.hero-visual {
  margin: 54px 0 0;
}

.hero-visual img {
  width: 100%;
  max-height: 660px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.visual-caption {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.visual-caption span {
  display: block;
  padding: 14px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 650;
}

.section {
  padding: 88px 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  max-width: 850px;
  margin-bottom: 38px;
}

.thesis-section {
  padding-top: 84px;
}

.thesis-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1fr);
  gap: 68px;
  align-items: start;
}

.thesis-statement {
  margin-bottom: 0;
  color: var(--ink);
  font-size: clamp(1.42rem, 2.2vw, 1.95rem);
  font-weight: 640;
  line-height: 1.36;
}

.thesis-copy {
  max-width: 640px;
  font-size: 1.02rem;
}

.thesis-copy p:last-child {
  margin-bottom: 0;
}

.focus-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  padding-top: 0;
  border-top: 0;
  background: var(--line);
}

.focus-item {
  min-height: 240px;
  padding: 30px;
  background: var(--bg);
}

.focus-item span,
.team-role,
.capability-steps span {
  display: block;
  margin-bottom: 18px;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 760;
}

.focus-item p {
  margin-bottom: 0;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.product-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.product-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--surface-muted);
}

.product-featured img {
  object-position: center top;
}

.product-copy {
  padding: 28px;
}

.product-copy p {
  margin-bottom: 0;
}

.product-copy ul {
  display: grid;
  gap: 8px;
  margin: 22px 0 26px;
  padding: 0;
  list-style: none;
}

.product-copy li {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
}

.product-copy li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
}

.capability-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 64px;
}

.capability-section .section-heading {
  margin-bottom: 0;
}

.capability-steps {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.capability-steps li {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.capability-steps span {
  margin-bottom: 8px;
}

.capability-steps p {
  max-width: 620px;
  margin-bottom: 0;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.team-card {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.team-card img {
  width: 104px;
  height: 124px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-muted);
}

.team-role {
  margin-bottom: 8px;
}

.team-card p:last-of-type {
  margin-bottom: 0;
}

.team-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.team-links a {
  color: var(--accent);
  font-weight: 700;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  margin-bottom: 84px;
  padding: 42px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.contact-section h2 {
  max-width: 820px;
  margin-bottom: 14px;
  font-size: clamp(1.9rem, 3.1vw, 2.85rem);
}

.contact-section p:last-child {
  max-width: 660px;
  margin-bottom: 0;
}

.chat-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  display: grid;
  justify-items: end;
  gap: 12px;
}

.chat-launcher {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 8px 14px 8px 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  font-weight: 700;
}

.bot-avatar {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface-muted);
}

.bot-avatar::before,
.bot-avatar::after {
  content: "";
  position: absolute;
  top: 13px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.bot-avatar::before {
  left: 10px;
}

.bot-avatar::after {
  right: 10px;
}

.bot-avatar span {
  width: 14px;
  height: 7px;
  margin-top: 9px;
  border: 1px solid rgba(15, 106, 97, 0.42);
  border-top: 0;
  border-radius: 0 0 10px 10px;
}

.chat-launcher .bot-avatar {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
}

.chat-launcher .bot-avatar::before,
.chat-launcher .bot-avatar::after {
  background: #fff;
}

.chat-launcher .bot-avatar span {
  border-color: rgba(255, 255, 255, 0.56);
}

.chat-panel {
  display: none;
  width: min(390px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(21, 23, 22, 0.18);
}

.chat-widget.open .chat-panel {
  display: block;
}

.chat-widget.open .chat-launcher {
  display: none;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.chat-header strong {
  display: block;
  line-height: 1.2;
}

.chat-header p {
  margin: 2px 0 0;
  font-size: 0.86rem;
}

.chat-close {
  margin-left: auto;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 1.3rem;
  line-height: 1;
}

.chat-messages {
  display: grid;
  gap: 10px;
  max-height: 340px;
  overflow-y: auto;
  padding: 16px;
}

.chat-bubble {
  max-width: 92%;
  margin: 0;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.94rem;
  line-height: 1.62;
}

.chat-bubble.user {
  justify-self: end;
  background: var(--ink);
  color: #fff;
}

.chat-bubble.assistant {
  justify-self: start;
  border: 1px solid var(--line);
  background: var(--surface-muted);
  color: #26302d;
}

.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 14px;
}

.quick-replies button {
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 650;
}

.quick-replies button:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: var(--surface-muted);
}

.chat-form input {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}

.chat-form input:focus {
  border-color: var(--accent);
  outline: 2px solid rgba(15, 106, 97, 0.14);
}

.chat-form button {
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 0 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--accent);
  font-weight: 700;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

html[lang="en"] h1 {
  max-width: 860px;
  font-size: clamp(2.65rem, 4.7vw, 4.55rem);
}

html[lang="en"] .hero-lead {
  max-width: 800px;
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 14px 0;
  }

  .site-nav {
    width: 100%;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero {
    padding-top: 64px;
  }

  .visual-caption,
  .thesis-grid,
  .focus-section,
  .product-grid,
  .capability-section,
  .team-grid,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .focus-section {
    gap: 1px;
  }

  .capability-section {
    gap: 32px;
  }
}

@media (max-width: 720px) {
  .site-header,
  main,
  .site-footer {
    width: min(100% - 24px, 1180px);
  }

  h1,
  html[lang="en"] h1 {
    font-size: 2.55rem;
    line-height: 1.04;
  }

  html[lang="en"] h1 {
    font-size: 2.35rem;
  }

  h2 {
    font-size: 1.9rem;
  }

  .hero {
    padding: 42px 0 52px;
  }

  .hero-lead {
    font-size: 1rem;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-visual {
    margin-top: 36px;
  }

  .hero-visual img {
    min-height: 330px;
  }

  .section {
    padding: 68px 0;
  }

  .focus-item,
  .product-copy,
  .team-card {
    padding: 22px;
  }

  .team-card {
    grid-template-columns: 1fr;
  }

  .team-card img {
    width: 96px;
    height: 116px;
  }

  .contact-section {
    margin-bottom: 72px;
  }

  .chat-widget {
    right: 12px;
    bottom: 12px;
  }

  .chat-launcher {
    padding: 8px;
  }

  .chat-launcher span:last-child {
    display: none;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
