/* 昭揚八德案｜樣式
   重建依據：舊官網 https://k4.h2.com.tw/（2026-11-24 量測）與舊廠商打包的 css/style.css。
   每一段的寬度、間距、斷點都照舊站的數字，目的是「看起來一模一樣」，所以這裡的百分比與像素不要順手改成整齊的數字。
   斷點（和舊站相同）：481、769、1025、1441；浮動按鈕另外在 680 與 480 變化；跳出視窗在 769、480、360 變化。 */

:root {
  /* 顏色（全部取自舊站） */
  --brand: #f14602;        /* 整頁的橘紅底 */
  --ink: #212529;
  --field-ink: #333;
  --white: #fff;
  --btn: #f1865c;          /* 送出按鈕（平常是七成不透明，滑過變實色） */
  --link-hover: #f4640e;   /* 「隱私權政策規範」滑過（舊站的顏色） */
  --sc: #b23808;           /* 浮動按鈕（電腦） */
  --sc-bar: rgba(178, 56, 8, .65); /* 浮動按鈕（手機底部那一排） */
  --field-error: #f4640e;  /* 沒填好的欄位，框裡的字變這個顏色（舊站的顏色） */
  --error: #ff0;           /* 提示文字。舊站線上是 #f4640e，在橘紅底上幾乎看不到；改用舊站頁面自己寫的另一個顏色（黃） */
  --focus-ring: #4a1500;   /* 焦點框外圈的深色 */
  --flag: #7a1500;         /* 預覽標示 */
  /* 字體照舊站：頁面是系統字，表單那一段是微軟正黑體（其餘文字都是圖） */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --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, 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; }
/* 焦點框：白線外面再包一圈深色，在橘紅底與白底上都看得見 */
:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; box-shadow: 0 0 0 6px var(--focus-ring); }

.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; padding: 3% 0 65%; background: var(--brand); }
.hero__bg { position: absolute; bottom: 0; left: 0; z-index: 1; width: 100%; }
.hero__text { position: relative; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; width: 70%; margin: 0 15%; }
.hero__logo { width: 120px; margin: 0 auto 12% -15%; }
.hero__title { width: 100%; margin: 0 0 6%; }
.hero__sub { width: 100%; }

/* ── 02 預約賞屋（表單） ── */
.foot { position: relative; padding: 10% 0 80px; font-family: var(--font-foot); background: var(--brand); }
.foot__title { width: 80%; margin: 0 10% 5%; }
.foot__form { width: 90%; margin: 0 5%; }

.form { display: flex; flex-wrap: wrap; }
.form__field { width: 100%; margin: 10px 0; }
.form__label { display: block; 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; font-size: 16px; font-weight: 700; line-height: 1.5; color: #000; background: var(--white); border: 1px solid var(--white); border-radius: 2px; }
.form__input[aria-invalid="true"] { color: var(--field-error); }
.form__rooms { display: flex; flex-wrap: wrap; justify-content: flex-start; margin: 4px 0; }
.form__choice { display: flex; flex-wrap: wrap; align-items: center; margin: 0 25px 6px 0; font-size: 1.2em; color: var(--white); cursor: pointer; }
.form__choice input { width: 13px; height: 13px; margin: 0 8px 0 0; }

.form__consent { display: flex; flex-wrap: wrap; margin: 15px 0; font-size: 1em; font-weight: 700; letter-spacing: 1px; color: var(--white); }
.form__consent label { display: flex; flex-wrap: wrap; align-items: center; cursor: pointer; }
.form__consent input { width: 25px; height: 25px; margin: 0 8px 0 0; }
.form__consent a { display: flex; color: var(--white); text-decoration: none; transition: color .25s var(--ease); }
.form__consent a:hover { color: var(--link-hover); }

/* 提示文字：位置與大小照舊站（姓名、電話在框的下面；房型接在最後一個選項後面；同意條款接在那一行後面） */
.form__error { width: fit-content; font-size: 16px; font-weight: 400; letter-spacing: 0; color: var(--error); }
.form__error:empty { display: none; }
.form__rooms .form__error { margin: 0 0 6px; font-size: 1.2em; }
.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 0; padding: 12px 0; overflow: hidden; font-size: 1.05em; font-weight: 700; line-height: 1.5; letter-spacing: 3px; color: var(--white); background: var(--btn); border: 0; border-radius: 2px; opacity: .7; cursor: pointer; transition: opacity .25s var(--ease); }
.form__btn:hover, .form__btn:focus-visible { opacity: 1; }
.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%; margin: 10px 0; 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; }

/* ── 浮動聯絡按鈕 ── */
.shortcuts { position: fixed; right: 15px; bottom: 15px; z-index: 2000; width: 50px; }
.shortcuts__in { display: flex; flex-wrap: wrap; width: 100%; }
.shortcuts a { 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(--sc); border-radius: 50%; transition: color .25s var(--ease), background-color .25s var(--ease), border-color .25s var(--ease); }
.shortcuts a:hover { color: var(--white); background: var(--field-ink); border-color: var(--field-ink); }
.shortcuts a span { display: none; }
/* 後台刪掉的那顆（程式設成 hidden）：上面的 display: flex 會蓋掉 hidden，所以另外寫。三顆都在時不影響樣子。（照昭揚藝文案 2026-11-27 的修法） */
.shortcuts a[hidden] { display: none; }
.ico { display: block; height: 1.25em; fill: currentColor; }
.ico--fb { width: .78em; }
.ico--pin { width: .94em; }
.ico--tel { width: 1.25em; }

/* ── 跳出視窗（隱私權政策規範）。尺寸與淡入淡出照舊站：白底、內距 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(--focus-ring); 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(51, 20, 5, .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; right: 0; z-index: 4000; padding: 4px 14px; font-size: 12px; letter-spacing: 1px; color: var(--white); background: var(--flag); border-radius: 0 0 0 4px; pointer-events: none; }
@media (max-width: 768px) { .preview-flag { padding: 3px 8px; font-size: 11px; letter-spacing: 0; } }

/* ── 進場動態（照舊站：捲到才出現；往上淡入位移 20px，放大的從 0.3 倍開始；時間各段不同） ── */
.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"] { --reveal-name: zoom-in; }
[data-reveal-time="1.2"] { --reveal-time: 1.2s; }
[data-reveal-time="1.5"] { --reveal-time: 1.5s; }
@keyframes fade-up { from { opacity: 0; transform: translateY(20px); } }
@keyframes zoom-in { from { opacity: 0; transform: scale(.3); } 50% { opacity: 1; } }

/* ═════ 481 以上 ═════ */
@media (min-width: 481px) {
  .hero { padding: 5% 0 65%; }
  .hero__logo { width: 140px; margin: 0 auto 4% -19%; }

  .foot { padding: 0 0 100px; }
  .foot__title { width: 70%; margin: 0 15% 5%; }
  .foot__form { width: 80%; margin: 0 10%; }
  .form__field, .form-done { margin: 12px 0; }
  .form__label { font-size: 1.15em; }
  .form__input { padding: 6px 10px; }
  .form__choice, .form__rooms .form__error { font-size: 1.25em; }
  .form__consent { font-size: 1.15em; }
  .form__btn { margin: 50px 0 0; font-size: 1.25em; }
}

/* ═════ 769 以上：桌機版面 ═════ */
@media (min-width: 769px) {
  .hero { padding: 3% 0 22%; }
  .hero__text { width: 80%; margin: 0 10%; }
  .hero__logo { width: 160px; margin: 0 auto 4% -9%; }
  .hero__title { margin: 0 0 3%; }

  /* 照線上：769～1024 寬，主視覺與表單之間有一段 200px 的白色空隙（舊站原本的狀況） */
  .foot { margin: 200px 0 0; padding: 0 0 120px; }
  .foot__title { width: 60%; margin: 0 20% 5%; }
  .foot__form { width: 70%; margin: 0 15%; }
  .form__field, .form-done { margin: 15px 0; }
  .form__input { padding: 8px 12px; }
  .form__consent { font-size: 1.25em; }
}

/* ═════ 1025 以上 ═════ */
@media (min-width: 1025px) {
  .hero { padding: 3% 0 20%; }
  .hero__logo { width: 180px; margin: 0 auto 6% -8%; }

  .foot { margin: 0; padding: 12% 0; }
  .foot__title { width: 500px; margin: 0 calc(50% - 250px) 5%; }
  .foot__form { width: 600px; margin: 0 calc(50% - 300px); }
  .form__label { font-size: 1.25em; }
  .form__input { padding: 8px 15px; }
}

/* ═════ 1441 以上：文字圖最寬 1200px，置中 ═════ */
@media (min-width: 1441px) {
  .hero__text { width: 1200px; margin: 0 calc(50% - 600px); }
  .hero__logo { margin: 0 calc(118% - 180px) 5% -18%; }
}

/* ═════ 680 以下：浮動按鈕改成底部一排 ═════ */
@media (max-width: 680px) {
  .shortcuts { right: 0; bottom: 0; width: 100%; }
  .shortcuts a { width: 33.4%; height: 50px; margin: 0; font-size: 1.05em; background: var(--sc-bar); border-top: 3px solid var(--field-ink); border-radius: 0; }
  .shortcuts a:not(:last-child) { width: calc(33.3% - 1px); border-right: 1px solid #999; }
  .shortcuts a:hover { color: var(--white); background: var(--field-ink); }
  .shortcuts a span { display: inline-block; }
  /* 後台刪掉一顆時，剩下的平分整排（不留空位）。三顆都在時不會套用。 */
  .shortcuts__in:has(a[hidden]) a { flex: 1 1 0; width: auto; }
  .ico { margin-right: 10px; }
}
@media (max-width: 480px) {
  .shortcuts a { height: 40px; font-size: 14px; }
  .ico { height: 1em; margin-right: 3px; }
  .ico--fb { width: .625em; }
  .ico--pin { width: .75em; }
  .ico--tel { width: 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%; }
  .form__btn, .form__consent a, .shortcuts a { transition: none; }
  .toast { transition: none; }
}
