/* ============================================================
   DESIGN TOKENS — 亮色乾淨專業業者風
   ============================================================ */
:root {
  --bg:              #ffffff;
  --bg-soft:         #f6f8fb;
  --surface:         #ffffff;
  --surface-mid:     #f9fafc;
  --surface-elevated:#ffffff;

  --text:       #16202e;
  --text-soft:  #41506a;
  --muted:      #6b7891;

  /* Primary – Trust Blue */
  --primary:       #1d4ed8;
  --primary-light: #3b6ef0;
  --primary-dark:  #1740b0;
  --primary-dim:   rgba(29, 78, 216, 0.08);
  --primary-glow:  rgba(29, 78, 216, 0.18);

  /* Accent – Warm Orange（工程業點綴） */
  --accent:        #f0731a;
  --accent-light:  #ff8c3d;
  --accent-dim:    rgba(240, 115, 26, 0.10);
  --accent-glow:   rgba(240, 115, 26, 0.22);

  --line:         #e4e9f1;
  --line-bright:  #cdd6e4;

  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm:  8px;

  --shadow-xl: 0 24px 50px rgba(22, 40, 78, 0.14);
  --shadow-lg: 0 16px 34px rgba(22, 40, 78, 0.10);
  --shadow-md: 0 8px 20px rgba(22, 40, 78, 0.08);
  --shadow-sm: 0 3px 10px rgba(22, 40, 78, 0.06);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Noto Sans TC', sans-serif;
  color: var(--text);
  line-height: 1.65;
  background:
    radial-gradient(ellipse 1200px 520px at 110% -8%,  rgba(29, 78, 216, 0.06), transparent 60%),
    radial-gradient(ellipse  640px 460px at  -6%  24%, rgba(240, 115, 26, 0.05), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f6f8fb 60%, #eef2f8 100%);
  background-attachment: fixed;
}

img { display: block; width: 100%; }
a   { color: inherit; text-decoration: none; }

.container {
  width: min(1140px, 92vw);
  margin: 0 auto;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-header { padding: 1.2rem 0 3rem; }

.site-nav {
  position: sticky;
  top: 14px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  border-radius: 999px;
  padding: 0.6rem 0.9rem 0.6rem 1rem;
  box-shadow: var(--shadow-md);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.03em;
  color: var(--text);
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.brand-text-sub {
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--muted);
  margin-left: 0.2rem;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line-bright);
  background: #ffffff;
  color: var(--text-soft);
  border-radius: 999px;
  padding: 0.42rem 0.9rem;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.nav-toggle:hover {
  background: var(--primary-dim);
  border-color: var(--primary);
}

.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  color: var(--text-soft);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.22s var(--ease), background-color 0.22s var(--ease);
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
  color: var(--primary);
  background: var(--primary-dim);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 1.2rem;
  margin-top: 2.4rem;
  align-items: start;
}

.hero-copy,
.hero-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-lg);
}

.hero-copy {
  padding: clamp(1.6rem, 3.5vw, 2.8rem);
  position: relative;
  overflow: hidden;
}

.hero-copy::before {
  content: '';
  position: absolute;
  top: -70px;
  right: -70px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, var(--primary-glow), transparent 70%);
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--primary);
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  margin: 0 0 0.6rem;
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.hero h1 {
  margin: 0;
  line-height: 1.18;
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  font-weight: 900;
  color: var(--text);
}

.lead {
  margin-top: 1rem;
  color: var(--text-soft);
  max-width: 56ch;
  font-size: 1rem;
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.8rem;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.72rem 1.4rem;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), background 0.22s var(--ease);
}

.btn:hover,
.btn:focus-visible { transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #ffffff;
  box-shadow: 0 8px 22px var(--primary-glow);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  box-shadow: 0 14px 30px var(--primary-glow);
}

.btn-ghost {
  background: #ffffff;
  border-color: var(--line-bright);
  color: var(--text-soft);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: var(--primary-dim);
  border-color: var(--primary);
  color: var(--primary);
}

/* ── Hero Panel ── */
.hero-panel { padding: 1.5rem; }

.hero-panel h2 {
  margin: 0 0 1.1rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.hero-panel h2::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.hero-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.hero-panel li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.hero-panel li .icon-check {
  flex-shrink: 0;
  margin-top: 0.15rem;
  color: var(--primary);
  font-size: 0.95rem;
}

.li-body { display: grid; gap: 0.12rem; }

.hero-panel strong {
  font-size: 0.97rem;
  color: var(--text);
  display: block;
  font-weight: 700;
}

.hero-panel span {
  color: var(--muted);
  font-size: 0.88rem;
  display: block;
}

/* ============================================================
   METRICS
   ============================================================ */
.metrics {
  margin-top: 0.9rem;
  margin-bottom: 2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}

.metrics article {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.3rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.22s var(--ease), transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.metrics article:hover {
  border-color: var(--line-bright);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.metric-icon {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: var(--radius-sm);
  background: var(--primary-dim);
  border: 1px solid rgba(29, 78, 216, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.15rem;
  flex-shrink: 0;
}

.metric-text { display: grid; gap: 0.08rem; }

.metric-value {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.85rem;
  line-height: 1;
  margin: 0;
  color: var(--primary);
  font-weight: 700;
}

.metric-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ============================================================
   SECTIONS – shared
   ============================================================ */
.section { padding: 3.5rem 0; }

.section-heading { margin-bottom: 2rem; }

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3.3vw, 2.5rem);
  font-weight: 900;
  color: var(--text);
}

.section-heading h2::after {
  content: '';
  display: block;
  width: 3rem;
  height: 3px;
  margin-top: 0.55rem;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), transparent 80%);
}

.section-heading p {
  margin-top: 0.75rem;
  color: var(--muted);
  max-width: 66ch;
  font-size: 1rem;
}

/* ============================================================
   SERVICES
   ============================================================ */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.service-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: var(--shadow-md);
  transition: transform 0.26s var(--ease), border-color 0.26s var(--ease), box-shadow 0.26s var(--ease);
  cursor: pointer;
  position: relative;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), transparent 80%);
  opacity: 0;
  transition: opacity 0.26s var(--ease);
  z-index: 1;
}

.service-card:hover::before,
.service-card:focus-within::before { opacity: 1; }

.service-card:hover,
.service-card:focus-within {
  transform: translateY(-6px);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-xl);
}

.service-img-wrap {
  position: relative;
  overflow: hidden;
}

.service-img-wrap img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}

.service-card:hover .service-img-wrap img { transform: scale(1.06); }

.service-badge {
  position: absolute;
  bottom: 0.6rem;
  right: 0.6rem;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1rem;
}

.service-body { padding: 1.1rem 1rem; }

.service-body h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.service-body p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.6;
}

/* ============================================================
   WORKFLOW
   ============================================================ */
.section-dark {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  position: relative;
}

/* Horizontal connector line */
.workflow-grid::before {
  content: '';
  position: absolute;
  top: 2.4rem;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: linear-gradient(90deg,
    var(--accent-dim),
    var(--accent) 30%,
    var(--primary) 70%,
    var(--primary-dim));
  pointer-events: none;
}

.workflow-item {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 4.8rem 1.1rem 1.3rem;
  margin: 0 0.45rem;
  position: relative;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.24s var(--ease), transform 0.24s var(--ease), box-shadow 0.24s var(--ease);
}

.workflow-item:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.step-circle {
  position: absolute;
  top: 0.8rem;
  left: 50%;
  transform: translateX(-50%);
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.1rem;
  box-shadow: 0 0 0 4px var(--accent-dim), var(--shadow-sm);
  z-index: 1;
}

.step {
  margin: 0 0 0.3rem;
  color: var(--accent);
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  letter-spacing: 0.07em;
  font-size: 0.77rem;
}

.workflow-item h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.workflow-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.55;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 2rem;
}

.about-copy h2 {
  margin-top: 0;
  margin-bottom: 0.9rem;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 900;
  color: var(--text);
}

.about-copy p {
  color: var(--text-soft);
  margin: 0.7rem 0;
  line-height: 1.75;
}

.about-media img {
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xl);
  max-height: 460px;
  object-fit: cover;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.contact-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: 1.4rem 1.2rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.22s var(--ease), transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.contact-card:hover {
  border-color: var(--line-bright);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.contact-icon-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.contact-icon {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.contact-icon.blue {
  background: var(--primary-dim);
  border: 1px solid rgba(29, 78, 216, 0.20);
  color: var(--primary);
}

.contact-icon.amber {
  background: var(--accent-dim);
  border: 1px solid rgba(240, 115, 26, 0.22);
  color: var(--accent);
}

.contact-icon.green {
  background: rgba(22, 163, 110, 0.10);
  border: 1px solid rgba(22, 163, 110, 0.22);
  color: #16a36e;
}

.contact-card h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.contact-card p {
  margin: 0.3rem 0;
  line-height: 1.55;
  color: var(--text-soft);
}

.contact-card a {
  color: var(--primary);
  font-weight: 700;
  transition: color 0.2s var(--ease);
}

.contact-card a:hover { color: var(--primary-light); }

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.contact-actions {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.4rem 0 1.8rem;
  margin-top: 1rem;
}

.footer-inner {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-inner a {
  color: var(--primary);
  font-weight: 500;
  transition: color 0.2s var(--ease);
}

.footer-inner a:hover { color: var(--primary-light); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: reveal 0.68s cubic-bezier(0.21, 1, 0.32, 1) forwards;
  animation-delay: var(--d, 0s);
}

@keyframes reveal {
  to { opacity: 1; transform: translateY(0); }
}

:focus-visible {
  outline: 3px solid var(--primary-glow);
  outline-offset: 2px;
}

/* ============================================================
   RESPONSIVE – 1024px
   ============================================================ */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; }

  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .workflow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .workflow-grid::before { display: none; }

  .workflow-item { margin: 0; }

  .about { grid-template-columns: 1fr; }

  .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ============================================================
   RESPONSIVE – 768px
   ============================================================ */
@media (max-width: 768px) {
  .site-nav {
    border-radius: 16px;
    padding: 0.7rem;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .brand { font-size: 1.1rem; }

  .brand-text-sub {
    display: block;
    margin-left: 0;
    margin-top: 0.1rem;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 0.4rem;
  }

  .nav-menu.open { display: flex; }

  .nav-menu a {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.62rem 0.8rem;
  }

  .metrics,
  .service-grid,
  .workflow-grid,
  .contact-grid { grid-template-columns: 1fr; }

  .section { padding: 2.5rem 0; }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
