:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --ink: #172033;
  --muted: #667085;
  --line: #dce3ee;
  --brand: #2563eb;
  --brand-dark: #123a8c;
  --brand-soft: #e8f0ff;
  --accent: #12b981;
  --shadow: 0 20px 55px rgba(23, 32, 51, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(20px, 5vw, 72px);
  background: rgba(246, 248, 251, 0.92);
  border-bottom: 1px solid rgba(220, 227, 238, 0.8);
  backdrop-filter: blur(16px);
}

.brand,
.nav-links,
.hero-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  border-radius: 8px;
}

.nav-links {
  gap: 22px;
  color: var(--muted);
  font-size: 15px;
}

.nav-links a:hover {
  color: var(--brand);
}

.section {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 76px 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  min-height: calc(100vh - 69px);
  padding-top: 54px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 720px;
  margin-bottom: 22px;
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.18;
}

h3 {
  margin-bottom: 10px;
  font-size: 22px;
}

.hero-text,
.section-heading p,
.contact-section p,
.service-card p,
.process-list p,
.work-title p {
  color: var(--muted);
}

.hero-text {
  max-width: 680px;
  margin-bottom: 30px;
  font-size: 18px;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
}

.button.primary {
  color: #ffffff;
  background: var(--brand);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.button.secondary {
  color: var(--brand-dark);
  background: var(--brand-soft);
  border-color: #cfe0ff;
}

.hero-showcase {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-showcase img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: left top;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-top: 0;
}

.stats div,
.service-card,
.work-card,
.process-list li,
.contact-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.stats div {
  padding: 22px;
}

.stats strong,
.stats span {
  display: block;
}

.stats strong {
  margin-bottom: 6px;
  font-size: 20px;
}

.stats span {
  color: var(--muted);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

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

.service-card {
  padding: 28px;
}

.service-number {
  display: inline-flex;
  margin-bottom: 44px;
  color: var(--brand);
  font-weight: 900;
}

.works-section {
  width: min(1240px, calc(100% - 40px));
}

.work-group + .work-group {
  margin-top: 60px;
}

.work-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.work-title p {
  max-width: 520px;
  margin-bottom: 0;
}

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

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

.work-card {
  overflow: hidden;
  margin: 0;
  box-shadow: 0 10px 26px rgba(23, 32, 51, 0.06);
}

.work-card img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  object-position: left top;
  background: #eef2f7;
  border-bottom: 1px solid var(--line);
}

.work-card.wide img {
  height: 300px;
}

.work-card.tall img {
  height: 560px;
}

.work-card figcaption {
  padding: 14px 16px;
  color: var(--muted);
  font-weight: 700;
}

.process-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.process-list li {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 18px;
  padding: 24px;
}

.process-list span {
  color: var(--accent);
  font-weight: 900;
}

.process-list p {
  margin-bottom: 0;
}

.contact-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 44px;
  padding: clamp(28px, 5vw, 56px);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(18, 185, 129, 0.09)),
    var(--surface);
}

.contact-section div {
  max-width: 760px;
}

.contact-section p {
  margin-bottom: 0;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px clamp(20px, 5vw, 72px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .stats,
  .service-grid,
  .backend-gallery,
  .frontend-gallery {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .work-title,
  .contact-section,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .nav-links {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
  }

  .section {
    width: min(100% - 28px, 1160px);
    padding: 52px 0;
  }

  .hero {
    padding-top: 34px;
  }

  .hero-text {
    font-size: 16px;
  }

  .work-card img,
  .work-card.wide img {
    height: 240px;
  }

  .work-card.tall img {
    height: 390px;
  }

  .process-list li {
    grid-template-columns: 1fr;
  }
}
