:root {
  --bg: #f8fafc;
  --bg-soft: #f1f5f9;
  --bg-dark: #0b1120;
  --bg-panel: #111827;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --accent: #06b6d4;
  --accent-light: #22d3ee;
  --accent-soft: rgba(6, 182, 212, 0.12);
  --accent-glow: rgba(6, 182, 212, 0.25);
  --purple: #8b5cf6;
  --container: 1140px;
  --radius: 8px;
  --font-mono: "JetBrains Mono", "Consolas", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Noto Sans TC", "Inter", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body.lang-en .lang-zh { display: none !important; }
body.lang-zh .lang-en { display: none !important; }

a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.narrow { max-width: 760px; }

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--accent);
  color: var(--bg-dark);
  padding: 10px 16px;
  border-radius: var(--radius);
  z-index: 100;
  font-size: 0.9rem;
  font-weight: 600;
}
.skip-link:focus { top: 16px; outline: 2px solid var(--accent-light); outline-offset: 2px; }

.top-bar {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.82);
  font-size: 0.78rem;
  font-family: var(--font-mono);
}
.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 38px;
  flex-wrap: wrap;
  gap: 8px;
}
.top-bar-contact {
  display: flex;
  align-items: center;
  gap: 12px;
}
.top-bar a { color: #fff; font-weight: 500; }
.top-bar a:hover { color: var(--accent-light); }
.top-bar .divider { opacity: 0.3; }

.eyebrow {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  font-family: var(--font-mono);
}
.eyebrow-light { color: rgba(255,255,255,0.65); }

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

h1 { font-size: clamp(2.1rem, 4.8vw, 3.2rem); margin-bottom: 20px; }
h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); margin-bottom: 14px; }
h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; }

.lead { font-size: 1.02rem; color: var(--muted); max-width: 580px; margin-bottom: 28px; line-height: 1.8; }

.section-head.centered { text-align: center; margin-left: auto; margin-right: auto; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  font-family: inherit;
}
.btn:hover { transform: translateY(-1px); }
.btn-accent {
  background: var(--accent);
  color: var(--bg-dark);
  border-color: var(--accent);
  box-shadow: 0 4px 16px var(--accent-glow);
}
.btn-accent:hover {
  background: var(--accent-light);
  box-shadow: 0 6px 24px var(--accent-glow);
}
.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent-light); }
.btn-block { width: 100%; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 250, 252, 0.95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--bg-dark);
  color: var(--accent);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-mono);
}
.brand-text {
  display: flex;
  flex-direction: column;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.15;
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}
.brand-sub {
  font-family: "Inter", "Noto Sans TC", sans-serif;
  font-size: 0.58rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-top: 2px;
}
.nav-links {
  display: flex;
  gap: 26px;
  margin-left: auto;
}
.nav-links a {
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); }
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-cta { padding: 10px 18px; font-size: 0.84rem; }

.lang-switch {
  display: flex;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.lang-btn {
  padding: 6px 12px;
  font-size: 0.76rem;
  font-weight: 700;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-family: inherit;
}
.lang-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
}
.lang-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
}

.hero {
  position: relative;
  padding: 80px 0 72px;
  background: var(--bg-dark);
  color: #fff;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 70% 0%, rgba(6, 182, 212, 0.15) 0%, transparent 55%),
    radial-gradient(ellipse 40% 40% at 10% 100%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
  pointer-events: none;
}
.hero-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, transparent 80%);
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero h1 { color: #fff; }
.hero .lead { color: rgba(255,255,255,0.72); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-panel { display: grid; gap: 16px; }

.code-block {
  background: var(--bg-panel);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}
.code-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: rgba(0,0,0,0.3);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.code-header .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
}
.code-header .dot:nth-child(1) { background: #ef4444; }
.code-header .dot:nth-child(2) { background: #eab308; }
.code-header .dot:nth-child(3) { background: #22c55e; }
.code-filename {
  margin-left: auto;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.45);
  font-family: var(--font-mono);
}
.code-block pre {
  padding: 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
  color: #e2e8f0;
}
.code-kw { color: var(--accent-light); }
.code-str { color: #a5f3fc; }

.hero-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.hero-stat {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.hero-stat strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 4px;
}
.hero-stat span { font-size: 0.78rem; color: rgba(255,255,255,0.6); }

.trust-bar {
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 24px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--muted);
}
.trust-icon {
  color: var(--accent);
  font-size: 0.7rem;
  flex-shrink: 0;
}

.stats { background: var(--bg-soft); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 52px 24px;
}
.stat { text-align: center; }
.stat strong {
  display: block;
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--text);
  font-family: var(--font-mono);
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}
.stat span { font-size: 0.85rem; color: var(--muted); }

.section { padding: 80px 0; }
.section-soft { background: var(--bg-soft); }
.section-dark {
  background: var(--bg-panel);
  color: #fff;
}
.section-dark h2 { color: #fff; }
.section-head { margin-bottom: 44px; max-width: 640px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}
.card:hover {
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.card-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}
.card p { font-size: 0.9rem; color: var(--muted); }

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: start;
}
.about-copy p { color: var(--muted); margin-bottom: 18px; }
.check-list {
  list-style: none;
  display: grid;
  gap: 12px;
  margin-top: 24px;
}
.check-list li {
  padding-left: 22px;
  position: relative;
  font-size: 0.94rem;
  font-weight: 500;
}
.check-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-size: 0.75rem;
  line-height: 1.8;
}
.about-aside { display: grid; gap: 14px; }
.info-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.info-box.highlight {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.info-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
  font-family: var(--font-mono);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.step {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: border-color 0.2s;
}
.step:hover { border-color: var(--accent); }
.step-num {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--bg-dark);
  color: var(--accent);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 16px;
  font-family: var(--font-mono);
}
.step p { font-size: 0.88rem; color: var(--muted); }

.tech-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.tech-lead { color: rgba(255,255,255,0.72); max-width: 480px; line-height: 1.8; }
.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tech-tags span {
  padding: 10px 16px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  font-size: 0.84rem;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.04);
  font-family: var(--font-mono);
  transition: border-color 0.2s, background 0.2s;
}
.tech-tags span:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.faq-list { display: grid; gap: 10px; }
.faq-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-item summary {
  padding: 18px 22px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--accent);
  font-size: 1.1rem;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p {
  padding: 0 22px 18px;
  font-size: 0.9rem;
  color: var(--muted);
}

.cta-section {
  background: var(--bg-dark);
  color: #fff;
}
.cta-section h2 { color: #fff; }
.contact-lead { color: rgba(255,255,255,0.72); margin-bottom: 28px; max-width: 420px; }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.contact-info {
  font-style: normal;
  font-size: 0.94rem;
  line-height: 1.85;
  color: rgba(255,255,255,0.85);
}
.brand-inline {
  font-family: var(--font-mono);
  color: var(--accent-light);
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.contact-info a { color: #fff; border-bottom: 1px solid rgba(255,255,255,0.3); }
.contact-info a:hover { border-color: var(--accent); color: var(--accent-light); }
.contact-form {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px;
  display: grid;
  gap: 18px;
}
.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--muted);
}
.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  color: var(--text);
  background: var(--bg);
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-note { font-size: 0.76rem; color: var(--muted); }
.form-status { min-height: 20px; font-size: 0.86rem; color: var(--muted); }

.site-footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.72);
  padding: 52px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}
.footer-brand {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent-light);
  margin-bottom: 4px;
}
.footer-legal-name {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 10px;
}
.footer-desc { font-size: 0.86rem; margin-bottom: 8px; }
.footer-col h4 {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  font-family: var(--font-mono);
}
.footer-col a {
  display: block;
  font-size: 0.86rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 10px;
}
.footer-col a:hover { color: var(--accent-light); }
.footer-address { font-size: 0.86rem; color: rgba(255,255,255,0.5); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}

.mobile-cta {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 40;
  background: var(--accent);
  color: var(--bg-dark);
  padding: 14px 22px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 8px 24px var(--accent-glow);
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .hero-grid, .about-grid, .contact-grid, .tech-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-stat-row { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
  .nav-links, .header-cta { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 12px 24px 20px;
    margin-left: 0;
  }
  .nav-links.open a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .header-inner { position: relative; }
  .top-bar-inner { justify-content: center; text-align: center; height: auto; padding: 8px 0; }
  .top-bar-contact { flex-wrap: wrap; justify-content: center; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid, .steps { grid-template-columns: 1fr; }
  .hero-stat-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; align-items: flex-start; }
  .mobile-cta { display: inline-flex; }
  .hero { padding: 56px 0 48px; }
  .section { padding: 56px 0; }
  .code-block pre { font-size: 0.72rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: none; opacity: 1; transform: none; }
  .btn:hover, .card:hover { transform: none; }
}
