*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --blue-400: #3b82f6;
  --blue-500: #2563eb;
  --blue-600: #1d4ed8;
  --blue-900: #0f172a;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-300: #cbd5e1;
  --slate-500: #64748b;
  --slate-700: #334155;
  --slate-900: #0f172a;
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --header-h: 72px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", "Noto Sans TC", system-ui, -apple-system, sans-serif;
  color: var(--slate-700);
  background: var(--white);
  line-height: 1.6;
}

:lang(zh-Hant) body {
  font-family: "Noto Sans TC", "Inter", system-ui, sans-serif;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--blue-500);
  text-decoration: none;
}

.container {
  width: min(1120px, 100% - 2rem);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

.header-actions {
  display: none;
  align-items: center;
  gap: 0.75rem;
}

.lang-switch {
  display: flex;
  align-items: center;
  padding: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lang-btn {
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--slate-300);
  background: transparent;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.lang-btn:hover {
  color: var(--white);
}

.lang-btn.active {
  color: var(--white);
  background: var(--blue-500);
}

.logo-link {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 36px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin-left: auto;
}

.lang-switch--nav {
  margin-left: 0.5rem;
}

.lang-switch--mobile {
  display: none;
}

.site-nav a {
  color: var(--slate-300);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.site-nav a:hover {
  color: var(--white);
}

.nav-cta {
  padding: 0.5rem 1rem;
  background: var(--blue-500);
  color: var(--white) !important;
  border-radius: 6px;
}

.nav-cta:hover {
  background: var(--blue-600);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
  background: var(--slate-900);
  color: var(--white);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(37, 99, 235, 0.18), transparent),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(59, 130, 246, 0.1), transparent),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 39px,
      rgba(59, 130, 246, 0.04) 39px,
      rgba(59, 130, 246, 0.04) 40px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 39px,
      rgba(59, 130, 246, 0.04) 39px,
      rgba(59, 130, 246, 0.04) 40px
    );
}

.hero-inner {
  position: relative;
  padding-block: 4rem;
}

.hero-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-400);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  max-width: 16ch;
  margin-bottom: 1.25rem;
}

.hero-text {
  font-size: 1.1rem;
  color: var(--slate-300);
  max-width: 52ch;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.btn-primary {
  background: var(--blue-500);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--blue-600);
}

.btn-outline {
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--white);
}

.btn-outline:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.06);
}

.btn-full {
  width: 100%;
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section-dark {
  background: var(--slate-900);
  color: var(--slate-300);
}

.section-dark h2,
.section-dark .section-lead {
  color: var(--white);
}

.section h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 1rem;
}

.section-lead {
  color: var(--slate-500);
  margin-bottom: 2.5rem;
  max-width: 48ch;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.split p + p {
  margin-top: 1rem;
}

.stats {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stats li {
  padding: 1.25rem;
  background: var(--slate-50);
  border: 1px solid var(--slate-100);
  border-radius: var(--radius);
}

.stats strong {
  display: block;
  font-size: 1.1rem;
  color: var(--blue-500);
  margin-bottom: 0.25rem;
}

.stats span {
  font-size: 0.875rem;
  color: var(--slate-500);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.card {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--blue-400);
  background: rgba(37, 99, 235, 0.15);
  border-radius: 8px;
}

.card h3 {
  color: var(--white);
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.9rem;
  line-height: 1.55;
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.service h3 {
  font-size: 1rem;
  color: var(--slate-900);
  margin-bottom: 0.5rem;
}

.service p {
  font-size: 0.9rem;
  color: var(--slate-500);
}

/* Contact */
.section-contact {
  background: var(--slate-50);
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-list {
  list-style: none;
  margin-top: 2rem;
}

.contact-list li + li {
  margin-top: 1.25rem;
}

.contact-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-500);
  margin-bottom: 0.2rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate-700);
}

.contact-form input,
.contact-form textarea {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--slate-300);
  border-radius: 6px;
  font: inherit;
  color: var(--slate-900);
  transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-note {
  font-size: 0.75rem;
  color: var(--slate-500);
  text-align: center;
}

.form-status {
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  padding: 0.75rem 1rem;
  border-radius: 6px;
}

.form-status--success {
  color: #166534;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
}

.form-status--error {
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #fecaca;
}

/* Footer */
.site-footer {
  padding: 2rem 0;
  background: var(--slate-900);
  color: var(--slate-500);
  font-size: 0.875rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.footer-logo {
  height: 28px;
  opacity: 0.85;
}

/* Mobile nav */
@media (max-width: 768px) {
  .header-actions {
    display: flex;
    margin-left: auto;
  }

  .lang-switch--nav {
    display: none;
  }

  .lang-switch--mobile {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    flex-direction: column;
    gap: 0;
    background: var(--slate-900);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s, opacity 0.25s;
  }

  .site-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav a {
    padding: 0.85rem 1.5rem;
    width: 100%;
    text-align: center;
  }

  .nav-cta {
    margin: 0.5rem 1.5rem 0;
    text-align: center;
  }

  .split,
  .contact-inner {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: 1fr;
  }
}
