/* ==========================================================================
   Luxmin Pack — base：色彩、字級、共用元件（導覽、按鈕、雙層外框、進場動畫）
   單一外觀：粉橘暖底 + 深色螢幕。不跟隨系統深色模式。
   色票集中在下面的 :root，換底色只要改這幾行。
   ========================================================================== */

:root {
  /* 色彩 */
  --bg: #F9EDE4;
  --bg-deep: #F2E0D2;
  --paper: #FFFAF6;
  --ink: #171210;
  --ink-2: #5B4C44;
  --ink-3: #9A877C;
  --hair: rgba(92, 52, 36, 0.10);
  --hair-2: rgba(92, 52, 36, 0.18);
  --screen: #0B0B0C;
  --screen-2: #141416;
  --night: #14100D;
  --on-dark: #F3F1EC;
  --on-dark-2: rgba(243, 241, 236, 0.62);
  --on-dark-3: rgba(243, 241, 236, 0.38);
  --lux: #FF5B22;
  --lux-soft: #FFB27A;
  --glow: #FFE9CF;

  /* 字 */
  --font-sans: "Geist", "Noto Sans TC", "PingFang TC", "Heiti TC", system-ui, sans-serif;
  --font-mono: "Geist Mono", "Noto Sans TC", ui-monospace, "SF Mono", monospace;
  --font-hand: "Iansui", "Noto Sans TC", cursive;

  --fs-display: clamp(2.6rem, 1.1rem + 4.5vw, 5.4rem);
  --fs-section: clamp(2.05rem, 1.1rem + 2.6vw, 3.7rem);
  --fs-lede: clamp(1.02rem, 0.95rem + 0.3vw, 1.2rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-micro: 0.6875rem;

  /* 空間 */
  --gutter: clamp(1rem, 4vw, 3rem);
  --section-y: clamp(6rem, 11vw, 10.5rem);
  --radius-xl: 2rem;
  --radius-lg: 1.5rem;
  --bezel-pad: 0.375rem;

  /* 動態 */
  --ease-out: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-spring: cubic-bezier(0.34, 1.36, 0.64, 1);
  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);

  /* 陰影：大、淡、暖 */
  --shadow-float: 0 1px 1px rgba(40, 30, 20, 0.04), 0 12px 24px -12px rgba(40, 30, 20, 0.10), 0 40px 80px -40px rgba(40, 30, 20, 0.22);
  --shadow-device: 0 2px 2px rgba(20, 16, 12, 0.06), 0 24px 48px -20px rgba(20, 16, 12, 0.28), 0 80px 120px -60px rgba(20, 16, 12, 0.35);

  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.75;
  letter-spacing: 0.01em;
  font-feature-settings: "palt" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  line-break: strict;
  overflow-x: clip;
}

img, canvas, svg { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
ul, ol, dl, dd, figure, h1, h2, h3, p { margin: 0; padding: 0; }
ul, ol { list-style: none; }
[hidden] { display: none !important; }
.nowrap { white-space: nowrap; }

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

:focus-visible {
  outline: 2px solid var(--lux);
  outline-offset: 3px;
  border-radius: 999px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 40;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  transition: transform 0.5s var(--ease-out);
}
.skip:focus { transform: translateY(5rem); }

/* 紙感顆粒：固定層、不吃事件 */
.grain {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* ─────────── 版面 ─────────── */
.container {
  width: 100%;
  max-width: 82rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

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

/* ─────────── 字 ─────────── */
.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  line-height: 1.5;
}

.h-display {
  font-size: var(--fs-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.h-section {
  font-size: var(--fs-section);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.lede {
  font-size: var(--fs-lede);
  line-height: 1.85;
  color: var(--ink-2);
  max-width: 34em;
  text-wrap: pretty;
}

/* ── 中文斷行 ──
   小標題求上下行平衡，內文避免最後一行只剩一兩個字，
   數字與短標籤整塊不拆。line-break: strict 在 body 上已經開了。 */
h3, h4 { text-wrap: balance; }
p, li, dd, dt, figcaption, .fine { text-wrap: pretty; }
.price strong, .plan__price strong, .tile__price, .stat strong, .spec dd .nowrap { white-space: nowrap; }
/* 標題裡的硬換行：版面變窄就交還給 text-wrap: balance */
@media (max-width: 1100px) { .br-wide { display: none; } }
@media (max-width: 370px) { .h-display br, .h-section br, .cta__title br { display: none; } }
.section--dark .lede { color: var(--on-dark-2); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.38rem 0.85rem 0.38rem 0.75rem;
  border-radius: 999px;
  background: rgba(92, 52, 36, 0.045);
  box-shadow: inset 0 0 0 1px var(--hair);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 1.6rem;
}
.eyebrow--dark {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  color: var(--on-dark-2);
}

/* 指示燈 */
.led {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--lux);
  box-shadow: 0 0 0 3px rgba(255, 91, 34, 0.16), 0 0 12px rgba(255, 91, 34, 0.7);
  flex: none;
}
.led--live { animation: led-pulse 2.4s var(--ease-soft) infinite; }
@keyframes led-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}

.logo-dot {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FFD2B0, var(--lux) 55%, #D93E0C);
  box-shadow: 0 0 14px rgba(255, 91, 34, 0.55);
  flex: none;
}

/* ─────────── 雙層外框（Doppelrand）─────────── */
.bezel {
  padding: var(--bezel-pad);
  border-radius: var(--radius-xl);
  background: rgba(92, 52, 36, 0.035);
  box-shadow: inset 0 0 0 1px var(--hair);
}
.bezel > .bezel__core {
  height: 100%;
  border-radius: calc(var(--radius-xl) - var(--bezel-pad));
  background: var(--paper);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.9), var(--shadow-float);
}
.bezel--dark {
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.bezel--dark > .bezel__core {
  background: var(--screen-2);
  color: var(--on-dark);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08), 0 30px 60px -30px rgba(0, 0, 0, 0.5);
}

/* ─────────── 按鈕（按鈕中的按鈕）─────────── */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
  --icon-bg: rgba(255, 255, 255, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  min-height: 3.25rem;
  padding: 0.4rem 0.4rem 0.4rem 1.5rem;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: transform 0.6s var(--ease-out), translate 0.7s var(--ease-out), background-color 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 10px 24px -12px rgba(92, 52, 36, 0.45);
  will-change: transform;
}
.btn:active { transform: scale(0.98); }
.btn__icon {
  display: grid;
  place-items: center;
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 50%;
  background: var(--icon-bg);
  flex: none;
  transition: transform 0.6s var(--ease-spring), background-color 0.6s var(--ease-out);
}
.btn__icon svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn:hover .btn__icon { transform: translate(3px, -1px) scale(1.06); }
.btn:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 16px 32px -14px rgba(92, 52, 36, 0.5); }

.btn--ghost {
  --btn-bg: rgba(92, 52, 36, 0.05);
  --btn-fg: var(--ink);
  --icon-bg: rgba(92, 52, 36, 0.07);
  box-shadow: inset 0 0 0 1px var(--hair);
}
.btn--ghost:hover { --btn-bg: rgba(92, 52, 36, 0.08); box-shadow: inset 0 0 0 1px var(--hair-2); }
.btn--ghost:hover .btn__icon[aria-hidden] svg path[d^="M8 3"] { transform: none; }

.btn--light {
  --btn-bg: var(--on-dark);
  --btn-fg: var(--ink);
  --icon-bg: rgba(92, 52, 36, 0.08);
}
.btn--glass {
  --btn-bg: rgba(255, 255, 255, 0.07);
  --btn-fg: var(--on-dark);
  --icon-bg: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.btn--sm { min-height: 2.6rem; padding-left: 1.1rem; font-size: 0.85rem; gap: 0.6rem; }
.btn--sm .btn__icon { width: 1.95rem; height: 1.95rem; }
.btn--block { width: 100%; }

/* ─────────── 浮動導覽島 ─────────── */
.nav {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.35rem 0.35rem 1.2rem;
  border-radius: 999px;
  background: rgba(255, 250, 246, 0.72);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), 0 0 0 1px var(--hair), 0 18px 40px -22px rgba(40, 30, 20, 0.35);
  transform: translateX(-50%);
  transition: transform 0.8s var(--ease-out), background-color 0.6s var(--ease-out);
}
.nav.is-hidden { transform: translate(-50%, -140%); }
.nav.is-dark { background: rgba(20, 20, 20, 0.6); color: var(--on-dark); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 18px 40px -22px rgba(0, 0, 0, 0.6); }
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: -0.03em;
  padding-right: 0.8rem;
  white-space: nowrap;
}
.nav__brand-sub { margin-left: -0.22rem; font-weight: 400; }
.nav__links { display: flex; gap: 0.1rem; }
.nav__links a {
  display: block;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-size: 0.875rem;
  color: inherit;
  opacity: 0.72;
  transition: opacity 0.4s var(--ease-out), background-color 0.4s var(--ease-out);
}
.nav__links a:hover, .nav__links a.is-current, .nav__links a[aria-current="page"] { opacity: 1; background: rgba(92, 52, 36, 0.06); }
.nav.is-dark .nav__links a:hover, .nav.is-dark .nav__links a.is-current, .nav.is-dark .nav__links a[aria-current="page"] { background: rgba(255, 255, 255, 0.08); }
.nav.is-dark .nav__cta { --btn-bg: var(--on-dark); --btn-fg: var(--ink); --icon-bg: rgba(92, 52, 36, 0.08); }
.nav__cta { margin-left: 0.4rem; }

.nav__burger {
  display: none;
  position: relative;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: rgba(92, 52, 36, 0.06);
}
.nav.is-dark .nav__burger { background: rgba(255, 255, 255, 0.1); }
.nav__burger span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.05rem;
  height: 1.25px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.7s var(--ease-out);
}
.nav__burger span:first-child { transform: translate(-50%, -4px); }
.nav__burger span:last-child { transform: translate(-50%, 3px); }
.nav__burger[aria-expanded="true"] span:first-child { transform: translate(-50%, 0) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:last-child { transform: translate(-50%, 0) rotate(-45deg); }

.menu {
  position: fixed;
  inset: 0;
  z-index: 19;
  display: flex;
  align-items: flex-end;
  padding: 7rem var(--gutter) 3rem;
  background: rgba(249, 237, 228, 0.84);
  -webkit-backdrop-filter: blur(40px) saturate(1.3);
  backdrop-filter: blur(40px) saturate(1.3);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s var(--ease-out), visibility 0s linear 0.7s;
}
.menu.is-open { opacity: 1; visibility: visible; transition: opacity 0.7s var(--ease-out); }
.menu__list { width: 100%; }
.menu__list li { overflow: hidden; border-top: 1px solid var(--hair); }
.menu__link {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.9rem 0;
  font-size: clamp(2rem, 9vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  transform: translateY(110%);
  opacity: 0;
  transition: transform 0.9s var(--ease-out), opacity 0.9s var(--ease-out);
}
.menu__link .mono { color: var(--ink-3); }
.menu__link[aria-current="page"] { color: var(--lux); }
.menu.is-open .menu__link { transform: none; opacity: 1; }
.menu.is-open li:nth-child(1) .menu__link { transition-delay: 0.08s; }
.menu.is-open li:nth-child(2) .menu__link { transition-delay: 0.13s; }
.menu.is-open li:nth-child(3) .menu__link { transition-delay: 0.18s; }
.menu.is-open li:nth-child(4) .menu__link { transition-delay: 0.23s; }
.menu.is-open li:nth-child(5) .menu__link { transition-delay: 0.28s; }
.menu.is-open li:nth-child(6) .menu__link { transition-delay: 0.33s; }

/* ─────────── 進場動畫 ─────────── */
.js .reveal {
  opacity: 0;
  transform: translate3d(0, 2.2rem, 0);
  filter: blur(6px);
  transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out), filter 1s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.js .reveal--late { transition-delay: calc(180ms + var(--i, 0) * 70ms); }
.js .reveal.is-in { opacity: 1; transform: none; filter: none; }

/* ─────────── 標籤按鈕 ─────────── */
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem 0.5rem 0.7rem;
  border-radius: 999px;
  background: rgba(92, 52, 36, 0.04);
  box-shadow: inset 0 0 0 1px var(--hair);
  font-size: 0.82rem;
  color: var(--ink-2);
  position: relative;
  overflow: hidden;
  transition: background-color 0.5s var(--ease-out), color 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.chip:hover { color: var(--ink); background: rgba(92, 52, 36, 0.07); }
.chip:active { transform: scale(0.97); }
.chip i {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  background: var(--c, var(--ink-3));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
  flex: none;
}
.chip em { font-style: normal; font-size: 0.72rem; color: var(--ink-3); transition: color 0.5s var(--ease-out); }
.chip.is-active { background: var(--ink); color: var(--paper); box-shadow: none; }
.chip.is-active em { color: rgba(255, 250, 246, 0.55); }
.chip__progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: var(--lux);
  transform-origin: left;
  transform: scaleX(0);
}

/* ─────────── 文字連結：底線從左長出來 ─────────── */
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0;
  font-weight: 500;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.6s var(--ease-out), color 0.4s var(--ease-out);
}
.text-link:hover { background-size: 100% 1px; }
.text-link svg { width: 0.9rem; height: 0.9rem; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.6s var(--ease-spring); }
.text-link:hover svg { transform: translateX(3px); }

/* ─────────── 手機底部的預約鈕 ─────────── */
.dock {
  position: fixed;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 18;
  display: none;
  transform: translate(-50%, 160%);
  transition: transform 0.8s var(--ease-out), translate 0.7s var(--ease-out);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 18px 40px -12px rgba(92, 52, 36, 0.55);
}
.dock.is-on { transform: translate(-50%, 0); }
.dock:active { transform: translate(-50%, 0) scale(0.98); }

/* ─────────── 換頁：跨頁 View Transitions ─────────── */
@view-transition { navigation: auto; }
.nav { view-transition-name: site-nav; }
::view-transition-old(root) { animation: vt-out 0.32s var(--ease-out) both; }
::view-transition-new(root) { animation: vt-in 0.6s var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-10px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(14px); } }

@media (max-width: 960px) {
  .nav { gap: 0.2rem; padding-left: 1.1rem; }
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: block; }
  .dock { display: inline-flex; }
}

@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; }
  .js .reveal { opacity: 1; transform: none; filter: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
