/* 頭等艙23 建案網站：深綠波浪＋崗石白＋古銅金，手機優先；≥1024px 左邊影片固定、右邊內容捲動 */
:root {
  --teal-900: #082E35;
  --teal-800: #0B3F48;
  --teal-600: #11606B;
  --teal-400: #2E8A8C;
  --stone: #F3F2EE;
  --paper: #FFFFFF;
  --ink: #22302F;
  --ink-soft: #5B6865;
  --line: #DCE1DE;
  --gold: #B8925A;
  --gold-soft: #E9D9BC;
  --danger: #B3402E;
  --serif: 'Noto Serif TC', 'PMingLiU', serif;
  --sans: 'Noto Sans TC', 'Microsoft JhengHei', 'PingFang TC', sans-serif;
  --latin: 'Jost', 'Noto Sans TC', sans-serif;
  --gutter: 20px;
  --dock-h: 64px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--stone); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.8; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ── 頂欄 ── */
.topbar { position: fixed; z-index: 30; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px)) 10px max(var(--gutter), env(safe-area-inset-left, 0px));
  background: linear-gradient(180deg, rgba(8,46,53,.75), rgba(8,46,53,0)); transition: background .3s; }
.topbar.solid { background: var(--teal-800); box-shadow: 0 2px 12px rgba(0,0,0,.18); }
.topbar img { height: 24px; width: auto; }
.topbar .book { background: var(--gold); color: #fff; text-decoration: none; border-radius: 999px; padding: 6px 16px; font-size: 14px; font-weight: 500; letter-spacing: 1px; }

/* ── 封面影片 ── */
.hero { position: relative; height: 100svh; min-height: 560px; overflow: hidden; background: var(--teal-900); color: #fff; }
.hero video, .hero .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,46,53,.25) 0%, rgba(8,46,53,0) 30%, rgba(8,46,53,0) 50%, rgba(8,46,53,.82) 100%); pointer-events: none; }
.hero-copy { position: absolute; z-index: 2; left: 0; right: 0; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); text-align: center; padding: 0 var(--gutter); }
.hero-copy .name { width: min(78vw, 360px); margin: 0 auto 10px; filter: drop-shadow(0 2px 10px rgba(0,0,0,.35)); }
.hero-copy .slogan { font-family: var(--serif); font-weight: 700; font-size: clamp(24px, 6.4vw, 32px); letter-spacing: 6px; margin: 0; text-shadow: 0 2px 10px rgba(0,0,0,.4); }
.hero-copy .types { display: inline-flex; gap: 14px; margin-top: 10px; font-size: 15px; letter-spacing: 3px; border-left: 1px solid rgba(255,255,255,.6); border-right: 1px solid rgba(255,255,255,.6); padding: 0 14px; }
.hero .sound { position: absolute; z-index: 3; right: max(14px, env(safe-area-inset-right, 0px)); bottom: calc(26px + env(safe-area-inset-bottom, 0px)); border: 1px solid rgba(255,255,255,.6);
  background: rgba(8,46,53,.45); color: #fff; border-radius: 999px; padding: 6px 14px; font-size: 13px; cursor: pointer; backdrop-filter: blur(4px); }
.hero .note { position: absolute; z-index: 3; left: max(14px, env(safe-area-inset-left, 0px)); bottom: calc(32px + env(safe-area-inset-bottom, 0px)); font-size: 11px; opacity: .8; letter-spacing: 1px; }
.hero .cue { position: absolute; z-index: 3; left: 50%; bottom: calc(60px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); font-family: var(--latin); font-size: 11px; letter-spacing: 4px; opacity: .85; animation: cue 2.4s ease-in-out infinite; }
@keyframes cue { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 6px); } }

/* ── 內容區 ── */
.intro { display: none; }
main { position: relative; }
.section { padding: 64px max(var(--gutter), env(safe-area-inset-right, 0px)) 56px max(var(--gutter), env(safe-area-inset-left, 0px)); background: var(--paper); }
.section:nth-of-type(even) { background: var(--stone); }
.section .en { font-family: var(--latin); font-weight: 300; font-size: clamp(34px, 10vw, 46px); line-height: 1.05; letter-spacing: 1px; color: var(--teal-600); margin: 0; }
.section h2 { font-family: var(--serif); font-weight: 700; font-size: clamp(22px, 6vw, 28px); letter-spacing: 3px; margin: 8px 0 0; color: var(--ink); text-wrap: balance; }
.section .lead { font-family: var(--serif); font-size: 17px; margin: 14px 0 0; color: var(--ink); }
.section .rule { width: 72px; height: 1px; background: var(--teal-600); margin: 18px 0; border: 0; }
.section .lines { list-style: none; padding: 0; margin: 0; color: var(--ink-soft); font-size: 15.5px; }
.section .lines li { padding: 2px 0; }
.badges { display: flex; gap: 8px; margin-top: 16px; }
.badges span { min-width: 44px; height: 44px; padding: 0 8px; border-radius: 10px 10px 50% 50%; background: #8C2B2B; color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 15px; box-shadow: inset 0 0 0 2px #fff, 0 0 0 1.5px #8C2B2B; }
.badges span.green { background: #2E7D3E; box-shadow: inset 0 0 0 2px #fff, 0 0 0 1.5px #2E7D3E; border-radius: 50%; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.tags li { border: 1px solid var(--teal-600); color: var(--teal-600); border-radius: 999px; padding: 3px 14px; font-size: 14px; letter-spacing: 1px; }
.figure { margin: 22px 0 0; position: relative; }
.figure img { width: 100%; border-radius: 4px; }
.figure figcaption { font-size: 13px; color: var(--ink-soft); margin-top: 6px; letter-spacing: 1px; }
.figure.zoomable { cursor: zoom-in; }
.figure.zoomable::after { content: "點一下放大"; position: absolute; right: 10px; top: 10px; font-size: 12px; background: rgba(8,46,53,.7); color: #fff; border-radius: 999px; padding: 2px 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.grid2 .figure { margin: 0; }
.note { font-size: 12px; color: var(--ink-soft); margin-top: 10px; letter-spacing: 1px; }
.story-lines { font-family: var(--serif); font-size: 19px; line-height: 2; margin: 18px 0 0; color: var(--ink); }

/* ── 輪播 ── */
.carousel { margin-top: 22px; position: relative; }
.track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); }
.track::-webkit-scrollbar { display: none; }
.track .figure { flex: 0 0 86%; scroll-snap-align: center; margin: 0; }
.track .figure img { aspect-ratio: 3 / 2; object-fit: cover; }
.dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.dots button { width: 8px; height: 8px; padding: 0; border-radius: 50%; border: 0; background: var(--line); cursor: pointer; }
.dots button.on { background: var(--teal-600); width: 22px; border-radius: 999px; }

/* ── 樓層 ── */
.floor-tabs { display: flex; gap: 6px; margin-top: 22px; }
.floor-tabs button { flex: 1; border: 1px solid var(--teal-600); background: transparent; color: var(--teal-600); border-radius: 8px; padding: 8px 0; font-family: var(--latin); font-size: 16px; cursor: pointer; }
.floor-tabs button[aria-selected="true"] { background: var(--teal-600); color: #fff; }
.floor-view { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: center; margin-top: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.floor-view img { max-height: 420px; margin: 0 auto; cursor: zoom-in; }
.floor-view .label { font-family: var(--latin); font-size: 44px; font-weight: 300; color: var(--teal-600); line-height: 1; }
.floor-view .desc { font-family: var(--serif); font-size: 17px; margin-top: 8px; }
.plan-name { font-family: var(--serif); color: var(--teal-600); margin-top: 16px; letter-spacing: 1px; }

/* ── 建材 ── */
.materials { display: grid; gap: 18px; margin-top: 22px; }
.material { background: var(--paper); border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.material img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.material div { padding: 12px 16px 14px; }
.material b { font-family: var(--serif); font-size: 18px; letter-spacing: 1px; display: block; }
.material span { color: var(--ink-soft); font-size: 14px; letter-spacing: 2px; }

/* ── 品牌 ── */
.brand-band { background: linear-gradient(160deg, #EAF6F8, #CDEBF2); }
.brand-group { font-weight: 500; letter-spacing: 1px; margin-top: 10px; color: var(--teal-800); }
.big35 { font-family: var(--serif); font-weight: 900; font-size: 68px; line-height: 1; color: var(--gold); text-shadow: 0 2px 0 #fff; }
.timeline { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; margin-top: 22px; }
.timeline div { border-left: 1px solid var(--teal-600); padding-left: 10px; }
.timeline b { font-family: var(--serif); font-size: 18px; color: var(--teal-800); }
.timeline ul { list-style: none; padding: 0; margin: 4px 0 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.7; }

/* ── 預約 ── */
.contact { background: radial-gradient(120% 80% at 80% 100%, #11606B 0%, var(--teal-800) 45%, var(--teal-900) 100%); color: #fff; text-align: center; }
.contact .name { width: min(70vw, 300px); margin: 0 auto; }
.contact .types { font-family: var(--serif); font-size: 22px; letter-spacing: 3px; margin-top: 12px; line-height: 1.6; }
.contact .specs { font-size: 18px; margin-top: 8px; letter-spacing: 1px; }
.contact .who { font-size: 15px; margin-top: 16px; line-height: 1.9; opacity: .92; }
.actions { display: grid; gap: 12px; margin: 26px auto 0; max-width: 420px; text-align: left; }
.action { display: flex; align-items: center; gap: 12px; background: #fff; color: var(--teal-800); text-decoration: none; border-radius: 999px; padding: 8px 18px 8px 8px; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.action i { flex: none; width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #2FB3B3, #0B6B70); display: grid; place-items: center; color: #fff; font-style: normal; font-size: 20px; }
.action small { display: block; font-size: 12px; color: var(--ink-soft); }
.action b { font-size: 18px; font-weight: 500; }
.contact h2.form-title { color: #fff; }
.form-title { font-family: var(--serif); font-size: 34px; letter-spacing: 8px; margin: 46px 0 14px; }
form.book { display: grid; gap: 12px; max-width: 420px; margin: 0 auto; text-align: left; }
form.book label.field span { display: block; font-size: 13px; opacity: .85; margin-bottom: 4px; }
form.book input, form.book select, form.book textarea { width: 100%; border: 0; border-radius: 6px; padding: 12px 14px; background: #fff; color: var(--ink); font-size: 16px; }
form.book textarea { min-height: 110px; resize: vertical; }
form.book .consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
form.book .consent input { width: 20px; height: 20px; flex: none; margin-top: 3px; accent-color: var(--gold); }
form.book .consent a { color: var(--gold-soft); }
form.book .err { color: #FFD3C7; font-size: 13px; min-height: 1em; }
form.book .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
form.book button[type="submit"] { margin-top: 6px; border: 0; border-radius: 999px; padding: 14px; font-size: 18px; letter-spacing: 6px; background: linear-gradient(180deg, #fff, #E6E8E7); color: var(--teal-800); font-weight: 700; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
form.book button[disabled] { opacity: .6; cursor: wait; }
.sent { max-width: 420px; margin: 0 auto; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.4); border-radius: 10px; padding: 22px; font-size: 16px; }
.sent b { display: block; font-family: var(--serif); font-size: 22px; margin-bottom: 6px; }
footer { background: var(--teal-900); color: rgba(255,255,255,.75); font-size: 12px; line-height: 1.8; text-align: center;
  padding: 22px max(var(--gutter), env(safe-area-inset-right, 0px)) calc(var(--dock-h) + 22px + env(safe-area-inset-bottom, 0px)) max(var(--gutter), env(safe-area-inset-left, 0px)); }
footer a { color: var(--gold-soft); }

/* ── 手機底部固定鈕 ── */
.dock { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: rgba(8,46,53,.96);
  padding: 10px max(14px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px)); transform: translateY(110%); transition: transform .3s; }
.dock.show { transform: none; }
.dock a { text-align: center; text-decoration: none; border-radius: 999px; padding: 10px 0; font-weight: 500; letter-spacing: 2px; }
.dock .call { border: 1px solid rgba(255,255,255,.6); color: #fff; }
.dock .go { background: var(--gold); color: #fff; }

/* ── 放大檢視 ── */
.lightbox { position: fixed; z-index: 50; inset: 0; background: rgba(5,20,23,.94); display: grid; place-items: center; padding: 56px 12px calc(24px + env(safe-area-inset-bottom, 0px)); overflow: auto; }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: calc(100svh - 100px); width: auto; max-width: 100%; touch-action: pinch-zoom; }
.lightbox button { position: fixed; top: calc(12px + env(safe-area-inset-top, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); border: 1px solid rgba(255,255,255,.6); background: rgba(0,0,0,.4); color: #fff; border-radius: 999px; padding: 6px 16px; font-size: 15px; cursor: pointer; }

/* ── 電腦版：左邊影片固定、右邊內容捲動 ── */
@media (min-width: 1024px) {
  :root { --gutter: 56px; }
  .topbar { left: 50%; background: var(--teal-800); }
  .layout { display: grid; grid-template-columns: 50% 50%; }
  .hero { position: sticky; top: 0; height: 100vh; }
  .hero .cue { display: none; }
  .content { min-width: 0; padding-top: 52px; }
  .intro { display: block; background: var(--teal-800); color: #fff; padding: 64px var(--gutter) 56px; }
  .intro .logo { height: 40px; width: auto; }
  .intro .name { width: 360px; margin: 26px 0 14px; }
  .intro .slogan { font-family: var(--serif); font-size: 34px; letter-spacing: 8px; margin: 0; }
  .intro .types { margin-top: 10px; font-size: 17px; letter-spacing: 4px; opacity: .9; }
  .hero-copy { display: none; }
  .track .figure { flex-basis: 74%; }
  .materials { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .timeline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dock { display: none; }
  footer { padding-bottom: 22px; }
}
