/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #060b14;
  --bg2: #0a1220;
  --bg3: #0f1c2e;
  --surface: #111d30;
  --surface2: #16243d;
  --border: rgba(255,255,255,0.07);
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --accent: #60a5fa;
  --gold: #f59e0b;
  --text: #e2e8f0;
  --text-muted: #8ca0be;
  --text-dim: #4a6285;
  --grad: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
  --grad2: linear-gradient(135deg, #1e3a5f 0%, #1a1040 100%);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.3);
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Noto Sans TC', 'Noto Sans SC', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Header ─── */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0;
  background: rgba(6,11,20,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.header.scrolled {
  background: rgba(6,11,20,0.97);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 24px;
}

.logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.logo-kw {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo-ads { color: var(--text); }

.nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
}
.nav-link:hover {
  color: var(--text);
  background: var(--surface);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-switcher {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.3px;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active {
  background: var(--primary);
  color: #fff;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ─── Hero ─── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59,130,246,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.06) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 100%);
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}
.glow-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, transparent 70%);
  top: -100px; left: -100px;
}
.glow-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(139,92,246,0.12) 0%, transparent 70%);
  bottom: -50px; right: -50px;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.25);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 28px;
  letter-spacing: 0.5px;
}

.hero-title {
  font-size: clamp(42px, 7vw, 80px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 24px;
  color: var(--text);
}

.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 600px;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 20px rgba(59,130,246,0.35);
}
.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 28px rgba(59,130,246,0.5);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  background: var(--surface);
  border-color: rgba(255,255,255,0.15);
}

.btn-full { width: 100%; }

.hero-stats {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.stat-item { text-align: left; }
.stat-num {
  font-size: 32px;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}
.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.scroll-dot {
  width: 6px; height: 6px;
  background: var(--primary);
  border-radius: 50%;
  animation: scrollBob 2s ease-in-out infinite;
}
@keyframes scrollBob {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(8px); opacity: 0.4; }
}

/* ─── Section Commons ─── */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}
.section-tag {
  display: inline-block;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.2);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}
.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
  color: var(--text);
}
.section-desc {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

/* ─── Services ─── */
.services {
  padding: 120px 0;
  background: var(--bg2);
  position: relative;
}
.services::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(30px);
}
.service-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(59,130,246,0.05) 0%, transparent 60%);
  opacity: 0;
  transition: var(--transition);
}
.service-card:hover {
  border-color: rgba(59,130,246,0.3);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.3), 0 0 0 1px rgba(59,130,246,0.1);
}
.service-card:hover::before { opacity: 1; }

.service-icon-wrap {
  margin-bottom: 20px;
}
.service-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, rgba(59,130,246,0.15), rgba(139,92,246,0.1));
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  transition: var(--transition);
}
.service-icon svg { width: 26px; height: 26px; }
.service-card:hover .service-icon {
  background: linear-gradient(135deg, rgba(59,130,246,0.25), rgba(139,92,246,0.2));
  border-color: rgba(59,130,246,0.4);
}

.service-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}
.service-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}
.service-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.service-features li {
  font-size: 13px;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
}
.service-features li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-size: 11px;
}

/* ─── Why Us ─── */
.why-us {
  padding: 120px 0;
  background: var(--bg);
}

.why-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.why-features {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 32px;
}
.why-feature {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.why-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 12px;
  margin-top: 2px;
}
.why-feature h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
}
.why-feature p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.why-visual {
  position: relative;
}
.why-card-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.wcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}
.wcard:hover {
  border-color: rgba(59,130,246,0.3);
  transform: translateX(4px);
}
.wcard-label {
  font-size: 14px;
  color: var(--text-muted);
  width: 120px;
  flex-shrink: 0;
  font-weight: 500;
}
.wcard-bar {
  flex: 1;
  height: 6px;
  background: var(--bg3);
  border-radius: 3px;
  overflow: hidden;
}
.wcard-fill {
  height: 100%;
  background: var(--grad);
  border-radius: 3px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.2s cubic-bezier(0.4,0,0.2,1);
}
.wcard-fill.animated { transform: scaleX(1); }
.wcard-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  width: 44px;
  text-align: right;
  flex-shrink: 0;
}

/* ─── Contact ─── */
.contact {
  padding: 120px 0;
  background: var(--bg2);
  position: relative;
}
.contact::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 64px;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-top: 8px;
}

.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.contact-icon {
  width: 44px;
  height: 44px;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.contact-icon svg { width: 20px; height: 20px; }
.contact-item h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.contact-item p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  padding: 12px 16px;
  transition: var(--transition);
  outline: none;
  -webkit-appearance: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-dim);
}
.form-group select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238ca0be' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
.form-group select option { background: var(--bg2); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: rgba(59,130,246,0.5);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.form-group textarea { resize: vertical; min-height: 120px; }

/* ─── Footer ─── */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 64px 0 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 12px;
}

.footer-links { display: flex; gap: 64px; justify-content: flex-end; }
.footer-col h5 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a {
  font-size: 14px;
  color: var(--text-muted);
  transition: var(--transition);
}
.footer-col ul li a:hover { color: var(--text); }

.footer-bottom {
  padding: 20px 0;
  display: flex;
  align-items: center;
}
.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}
.footer-bottom p {
  font-size: 13px;
  color: var(--text-dim);
}

/* ─── Toast ─── */
.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: var(--surface2);
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: var(--radius-sm);
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  z-index: 9999;
  transform: translateY(20px);
  opacity: 0;
  transition: var(--transition);
  pointer-events: none;
  box-shadow: var(--shadow);
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-color: rgba(34,197,94,0.4); }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .why-inner { grid-template-columns: 1fr; gap: 48px; }
  .why-visual { order: -1; }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 768px) {
  .nav {
    display: none;
    position: fixed;
    top: 70px; left: 0; right: 0;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
  }
  .nav.open { display: flex; }
  .nav-link { padding: 12px 16px; width: 100%; }
  .hamburger { display: flex; }

  .services-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 40px; }
  .footer-links { justify-content: flex-start; gap: 32px; }
  .form-row { grid-template-columns: 1fr; }
  .hero-stats { gap: 20px; }
  .stat-divider { display: none; }
  .hero-title { letter-spacing: -1px; }
  .wcard-label { width: 90px; font-size: 12px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero { padding: 100px 0 60px; }
  .services, .why-us, .contact { padding: 80px 0; }
  .contact-form { padding: 24px 20px; }
  .lang-btn { padding: 4px 8px; font-size: 11px; }
}
