/* ============================================================
   MUZI GOING's AI LAB — 全站外殼（nav / footer / logo / 版權字）
   ------------------------------------------------------------
   單一母本：全站頁首頁尾樣式只在這裡定義（style.css 已移除這段）。
   掛載順序：<link site-chrome.css> 在前、<link style.css> 在後
   （門面頁兩支都掛；功能 app 頁只掛這支，避免 .btn/.card 撞名）。
   :root 為無 style.css 時的 fallback token；style.css 在後載入
   時會以其 :root 覆蓋，token 正本仍在 style.css。
   改任何 .css 內容後，記得統一更新所有引用處的 ?v= 版本號。
   ============================================================ */

:root {
  --bg: #FAFAF7;
  --ink: #1A1D1A;
  --ink-soft: #4A4F4A;
  --ink-dim: #8A8F8A;
  --line: rgba(26, 29, 26, 0.08);
  --line-strong: rgba(26, 29, 26, 0.14);
  --green: #2D5F3F;
  --max: 1280px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --font-display: 'Fraunces', 'Noto Serif TC', Georgia, serif;

  /* 字級 token（與 style.css 同值的 fallback；功能 app 頁只掛本檔，
     需在此提供，否則 var(--fs-*) 在 app 頁解析不到會字級失效）。
     基準內文 18px；唯版權可 12px。改值要同步 style.css。 */
  --fs-caption: 12px;                        /* 版權 / fine print（唯一可 <14px）*/
  --fs-label: 0.78rem;                       /* ~14px eyebrow / tag / pill / meta 標籤 */
  --fs-compact: 0.9rem;                      /* ~16px 密集元件（表格、說明框）*/
  --fs-body: 1rem;                           /* 18px 內文 / 描述（最小標準）*/
  --fs-lead: 1.16rem;                        /* ~21px 副標 / 導言 */
  --fs-h3: 1.45rem;                          /* ~26px 小節標題 */
  --fs-h2: clamp(1.5rem, 2.8vw, 1.94rem);    /* 27–35px 區段標題 */
  --fs-title: clamp(2.4rem, 5vw, 3.8rem);    /* 頁面主標（展示型，例外）*/
  --fs-hero: clamp(2.6rem, 7vw, 5.2rem);     /* 首頁 Hero（展示型，例外）*/
}

/* rem 基準（同 style.css 的 html 規則；app 頁多用 px，不受影響） */
html { font-size: 18px; }

/* app 頁沒有全域 a 規則，這裡只作用在外殼內 */
.nav a, .foot a { color: inherit; text-decoration: none; }

/* ============ Nav ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 247, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.95rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.01em;
}
.logo-mark {
  width: 32px;
  height: 32px;
  background: url("/assets/logo/lockups-png/full/05-icon.png?v=mg3") center / contain no-repeat;
  flex: none;
}
.logo-mark.large {
  width: 60px;
  height: 60px;
}
.logo-dim { color: var(--ink-dim); font-weight: 400; }
.nav-mail {
  font-size: 1rem;
  color: var(--ink-soft);
  padding: 0.45rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  white-space: nowrap;
  transition: all 0.3s ease;
}
.nav-mail:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

/* ============ Footer ============ */
.foot {
  padding: 4rem var(--gutter) 3rem;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.foot-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.foot-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
}
.foot-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  font-size: 1rem;
}
.foot-links a {
  color: var(--ink);
  font-weight: 500;
  transition: color 0.3s ease;
}
.foot-links a:hover { color: var(--green); }
.copy { color: var(--ink-dim); font-size: 12px; }
.foot-sig { height: 46px; width: auto; margin-bottom: 0.4rem; }

/* ============ RWD ============ */
@media (max-width: 860px) {
  .foot-inner { flex-direction: column; align-items: flex-start; }
  .foot-links { align-items: flex-start; }
  .nav-inner { gap: 0.5rem; }
  .nav-logo { gap: 0.45rem; font-size: 0.95rem; min-width: 0; }
  .logo-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav-mail { padding: 0.4rem 0.8rem; font-size: 0.9rem; }
}

/* 手機：字標縮短、隱藏「's AI LAB」尾段，騰出空間給按鈕 */
@media (max-width: 480px) {
  .nav-inner { padding: 0.7rem var(--gutter); }
  .logo-dim { display: none; }
  .nav-logo { font-size: 0.9rem; }
  .nav-mail { padding: 0.36rem 0.7rem; font-size: 0.84rem; }
}
