/* =========================================================
   善善貓資訊工作室｜全站共用：導覽列、手機選單、頁尾、手機聯絡列
   所有 class 以 sc- 開頭，不會和各頁自己的樣式打架。
   設計語言同首頁：墨黑、紙白、印泥紅、貓眼琥珀
   ========================================================= */
.sc-top, .sc-sheet, .sc-foot, .sc-bar, .sc-spacer {
  --sc-ink: #0f0e0d;
  --sc-paper: #f2eee6;
  --sc-seal: #d4412c;
  --sc-amber: #e6b54a;
  --sc-mute-d: #a39e94;
  --sc-line: rgba(15,14,13,.16);
  --sc-line-d: rgba(242,238,230,.16);
  --sc-serif: "Noto Serif TC", "Songti TC", serif;
  --sc-sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --sc-ease: cubic-bezier(.16, 1, .3, 1);
  --sc-g: clamp(20px, 4.4vw, 64px);
  --sc-pad: max(var(--sc-g), calc((100vw - 1560px) / 2 + var(--sc-g)));
  box-sizing: border-box;
}
.sc-top *, .sc-sheet *, .sc-foot *, .sc-bar * { box-sizing: border-box; }

/* 內頁原本 body 有留白的版型：讓導覽列和頁尾可以貼齊螢幕邊緣 */
body.sc-flush { padding: 0 !important; }
body.sc-flush > .wrap { box-sizing: content-box; padding: 44px 24px 64px; }
@media (max-width: 600px) { body.sc-flush > .wrap { padding: 28px 18px 48px; } }

/* ---------- 導覽列 ---------- */
.sc-spacer { height: 68px; }
.sc-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: 68px; margin: 0; padding: 0 var(--sc-pad);
  background: rgba(242,238,230,.9); color: var(--sc-ink);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  font-family: var(--sc-sans); font-size: 15px; line-height: 1.5;
  transition: border-color .3s, background .3s, color .3s;
}
.sc-top.is-scrolled { border-bottom-color: var(--sc-line); }
.sc-top a { color: inherit; text-decoration: none; }
.sc-logo {
  display: flex; align-items: center; gap: 10px; white-space: nowrap;
  font-family: var(--sc-serif); font-weight: 900; font-size: 19px; letter-spacing: .02em;
}
.sc-logo i { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--sc-seal); transition: transform .4s var(--sc-ease); }
.sc-logo:hover i { transform: scale(1.6); }
.sc-nav { display: flex; align-items: center; gap: clamp(18px, 2.6vw, 38px); font-weight: 500; }
.sc-nav a:not(.sc-btn) { position: relative; padding: 6px 0; }
.sc-nav a:not(.sc-btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .45s var(--sc-ease);
}
.sc-nav a:not(.sc-btn):hover::after, .sc-nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.sc-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 0 20px; border-radius: 999px;
  background: var(--sc-ink); color: var(--sc-paper) !important;
  font-weight: 700; font-size: 14px; letter-spacing: .02em; white-space: nowrap;
  transition: background .25s, transform .35s var(--sc-ease);
}
.sc-btn:hover { background: var(--sc-seal); }
.sc-btn:active { transform: scale(.97); }
.sc-menu-btn {
  display: none; align-items: center; gap: 10px; height: 44px; margin: 0; padding: 0 4px;
  background: none; border: 0; border-radius: 0; box-shadow: none; cursor: pointer;
  color: inherit; font: 700 15px/1 var(--sc-sans);
}
.sc-menu-btn i { position: relative; display: block; width: 22px; height: 10px; }
.sc-menu-btn i::before, .sc-menu-btn i::after {
  content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor;
  transition: transform .4s var(--sc-ease), top .4s var(--sc-ease);
}
.sc-menu-btn i::before { top: 0; } .sc-menu-btn i::after { top: 8px; }
.sc-menu-btn[aria-expanded="true"] i::before { top: 4px; transform: rotate(45deg); }
.sc-menu-btn[aria-expanded="true"] i::after { top: 4px; transform: rotate(-45deg); }

/* ---------- 手機選單 ---------- */
.sc-sheet {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 999;
  display: flex; flex-direction: column; justify-content: space-between;
  margin: 0; padding: 96px var(--sc-g) 32px; overflow-y: auto;
  background: var(--sc-ink); color: var(--sc-paper); font-family: var(--sc-sans);
  visibility: hidden; clip-path: inset(0 0 100% 0);
  transition: clip-path .6s var(--sc-ease), visibility 0s .6s;
}
.sc-sheet.is-open { visibility: visible; clip-path: inset(0); transition: clip-path .6s var(--sc-ease), visibility 0s; }
.sc-sheet a { color: inherit; text-decoration: none; }
.sc-sheet__links a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 11px 0; border-bottom: 1px solid var(--sc-line-d);
  font-family: var(--sc-serif); font-weight: 900; font-size: clamp(26px, 8vw, 40px); line-height: 1.25;
}
.sc-sheet__links a span { font-family: var(--sc-sans); font-weight: 400; font-size: 13.5px; color: var(--sc-mute-d); text-align: right; }
.sc-sheet__foot { margin-top: 32px; display: grid; gap: 6px; font-size: 15px; line-height: 1.6; color: var(--sc-mute-d); }
.sc-sheet__foot a { color: var(--sc-paper); }
body.sc-menu-open { overflow: hidden; }
body.sc-menu-open .sc-top { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; color: var(--sc-paper); border-bottom-color: transparent; }

/* ---------- 頁尾 ---------- */
.sc-foot {
  position: relative; z-index: 1; margin: 0; padding: 0 var(--sc-pad);
  background: var(--sc-ink); color: var(--sc-paper);
  font-family: var(--sc-sans); font-size: 15px; line-height: 1.75; text-align: left;
}
.sc-foot a { color: inherit; text-decoration: none; transition: color .2s; }
.sc-foot a:hover { color: var(--sc-amber); }
.sc-foot p { margin: 0; }
.sc-foot__in { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr)); gap: 32px 4vw; padding: clamp(40px, 5vw, 72px) 0 28px; }
.sc-foot__brand { font-family: var(--sc-serif); font-weight: 900; font-size: 22px; line-height: 1.4; }
.sc-foot__tag { margin-top: 8px !important; max-width: 20em; font-size: 14px; color: var(--sc-mute-d); }
.sc-foot__reach { margin-top: 14px !important; display: grid; gap: 2px; font-size: 14.5px; }
.sc-foot__h { margin-bottom: 12px !important; font-size: 13.5px; font-weight: 500; color: var(--sc-mute-d); }
.sc-foot__col a { display: block; margin-bottom: 8px; }
.sc-foot__base {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px;
  padding: 22px 0 28px; border-top: 1px solid var(--sc-line-d); font-size: 13.5px; color: var(--sc-mute-d);
}

/* ---------- 手機底部聯絡列 ---------- */
.sc-bar { display: none; }

@media (max-width: 1000px) {
  .sc-nav { display: none; }
  .sc-menu-btn { display: inline-flex; }
  .sc-foot__in { grid-template-columns: 1fr 1fr; }
  .sc-foot__in > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .sc-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
    display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: rgba(242,238,230,.94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-top: 1px solid var(--sc-line); font-family: var(--sc-sans);
    transform: translateY(110%); transition: transform .45s var(--sc-ease);
  }
  .sc-bar.is-on { transform: none; }
  .sc-bar a {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 0 18px; border-radius: 999px;
    font-weight: 700; font-size: 15px; line-height: 1; text-decoration: none; white-space: nowrap;
  }
  .sc-bar svg { width: 18px; height: 18px; flex: none; }
  .sc-bar__tel { color: var(--sc-ink); box-shadow: inset 0 0 0 1.5px var(--sc-ink); }
  .sc-bar__go { background: var(--sc-ink); color: var(--sc-paper); }
  .sc-bar__go:active { background: var(--sc-seal); }
  body.sc-has-bar .sc-foot__base { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
}
@media (max-width: 380px) { .sc-logo { font-size: 17px; } }
@media (prefers-reduced-motion: reduce) {
  .sc-top, .sc-top *, .sc-sheet, .sc-bar { transition-duration: .01ms !important; }
}
