/* ---------- Design tokens ---------- */
:root {
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --text: #1a1d23;
  --muted: #5c6470;
  --brand: #4f46e5;
  --brand-dark: #3f37c9;
  --border: #e6e8ec;
  --radius: 14px;
  --container: 1080px;
  --shadow: 0 6px 24px rgba(20, 23, 31, 0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, "PingFang TC", "Noto Sans TC", "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s, transform 0.1s;
}
.btn:hover { background: var(--brand-dark); }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 8px 16px; font-size: 0.9rem; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-alt); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.5px; }
.logo span { color: var(--brand); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--muted); font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-links a.btn { color: #fff; }

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

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 80px;
  background: radial-gradient(900px 400px at 70% -10%, rgba(79,70,229,0.12), transparent);
}
.hero-inner { text-align: center; max-width: 720px; margin: 0 auto; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 20px;
}
.lead { font-size: 1.15rem; color: var(--muted); margin-bottom: 32px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { font-size: clamp(1.6rem, 4vw, 2.2rem); letter-spacing: -0.5px; }
.section-sub { color: var(--muted); margin-top: 8px; margin-bottom: 40px; }

/* ---------- Grid / cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-icon { font-size: 2rem; margin-bottom: 14px; }
.card h3 { margin-bottom: 8px; font-size: 1.2rem; }
.card p { color: var(--muted); }

/* ---------- About ---------- */
.about-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: center;
}
.about-text p { color: var(--muted); margin-top: 16px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; text-align: center; }
.stat {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 8px;
}
.stat-num { display: block; font-size: 2rem; font-weight: 800; color: var(--brand); }
.stat-label { font-size: 0.85rem; color: var(--muted); }

/* ---------- Work ---------- */
.work-grid { margin-top: 8px; }
.work-item { display: block; transition: transform 0.2s; }
.work-item:hover { transform: translateY(-4px); }
.work-thumb {
  height: 200px;
  border-radius: var(--radius);
  margin-bottom: 14px;
}
.thumb-1 { background: linear-gradient(135deg, #667eea, #764ba2); }
.thumb-2 { background: linear-gradient(135deg, #f093fb, #f5576c); }
.thumb-3 { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.work-item h3 { font-size: 1.1rem; }
.work-item p { color: var(--muted); font-size: 0.9rem; }

/* ---------- Contact ---------- */
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: start;
}
.contact-form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 0.9rem; }
.field input, .field textarea {
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  resize: vertical;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.15);
}
.form-note { color: var(--brand); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0; }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.9rem;
}
.socials { display: flex; gap: 18px; font-weight: 600; }
.socials a:hover { color: var(--brand); }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .grid, .about-inner, .contact-inner, .stats { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3, 1fr); }

  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 20px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; padding: 8px 0; }
}
