/* ════════════════════════════════════════════════════════════
   全站共用：色彩與字體變數、logo、右上導覽、全螢幕色塊
   index.html 與 contact.html 都載入這支，兩頁的導覽位置與動畫才會一模一樣，
   換頁時看不出接縫。
   ════════════════════════════════════════════════════════════ */

/* ── 字體：Inter，放在自己網站上（fonts/InterVariable.woff2） ─────
   不從 Google Fonts 載入：訪客的網路擋掉 Google、或離線時也一定看到同一個字體。
   一個檔案就包含 100–900 所有字重（variable font）。Inter 採 SIL Open Font License，可以自由放在網站上。
   中文 Inter 沒有，會接到系統的中文字體（Mac：蘋方、Windows：微軟正黑體） */
@font-face {
  font-family: "Inter";
  src: url("../fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* canvas 在 Tailwind 載入前就要讀字體，所以變數放在一般 CSS 裡，不依賴 Tailwind */
:root {
  --bg: #1a1a1a;
  --fg: #fff9f2;
  --brand: #7f55f5;
  --cream: #fff9f2;           /* CONTACT US 底色 */
  --maroon: #000;             /* 奶油底上所有文字的顏色：黑（原本是酒紅、後來深灰 #1a1a1a；變數名稱沿用）。標題 GET IN TOUCH 另外用磚紅 */
  --accent: #ff6b35;          /* TODO 取自參考圖的按鈕底色，待確認正式品牌橘 */
  /* 全站只用一組字體：Inter → 系統中文字體 → 系統預設。
     --font-condensed / --font-display / --font-menu 是舊的名字，都指到同一組，改這一行就全站一起換 */
  --font-sans: "Inter", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --font-condensed: var(--font-sans);
  --font-display: var(--font-sans);
  /* --u：設計稿的 1px。版面是在 1920×1080 的螢幕（瀏覽器裡約 1920×900 以上）調的，筆電（例如 1536×730）比較小，
     上限如果寫死，字和元件在筆電上還是一樣大，就會擠、被切掉。
     所以桌機的上限一律寫成「N * var(--u)」：1920×900 以上 = Npx，不變；
     比較窄或比較矮的螢幕，整體等比例縮小（寬、高取比較緊的那個）。
     手機／平板（900px 以下）有自己的版面，--u 給一個很大的值，上限等於不作用 */
  --u: 100px;
  /* 全站統一的邊距。大螢幕封頂 96px 再大就顯得空，手機收到 24px 再小會貼邊 */
  --gutter: clamp(24px, 6vw, calc(96 * var(--u)));
  /* ── 字級：全站只用這六級 ─────────────────────
     每一段文字都從這裡挑一級，不再各自寫大小。括號是 1146px 寬的視窗大約的大小
     · display：特大字（KOL 等服務頁的主字）（~113px）
     · h1：頁面／區塊標題（CONTACT US、影領、案例、選單項目）（~56px）
     · h2：副標（網紅行銷、首屏的「創造品牌口碑與聲量」）（~30px）
     · h3：小標（表單分區標題、彈窗標題）（~20px）
     · body：內文、說明、按鈕、進度列文字、輸入框（~17px）
     · small：頁尾、表單標籤、錯誤訊息、版權（~13.6px） */
  --fs-display: clamp(4rem, 10vw, calc(152 * var(--u)));     /* 上限 9.5rem */
  --fs-h1: clamp(2.25rem, 4.9vw, calc(72 * var(--u)));       /* 上限 4.5rem */
  --fs-h2: clamp(1.5rem, 2.6vw, calc(38.4 * var(--u)));      /* 上限 2.4rem */
  --fs-h3: clamp(1.1rem, 1.75vw, calc(21.6 * var(--u)));     /* 上限 1.35rem */
  --fs-body: clamp(1rem, 1.5vw, calc(20.8 * var(--u)));      /* 上限 1.3rem */
  --fs-small: .85rem;
  --font-menu: var(--font-sans);                       /* 選單也用同一組 */
}
@media (min-width: 901px) {
  /* 1900 而不是 1920：100vw 不含捲軸那條（約 15px）；1px 封頂，比設計稿大的螢幕維持原樣 */
  :root { --u: min(1px, 100vw / 1900, 100svh / 900); }
}

/* 捲軸的位置永遠保留。
   Windows 的捲軸會佔寬度：鎖住捲動（overflow: hidden）時捲軸消失、畫面變寬，
   固定在右上的按鈕就會往右跳一下；contact.html 內容短、沒有捲軸，換頁時也會跳。
   保留這條空間後，兩頁、開關色塊前後，版面寬度都一樣。 */
html {
  scrollbar-gutter: stable;
  background: var(--bg);
  /* --flip-delay：色塊開關時由 site.js 算好，讓顏色在圓的邊緣掃過時才換 */
  transition: background-color .2s linear var(--flip-delay, 0s);
}
/* 保留出來的那條空間吃的是 html 的底色，奶油色蓋滿時跟著換，不會留一條深色邊 */
html.is-contact-open { background: var(--cream); }
html.is-locked { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-condensed);
  overflow-x: hidden;
}

/* ── 導覽列：上方正中間的一條毛玻璃 ─────────────────
   [ ☰ 選單 │ logo │ ✉ 聯絡我們 ]，三格用和首頁進度列一樣的「刻在玻璃上」的分隔線隔開
   （深色細線＋緊貼的亮線），只是這裡是直的。
   --nav-top / --nav-h 首頁也會用到（算卡片停在導覽列下方多遠） */
:root {
  --nav-h: clamp(50px, 5vw, calc(64 * var(--u)));     /* 整條的高度，也是兩顆圖示按鈕的寬度 */
  --nav-top: clamp(18px, 3.4vw, calc(46 * var(--u)));  /* 離畫面頂端多遠 */
}
/* 導覽列那一整條橫帶的模糊：內容捲到畫面最上面（導覽列那一排）時被糊掉，不會和導覽列的字、圖示打架。
   只做模糊、不加底色，也沒有線；最下面 40px 用遮罩漸漸淡掉，從全糊慢慢過渡到清楚（不是一刀切）。
   整條的底在導覽列下方 14px，首頁卡片停好時的進度列不會被糊到 */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 49;                                         /* 在導覽列（50）下面、頁面內容上面 */
  height: calc(var(--nav-top) + var(--nav-h) + 14px);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent);
  pointer-events: none;
}

.nav-bar {
  position: fixed;
  top: var(--nav-top);
  left: 50%;
  translate: -50% 0;
  z-index: 50;
  display: flex;
  align-items: stretch;
  height: var(--nav-h);
  border-radius: calc(var(--nav-h) * .2);
  isolation: isolate;
  /* 毛玻璃，要輕，和首頁的對話框卡片一樣沒有外框、沒有外陰影：
     · 底色比卡片淡一點——它浮在深色的頁面上，後面沒有紫光透上來，白色一多就變成一塊灰板
     · 左上的反光拉得比卡片寬：同樣的漸層放在這麼小的一條上會被壓扁，拉寬後才是一道從左上斜斜淡掉的光 */
  background:
    radial-gradient(160% 220% at 0% 0%, rgba(255, 255, 255, .09) 0%, rgba(255, 255, 255, 0) 60%),
    linear-gradient(160deg, rgba(255, 255, 255, .06) 0%, rgba(255, 255, 255, .025) 100%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  backdrop-filter: blur(28px) saturate(170%);
  transition: background .2s ease var(--flip-delay, 0s);
}
@supports not (backdrop-filter: blur(1px)) {
  .nav-bar { background: rgba(52, 48, 64, .92); }
}
/* 奶油底上：玻璃改成淡淡的深灰，才看得出來 */
html.is-contact-open .nav-bar {
  background: linear-gradient(160deg, rgba(26, 26, 26, .07) 0%, rgba(26, 26, 26, .035) 100%);
}
/* 排法：logo 靠左，右邊是「＋ MENU」和「＋ CONTACT」。整條和首屏標語「創造品牌口碑與聲量」一樣寬：
   標語是 h1 大小、9 個字、字距 .06em → 9 × 1.06 − .06 ＝ 9.48 個 h1 字寬；太窄放不下按鈕時至少撐到內容的寬度 */
.nav-bar { width: calc(var(--fs-h1) * 9.48); min-width: max-content; }

/* 最左邊：logo。兩張圖疊在一起：紫色是預設，深灰色（logo2-grey.png）在奶油底上淡入 */
.site-logo {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 clamp(14px, 1.6vw, 24px) 0 clamp(18px, 1.8vw, 28px);
  margin-right: auto;                                  /* 把右邊的 MENU、CONTACT 推到最右 */
  line-height: 0;
}
/* 奶油色和紫色兩張都裁到剛好貼齊圖形（nav-logo-*.png，一樣大），交叉淡入淡出時才會完全疊合 */
.site-logo img {
  display: block;
  height: clamp(18px, 1.92vw, 27px);
  width: auto;
  transition: opacity .2s ease var(--flip-delay, 0s);
}
/* 三張疊在一起：平常是奶油色（hover 也不換），奶油底上換成磚紅。
   兩張交叉淡入淡出，圖檔尺寸差一點點也不會露邊 */
.site-logo .site-logo__hover,
.site-logo .site-logo__alt {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  opacity: 0;
}
/* 奶油底上（首頁打開聯絡我們、contact.html）：一直顯示磚紅那張（logo2.png），hover 不換 */
html.is-contact-open .site-logo .site-logo__base,
html.is-contact-open .site-logo .site-logo__hover { opacity: 0; }
html.is-contact-open .site-logo .site-logo__alt   { opacity: 1; }
/* ── 右邊兩格：文字按鈕「＋ MENU」「CONTACT」─────────
   · ＋ MENU：選單開著時 ＋ 轉成 ×（hover 沒有變化）
   · ＋ CONTACT：聯絡我們開著（或在 contact 頁）時 ＋ 轉成 ×，字留著（按了是離開） */
.nav-toggle,
.nav-about {
  --ink: var(--fg);                                    /* 平常的顏色：奶油（和 logo、進度列一樣） */
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45em;
  padding: 0 clamp(14px, 1.4vw, 22px);
  border: 0;
  background: none;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: -.005em;                             /* 字距 -5（設計軟體的 -5 = -0.005em） */
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color .2s ease var(--flip-delay, 0s);
}
.nav-about { padding-right: clamp(18px, 1.8vw, 28px); }   /* 最右邊那格，和 logo 左邊的留白一樣 */
/* 奶油底上：字和圖示是深灰 */
html.is-contact-open .nav-toggle,
html.is-contact-open .nav-about { --ink: var(--maroon); }
/* 鍵盤 Tab 到時才出現的外框（滑鼠 hover 沒有變化） */
.nav-toggle:focus-visible,
.nav-about:focus-visible { outline: 2px solid var(--brand); outline-offset: -6px; border-radius: 10px; }

.nav-icon {
  position: relative;
  display: block;
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}
.nav-icon > * {
  transform-box: view-box;
  transform-origin: 12px 12px;
  transition: transform .4s cubic-bezier(.16, 1, .3, 1), opacity .2s ease;
}

/* ＋：選單開著時轉 45° 變成 × */
.nav-plus { transition: transform .4s cubic-bezier(.16, 1, .3, 1); }
.nav-toggle[aria-expanded="true"] .nav-plus { transform: rotate(45deg); }

/* CONTACT：和 MENU 一樣，字一直留著；聯絡我們開著（或在 contact 頁）時 ＋ 轉 45° 變成 × */
.nav-mail__close { display: none; }
.nav-about__plus { transition: transform .4s cubic-bezier(.16, 1, .3, 1); }
.nav-about.is-active .nav-about__plus { transform: rotate(45deg); }

/* 手機：導覽列收窄一點 */
@media (max-width: 600px) {
  .site-logo { padding: 0 20px; }
  .nav-toggle,
  .nav-about { width: var(--nav-h); }
}

.nav-toggle:focus-visible,
.nav-about:focus-visible,
.site-logo:focus-visible,
.takeover a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 4px;
}
.nav-toggle:focus-visible,
.nav-about:focus-visible,
.site-logo:focus-visible { outline-offset: -4px; }

/* ── 全螢幕色塊（MENU 深灰 / CONTACT US 奶油） ─────────
   點按鈕後，一整片實色從那顆按鈕的位置以圓形擴散蓋滿畫面。
   z-index 45：蓋過頁面內容，但在 logo 和右上兩顆按鈕（50）之下，它們始終看得到。

   效能：色塊是一顆真的圓（.takeover__bg），用 transform: scale 從 0 放大到 1。
   transform 交給 GPU 合成，不像 clip-path 每一幀都要重畫整個畫面。
   圓的半徑（--r）由 JS 算成「按鈕中心到最遠那個角落」的距離，
   動畫走完的那一刻剛好蓋滿，不會有一大段在畫面外空轉。 */
.takeover {
  --dur-open: .75s;
  --dur-close: .6s;
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  padding: calc(var(--gutter) + 5rem) var(--gutter) var(--gutter);
  overflow-y: auto;
  visibility: hidden;
  transition: visibility 0s linear var(--dur-close);   /* 收完才隱藏，否則收合動畫看不到 */
}
.takeover[data-open="true"] {
  visibility: visible;
  transition: visibility 0s;
}
/* 切換 MENU ↔ CONTACT 時，新開的那片要疊在舊的上面：
   先把舊的整個蓋掉，再讓舊的瞬間收起，中間不會閃出底下的頁面 */
.takeover.is-top { z-index: 46; }

.takeover__bg {
  position: fixed;
  left: var(--ox, 100%);
  top: var(--oy, 0%);
  z-index: -1;
  width: calc(var(--r, 150vmax) * 2);
  height: calc(var(--r, 150vmax) * 2);
  margin: calc(var(--r, 150vmax) * -1) 0 0 calc(var(--r, 150vmax) * -1);
  border-radius: 50%;
  transform: scale(0);
  will-change: transform;
  pointer-events: none;
  /* 收合：一按就開始動（不要先慢後快，會像延遲），尾段減速收進按鈕。
     曲線與 site.js 的 EASE_CLOSE 保持一致，換色時機才算得準 */
  transition: transform var(--dur-close) cubic-bezier(.4, 0, .2, 1);
}
.takeover[data-open="true"] .takeover__bg {
  transform: scale(1);
  /* 展開：起步快、尾段長長地減速，蓋滿的那一刻是柔的，不會「碰」一下停住 */
  transition: transform var(--dur-open) cubic-bezier(.22, 1, .36, 1);
}
/* 從 contact 頁回到 index 的第一幀（<head> 裡的腳本加上 .is-returning）：
   site.js 還沒跑之前就先讓奶油色整片蓋滿，不播動畫。
   圓心預設在右上角、半徑 150vmax，一定蓋得滿；site.js 接手後會重新對準按鈕再縮回 */
html.is-returning .takeover--contact { visibility: visible; }
html.is-returning .takeover--contact .takeover__bg { transform: scale(1); }
html.is-returning .takeover,
html.is-returning .takeover *,
html.is-returning .site-logo img,
html.is-returning .nav-bar,
html.is-returning .nav-toggle,
html.is-returning .nav-about,
html.is-returning .nav-icon,
html.is-returning .nav-icon > * { transition: none !important; }

/* 瞬間開關（換片時收掉被蓋住的那片、從 contact 頁回來時先蓋滿再縮回） */
.takeover.is-instant,
.takeover.is-instant * { transition: none !important; }

.takeover--menu                  { color: var(--fg); }
.takeover--menu .takeover__bg    { background: var(--bg); }   /* 背景的深灰 #1a1a1a */
.takeover--contact               { color: var(--maroon); }
.takeover--contact .takeover__bg { background: var(--cream); }

.takeover__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* 大字：MENU 的連結與 contact 頁的標題共用 */
.takeover__list a,
.page-title {
  display: block;
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-h1);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.1;
  color: inherit;
  text-decoration: none;
  transition: color .3s ease;
}
.page-title small {
  display: block;
  margin-top: .3em;
  font-size: var(--fs-h3);
  font-weight: 500;
  letter-spacing: .2em;
  opacity: .7;
}

/* 內容：色塊擴散到大約一半（.3s）就開始依序浮上來，和色塊的減速段重疊，
   讀起來是同一個動作。關閉時內容先淡掉（.15s），色塊才縮得乾淨 */
.takeover__item {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .15s ease, transform .15s ease;
}
.takeover[data-open="true"] .takeover__item {
  opacity: 1;
  transform: none;
  transition: opacity .5s ease, transform .6s cubic-bezier(.22, 1, .36, 1);
  transition-delay: calc(.3s + var(--i, 0) * .06s);
}

/* ── MENU 的版面 ───────────────────────────────
   一欄置中的連結（只有中文），最下面一行小字：信箱與社群。後面墊一團慢慢飄的紫光（品牌紫） */
.menu-glow {
  position: fixed;
  z-index: -1;                                         /* 在 .takeover__bg 之上（DOM 順序在後）、內容之下 */
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  width: 70vw;
  height: 70vw;
  max-width: 1000px;
  max-height: 1000px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(127, 85, 245, .34), rgba(127, 85, 245, 0));
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.takeover[data-open="true"] .menu-glow {
  opacity: 1;
  transition: opacity 1.2s ease .35s;
  animation: glow-drift 22s ease-in-out infinite alternate;
}

/* 極簡版：只留一欄置中的中文連結，沒有編號、手寫英文、分隔線；
   聯絡資訊收成最下面一行小字（信箱＋社群），地址和 Let’s make waves 不顯示 */
.menu-layout {
  box-sizing: border-box;
  width: 100%;
  --menu-fs: min(var(--fs-h1), 8vh);    /* 六列放得下 */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* 中文靠右、英文靠左，兩邊的交界對齊畫面中線 */
.menu-list { width: 100%; }
.menu-list a {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: .35em;
  align-items: baseline;
  padding: .12em 0;
  font-size: var(--menu-fs);
  white-space: nowrap;
  transition: opacity .35s ease;
}
.menu-list__num { display: none; }
.menu-list__label { justify-self: end; }
/* 英文：同一組 Inter，細體 */
.menu-list__en {
  justify-self: start;
  font-family: var(--font-sans);
  font-weight: 200;
  letter-spacing: 0;
}
@media (hover: hover) {
  .menu-list:hover a:not(:hover) { opacity: .3; }    /* 滑到其中一列時，其他列淡掉 */
}
.menu-list a[aria-current="page"] { color: var(--brand); }   /* 目前所在的頁面 */

.menu-aside {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem 1.5rem;
  margin-top: clamp(2rem, 6vh, 4rem);
  font-size: var(--fs-small);
  color: rgba(255, 249, 242, .55);
}
.menu-aside p { margin: 0; }
.menu-aside__word,
.menu-aside__label,
.menu-aside__block:has(.menu-aside__label + p) { display: none; }   /* 地址 */
.menu-aside__social { display: flex; gap: 1.5rem; }
.menu-aside a {
  color: inherit;
  text-decoration: none;
  transition: color .25s ease;
}
.menu-aside a:hover,
.menu-aside a:focus-visible { color: var(--fg); }

@media (prefers-reduced-motion: reduce) {
  .takeover[data-open="true"] .menu-glow { animation: none; }
}

/* ── contact.html 頁面本體 ──────────────────────
   html 的底色跟著 .is-contact-open（寫在 contact.html 的 <html> 上，第一幀就是奶油色）；
   在 contact 頁打開 MENU 時 JS 會拿掉它，捲軸那條也跟著變深灰 */
html[data-page="contact"] body { background: var(--cream); }

.contact-page {
  box-sizing: border-box;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--gutter) + 5rem) var(--gutter) var(--gutter);
  overflow-x: clip;                    /* 表單後面的色光會伸到畫面外，不要讓整頁可以左右捲 */
  color: var(--maroon);
}
/* 頁面內容跟色塊裡的內容用同一套進場：換頁後依序浮上來 */
.contact-page .page-enter {
  animation: page-enter .6s cubic-bezier(.22, 1, .36, 1) both;
  animation-delay: calc(.05s + var(--i, 0) * .06s);
}
@keyframes page-enter {
  from { opacity: 0; transform: translateY(18px); }
}

/* ── 聯絡表單 ──────────────────────────────────
   contact.html 與首頁的奶油色塊共用（首頁會把 .contact-layout 整塊抓過去）。
   玻璃擬態：半透明白底 + 大量模糊 + 很淡的影子，圓角分成兩層——
   外框大圓角（28px），裡面的欄位小一階（16px），像參考圖那樣一層包一層 */

/* 手機的 MENU / CONTACT US 上下疊兩行，內容要讓出更多上方空間，不然會跟按鈕疊在一起 */
@media (max-width: 600px) {
  .contact-page,
  .takeover { padding-top: calc(var(--gutter) + 9rem); }
}

/* 表單比較長，色塊裡要能捲，而且要從上面排起（置中的話上半段會被切掉捲不到） */
.takeover--contact { align-items: flex-start; }
.takeover { overflow-x: hidden; }

.contact-layout {
  position: relative;
  isolation: isolate;                 /* 後面的色光 z-index: -1 只在這一塊裡面墊底 */
  box-sizing: border-box;
  width: 100%;
  margin: 0 auto;
  display: grid;
  /* 左欄（GET IN TOUCH，靠右）的右緣對齊導覽列 logo「影領」的右緣，右邊接著表單。
     導覽列置中、寬 = 9.48 個 h1 字（見 .nav-bar），logo 右緣 = 導覽列左緣 + logo 左邊的留白 + logo 圖的寬（高 × 4.859）；
     這一塊和導覽列一樣置中，所以中線 = 50%，左欄寬 = 50% − 半個導覽列 + logo 右緣的位置 */
  --nav-half: calc(var(--fs-h1) * 4.74);
  --logo-right: calc(clamp(18px, 1.8vw, 28px) + clamp(18px, 1.92vw, 27px) * 4.859);
  grid-template-columns: calc(50% - var(--nav-half) + var(--logo-right)) minmax(0, 720px);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
  color: var(--maroon);
}
@media (max-width: 860px) {
  .contact-layout { grid-template-columns: 1fr; }
}
/* 左欄的標題：GET IN / TOUCH 兩行，下面是「聯絡我們」，整組靠右（貼近右邊的表單）。
   不做 sticky：跟著表單一起捲，頂端永遠和表單卡片的上緣對齊 */
.contact-title {
  font-size: var(--fs-h1);
  font-weight: 200;                                    /* 細體，和 MENU 的英文同一個樣子 */
  letter-spacing: 0;
  text-align: right;
  color: #5d0000;                                     /* 磚紅（和表單後面那團色光同色） */
}
/* 字距會在最後一個字後面多留一段空白，靠右時「聯絡我們」就對不齊 TOUCH 的右緣：抵銷掉 */
.contact-title small { margin-right: -.2em; }

/* 玻璃後面的色光：三團很大、很糊的光，慢慢飄。玻璃才有東西可以透、可以糊開 */
.contact-glow {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  animation: glow-drift 22s ease-in-out infinite alternate;
}
.contact-glow--a {
  width: 46vw; height: 46vw; max-width: 620px; max-height: 620px;
  right: -6%; top: 2%;
  background: rgba(127, 85, 245, .42);          /* 品牌紫 */
}
.contact-glow--b {
  width: 34vw; height: 34vw; max-width: 460px; max-height: 460px;
  right: 30%; top: 38%;
  background: rgba(93, 0, 0, .22);                /* 深酒紅 #5d0000 */
  animation-duration: 26s;
  animation-direction: alternate-reverse;
}
.contact-glow--c {
  width: 30vw; height: 30vw; max-width: 420px; max-height: 420px;
  right: 2%; bottom: -4%;
  background: rgba(255, 170, 120, .45);         /* 暖桃色 */
  animation-duration: 30s;
}
@keyframes glow-drift {
  to { transform: translate(-6%, 8%) scale(1.08); }
}

/* 共用的玻璃質感：圓角 + 一圈清楚的 1px 亮邊，輪廓俐落 */
.cf-glass {
  border: 1px solid rgba(255, 255, 255, .75);
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, 0) 60%),
    rgba(255, 255, 255, .28);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  backdrop-filter: blur(28px) saturate(170%);
  box-shadow: 0 30px 60px -30px rgba(26, 26, 26, .28);
}
@supports not (backdrop-filter: blur(1px)) {
  .cf-glass { background: rgba(255, 255, 255, .85); }
}

.contact-form {
  position: relative;
  border-radius: 28px;
  font-family: var(--font-sans);
  overflow: hidden;                   /* 分隔線要貼齊圓角的外框 */
  /* 對話框的尾巴：從右下角往右下伸出去多少（和首頁的大卡片一樣） */
  --tail-x: 12px;
  --tail-y: 16px;
}
/* 做成對話框（JS 算好形狀之後才加上 .is-bubble，見 site.js 的 shapeFormBubble）：
   外框往右、往下多撐出尾巴的大小（往右吃進邊距，表單本體仍和原本對齊），
   形狀用 clip-path 切；clip-path 會切掉 border 和 box-shadow，
   所以亮邊（.cf-bubble-rim）和影子（.cf-bubble-shadow）改用 SVG 沿同一條形狀畫 */
.contact-form.is-bubble {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin-right: calc(-1 * var(--tail-x));
  padding: 0 var(--tail-x) var(--tail-y) 0;
}
.cf-bubble-rim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.cf-bubble-shadow {
  position: absolute;
  pointer-events: none;
}

/* 分區：每一區之間一條橫貫整個面板的分隔線。
   深色細線 + 緊貼在下的一條亮線，像刻在玻璃上的線，邊緣俐落 */
.cf-section { padding: clamp(1.4rem, 3vw, 2.1rem) clamp(1.4rem, 3.2vw, 2.4rem); }
.cf-section + .cf-section {
  border-top: 1px solid rgba(26, 26, 26, .1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75);
}
.cf-section__title {
  display: flex;
  align-items: baseline;
  gap: .4em;
  margin: 0 0 1.1rem;
  padding: 0;
  font-size: var(--fs-body);                           /* 和輸入框的字一樣大，靠粗細區分 */
  font-weight: 800;
  letter-spacing: .04em;
}
.cf-section__title label { cursor: pointer; }

.cf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem 1rem;
}
@media (max-width: 560px) {
  .cf-grid { grid-template-columns: 1fr; }
}
.cf-field { min-width: 0; }
.cf-field--full { grid-column: 1 / -1; }
fieldset.cf-field { margin: 0; padding: 0; border: 0; }

.cf-label {
  display: block;
  margin-bottom: .5em;
  padding: 0;
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: .04em;
}
.cf-req { margin-left: .2em; color: var(--brand); }
.cf-hint { margin-left: .2em; font-weight: 500; opacity: .6; }

/* 欄位：內層的小玻璃方塊，同樣是圓角 + 清楚的亮邊 */
/* 輸入框：不用外框線，做成「凹進表面」的樣子——
   底色比表單深一階，上緣一道往內的淡陰影，下緣一條很細的亮邊（像凹槽的下緣吃到光） */
.cf-input {
  --sunk: inset 0 1.5px 4px rgba(60, 20, 90, .14), inset 0 -1px 0 rgba(255, 255, 255, .55);
  box-sizing: border-box;
  width: 100%;
  padding: .6em 1em;
  border: 0;
  border-radius: 12px;
  background: rgba(70, 30, 110, .07);
  box-shadow: var(--sunk);
  color: var(--maroon);
  font: inherit;
  font-size: var(--fs-body);
  transition: background-color .25s ease, box-shadow .25s ease;
}
/* 提示字（placeholder）用 small，比打進去的字小一級 */
.cf-input::placeholder { color: rgba(26, 26, 26, .38); font-size: var(--fs-small); }
.cf-input:hover { background: rgba(70, 30, 110, .1); }
.cf-input:focus {
  outline: none;
  background: rgba(70, 30, 110, .05);
  box-shadow: var(--sunk), 0 0 0 3px rgba(127, 85, 245, .22);
}
.cf-textarea { resize: vertical; min-height: 8.5em; line-height: 1.7; }
.cf-field.is-invalid .cf-input { box-shadow: var(--sunk), inset 0 0 0 1px rgba(200, 30, 30, .55); }

.cf-error {
  min-height: 1.2em;
  margin: .35em 0 0 .3em;
  font-size: var(--fs-small);
  color: #c01e1e;
}
.cf-error:empty { min-height: 0; margin: 0; }

/* 諮詢項目：一排等寬的方塊（可複選），像參考圖的 Skills */
.cf-tile-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: .7rem;
}
.cf-tile { position: relative; cursor: pointer; }
.cf-tile input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.cf-tile span {
  box-sizing: border-box;
  display: grid;
  place-items: center;
  min-height: 5.5rem;
  padding: .9em .6em;
  border: 0;
  border-radius: 16px;
  /* 和輸入框一樣「凹進表面」：底色深一階、上緣內陰影、下緣細亮邊 */
  background: rgba(70, 30, 110, .07);
  box-shadow: inset 0 1.5px 4px rgba(60, 20, 90, .14), inset 0 -1px 0 rgba(255, 255, 255, .55);
  font-size: var(--fs-small);
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  transition: background-color .25s ease, color .25s ease, box-shadow .25s ease, transform .2s ease;
}
.cf-tile:hover span { background: rgba(70, 30, 110, .1); }
/* 選取：填滿深灰，仍保留凹下去的陰影（像被按下去） */
.cf-tile input:checked + span {
  background: var(--maroon);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .35), inset 0 -1px 0 rgba(255, 255, 255, .12);
  color: var(--cream);
}
.cf-tile input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 3px; }
.cf-tile:active span { transform: scale(.97); }

.cf-consent-row { margin-top: 1.25rem; }

/* 同意勾選 */
.cf-consent {
  display: inline-flex;
  align-items: center;
  gap: .7em;
  font-size: var(--fs-small);
  font-weight: 600;
  cursor: pointer;
}
.cf-consent input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cf-check {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 1.4em;
  height: 1.4em;
  border-radius: 7px;
  background: rgba(255, 255, 255, .6);
  box-shadow: inset 0 0 0 1px rgba(26, 26, 26, .18);
  transition: background-color .2s ease;
}
.cf-check::after {
  content: "";
  width: .35em;
  height: .65em;
  margin-top: -.12em;
  border: solid var(--cream);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform .2s cubic-bezier(.34, 1.56, .64, 1);
}
.cf-consent input:checked + .cf-check { background: var(--maroon); box-shadow: none; }
.cf-consent input:checked + .cf-check::after { transform: rotate(45deg) scale(1); }
.cf-consent input:focus-visible + .cf-check { outline: 2px solid var(--brand); outline-offset: 3px; }
.cf-link {
  margin: 0 .15em;
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* 送出：深灰膠囊，右邊一顆圓形箭頭按鈕（參考圖那種圓鈕） */
.cf-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 1.5rem;
  padding: .5rem .5rem .5rem 1.75rem;
  border: 0;
  border-radius: 999px;
  background: var(--maroon);
  color: var(--cream);
  font: inherit;
  font-size: var(--fs-body);
  font-weight: 700;
  letter-spacing: .12em;
  cursor: pointer;
  transition: background-color .3s ease;
}
.cf-submit:hover { background: var(--brand); }   /* hover 換成品牌紫（和 logo 同色） */
.cf-submit:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.cf-submit__icon {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: rgba(255, 249, 242, .16);
  font-size: 1.1rem;
  transition: transform .3s cubic-bezier(.16, 1, .3, 1);
}
.cf-submit:hover .cf-submit__icon { transform: translateX(3px); }
/* 送出中：按鈕變淡、不能再按（避免重複送出） */
.cf-submit:disabled { opacity: .6; cursor: progress; }
.cf-submit:disabled:hover { background: var(--maroon); }
.cf-submit:disabled .cf-submit__icon { transform: none; }
/* 送出失敗的訊息（在按鈕下面） */
.cf-status { margin: .8em 0 0; font-size: var(--fs-small); color: #c01e1e; text-align: center; }
.cf-status:empty { display: none; }
/* 防機器人的隱藏欄位：移到畫面外（不用 display:none，有些機器人會略過看不見的欄位） */
.cf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* 送出後的畫面 */
.contact-form.is-done .cf-section { display: none; }
.cf-done { padding: 3.5rem 2rem; text-align: center; }
.cf-done__title { margin: 0; font-size: var(--fs-h2); font-weight: 800; }
.cf-done__text { margin: .6em 0 0; opacity: .7; }

/* 個資蒐集告知聲明：玻璃彈窗 */
.cf-dialog {
  width: min(560px, calc(100vw - 2rem));
  max-height: min(70vh, 640px);
  padding: 2rem 2rem 1.75rem;
  border: 0;
  border-radius: 28px;
  color: var(--maroon);
  font-family: var(--font-sans);
  overflow: auto;
}
.cf-dialog::backdrop {
  background: rgba(26, 26, 26, .12);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.cf-dialog__title { margin: 0 2rem .8em 0; font-size: var(--fs-h3); font-weight: 800; }
.cf-dialog__body { font-size: var(--fs-small); line-height: 1.8; }
.cf-dialog__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.4rem;
  height: 2.4rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .55);
  color: var(--maroon);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.cf-dialog__close:hover { background: rgba(255, 255, 255, .85); }

@media (prefers-reduced-motion: reduce) {
  .nav-icon, .nav-icon > *, .takeover, .takeover__bg, .takeover__item { transition: none !important; }
  .contact-page .page-enter { animation: none; }
  .contact-glow { animation: none; }
}

/* 個資蒐集告知聲明：編號清單（第二層用小寫英文字母）、段落間距 */
.cf-dialog__body p { margin: 0 0 1em; }
.cf-dialog__body ol { margin: 0 0 1em; padding-left: 1.4em; }
.cf-dialog__body li { margin-bottom: .6em; }
.cf-dialog__body ol ol { margin: .5em 0 0; list-style: lower-alpha; }
.cf-dialog__body ol ol li { margin-bottom: .2em; }

/* ── 頁尾（首頁、KOL、聯絡頁共用）─────────────────────
   版面照 inly.com.tw：左邊 logo＋公司資料，右邊四欄連結；下面一條細線，版權與社群圖示。
   底色換成比頁面亮一階的深灰，和上面的深色頁面分得開、又不會跳 */
.site-footer {
  --foot-bg: #2a292e;
  position: relative;
  z-index: 3;
  padding: clamp(56px, 7vw, calc(88 * var(--u))) var(--gutter) clamp(28px, 3.5vw, calc(40 * var(--u)));
  background: var(--foot-bg);
  color: rgba(255, 249, 242, .62);
  font-family: var(--font-sans);
  font-size: var(--fs-small);
  line-height: 1.75;
}
.site-footer a {
  color: inherit;
  text-decoration: none;
  transition: color .2s ease;
}
.site-footer a:hover,
.site-footer a:focus-visible { color: var(--fg); }
.site-footer a:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 2px; }
/* 頁尾裡面的內容和各頁內容一樣寬：最寬 1600，置中（背景色還是滿版） */
.site-footer__top,
.site-footer__bottom { max-width: calc(1600 * var(--u)); margin-inline: auto; }
.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 48px clamp(40px, 6vw, calc(96 * var(--u)));
}
.site-footer__logo { display: inline-block; line-height: 0; margin-bottom: 20px; }
.site-footer__logo img { height: clamp(26px, 2.4vw, calc(34 * var(--u))); width: auto; }
.site-footer__brand p { margin: 0; }
.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 32px clamp(32px, 4vw, calc(64 * var(--u)));
}
.site-footer h2 {
  margin: 0 0 12px;
  color: var(--fg);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: .04em;
}
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li + li { margin-top: 6px; }
.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: clamp(40px, 5vw, calc(64 * var(--u)));
  padding-top: 24px;
  border-top: 1px solid rgba(255, 249, 242, .1);
  font-size: var(--fs-small);
}
.site-footer__bottom p { margin: 0; color: rgba(255, 249, 242, .45); }
.site-footer__social { display: flex; gap: 12px; }
.site-footer__social a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 249, 242, .06);
  transition: color .2s ease, background-color .2s ease;
}
.site-footer__social a:hover { background: rgba(255, 249, 242, .12); }
.site-footer__social svg { width: 18px; height: 18px; }
@media (max-width: 760px) {
  .site-footer__cols { grid-template-columns: repeat(2, auto); }
}
