/* Landing page 專用 — scroll-morph 沉浸式服務展示，套用全站色票變數 */

.landing-enter {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.25);
  backdrop-filter: blur(10px);
}
.landing-enter:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

body.landing { overflow-x: hidden; }

/* ---------- HERO ---------- */
.l-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 20%, var(--hero-glow-1), transparent 60%),
    radial-gradient(circle at 50% 80%, var(--hero-glow-2), transparent 60%),
    var(--bg);
}
.l-eyebrow {
  letter-spacing: 0.3em;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 20px;
  font-family: var(--mono);
}
.l-hero--tour .l-eyebrow { font-size: 20px; }
.l-gradient-text {
  font-size: clamp(1.9rem, 4.6vw, 3.2rem);
  font-weight: 300;
  line-height: 1.5;
  color: var(--text);
}
.l-hero-sub {
  margin-top: 20px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
  max-width: 640px;
  line-height: 1.8;
}
.l-freshness { margin-top: 18px; font-size: 12px; color: var(--muted); letter-spacing: 0.05em; font-family: var(--mono); }
.l-hero-cta {
  display: inline-block;
  margin-top: 28px;
  padding: 14px 28px;
  border-radius: 999px;
  background: linear-gradient(100deg, var(--accent), var(--accent-gold));
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.l-hero-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -10px var(--glow); text-decoration: none; }
.l-scroll-hint { margin-top: 40px; color: var(--text); font-size: 1.05rem; font-weight: 600; animation: l-bob 1.8s ease-in-out infinite; }
@keyframes l-bob { 0%, 100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(8px); opacity: 1; } }

/* ---------- STICKY MORPH ---------- */
.l-morph-section { position: relative; height: 340vh; }
.l-sticky-stage {
  position: sticky; top: 0; height: 100vh;
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 24px; padding: 0 6vw; overflow: hidden;
}
.l-progress-track { position: sticky; top: 0; height: 3px; background: var(--line); z-index: 20; }
.l-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), var(--accent-gold)); }

.l-side-copy { max-width: 360px; opacity: 0; transform: translateY(40px); will-change: transform, opacity; }
.l-side-left { justify-self: end; text-align: right; }
.l-side-right { justify-self: start; }
.l-side-copy .l-tag { display: inline-block; font-size: 11px; letter-spacing: 0.15em; color: var(--accent); margin-bottom: 14px; font-family: var(--mono); }
.l-side-copy h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 700; line-height: 1.25; margin-bottom: 14px; }
.l-side-copy p { color: var(--muted); font-size: 0.95rem; line-height: 1.6; }

.l-phone {
  position: relative; width: 260px; height: 540px; border-radius: 42px;
  background: linear-gradient(160deg, var(--bg-soft), var(--bg));
  border: 1px solid var(--line);
  box-shadow: 0 0 0 6px rgba(0,0,0,0.04), 0 40px 80px -20px var(--glow), 0 20px 40px -10px rgba(0,0,0,0.15);
  padding: 14px; justify-self: center; will-change: transform;
}
.l-phone-notch { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: 90px; height: 22px; background: var(--bg); border-radius: 12px; z-index: 5; }
.l-phone-screen { position: relative; width: 100%; height: 100%; border-radius: 28px; overflow: hidden; background: var(--card); }
.l-app-screen {
  position: absolute; inset: 0; padding: 26px 18px; color: var(--text);
  opacity: 0; transform: scale(0.96); transition: opacity 0.35s ease, transform 0.35s ease;
  display: flex; flex-direction: column;
}
.l-app-screen.active { opacity: 1; transform: scale(1); }
.l-app-topbar { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 22px; font-family: var(--mono); }
.l-stat-card { background: linear-gradient(135deg, var(--glow), transparent); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; margin-bottom: 14px; }
.l-stat-card-num { font-size: 26px; font-weight: 800; color: var(--accent); font-family: var(--mono); }
.l-stat-card-label { font-size: 12px; color: var(--muted); margin-top: 4px; }
.l-fixture-row { display: flex; align-items: center; justify-content: space-between; background: var(--bg-soft); border-radius: 10px; padding: 10px 14px; margin-bottom: 10px; font-size: 13px; }
.l-fixture-row span:nth-child(2) { color: var(--accent); font-size: 11px; }

/* ---------- DEVICE / ROLE SHOWCASE ---------- */
.l-device-section { position: relative; height: 280vh; }
.l-device-sticky { position: sticky; top: 0; height: 100vh; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; padding: 0 8vw; }
.l-device-copy { max-width: 420px; border-left: 2px solid var(--accent); padding-left: 28px; }
.l-device-copy .l-tag { display: inline-block; font-size: 11px; letter-spacing: 0.15em; color: var(--accent); margin-bottom: 18px; font-family: var(--mono); }
.l-device-heading { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 700; line-height: 1.3; margin-bottom: 18px; transition: opacity 0.3s ease; }
.l-device-copy p { color: var(--muted); line-height: 1.7; margin-bottom: 28px; transition: opacity 0.3s ease; }
.l-device-frame { position: relative; width: 100%; aspect-ratio: 4/5; border-radius: 24px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 30px 70px -20px var(--glow); }
.l-role-panel { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px; opacity: 0; transform: translateX(100%); background: var(--bg-soft); will-change: transform, opacity; }
.l-role-title { font-size: 14px; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 18px; font-family: var(--mono); }
.l-role-num { font-size: clamp(3.6rem, 9vw, 5.5rem); font-weight: 800; margin-bottom: 20px; }
.l-role-num svg { color: var(--accent); stroke-width: 1.4; }
.l-role-sub { font-size: 13px; color: var(--muted); line-height: 1.8; max-width: 320px; }

/* 頁面巡覽變體：較寬畫面比例＋大圖示，用於「效果首頁」7 段巡覽 */
.l-device-frame--wide { aspect-ratio: 16/10; }
.l-role-panel--tour .l-role-num { margin-bottom: 24px; }
.l-role-panel--tour .l-role-num svg { width: clamp(72px, 11vw, 116px); height: clamp(72px, 11vw, 116px); }
.l-role-panel--tour { padding: 0; }
.l-tour-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.svc-icon svg { width: 44px; height: 44px; color: var(--accent); stroke-width: 1.4; }
.svc-photo { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 14px; margin-bottom: 6px; }
.l-service-card { padding: 16px 16px 20px; }
.l-service-card h3 { margin-bottom: 0; }
.l-service-card h3 { padding: 0 8px; }
.l-service-card p { padding: 0 8px; }
.l-role-panel[data-tint="1"] { background: var(--bg-soft); }
.l-role-panel[data-tint="2"] { background: var(--card); }
.l-dots { display: flex; gap: 10px; margin-top: 28px; justify-content: center; }
.l-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--line); transition: background 0.3s ease, transform 0.3s ease; }
.l-dot.active { background: var(--accent); transform: scale(1.3); }

@media (max-width: 860px) {
  .l-device-sticky { grid-template-columns: 1fr; padding-top: 90px; gap: 24px; }
  .l-device-frame { aspect-ratio: 1/1; }
  .l-device-frame--wide { aspect-ratio: 4/3; }
  .l-device-section { height: 220vh; }
}

/* ---------- SPOTLIGHTS ---------- */
.l-spotlight-wrap { padding: 40px 0; }
.l-spotlight { min-height: 90vh; display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 60px; padding: 60px 8vw; max-width: 1200px; margin: 0 auto; }
.l-spotlight.reverse { grid-template-columns: 1fr 1.1fr; }
.l-spotlight.reverse .l-spotlight-copy { order: -1; }
.l-spotlight-visual { width: 100%; aspect-ratio: 4/3; border-radius: 22px; border: 1px solid var(--line); background: linear-gradient(145deg, var(--glow), transparent), var(--bg-soft); box-shadow: 0 30px 60px -20px rgba(0,0,0,0.2); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.l-spotlight-big { font-size: clamp(2.6rem, 6vw, 4rem); font-weight: 800; color: var(--accent); font-family: var(--mono); }
.l-spotlight-unit { margin-top: 10px; font-size: 13px; color: var(--muted); letter-spacing: 0.05em; }
.l-spotlight-copy .l-tag { display: inline-block; font-size: 11px; letter-spacing: 0.15em; color: var(--accent); margin-bottom: 16px; font-family: var(--mono); }
.l-spotlight-copy h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 700; margin-bottom: 14px; }
.l-spotlight-copy p { color: var(--muted); line-height: 1.7; max-width: 420px; }
.l-spotlight-link { display: inline-block; margin-top: 16px; color: var(--accent); font-weight: 700; font-size: 0.92rem; }
.l-spotlight-link:hover { text-decoration: underline; }

.l-reveal.from-left { transform: translateX(-60px); }
.l-reveal.from-left.in-view { transform: translateX(0); }
.l-reveal.from-right { transform: translateX(60px); }
.l-reveal.from-right.in-view { transform: translateX(0); }

@media (max-width: 860px) {
  .l-spotlight, .l-spotlight.reverse { grid-template-columns: 1fr; min-height: auto; gap: 28px; padding: 40px 6vw; }
  .l-spotlight.reverse .l-spotlight-copy { order: 0; }
  .l-reveal.from-left, .l-reveal.from-right { transform: translateY(48px); }
  .l-reveal.from-left.in-view, .l-reveal.from-right.in-view { transform: translateY(0); }
}

/* ---------- SERVICES STRIP (三大服務 + 免費工具) ---------- */
.l-services { padding: 120px 6vw 40px; max-width: 1200px; margin: 0 auto; text-align: center; }
.l-services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; margin-top: 50px; }
.l-service-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 32px 26px;
  text-align: left; transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.l-service-card:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: 0 20px 40px -18px var(--glow); }
.l-service-card.primary { background: linear-gradient(160deg, var(--card-hover), var(--card)); }
.l-service-tag { display: inline-block; font-size: 11px; letter-spacing: 0.1em; color: var(--accent); font-family: var(--mono); margin-bottom: 12px; }
.l-service-card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.l-service-card p { color: var(--muted); font-size: 0.92rem; line-height: 1.7; }

.l-tools-row { display: flex; gap: 16px; overflow-x: auto; padding: 10px 0 20px; scroll-snap-type: x mandatory; margin-top: 40px; }
.l-tool-chip {
  flex: 0 0 auto; scroll-snap-align: center; width: min(60vw, 220px);
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 14px; padding: 18px; text-align: left; color: var(--text);
}
.l-tool-chip:hover { border-color: var(--accent); text-decoration: none; }
.l-tool-chip .l-tool-name { font-weight: 700; font-size: 0.95rem; margin-bottom: 6px; display: block; }
.l-tool-chip .l-tool-desc { font-size: 0.8rem; color: var(--muted); }

/* ---------- COMPARE TABLE ---------- */
.l-compare-section { padding: 100px 6vw 40px; max-width: 960px; margin: 0 auto; text-align: center; }
.l-compare-table-wrap { margin-top: 40px; overflow-x: auto; border-radius: 16px; border: 1px solid var(--line); }
.l-compare-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.88rem; }
.l-compare-table th, .l-compare-table td { padding: 14px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.l-compare-table th { background: var(--bg-soft); color: var(--accent); font-weight: 700; }
.l-compare-table tr:last-child td { border-bottom: none; }
.l-compare-table td:first-child { color: var(--muted); }
.l-disclaimer { margin-top: 18px; font-size: 12px; color: var(--muted); }

/* ---------- STAT BANNER ---------- */
.l-stat-banner { position: relative; height: 70vh; min-height: 480px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.l-stat-banner-bg { position: absolute; inset: -10% 0; background: radial-gradient(circle at 30% 30%, var(--hero-glow-1), transparent 55%), radial-gradient(circle at 70% 70%, var(--hero-glow-2), transparent 55%); will-change: transform; }
.l-stat-banner-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, transparent, var(--bg-soft)); }
.l-stat-banner-content { position: relative; z-index: 2; text-align: center; }
.l-stat-banner-content h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; margin-bottom: 50px; }
.l-stat-row { display: flex; gap: 60px; justify-content: center; flex-wrap: wrap; }
.l-stat-num { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; color: var(--accent); font-family: var(--mono); }
.l-stat-label { margin-top: 8px; color: var(--muted); font-size: 0.9rem; }

/* ---------- CTA / FAQ ---------- */
.l-cta { text-align: center; padding: 100px 6vw 60px; }
.l-cta h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; line-height: 1.3; margin-bottom: 18px; }
.l-cta p { color: var(--muted); }
.l-faq-list { max-width: 720px; margin: 40px auto 0; text-align: left; display: flex; flex-direction: column; gap: 12px; }
.l-faq-item { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; }
.l-faq-item summary { cursor: pointer; font-weight: 700; list-style: none; }
.l-faq-item summary::-webkit-details-marker { display: none; }
.l-faq-item summary::before { content: "▸ "; color: var(--accent); }
.l-faq-item[open] summary::before { content: "▾ "; }
.l-faq-item p { color: var(--muted); margin-top: 12px; line-height: 1.7; font-size: 0.92rem; }

.l-footer { text-align: center; padding: 60px 20px 80px; color: var(--muted); font-size: 13px; }
.l-footer .l-sources a { color: var(--muted); text-decoration: underline; margin: 0 2px; }
.l-footer .l-sources a:hover { color: var(--accent); }
.l-footer .l-contact-line { margin-top: 10px; }

.l-reveal { opacity: 0; transform: translateY(48px); transition: opacity 0.7s ease, transform 0.7s ease; transition-delay: calc(var(--delay, 0) * 90ms); }
.l-reveal.in-view { opacity: 1; transform: translateY(0); }

@media (max-width: 860px) {
  .l-sticky-stage { grid-template-columns: 1fr; justify-items: center; text-align: center; padding-top: 90px; }
  .l-side-copy { display: none; }
  .l-phone { width: 220px; height: 460px; }
  .l-morph-section { height: 220vh; }
  .landing-enter { top: 10px; right: 10px; padding: 8px 14px; font-size: 0.8rem; }
}

/* ---------- 全螢幕照片 zoom-through 巡覽（品牌導覽頁） ---------- */
.tour-zoom { position: relative; }
.tour-zoom-sticky {
  position: sticky; top: 0; height: 100vh;
  overflow: hidden;
  background: var(--bg);
}
/* 照片內縮成圓角卡片，不滿版貼邊，整體較有質感 */
.tour-zoom-panel {
  position: absolute;
  inset: 9vh 7vw;
  opacity: 0;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 30px 70px -25px rgba(0,0,0,0.35);
  will-change: transform, opacity;
}
.tour-zoom-panel img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
/* 左下漸層壓暗，讓白色文字可讀 */
.tour-zoom-panel::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top right, rgba(0,0,0,0.58) 0%, rgba(0,0,0,0.22) 40%, rgba(0,0,0,0) 66%);
  pointer-events: none;
}
.tour-zoom-text {
  position: absolute;
  left: clamp(28px, 5%, 64px); bottom: clamp(28px, 9%, 72px);
  max-width: 440px;
  z-index: 2;
  color: #fff;
  will-change: transform, opacity;
}
.tour-zoom-text .l-tag { color: #ffd68a; margin-bottom: 14px; display: inline-block; }
.tour-zoom-text h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
  font-weight: 700; line-height: 1.25;
  color: #fff; margin-bottom: 12px;
  text-shadow: 0 2px 18px rgba(0,0,0,0.45);
}
.tour-zoom-text p {
  color: rgba(255,255,255,0.85);
  font-size: 1.02rem; line-height: 1.7;
  margin-bottom: 24px;
  text-shadow: 0 1px 10px rgba(0,0,0,0.4);
}
/* 品牌總覽是淺色 logo 圖：改深色文字、不壓暗 */
.tour-zoom-panel[data-light] ::selection { background: inherit; }
.tour-zoom-panel[data-light]::after { background: none; }
.tour-zoom-panel[data-light] .tour-zoom-text { color: var(--text); }
.tour-zoom-panel[data-light] .tour-zoom-text h2 { color: var(--text); text-shadow: none; }
.tour-zoom-panel[data-light] .tour-zoom-text p { color: var(--muted); text-shadow: none; }
.tour-zoom-panel[data-light] .tour-zoom-text .l-tag { color: var(--accent); }
.tour-zoom-dots {
  position: absolute;
  right: calc(7vw - 30px); top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 10px;
  z-index: 3;
}
.tour-zoom-dots .l-dot { background: var(--line); }
.tour-zoom-dots .l-dot.active { background: var(--accent); }

@media (max-width: 860px) {
  .tour-zoom-panel { inset: 12vh 4vw 8vh; }
  .tour-zoom-text { left: 20px; right: 20px; bottom: 24px; max-width: none; }
  .tour-zoom-dots { right: 6px; }
  /* 手機端壓縮巡覽總捲動距離（桌面700vh／7段=100vh/段 → 手機約65vh/段），拇指少滑幾次就能看完一段 */
  #tourZoom.tour-zoom { height: 460vh !important; }
}

@media (prefers-reduced-motion: reduce) {
  .tour-zoom { height: auto !important; }
  .tour-zoom-sticky { position: static; height: auto; }
  .tour-zoom-panel { position: relative; opacity: 1 !important; transform: none !important; height: 70vh; }
}
