/* Jesselton Courtyard — 骨架版樣式
   目的：確保架構（多 agent／i18n／表單／FAQ）可運作與檢視內容，
   正式視覺與動畫比照 STANDARD_WORKFLOW.md 另行設計，非本檔案範圍。 */

:root {
  --color-bg: #ffffff;
  --color-text: #2b332c;
  --color-muted: #6e7669;
  --color-heading: #33402c;      /* 深綠黑 — 取代原本的海軍藍，維持標題可讀性 */
  --color-primary: #7c8c7b;      /* 品牌主色：鼠尾草綠 — 裝飾性用途（邊框、底線、次要強調） */
  --color-action: #4f6350;       /* 品牌主色（深化版）：按鈕／連結等需高對比可讀性的互動元件 */
  --color-action-contrast: #ffffff;
  --color-cream: #ffffff;        /* 品牌輔色：改為白色 — 淺色強調背景 */
  --color-border: #e2e0d3;
  --color-dark-overlay: 10, 20, 14; /* 深色疊層用（rgba），取代原本偏藍的黑色 */
  --font-base: "Noto Sans", "PingFang TC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: "Playfair Display", "Noto Sans", sans-serif;
  --max-width: 1080px;
}

* { box-sizing: border-box; }

/* 載入畫面 */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.page-loader-logo { height: 36px; width: auto; animation: page-loader-pulse 1.6s ease-in-out infinite; }
.page-loader-bar { width: 160px; height: 3px; background: var(--color-border); border-radius: 999px; overflow: hidden; }
.page-loader-bar span {
  display: block;
  width: 40%;
  height: 100%;
  background: var(--color-primary);
  border-radius: 999px;
  animation: page-loader-slide 1.2s ease-in-out infinite;
}
.page-loader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
@keyframes page-loader-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes page-loader-slide { 0% { transform: translateX(-120%); } 100% { transform: translateX(350%); } }

/* 預約表單 Lightbox */
.booking-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.booking-modal.is-open { opacity: 1; visibility: visible; }
.booking-modal-backdrop { position: absolute; inset: 0; background: rgba(var(--color-dark-overlay), 0.6); }
.booking-modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--color-bg);
  border-radius: 14px;
  padding: 40px 32px 32px;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.3s ease;
}
.booking-modal.is-open .booking-modal-card { transform: translateY(0) scale(1); }
.booking-modal-card .contact-form-card { padding: 0; border: none; background: none; margin-top: 20px; }
.booking-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--color-cream);
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text);
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.booking-modal-close:hover { background: var(--color-primary); color: #fff; transform: scale(1.08); }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-base);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 64px 0; border-bottom: 1px solid var(--color-border); }

/* 固定選單高度約 84px：錨點跳轉時預留空間，避免標題被選單蓋住 */
#features, #location, #hometypes, #contact, #faq { scroll-margin-top: 84px; }

h1, h2, h3 { font-family: var(--font-heading); font-weight: 600; color: var(--color-heading); line-height: 1.35; margin: 0 0 16px; }
h1 { font-size: clamp(28px, 4vw, 42px); }
h2 { font-size: clamp(22px, 3vw, 40px); }
h3 { font-size: 20px; }
p { margin: 0 0 12px; color: var(--color-text); }

.subtitle, .amenities { color: var(--color-muted); }
.trust-line { font-size: 14px; color: var(--color-muted); margin-bottom: 24px; }

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--color-primary);
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.btn-primary {
  background: var(--color-action);
  color: var(--color-action-contrast);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary:hover { background: var(--color-heading); border-color: var(--color-heading); }

/* ============ 主視覺 + 建案亮點 — 共用同一顆連續運鏡的 sticky 鎖定區 ============ */
/* 總捲動距離 620vh：前 29/60（約 300vh）主視覺文案，後 31/60 建案亮點橫向面板；
   同一顆 canvas 播完整 60 張影格，兩段之間不切換背景，沒有分隔感。 */
.cinema-scroll {
  position: relative;
  height: 620vh;
  background: #0e1710;
}
.cinema-anchor {
  position: absolute;
  top: calc(620vh * 29 / 60);
  left: 0;
  display: block;
  height: 0;
  width: 0;
}
.cinema-pin {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 100vh;
  height: 100dvh; /* 手機瀏覽器網址列展開時，100vh 比實際可視高度多出一截，底下會留白 */
  overflow: hidden;
}
.cinema-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.cinema-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(var(--color-dark-overlay), 0.5) 0%, rgba(var(--color-dark-overlay), 0.2) 45%, rgba(var(--color-dark-overlay), 0.6) 100%);
}

[data-phase] { transition: opacity 0.4s ease; }
[data-phase].is-hidden { opacity: 0; pointer-events: none; }

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 0 24px;
}
.hero-content h1 { max-width: 900px; }
.hero-content .subtitle,
.hero-content .trust-line { max-width: 720px; margin-left: auto; margin-right: auto; }
.hero-content h1 { color: #fff; }
.hero-content .subtitle { color: rgba(255, 255, 255, 0.88); }
.hero-content .trust-line {
  color: var(--color-cream);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  margin-bottom: 16px;
}

/* 主視覺文字進場淡入：標題（trust-line＋h1）先出現，內容（subtitle＋CTA）延遲接著出現。
   由 main.js 在 loading 畫面淡出時加上 .is-loaded 觸發，只播一次，跟 [data-phase] 的階段切換無關。 */
.hero-content .trust-line,
.hero-content h1,
.hero-content .subtitle,
.hero-content .btn {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.hero-content.is-loaded .trust-line,
.hero-content.is-loaded h1 {
  opacity: 1;
  transform: none;
}
.hero-content.is-loaded .subtitle,
.hero-content.is-loaded .btn {
  opacity: 1;
  transform: none;
  transition-delay: 0.3s;
}
.hero-scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.hero-scroll-cue span {
  display: block;
  width: 20px;
  height: 32px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  position: relative;
}
.hero-scroll-cue span::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  width: 3px;
  height: 8px;
  background: #fff;
  border-radius: 2px;
  transform: translateX(-50%);
  animation: hero-scroll-dot 1.6s ease infinite;
}
@keyframes hero-scroll-dot {
  0% { transform: translate(-50%, 0); opacity: 1; }
  70% { transform: translate(-50%, 10px); opacity: 0; }
  100% { transform: translate(-50%, 0); opacity: 0; }
}

/* 內容容器：整組（標題＋橫向面板）在可視高度內置中，避免小螢幕被裁切或跟標題重疊 */
.features-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(24px, 4vh, 48px);
}

.features-heading { color: #fff; max-width: 640px; }
.features-heading h2 { color: #fff; }
.features-heading .eyebrow { color: var(--color-cream); }
.features-intro { color: rgba(255, 255, 255, 0.85); font-size: 15px; }

/* 扇形卡片：五張卡片繞同一個支點排開、彼此不重疊，捲動時整個扇形轉動，依序把每張卡轉到正中間 */
.features-track-wrap { width: 100%; overflow: visible; padding: 20px 0 0; }
.features-track {
  position: relative;
  width: 100%;
  height: 480px;
}
.feature-panel {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(400px, 84vw);
  transform-origin: 50% calc(100% + 420px);
  transform: translateX(-50%) rotate(var(--angle));
  opacity: 0.22;
  z-index: 1;
  transition: transform 0.15s linear, opacity 0.3s ease;
}
.feature-panel.is-active {
  transform: translateX(-50%) rotate(var(--angle)) scale(1.06);
  opacity: 1;
  z-index: 5;
}

.feature-card {
  width: min(400px, 84vw);
  background: var(--color-bg);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 50px rgba(var(--color-dark-overlay), 0.4);
}
.feature-card-media { aspect-ratio: 4 / 3; overflow: hidden; }
.feature-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feature-card-body { padding: 18px 20px 22px; }

.feature-card-title {
  font-family: var(--font-heading);
  font-size: clamp(15px, 1.6vw, 19px);
  font-weight: 700;
  color: var(--color-heading);
  line-height: 1.5;
  margin: 0 0 8px;
  padding-left: 2.4em;
  text-indent: -2.4em;
}
.feature-index { color: var(--color-primary); font-weight: 700; }
.feature-sep { color: var(--color-primary); opacity: 0.6; margin: 0 4px; }

.feature-card-desc {
  font-size: 16px;
  color: var(--color-muted);
  line-height: 1.6;
  margin: 0;
}

.features-progress {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 10px;
}
.features-progress .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transition: background 0.25s ease, transform 0.25s ease;
}
.features-progress .dot.active { background: var(--color-cream); transform: scale(1.3); }

@media (max-width: 720px) {
  /* 手機版總捲動距離縮短為 480vh：主視覺只佔前 16/60（約 128vh，桌機為 300vh），
     建案亮點維持後 44/60（約 352vh，跟桌機的 31/60≈320vh 接近），
     避免主視覺捲太久才進到建案亮點。對應 JS 的 MOBILE_PHASE_SPLIT。 */
  .cinema-scroll { height: 480vh; }
  .cinema-anchor { top: calc(480vh * 15 / 60); }
  /* 這階段捲動已超過 40px，header 會是不透明實色，垂直置中會讓標題被 header 蓋住。
     改成貼齊底部＋上方留 header 高度的 padding，讓多出來的空間全部留在上面而不是卡片下方。
     手機版先把翻頁圓點藏起來，讓出來的下方空間也一併挪給上面。 */
  .features-content {
    gap: 20px;
    justify-content: flex-end;
    padding-top: 124px;
    padding-bottom: 24px;
  }
  .features-progress { display: none; }
  /* 建案亮點階段疊圖加深 50%（各層 alpha ×1.5），手機小螢幕上文字對比不夠時加強可讀性 */
  .cinema-scroll.is-features-phase .cinema-overlay {
    background: linear-gradient(180deg, rgba(var(--color-dark-overlay), 0.75) 0%, rgba(var(--color-dark-overlay), 0.3) 45%, rgba(var(--color-dark-overlay), 0.9) 100%);
  }
  /* 卡片照片縮矮 60px 後，track 高度也跟著減 60px，避免卡片(bottom:0 貼底)上方多出空白 */
  .features-track { height: 320px; }
  .feature-panel {
    width: min(280px, 72vw);
    transform-origin: 50% calc(100% + 230px);
  }
  .feature-card { width: min(280px, 72vw); }
  /* 卡片照片縮矮約 60px，讓整組（標題＋卡片）置中後標題不會貼著上緣 */
  .feature-card-media { aspect-ratio: 28 / 15; }
}

/* Header — 預設透明疊在滿版主視覺上，捲動後轉為實色 */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.site-header.is-scrolled {
  background: var(--color-bg);
  border-bottom-color: var(--color-border);
  box-shadow: 0 4px 20px rgba(var(--color-dark-overlay), 0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-top: 18px;
  padding-bottom: 18px;
}
.logo { position: relative; display: inline-flex; align-items: center; text-decoration: none; flex-shrink: 0; transition: opacity 0.2s ease; }
.logo:hover { opacity: 0.8; }
.logo-img { height: 32px; width: auto; display: block; transition: opacity 0.3s ease; }
.logo-img-white { filter: brightness(0) invert(1); }
.logo-img-dark { position: absolute; top: 0; left: 0; opacity: 0; }
.site-header.is-scrolled .logo-img-white { opacity: 0; }
.site-header.is-scrolled .logo-img-dark { opacity: 1; }

.main-nav { display: flex; align-items: center; gap: 28px; flex: 1; }
.main-nav a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
  transition: color 0.3s ease, text-shadow 0.3s ease, opacity 0.2s ease;
  white-space: nowrap;
}
.main-nav a:hover { opacity: 0.75; }
.site-header.is-scrolled .main-nav a { color: var(--color-text); text-shadow: none; }

.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.lang-switcher-wrap { gap: 8px; }
.lang-switcher-wrap button {
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: none;
  color: #fff;
  padding: 6px 12px;
  cursor: pointer;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.lang-switcher-wrap button:hover { border-color: var(--color-cream); }
.lang-switcher-wrap button.active { border-color: var(--color-cream); font-weight: 700; }
.site-header.is-scrolled .lang-switcher-wrap button { border-color: var(--color-border); color: var(--color-text); }
.site-header.is-scrolled .lang-switcher-wrap button:hover,
.site-header.is-scrolled .lang-switcher-wrap button.active { border-color: var(--color-primary); }

.menu-toggle { display: none; background: none; border: none; font-size: 22px; cursor: pointer; color: #fff; transition: color 0.3s ease; }
.menu-toggle:hover { color: var(--color-cream); }
.site-header.is-scrolled .menu-toggle { color: var(--color-text); }
.site-header.is-scrolled .menu-toggle:hover { color: var(--color-primary); }

/* 手機版聯絡按鈕：桌機隱藏（導覽列已有聯絡連結），手機版取代漢堡選單露出 */
.header-contact-btn {
  display: none;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--color-action);
  color: #fff;
  transition: background-color 0.25s ease;
}
.header-contact-btn:hover { background: var(--color-heading); }

@media (max-width: 860px) {
  /* 手機版不需要漢堡選單／下拉導覽／語系切換，直接露出聯絡按鈕 */
  .main-nav { display: none !important; }
  .menu-toggle { display: none !important; }
  .lang-switcher-wrap { display: none !important; }
  .header-contact-btn { display: inline-flex; align-items: center; }
  /* main-nav 隱藏後少了原本撐開兩側的 flex:1，改用 margin-left:auto 把按鈕推到最右邊 */
  .header-actions { margin-left: auto; }
}

@media (max-width: 420px) {
  .lang-switcher-wrap button { padding: 6px 9px; font-size: 13px; }
  .header-contact-btn { padding: 8px 11px; font-size: 12px; }
}

/* Feature list */
.feature-list { padding-left: 20px; }
.feature-list li { margin-bottom: 8px; }

/* Home types — 滿版背景左右各一支影片，卡片文字疊在上面 */
.hometypes-section {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  padding: 96px 0;
  color: #fff;
  display: flex;
  align-items: center;
}
.hometypes-section .container { width: 100%; }
.hometypes-bg { position: absolute; inset: 0; z-index: 0; display: flex; }
/* 滑鼠移到某一支影片時，該影片放大到 68%、疊層變淡（更亮）；另一支縮到 32%。
   .is-active / .is-dimmed 由 js/modules/ui.js 依滑鼠座標（而非 :hover）控制，
   原因見該檔案 initHometypesHover() 的註解。 */
.hometypes-bg-item {
  position: relative;
  width: 50%;
  height: 100%;
  overflow: hidden;
  transition: width 0.45s ease;
}
.hometypes-bg-item.is-active { width: 68%; }
.hometypes-bg-item.is-dimmed { width: 32%; }
/* 影片素材本身上下帶有黑邊，object-fit: cover 裁不掉，改用 scale 放大推出可視範圍外 */
.hometypes-bg-video { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.1); }
.hometypes-bg-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  pointer-events: none;
  transition: opacity 0.45s ease, background 0.45s ease;
}
.hometypes-bg-item.is-active .hometypes-bg-overlay { opacity: 0.5; }
/* 沒被選中的那一支，趁機再加深（opacity 沒辦法超過 1，所以直接把底色加深） */
.hometypes-bg-item.is-dimmed .hometypes-bg-overlay {
  background: rgba(0, 0, 0, 0.5);
}
.hometypes-content { position: relative; z-index: 1; width: 100%; text-align: center; }
.hometypes-section .eyebrow { color: var(--color-cream); }
.hometypes-section h2 { color: #fff; }

/* 卡片各自在自己那一半背景影片裡水平置中、垂直置中。
   min-height 預留 Courtyard Homes 卡片「展開統計數字」後的完整高度（實測約 388px，抓 400px 保險）——
   這一列的高度一開始就固定了，卡片展開時是在這個固定高度的格子裡置中變高，
   不會讓 .hometype-grid 整體高度改變，連帶影響到上方標題「Product Planning」的位置。 */
.hometype-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: 400px;
  margin-top: 40px;
}
.hometype-card {
  --card-color: 51, 64, 44;   /* 卡片背景顏色（深綠，= #33402c），跟透明度分開設定 */
  --card-alpha: 0.3;         /* 預設透明度 */
  --card-alpha-active: 0.14;  /* hover / active 透明度 */
  position: relative;
  justify-self: center;
  width: min(420px, calc(100% - 48px));
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  background: rgba(var(--card-color), var(--card-alpha));
  backdrop-filter: blur(6px);
  padding: 28px;
  transition: transform 0.3s ease, background 0.3s ease;
}
/* .is-active 由 js/modules/ui.js 的 initHometypesHover() 依滑鼠在整個區塊的左右半邊統一設定，
   跟背景影片的 .is-active 共用同一個觸發來源；:hover 保留當作 JS 未載入時的後備效果。 */
.hometype-card:hover,
.hometype-card.is-active { transform: translateY(-4px); background: rgba(var(--card-color), var(--card-alpha-active)); }
.hometype-card h3 { color: #fff; margin-bottom: 10px; }
.hometype-card p { color: rgba(255, 255, 255, 0.85); margin-bottom: 0; }

/* 滑鼠靠近卡片周圍（不只是卡片本身邊框內）就要有反應：用 ::before 往外擴一圈透明熱區，
   本身沒有視覺樣式，純粹擴大 :hover 判定範圍。 */
.hometype-card.has-stat-reveal::before {
  content: "";
  position: absolute;
  inset: -32px;
  z-index: -1;
}

/* Hover 時卡片「真的」往下長高顯示跑動數字統計（Courtyard Homes、Courtyard Villas 兩張卡片都套用）。
   改回文件流內的正常子元素——不再用 position: absolute 疊一層「看起來像」同一張卡片的獨立方塊
   （那個寫法背景/邊框是分開算的，兩層 backdrop-filter blur 各自對到不同的背景畫面，實際看起來會有明顯接縫）。
   現在真的只有一個 .hometype-card 方塊、一份 border/background/backdrop-filter，
   展開統計數字就是同一個方塊物理上變高，背景保證連續、不會有接縫。
   高度變化不會影響外面版面，是因為 .hometype-grid 那一列已經用 min-height 把最大高度預留好了
   （見上面 .hometype-grid 的註解），不是靠這裡的寫法。 */
.hometype-card.has-stat-reveal .hometype-card-stats {
  margin-top: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.4s ease;
}
.hometype-card.has-stat-reveal:hover .hometype-card-stats,
.hometype-card.has-stat-reveal.is-active .hometype-card-stats {
  margin-top: 20px;
  max-height: 260px;
  opacity: 1;
  pointer-events: auto;
}
/* padding 放在 inner、不放在有 max-height 的那層：max-height:0 沒辦法把 padding 一起壓到 0
   （padding 不受 overflow:hidden 影響），實測過會卡在 ~50px 殘留高度。 */
.hometype-card-stats-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}
.stat-item { display: flex; align-items: baseline; gap: 10px; }
.stat-number {
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat-label { font-size: 13px; color: rgba(255, 255, 255, 0.75); }

@media (max-width: 720px) {
  .hometypes-bg-item,
  .hometypes-bg-item.is-active,
  .hometypes-bg-item.is-dimmed { width: 100%; }
  .hometypes-bg-item:first-child { display: none; }
  .hometype-grid { grid-template-columns: 1fr; gap: 24px; }
  .hometype-card { width: calc(100% - 48px); }
  /* 建築面積數字（範圍值＋單位）手機版太長容易擠成一行，改成數字跟單位各自換行 */
  .stat-item-area { flex-direction: column; align-items: flex-start; gap: 2px; }

  /* 觸控裝置沒有真正的 hover，統計數字改成常駐展開（不用等 hover/tap 觸發），
     數字動畫改由 initStatCountersFallback() 在卡片捲動進畫面時播放一次，見 ui.js 註解。 */
  .hometype-card.has-stat-reveal .hometype-card-stats {
    max-height: none;
    opacity: 1;
    pointer-events: auto;
  }
}

/* Split layout — image + text (developer / value) */
.split-section { overflow: hidden; }
#developer { border-bottom: none; padding-top: 128px; padding-bottom: 128px; }
#value { padding-top: 128px; padding-bottom: 128px; }
.split-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}
.split-layout-reverse { grid-template-columns: 1fr 1.1fr; }
.split-layout-reverse .split-media { order: 2; }
.split-layout-reverse .split-text { order: 1; }
/* 圖片比容器高一截（120%）並置中疊出，配合 data-parallax 讓 JS 在容器內做 Y 軸小幅位移，不會露出邊緣空白 */
.split-media { position: relative; overflow: hidden; border-radius: 10px; aspect-ratio: 4 / 3; }
.split-media img { position: absolute; inset: -10% 0; width: 100%; height: 120%; object-fit: cover; display: block; }
.split-text .eyebrow { margin-bottom: 8px; }

/* 大螢幕：關於開發商／資產價值這兩區的 container 放寬到 1440，圖片欄位跟著等比放大 */
@media (min-width: 1440px) {
  .split-section .container.split-layout {
    max-width: 1440px;
    gap: 80px;
  }
  .split-media { aspect-ratio: 16 / 11; }
}

.eyebrow {
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin: 0 0 8px;
  font-weight: 600;
}

@media (max-width: 860px) {
  .split-layout,
  .split-layout-reverse { grid-template-columns: 1fr; gap: 28px; }
  .split-layout-reverse .split-media,
  .split-layout-reverse .split-text { order: initial; }
}

/* Location — 桌機左右對半：左 50% 文字、右 50% 滿版圖片（電腦板永遠滿版寬、高度自動不裁切 max-height 內容撐開） */
.location-section { border-bottom: none; }
.location-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: minmax(100vh, auto);
  align-items: stretch;
}
.location-text {
  position: relative;
  padding: 72px 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.location-text::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('../img/faq/pattern.svg') no-repeat top left / 20%;
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}
.location-text > * { position: relative; z-index: 1; max-width: 60%; }
.location-media { position: relative; overflow: hidden; min-height: 480px; }
.location-media img {
  position: absolute;
  inset: -10% 0;
  width: 100%;
  height: 120%;
  object-fit: cover;
  display: block;
}
.amenities-card {
  margin-top: 20px;
  padding: 24px;
  border-radius: 10px;
  background: var(--color-cream);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.amenities-group + .amenities-group { padding-top: 16px; border-top: 1px solid var(--color-border); }
.amenities-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 6px;
}
.amenities-card .amenities { margin: 0; color: var(--color-text); }

@media (max-width: 860px) {
  .location-split { grid-template-columns: 1fr; grid-template-rows: none; min-height: 0; }
  .location-text { padding: 56px 24px; align-items: stretch; }
  .location-text > * { max-width: none; }
  .location-media { order: -1; min-height: 0; aspect-ratio: 4 / 5; overflow-x: auto; scroll-snap-type: x mandatory; }
  .location-media img { position: static; height: 100%; width: auto; max-width: none; min-width: 100%; }
}

/* Contact / form — 影片背景 */
#contact.contact-section { border-bottom: none; }
.contact-section { position: relative; overflow: hidden; color: #fff; }
/* data-parallax="30" 會讓影片上下位移最多 ±30px，多留 40px 高度緩衝，避免捲動時露出邊緣空白 */
.contact-bg-video { position: absolute; inset: -40px 0; z-index: 0; width: 100%; height: calc(100% + 80px); object-fit: cover; }
.contact-bg-overlay { position: absolute; inset: 0; z-index: 0; background: rgba(var(--color-dark-overlay), 0.6); }
.contact-intro h2, .contact-intro p { color: #fff; }
.contact-intro .eyebrow { color: var(--color-cream); }

.contact-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: start;
}
.contact-item { margin-bottom: 8px; display: flex; align-items: center; gap: 12px; }
.contact-item a { color: #fff; text-decoration: none; transition: opacity 0.2s ease; }
.contact-item a:hover { opacity: 0.75; text-decoration: underline; }
.contact-item span:not(.contact-label) { color: #fff; }
.contact-label { color: rgba(255, 255, 255, 0.65); min-width: 52px; }
.contact-icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 16px; height: 16px; color: var(--color-primary); }
.contact-content { display: flex; flex-direction: column; gap: 2px; }
.contact-row { flex-direction: row; align-items: baseline; gap: 12px; }

.contact-form-card {
  background: var(--color-cream);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 32px;
}

@media (max-width: 860px) {
  .contact-layout { grid-template-columns: 1fr; }
  /* grid item 預設 min-width:auto，內容（input 等）撐開時會讓卡片比視窗還寬而橫向溢出 */
  .contact-form-card { min-width: 0; }
}

[data-booking-form] { display: flex; flex-direction: column; gap: 16px; max-width: 480px; margin-top: 24px; }
.contact-form-card[data-booking-form] { max-width: none; margin-top: 0; }
[data-booking-form] label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--color-muted); }
[data-booking-form] input,
[data-booking-form] select {
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 16px;
  font-family: inherit;
}
[data-booking-form] button {
  padding: 14px;
  background: var(--color-action);
  color: var(--color-action-contrast);
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.25s ease;
}
[data-booking-form] button:hover:not(:disabled) { background: var(--color-heading); }
[data-booking-form] button:disabled { opacity: 0.6; cursor: not-allowed; }

.form-feedback-message { min-height: 20px; font-size: 14px; }
.form-feedback-message.error { color: #b3261e; }

/* FAQ — 綠色背景 + 左上角 SVG 裝飾 */
.faq-section {
  position: relative;
  background: var(--color-primary);
  color: #fff;
  overflow: hidden;
}
.faq-section .container { max-width: 960px; }
.faq-section .eyebrow { color: var(--color-cream); }
.faq-section h2 { color: #fff; }
.faq-section .container { position: relative; z-index: 1; }
.faq-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: min(280px, 32vw);
  height: auto;
  opacity: 0.22;
  pointer-events: none;
  z-index: 0;
}

/* 手機版：地段優勢跟 FAQ 的裝飾圖案統一大小（電腦板維持原本各自的比例設定） */
@media (max-width: 860px) {
  .location-text::before { background-size: 100px; }
  .faq-pattern { width: 100px; }
}

/* FAQ accordion */
.faq-item { border-bottom: 1px solid rgba(255, 255, 255, 0.25); padding: 18px 0; }
.faq-item h3 {
  color: #fff;
  cursor: pointer;
  margin: 0;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: opacity 0.2s ease;
}
.faq-item h3:hover { opacity: 0.75; }
.faq-item h3::after {
  content: "+";
  display: inline-block;
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-size: 22px;
  color: var(--color-cream);
  transition: transform 0.3s ease;
}
.faq-item.active h3::after { transform: rotate(45deg); }
.faq-item p {
  color: rgba(255, 255, 255, 0.82);
  padding-right: 36px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-top: 0;
  margin-bottom: 0; /* 蓋掉全域 p{margin:0 0 12px} 的預設下邊界，避免展開項比收合項多出 12px 間距 */
  transition: max-height 0.35s ease, opacity 0.3s ease, margin-top 0.35s ease;
}
.faq-item.active p {
  max-height: 400px;
  opacity: 1;
  margin-top: 12px;
}

/* Line card (thank-you page) */
.line-card { border: 1px solid var(--color-border); border-radius: 6px; padding: 20px; margin: 24px 0; background: var(--color-cream); }
.line-card a { color: var(--color-action); transition: color 0.2s ease; }
.line-card a:hover { color: var(--color-heading); text-decoration: underline; }

/* Final CTA */
.final-cta {
  position: relative;
  padding: 100px 0;
  background-size: cover;
  background-position: center;
  color: #fff;
  text-align: center;
  border-bottom: none;
}
.final-cta-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(var(--color-dark-overlay), 0.72) 0%, rgba(var(--color-dark-overlay), 0.82) 100%);
}
.final-cta-content { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; }
.final-cta-content h2 { color: #fff; }
.final-cta-content p { color: rgba(255, 255, 255, 0.85); margin-bottom: 28px; }

/* Footer — 沿用 Zeon Properties 集團官網頁尾（clouthaus）架構與聯絡資訊 */
.site-footer {
  background: #10160f;
  padding: 72px 0 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.3fr;
  gap: 40px;
  margin-bottom: 56px;
}
.footer-col { display: flex; flex-direction: column; gap: 16px; }
.footer-logo-img { width: 100%; max-width: 170px; height: auto; object-fit: contain; align-self: flex-start; filter: brightness(0) invert(1); }
.footer-desc { font-size: 14px; line-height: 1.8; color: rgba(255, 255, 255, 0.75); margin: 0; }

.footer-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 4px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.footer-info { font-size: 14px; line-height: 1.8; opacity: 0.85; }
.footer-info strong { display: block; margin-bottom: 4px; color: #fff; }
.footer-link-hover { color: inherit; text-decoration: none; transition: color 0.25s ease, opacity 0.25s ease; }
.footer-link-hover:hover { color: var(--color-cream); opacity: 1; }

.footer-col-contact { border-left: 1px solid rgba(255, 255, 255, 0.12); padding-left: 40px; }
.footer-contact-list { display: flex; flex-direction: column; gap: 14px; }
.footer-contact-list .contact-item { display: flex; align-items: center; gap: 12px; margin-bottom: 0; }
.footer-contact-list .contact-icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 16px; height: 16px; color: var(--color-primary); }
.footer-contact-list .contact-content { display: flex; flex-direction: column; gap: 2px; }
.footer-contact-list .contact-row { flex-direction: row; align-items: baseline; gap: 12px; white-space: nowrap; }
.footer-contact-list .contact-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.55; color: #fff; min-width: 0; }
.footer-contact-list .contact-value { display: block; font-size: 14px; color: #fff; }

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-col-contact { border-left: none; padding-left: 0; }
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

.footer-bottom { text-align: center; }
.footer-divider { width: 100%; height: 1px; background: rgba(255, 255, 255, 0.1); margin-bottom: 36px; }
.footer-bottom-logo { margin-bottom: 20px; display: flex; justify-content: center; }
.footer-bottom-logo-img { height: 40px; width: auto; }
.footer-disclaimer { font-size: 12px; line-height: 1.8; opacity: 0.65; max-width: 800px; margin: 0 auto 14px; color: inherit; }
.footer-copyright { font-size: 11px; opacity: 0.7; letter-spacing: 0.08em; text-transform: uppercase; margin: 0; color: inherit; }

/* Scroll reveal (skeleton) */
/* 區塊本身不做整體淡入，只有內部文字（標題／描述各自獨立）依捲動位置分別淡入 */
[data-reveal-text] { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
[data-reveal-text].is-revealed { opacity: 1; transform: none; }
