:root {
  /* 配色：石墨灰＋天青（與標誌相同） */
  --brand: #334155;         /* 石墨灰 */
  --brand-dark: #0f172a;    /* 深石墨：品牌字、按鈕 */
  --accent: #38bdf8;        /* 天青：只當裝飾，不放文字（白底對比不足） */
  --accent-strong: #0369a1; /* 深天青：連結、圖示（白底對比 5.9） */
  --accent-soft: #e0f2fe;
  --bg-soft: #f1f5f9;
  --ink: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --radius: 14px;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink);
  background: #fff;
}

a {
  color: var(--accent-strong);
}

:focus-visible {
  outline: 3px solid var(--accent-strong);
  outline-offset: 3px;
}

.phrase {
  display: inline-block; /* 窄螢幕以詞組為單位換行 */
}

h1,
h2,
h3 {
  line-height: 1.3;
  margin: 0;
}

p {
  margin: 0;
  text-wrap: pretty; /* 避免段落最後一行只剩一個字 */
}

.container {
  width: min(100% - 2.5rem, 1040px);
  margin-inline: auto;
}

/* 頁首 */
.site-header {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--brand-dark);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.header-link {
  font-weight: 600;
  text-decoration: none;
}

.header-link:hover {
  text-decoration: underline;
}

/* 開頭 */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(4rem, 10vw, 7rem) 0;
  background: linear-gradient(180deg, var(--bg-soft), #fff);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: min(45%, 460px);
  background-image: radial-gradient(circle, rgba(56, 189, 248, 0.26) 0 5px, transparent 6px);
  background-size: 30px 30px;
  mask-image: linear-gradient(90deg, transparent, #000 60%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(2.125rem, 5.5vw, 3.25rem);
  letter-spacing: 0.04em;
}

.lead {
  margin-top: 1rem;
  font-size: clamp(1.125rem, 2.4vw, 1.375rem);
  color: var(--muted);
}

.button {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.75rem 1.75rem;
  border-radius: 999px;
  background: var(--brand-dark);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  background: var(--brand);
}

/* 服務項目 */
.services,
.contact {
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
}

.services h2,
.contact h2 {
  font-size: clamp(1.625rem, 3.5vw, 2rem);
  margin-bottom: 2rem;
}

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

.service {
  padding: 2rem 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.service-icon {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 1.25rem;
  border-radius: 50%;
  background: var(--accent-soft);
}

.service-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: var(--accent-strong);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service h3 {
  font-size: 1.3125rem;
  margin-bottom: 0.75rem;
}

.service p {
  color: var(--muted);
}

.service p + p {
  margin-top: 0.5rem;
}

/* 聯絡我們 */
.contact {
  background: var(--bg-soft);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.contact-info {
  margin: 0;
  padding: 1.75rem;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
}

.contact-info > div + div {
  margin-top: 1.25rem;
}

.contact-info dt {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--muted);
}

.contact-info dd {
  margin: 0.25rem 0 0;
}

.contact-info small {
  color: var(--muted);
  font-size: 0.9375rem;
}

.reveal {
  font: inherit;
  font-weight: 600;
  color: #075985;
  background: var(--accent-soft);
  border: 1px solid #bae6fd;
  border-radius: 999px;
  padding: 0.375rem 1.25rem;
  cursor: pointer;
}

.reveal:hover {
  background: #bae6fd;
}

.contact-link {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.contact-link:hover {
  text-decoration: underline;
}

.noscript {
  margin-top: 1.25rem;
  color: var(--muted);
}

/* 頁尾 */
.site-footer {
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  color: var(--muted);
  text-align: center;
}

/* 404 頁 */
.not-found {
  padding: clamp(5rem, 14vw, 9rem) 0;
  text-align: center;
}

.not-found p {
  margin-top: 1rem;
  color: var(--muted);
}

@media (max-width: 860px) {
  .service-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero::after {
    width: 55%;
    opacity: 0.6;
  }
}
