/* 洄流 Reflow — 公開預約站「一頁下潛」
   捲動＝下潛：海面天光 → 淺水 → 中層 → 深層 → 海床
   潛繩深度軸貫穿水下區；珊瑚色 CTA 是深水裡唯一的暖色 */

.public-page {
  /* 縱深色階（V5 logo 深海軍藍系；固定視覺，不隨系統深淺切換） */
  --sky: #EAF1F5;
  --shallow: #AAC6D6;
  --w1: #2A5878;
  --w2: #1B3F63;
  --w3: #102B47;
  --seabed-c: #081829;
  --foam: #F7FAFC;
  --ink-deep: #14324F;
  --coral-cta: #E87A64;
  --coral-cta-press: #D96A55;
  --aqua: #93C5E0;
  --white-6: rgba(255, 255, 255, .06);
  --white-14: rgba(255, 255, 255, .14);
  --white-55: rgba(255, 255, 255, .55);
  --white-80: rgba(255, 255, 255, .82);

  background: var(--sky);
  color: var(--ink-deep);
  overflow-x: clip;
}
/* html 也一起夾住，行動瀏覽器才不會因子元素溢出而擴張 layout viewport */
html:has(.public-page) { overflow-x: clip; }

/* ---------- 導航 ---------- */

.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; align-items: center; gap: 22px;
  padding: calc(10px + env(safe-area-inset-top)) clamp(16px, 4vw, 40px) 10px;
  color: var(--ink-deep);
  transition: background 240ms var(--ease-out), color 240ms, box-shadow 240ms;
}
.site-nav.scrolled {
  background: color-mix(in srgb, var(--w2) 86%, transparent);
  backdrop-filter: blur(12px);
  color: var(--foam);
  box-shadow: 0 1px 0 var(--white-14);
}
.nav-brand {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--serif); font-size: 19px; font-weight: 700;
  color: inherit; text-decoration: none; letter-spacing: 1px;
  margin-right: auto;
}
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  color: inherit; text-decoration: none; font-size: 14px; opacity: .8;
  padding: 6px 12px; border-radius: 999px;
}
.nav-links a:hover { opacity: 1; background: rgba(127, 200, 205, .18); }
.nav-cta {
  background: var(--coral-cta); color: #FFF7F4; text-decoration: none;
  font-size: 14px; font-weight: 700;
  padding: 8px 18px; border-radius: 999px;
  transition: transform 120ms var(--ease-out), background 120ms;
}
.nav-cta:hover { background: var(--coral-cta-press); }
.nav-cta:active { transform: scale(.97); }
@media (max-width: 640px) {
  .nav-links { display: none; }
}

/* ---------- Hero 海面 ---------- */

.hero {
  position: relative;
  min-height: max(88svh, 540px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  background:
    radial-gradient(120% 60% at 50% 0%, #F2FAFA 0%, var(--sky) 45%, var(--shallow) 100%);
  padding: calc(76px + env(safe-area-inset-top)) 20px 150px;
}
.hero-inner { max-width: 640px; }
.logo-mark { color: var(--w1); margin-bottom: 18px; }
.hero-eyebrow {
  font-family: var(--serif);
  font-size: clamp(13px, 1.6vw, 15px);
  letter-spacing: .5em; text-indent: .5em;
  text-transform: uppercase;
  color: var(--w1);
}
.hero-title {
  font-family: var(--serif);
  font-size: clamp(64px, 14vw, 116px);
  font-weight: 600; line-height: 1.08;
  letter-spacing: .06em;
  margin: 6px 0 14px;
}
.hero-tagline { font-size: clamp(16px, 2.4vw, 19px); color: color-mix(in srgb, var(--ink-deep) 74%, transparent); }
.hero-cta { display: flex; gap: 12px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }

.btn-coral, .btn-glass {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; font-family: inherit;
  padding: 12px 26px; border-radius: 999px;
  text-decoration: none; cursor: pointer; border: none;
  transition: transform 120ms var(--ease-out), background 120ms, border-color 120ms;
}
.btn-coral { background: var(--coral-cta); color: #FFF7F4; }
.btn-coral:hover { background: var(--coral-cta-press); }
.btn-coral:active { transform: scale(.97); }
.btn-coral:disabled { opacity: .45; cursor: not-allowed; }
.btn-glass {
  background: transparent; color: inherit;
  border: 1.5px solid currentColor;
}
.btn-glass:hover { background: rgba(255, 255, 255, .25); }
.btn-glass:active { transform: scale(.97); }

/* 下潛提示 */
.dive-cue {
  position: absolute; bottom: 112px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: color-mix(in srgb, var(--ink-deep) 60%, transparent);
}
.dive-cue-text { font-size: 12px; letter-spacing: .3em; text-indent: .3em; }
.dive-cue-line {
  width: 1.5px; height: 34px;
  background: linear-gradient(to bottom, currentColor, transparent);
  animation: cue-sink 2.2s var(--ease-out) infinite;
}
@keyframes cue-sink {
  0% { transform: translateY(-4px); opacity: 0; }
  35% { opacity: 1; }
  100% { transform: translateY(8px); opacity: 0; }
}

/* 海面波浪（兩層錯動）；容器裁切避免 200% 寬的 SVG 撐開手機 layout viewport */
.waves { position: absolute; bottom: -1px; left: 0; right: 0; height: 90px; pointer-events: none; overflow: hidden; }
.wave { position: absolute; bottom: 0; left: 0; width: 200%; height: 100%; }
.wave path { fill: var(--w1); }
.wave-back { opacity: .35; animation: wave-drift 16s linear infinite; }
.wave-front { animation: wave-drift 10s linear infinite reverse; }
@keyframes wave-drift {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- 水下區與潛繩 ---------- */

.underwater { position: relative; }
.zone::before {
  content: '';
  position: absolute; top: 0; bottom: 0;
  left: max(calc(50% - 430px), 26px);
  width: 2px;
  background: repeating-linear-gradient(
    to bottom, rgba(255, 255, 255, .16) 0 26px, rgba(255, 255, 255, .38) 26px 30px);
  pointer-events: none;
}
@media (max-width: 760px) { .zone::before { display: none; } }

.zone {
  position: relative; padding: clamp(64px, 9vw, 110px) 20px;
  color: var(--foam); scroll-margin-top: 56px;
  overflow: clip; /* 魚群/光束動畫不得撐開 layout viewport */
}
.zone-1 { background: linear-gradient(to bottom, var(--w1), color-mix(in srgb, var(--w1) 40%, var(--w2))); }
.zone-2 { background: linear-gradient(to bottom, color-mix(in srgb, var(--w1) 40%, var(--w2)), var(--w2)); }
.zone-3 { background: linear-gradient(to bottom, var(--w2), var(--w3)); }

.zone-inner { max-width: 640px; margin: 0 auto; position: relative; }
.zone-inner.wide { max-width: 880px; }

.depth-tag {
  display: inline-block;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: .18em;
  color: var(--aqua);
  border: 1px solid color-mix(in srgb, var(--aqua) 40%, transparent);
  padding: 3px 12px; border-radius: 999px;
  margin-bottom: 18px;
  background: rgba(0, 0, 0, .12);
}
.zone-eyebrow {
  font-family: var(--serif);
  font-size: 13px; letter-spacing: .4em; text-indent: .4em;
  text-transform: uppercase;
  color: var(--aqua);
  margin-bottom: 6px;
}
.zone-title {
  font-family: var(--serif);
  font-size: clamp(30px, 5.4vw, 44px);
  font-weight: 600; line-height: 1.3;
  margin-bottom: 14px;
}
.zone-copy {
  font-size: 15.5px; line-height: 2;
  color: var(--white-80);
  max-width: 560px;
}

/* 光束（淺水區） */
.light-shafts { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.light-shafts::before, .light-shafts::after {
  content: '';
  position: absolute; top: -12%; height: 120%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, .14), transparent 70%);
  transform: skewX(-14deg);
}
.light-shafts::before { left: 16%; width: 90px; }
.light-shafts::after { left: 64%; width: 150px; opacity: .6; }

/* 特色三卡 */
.feature-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px; margin-top: 40px;
}
@media (max-width: 720px) { .feature-row { grid-template-columns: 1fr; } }
.feature {
  background: var(--white-6);
  border: 1px solid var(--white-14);
  border-radius: 16px;
  padding: 20px 18px;
  backdrop-filter: blur(4px);
}
.feature-en {
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--aqua);
  margin-bottom: 6px;
}
.feature h3 { font-family: var(--serif); font-size: 17px; margin-bottom: 6px; }
.feature p { font-size: 13.5px; line-height: 1.9; color: var(--white-80); }

/* 魚群剪影 */
.fish-school {
  position: absolute; top: 46px; right: -30px;
  width: min(300px, 44vw);
  color: rgba(255, 255, 255, .12);
  pointer-events: none;
  animation: fish-drift 60s linear infinite;
}
@keyframes fish-drift {
  from { transform: translateX(12vw); }
  to { transform: translateX(-110vw); }
}

/* ---------- 行程卡（掛在繩上的深度牌） ---------- */

.session-list { margin-top: 34px; }
.month-label {
  font-family: var(--mono); font-size: 13px; letter-spacing: .2em;
  color: var(--aqua);
  margin: 30px 2px 14px;
  display: flex; align-items: center; gap: 12px;
}
.month-label::after { content: ''; flex: 1; height: 1px; background: var(--white-14); }
.session-list > .month-group {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
@media (max-width: 760px) { .session-list > .month-group { grid-template-columns: 1fr; } }

.session-card {
  display: flex; gap: 16px;
  background: var(--white-6);
  border: 1px solid var(--white-14);
  border-radius: 18px;
  padding: 18px;
  backdrop-filter: blur(4px);
  transition: transform 160ms var(--ease-out), border-color 160ms, background 160ms;
}
.session-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--aqua) 45%, transparent);
  background: rgba(255, 255, 255, .09);
}
.session-card .date-block {
  flex: none; width: 58px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding-top: 2px;
  border-right: 1px solid var(--white-14); padding-right: 14px;
}
.session-card .date-block .day {
  font-family: var(--mono); font-size: 21px; font-weight: 700; line-height: 1.25;
  color: var(--foam);
}
.session-card .date-block .wd { font-size: 12px; color: var(--white-55); }
.session-card .body { flex: 1; min-width: 0; }
.session-card .title-line {
  font-weight: 700; font-size: 16px; font-family: var(--serif);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  color: var(--foam);
  overflow-wrap: anywhere;
}
.tag {
  font-family: var(--mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: .08em;
  color: var(--aqua);
  border: 1px solid color-mix(in srgb, var(--aqua) 38%, transparent);
  padding: 1px 9px; border-radius: 999px;
  white-space: nowrap;
}
.session-card .meta { color: var(--white-55); font-size: 13px; margin-top: 4px; }
.session-card .desc {
  color: var(--white-80); font-size: 13.5px; line-height: 1.85;
  margin-top: 8px; white-space: pre-wrap;
}
.session-card .foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px; gap: 8px;
}
.session-card .price { font-family: var(--mono); font-weight: 700; font-size: 16px; color: var(--foam); }
.session-card .price small { color: var(--white-55); font-weight: 400; font-size: 12px; }
.session-card .slots { font-size: 12px; color: var(--aqua); margin-left: 8px; }
.session-card .slots.full { color: var(--coral-cta); }
.session-card .btn-coral { padding: 8px 20px; font-size: 14px; }

.deep-empty {
  color: var(--white-55); text-align: center;
  padding: 40px 0; font-size: 14px;
}

/* ---------- 查詢預約 ---------- */

.lookup-box { display: flex; gap: 10px; margin-top: 26px; max-width: 460px; }
.lookup-box input {
  flex: 1; min-width: 0;
  background: rgba(0, 0, 0, .22);
  border: 1px solid var(--white-14);
  border-radius: 999px;
  color: var(--foam);
  font-size: 16px; font-family: var(--mono); letter-spacing: .08em;
  padding: 11px 20px;
  text-transform: uppercase;
}
.lookup-box input::placeholder { color: var(--white-55); text-transform: none; letter-spacing: .05em; }
.lookup-box input:focus {
  outline: none; border-color: var(--aqua);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--aqua) 22%, transparent);
}
.lookup-result-card {
  margin-top: 22px;
  background: var(--white-6);
  border: 1px solid var(--white-14);
  border-radius: 16px;
  padding: 18px 20px;
  max-width: 520px;
}
.lookup-result-card .rc-title {
  font-family: var(--serif); font-weight: 700; font-size: 16px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.lookup-result-card .rc-line { color: var(--white-80); font-size: 13.5px; margin-top: 5px; }
.status-pill {
  font-size: 12px; font-weight: 700;
  padding: 2px 12px; border-radius: 999px;
}
.status-pill.ok { background: rgba(120, 220, 170, .16); color: #8CE0B8; }
.status-pill.warn { background: rgba(240, 190, 100, .16); color: #F2CC85; }
.status-pill.danger { background: rgba(240, 120, 100, .18); color: #F2A08E; }
.status-pill.plain { background: var(--white-6); color: var(--white-80); }

/* ---------- 海床 footer ---------- */

.seabed {
  position: relative;
  background: linear-gradient(to bottom, var(--w3), var(--seabed-c) 55%);
  color: var(--white-80);
  padding: 110px 20px calc(46px + env(safe-area-inset-bottom));
  text-align: center;
  overflow: hidden;
}
.seabed-scene { position: absolute; inset: 0; pointer-events: none; }
.seabed-floor {
  position: absolute; bottom: 0; left: 0; width: 100%; height: 120px;
}
.seabed-floor path { fill: rgba(0, 0, 0, .35); }
.kelp { position: absolute; bottom: 26px; color: rgba(143, 213, 218, .2); }
.kelp-1 { left: 12%; width: 34px; height: 104px; animation: kelp-sway 6s ease-in-out infinite alternate; transform-origin: bottom; }
.kelp-2 { right: 15%; width: 26px; height: 82px; animation: kelp-sway 7.5s ease-in-out infinite alternate-reverse; transform-origin: bottom; }
@keyframes kelp-sway { from { transform: rotate(-4deg); } to { transform: rotate(5deg); } }
.bubbles i {
  position: absolute; bottom: 40px;
  width: 6px; height: 6px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .25);
  animation: bubble-rise 9s linear infinite;
}
.bubbles i:nth-child(1) { left: 22%; animation-delay: 0s; }
.bubbles i:nth-child(2) { left: 30%; width: 4px; height: 4px; animation-delay: 2.4s; }
.bubbles i:nth-child(3) { left: 68%; animation-delay: 1.2s; }
.bubbles i:nth-child(4) { left: 76%; width: 4px; height: 4px; animation-delay: 4.6s; }
.bubbles i:nth-child(5) { left: 50%; width: 5px; height: 5px; animation-delay: 6.2s; }
@keyframes bubble-rise {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  12% { opacity: .8; }
  100% { transform: translateY(-320px) translateX(14px); opacity: 0; }
}

.seabed-inner { position: relative; }
.seabed-brand {
  font-family: var(--serif); font-size: 24px; font-weight: 700; color: var(--foam);
  letter-spacing: .1em;
}
.seabed-brand span {
  display: block;
  font-size: 12px; letter-spacing: .4em; text-indent: .4em;
  text-transform: uppercase; color: var(--aqua);
  margin-top: 6px; font-weight: 400;
}
.seabed-links { display: flex; gap: 20px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }
.seabed-links a {
  color: var(--aqua); text-decoration: none; font-weight: 600; font-size: 14px;
  border-bottom: 1px solid transparent;
}
.seabed-links a:hover { border-bottom-color: var(--aqua); }
.seabed-note { font-size: 13px; margin-top: 14px; color: var(--white-55); }
.seabed-copy { font-size: 12px; margin-top: 26px; color: rgba(255, 255, 255, .32); }

/* ---------- 進場顯示 ---------- */

/* 進場顯示只在 JS 掛上 gate class 後啟用；沒有 JS 時內容照常可見 */
.js-reveal .reveal { opacity: 0; transform: translateY(16px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
.js-reveal .reveal.shown { opacity: 1; transform: none; }

@media print {
  .js-reveal .reveal { opacity: 1; transform: none; }
}

/* 無動畫偏好：全部立即呈現、停用環境動效 */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .wave-back, .wave-front, .dive-cue-line, .fish-school, .kelp, .bubbles i { animation: none; }
}

/* 鍵盤焦點 */
.public-page a:focus-visible, .public-page button:focus-visible, .public-page input:focus-visible {
  outline: 2px solid var(--aqua); outline-offset: 2px;
}

/* modal 表單沿用 base.css（固定 light 卡）；深頁上加一點分離感 */
.public-page .modal { box-shadow: 0 24px 80px rgba(0, 0, 0, .5); }
