/* =========================================================
   LIFEX Max — 深色質感單品官網
   ========================================================= */

:root {
  --bg: #0a0a0b;
  --bg-2: #111113;
  --bg-3: #18181b;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f2f2f0;
  --text-2: #c4c5c7;
  --muted: #8c8f94;      /* 啞灰點綴 */
  --matte: #6f7378;
  --disabled-bg: #2a2b2e;
  --disabled-text: #7b7e83;

  --font: -apple-system, "PingFang TC", "Noto Sans TC", sans-serif;
  --gutter: clamp(20px, 5vw, 56px);
  --max: 1200px;
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

h1, h2, h3, p { margin: 0; }

h2 {
  font-size: clamp(1.75rem, 2.6vw + 0.9rem, 3rem);
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: 0.04em;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow { max-width: 820px; }

.section { padding-block: clamp(96px, 14svh, 180px); }

.section__head { margin-bottom: clamp(40px, 6svh, 72px); }

.section__lead {
  margin-top: 1.25rem;
  max-width: 34em;
  color: var(--text-2);
  font-size: clamp(1rem, 0.4vw + 0.92rem, 1.15rem);
}

.eyebrow {
  margin-bottom: 0.9rem;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 1.9rem;
  border: 0;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}

.btn:not(.is-disabled):hover { opacity: 0.88; transform: translateY(-1px); }
.btn:not(.is-disabled):active { transform: translateY(0); }

.btn.is-disabled,
.btn[aria-disabled="true"] {
  background: var(--disabled-bg);
  color: var(--disabled-text);
  cursor: not-allowed;
  pointer-events: none;
}

.btn--lg { min-height: 58px; padding: 0 2.6rem; font-size: 1.05rem; }
.btn--sm { min-height: 44px; padding: 0 1.25rem; font-size: 0.92rem; }

/* =========================================================
   1. 首屏
   ========================================================= */
.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  isolation: isolate;
  background: #000;
}

.hero__media,
.hero__gradient,
.hero__shade { position: absolute; inset: 0; }

.hero__media { z-index: -3; }

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform-origin: 50% 50%;
  will-change: transform;
}

/* 手機直式畫面：照片左右會被裁，扣具在照片左側，所以往左對齊。
   扣具若還是被切到，調整第一個百分比（越小越靠左） */
@media (max-width: 767.98px) {
  .hero__img { object-position: 22% 50%; }
}

.hero__gradient {
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 28%),
    linear-gradient(0deg, rgba(10,10,11,0.92) 0%, rgba(10,10,11,0.35) 38%, rgba(10,10,11,0) 62%);
}

.hero__shade {
  z-index: -1;
  background: #000;
  opacity: 0;
}

.hero__logo {
  position: absolute;
  top: max(20px, env(safe-area-inset-top));
  left: var(--gutter);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--line);
}

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

.hero__content {
  position: absolute;
  inset: auto 0 0 0;
  padding-bottom: clamp(48px, 9svh, 96px);
}

.hero__title {
  font-size: clamp(3rem, 8vw + 1rem, 7.5rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.hero__subtitle {
  margin-top: 1rem;
  color: var(--text-2);
  font-size: clamp(1rem, 1vw + 0.8rem, 1.4rem);
  letter-spacing: 0.12em;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: clamp(28px, 4svh, 44px);
}

.hero__down {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.28);
  color: var(--text);
}

.hero__down svg { display: block; }

@media (prefers-reduced-motion: no-preference) {
  .hero__down svg { animation: bob 2.4s var(--ease) infinite; }
}

@keyframes bob {
  0%, 100% { transform: translateY(-2px); opacity: 1; }
  50%      { transform: translateY(3px);  opacity: 0.6; }
}

/* 有動畫時，首屏文字先隱藏，交給 GSAP 淡入 */
.has-motion [data-hero-item] { opacity: 0; }

/* =========================================================
   2. 一句主張
   ========================================================= */
.manifesto {
  padding-block: clamp(120px, 26svh, 260px);
  background: var(--bg);
}

.manifesto__line {
  font-size: clamp(1.6rem, 3.6vw + 0.6rem, 3.6rem);
  line-height: 1.45;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.manifesto__line + .manifesto__line { margin-top: 0.5em; }

.manifesto__line--brand { color: var(--text); }

/* =========================================================
   3. 一鍵快拆
   ========================================================= */
.qr {
  background: var(--bg-2);
  overflow: hidden;
}

.qr__media { overflow: hidden; }

.qr__img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.qr__body { padding: 48px var(--gutter) 96px; }

.qr__title { margin-bottom: 2rem; }

.qr__lines {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.4rem;
}

.qr__line {
  font-size: clamp(1.15rem, 1.4vw + 0.8rem, 1.9rem);
  line-height: 1.5;
  font-weight: 500;
  color: var(--text);
}

.qr__num {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  font-variant-numeric: tabular-nums;
}

.qr__progress { display: none; }

@media (min-width: 768px) {
  .qr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100svh;
  }

  .qr__media {
    position: relative;
    height: 100svh;
  }

  .qr__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .qr__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 clamp(40px, 6vw, 96px);
  }

  .qr__title { margin-bottom: 3rem; }

  /* 有動畫時：三句疊在同一格，隨捲動輪替 */
  .has-motion .qr__lines { display: grid; gap: 0; }
  .has-motion .qr__line { grid-area: 1 / 1; }

  .has-motion .qr__progress {
    display: block;
    width: 160px;
    height: 2px;
    margin-top: 3rem;
    background: var(--line);
    overflow: hidden;
  }

  .has-motion .qr__progress span {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--muted);
    transform: scaleX(0);
    transform-origin: 0 50%;
  }
}

/* =========================================================
   4. 打開來看
   ========================================================= */
.open { background: var(--bg); }

.open__figure { margin: 0; }

.open__frame {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: #000;
}

.open__img { width: 100%; height: auto; }

.hotspot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-7px, -50%); /* 讓圓點中心對準 --x / --y */
  display: none;
}

.hotspot__inner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.hotspot__dot {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 0 4px rgba(255,255,255,0.18);
}

.hotspot__dot::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.55);
  opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .hotspot__dot::after { animation: ring 2.6s var(--ease) infinite; }
}

@keyframes ring {
  0%   { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(1.8); opacity: 0; }
}

.hotspot__label {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(10,10,11,0.78);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0.92rem;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.open__list ul {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.open__list li {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  align-items: baseline;
  color: var(--text-2);
}

.open__list strong {
  display: block;
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.1em;
}

.open__list li > strong,
.open__list li { line-height: 1.6; }

.open__list-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  grid-row: span 2;
  transform: translateY(-1px);
}

@media (min-width: 768px) {
  .hotspot { display: block; }
  .open__list { display: none; }
  .open__frame { will-change: clip-path; }
}

/* =========================================================
   5. 棘輪齒條
   ========================================================= */
.rack { background: var(--bg-2); }

.rack__grid {
  display: grid;
  gap: 40px;
}

.rack__frame {
  overflow: hidden;
  border-radius: 4px;
  background: #000;
}

.rack__img { width: 100%; height: auto; }

@media (min-width: 768px) {
  .rack__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: center;
    gap: clamp(48px, 7vw, 120px);
  }

  .rack__frame {
    aspect-ratio: 2 / 3;
    max-height: 86svh;
  }

  .rack__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    will-change: transform;
  }
}

/* =========================================================
   6. 整體與規格
   ========================================================= */
.spec { background: var(--bg); }

.spec h2 {
  font-size: clamp(1.5rem, 2vw + 0.9rem, 2.5rem);
}

.spec__figure {
  margin: 0 0 clamp(48px, 8svh, 96px);
  border-radius: 4px;
  overflow: hidden;
}

.spec__figure img { width: 100%; }

.spec__grid {
  display: grid;
  gap: 56px;
}

@media (min-width: 768px) {
  .spec__grid {
    grid-template-columns: 1fr 1fr;
    gap: clamp(48px, 6vw, 96px);
  }
}

.spec__subtitle {
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.24em;
}

.spec__list { margin: 0; }

.spec__row {
  display: grid;
  grid-template-columns: 6em 1fr;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.spec__row:last-child { border-bottom: 1px solid var(--line); }

.spec__row dt { color: var(--muted); }
.spec__row dd { margin: 0; color: var(--text); }

.size-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.size-table__caption {
  caption-side: top;
  text-align: left;
  margin-bottom: 0.5rem;
  color: var(--text-2);
  font-size: 0.92rem;
}

.size-table th,
.size-table td {
  padding: 14px 0;
  text-align: left;
  border-top: 1px solid var(--line);
  font-weight: 400;
}

.size-table thead th {
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
}

.size-table tbody th {
  width: 6em;
  color: var(--text);
  font-weight: 600;
}

.size-table tbody td { color: var(--text-2); }

.size-table tbody tr:last-child th,
.size-table tbody tr:last-child td { border-bottom: 1px solid var(--line); }

/* =========================================================
   7. 價格與購買
   ========================================================= */
.price { background: var(--bg-2); }

.price__card {
  max-width: 640px;
  margin-inline: auto;
  padding: clamp(40px, 6vw, 72px) clamp(24px, 5vw, 64px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  text-align: center;
}

.price__title {
  font-size: clamp(1.75rem, 2vw + 1rem, 2.5rem);
  letter-spacing: 0.04em;
}

.price__product {
  margin-top: 0.4rem;
  color: var(--text-2);
}

.price__block {
  margin-block: clamp(32px, 5svh, 48px);
  padding-block: clamp(28px, 4svh, 40px);
  border-block: 1px solid var(--line);
}

.price__label {
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.2em;
}

.price__amount {
  margin-top: 0.4rem;
  font-size: clamp(2.8rem, 6vw + 1rem, 4.75rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}

.price__currency {
  margin-right: 0.15em;
  font-size: 0.42em;
  font-weight: 500;
  vertical-align: 0.6em;
  color: var(--text-2);
}

.price__note {
  margin-top: 0.9rem;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.price__note--sub {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.price__actions {
  display: grid;
  justify-items: center;
  gap: 14px;
}

.price__hint {
  color: var(--muted);
  font-size: 0.82rem;
}

[hidden] { display: none !important; }

/* =========================================================
   8. 常見問題
   ========================================================= */
.faq { background: var(--bg); }

.faq h2 { margin-bottom: clamp(32px, 5svh, 56px); }

.faq__item {
  border-top: 1px solid var(--line);
}

.faq__item:last-child { border-bottom: 1px solid var(--line); }

.faq__item summary {
  position: relative;
  display: block;
  padding: 24px 48px 24px 0;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

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

.faq__item summary::before,
.faq__item summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 16px;
  height: 1.5px;
  background: var(--muted);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.faq__item summary::after { transform: rotate(90deg); }
.faq__item[open] summary::after { transform: rotate(0deg); opacity: 0; }

.faq__answer {
  padding: 0 48px 28px 0;
  color: var(--text-2);
}

/* =========================================================
   9. 頁尾
   ========================================================= */
.footer {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 72px var(--gutter) 64px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.footer__logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--line);
}

.footer__copy {
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
}

/* =========================================================
   手機底部購買列
   ========================================================= */
.buybar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  background: rgba(10, 10, 11, 0.9);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transform: translateY(110%);
  transition: transform 0.4s var(--ease);
}

.buybar.is-visible { transform: translateY(0); }

.buybar__price {
  display: grid;
  line-height: 1.3;
}

.buybar__label {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
}

.buybar__amount {
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 767.98px) {
  .footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}

@media (min-width: 768px) {
  .buybar { display: none; }
  .hero__logo { width: 60px; height: 60px; }
}

/* =========================================================
   減少動態：完全不動
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
