/* 昭揚大運三期案｜樣式
   重建依據：舊官網（網址在 說明.md；2026-11-24 量測）。每一段的寬度、間距、斷點都照舊站的數字，
   目的是「看起來一模一樣」，所以這裡的百分比與像素不要順手改成整齊的數字。
   斷點（和舊站相同）：481、769、1025、1441；浮動按鈕另外在 680 與 480 變化；個資視窗在 769、480、360 變化。 */

:root {
  /* 顏色（全部取自舊站） */
  --ink: #212529;
  --field-ink: #333;
  --white: #fff;
  --foot: #8f2573;         /* 預約表單那一段的底色 */
  --btn: #42286d;          /* 送出按鈕、浮動按鈕；「個資運用申明」滑過也是這個顏色 */
  --btn-hover: #27114c;    /* 按鈕滑過；浮動按鈕的邊線 */
  --sc-bar: rgba(66, 40, 109, .65); /* 浮動按鈕（手機底部那一排） */
  --flag: #961c1c;         /* 預覽標示 */
  /* 字體照舊站：頁面是系統字，預約表單那一段是微軟正黑體（主視覺的字都是圖） */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --font-foot: "微軟正黑體", "Arial", sans-serif;
  --ease: ease-in-out;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; overflow-x: clip; font: 400 16px/1.5 var(--font); color: var(--ink); background: var(--white); }
h1, h2, h3, p { margin: 0; padding: 0; font-size: inherit; font-weight: inherit; }
picture { display: block; }
img { display: block; width: 100%; height: auto; }
button, input { margin: 0; font: inherit; }
[hidden] { display: none !important; }
/* 焦點框：白線外面再包一圈深色，在深色底與淺色底上都看得見 */
:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; box-shadow: 0 0 0 6px var(--btn-hover); }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── 01 主視覺：高度就是背景圖的高度，標誌與文字圖用百分比疊在上面 ──
   底色是圖還沒載入時先墊的漸層（取圖片上、中、下的平均色），圖載入後整個蓋住。 */
.hero { position: relative; background: linear-gradient(#1e4f94, #412c6f 50%, #752a75); }
.hero__text { position: absolute; top: 8%; left: 0; z-index: 5; width: 90%; margin: 0 5%; }
.hero__logo { width: 100px; margin: 0 calc(50% - 50px) 20%; }
.hero__title { width: 100%; margin: 0 0 20%; }
.hero__sub { width: 62%; margin: 0 19%; }
/* 右下角的「森格廣告」：769 以上會往下凸出主視覺 5px，壓在表單區的上緣（舊站就是這樣） */
.hero__credit { position: absolute; right: 5%; bottom: 5px; font-size: .8em; font-weight: 700; line-height: 1.2; color: var(--white); }

/* ── 02 預約賞屋 ── */
.foot { padding: 50px 0; font-family: var(--font-foot); background: var(--foot); }
.reserve { width: 90%; margin: 0 5%; }
.reserve:focus { outline: none; box-shadow: none; } /* 按「預約賞屋」捲過來之後，焦點移到這一段給鍵盤與讀屏接著往下走；不畫框 */
.reserve__title { font-size: 1.35em; font-weight: 700; line-height: 1.2; letter-spacing: 3px; text-align: center; color: var(--white); }
.reserve__lead { margin: 10px 0 25px; font-size: 15px; font-weight: 700; line-height: 1.35; text-align: center; color: var(--white); }

.form { display: flex; flex-wrap: wrap; justify-content: space-between; width: 100%; }
.form__field { width: 100%; margin: 10px 0; }
/* 欄位名稱是一行文字（不是區塊），高度由行高決定；輸入框接在下一行 */
.form__label { font-size: 1em; font-weight: 700; letter-spacing: 3px; color: var(--white); }
.form__label small { font-size: .7em; font-weight: 700; letter-spacing: 1px; }
.form__input { display: block; width: 100%; padding: 6px; color: #000; background: var(--white); border: 0; border-radius: 2px; }

/* 錯誤訊息：位置與大小照舊站（接在輸入框下面一行）。舊站是深色字壓在紫底上，看不清楚，這裡改成白字 */
.form__error { font-size: 16px; font-weight: 400; line-height: 24px; letter-spacing: 0; color: var(--white); }
.form__error:empty { display: none; }

.form__consent { display: flex; flex-wrap: wrap; width: 100%; margin: 15px 0; font-size: 1.15em; font-weight: 700; letter-spacing: 1px; color: var(--white); }
.form__agree, .form__agree label { display: flex; flex-wrap: wrap; align-items: center; }
.form__agree input { width: 25px; height: 25px; margin: 0 8px 0 0; }
.form__agree a { color: var(--white); text-decoration: none; transition: color .25s var(--ease); }
.form__agree a:hover { color: var(--btn); }
/* 同意條款的提示：舊站接在同一行右邊（放不下就折到下一行），字的大小粗細和這一行一樣 */
.form__consent .form__error { font: inherit; letter-spacing: inherit; }

/* 人機驗證的位置（預覽版不顯示，高度是 0） */
.form__code { display: flex; justify-content: center; width: 100%; margin: 10px 0; }
.form__btn { position: relative; display: flex; justify-content: center; width: 100%; margin: 25px 0; padding: 12px 0; overflow: hidden; font-size: 1.05em; font-weight: 700; line-height: 1.5; letter-spacing: 1px; color: var(--white); background: var(--btn); border: 0; border-radius: 2px; cursor: pointer; transition: background-color .25s var(--ease); }
.form__btn:hover { background: var(--btn-hover); }
.form__btn:disabled { cursor: progress; }
/* 送出中：按鈕底下一條來回跑的細線，讓人知道有在處理 */
.form__btn.is-sending::after { content: ""; position: absolute; left: 0; bottom: 0; width: 40%; height: 2px; background: var(--white); animation: sending 1.1s var(--ease) infinite alternate; }
@keyframes sending { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

.form-done { width: 100%; padding: 28px 20px; text-align: center; color: var(--field-ink); background: var(--white); border-radius: 2px; }
.form-done strong { display: block; margin: 0 0 6px; font-size: 1.25em; letter-spacing: 1px; }
.form-done:focus { outline: none; box-shadow: none; }

/* ── 浮動聯絡按鈕：電腦是右下角四顆圓形（只有圖示），680 以下是底部一排（圖示加字） ── */
.shortcuts { position: fixed; right: 15px; bottom: 15px; z-index: 2000; width: 50px; }
.shortcuts__in { display: flex; flex-wrap: wrap; width: 100%; }
.shortcuts a { position: relative; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; width: 50px; height: 50px; margin: 0 0 10px; font-size: 1.25em; font-weight: 700; color: var(--white); text-decoration: none; background: var(--btn); border: 2px solid var(--btn-hover); border-radius: 50%; transition: background-color .25s var(--ease), border-color .25s var(--ease); }
.shortcuts a:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
/* 電腦版不顯示字，但留給讀屏（按鈕才有名稱） */
.shortcuts a span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* 圖示是自己畫的 SVG；寬度照舊站各圖示的比例（舊站用圖示字型） */
.ico { display: block; flex: none; height: 1em; overflow: visible; font-size: 1.25em; fill: currentColor; } /* overflow：電話圖示照舊站往左偏半個像素，不要被框切掉 */
.ico--edit { width: 1.125em; }
.ico--tel { width: 1em; }
.ico--fb { width: .625em; }
.ico--pin { width: .75em; }

/* ── 跳出視窗（個資運用申明）。尺寸與淡入淡出照舊站：白底、內距 24px、0.33 秒 ── */
.modal { --modal-fade: .33s; width: 548px; max-width: calc(100vw - 30px); max-height: calc(100vh - 88px); padding: 24px; overflow: auto; color: var(--ink); background: var(--white); border: 0; border-radius: 5px; box-shadow: 0 2px 15px #222; }
.modal[open] { animation: modal-in var(--modal-fade) cubic-bezier(.22, .61, .36, 1) both; }
.modal::backdrop { background: rgba(15, 15, 17, .87); }
.modal[open]::backdrop { animation: modal-in var(--modal-fade) cubic-bezier(.22, .61, .36, 1) both; }
.modal.is-closing, .modal.is-closing::backdrop { animation: modal-out var(--modal-fade) cubic-bezier(.55, .06, .68, .19) both; }
.modal__title { margin: 0 0 15px; padding: 15px 0; font-size: 1.35em; font-weight: 500; line-height: 1.2; letter-spacing: 1px; color: var(--field-ink); border-bottom: 1px solid #aaa; }
.modal__body { font-size: 1.15em; line-height: 1.35; }
.modal__close { position: absolute; top: 0; right: 0; z-index: 10; width: 44px; height: 44px; padding: 0; background: transparent; border: 0; cursor: pointer; }
.modal__close::after { content: "×"; position: absolute; top: 5px; right: 5px; width: 30px; height: 30px; font: 300 45px/30px Arial, "Helvetica Neue", Helvetica, sans-serif; text-align: center; color: #888; background: var(--white); border-radius: 50%; transition: background-color .2s; }
.modal__close:hover::after { color: #555; background: #eee; }
.modal__close:focus::after { outline: 1px dotted #888; } /* 舊站視窗一打開，焦點就在叉叉上，所以一開始就看得到這圈虛線 */
.modal__close:focus-visible { outline-color: var(--btn-hover); outline-offset: -6px; box-shadow: none; }
@keyframes modal-in { from { opacity: 0; } }
@keyframes modal-out { to { opacity: 0; } }
@media (max-width: 769px) { .modal { width: 508px; } }
@media (max-width: 480px) { .modal { width: 348px; } .modal__title { font-size: 1.25em; } .modal__body { font-size: 1.05em; } }
@media (max-width: 360px) { .modal { width: 308px; } .modal__body { font-size: 1em; } }

/* ── 提示訊息 ── */
.toast { position: fixed; left: 50%; bottom: 70px; z-index: 3000; max-width: calc(100vw - 30px); padding: 10px 18px; font-size: .95em; color: var(--white); background: rgba(39, 17, 76, .95); border-radius: 4px; opacity: 0; pointer-events: none; transform: translate3d(-50%, 8px, 0); transition: opacity .25s ease, transform .25s ease; }
.toast.is-on { opacity: 1; transform: translate3d(-50%, 0, 0); }

/* ── 預覽標示（共用程式在預覽版加上的那一條） ── */
.preview-flag { position: fixed; top: 0; left: 50%; z-index: 4000; padding: 4px 14px; font-size: 12px; letter-spacing: 1px; color: var(--white); background: var(--flag); border-radius: 0 0 4px 4px; transform: translateX(-50%); pointer-events: none; }
/* 手機：主視覺最上面中間是標誌，置中會蓋到；改放右上角並縮小 */
@media (max-width: 768px) { .preview-flag { left: auto; right: 0; padding: 3px 8px; font-size: 11px; letter-spacing: 0; border-radius: 0 0 0 4px; transform: none; } }

/* ── 進場動態（照舊站：捲到才出現一次。主標由下方放大彈上來 0.8 秒；電話與表單由下淡入 20px） ── */
.js [data-reveal] { visibility: hidden; }
.js [data-reveal].is-in { visibility: visible; animation: var(--reveal-name) var(--reveal-time, 1s) .01s both; }
[data-reveal="fade-up"] { --reveal-name: fade-up; }
[data-reveal="zoom-in-up"] { --reveal-name: zoom-in-up; }
[data-reveal-time="0.8"] { --reveal-time: .8s; }
[data-reveal-time="1.2"] { --reveal-time: 1.2s; }
@keyframes fade-up { from { opacity: 0; transform: translateY(20px); } }
@keyframes zoom-in-up {
  0% { opacity: 0; transform: scale(.1) translateY(2000px); animation-timing-function: ease-in-out; }
  60% { opacity: 1; transform: scale(.475) translateY(-60px); animation-timing-function: ease-out; }
}

/* ═════ 481 以上 ═════ */
@media (min-width: 481px) {
  .hero__text { top: 12%; width: 70%; margin: 0 15%; }
  .hero__logo { width: 140px; margin: 0 calc(50% - 70px) 28%; }
  .hero__title { margin: 0 0 28%; }

  .foot { padding: 60px 0; }
  .reserve { width: 80%; margin: 0 10%; }
  .reserve__title { font-size: 2.25em; }
  .reserve__lead { margin: 15px 0 35px; font-size: 1.15em; }
  .form__field { margin: 12px 0; }
  .form__label { font-size: 1.15em; }
  .form__consent { font-size: 1.25em; }
  .form__btn { margin: 50px 0; font-size: 1.25em; }
}

/* ═════ 769 以上：主視覺換成電腦版的圖 ═════ */
@media (min-width: 769px) {
  .hero__text { top: 0; width: 60%; margin: 0 20%; }
  .hero__logo { width: 160px; margin: 45px calc(50% - 80px); }
  .hero__title { margin: 0 0 60px; }
  .hero__credit { bottom: -5px; font-size: 1em; }

  .foot { padding: 80px 0; }
  .reserve { width: 70%; margin: 0 15%; }
  .form__field { margin: 15px 0; }
}

/* ═════ 1025 以上 ═════ */
@media (min-width: 1025px) {
  .hero__text { top: 2%; width: 50%; margin: 0 25%; }
  .hero__logo { width: 220px; margin: 60px calc(50% - 110px); }
  .hero__title { margin: 0 0 80px; }

  .foot { padding: 100px 0; }
  .reserve { width: 600px; margin: 0 calc(50% - 300px); }
  .reserve__title { font-size: 2.65em; }
  .reserve__lead { margin: 35px 0 50px; font-size: 1.25em; }
  .form__label { font-size: 1.25em; }
}

/* ═════ 1441 以上 ═════ */
@media (min-width: 1441px) {
  .hero__text { top: 3%; width: 60%; margin: 0 20%; }
  .hero__logo { width: 280px; margin: 60px calc(50% - 140px); }
  .hero__title { margin: 0 0 120px; }

  .foot { padding: 120px 0; }
}

/* ═════ 680 以下：浮動按鈕改成底部一排 ═════ */
@media (max-width: 680px) {
  .shortcuts { right: 0; bottom: 0; width: 100%; }
  .shortcuts a { width: 25%; height: 50px; margin: 0; font-size: 1.05em; background: var(--sc-bar); border: 0; border-top: 3px solid var(--btn-hover); border-radius: 0; }
  .shortcuts a:hover { background: var(--btn-hover); }
  .shortcuts a:not(:last-child) { border-right: 1px solid #999; }
  .shortcuts a span { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  .ico { margin-right: 10px; }
  /* 後台刪掉某顆時（那顆會被標成 hidden）：剩下的平分整排、不留空位；最後一顆看得到的不畫右邊的分隔線。
     四顆都在時這兩行都不會套用，樣子和舊站相同。照昭揚八德、昭揚藝文的寫法（2026-11-27）。 */
  .shortcuts__in:has(a[hidden]) a { flex: 1 1 0; width: auto; }
  .shortcuts__in:has(a[hidden]) a:not(:has(~ a:not([hidden]))) { border-right: 0; }
}
@media (max-width: 480px) {
  .shortcuts a { height: 40px; font-size: 14px; }
  .ico { margin-right: 3px; font-size: 1em; }
}

/* 尊重「減少動態效果」：不做進場動畫、送出中的細線不跑 */
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal], .js [data-reveal].is-in { visibility: visible; animation: none; }
  .modal[open], .modal[open]::backdrop { animation: none; }
  .form__btn.is-sending::after { animation: none; width: 100%; }
  .toast { transition: none; }
}
