/* 庭序室內設計（mock v1）：首頁＋內頁共用
   設計依據：brand/design-spec.md。斷點只用 max-width 991／767／478；以桌面為基礎往下覆寫。 */

/* 字型：未來熒黑的 @font-face 在 fonts.css（切塊，每頁 <link> 在 styles.css 前面） */

/* 變數 */
:root {
  --color-surface: #FFFFFF;
  --color-tint: #F1F5F7;
  --color-mark: #EEF3F6;
  --color-mist-pale: #F6F9FA;
  --color-mist-light: #D5E4EE;
  --color-primary: #4A7289;
  --color-primary-dark: #34495A;
  --color-gradient-start: #2E5B86;
  --color-gradient-mid: #4F86B0;
  --color-gradient-end: #86B4D3;
  /* 標題與主要按鈕：深藍→天藍漸層（參考 worldftl，不要綠色） */
  --gradient-brand: linear-gradient(90deg, var(--color-gradient-start), var(--color-gradient-mid) 50%, var(--color-gradient-end));
  /* 按鈕上有白字：兩端同標題，中段壓深往右推，字（約 15–70% 寬）對比 ≥ 4.5:1，淺色只在箭頭後面 */
  --gradient-button: linear-gradient(90deg, var(--color-gradient-start), #3F7099 65%, var(--color-gradient-end));
  --gradient-button-hover: linear-gradient(90deg, #264D73, #36658D 65%, #74A4C4);
  /* 頁尾背景：角度與色調照 worldftl 的頁尾；加深到最淺角的淡霧藍小字也 ≥ 4.5:1 */
  --gradient-contact: linear-gradient(20deg, #4F738D, #3E6185);
  --color-body-text: #2A2E31;
  --color-heading-text: #2A2E31;
  --color-muted: #677179;
  --color-faint: #D5DCE1;
  --color-tab-idle: #9AA3AA;
  --color-divider: #E1E6EA;
  --color-error: #B4533C; /* 表單沒填的提醒：偏暖的磚紅，不用正紅；白底約 5:1 */
  --color-on-primary: #EEF3F6;
  --color-notice: rgb(0 0 0 / 0.6); /* 作品聲明的底：照青衡 */
  --color-on-primary-line: rgba(255, 255, 255, 0.3);
  --color-white: #FFFFFF;
  --color-black: #1A2026;
  --color-shade: rgba(74, 58, 44, 0.2);
  --color-shade-strong: rgba(74, 58, 44, 0.22);
  --color-shade-none: rgba(74, 58, 44, 0);
  --color-shade-text: rgba(74, 58, 44, 0.45);
  --color-shade-edge: rgba(74, 58, 44, 0.35);
  --color-header: rgba(255, 255, 255, 0.94);
  --color-text-shadow: rgba(74, 58, 44, 0.45);
  --color-glass-hover: rgba(255, 255, 255, 0.16);
  /* 手機選單：主色半透明＋毛玻璃（照青衡 v5） */
  --color-nav-wash: rgba(74, 114, 137, 0.86);

  /* 字體（見 修改/2026-11-16-字體.md）：中文未來熒黑（缺「告值真教清填慎鎮顛巔」由思源黑體補）、
     英文大標 Expletus Sans、英文小字與編號 Figtree */
  --font-sans: "Glow Sans TC", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-en: "Figtree", "Noto Sans TC", sans-serif;
  --font-display: "Expletus Sans", "Figtree", sans-serif;

  /* 字級 6 級：heading-1 大標題、heading-2 副標、heading-3 小標題、m 內文、s 小字、xs 註記 */
  --font-size-xs: 0.75rem;
  --font-size-s: 0.875rem;
  --font-size-m: 1rem;
  --font-size-button: 0.875rem; /* 膠囊按鈕：桌面手機都 14，不跟著 s 縮到 13 */
  --font-size-heading-1: clamp(1.75rem, 0.8929rem + 1.7857vw, 2.5rem);
  --font-size-heading-2: clamp(1.1875rem, 0.9732rem + 0.4464vw, 1.375rem);
  --font-size-heading-3: clamp(1.0625rem, 0.9911rem + 0.1488vw, 1.125rem);
  /* 展示字：英文區段大標（每區一樣大） */
  --font-size-en-title: clamp(3.5rem, 0.6429rem + 5.9524vw, 6rem);
  --font-size-number: 3.5rem;

  /* 最小值 56：手機白底區段之間是兩份疊加，64 偏空；中間公式與最大值照原本，平板桌面不受影響 */
  --space-section: clamp(3.5rem, -1.4286rem + 11.3095vw, 8.75rem);
  --space-section-s: clamp(3rem, -0.4286rem + 7.1429vw, 6rem);
  --space-heading: clamp(2rem, 0.2857rem + 3.5714vw, 3.5rem);
  --space-after-head: clamp(3rem, 1.2857rem + 3.5714vw, 4.5rem); /* 內頁標題區細線到內容：比區段留白近，標題跟內容是同一件事 */
  --space-l: 2.5rem;
  /* 卡片格的間距（作品案例、最新消息）；≤ 991 兩欄時 40 */
  --space-grid: 3.5rem;
  /* 內容最寬（作品案例、最新消息置中的寬度） */
  --wide: 80rem;
  --wide-l: 95rem; /* 比 --wide 寬一級：服務流程（2026-11-19 從全寬收進 1520） */
  /* 左右留白照 Bright Avenue：電腦 40px 起、1920 寬 50px；≤ 991 另外設定 */
  --gutter: clamp(2.5rem, 0.625rem + 2.0833vw, 3.125rem);
  --measure: 38rem;
  --header-height: 5.5rem;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* 平板與手機：20px（手機）漸增到約 27px（991 寬）；參考站手機 16px，中文多留 4px */
@media (max-width: 991px) {
  :root {
    --gutter: clamp(1.25rem, -0.1786rem + 2.9762vw, 2.5rem);
    --space-grid: 2.5rem;
  }
}

/* 手機：內文 15px、小字 13px（內文字級直接切換，不做流動） */
@media (max-width: 767px) {
  :root {
    --font-size-m: 0.9375rem;
    --font-size-s: 0.8125rem;
    --font-size-number: 2.5rem;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  background: var(--color-surface);
  color: var(--color-body-text);
  font-family: var(--font-sans);
  font-size: var(--font-size-m);
  line-height: 1.8;
  letter-spacing: 0.05em;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}

/* 斷行：段落避免最後一行只剩一兩個字，標題與短句各行平均 */
p,
dd {
  text-wrap: pretty;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

/* 一組字不要拆開，斷行只落在組和組之間（逗號後面）；自動斷行不懂詞語，會拆成「晚／上」「設／計費」 */
.nowrap {
  white-space: nowrap;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

::selection {
  background: var(--color-primary);
  color: var(--color-white);
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

/* 跳到主要內容：用鍵盤的人第一下 Tab 出現，跳過選單（照 dev-tools 起手主題） */
.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  background: var(--color-white);
  color: var(--color-heading-text);
  font-size: var(--font-size-s);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

main:focus {
  outline: none;
}

/* 深色底上（頁尾漸層、首屏照片上的頁首）深藍框看不到，改白框 */
.site-footer :focus-visible,
.site-header:not(.is-solid) :focus-visible {
  outline-color: var(--color-white);
}

.svg-defs {
  position: absolute;
}

/* 共用：區段標題、按鈕 */
/* 區段標題（大）：中文副標＋英文大字漸層，照 worldftl。用在關於庭序、作品案例、服務流程、最新消息。
   rules/品味規則.md「不要放大成展示字」的例外：使用者明確要日系形象頁的大標題。 */
.section-sub {
  margin-bottom: 1rem;
  font-size: var(--font-size-heading-3);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.05em;
  color: var(--color-primary);
}

.section-en {
  width: fit-content;
  max-width: 100%;
  font-family: var(--font-display);
  font-size: var(--font-size-en-title);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--color-gradient-start);
  background-image: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-l);
  padding-inline: var(--gutter);
  margin-bottom: var(--space-heading);
}

/* 手機：「看全部」移到標題下面，不然標題會被擠到斷行 */
@media (max-width: 767px) {
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.75rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: var(--font-size-button);
  font-weight: 500;
  letter-spacing: 0.06em;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

/* 次要按鈕：平常淺灰細框，滑過漸層實心淡入（漸層不能 transition，用 ::before 的透明度） */
.button--quiet {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-color: var(--color-faint);
  color: var(--color-muted);
  transition: color 0.35s, border-color 0.35s;
}

.button--quiet::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  background: var(--gradient-button);
  opacity: 0;
  transition: opacity 0.35s;
}

.button--quiet:hover,
.button--quiet:focus-visible {
  border-color: transparent;
  color: var(--color-white);
}

.button--quiet:hover::before,
.button--quiet:focus-visible::before {
  opacity: 1;
}

.button--small {
  min-height: 2.5rem;
  padding: 0 1.375rem;
}

/* 漸層從邊框外緣畫（border-box），不然透明邊框那 1px 會重複出另一端的顏色 */
.button--primary {
  background: var(--color-gradient-start) var(--gradient-button) border-box;
  color: var(--color-white);
}

.button--primary:hover {
  background: var(--color-primary-dark) var(--gradient-button-hover) border-box;
}

/* 頁首 */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  color: var(--color-white);
  transition: background-color 0.3s, color 0.3s, box-shadow 0.3s, transform 0.4s var(--ease-out);
  animation: hero-fade 0.8s ease 1.7s backwards;
}

/* 離開首屏後往下捲藏起來、往上捲出現（照 Bright Avenue；畫面不被頁首切掉） */
.site-header.is-hidden {
  transform: translateY(-100%);
}

/* 頁首還透明、疊在照片上時：文字加淡陰影，亮的窗簾前也看得清楚 */
.site-header:not(.is-solid) :is(.site-logo, .primary-nav__list) {
  text-shadow: 0 1px 10px var(--color-text-shadow), 0 0 3px var(--color-shade-edge);
}

/* 頁首透明、疊在首屏照片上時：預約按鈕改透明底＋白字白框；頁首變白底後才用漸層 */
.site-header:not(.is-solid) .site-header__cta {
  background: transparent;
  border-color: var(--color-white);
  color: var(--color-white);
  text-shadow: 0 1px 10px var(--color-text-shadow);
}

.site-header:not(.is-solid) .site-header__cta:hover {
  background: var(--color-glass-hover);
}

.site-header.is-solid {
  background: var(--color-header);
  color: var(--color-heading-text);
  box-shadow: 0 1px 0 var(--color-divider);
}

/* 內頁：頁首不等首屏動畫；在最上面時透明，跟標題區的淡底連成一塊（照 STAGE Lab） */
.page-inner .site-header {
  animation: none;
}

.site-header.is-top {
  background: transparent;
  box-shadow: none;
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: var(--header-height);
  padding-inline: var(--gutter);
}

.site-logo {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 2.75rem;
  line-height: 1.2;
  margin-right: auto;
}

.site-logo__name {
  font-size: 1.25rem; /* 固定：Logo，不算字級系統 */
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* Logo 中文是 SVG（未來熒黑 Bold 轉的路徑）：Logo 固定不變，不用為了 6 個字下載 700 字重的切塊（約 110KB）；
   高 1.2em＝原本文字的行高，寬照 viewBox（每字 1.08em＝字寬＋0.08em 字距），顏色跟著文字 */
.logo-text {
  display: block;
  width: auto;
  height: 1.2em;
  fill: currentColor;
}

.site-logo__en {
  font-family: var(--font-en);
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.2em;
}

.primary-nav {
  position: static;
  inset: auto;
  display: flex;
  align-items: center;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  overflow: visible;
}

/* 選單 16px（14px 偏小） */
.primary-nav__list {
  display: flex;
  gap: 2rem;
  font-size: var(--font-size-m);
  font-weight: 500;
}

.primary-nav__list a {
  display: block;
  padding-block: 0.75rem;
  position: relative;
  transition: opacity 0.3s;
}

/* 滑過時字變淡 */
.primary-nav__list a:hover {
  opacity: 0.6;
}

.primary-nav__list a[aria-current] {
  color: var(--color-gradient-start);
}

.primary-nav__close,
.site-header__toggle {
  display: none;
}

@media (max-width: 991px) {
  :root {
    --header-height: 4rem;
  }

  .site-header__inner {
    gap: 0.75rem;
  }

  .site-header__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
  }

  /* 手機選單照青衡 v5：全螢幕深色毛玻璃、白字，選項由下往上依序滑出，關閉鈕兩條線轉成 X */
  .primary-nav {
    position: fixed;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    height: 100%;
    padding: 5rem var(--gutter) 2.5rem;
    background: var(--color-nav-wash);
    -webkit-backdrop-filter: blur(1.5rem);
    backdrop-filter: blur(1.5rem);
    color: var(--color-white);
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.4s var(--ease-out), display 0.4s allow-discrete, overlay 0.4s allow-discrete;
  }

  .primary-nav:popover-open {
    display: flex;
    opacity: 1;
  }

  @starting-style {
    .primary-nav:popover-open {
      opacity: 0;
    }
  }

  .primary-nav :focus-visible {
    outline-color: var(--color-white);
  }

  /* 首屏上的白字陰影，選單打開時不要 */
  .site-header .primary-nav .primary-nav__list {
    text-shadow: none;
  }

  .primary-nav__close {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0.625rem;
    right: var(--gutter);
    width: 2.75rem;
    height: 2.75rem;
    color: var(--color-white);
  }

  .primary-nav__close path {
    transform-box: fill-box;
    transform-origin: center;
    transition: transform 0.4s var(--ease-out);
  }

  .primary-nav__close path:first-child {
    transform: rotate(45deg);
  }

  .primary-nav__close path:last-child {
    transform: rotate(-45deg);
  }

  @starting-style {
    .primary-nav:popover-open .primary-nav__close path {
      transform: rotate(0);
    }
  }

  .primary-nav__list {
    flex-direction: column;
    gap: 0;
    width: 100%;
    font-size: var(--font-size-heading-2);
  }

  /* 每一項被遮住，一項接一項往上滑出 */
  .primary-nav__list li {
    overflow: hidden;
  }

  .primary-nav__list li:nth-child(2) {
    --menu-index: 1;
  }

  .primary-nav__list li:nth-child(3) {
    --menu-index: 2;
  }

  .primary-nav__list li:nth-child(4) {
    --menu-index: 3;
  }

  .primary-nav__list a {
    padding-block: 1rem;
    border-bottom: 1px solid var(--color-on-primary-line);
    transform: translateY(105%);
    transition: transform 0.55s var(--ease-out), opacity 0.3s;
  }

  /* 手機選單是霧藍底白字，目前這頁不換色 */
  .primary-nav__list a[aria-current] {
    color: inherit;
  }

  .primary-nav:popover-open .primary-nav__list a {
    transform: none;
    transition-delay: calc(0.1s + var(--menu-index, 0) * 0.06s), 0s;
  }

  @starting-style {
    .primary-nav:popover-open .primary-nav__list a {
      transform: translateY(105%);
    }
  }

}

/* 首屏 */
.hero {
  position: relative;
  height: 260svh; /* 捲完首屏動畫要的距離：太長要滑很久，太短太快 */
}

.hero__stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  container-type: size;
  background: var(--color-surface);
}

.hero__shape {
  position: absolute;
  background: var(--color-tint);
  will-change: transform;
}

.hero__shape--left {
  left: 0;
  top: 48cqh;
  width: 12cqw;
  height: 52cqh;
  clip-path: polygon(0 0, 100% 14%, 100% 100%, 0 100%);
}

.hero__shape--right {
  right: 6cqw;
  top: 6cqh;
  width: 22cqw;
  height: 46cqh;
  border-radius: 11cqw 11cqw 0 0;
}

.hero__tile {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 10;
  will-change: left, top, width, height, transform;
}

.hero__whole {
  position: absolute;
  left: 0;
  top: 0;
  width: 100cqw;
  height: 100cqh;
  animation: hero-open-zoom 2.2s var(--ease-out) 0.35s backwards;
}

.hero__whole img,
.hero__own img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__whole img {
  animation: hero-drift 18s ease-in-out 2.4s infinite alternate;
}

.hero__own {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.hero__tile--p05 .hero__own img {
  object-position: 50% 72%;
}

.hero__shade {
  position: absolute;
  inset: 0;
  z-index: 11;
  pointer-events: none;
  background:
    linear-gradient(var(--color-shade), var(--color-shade-none) 24%),
    radial-gradient(70% 75% at 88% 92%, var(--color-shade-strong), var(--color-shade-none) 70%);
}

.hero__cover {
  position: absolute;
  inset: 0;
  z-index: 30;
  background: var(--color-primary);
  pointer-events: none;
  clip-path: inset(0 0 100% 0);
  animation: hero-cover 1.1s cubic-bezier(0.76, 0, 0.24, 1) 0.35s backwards;
}

/* 照片只壓很淡的暖咖啡暗層（近黑色有髒感、深藍灰太藍），字靠同色陰影補清晰度 */
/* 位置：左緣 69.5cqw，底部 8cqh 跟左下地址同一條線。
   用 grid 的空欄推：右邊不夠時空欄先縮，字停在右邊距，不會超出 */
.hero__copy {
  text-shadow: 0 1px 14px var(--color-shade-text);
  position: absolute;
  left: 0;
  right: var(--gutter);
  bottom: 8cqh;
  display: grid;
  grid-template-columns: minmax(0, 69.5cqw) max-content;
  z-index: 20;
  color: var(--color-white);
}

.hero__copy > * {
  grid-column: 2;
}

.hero__title {
  font-size: var(--font-size-heading-1);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.06em;
  margin-bottom: 0.875rem;
  animation: hero-rise 1s var(--ease-out) 1.35s backwards;
}

/* 說明小字：放大加粗，陰影加一圈貼字的淡邊，在亮的地板上也讀得清楚 */
.hero__lead {
  max-width: 30em;
  font-size: var(--font-size-heading-3);
  /* 細一點、行距比內文少 */
  font-weight: 400;
  line-height: 1.7;
  text-shadow: 0 1px 14px var(--color-shade-text), 0 0 3px var(--color-shade-edge);
  animation: hero-rise 1s var(--ease-out) 1.55s backwards;
}

.hero__info {
  text-shadow: 0 1px 14px var(--color-shade-text);
  position: absolute;
  left: var(--gutter);
  bottom: 8cqh; /* 跟標語同一條底線 */
  z-index: 20;
  color: var(--color-white);
  font-size: var(--font-size-xs);
  animation: hero-fade 0.8s ease 1.7s backwards;
}

.hero__intro {
  position: absolute;
  /* 左緣對齊首屏標語（69.5cqw）；這句比標語寬，右邊不夠時往左讓、右邊至少留一個 gutter（只有很寬的螢幕完全對齊） */
  left: min(69.5cqw, 100cqw - var(--gutter) - 10.7 * var(--font-size-heading-1));
  /* 底部對齊餐桌照片 p04 的底（script.js：y 68cqh＋h 11.5cqw）；改 p04 的位置或大小時這裡要一起改 */
  bottom: calc(100cqh - 68cqh - 11.5cqw);
  width: 28cqw;
  z-index: 20;
  opacity: 0;
  will-change: transform, opacity;
}

/* 深黑字；照 <br> 斷成兩行、不自動換行（自動換行時最後幾個字會掉到第三行） */
.hero__intro-title {
  width: fit-content;
  font-size: var(--font-size-heading-1);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.06em;
  white-space: nowrap;
  margin-bottom: 0.75rem;
  color: var(--color-heading-text);
}

.hero__intro-text {
  color: var(--color-muted);
  /* 內文字級（小字太小） */
  font-size: var(--font-size-m);
}

.hero__grid {
  display: none;
}

@keyframes hero-cover {
  from {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes hero-open-zoom {
  from {
    transform: scale(1.12);
  }
}

@keyframes hero-drift {
  to {
    transform: scale(1.07);
  }
}

@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(3rem);
  }
}

@keyframes hero-fade {
  from {
    opacity: 0;
  }
}

@media (max-width: 991px) {
  .hero__copy {
    display: block;
    left: 52cqw;
    bottom: 10cqh;
  }

  .hero__info {
    bottom: 5cqh;
  }

  .hero__intro {
    left: 58cqw;
    width: 36cqw;
  }
}

/* 手機：不拆，4:5 首屏＋下方 2×2 小照片（滿版時只露出橫圖中間約四分之一）。
   照片上只留標語（說明與地址拿掉，地址頁尾有），標語自然換行、置中 */
@media (max-width: 767px) {
  .hero {
    height: auto;
  }

  .hero__stage {
    position: relative;
    height: auto;
    aspect-ratio: 4 / 5;
  }

  .hero__lead,
  .hero__info {
    display: none;
  }

  .hero__title {
    margin-bottom: 0;
  }

  .hero__title br {
    display: none;
  }

  .hero__shape,
  .hero__intro,
  .hero__tile--p02,
  .hero__tile--p03,
  .hero__tile--p04,
  .hero__tile--p05 {
    display: none;
  }

  .hero__shade {
    background:
      linear-gradient(var(--color-shade), var(--color-shade-none) 22%),
      linear-gradient(var(--color-shade-none) 45%, var(--color-shade-strong));
  }

  .hero__copy {
    left: var(--gutter);
    bottom: 12cqh;
    text-align: center; /* 手機標語置中 */
  }

  .hero__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0.5rem var(--gutter) 0;
  }

  .hero__grid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
  }

  .hero__grid li:first-child img {
    border-radius: 50% 50% 0 0 / 38% 38% 0 0;
  }

  .hero__grid li:last-child img {
    border-radius: 50%;
    object-position: 50% 72%;
  }
}

/* 關於庭序：三欄＋中間照片放大（見 index.html 的註解）。
   桌面：區段釘住 350svh（停 2.5 個畫面高）：前 30% 三欄停著讓人讀、30–85% 照片放大、最後 15% 放完停住。
   照片 27.5vw × 80svh → 95vw × 80svh（script.js 設 --w、--p；高度不變），照片裡的圖不縮放、只有框變寬；左右兩欄往外移 p × 150vw、淡掉。
   捲動時不改寬度和位置（會重新排版、重畫大圖，捲起來卡）：照片框固定 95vw、用 clip-path 裁出目前的寬度；左右兩欄和四角記號用 translate 往外推。
   左右兩欄對稱夾著照片：離照片都是 clamp(3rem, 6vw, 8rem)（比例照 ad-hzm）。
   進場：區段上緣到畫面 40% 高時（手機 80%）加 is-in，一次看得到整段：
   ABOUT 和那句從遮罩下面逐行升起（1.1 秒，間隔 0.14 秒）→ 照片淡入（1.2 秒，晚 0.2 秒）→
   右欄一段一段上浮淡入（位移 2.5rem、1 秒，從 0.5 秒起每段晚 0.15 秒）→ 四角記號最後出現（1.3 秒起）。 */
.philosophy {
  --mw: min(var(--w, 27.5vw), 95vw);
  --mh: 80svh;
  --tx: calc(var(--p, 0) * 150vw);
  /* 照片框每邊比一開始多出來的寬度 */
  --grow: calc((var(--mw) - 27.5vw) / 2);
  --gap: clamp(3rem, 6vw, 8rem);
}

.philosophy__pin {
  height: 350svh;
}

.philosophy__stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
}

/* 中間照片與四角記號 */
.philosophy__media,
.philosophy__frame {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 27.5vw;
  height: var(--mh);
  transform: translate(-50%, -50%);
}

.philosophy__media {
  width: 95vw;
  overflow: hidden;
  clip-path: inset(0 calc((95vw - var(--mw)) / 2));
  opacity: 0;
  transition: opacity 1.2s ease 0.2s;
}

.is-in .philosophy__media {
  opacity: 1;
}

/* 圖照最寬時的比例完整放（比框高時上下超出、被框裁掉），縮放才不會露出空隙 */
.philosophy__img {
  position: absolute;
  top: 50%;
  left: 0;
  display: block;
  width: 100%;
  height: max(100%, 95vw * 940 / 1672);
  object-fit: cover;
  translate: 0 -50%;
  scale: var(--s, 1);
}

.philosophy__frame {
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease 1.3s;
}

.is-in .philosophy__frame {
  opacity: 1;
}

.philosophy__frame i {
  position: absolute;
  width: 0.75rem;
  height: 0.75rem;
  border: 0 solid var(--color-gradient-mid);
  opacity: calc(1 - var(--p, 0) * 3);
}

.philosophy__frame i:nth-child(1) {
  top: -0.625rem;
  left: -0.625rem;
  border-width: 1px 0 0 1px;
}

.philosophy__frame i:nth-child(2) {
  top: -0.625rem;
  right: -0.625rem;
  border-width: 1px 1px 0 0;
}

.philosophy__frame i:nth-child(3) {
  bottom: -0.625rem;
  left: -0.625rem;
  border-width: 0 0 1px 1px;
}

.philosophy__frame i:nth-child(4) {
  bottom: -0.625rem;
  right: -0.625rem;
  border-width: 0 1px 1px 0;
}

.philosophy__frame i:nth-child(odd) {
  translate: calc(var(--grow) * -1) 0;
}

.philosophy__frame i:nth-child(even) {
  translate: var(--grow) 0;
}

/* 左欄：副標＋ABOUT（同其他區的區段標題）＋一句話，靠照片、垂直置中；放大時往左滑走 */
.philosophy__left {
  position: absolute;
  top: 50%;
  right: calc(50% + 13.75vw + var(--gap));
  width: max-content;
  opacity: calc(1 - var(--p, 0) * 2);
  transform: translateY(-50%);
  translate: calc((var(--grow) + var(--tx)) * -1) 0;
  will-change: translate, opacity;
}

.philosophy__left .section-sub {
  margin-bottom: 0.75rem;
}

/* 逐行升起：外層遮住，裡面的字從下面升上來 */
.philosophy__mask {
  overflow: hidden;
}

.philosophy__mask > * {
  translate: 0 110%;
  transition: translate 1.1s var(--ease-out);
}

.philosophy__mask + .philosophy__mask > * {
  transition-delay: 0.14s;
}

.is-in .philosophy__mask > * {
  translate: 0 0;
}

.philosophy__left > :not(.philosophy__mask) {
  opacity: 0;
  transition: opacity 0.8s ease 0.45s;
}

.is-in .philosophy__left > :not(.philosophy__mask) {
  opacity: 1;
}

.philosophy__left .section-en {
  padding-bottom: 0.08em;
}

.philosophy__catch {
  margin-top: 1.625rem;
  font-size: var(--font-size-heading-2);
  font-weight: 500;
  line-height: 1.8;
  letter-spacing: 0.06em;
  color: var(--color-heading-text);
}

/* 右欄：短行內文（照截圖手動斷行、行高寬，16px 跟全站內文一致），第一段公司名 22px 跟左欄那句同大；放大時往右滑走 */
.philosophy__right {
  position: absolute;
  top: 50%;
  left: calc(50% + 13.75vw + var(--gap));
  font-size: var(--font-size-m);
  line-height: 2.4;
  color: var(--color-muted);
  opacity: calc(1 - var(--p, 0) * 2);
  transform: translateY(-50%);
  translate: calc(var(--grow) + var(--tx)) 0;
  will-change: translate, opacity;
}

.philosophy__right p + p {
  margin-top: 1.75em;
}

.philosophy__right p {
  opacity: 0;
  translate: 0 2.5rem;
  transition:
    opacity 0.8s ease 0.5s,
    translate 1s var(--ease-out) 0.5s;
}

.philosophy__right p:nth-child(2) {
  transition-delay: 0.65s;
}

.philosophy__right p:nth-child(3) {
  transition-delay: 0.8s;
}

.philosophy__right p:nth-child(4) {
  transition-delay: 0.95s;
}

.is-in .philosophy__right p {
  opacity: 1;
  translate: 0 0;
}

.philosophy__lead {
  font-size: var(--font-size-heading-2);
  font-weight: 500;
  line-height: 1.8;
  color: var(--color-heading-text);
}

/* 平板與手機：不釘住，上下排：副標標題 → 照片 → 內文；進場同桌面 */
@media (max-width: 991px) {
  .philosophy {
    padding-block: var(--space-section);
    padding-inline: var(--gutter);
  }

  .philosophy__pin {
    height: auto;
  }

  .philosophy__stage {
    position: static;
    display: grid;
    gap: var(--space-heading);
    max-width: 40rem;
    height: auto;
    margin-inline: auto;
    overflow: visible;
  }

  .philosophy__media,
  .philosophy__frame,
  .philosophy__left,
  .philosophy__right {
    position: static;
    width: auto;
    height: auto;
    margin-top: 0;
    transform: none;
  }

  .philosophy__left,
  .philosophy__right {
    opacity: 1;
    translate: 0;
    will-change: auto;
  }

  .philosophy__frame {
    display: none;
  }

  .philosophy__media {
    order: 1;
    aspect-ratio: 4 / 5;
    clip-path: none;
  }

  .philosophy__img {
    position: static;
    height: 100%;
    translate: none;
    scale: 1;
  }

  .philosophy__left {
    order: 0;
  }

  .philosophy__right {
    order: 2;
  }

  .philosophy__catch {
    margin-top: 1.25rem;
  }
}

/* 手機：內文不照 <br> 斷行，全寬自然換行；行高 2.4 是配一行一短句的，段落用 2；句尾短詞在 HTML 包 .nowrap */
@media (max-width: 767px) {
  .philosophy__right {
    line-height: 2;
  }

  .philosophy__right br {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .philosophy__mask > *,
  .philosophy__left > :not(.philosophy__mask),
  .philosophy__right p,
  .philosophy__media,
  .philosophy__frame {
    opacity: 1;
    translate: 0 0;
    transition: none;
  }
}

/* 作品案例：卡片格＋分類 */
.cases {
  padding-block: var(--space-section);
}

/* 分類：字前面一個圓圈，沒選空心、選中品牌漸層實心（2026-11-19 從底線改：列表頁標題區已有一條細線，底線重複；
   形狀＋顏色兩種差別，選中比底線清楚） */
.cases__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2.5rem;
}

.cases__tab {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.25rem 0;
  font-size: var(--font-size-heading-3);
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--color-tab-idle);
  transition: color 0.3s;
}

/* 10px 圓圈、1.5px 框（8px 實心點試過，選中不夠明顯） */
.cases__tab::before {
  content: "";
  flex: none;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--color-tab-idle);
  transition: box-shadow 0.3s;
}

.cases__tab:hover {
  color: var(--color-muted);
}

.cases__tab:hover::before {
  box-shadow: inset 0 0 0 1.5px var(--color-muted);
}

.cases__tab[aria-pressed="true"] {
  color: var(--color-gradient-start);
}

.cases__tab[aria-pressed="true"]::before {
  background: var(--gradient-brand);
  box-shadow: none;
}

/* 照日系網站：最寬 1280px 置中、固定三欄、卡片間距 56px（大螢幕也三欄） */
.cases .section-head,
.cases__grid {
  padding-inline: max(var(--gutter), (100% - var(--wide)) / 2);
}

.cases__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-grid);
}

.cases__more {
  display: flex;
  justify-content: center;
  margin-top: 3.25rem;
}

.cases__more .button {
  min-width: 13.5rem;
}

/* 有案例內頁的卡片：整張可以點（連結蓋滿卡片），滑過案名變主色 */
.case-card {
  position: relative;
}

.case-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.case-card__link {
  transition: color 0.3s;
}

.case-card:hover .case-card__link {
  color: var(--color-gradient-start);
}

.case-card[hidden] {
  display: none;
}

.case-card__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.case-card__type {
  margin-top: 1.1rem;
  font-size: var(--font-size-s);
  color: var(--color-primary);
}

.case-card__title {
  margin-top: 0.25rem;
  font-size: var(--font-size-heading-3);
  font-weight: 500;
  line-height: 1.6;
}

.case-card__text {
  margin-top: 0.4rem;
  font-size: var(--font-size-s);
  color: var(--color-muted);
}

.case-card__specs {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--color-divider);
  font-size: var(--font-size-s);
  color: var(--color-muted);
}

@media (max-width: 991px) {
  .cases .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .cases__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 平板與手機：點擊高度至少 44px */
@media (max-width: 991px) {
  .site-header__cta {
    min-height: 2.75rem;
  }

  .cases__tab {
    min-height: 2.75rem;
  }
}

/* 手機：分類一排左右滑，卡片一欄 */
@media (max-width: 767px) {
  .cases__tabs {
    flex-wrap: nowrap;
    gap: 1.75rem;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .cases__tab {
    flex: none;
    min-height: 2.75rem;
  }

  .cases__grid {
    grid-template-columns: 1fr;
  }
}

/* 內頁標題區：白底，標題靠左、麵包屑在右下（照 Bright Avenue、ReBITA：列表頁與案例頁同一個結構，只換文字）；
   淡霧藍底試過，沒有照片的一大塊淡底顯得空、使用者覺得醜 */
.page-head {
  padding-top: calc(var(--header-height) + clamp(3rem, 1.6rem + 4vw, 5.5rem));
}

/* 標題區下緣一條細線（跟內容寬度同寬），線上 48、線下接內容 --space-after-head */
/* 標題佔滿整行；麵包屑只跟最後一列（一句話或日期）並排，不吃標題的寬 */
.page-head__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "sub   sub"
    "title title"
    "lead  crumbs";
  align-items: end;
  column-gap: 2rem;
  margin-inline: max(var(--gutter), (100% - var(--wide)) / 2);
  padding-bottom: clamp(2rem, 1.4rem + 1.6vw, 3rem);
  border-bottom: 1px solid var(--color-divider);
}

.page-head__inner > .section-sub {
  grid-area: sub;
}

.page-head__inner > h1 {
  grid-area: title;
}

/* 一句話：前深後淡（照 Bright Avenue 的頁首陳述句） */
.page-head__lead {
  grid-area: lead;
  margin-top: 1.5rem;
  font-size: var(--font-size-heading-2);
  font-weight: 500;
  line-height: 1.8;
  color: var(--color-heading-text);
}

.page-head__lead span {
  color: var(--color-muted);
}

/* 麵包屑 14px：輔助資訊，比內文小一級（16 試過，像一行內容、跟標語搶） */
.crumbs {
  grid-area: crumbs;
  display: flex;
  gap: 0.6rem;
  font-size: var(--font-size-s);
  letter-spacing: 0.05em;
  color: var(--color-muted);
}

/* 點擊範圍撐到 44px 以上，版面不動 */
.crumbs a {
  margin-block: -0.75rem;
  padding-block: 0.75rem;
}

.crumbs a:hover {
  color: var(--color-primary);
}

/* 沒有那句話的頁面（作品、消息列表）：麵包屑跟標題同一列靠下，不另外空出一列 */
@media (min-width: 768px) {
  .page-head__inner:not(:has(.page-head__lead)) {
    grid-template-areas:
      "sub   sub"
      "title crumbs";
  }
}

/* 手機：麵包屑移到標題上面 */
@media (max-width: 767px) {
  .page-head__inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "crumbs"
      "sub"
      "title"
      "lead";
  }

  .crumbs {
    margin-bottom: 1.5rem;
  }
}

/* 作品列表頁：首頁的卡片格全部列出，分類左、件數右 */
.works-list {
  padding-top: var(--space-after-head);
}

.cases__bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  padding-inline: max(var(--gutter), (100% - var(--wide)) / 2);
  /* 分類只是一排篩選、不是標題，比首頁標題到卡片（--space-heading）近 */
  margin-bottom: clamp(1.5rem, 0.357rem + 2.381vw, 2.5rem);
}

.cases__count {
  font-size: var(--font-size-s);
  color: var(--color-muted);
  white-space: nowrap;
}

@media (max-width: 767px) {
  .cases__bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

/* 案例內頁（2026-11-19）：版面照 Blue Studio（左邊資訊跟著捲、右邊照片一張張往下），資料框與改造前後平面圖照 EcoDeco；
   字只有左欄一段＋每張照片一句圖說（使用者：大部分的人不愛看太多字） */
.page-head__title {
  font-size: var(--font-size-heading-1);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: var(--color-heading-text);
  /* 內頁標題不平均分行：一行放滿，放不下的字接到下一行（全站 h1 預設是 balance） */
  text-wrap: wrap;
}

.case-detail {
  display: grid;
  grid-template-columns: minmax(16rem, 1fr) 2.4fr;
  gap: clamp(2.5rem, 1rem + 4vw, 6rem);
  padding: var(--space-after-head) max(var(--gutter), (100% - var(--wide)) / 2) 0;
}

/* 跟著捲，頁首藏起來時往上補位（同服務流程左欄） */
.case-info {
  position: sticky;
  top: calc(var(--header-height) + 2.5rem);
  align-self: start;
  transition: top 0.4s var(--ease-out);
}

.is-header-hidden .case-info {
  top: 2.5rem;
}

.case-info__text {
  font-size: var(--font-size-m);
  line-height: 2;
  color: var(--color-body-text);
}

.case-info__dl {
  display: grid;
  grid-template-columns: auto 1fr;
  margin-top: 2rem;
  border-top: 1px solid var(--color-divider);
  font-size: var(--font-size-s);
}

.case-info__dl :is(dt, dd) {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--color-divider);
}

.case-info__dl dt {
  padding-right: 1.5rem;
  color: var(--color-muted);
}

.case-photos {
  display: flex;
  flex-direction: column;
  gap: clamp(3rem, 2rem + 3vw, 5rem);
}

.case-photos figure {
  margin: 0;
}

.case-photo img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.case-photo figcaption,
.case-plans figcaption {
  margin-top: 0.9rem;
  font-size: var(--font-size-s);
  line-height: 1.8;
  color: var(--color-muted);
}

/* 兩張直的並排 */
.case-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.case-pair img {
  aspect-ratio: 4 / 5;
}

/* 改造前／後平面圖：淡底兩格並排 */
.case-plans__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.case-plans__item {
  padding: 1.5rem;
  background: var(--color-mist-pale);
  color: var(--color-primary-dark);
}

.case-plans__item p {
  margin-bottom: 0.75rem;
  font-size: var(--font-size-s);
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--color-primary);
}

.case-plans svg {
  display: block;
  width: 100%;
  height: auto;
}

.case-more {
  padding-block: var(--space-section);
}

.case-more .section-head {
  padding-inline: max(var(--gutter), (100% - var(--wide)) / 2);
}

.case-more__title {
  font-size: var(--font-size-heading-2);
  font-weight: 500;
}

@media (max-width: 991px) {
  .case-detail {
    grid-template-columns: 1fr;
  }

  .case-info {
    position: static;
  }
}

@media (max-width: 767px) {
  .case-pair,
  .case-plans__row {
    grid-template-columns: 1fr;
  }

  .case-pair img {
    aspect-ratio: 3 / 2;
  }
}

/* 消息列表頁（2026-11-19）：一則一列（照曜鷹、Bright Avenue、STAGE Lab 都是列表），跟作品頁的卡片格做出區別；
   分類沿用作品頁的圓圈（.cases__bar、.cases__tab） */
.news-page {
  padding-top: var(--space-after-head);
  padding-bottom: var(--space-section);
}

.news-rows {
  margin: 0 max(var(--gutter), (100% - var(--wide)) / 2);
  padding: 0;
  list-style: none;
}

/* 線只在兩則之間，第一則上面、最後一則下面不加；篩選後以看得到的為準 */
.news-row:not([hidden]) ~ .news-row:not([hidden]) {
  border-top: 1px solid var(--color-divider);
}

.news-row[hidden] {
  display: none;
}

.news-row__link {
  display: grid;
  grid-template-columns: 17.5rem minmax(0, 1fr);
  gap: clamp(1.5rem, 0.5rem + 2.5vw, 3rem);
  align-items: center;
  padding-block: 2rem;
  color: inherit;
}

.news-row__img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: opacity 0.3s;
}

.news-row__title {
  font-size: var(--font-size-heading-2);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.04em;
  transition: color 0.3s;
}

.news-row__text {
  max-width: 46rem;
  margin-top: 0.5rem;
  font-size: var(--font-size-m);
  line-height: 1.9;
  color: var(--color-muted);
}

a.news-row__link:hover .news-row__title {
  color: var(--color-primary);
}

a.news-row__link:hover .news-row__img {
  opacity: 0.85;
}

@media (max-width: 767px) {
  .news-row__link {
    grid-template-columns: 7.5rem minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
    padding-block: 1.25rem;
  }

  .news-row__title {
    font-size: var(--font-size-heading-3);
  }

  .news-row__text {
    display: none;
  }}

/* 消息內文（2026-11-19）：文字一欄置中（照 Bright Avenue：標題靠左、內文欄置中）；
   最寬 52rem，一行約 52 個中文字，再寬換行容易找不到下一行 */
.article {
  max-width: calc(52rem + var(--gutter) * 2);
  margin: 0 auto;
  padding: var(--space-after-head) var(--gutter) 0;
  font-size: var(--font-size-m);
  line-height: 2.1;
}

.article > * + * {
  margin-top: 1.5rem;
}

.article__photo {
  margin: 0 0 2.5rem;
}

.article__photo img {
  width: 100%;
  height: auto;
  max-height: 80svh;
  object-fit: cover;
}

.article h2 {
  margin-top: 3rem;
  font-size: var(--font-size-heading-2);
  font-weight: 500;
  line-height: 1.6;
}

.article__dl {
  display: grid;
  grid-template-columns: auto 1fr;
  border-top: 1px solid var(--color-divider);
  font-size: var(--font-size-s);
  line-height: 1.8;
}

.article__dl :is(dt, dd) {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--color-divider);
}

.article__dl dt {
  padding-right: 2rem;
  color: var(--color-muted);
}

/* 行內連結（電話）：上下 padding 只撐點擊範圍（≥ 44px），不影響行高 */
.article__dl a {
  padding-block: 0.8rem;
}

.article a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* 預約丈量表單頁（2026-11-19）：左邊說明＋步驟、右邊表單（版面照 worldftl）；標籤在左、欄位在右，欄位寬照內容長短（照安藤ハザマ）；
   題目照曜鷹精簡成室內設計常問的。單選複選用跟分類一樣的圓圈 */
.contact {
  display: grid;
  grid-template-columns: minmax(16rem, 1fr) 2.4fr;
  gap: clamp(2.5rem, 1rem + 4vw, 6rem);
  padding: var(--space-after-head) max(var(--gutter), (100% - var(--wide)) / 2) var(--space-section);
}

.contact__intro {
  position: sticky;
  top: calc(var(--header-height) + 2.5rem);
  align-self: start;
  transition: top 0.4s var(--ease-out);
}

.is-header-hidden .contact__intro {
  top: 2.5rem;
}

.contact__title {
  font-size: var(--font-size-heading-2);
  font-weight: 500;
  line-height: 1.7;
}

/* 步驟：時間軸，圓圈＋編號＋一句；目前這步實心（同分類圓圈），送出後換到 02 */
.contact__flow {
  margin-top: 2rem;
  font-size: var(--font-size-s);
  line-height: 1.8;
}

.contact__flow li {
  position: relative;
  display: flex;
  gap: 0.75rem;
  padding: 0 0 1.5rem 1.75rem;
  color: var(--color-muted);
}

.contact__flow li::before {
  content: "";
  position: absolute;
  top: 0.45em;
  left: 0;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--color-tab-idle);
}

/* 圓圈之間的細線 */
.contact__flow li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: calc(0.45em + 0.875rem);
  bottom: 0.25rem;
  left: calc(0.3125rem - 0.5px);
  width: 1px;
  background: var(--color-faint);
}

.contact__flow span {
  font-family: var(--font-en);
}

.contact__flow .is-current {
  color: var(--color-heading-text);
}

.contact__flow .is-current::before {
  background: var(--gradient-brand);
  box-shadow: none;
}

.contact__flow .is-current span {
  color: var(--color-primary);
}

/* 送出後：01 打勾（做完了），02 實心＋「下一步」（換我們打電話），03 維持空心 */
.contact__flow .is-done::before {
  background: var(--color-gradient-start) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='white' stroke-width='2.4'%3E%3Cpath d='M4.5 9.5l3 3 6-7'/%3E%3C/svg%3E") center / 100%;
  box-shadow: none;
  width: 0.875rem;
  height: 0.875rem;
  top: 0.35em;
  left: -0.125rem;
}

.contact__next {
  display: none;
  align-self: center;
  margin-left: 0.25rem;
  padding: 0 0.5rem;
  border-radius: 999px;
  background: var(--color-mark);
  font-size: var(--font-size-xs);
  font-style: normal;
  line-height: 1.7;
  color: var(--color-primary);
}

.contact__flow .is-current .contact__next {
  display: inline-block;
}

.contact__tel {
  margin-top: 2rem;
  font-size: var(--font-size-s);
  line-height: 1.8;
  color: var(--color-muted);
}

.contact__tel a {
  display: block;
  margin-top: 0.25rem;
  font-family: var(--font-en);
  font-size: var(--font-size-heading-2);
  letter-spacing: 0.04em;
  color: var(--color-gradient-start);
}

.contact__tel small {
  display: block;
  font-size: var(--font-size-xs);
}

/* 表單：每列 標籤 13rem｜欄位 */
.form-row {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.form-row + .form-row {
  margin-top: 1.75rem;
}

/* fieldset 不能當 grid，legend 浮在左邊 */
fieldset.form-row {
  display: block;
}

fieldset.form-row > legend {
  float: left;
  padding: 0;
}

fieldset.form-row > legend + .form-field {
  margin-left: 14.5rem;
}

.form-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.6rem;
  width: 13rem;
  min-height: 3.25rem;
  font-size: var(--font-size-m);
  font-weight: 500;
}

.form-req {
  font-size: var(--font-size-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--color-primary);
}

/* 欄位：高 52、白底 1px 淺灰框、圓角 4；字 16（iOS 小於 16 點了會自動放大） */
.form-input {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-faint);
  border-radius: 4px;
  background: var(--color-white);
  font: inherit;
  font-size: var(--font-size-m);
  color: var(--color-body-text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input::placeholder {
  color: var(--color-tab-idle);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-mist-light);
}

.form-input--m {
  max-width: 20rem;
}

.form-input--s {
  max-width: 12rem;
}

.form-input--xs {
  max-width: 6rem;
}

select.form-input {
  appearance: none;
  padding-right: 2.5rem;
  background: var(--color-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23677179' stroke-width='1.5'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 1rem center;
}

.form-textarea {
  min-height: 9rem;
  line-height: 1.9;
  resize: vertical;
}

.form-field--inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.form-sep {
  width: 1rem;
}

.form-label--inline {
  width: auto;
  min-height: 0;
}

.form-unit {
  color: var(--color-muted);
}

.form-note {
  margin-top: 0.5rem;
  font-size: var(--font-size-xs);
  color: var(--color-muted);
}

/* 單選、複選：單選圓圈（同分類），複選圓角方塊 */
.form-choices {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 2rem;
  min-height: 3.25rem;
}

.form-choice {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  cursor: pointer;
}

.form-choice input {
  appearance: none;
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--color-tab-idle);
  cursor: pointer;
  transition: box-shadow 0.2s, background-color 0.2s;
}

.form-choice input[type="checkbox"] {
  border-radius: 4px;
}

.form-choice:hover input {
  box-shadow: inset 0 0 0 1.5px var(--color-muted);
}

.form-choice input[type="radio"]:checked {
  background: var(--color-gradient-start) var(--gradient-brand);
  box-shadow: inset 0 0 0 4px var(--color-white), inset 0 0 0 5.5px var(--color-gradient-start);
}

.form-choice input[type="checkbox"]:checked {
  box-shadow: none;
  background: var(--color-gradient-start) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M4.5 9.5l3 3 6-7'/%3E%3C/svg%3E") center / 100%;
}

.form-choice input:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.form-agree {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-divider);
  font-size: var(--font-size-s);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.form-submit {
  min-width: 13.5rem;
}

/* 沒填的必填：欄位框和「必填」變提醒色 */
.form-row.is-invalid .form-input {
  border-color: var(--color-error);
}

.form-row.is-invalid .form-choice input:not(:checked),
.form-agree.is-invalid .form-choice input:not(:checked) {
  box-shadow: inset 0 0 0 1.5px var(--color-error);
}

.form-row.is-invalid .form-req,
.form-agree.is-invalid {
  color: var(--color-error);
}

.form-error {
  margin-top: 1.5rem;
  font-size: var(--font-size-s);
  color: var(--color-error);
}

.form-done p {
  margin-top: 1rem;
  line-height: 2;
}

.form-done a:not(.button) {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

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

  .contact__intro {
    position: static;
  }
}

/* 手機：標籤在欄位上面 */
@media (max-width: 767px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  fieldset.form-row > legend {
    float: none;
  }

  fieldset.form-row > legend + .form-field {
    margin-left: 0;
  }

  .form-label {
    width: auto;
    min-height: 0;
  }

  .form-input--m {
    max-width: none;
  }

  /* 地區、坪數各一行：分隔換成換行 */
  .form-sep {
    flex-basis: 100%;
    width: auto;
    height: 0;
  }

  .form-input--s {
    max-width: none;
    flex: 1;
  }

  .form-choices {
    gap: 0 1.5rem;
  }

  .form-submit {
    width: 100%;
  }
}

/* 服務流程：左右兩欄，左欄跟著捲（版面參考 Bright Avenue「私たちの特徴」，白底、自己的編號樣式）
   左欄：中文副標＋英文大字（跟其他區一樣）＋陳述句 22px（關鍵字品牌漸層，比標題小一階）＋說明，靠上，跟右邊第 01 步標題對齊。
   右欄：每步「大編號｜標題＋說明｜細線 icon」，上下細線分隔，從頂端就開始（不空一格）。 */
/* 最寬 1520（比作品案例、最新消息的 1280 寬一級）；淡底滿版、內容置中，兩欄距離不隨畫面拉開 */
.process {
  display: flex;
  /* 上下一樣：左欄淡底在清單上下多出的距離相同 */
  padding-block: var(--space-section);
  padding-inline: max(var(--gutter), (100% - var(--wide-l)) / 2);
  /* 整區淡霧藍灰底（只有左欄或上半有底色時像缺了一塊）；灰字在淡底上 4.5:1 */
  background: var(--color-tint);
}

/* 左欄照內容寬（PROCESS 大字約 434）；平板橫放時最多佔 38.5%，右欄才不會太窄 */
.process__lead {
  flex: 0 0 min(30rem, 38.5%);
  /* 跟著捲到第 04 步就停（約最後一步的高度），不一路跟到最底 */
  padding-bottom: 12.5rem;
}

.process__lead-inner {
  position: sticky;
  /* 頁首出現時停在頁首下面 40px；往下捲頁首藏起來時，跟著往上移到畫面上方 40px */
  top: calc(var(--header-height) + 2.5rem);
  padding-top: 2.75rem;
  transition: top 0.4s var(--ease-out);
}

.is-header-hidden .process__lead-inner {
  top: 2.5rem;
}

.process__lead .section-en {
  margin-bottom: 2.25rem;
}

.process__catch {
  margin-bottom: 1rem;
  font-size: var(--font-size-heading-2);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.05em;
  color: var(--color-heading-text);
}

.process__lead-text {
  max-width: 26em;
  font-size: var(--font-size-m);
  color: var(--color-muted);
}

/* 預約按鈕：實心漸層（CTA 用實心，其他導覽用淺框）；箭頭 */
.process__cta {
  gap: 1rem;
  margin-top: 2rem;
}

.process__cta::after {
  content: "→";
}

.process__main {
  flex: 1;
  padding-left: 6rem;
}

.process__list {
  display: grid;
  width: 100%;
  border-bottom: 1px solid var(--color-faint);
}

.process__item {
  position: relative;
  /* 左 7rem：編號 56 寬＋到標題 56 */
  padding: 2.75rem 7rem 2.75rem 7rem;
  border-top: 1px solid var(--color-faint);
}

.process__illus {
  position: absolute;
  top: 2.75rem;
  right: 0;
  color: var(--color-primary);
}

.process__icon {
  display: block;
  width: 4.5rem;
  height: 4.5rem;
}

.process__item-title {
  margin-bottom: 0.75rem;
  font-size: var(--font-size-heading-2);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.05em;
  color: var(--color-heading-text);
}

.process__num {
  position: absolute;
  /* 編號 56px（手機 40）：比英文大標小，五個編號才不搶焦點；top 讓數字頂端對齊標題 */
  top: 2.24rem;
  left: 0;
  font-family: var(--font-en);
  font-size: var(--font-size-number);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--color-gradient-start);
  background-image: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.process__item-text p {
  font-size: var(--font-size-m);
  color: var(--color-muted);
}

/* 費用／保固：主色小字，跟灰色說明分得出來 */
.process__item-text .process__note {
  margin-top: 0.4rem;
  font-size: var(--font-size-s);
  color: var(--color-primary);
}

/* 進場：這區放慢到 1.2 秒、上浮 3rem（共用 rise 0.7 秒、1.5rem 太快看不到）。
   右邊五步不用共用的 data-motion，由 script.js 加 is-shown：同一批進畫面的依序晚 0.25 秒（--step-delay）。 */
.process {
  --motion-duration: 1.2s;
}

/* 透明度和位移分開：共用的速度曲線開頭很陡，透明度一下就到 1，看起來只是閃一下；透明度改用 ease 0.9 秒 */
.process [data-motion="rise"].is-visible {
  animation:
    process-fade 0.9s ease var(--motion-wait) backwards,
    process-rise 1.2s var(--ease-out) var(--motion-wait) backwards;
}

.motion-ready .process__item:not(.is-shown) {
  opacity: 0;
}

.process__item.is-shown {
  animation:
    process-fade 0.9s ease var(--step-delay, 0s) backwards,
    process-rise 1.2s var(--ease-out) var(--step-delay, 0s) backwards;
}

@keyframes process-fade {
  from {
    opacity: 0;
  }
}

@keyframes process-rise {
  from {
    transform: translateY(3rem);
  }
}

/* 平板與手機：不跟著捲，上下排，索引隱藏 */
@media (max-width: 991px) {
  .process {
    flex-direction: column;
    gap: 2.5rem;
    padding-block: var(--space-section-s);
  }

  .process__lead {
    flex: none;
    padding-bottom: 0;
  }

  .process__main {
    padding-left: 0;
  }

  .process__lead-inner {
    position: static;
    padding-top: 0;
  }

}

@media (max-width: 767px) {
  .process__item {
    padding: 2rem 0 2rem 4.5rem;
  }

  .process__num {
    top: 1.9rem;
  }

  .process__illus {
    display: none;
  }
}

/* 最新消息：照曜鷹的照片卡片（服務流程已經是清單，連著兩區不要一樣）。
   標題列在上（標題左、按鈕右），最寬跟作品案例對齊；3 欄，照片 3:2＋日期分類＋標題＋摘要兩行。
   桌面 3 則、平板 2 則、手機 3 則（第 4 則先不顯示，看全部消息再看）。 */
/* 上下留白比一般區段多 15% */
.news {
  padding-block: calc(var(--space-section) * 1.15);
}

.news .section-head,
.news__list {
  padding-inline: max(var(--gutter), (100% - var(--wide)) / 2);
}

.news__list {
  display: grid;
  /* minmax(0, …)：標題不換行，不加的話長標題會把欄撐寬 */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-grid);
  margin: 0;
  list-style: none;
}

.news-item:nth-child(4) {
  display: none;
}

.news-item__link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.news-item__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  margin-bottom: 1.25rem;
  transition: opacity 0.3s;
}

.news-item__link:hover .news-item__img {
  opacity: 0.85;
}

.news-item__meta {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-en);
  font-size: var(--font-size-s);
  letter-spacing: 0.06em;
  color: var(--color-muted);
}

.news-item__cat {
  font-family: var(--font-sans);
  font-size: var(--font-size-s);
  color: var(--color-primary);
}

.news-item {
  position: relative;
}

/* 標題一行，超過用「…」；摘要兩行（下面 -webkit-line-clamp） */
.news-item__title {
  overflow: hidden;
  margin-bottom: 0.5rem;
  font-size: var(--font-size-heading-3);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.05em;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: color 0.3s;
}

/* 標題被截斷時（script.js 加 is-truncated、data-title、--title-top），滑過或鍵盤聚焦顯示完整標題，貼在標題上方。
   做法照嘉林藥品的藥品卡片（chia-lin-wp/chia-lin/assets/css/base.css） */
.news-item.is-truncated::before {
  content: attr(data-title);
  position: absolute;
  top: calc(var(--title-top, 0px) - 0.375rem);
  left: 0;
  z-index: 2;
  max-width: 100%;
  padding: 0.375rem 0.625rem;
  border-radius: 0.125rem;
  background: var(--color-heading-text);
  color: var(--color-white);
  font-size: var(--font-size-xs);
  line-height: 1.5;
  letter-spacing: 0.04em;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-100%);
  transition: opacity 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
}

.news-item.is-truncated:is(:hover, :has(:focus-visible))::before {
  opacity: 1;
  visibility: visible;
}

.news-item__link:hover .news-item__title {
  color: var(--color-primary);
}

.news-item__text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: var(--font-size-s);
  color: var(--color-muted);
}

@media (max-width: 991px) {
  .news__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .news-item:nth-child(3) {
    display: none;
  }
}

@media (max-width: 767px) {
  .news .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .news__list {
    grid-template-columns: minmax(0, 1fr);
  }

  .news-item:nth-child(3) {
    display: block;
  }
}

/* 頁尾：細線外框裡兩排（Logo／聯絡資訊｜價格一句＋預約按鈕），外框下緣一列版權；四角記號。外框照 ad-hzm 的頁尾。背景 --gradient-contact。 */
/* 上下留白一樣，像外框的白邊；跟上一段的距離由「最新消息」自己的下方留白負責 */
.site-footer {
  --footer-pad-x: clamp(2.5rem, 4.5vw, 4.5rem); /* 外框裡的左右留白（內容列、版權列共用） */
  padding: var(--space-section-s) var(--gutter);
  background: var(--gradient-contact);
  color: var(--color-white);
}

.site-footer__frame {
  position: relative;
  border: 1px solid var(--color-on-primary-line);
}

/* 四角記號（同關於庭序照片的四角，白色） */
.site-footer__frame > i {
  position: absolute;
  width: 0.75rem;
  height: 0.75rem;
  border: 0 solid var(--color-white);
}

.site-footer__frame > i:nth-of-type(1) {
  top: -0.375rem;
  left: -0.375rem;
  border-width: 1px 0 0 1px;
}

.site-footer__frame > i:nth-of-type(2) {
  top: -0.375rem;
  right: -0.375rem;
  border-width: 1px 1px 0 0;
}

.site-footer__frame > i:nth-of-type(3) {
  bottom: -0.375rem;
  left: -0.375rem;
  border-width: 0 0 1px 1px;
}

.site-footer__frame > i:nth-of-type(4) {
  bottom: -0.375rem;
  right: -0.375rem;
  border-width: 0 1px 1px 0;
}

.site-footer__row {
  padding: clamp(2rem, 3.5vw, 3.5rem) var(--footer-pad-x);
}

.site-footer__row + .site-footer__row {
  border-top: 1px solid var(--color-on-primary-line);
}

/* 第二排：左聯絡資訊，右價格一句＋按鈕（靠右、跟地址那行底部對齊） */
.site-footer__row--info {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: var(--space-l);
}

.site-footer__cta {
  text-align: right;
}

/* Logo：跟頁首同一組（中文 700＋英文小字），放大成頁尾的主角 */
.site-footer__logo {
  display: inline-flex;
  flex-direction: column;
  gap: 0.375rem;
  line-height: 1.2;
}

.site-footer__logo-name {
  font-size: var(--font-size-heading-1); /* 28–40px，跟區段中文大標同一級 */
  font-weight: 700;
  letter-spacing: 0.08em;
}

.site-footer__logo-en {
  font-family: var(--font-en);
  font-size: var(--font-size-s);
  font-weight: 600;
  letter-spacing: 0.24em;
}

.site-footer__lead {
  margin-bottom: 1.5rem;
  font-size: var(--font-size-m);
  line-height: 2;
}

/* 預約按鈕：白色實心膠囊，比一般按鈕稍大（240 × 56），箭頭靠右；滑過變淡霧藍 */
.site-footer__button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  width: min(100%, 15rem);
  min-height: 3.5rem;
  padding: 0 1.5rem 0 1.75rem;
  border-radius: 999px;
  background: var(--color-white);
  color: var(--color-heading-text);
  font-size: var(--font-size-m);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-align: left;
  transition: background-color 0.3s;
}

.site-footer__button::after {
  content: "→";
  font-size: var(--font-size-heading-3);
}

.site-footer__button:hover {
  background: var(--color-mist-light);
}

.site-footer__dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 1.5rem;
  margin: 0;
  /* 標籤和內容同樣大小（頁尾常見做法） */
  font-size: var(--font-size-m);
}

/* 標籤調亮（透明度 0.8 在淺色漸層上太淡） */
.site-footer__dl dt {
  color: var(--color-on-primary);
}

.site-footer__dl dd {
  margin: 0;
}

.site-footer__dl a:hover {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.site-footer__copy {
  padding: 1rem var(--footer-pad-x);
  border-top: 1px solid var(--color-on-primary-line);
  font-size: var(--font-size-xs);
}

/* 平板與手機：第二排改上下（資訊 → 一句＋按鈕，靠左）；聯絡資訊每行至少 44px 高 */
@media (max-width: 991px) {
  .site-footer__row--info {
    flex-direction: column;
    align-items: stretch;
  }

  .site-footer__cta {
    text-align: left;
  }

  .site-footer__dl {
    row-gap: 0;
  }

  .site-footer__dl :is(dt, dd) {
    padding-block: 0.55rem;
  }

  /* 連結自己撐滿整行高度（負邊距抵掉，版面不變） */
  .site-footer__dl a {
    display: inline-block;
    margin-block: -0.55rem;
    padding-block: 0.55rem;
  }
}

@media (max-width: 478px) {
  .site-footer {
    --footer-pad-x: 1.5rem;
  }
}

/* 減少動態：全部直接顯示 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* 404：只有標題區＋兩顆按鈕 */
.notfound {
  padding: var(--space-after-head) max(var(--gutter), (100% - var(--wide)) / 2) var(--space-section);
}

.notfound .form-actions {
  margin-top: 0;
}

/* 作品聲明：固定在畫面底部（照青衡）；壓在內容上、在頁首與手機選單底下 */
.site-notice {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 30;
  padding: 0.25rem 0.625rem;
  background: var(--color-notice);
  color: var(--color-white);
  font-size: var(--font-size-xs);
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 478px) {
  .site-notice {
    font-size: 0.6875rem;
  }
}
