/* ==========================================================================
   35VILLA 設計系統
   層次：1. 基礎與色彩  2. 字體  3. 版面節奏  4. 元件  5. 區塊  6. 動態
   ========================================================================== */

/* ---------- 1. 基礎與色彩 ---------- */
:root {
  --paper: #f7f4ee;
  --paper-deep: #efe9dd;
  --ink: #23211e;
  --ink-soft: #5d574e;
  --ink-faint: #8c857a;
  --gold: #a18b6b;
  --gold-deep: #836e4d;
  --gold-light: #cdb894;
  --night: #1d1b18;
  --line: rgba(35, 33, 30, 0.14);
  --line-light: rgba(247, 244, 238, 0.2);

  --serif: 'Noto Serif TC', 'Songti TC', 'PMingLiU', serif;
  --display: 'Cormorant Garamond', 'Noto Serif TC', Georgia, serif;
  --sans: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --section: clamp(5rem, 12vw, 10.5rem);
  --header-h: 4.5rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.85;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

ul,
ol,
dl,
dd,
figure,
h1,
h2,
h3,
p {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

::selection {
  background: var(--gold);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 4px;
}

.on-dark :focus-visible,
.hero :focus-visible {
  outline-color: var(--gold-light);
}

.skip-link {
  position: fixed;
  top: -6rem;
  left: 1rem;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: var(--paper);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- 2. 字體 ---------- */
.display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.5rem, 7.4vw, 6.25rem);
  line-height: 1.16;
  letter-spacing: 0.04em;
}

.h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 4.4vw, 3.5rem);
  line-height: 1.3;
  letter-spacing: 0.05em;
}

.h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.3rem, 2vw, 1.65rem);
  line-height: 1.4;
  letter-spacing: 0.06em;
}

.lead {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.5vw, 2rem);
  line-height: 1.75;
  letter-spacing: 0.06em;
}

.body-soft {
  color: var(--ink-soft);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.eyebrow::before {
  content: '';
  width: 2.5rem;
  height: 1px;
  background: currentColor;
}

.on-dark .eyebrow {
  color: var(--gold-light);
}

.num {
  font-family: var(--display);
  font-variant-numeric: lining-nums tabular-nums;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* ---------- 3. 版面節奏 ---------- */
.wrap {
  width: 100%;
  max-width: 90rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section);
}

.section-head {
  display: grid;
  gap: 1.5rem;
  margin-bottom: clamp(2.5rem, 6vw, 5rem);
}

@media (min-width: 900px) {
  .section-head {
    grid-template-columns: 1fr 1fr;
    align-items: end;
    gap: 4rem;
  }

  .section-head p {
    max-width: 30rem;
    justify-self: end;
  }
}

.on-dark {
  background: var(--night);
  color: var(--paper);
}

.on-dark .body-soft {
  color: rgba(247, 244, 238, 0.72);
}

/* ---------- 4. 元件 ---------- */
/* 按鈕 */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 3.25rem;
  padding: 0 1.9rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.45s var(--ease), border-color 0.45s var(--ease);
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ink);
  transform: translateY(101%);
  transition: transform 0.5s var(--ease);
}

.btn:hover {
  color: var(--paper);
}

.btn:hover::before {
  transform: translateY(0);
}

.btn svg {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
  transition: transform 0.45s var(--ease);
}

.btn:hover svg.arrow {
  transform: translateX(4px);
}

.btn--solid {
  background: var(--ink);
  color: var(--paper);
}

.btn--solid::before {
  background: var(--gold-deep);
}

.btn--solid:hover {
  border-color: var(--gold-deep);
}

.btn--gold {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}

.btn--gold::before {
  background: var(--paper);
}

.btn--gold:hover {
  color: var(--ink);
  border-color: var(--paper);
}

.btn--light {
  border-color: rgba(247, 244, 238, 0.6);
  color: var(--paper);
}

.btn--light::before {
  background: var(--paper);
}

.btn--light:hover {
  color: var(--ink);
  border-color: var(--paper);
}

.btn--sm {
  min-height: 2.75rem;
  padding: 0 1.35rem;
  font-size: 0.85rem;
}

/* 文字連結：底線由左滑入 */
.link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding-block: 0.35rem;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform-origin: right;
  transition: transform 0.5s var(--ease);
}

.link:hover::after {
  transform: scaleX(0);
  transform-origin: left;
}

.link svg {
  width: 1rem;
  height: 1rem;
  transition: transform 0.45s var(--ease);
}

.link:hover svg {
  transform: translateX(4px);
}

/* 頁首 */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: var(--header-h);
  color: var(--ink);
  transition: transform 0.5s var(--ease), background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

.site-header .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-header.is-solid {
  background: rgba(247, 244, 238, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

.site-header.is-over-dark:not(.is-solid) {
  color: var(--paper);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
}

.brand-mark {
  position: relative;
  height: 2.6rem;
  aspect-ratio: 400 / 276;
  flex-shrink: 0;
}

.brand-mark img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.4s ease;
}

.brand-mark .is-light {
  opacity: 0;
}

.site-header.is-over-dark:not(.is-solid) .brand-mark .is-dark {
  opacity: 0;
}

.site-header.is-over-dark:not(.is-solid) .brand-mark .is-light {
  opacity: 1;
}

.brand-name {
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  line-height: 1;
}

.nav {
  display: none;
  align-items: center;
  gap: clamp(1.25rem, 2.6vw, 2.75rem);
  font-size: 0.92rem;
  letter-spacing: 0.16em;
}

.nav a:not(.btn) {
  position: relative;
  padding-block: 0.5rem;
}

.nav a:not(.btn)::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.15rem;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease);
}

.nav a:not(.btn):hover::after,
.nav a[aria-current='page']::after {
  transform: scaleX(1);
  transform-origin: left;
}

.site-header.is-over-dark:not(.is-solid) .nav .btn {
  border-color: rgba(247, 244, 238, 0.6);
}

.site-header.is-over-dark:not(.is-solid) .nav .btn::before {
  background: var(--paper);
}

.site-header.is-over-dark:not(.is-solid) .nav .btn:hover {
  color: var(--ink);
}

.menu-toggle {
  position: relative;
  z-index: 80;
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.menu-toggle span {
  width: 1.6rem;
  height: 1px;
  background: currentColor;
  transition: transform 0.45s var(--ease);
}

.menu-toggle[aria-expanded='true'] span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.menu-toggle[aria-expanded='true'] span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

@media (min-width: 900px) {
  .nav {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }
}

/* 全螢幕選單（手機） */
.menu {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--header-h) + 2rem) var(--gutter) 2.5rem;
  background: var(--night);
  color: var(--paper);
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path 0.7s var(--ease-in-out), visibility 0s 0.7s;
}

.menu.is-open {
  clip-path: inset(0);
  visibility: visible;
  transition: clip-path 0.7s var(--ease-in-out), visibility 0s;
}

.menu-links li {
  overflow: hidden;
  border-bottom: 1px solid var(--line-light);
}

.menu-links a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-block: 1.15rem;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 7vw, 2.4rem);
  letter-spacing: 0.1em;
  transform: translateY(110%);
  transition: transform 0.7s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms + 150ms);
}

.menu-links a span {
  font-family: var(--display);
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  color: var(--gold-light);
}

.menu.is-open .menu-links a {
  transform: none;
}

.menu-foot {
  display: grid;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: rgba(247, 244, 238, 0.7);
}

.menu-foot a {
  font-family: var(--display);
  font-size: 1.6rem;
  letter-spacing: 0.1em;
  color: var(--paper);
}

body.menu-open .site-header {
  color: var(--paper);
  background: transparent;
  border-color: transparent;
  backdrop-filter: none;
  transform: none;
}

body.menu-open .brand-mark .is-dark {
  opacity: 0;
}

body.menu-open .brand-mark .is-light {
  opacity: 1;
}

/* 照片框：捲動進場時由下往上揭開 */
.frame {
  position: relative;
  overflow: hidden;
  background: var(--paper-deep);
}

.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.frame--zoom img {
  transition: transform 1.2s var(--ease);
}

a:hover .frame--zoom img,
.frame--zoom:hover img {
  transform: scale(1.06);
}

.photo-pending {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: var(--paper-deep);
  color: var(--ink-faint);
  font-size: 0.85rem;
  letter-spacing: 0.24em;
}

.photo-pending img {
  width: 42%;
  max-width: 11rem;
  height: auto;
  opacity: 0.28;
}

/* 規格標籤 */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chips li {
  padding: 0.3rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.on-dark .chips li {
  border-color: var(--line-light);
  color: rgba(247, 244, 238, 0.85);
}

.price {
  font-family: var(--display);
  font-size: clamp(1.7rem, 2.6vw, 2.2rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
}

.price small {
  margin-left: 0.4rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
}

.on-dark .price small {
  color: rgba(247, 244, 238, 0.6);
}

/* ---------- 5. 區塊 ---------- */
/* 5-1 首頁主視覺 */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: var(--paper);
  background: var(--night);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: -6% 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: hero-drift 22s ease-out forwards;
}

@keyframes hero-drift {
  from {
    transform: scale(1.14);
  }

  to {
    transform: scale(1);
  }
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 18, 16, 0.55) 0%, rgba(20, 18, 16, 0.12) 34%, rgba(20, 18, 16, 0.3) 60%, rgba(20, 18, 16, 0.86) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: calc(var(--header-h) + 3rem);
  padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.hero .eyebrow {
  color: var(--paper);
  margin-bottom: 1.5rem;
}

.hero-title {
  max-width: 14em;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.35);
}

.hero-foot {
  display: grid;
  gap: 2rem;
  margin-top: clamp(1.75rem, 4vw, 3rem);
  padding-top: clamp(1.5rem, 3vw, 2.25rem);
  border-top: 1px solid var(--line-light);
}

.hero-foot p {
  max-width: 28rem;
  font-size: 1.02rem;
  color: rgba(247, 244, 238, 0.86);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

@media (min-width: 900px) {
  .hero-foot {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
}

.scroll-cue {
  position: absolute;
  right: var(--gutter);
  top: 50%;
  z-index: 2;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  font-family: var(--display);
  font-size: 0.8rem;
  letter-spacing: 0.34em;
  writing-mode: vertical-rl;
  color: rgba(247, 244, 238, 0.8);
}

.scroll-cue::after {
  content: '';
  width: 1px;
  height: 4.5rem;
  background: linear-gradient(var(--paper), var(--paper)) no-repeat top / 100% 40%, rgba(247, 244, 238, 0.25);
  animation: cue 2.4s var(--ease-in-out) infinite;
}

@keyframes cue {
  0% {
    background-position: 0 -40%, 0 0;
  }

  100% {
    background-position: 0 240%, 0 0;
  }
}

@media (min-width: 900px) {
  .scroll-cue {
    display: flex;
  }
}

/* 5-2 跑馬燈 */
.marquee {
  overflow: hidden;
  padding-block: clamp(1.1rem, 2.4vw, 1.9rem);
  border-block: 1px solid var(--line);
  white-space: nowrap;
}

.marquee-track {
  display: inline-flex;
  animation: marquee 38s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-track span {
  display: inline-flex;
  align-items: center;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.4vw, 1.9rem);
  letter-spacing: 0.16em;
}

.marquee-track span::after {
  content: '';
  width: 0.45rem;
  height: 0.45rem;
  margin-inline: clamp(1.5rem, 3.5vw, 3.25rem);
  border-radius: 50%;
  background: var(--gold);
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* 5-3 簡介 */
.intro-grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
}

.intro-copy {
  display: grid;
  gap: 2rem;
  align-content: start;
}

.intro-copy .body-soft {
  max-width: 32rem;
}

.intro-media {
  position: relative;
  padding-bottom: 18%;
}

.intro-media .frame:first-child {
  width: 78%;
  aspect-ratio: 4 / 5;
}

.intro-media .frame:last-child {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 52%;
  aspect-ratio: 1;
  border: 0.6rem solid var(--paper);
}

@media (min-width: 900px) {
  .intro-grid {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
  }
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin-top: clamp(3.5rem, 8vw, 7rem);
  border-top: 1px solid var(--line);
}

.stats li {
  padding: clamp(1.5rem, 3vw, 2.5rem) 0.5rem clamp(1.5rem, 3vw, 2.5rem) 0;
  border-bottom: 1px solid var(--line);
}

.stats strong {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3rem, 7.2vw, 6rem);
  line-height: 1;
  letter-spacing: 0.02em;
}

.stats strong small {
  margin-left: 0.35rem;
  font-family: var(--serif);
  font-size: 0.26em;
  letter-spacing: 0.16em;
  color: var(--gold-deep);
}

.stats li > span {
  display: block;
  margin-top: 0.8rem;
  font-size: 0.88rem;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
}

@media (min-width: 900px) {
  .stats {
    grid-template-columns: repeat(4, 1fr);
  }

  .stats li + li {
    padding-left: clamp(1.25rem, 2.5vw, 2.5rem);
    border-left: 1px solid var(--line);
  }
}

/* 5-4 空間：橫向捲動展廊 */
.spaces {
  background: var(--paper-deep);
}

.spaces-pin {
  padding-block: var(--section) clamp(3rem, 7vw, 6rem);
  overflow: hidden;
}

.spaces-track {
  display: flex;
  gap: clamp(1rem, 2.4vw, 2.25rem);
  padding-inline: var(--gutter);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.spaces-track::-webkit-scrollbar {
  display: none;
}

.space-card {
  flex: 0 0 auto;
  width: min(78vw, 30rem);
  scroll-snap-align: center;
}

.space-card .frame {
  aspect-ratio: 4 / 5;
}

.space-card:nth-child(even) .frame {
  aspect-ratio: 4 / 4.2;
}

.space-card figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  font-family: var(--serif);
  font-size: 1.08rem;
  letter-spacing: 0.1em;
}

.space-card figcaption .num {
  font-size: 0.95rem;
  letter-spacing: 0.2em;
  color: var(--gold-deep);
}

.spaces-progress {
  height: 1px;
  margin: clamp(2rem, 4vw, 3.5rem) var(--gutter) 0;
  background: var(--line);
}

.spaces-progress i {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--ink);
  transform: scaleX(0.08);
  transform-origin: left;
}

/* 桌機：區塊釘住，垂直捲動轉為橫向移動 */
@media (min-width: 900px) and (prefers-reduced-motion: no-preference) {
  .js .spaces.is-pinned {
    height: var(--pin-height, 300vh);
  }

  .js .spaces.is-pinned .spaces-pin {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-block: calc(var(--header-h) + 1rem) 2.5rem;
  }

  .js .spaces.is-pinned .section-head {
    margin-bottom: clamp(1.5rem, 3vh, 3rem);
  }

  .js .spaces.is-pinned .spaces-track {
    overflow: visible;
    scroll-snap-type: none;
    will-change: transform;
  }

  .js .spaces.is-pinned .space-card {
    width: clamp(18rem, 26vw, 26rem);
  }

  .js .spaces.is-pinned .space-card .frame {
    aspect-ratio: auto;
    height: min(48vh, 30rem);
  }

  .js .spaces.is-pinned .space-card:nth-child(even) {
    margin-top: 6vh;
  }

  .js .spaces.is-pinned .space-card:nth-child(even) .frame {
    height: min(42vh, 26rem);
  }
}

/* 5-5 房型 */
.rooms-grid {
  display: grid;
  gap: clamp(2.75rem, 5vw, 4.5rem) clamp(1.25rem, 2.6vw, 2.5rem);
}

.room-card {
  display: block;
}

.room-card .frame {
  aspect-ratio: 4 / 5;
}

.room-card-tag {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  padding: 0.25rem 0.9rem;
  background: rgba(247, 244, 238, 0.92);
  color: var(--ink);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  border-radius: 999px;
}

.room-card-body {
  display: grid;
  gap: 0.55rem;
  padding-top: 1.25rem;
}

.room-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.room-card-top .num {
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  color: var(--gold-deep);
}

.room-card p {
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.room-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.6rem;
  padding-top: 0.95rem;
  border-top: 1px solid var(--line);
}

.room-card-foot .go {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: background 0.45s var(--ease), color 0.45s var(--ease), border-color 0.45s var(--ease), transform 0.45s var(--ease);
}

.room-card-foot .go svg {
  width: 1rem;
  height: 1rem;
}

.room-card:hover .go {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  transform: rotate(-45deg);
}

@media (min-width: 640px) {
  .rooms-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .rooms-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* 中間欄下移，製造錯落節奏 */
  .rooms-grid > :nth-child(3n + 2) {
    margin-top: 5rem;
  }
}

.note {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}

/* 5-6 包棟：深色全幅，節奏轉折 */
.villa {
  position: relative;
  overflow: hidden;
}

.villa-media {
  position: absolute;
  inset: -12% 0;
}

.villa-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.villa::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(20, 18, 16, 0.92) 0%, rgba(20, 18, 16, 0.78) 45%, rgba(20, 18, 16, 0.45) 100%);
}

.villa .wrap {
  position: relative;
  z-index: 2;
}

.villa-inner {
  display: grid;
  gap: 2rem;
  max-width: 40rem;
  padding-block: clamp(6rem, 16vw, 13rem);
}

.villa-price {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem 2.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line-light);
}

.villa-price .price {
  font-size: clamp(2.4rem, 5vw, 3.75rem);
  color: var(--gold-light);
}

/* 5-7 位置與聯絡 */
.visit-grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 5rem);
}

.visit-copy {
  display: grid;
  gap: 2rem;
  align-content: center;
}

.tel {
  display: inline-block;
  font-family: var(--display);
  font-size: clamp(2.6rem, 7.6vw, 5.75rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.04em;
  background: linear-gradient(currentColor, currentColor) no-repeat left bottom / 0 1px;
  transition: background-size 0.7s var(--ease), color 0.4s ease;
}

.tel:hover {
  color: var(--gold-deep);
  background-size: 100% 1px;
}

.info-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.info-list div {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--line);
}

.info-list dt {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
}

.map {
  position: relative;
  min-height: 22rem;
  background: var(--paper-deep);
}

.map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(1) contrast(0.95) sepia(0.12);
  transition: filter 0.6s ease;
}

.map:hover iframe {
  filter: none;
}

@media (min-width: 900px) {
  .visit-grid {
    grid-template-columns: 1fr 1fr;
  }

  .map {
    min-height: 34rem;
  }
}

/* 5-8 頁尾 */
.site-footer {
  padding-block: clamp(4rem, 9vw, 7rem) 2rem;
}

.footer-top {
  display: grid;
  gap: 3rem;
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

.footer-logo {
  width: clamp(11rem, 20vw, 16rem);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem 2rem;
}

.footer-cols h3 {
  margin-bottom: 1rem;
  font-family: var(--display);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.footer-cols li {
  padding-block: 0.25rem;
  color: rgba(247, 244, 238, 0.82);
}

.footer-cols a {
  transition: color 0.3s ease;
}

.footer-cols a:hover {
  color: var(--gold-light);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-light);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: rgba(247, 244, 238, 0.55);
}

@media (min-width: 900px) {
  .footer-top {
    grid-template-columns: 1fr 1.4fr;
    align-items: start;
  }

  .footer-cols {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 5-9 內頁標題 */
.page-hero {
  padding-top: calc(var(--header-h) + clamp(3.5rem, 9vw, 7.5rem));
  padding-bottom: clamp(2.5rem, 6vw, 5rem);
}

.page-hero .eyebrow {
  margin-bottom: 1.5rem;
}

.page-hero p {
  max-width: 34rem;
  margin-top: 1.5rem;
  color: var(--ink-soft);
}

/* 5-10 房型頁 */
.room-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 244, 238, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-block: 1px solid var(--line);
  transition: top 0.5s var(--ease);
}

body.header-visible .room-nav {
  top: var(--header-h);
}

.room-nav ul {
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.75rem);
  padding-inline: var(--gutter);
  overflow-x: auto;
  scrollbar-width: none;
}

.room-nav ul::-webkit-scrollbar {
  display: none;
}

.room-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 3.4rem;
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  white-space: nowrap;
  color: var(--ink-faint);
  transition: color 0.3s ease;
}

.room-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transition: transform 0.45s var(--ease);
}

.room-nav a:hover,
.room-nav a.is-active {
  color: var(--ink);
}

.room-nav a.is-active::after {
  transform: scaleX(1);
}

.room {
  display: grid;
  gap: clamp(1.75rem, 4vw, 4.5rem);
  padding-block: clamp(3.5rem, 8vw, 7rem);
  border-bottom: 1px solid var(--line);
}

.room-info {
  display: grid;
  gap: 1.5rem;
  align-content: center;
}

.room-info .num {
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  font-weight: 400;
  line-height: 0.9;
  color: var(--gold);
  opacity: 0.55;
}

.room-buy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

@media (min-width: 900px) {
  .room {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
  }

  .room:nth-of-type(even) .room-media {
    order: 2;
  }
}

.room--villa {
  border-bottom: 0;
}

/* 照片輪播 */
.carousel {
  position: relative;
}

.carousel-inner {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  background: var(--paper-deep);
}

.carousel-inner::-webkit-scrollbar {
  display: none;
}

.carousel-inner img {
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

.carousel-ui {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.9rem;
}

.carousel-count {
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
}

.carousel-btns {
  display: flex;
  gap: 0.5rem;
}

.carousel-btn {
  width: 2.9rem;
  height: 2.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease);
}

.carousel-btn:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.carousel-btn svg {
  width: 1rem;
  height: 1rem;
}

.carousel-btn.left svg {
  transform: rotate(180deg);
}

.carousel .frame-static {
  position: relative;
  aspect-ratio: 4 / 3;
}

/* 5-11 聯絡頁 FAQ */
.faq {
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.35rem;
  font-family: var(--serif);
  font-size: 1.12rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '';
  flex-shrink: 0;
  width: 0.8rem;
  height: 0.8rem;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.45s var(--ease);
}

.faq details[open] summary::after {
  transform: rotate(-135deg) translate(-2px, -2px);
}

.faq details p {
  padding-bottom: 1.5rem;
  max-width: 38rem;
  color: var(--ink-soft);
}

/* 5-12 手機底部操作列 */
.mobile-cta {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 50;
  display: flex;
  gap: 0.6rem;
  padding: 0.7rem var(--gutter) calc(0.7rem + env(safe-area-inset-bottom));
  background: rgba(247, 244, 238, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform 0.6s var(--ease);
}

.mobile-cta.is-shown {
  transform: none;
}

.mobile-cta .btn {
  flex: 1;
  min-height: 3rem;
  padding: 0 0.75rem;
}

@media (max-width: 899px) {
  body.has-mobile-cta {
    padding-bottom: calc(4.4rem + env(safe-area-inset-bottom));
  }
}

@media (min-width: 900px) {
  .mobile-cta {
    display: none;
  }
}

/* 開場畫面 */
.loader {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--paper);
}

.js.is-loading .loader {
  display: flex;
}

.loader img {
  width: min(46vw, 13rem);
  animation: loader-in 1.1s var(--ease) both;
}

.loader.is-done {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.9s var(--ease-in-out);
}

@keyframes loader-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* ---------- 6. 動態：捲動進場 ---------- */
/* 只有在 JS 啟用時才先隱藏，避免腳本失效時內容消失 */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(2.25rem);
  transition: opacity 1s var(--ease), transform 1.1s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

.js [data-reveal='frame'] {
  opacity: 1;
  transform: none;
}

/* 以同色布幕由上往下收起來揭開照片（不裁切元素本身，進場偵測才準確） */
.js [data-reveal='frame']::after {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: 3;
  background: var(--paper);
  transform-origin: bottom;
  transition: transform 1.3s var(--ease-in-out);
  transition-delay: calc(var(--i, 0) * 110ms);
}

.js [data-reveal='frame'] > img,
.js [data-reveal='frame'] > iframe {
  transform: scale(1.18);
  transition: transform 1.8s var(--ease), filter 0.6s ease;
  transition-delay: calc(var(--i, 0) * 110ms);
}

.js [data-reveal='frame'].is-in::after {
  transform: scaleY(0);
}

.js [data-reveal='frame'].is-in > img,
.js [data-reveal='frame'].is-in > iframe {
  transform: scale(1);
}

.js [data-reveal='line'] {
  opacity: 1;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.4s var(--ease-in-out);
}

.js [data-reveal='line'].is-in {
  transform: scaleX(1);
}

/* 標題逐行上浮 */
.split-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
}

.split-line > span {
  display: block;
}

.js [data-split] .split-line > span {
  transform: translateY(108%);
  transition: transform 1.2s var(--ease);
  transition-delay: calc(var(--i, 0) * 120ms + var(--d, 0ms));
}

.js [data-split].is-in .split-line > span {
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  .js [data-reveal],
  .js [data-reveal='frame'],
  .js [data-reveal='frame'] > img,
  .js [data-reveal='frame'] > iframe,
  .js [data-reveal='line'],
  .js [data-split] .split-line > span {
    opacity: 1;
    transform: none;
    clip-path: none;
  }

  .marquee-track {
    animation: none;
  }

  .hero-media img {
    animation: none;
  }

  .js [data-reveal='frame']::after {
    display: none;
  }
}

/* ==========================================================================
   7. 商業轉換元件：主視覺輪播、賣點、價格方案、人數試算、流程、浮動按鈕
   ========================================================================== */
.btn--lg {
  min-height: 3.75rem;
  padding: 0 2.25rem;
  font-size: 1.02rem;
}

.btn--gold {
  box-shadow: 0 14px 34px -14px rgba(161, 139, 107, 0.9);
}

.btn--call {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: 0.1em;
}

.btn--call::before {
  background: var(--gold-deep);
}

.btn--call:hover {
  border-color: var(--gold-deep);
}

.site-header.is-over-dark:not(.is-solid) .nav .btn--call {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}

/* 主視覺輪播 */
.hero {
  align-items: center;
}

.hero-media {
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.12);
  transition: opacity 1.8s ease, transform 8s linear;
  animation: none !important;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero::after {
  background:
    linear-gradient(90deg, rgba(20, 18, 16, 0.78) 0%, rgba(20, 18, 16, 0.45) 48%, rgba(20, 18, 16, 0.18) 100%),
    linear-gradient(180deg, rgba(20, 18, 16, 0.5) 0%, rgba(20, 18, 16, 0) 30%, rgba(20, 18, 16, 0.75) 100%);
}

.hero-inner {
  padding-bottom: clamp(5.5rem, 10vw, 7rem);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 0.3rem 1rem 0.3rem 0.3rem;
  border: 1px solid rgba(247, 244, 238, 0.35);
  border-radius: 999px;
  background: rgba(20, 18, 16, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0.88rem;
  letter-spacing: 0.14em;
}

.hero-badge span {
  padding: 0.2rem 0.85rem;
  border-radius: 999px;
  background: var(--gold);
  color: #fff;
}

.hero-title {
  font-size: clamp(2.6rem, 7.8vw, 6.5rem);
  font-weight: 600;
}

.hero-sub {
  max-width: 36rem;
  margin-top: 1.5rem;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: rgba(247, 244, 238, 0.92);
}

.hero .hero-actions {
  margin-top: 2.25rem;
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem 2rem;
  max-width: 46rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-light);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  color: rgba(247, 244, 238, 0.82);
}

.hero-facts strong {
  display: block;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.1rem, 3.6vw, 3rem);
  line-height: 1.1;
  letter-spacing: 0.04em;
  color: var(--paper);
}

@media (min-width: 700px) {
  .hero-facts {
    grid-template-columns: repeat(4, 1fr);
  }
}

.hero-dots {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(1.75rem, 4vw, 3rem);
  z-index: 2;
  display: flex;
  gap: 0.5rem;
}

.hero-dots i {
  width: 2.25rem;
  height: 2px;
  background: rgba(247, 244, 238, 0.35);
  overflow: hidden;
}

.hero-dots i.is-active {
  background: linear-gradient(var(--paper), var(--paper)) no-repeat left / 0 100%, rgba(247, 244, 238, 0.35);
  animation: dot-fill 5.5s linear forwards;
}

@keyframes dot-fill {
  to {
    background-size: 100% 100%, auto;
  }
}

/* 深色跑馬燈 */
.marquee--dark {
  background: var(--ink);
  color: var(--paper);
  border: 0;
}

.marquee--dark .marquee-track span {
  font-size: clamp(1rem, 1.8vw, 1.4rem);
}

/* 賣點 */
.usp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.usp {
  position: relative;
  padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1rem, 2.4vw, 2rem);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  transition: color 0.5s var(--ease);
}

.usp::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ink);
  transform: translateY(101%);
  transition: transform 0.6s var(--ease);
}

.usp svg {
  width: 2.4rem;
  height: 2.4rem;
  margin-bottom: 1.5rem;
  color: var(--gold-deep);
  transition: color 0.5s var(--ease), transform 0.6s var(--ease);
}

.usp h3 {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  font-weight: 500;
  letter-spacing: 0.08em;
}

.usp p {
  margin-top: 0.5rem;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--ink-soft);
  transition: color 0.5s var(--ease);
}

@media (hover: hover) {
  .usp:hover {
    color: var(--paper);
  }

  .usp:hover::before {
    transform: none;
  }

  .usp:hover svg {
    color: var(--gold-light);
    transform: translateY(-4px);
  }

  .usp:hover p {
    color: rgba(247, 244, 238, 0.75);
  }
}

@media (min-width: 900px) {
  .usp-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* 價格方案 */
.pricing {
  background: var(--paper-deep);
}

.plans {
  display: grid;
  gap: 1.25rem;
  align-items: stretch;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: clamp(1.75rem, 3vw, 2.75rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}

.plan:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px -30px rgba(35, 33, 30, 0.35);
}

.plan-kicker {
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  color: var(--gold-deep);
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.plan-price .num {
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
}

.plan-price small {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
}

.plan-per {
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.plan-list {
  display: grid;
  gap: 0.7rem;
  margin: 1.25rem 0 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.93rem;
  flex: 1;
  align-content: start;
}

.plan-list li {
  display: flex;
  gap: 0.7rem;
  line-height: 1.6;
}

.plan-list svg {
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.2rem;
  color: var(--gold-deep);
}

.plan .btn {
  width: 100%;
}

.plan--featured {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  box-shadow: 0 40px 80px -40px rgba(35, 33, 30, 0.7);
}

.plan--featured .plan-kicker,
.plan--featured .plan-list svg {
  color: var(--gold-light);
}

.plan--featured .plan-price .num {
  color: var(--gold-light);
}

.plan--featured .plan-per {
  color: var(--paper);
  font-weight: 500;
}

.plan--featured .plan-price small {
  color: rgba(247, 244, 238, 0.6);
}

.plan--featured .plan-list {
  border-color: var(--line-light);
}

.plan-flag {
  position: absolute;
  top: -0.9rem;
  left: clamp(1.75rem, 3vw, 2.75rem);
  padding: 0.25rem 1rem;
  border-radius: 999px;
  background: var(--gold);
  color: #fff;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
}

@media (min-width: 900px) {
  .plans {
    grid-template-columns: 1fr 1.12fr 1fr;
    gap: 1.5rem;
  }

  .plan--featured {
    margin-block: -1.5rem;
    padding-block: clamp(3rem, 4.5vw, 4.25rem);
  }
}

/* 人數試算 */
.calc {
  display: grid;
  margin-top: clamp(3.5rem, 7vw, 6rem);
  border-radius: 1.5rem;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
}

.calc-ask,
.calc-result {
  padding: clamp(1.75rem, 4vw, 3.5rem);
}

.calc-ask {
  display: grid;
  gap: 1.75rem;
  align-content: center;
}

.calc-ask .h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.6rem);
}

.calc-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 2rem;
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 1rem;
  letter-spacing: 0.1em;
}

.stepper button {
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.stepper button:hover {
  background: var(--ink);
  color: var(--paper);
}

.stepper button:active {
  transform: scale(0.92);
}

.stepper svg {
  width: 1.1rem;
  height: 1.1rem;
}

.stepper output {
  min-width: 2.2ch;
  text-align: center;
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 500;
  line-height: 1;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.92rem;
  cursor: pointer;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch i {
  position: relative;
  width: 3rem;
  height: 1.7rem;
  border-radius: 999px;
  background: rgba(35, 33, 30, 0.2);
  transition: background 0.3s ease;
}

.switch i::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(1.7rem - 6px);
  height: calc(1.7rem - 6px);
  border-radius: 50%;
  background: #fff;
  transition: transform 0.35s var(--ease);
}

.switch input:checked + i {
  background: var(--gold-deep);
}

.switch input:checked + i::after {
  transform: translateX(1.3rem);
}

.switch input:focus-visible + i {
  outline: 2px solid var(--gold-deep);
  outline-offset: 3px;
}

.calc-range {
  width: 100%;
  accent-color: var(--gold-deep);
}

.calc-result {
  display: grid;
  gap: 0.5rem;
  align-content: center;
  background: var(--ink);
  color: var(--paper);
}

.calc-label {
  font-size: 0.82rem;
  letter-spacing: 0.24em;
  color: var(--gold-light);
}

.calc-plan {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  letter-spacing: 0.06em;
  line-height: 1.4;
}

.calc-total {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.calc-total .num {
  font-size: clamp(2.8rem, 5.4vw, 4.4rem);
  font-weight: 500;
  line-height: 1;
  color: var(--gold-light);
}

.calc-total small {
  font-size: 0.85rem;
  color: rgba(247, 244, 238, 0.6);
}

.calc-per {
  font-weight: 500;
  letter-spacing: 0.06em;
}

.calc-tip {
  min-height: 1.6em;
  font-size: 0.88rem;
  color: var(--gold-light);
}

.calc-result .btn {
  margin-top: 1rem;
  justify-self: start;
}

.calc-note {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: rgba(247, 244, 238, 0.55);
}

.calc-result.is-bump .calc-total .num {
  animation: bump 0.5s var(--ease);
}

@keyframes bump {
  0% {
    transform: translateY(0.35em);
    opacity: 0.2;
  }
}

@media (min-width: 900px) {
  .calc {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

/* 適合場合 */
.occasions {
  display: grid;
  gap: 1.5rem;
}

.occasion {
  position: relative;
  color: var(--paper);
  border-radius: 1.25rem;
  overflow: hidden;
}

.occasion .frame {
  aspect-ratio: 3 / 4;
}

.occasion .frame::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(20, 18, 16, 0) 35%, rgba(20, 18, 16, 0.88) 100%);
}

.occasion-body {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  display: grid;
  gap: 0.5rem;
  padding: clamp(1.25rem, 2.6vw, 2rem);
}

.occasion-body .num {
  font-size: 0.95rem;
  letter-spacing: 0.24em;
  color: var(--gold-light);
}

.occasion-body p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(247, 244, 238, 0.85);
}

@media (min-width: 800px) {
  .occasions {
    grid-template-columns: repeat(3, 1fr);
  }

  .occasion:nth-child(2) {
    margin-top: 3.5rem;
  }
}

.center-cta {
  display: flex;
  justify-content: center;
  margin-top: clamp(3rem, 6vw, 5rem);
}

.room-card .frame {
  border-radius: 1rem;
}

.space-card .frame {
  border-radius: 1rem;
}

/* 預約流程 */
.steps {
  display: grid;
  gap: 0;
  counter-reset: step;
  border-top: 1px solid var(--line);
}

.steps li {
  display: grid;
  gap: 0.6rem;
  padding-block: clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--line);
}

.steps .num {
  font-size: clamp(2.6rem, 5vw, 4rem);
  line-height: 1;
  color: var(--gold);
}

.steps p {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

@media (min-width: 800px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid var(--line);
  }

  .steps li {
    border-bottom: 0;
    padding-inline: clamp(1.25rem, 2.6vw, 2.5rem);
  }

  .steps li:first-child {
    padding-left: 0;
  }

  .steps li + li {
    border-left: 1px solid var(--line);
  }
}

.villa-price {
  gap: 1.25rem 1.75rem;
}

/* 收尾 */
.closing {
  padding-block: clamp(5rem, 12vw, 9rem);
  text-align: center;
  border-bottom: 1px solid var(--line-light);
}

.closing .hero-actions {
  justify-content: center;
  margin-top: 2.5rem;
}

/* 桌機浮動來電按鈕 */
.fab {
  position: fixed;
  right: 1.75rem;
  bottom: 1.75rem;
  z-index: 45;
  display: none;
  align-items: center;
  gap: 0.7rem;
  height: 3.6rem;
  padding: 0 1.5rem;
  border-radius: 999px;
  background: var(--gold);
  color: #fff;
  font-weight: 500;
  letter-spacing: 0.14em;
  box-shadow: 0 18px 40px -16px rgba(35, 33, 30, 0.6);
  transform: translateY(160%);
  transition: transform 0.6s var(--ease), background 0.3s ease;
}

.fab svg {
  width: 1.2rem;
  height: 1.2rem;
}

.fab::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid var(--gold);
  animation: fab-pulse 2.4s ease-out infinite;
}

@keyframes fab-pulse {
  to {
    transform: scale(1.25, 1.5);
    opacity: 0;
  }
}

.fab.is-shown {
  transform: none;
}

.fab:hover {
  background: var(--gold-deep);
}

@media (min-width: 900px) {
  .fab {
    display: inline-flex;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide {
    transform: none;
  }

  .fab::after {
    display: none;
  }
}

.hero-facts strong small {
  margin-left: 0.3rem;
  font-family: var(--serif);
  font-size: 0.4em;
  letter-spacing: 0.1em;
  color: var(--gold-light);
}
