/* 元米官網樣式
   三種底色交替：白（紙）、黑（墨）、混凝土灰。唯一的裝飾是主視覺下方的尺寸標註線。 */

:root {
  --paper: #ffffff;
  --ink: #000000;
  --concrete: #e6e7e8;
  --graphite: #5c5f63;   /* 白底上的次要文字，對比 6.4:1 */
  --fog: #a7aaae;        /* 黑底上的次要文字，對比 8.6:1 */
  --survey: #1d4ed8;     /* 測量藍：只用在連結與尺寸線 */
  --survey-light: #8fb0ff;

  --gutter: clamp(20px, 5vw, 72px);
  --measure: 34em;
  --font: "Noto Sans TC", "PingFang TC", "Heiti TC", "Microsoft JhengHei", sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  font-feature-settings: "palt" 0;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

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

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--gutter);
  top: 12px;
  z-index: 10;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 14px;
}

.wrap {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- 導覽列 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5em;
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 0.08em;
  text-decoration: none;
}
.wordmark small {
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--graphite);
}

.site-nav ul {
  display: flex;
  gap: clamp(14px, 3vw, 36px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  font-size: 14px;
  text-decoration: none;
  color: var(--graphite);
}
.site-nav a:hover { color: var(--ink); }

/* ---------- 主視覺 ---------- */

.hero {
  padding: clamp(72px, 14vh, 160px) 0 clamp(64px, 10vh, 120px);
}

.hero h1 {
  margin: 0;
  font-weight: 900;
  font-size: clamp(32px, 10.5vw, 168px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.hero h1 span { display: block; }

/* 尺寸標註線：兩端短豎線、中間一條線、線上一個標註文字。
   寬度就是標題第一行的寬度，像圖面上量出來的尺寸。 */
.dimension {
  position: relative;
  margin: clamp(28px, 4vw, 48px) 0 0;
  height: 28px;
  color: var(--survey);
}
.dimension::before,
.dimension::after {
  content: "";
  position: absolute;
  top: 4px;
  width: 1.5px;
  height: 20px;
  background: currentColor;
}
.dimension::before { left: 0; }
.dimension::after { right: 0; }
.dimension-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 13.5px;
  height: 1.5px;
  background: currentColor;
  transform-origin: left center;
}
.dimension-label {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  padding: 0 12px;
  background: var(--paper);
  font-size: 13px;
  line-height: 28px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.hero-lede {
  max-width: var(--measure);
  margin: clamp(32px, 5vw, 56px) 0 0;
  font-size: clamp(17px, 1.6vw, 21px);
  color: var(--graphite);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 32px;
}

.button {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease;
}
.button:hover { background: #2a2a2a; }

.text-link {
  align-self: center;
  color: var(--survey);
  font-size: 16px;
  text-decoration: none;
}
.text-link:hover { text-decoration: underline; }

/* 只有主視覺有一次載入動畫：標題兩行依序浮上，接著畫尺寸線。 */
@media (prefers-reduced-motion: no-preference) {
  .hero h1 span {
    animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.1, 1) both;
  }
  .hero h1 span:nth-child(2) { animation-delay: 0.12s; }
  .dimension-line {
    animation: draw 1.1s cubic-bezier(0.6, 0, 0.2, 1) 0.45s both;
  }
  .dimension::after,
  .dimension-label {
    animation: appear 0.4s ease 1.35s both;
  }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(0.25em); }
  to { opacity: 1; transform: none; }
}
@keyframes draw {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@keyframes appear {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- 區塊共用 ---------- */

.section {
  padding: clamp(80px, 12vw, 160px) 0;
}
.section--ink {
  background: var(--ink);
  color: var(--paper);
}
.section--concrete { background: var(--concrete); }

.section-title {
  margin: 0 0 clamp(40px, 6vw, 80px);
  font-weight: 900;
  font-size: clamp(34px, 5.6vw, 80px);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

/* ---------- 服務：一列一項，左標題右說明 ---------- */

.services {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
}
.services li {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 16px 48px;
  padding: clamp(28px, 4vw, 48px) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
}
.services h3 {
  margin: 0;
  font-weight: 700;
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1.3;
}
.services p {
  margin: 0;
  max-width: var(--measure);
  color: var(--fog);
}

/* ---------- 做法：真的有先後順序，所以編號 ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px clamp(24px, 4vw, 64px);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: block;
  margin-bottom: 20px;
  font-weight: 900;
  font-size: clamp(56px, 7vw, 104px);
  line-height: 1;
  color: var(--concrete);
  -webkit-text-stroke: 1.5px var(--ink);
}
.steps h3 {
  margin: 0 0 12px;
  font-weight: 700;
  font-size: 22px;
}
.steps p {
  margin: 0;
  color: var(--graphite);
}

/* ---------- 關於 ---------- */

.about-body {
  max-width: 30em;
  margin: 0;
  font-size: clamp(19px, 2.2vw, 28px);
  line-height: 1.7;
}
.about-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 56px;
  margin: 48px 0 0;
}
.about-facts div { min-width: 0; }
.about-facts dt {
  font-size: 14px;
  color: var(--graphite);
}
.about-facts dd {
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: 500;
}

/* ---------- 聯絡：信箱本身就是主角 ---------- */

.contact-mail {
  display: inline-block;
  max-width: 100%;
  font-weight: 700;
  font-size: clamp(28px, 6.4vw, 96px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-decoration: none;
  overflow-wrap: anywhere;
  border-bottom: 2px solid rgba(255, 255, 255, 0.4);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.contact-mail:hover {
  color: var(--survey-light);
  border-color: var(--survey-light);
}

.contact-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  gap: 24px 72px;
  margin: 56px 0 0;
}
.contact-list dt {
  font-size: 14px;
  color: var(--fog);
}
.contact-list dd {
  margin: 4px 0 0;
  font-size: 18px;
}
.contact-list a { text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

/* ---------- 頁尾：Meta 驗證要比對的公司資料 ---------- */

.site-footer {
  padding: 56px 0 40px;
  background: var(--paper);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 14px;
  color: var(--graphite);
}
.company {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px 40px;
  margin: 0;
}
.company dt { color: var(--graphite); }
.company dd {
  margin: 2px 0 0;
  color: var(--ink);
}
.company a { text-decoration: none; }
.company a:hover { text-decoration: underline; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.footer-bottom p { margin: 0; }

/* ---------- 隱私權政策 ---------- */

.legal {
  padding: clamp(56px, 9vw, 112px) 0 clamp(80px, 10vw, 128px);
}
.legal h1 {
  margin: 0;
  font-weight: 900;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.15;
}
.legal .updated {
  margin: 16px 0 0;
  color: var(--graphite);
}
.legal-body {
  max-width: var(--measure);
  margin-top: 56px;
}
.legal-body h2 {
  margin: 48px 0 12px;
  font-weight: 700;
  font-size: 22px;
}
.legal-body p,
.legal-body li { color: #26282b; }
.legal-body ul { padding-left: 1.3em; }
.legal-body a { color: var(--survey); }

/* ---------- 手機 ---------- */

@media (max-width: 767px) {
  .site-nav { display: none; }
  .services li { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .contact-list { grid-template-columns: 1fr; }
  .company { grid-template-columns: 1fr 1fr; }
  .company .wide { grid-column: 1 / -1; }
}

@media (min-width: 768px) and (max-width: 1099px) {
  .company { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 標題與尺寸線包在同一個容器，寬度跟著標題最寬的那一行。 */
.hero-measure {
  width: fit-content;
  max-width: 100%;
}
