@charset "UTF-8";
/* ==========================================================================
   太聚建設 · 向暘 EDM
   2026-08-15  全新樣式（不沿用舊案 Webflow 匯出樣式）
   桌機內容欄固定 768px，超出部分為頁面留白
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 設計權杖
   -------------------------------------------------------------------------- */
:root {
  /* 品牌色：取自首屏主標 SVG 的深藍 */
  --c-ink: #171c61;
  --c-ink-soft: rgba(23, 28, 97, 0.62);
  --c-ink-line: rgba(23, 28, 97, 0.28);
  --c-ink-line-strong: rgba(23, 28, 97, 0.45);

  /* 表單區底色：取自 s-contact-bg 素材的漸層兩端 */
  --c-contact-top: #e3e4ec;
  --c-contact-bottom: #dcdde8;

  /* 頁面外圍留白（內容欄兩側） */
  --c-page-bg: #eceef3;

  --c-field-bg: rgba(255, 255, 255, 0.42);
  --c-error: #c0392b;

  --font-serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --font-sans: "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Microsoft JhengHei", sans-serif;

  /* 內容欄寬度：素材為 2 倍圖（1535px），顯示寬 768px */
  /* --w-content: 768px; */
  --w-content: 720px;
}

/* --------------------------------------------------------------------------
   2. 基礎重置
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--c-page-bg);
  color: var(--c-ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

/* --------------------------------------------------------------------------
   3. 版面容器
   -------------------------------------------------------------------------- */

/* 桌機：視窗比內容欄寬時，兩側留白鋪滿全螢幕背景圖。
   斷點 721px 對應內容欄的 720px —— 內容欄寬度若調整，這裡要跟著改。
   手機不套用：內容欄本來就滿版，背景完全被遮住，載入只是浪費頻寬。 */
@media screen and (min-width: 721px) {
  body {
    background-image: url("../images/fullscreen-bg-1.avif");
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
  }
}

.page-wrapper {
  width: 100%;
  max-width: var(--w-content);
  margin: 0 auto;
  position: relative;
  background-color: #fff;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   4. #s1 首屏
   底層背景圖（1535 x 2346）＋ 上層主標 SVG（同比例，直接對位疊合）
   -------------------------------------------------------------------------- */
.s1 {
  position: relative;
  width: 100%;
  aspect-ratio: 1535 / 2346;
  /* 底色取自主視覺淺紫，供不支援 AVIF 的舊瀏覽器（iOS 15 以下）墊底，
     避免首屏整片全白、深藍主標無處著落 */
  background-color: #e6e5f0;
  background-image: url("../images/s1-bg-1.avif");
  background-position: 50% 50%;
  background-repeat: no-repeat;
  background-size: cover;
  overflow: hidden;
}

.s1-text-box {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.s1-text-svg {
  width: 100%;
  height: 100%;
}

/* 進場動畫尚未啟動前先隱藏，避免無動畫時的閃現。
   若瀏覽器不支援或 GSAP 載入失敗，js 會直接把 .is-ready 掛上 */
.s1-text-svg .s1-t-line,
.s1-text-svg .s1-t-deco {
  visibility: hidden;
}

.s1.is-ready .s1-t-line,
.s1.is-ready .s1-t-deco {
  visibility: visible;
}

/* 使用者偏好減少動態效果時，直接顯示完成狀態 */
@media (prefers-reduced-motion: reduce) {
  .s1-text-svg .s1-t-line,
  .s1-text-svg .s1-t-deco {
    visibility: visible;
  }
}

/* --------------------------------------------------------------------------
   5. #s-contact 預約表單區
   底色漸層 → s-contact-bg（半透明紗）→ s-contact-decorated（貼底波浪）→ 內容
   -------------------------------------------------------------------------- */
.s-contact {
  position: relative;
  width: 100%;
  padding: 0 0 40px;
  background-image: linear-gradient(180deg, var(--c-contact-top) 0%, var(--c-contact-bottom) 100%);
  overflow: hidden;
}

.s-contact-bg,
.s-contact-deco {
  position: absolute;
  left: 0;
  width: 100%;
  pointer-events: none;
  user-select: none;
}

.s-contact-bg {
  top: 0;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0;
}

/* 波浪裝飾貼齊區塊底部，素材上緣本身即為漸隱，不需額外遮罩 */
.s-contact-deco {
  bottom: 0;
  height: auto;
}

.s-contact-inner {
  position: relative;
  z-index: 2;
  padding: 12px 58px 0;
}

/* CONTACT US／預約賞屋 標題圖（素材上下自帶留白，用負值收攏） */
.s-contact-title {
  width: 100%;
  height: auto;
  margin: -22px auto 0;
}

/* --------------------------------------------------------------------------
   6. 表單
   -------------------------------------------------------------------------- */
/* 標題素材本身上下留白較多，用負值把表單往上收，貼近視覺稿的間距 */
.contact-form {
  margin-top: 30px;
}

/* 單列欄位：左側標籤固定寬、右側控制項填滿 */
.field-row {
  display: grid;
  grid-template-columns: 6.4em 1fr;
  align-items: end;
  column-gap: 12px;
  margin-bottom: 22px;
}

.field-label {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--c-ink);
  line-height: 1.4;
  white-space: nowrap;
}

/* 「姓名」「房型」等兩字標籤撐開成與「聯絡電話」同寬（四字剛好填滿、不會再被拉開），
   星號緊接其後，四列標籤的星號因此對齊在同一垂直線上 */
.field-label .lb {
  display: inline-block;
  width: 4.25em;
  text-align: justify;
  text-align-last: justify;
  vertical-align: bottom;
}

.field-label .req {
  color: var(--c-ink);
}

/* 區塊型標籤（勾選題、隱私權）獨立成行 */
.field-block {
  margin-bottom: 22px;
}

.field-block > .field-label {
  display: block;
  margin-bottom: 10px;
}

/* --- 文字輸入框：僅底線 ---
   字級必須維持 16px：iOS Safari 在輸入元件字級小於 16px 時，
   一聚焦就會自動放大整個頁面而且不會縮回，版面看起來像壞掉 */
.text-field {
  width: 100%;
  height: 34px;
  padding: 0 2px 4px;
  border: 0;
  border-bottom: 1px solid var(--c-ink-line-strong);
  background-color: transparent;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--c-ink);
  border-radius: 0;
  transition: border-color 0.2s ease;
}

/* 提示文字可以小一點，不影響 iOS 的縮放判定（它只看輸入元件本身的字級） */
.text-field::placeholder {
  color: var(--c-ink-soft);
  font-size: 14px;
}

.text-field:focus {
  outline: none;
  border-bottom-color: var(--c-ink);
}

/* --- 下拉選單：依視覺稿較文字輸入框窄，字級同樣維持 16px --- */
.select-field {
  width: 100%;
  max-width: 76%;
  height: 34px;
  padding: 0 30px 0 10px;
  border: 1px solid var(--c-ink-line);
  border-radius: 2px;
  background-color: var(--c-field-bg);
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23171c61' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px 7px;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--c-ink);
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s ease;
}

.select-field:focus {
  outline: none;
  border-color: var(--c-ink);
}

.select-field:invalid,
.select-field option[value=""] {
  color: var(--c-ink-soft);
}

/* --- 勾選項：圓形空心圈 --- */
.choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
}

.choice {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  margin: 0;
}

.choice-mark {
  flex: none;
  width: 15px;
  height: 15px;
  border: 1px solid var(--c-ink-line-strong);
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.55);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease;
}

.choice input:checked + .choice-mark {
  border-color: var(--c-ink);
  background-color: var(--c-ink);
  box-shadow: inset 0 0 0 2.5px rgba(255, 255, 255, 0.9);
}

.choice input:focus-visible + .choice-mark {
  box-shadow: 0 0 0 3px rgba(23, 28, 97, 0.18);
}

.choice input:checked:focus-visible + .choice-mark {
  box-shadow:
    inset 0 0 0 2.5px rgba(255, 255, 255, 0.9),
    0 0 0 3px rgba(23, 28, 97, 0.18);
}

.choice-text {
  font-size: 15px;
  color: var(--c-ink);
  letter-spacing: 0.02em;
}

/* --- 隱私權說明小字 --- */
.privacy-note {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--c-ink-soft);
  letter-spacing: 0.01em;
}

.privacy-note p {
  margin: 0 0 2px;
}

.privacy-note a {
  color: var(--c-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.privacy-note .indent {
  padding-left: 1em;
}

/* --- 送出按鈕 --- */
.submit-row {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.submit-button {
  width: 100%;
  max-width: 420px;
  height: 36px;
  border: 1px solid var(--c-ink-line-strong);
  border-radius: 2px;
  background-color: rgba(255, 255, 255, 0.35);
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-indent: 0.35em;
  color: var(--c-ink);
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.submit-button:hover {
  background-color: rgba(255, 255, 255, 0.7);
  border-color: var(--c-ink);
}

.submit-button:active {
  background-color: rgba(255, 255, 255, 0.9);
}

/* 送出過程中禁用，避免連點造成重複名單 */
.submit-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: rgba(255, 255, 255, 0.35);
  border-color: var(--c-ink-line);
}

/* --- reCAPTCHA ---
   徽章會浮在表單欄位上方，依 Google 規範可隱藏，
   但必須在表單附近保留下方 .recaptcha-note 的文字聲明 */
.grecaptcha-badge {
  visibility: hidden;
}

.recaptcha-note {
  margin: 60px 0 0;
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
  color: var(--c-ink-soft);
  /* 需要斷行時把各行長度拉平，不讓最後一行只剩一兩個字 */
  text-wrap: pretty;
}

.recaptcha-note a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* --- 驗證錯誤訊息（jquery-validation 產生 label.error）--- */
label.error {
  display: block;
  margin: 4px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--c-error);
  font-family: var(--font-sans);
  letter-spacing: 0;
}

/* 單列欄位的錯誤訊息置於控制項下方，不擠壓標籤欄 */
.field-row label.error {
  grid-column: 2;
}

.field-block label.error {
  margin: -4px 0 8px;
}

.text-field.error,
.select-field.error {
  border-color: var(--c-error);
}

/* --------------------------------------------------------------------------
   7. 送出結果訊息
   -------------------------------------------------------------------------- */
.form-message {
  display: none;
  margin-top: 8px;
  padding: 30px 20px;
  border: 1px solid var(--c-ink-line);
  border-radius: 2px;
  background-color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

.form-message.is-visible {
  display: block;
}

.form-message-title {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}

.form-message-text {
  font-size: 15px;
  line-height: 1.8;
  color: var(--c-ink-soft);
}

.form-message.is-error .form-message-title {
  color: var(--c-error);
}

/* --------------------------------------------------------------------------
   8. 頁尾 logo
   -------------------------------------------------------------------------- */
.contact-footer {
  position: relative;
  z-index: 2;
  margin-top: 34px;
  text-align: center;
}

.contact-logo {
  width: 84px;
  height: auto;
  margin: 0 auto;
}

.contact-copyright {
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--c-ink-soft);
}

.contact-copyright a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* --------------------------------------------------------------------------
   9. 送出中的等待指示器
   -------------------------------------------------------------------------- */
.loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  background-color: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(2px);
}

.loader-overlay.is-active {
  display: flex;
}

.loader-spinner {
  width: 34px;
  height: 34px;
  border: 2px solid var(--c-ink-line);
  border-top-color: var(--c-ink);
  border-radius: 50%;
  animation: loader-spin 0.8s linear infinite;
}

.loader-text {
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--c-ink);
}

@keyframes loader-spin {
  to {
    transform: rotate(360deg);
  }
}

/* --------------------------------------------------------------------------
   10. 隱私權政策頁 / 密碼頁
   -------------------------------------------------------------------------- */
.doc-page {
  max-width: var(--w-content);
  margin: 0 auto;
  padding: 50px 30px 70px;
  background-color: #fff;
  min-height: 100vh;
}

.doc-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-align: center;
  margin-bottom: 28px;
}

.doc-content {
  font-size: 14px;
  line-height: 2;
  color: #333;
}

.doc-content .doc-subtitle {
  display: block;
  margin: 22px 0 4px;
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--c-ink);
}

.doc-back {
  margin-top: 40px;
  text-align: center;
}

.doc-back a {
  display: inline-block;
  padding: 10px 34px;
  border: 1px solid var(--c-ink-line-strong);
  border-radius: 2px;
  font-family: var(--font-serif);
  font-size: 14px;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  color: var(--c-ink);
  transition: background-color 0.2s ease;
}

.doc-back a:hover {
  background-color: rgba(23, 28, 97, 0.06);
}

/* --------------------------------------------------------------------------
   11. 響應式：內容欄以下按比例縮放
   -------------------------------------------------------------------------- */
@media screen and (max-width: 767px) {
  .s-contact-inner {
    padding: 4.4vw 7.5vw 0;
  }

  .field-row {
    grid-template-columns: 6.4em 1fr;
    column-gap: 10px;
    margin-bottom: 2.8vw;
  }

  .field-block {
    margin-bottom: 2.8vw;
  }

  .submit-row {
    margin-top: 3.9vw;
  }

  .contact-footer {
    margin-top: 4.4vw;
  }
}

@media screen and (max-width: 479px) {
  .field-label {
    font-size: 3.9vw;
  }

  .field-label .lb {
    width: 4.25em;
  }

  /* 手機版刻意不用 vw：字級一旦低於 16px，
     iOS Safari 聚焦時就會放大頁面，所以這兩項固定像素 */
  .text-field,
  .select-field {
    height: 34px;
    font-size: 16px;
  }

  .text-field::placeholder {
    font-size: 14px;
  }

  .select-field {
    padding-right: 7vw;
    background-size: 2.4vw 1.7vw;
    background-position: right 2.4vw center;
  }

  .choice-group {
    gap: 1.8vw 5.6vw;
  }

  .choice-mark {
    width: 3.1vw;
    height: 3.1vw;
  }

  .choice input:checked + .choice-mark {
    box-shadow: inset 0 0 0 0.6vw rgba(255, 255, 255, 0.9);
  }

  .choice-text {
    font-size: 3.4vw;
  }

  .privacy-note {
    font-size: 2.9vw;
  }

  .submit-button {
    height: 9vw;
    max-width: 74%;
    font-size: 4vw;
  }

  .contact-logo {
    width: 16vw;
  }

  /* 聲明與版權屬註記層級，不隨表單放大，維持窄螢幕下不擠成多行 */
  .recaptcha-note {
    font-size: 10px;
  }

  .contact-copyright {
    font-size: 2.6vw;
  }

  label.error {
    font-size: 2.9vw;
  }
}
