/* =========================================================
   安崇數位 Astra Digi Inc. — 官方網站樣式
   ========================================================= */

/* ---------- 設計變數 ---------- */
:root {
  --bg: #05060f;
  --bg-2: #0a0c1c;
  --surface: rgba(255, 255, 255, .035);
  --surface-2: rgba(255, 255, 255, .06);
  --border: rgba(255, 255, 255, .09);
  --border-hi: rgba(255, 255, 255, .22);
  --text: #eef0fb;
  --muted: #8e93b8;
  --cyan: #22d3ee;
  --violet: #8b5cf6;
  --pink: #ec4899;
  --gold: #fbbf24;
  --green: #34d399;
  --grad: linear-gradient(120deg, #22d3ee 0%, #8b5cf6 50%, #ec4899 100%);
  --font-tc: 'Noto Sans TC', system-ui, -apple-system, 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  --font-en: 'Space Grotesk', 'Noto Sans TC', system-ui, sans-serif;
  --nav-h: 76px;
  --radius: 22px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --mx: 50%;
  --my: 50%;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-tc);
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: .01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
body.is-loading { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
img, svg { display: block; max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: min(1200px, 92vw); margin-inline: auto; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.star-mark { width: 34px; height: 34px; }
.star-mark path { fill: url(#starGrad); }

/* 游標：保留系統原生游標（反應最快），只加一個跟隨的光圈當裝飾 */
a, button, [data-hover] { cursor: pointer; }
@media (hover: none), (pointer: coarse) {
  .cursor { display: none !important; }
}

/* ---------- 載入畫面 ---------- */
.loader {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg);
  display: grid; place-items: center;
}
.loader-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; width: min(320px, 80vw); }
.loader-logo .star-mark { width: 60px; height: 60px; animation: spin 6s linear infinite, glowPulse 2s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes glowPulse { 50% { filter: drop-shadow(0 0 22px rgba(139, 92, 246, .95)); } }
.loader-name { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.loader-zh { font-size: 1.5rem; font-weight: 700; letter-spacing: .3em; margin-left: .3em; }
.loader-en { font-family: var(--font-en); font-size: .7rem; letter-spacing: .4em; color: var(--muted); }
.loader-bar { width: 100%; height: 2px; background: var(--border); border-radius: 2px; overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 0; background: var(--grad); }
.loader-pct { font-family: var(--font-en); font-size: .8rem; color: var(--muted); letter-spacing: .2em; }

/* ---------- 自訂游標 ---------- */
.cursor { position: fixed; inset: 0; pointer-events: none; z-index: 999; opacity: 0; transition: opacity .3s; }
.cursor.is-visible { opacity: 1; }
.cursor-dot { display: none; }
.cursor-ring { position: fixed; left: 0; top: 0; width: 0; height: 0; will-change: transform; }
.cursor-ring-inner {
  position: absolute; left: 50%; top: 50%; width: 40px; height: 40px;
  transform: translate(-50%, -50%);
  border: 1.5px solid rgba(255, 255, 255, .4); border-radius: 50%;
  display: grid; place-items: center;
  transition: width .35s var(--ease), height .35s var(--ease), background .3s, border-color .3s, transform .2s;
}
.cursor.is-hover .cursor-ring-inner { width: 58px; height: 58px; border-color: var(--cyan); background: rgba(34, 211, 238, .12); }
.cursor.is-label .cursor-ring-inner { width: 86px; height: 86px; background: var(--cyan); border-color: var(--cyan); }
.cursor.is-down .cursor-ring-inner { transform: translate(-50%, -50%) scale(.8); }
.cursor-label { font-family: var(--font-en); font-size: .62rem; letter-spacing: .22em; color: #05060f; font-weight: 700; opacity: 0; transition: opacity .2s; }
.cursor.is-label .cursor-label { opacity: 1; }

/* ---------- 背景層 ---------- */
#scene { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
/* 追光：固定大小的漸層圓，用 transform 移動（只動合成層，不重繪） */
.spotlight {
  position: fixed; left: 0; top: 0; width: 1280px; height: 1280px; z-index: 1; pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(139, 92, 246, .10), transparent);
  transform: translate3d(-9999px, -9999px, 0);
  will-change: transform;
}
/* 顆粒：只比視窗大一點點，位移用 px，層才不會太大 */
.grain {
  position: fixed; inset: -60px; z-index: 2; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
  will-change: transform;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-18px, -30px); } 40% { transform: translate(-45px, 15px); }
  60% { transform: translate(22px, -50px); } 80% { transform: translate(-15px, 45px); } 100% { transform: translate(0, 0); }
}
main { position: relative; z-index: 3; }

/* 輕量模式（瀏覽器沒有硬體加速時由 scene.js 自動加上 html.lite）：
   拿掉所有靠 GPU 的特效，換成實色底，讓 CPU 只需要合成最少的圖層 */
html.lite .grain, html.lite .spotlight, html.lite .orb, html.lite .featured-ring, html.lite .ai-core { display: none; }
html.lite .card, html.lite .pcard, html.lite .nav.is-scrolled, html.lite .contact-form, html.lite .mobile-menu, html.lite .toast {
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
html.lite .card, html.lite .contact-form { background: rgba(10, 12, 28, .88); }
html.lite .pcard { background: rgba(10, 12, 28, .97); }
html.lite .nav.is-scrolled { background: rgba(5, 6, 15, .94); }

/* ---------- 導覽列 ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h); z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 max(24px, 4vw);
  border-bottom: 1px solid transparent;
  transition: background .4s, height .4s, border-color .4s, transform .5s var(--ease);
}
.nav.is-scrolled {
  height: 64px;
  background: rgba(5, 6, 15, .6);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-color: var(--border);
}
.nav.is-hidden { transform: translateY(-100%); }
.nav-logo { display: flex; align-items: center; gap: 12px; }
.nav-logo .star-mark { transition: transform .6s var(--ease); }
.nav-logo:hover .star-mark { transform: rotate(90deg) scale(1.1); }
.nav-logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.nav-logo-text b { font-weight: 700; letter-spacing: .12em; font-size: .95rem; }
.nav-logo-text small { font-family: var(--font-en); font-size: .6rem; letter-spacing: .3em; color: var(--muted); }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  position: relative; padding: 8px 14px; font-size: .9rem; color: var(--muted);
  border-radius: 999px; transition: color .3s;
}
.nav-links a::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 1px;
  background: var(--grad); transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease);
}
.nav-links a:hover, .nav-links a.is-active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.sound-toggle {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: 999px;
  font-family: var(--font-en); font-size: .62rem; letter-spacing: .2em; color: var(--muted);
  transition: border-color .3s, color .3s, background .3s;
}
.sound-toggle:hover { border-color: var(--border-hi); color: var(--text); }
.sound-bars { display: flex; align-items: flex-end; gap: 2px; height: 12px; }
.sound-bars i { width: 2px; height: 4px; background: currentColor; border-radius: 1px; transition: height .3s; }
.sound-toggle.is-on { color: var(--cyan); border-color: rgba(34, 211, 238, .45); background: rgba(34, 211, 238, .06); }
.sound-toggle.is-on .sound-bars i { animation: eq .7s ease-in-out infinite alternate; }
.sound-toggle.is-on .sound-bars i:nth-child(2) { animation-delay: .15s; }
.sound-toggle.is-on .sound-bars i:nth-child(3) { animation-delay: .3s; }
.sound-toggle.is-on .sound-bars i:nth-child(4) { animation-delay: .45s; }
@keyframes eq { from { height: 3px; } to { height: 12px; } }
.burger { display: none; width: 44px; height: 44px; position: relative; }
.burger i { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--text); transition: transform .4s var(--ease), top .4s var(--ease); }
.burger i:first-child { top: 18px; }
.burger i:last-child { top: 26px; }
.burger.is-open i:first-child { top: 22px; transform: rotate(45deg); }
.burger.is-open i:last-child { top: 22px; transform: rotate(-45deg); }
.mobile-menu {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(5, 6, 15, .94); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px;
  opacity: 0; pointer-events: none; transition: opacity .4s;
}
.mobile-menu.is-open { opacity: 1; pointer-events: auto; }
.mobile-menu a {
  font-size: 2rem; font-weight: 700; padding: 8px 0;
  opacity: 0; transform: translateY(20px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.mobile-menu.is-open a { opacity: 1; transform: none; }
.mobile-menu.is-open a:nth-child(1) { transition-delay: .05s; }
.mobile-menu.is-open a:nth-child(2) { transition-delay: .10s; }
.mobile-menu.is-open a:nth-child(3) { transition-delay: .15s; }
.mobile-menu.is-open a:nth-child(4) { transition-delay: .20s; }
.mobile-menu.is-open a:nth-child(5) { transition-delay: .25s; }
.mobile-menu.is-open a:nth-child(6) { transition-delay: .30s; }

/* ---------- 按鈕 ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 30px; border-radius: 999px;
  font-weight: 500; font-size: .95rem; letter-spacing: .04em;
  overflow: hidden; isolation: isolate; white-space: nowrap;
  transition: box-shadow .3s, color .3s, border-color .3s;
}
.btn span, .btn i { position: relative; z-index: 1; }
.btn .arrow { font-style: normal; font-family: var(--font-en); transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(5px); }
.btn-primary { color: #05060f; background: #fff; }
.btn-primary::before { content: ''; position: absolute; inset: 0; background: var(--grad); opacity: 0; transition: opacity .4s; }
.btn-primary::after { content: ''; position: absolute; inset: -4px; border-radius: inherit; background: var(--grad); filter: blur(18px); opacity: 0; z-index: -1; transition: opacity .4s; }
.btn-primary:hover { color: #fff; }
.btn-primary:hover::before, .btn-primary:hover::after { opacity: 1; }
.btn-ghost { color: var(--text); border: 1px solid var(--border-hi); background: rgba(10, 12, 28, .5); }
.btn-ghost:hover { border-color: var(--cyan); box-shadow: 0 0 30px rgba(34, 211, 238, .22) inset, 0 0 24px rgba(34, 211, 238, .18); }
.btn-sm { padding: 10px 20px; font-size: .85rem; }
.btn-block { width: 100%; justify-content: center; margin-top: 8px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + 40px) 0 90px;
}
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(5, 6, 15, .82) 0%, rgba(5, 6, 15, .45) 35%, transparent 62%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 40px; align-items: center; }
.hero-copy { position: relative; z-index: 2; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px; padding: 8px 16px 8px 10px;
  border: 1px solid var(--border); border-radius: 999px;
  background: rgba(10, 12, 28, .55);
  font-family: var(--font-en); font-size: .72rem; letter-spacing: .16em; color: var(--muted);
  margin-bottom: 28px; max-width: 100%;
}
.eyebrow .scramble { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eyebrow .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); animation: pulseDot 1.6s ease-in-out infinite; }
@keyframes pulseDot { 50% { opacity: .4; transform: scale(.7); } }
.hero-title { font-size: clamp(2.6rem, 6.4vw, 5.6rem); font-weight: 900; line-height: 1.12; letter-spacing: -.01em; margin-bottom: 28px; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.hero-title .split { display: inline-block; will-change: transform; }
.hero-title .grad { padding-right: .06em; }
.hero-sub { max-width: 560px; font-size: clamp(1rem, 1.3vw, 1.15rem); color: var(--muted); font-weight: 300; margin-bottom: 36px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-chips li {
  font-family: var(--font-en); font-size: .7rem; letter-spacing: .14em; padding: 6px 12px;
  border: 1px solid var(--border); border-radius: 8px; color: var(--muted); background: rgba(255, 255, 255, .02);
  transition: border-color .3s, color .3s;
}
.hero-chips li:hover { border-color: var(--cyan); color: var(--text); }
.hero-side { position: relative; min-height: 460px; }
.orbit-label {
  position: absolute; font-family: var(--font-en); font-size: .62rem; letter-spacing: .3em; color: var(--muted);
  padding: 6px 12px; border: 1px solid var(--border); border-radius: 6px;
  background: rgba(5, 6, 15, .6);
  animation: floatY 6s ease-in-out infinite;
}
.orbit-label::before {
  content: ''; position: absolute; left: -5px; top: 50%; width: 6px; height: 6px; margin-top: -3px;
  border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan);
}
.orbit-label-1 { top: 10%; left: 6%; }
.orbit-label-2 { top: 24%; right: 4%; animation-delay: -2s; }
.orbit-label-3 { bottom: 26%; left: 0; animation-delay: -4s; }
.orbit-label-4 { bottom: 8%; right: 12%; animation-delay: -1s; }
@keyframes floatY { 50% { transform: translateY(-12px); } }
.scroll-hint {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--font-en); font-size: .6rem; letter-spacing: .35em; color: var(--muted);
}
.scroll-line { width: 1px; height: 48px; background: linear-gradient(to bottom, transparent, var(--cyan)); position: relative; overflow: hidden; }
.scroll-line::after { content: ''; position: absolute; inset: 0; background: var(--bg); animation: scrollLine 2s var(--ease) infinite; }
@keyframes scrollLine { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }
.hero-coords {
  position: absolute; right: max(24px, 4vw); bottom: 32px;
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
  font-family: var(--font-en); font-size: .58rem; letter-spacing: .3em; color: rgba(255, 255, 255, .3);
}

/* ---------- 跑馬燈 ---------- */
.marquee {
  position: relative; overflow: hidden;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: rgba(10, 12, 28, .45);
  padding: 18px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; align-items: center; gap: 40px; white-space: nowrap; width: max-content; will-change: transform; }
.marquee-track span { font-size: 1.05rem; font-weight: 500; letter-spacing: .15em; }
.marquee-track i { font-style: normal; color: var(--cyan); font-size: .8rem; }

/* ---------- 區塊通用 ---------- */
.section { position: relative; padding: clamp(90px, 12vw, 160px) 0; }
.section-head { margin-bottom: clamp(40px, 6vw, 72px); max-width: 780px; }
.section-head.center { margin-inline: auto; text-align: center; }
.label { display: inline-block; font-family: var(--font-en); font-size: .7rem; letter-spacing: .3em; color: var(--cyan); margin-bottom: 18px; }
.h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); font-weight: 900; line-height: 1.22; letter-spacing: -.01em; margin-bottom: 18px; }
.lead { color: var(--muted); font-weight: 300; font-size: clamp(1rem, 1.2vw, 1.1rem); max-width: 620px; }
.section-head.center .lead { margin-inline: auto; }
/* 有光球的區塊要裁切，光球才不會把頁面撐寬（products 區塊有 sticky 卡片，不能裁） */
.about, .services, .process, .contact { overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .32; pointer-events: none; z-index: -1; }
.orb-a { width: 520px; height: 520px; background: var(--violet); right: -160px; top: 10%; }
.orb-b { width: 460px; height: 460px; background: var(--cyan); left: -200px; bottom: 0; opacity: .18; }
.orb-c { width: 480px; height: 480px; background: var(--pink); right: -140px; bottom: -100px; opacity: .2; }
.orb-d { width: 600px; height: 600px; background: var(--violet); left: -220px; top: -100px; opacity: .22; }
html.js .reveal { opacity: 0; transform: translateY(30px); }

/* ---------- About ---------- */
.statement { font-size: clamp(1.5rem, 3.2vw, 2.7rem); font-weight: 500; line-height: 1.55; max-width: 1000px; margin-bottom: clamp(50px, 8vw, 90px); }
.statement .w { display: inline-block; color: rgba(255, 255, 255, .16); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.stat { background: rgba(5, 6, 15, .8); padding: 36px 30px; position: relative; overflow: hidden; }
.stat::before { content: ''; position: absolute; inset: 0; background: radial-gradient(360px circle at var(--mx) var(--my), rgba(34, 211, 238, .1), transparent 55%); opacity: 0; transition: opacity .4s; }
.stat:hover::before { opacity: 1; }
.stat-num { font-family: var(--font-en); font-size: clamp(2.6rem, 5vw, 4rem); font-weight: 700; line-height: 1; display: flex; align-items: baseline; gap: 2px; }
.stat-num span, .stat-num em { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-num em { font-style: normal; font-size: .5em; }
.stat-label { color: var(--muted); font-size: .85rem; margin-top: 12px; }

/* ---------- Services (Bento) ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.bento-a, .bento-b, .bento-c, .bento-d { grid-column: span 2; }
.bento-e { grid-column: span 4; }
.card {
  position: relative; padding: 32px; min-height: 260px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: rgba(10, 12, 28, .6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  overflow: hidden; transform-style: preserve-3d; transition: border-color .4s;
}
.card:hover { border-color: var(--border-hi); }
.card-glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(380px circle at var(--mx) var(--my), rgba(139, 92, 246, .22), transparent 60%); opacity: 0; transition: opacity .4s; }
.card:hover .card-glow, .contact-form:hover .card-glow { opacity: 1; }
.card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, rgba(34, 211, 238, .7), transparent 40%, transparent 60%, rgba(236, 72, 153, .7));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .4s;
}
.card:hover::before { opacity: 1; }
.card-icon { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .05); border: 1px solid var(--border); margin-bottom: 22px; transform: translateZ(30px); }
.card-icon svg { width: 22px; height: 22px; fill: none; stroke: url(#starGrad); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.card-index { position: absolute; top: 30px; right: 30px; font-family: var(--font-en); font-size: .65rem; letter-spacing: .25em; color: var(--muted); }
.card h3 { font-size: 1.35rem; font-weight: 700; margin-bottom: 10px; transform: translateZ(20px); }
.card p { color: var(--muted); font-size: .93rem; font-weight: 300; margin-bottom: 20px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.card-tags li { font-size: .72rem; padding: 5px 10px; border-radius: 6px; background: rgba(255, 255, 255, .05); border: 1px solid var(--border); }
.card-featured { background: linear-gradient(135deg, rgba(139, 92, 246, .16), rgba(34, 211, 238, .06)); }
.featured-ring { position: absolute; right: -80px; bottom: -130px; width: 340px; height: 340px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .08); animation: spin 30s linear infinite; pointer-events: none; }
.featured-ring::before, .featured-ring::after { content: ''; position: absolute; inset: 44px; border-radius: 50%; border: 1px dashed rgba(34, 211, 238, .3); }
.featured-ring::after { inset: 96px; border-style: solid; border-color: rgba(236, 72, 153, .3); }

/* ---------- Products (堆疊卡片) ---------- */
.stack { position: relative; display: flex; flex-direction: column; gap: 32px; }
.pcard {
  position: sticky; top: calc(var(--nav-h) + 16px);
  border-radius: 28px; border: 1px solid var(--border);
  background: rgba(10, 12, 28, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  overflow: hidden; transform-origin: center top; will-change: transform;
  box-shadow: 0 -10px 60px rgba(0, 0, 0, .4);
}
.pcard::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(800px circle at 85% 15%, rgba(139, 92, 246, .18), transparent 55%); }
.pcard-ai { border-color: rgba(251, 191, 36, .3); }
.pcard-ai::before { background: radial-gradient(800px circle at 85% 15%, rgba(251, 191, 36, .12), transparent 55%); }
.pcard-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; padding: clamp(28px, 4vw, 56px); min-height: min(620px, 78vh); align-items: center; }
.pcard-top { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.pcard-no { font-family: var(--font-en); font-size: .7rem; letter-spacing: .3em; color: var(--muted); }
.pcard-status { font-size: .7rem; letter-spacing: .15em; padding: 5px 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 7px; }
.pcard-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; animation: pulseDot 1.6s infinite; }
.pcard-status.live { color: var(--green); background: rgba(52, 211, 153, .1); border: 1px solid rgba(52, 211, 153, .3); }
.pcard-status.dev { color: var(--gold); background: rgba(251, 191, 36, .1); border: 1px solid rgba(251, 191, 36, .3); }
.pcard h3 { font-size: clamp(1.7rem, 3vw, 2.5rem); font-weight: 900; line-height: 1.2; margin-bottom: 16px; }
.pcard p { color: var(--muted); font-weight: 300; margin-bottom: 26px; max-width: 520px; }
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 18px; }
.features li { position: relative; padding-left: 20px; font-size: .9rem; }
.features li::before { content: '✦'; position: absolute; left: 0; top: 0; color: var(--cyan); font-size: .75rem; }
.pcard-visual { position: relative; display: grid; place-items: center; min-height: 340px; }

/* 產品示意圖（純 CSS 假 UI） */
.mock { position: relative; width: 100%; max-width: 440px; font-size: .8rem; }
/* P1 看板 */
.mock-screen {
  border: 1px solid var(--border-hi); border-radius: 16px; padding: 16px;
  background: linear-gradient(160deg, #10133a, #05060f);
  box-shadow: 0 30px 60px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .04) inset;
  transform: perspective(900px) rotateY(-10deg) rotateX(4deg);
  animation: screenFloat 7s ease-in-out infinite;
}
@keyframes screenFloat { 50% { transform: perspective(900px) rotateY(-5deg) rotateX(2deg) translateY(-8px); } }
.mock-bar { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--border); font-weight: 700; }
.mock-bar b { width: 10px; height: 10px; border-radius: 50%; background: var(--grad); }
.mock-bar em { margin-left: auto; font-style: normal; font-family: var(--font-en); font-size: .6rem; letter-spacing: .2em; color: #f87171; }
.blink { animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.mock-row { display: flex; justify-content: space-between; padding: 8px 10px; border-radius: 8px; margin-bottom: 4px; background: rgba(255, 255, 255, .03); }
.mock-row b { font-family: var(--font-en); color: var(--cyan); }
.mock-row.hot { background: linear-gradient(90deg, rgba(236, 72, 153, .22), rgba(139, 92, 246, .16)); border: 1px solid rgba(236, 72, 153, .35); }
.mock-call {
  position: absolute; right: -12px; top: -26px; background: #fff; color: #05060f;
  border-radius: 14px; padding: 10px 18px; text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, .45); animation: floatY 4s ease-in-out infinite;
}
.mock-call small { display: block; font-family: var(--font-en); font-size: .55rem; letter-spacing: .2em; color: #666; }
.mock-call b { font-family: var(--font-en); font-size: 1.6rem; font-weight: 700; display: block; line-height: 1.1; }
.mock-links { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 22px; font-family: var(--font-en); font-size: .62rem; letter-spacing: .2em; color: var(--muted); }
.mock-links span { padding: 6px 12px; border: 1px solid var(--border); border-radius: 6px; }
.mock-links i { flex: 1; max-width: 60px; height: 1px; background: linear-gradient(90deg, var(--cyan), var(--violet)); position: relative; overflow: visible; }
.mock-links i::after { content: ''; position: absolute; top: -2px; left: 0; width: 6px; height: 5px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px #fff; animation: dataflow 1.6s linear infinite; }
@keyframes dataflow { from { transform: translateX(-6px); opacity: 0; } 20% { opacity: 1; } to { transform: translateX(60px); opacity: 0; } }
/* P2 點單 */
.mock-order { display: flex; align-items: center; justify-content: center; gap: 20px; }
.phone { width: 200px; border-radius: 26px; border: 1px solid var(--border-hi); background: #0b0d20; padding: 14px 12px; position: relative; box-shadow: 0 30px 60px rgba(0, 0, 0, .5); animation: floatY 6s ease-in-out infinite; }
.phone-notch { width: 60px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .12); margin: 0 auto 12px; }
.phone-head { font-weight: 700; font-size: .75rem; margin-bottom: 10px; }
.phone-item { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 8px; border-radius: 10px; background: rgba(255, 255, 255, .04); margin-bottom: 6px; font-size: .72rem; }
.phone-item b { grid-row: 2; font-weight: 300; color: var(--muted); font-size: .62rem; }
.phone-item i { grid-row: 1 / 3; align-self: center; width: 20px; height: 20px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-style: normal; font-size: .8rem; }
.phone-btn { margin-top: 8px; padding: 10px; border-radius: 12px; background: #fff; color: #05060f; text-align: center; font-weight: 700; font-size: .72rem; }
.calendar { width: 180px; border: 1px solid var(--border); border-radius: 16px; background: rgba(255, 255, 255, .04); padding: 14px; animation: floatY 6s ease-in-out infinite; animation-delay: -3s; }
.cal-head { font-size: .7rem; font-weight: 700; margin-bottom: 10px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-grid i { aspect-ratio: 1; border-radius: 4px; background: rgba(255, 255, 255, .06); }
.cal-grid i.sel { background: var(--grad); box-shadow: 0 0 10px rgba(139, 92, 246, .6); }
.cal-grid i.dot { background: rgba(34, 211, 238, .4); }
.cal-slot { margin-top: 10px; font-size: .62rem; color: var(--cyan); }
/* P3 CRM */
.mock-crm { display: flex; flex-direction: column; align-items: center; }
.crm-hq { padding: 8px 18px; border-radius: 10px; background: var(--grad); color: #fff; font-weight: 700; font-size: .75rem; box-shadow: 0 0 30px rgba(139, 92, 246, .5); }
.crm-lines { display: flex; gap: 60px; height: 30px; }
.crm-lines i { width: 1px; background: linear-gradient(to bottom, var(--violet), var(--cyan)); position: relative; }
.crm-lines i::after { content: ''; position: absolute; left: -2px; top: 0; width: 5px; height: 5px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px #fff; animation: dropflow 1.4s linear infinite; }
.crm-lines i:nth-child(2)::after { animation-delay: -.5s; }
.crm-lines i:nth-child(3)::after { animation-delay: -1s; }
@keyframes dropflow { from { transform: translateY(-4px); opacity: 0; } 30% { opacity: 1; } to { transform: translateY(30px); opacity: 0; } }
.crm-stores { display: flex; gap: 16px; margin-bottom: 22px; }
.crm-stores span { padding: 6px 14px; border: 1px solid var(--border-hi); border-radius: 8px; font-size: .7rem; background: rgba(255, 255, 255, .04); }
.crm-rows { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.crm-row { display: grid; grid-template-columns: 26px 90px 1fr 34px; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--border); font-size: .72rem; }
.pf { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-family: var(--font-en); font-weight: 700; color: #fff; font-size: .8rem; }
.pf.g { background: #34a853; } .pf.f { background: #1877f2; } .pf.t { background: #00aa6c; }
.crm-row .bar { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.crm-row .bar i { display: block; height: 100%; width: var(--w); background: var(--grad); transform-origin: left; animation: barGrow 2s var(--ease) both; }
.crm-row b { font-family: var(--font-en); color: var(--gold); text-align: right; }
@keyframes barGrow { from { transform: scaleX(0); } }
/* P4 ERP */
.mock-erp { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.erp-tile { border: 1px solid var(--border); border-radius: 16px; background: rgba(255, 255, 255, .04); padding: 14px; min-height: 120px; }
.erp-tile small { display: block; font-size: .65rem; color: var(--muted); margin-bottom: 10px; letter-spacing: .1em; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 60px; }
.bars i { flex: 1; height: var(--h); border-radius: 4px 4px 0 0; background: linear-gradient(to top, var(--violet), var(--cyan)); transform-origin: bottom; animation: barUp 1.6s var(--ease) both; }
.bars i:nth-child(2) { animation-delay: .1s; } .bars i:nth-child(3) { animation-delay: .2s; } .bars i:nth-child(4) { animation-delay: .3s; } .bars i:nth-child(5) { animation-delay: .4s; }
@keyframes barUp { from { transform: scaleY(0); } }
.ring { position: relative; width: 64px; height: 64px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke: rgba(255, 255, 255, .08); stroke-width: 3; }
.ring circle.val { stroke: url(#starGrad); stroke-dasharray: 97.4; stroke-dashoffset: 7.8; stroke-linecap: round; animation: ringFill 2s var(--ease) both; }
@keyframes ringFill { from { stroke-dashoffset: 97.4; } }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-en); font-size: .75rem; }
.mini-cal { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.mini-cal i { aspect-ratio: 1; border-radius: 4px; background: rgba(255, 255, 255, .06); }
.mini-cal i.ev { background: rgba(34, 211, 238, .35); }
.mini-cal i.sel { background: var(--grad); }
.todo { display: flex; flex-direction: column; gap: 6px; }
.todo span { font-size: .7rem; padding-left: 18px; position: relative; }
.todo span::before { content: ''; position: absolute; left: 0; top: 5px; width: 10px; height: 10px; border-radius: 3px; border: 1px solid var(--border-hi); }
.todo span.done { color: var(--muted); text-decoration: line-through; }
.todo span.done::before { background: var(--cyan); border-color: var(--cyan); }
/* P5 AI */
.mock-ai { position: relative; }
.chat { display: flex; flex-direction: column; gap: 10px; position: relative; z-index: 1; }
.msg { max-width: 86%; padding: 10px 14px; border-radius: 16px; font-size: .78rem; line-height: 1.55; }
.msg.user { align-self: flex-end; background: #fff; color: #05060f; border-bottom-right-radius: 4px; }
.msg.ai { align-self: flex-start; background: rgba(139, 92, 246, .22); border: 1px solid rgba(139, 92, 246, .4); border-bottom-left-radius: 4px; }
.msg.ai b { display: block; font-size: .6rem; letter-spacing: .15em; color: var(--cyan); margin-bottom: 4px; }
.msg.ai em { font-style: normal; color: var(--gold); }
.dots { display: inline-flex; gap: 4px; padding: 4px 0; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); animation: bounce 1s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 50% { transform: translateY(-5px); opacity: .5; } }
.ai-core { position: absolute; inset: 0; pointer-events: none; }
.ai-core i { position: absolute; left: 50%; top: 50%; width: 260px; height: 260px; margin: -130px 0 0 -130px; border-radius: 50%; border: 1px solid rgba(34, 211, 238, .22); animation: spin 20s linear infinite; }
.ai-core i:nth-child(2) { width: 360px; height: 360px; margin: -180px 0 0 -180px; border-color: rgba(139, 92, 246, .22); border-style: dashed; animation-duration: 34s; animation-direction: reverse; }
.ai-core i:nth-child(3) { width: 170px; height: 170px; margin: -85px 0 0 -85px; border-color: rgba(251, 191, 36, .3); animation-duration: 12s; }

/* ---------- Partners ---------- */
.logo-marquee {
  display: flex; flex-direction: column; gap: 18px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.logo-track { display: flex; gap: 18px; width: max-content; will-change: transform; }
.brand {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-width: 230px; height: 98px; padding: 0 28px;
  border: 1px solid var(--border); border-radius: 18px;
  background: rgba(10, 12, 28, .6);
  transition: border-color .3s, transform .3s var(--ease), background .3s, box-shadow .3s;
}
.brand:hover { border-color: var(--cyan); transform: translateY(-4px); background: rgba(34, 211, 238, .06); box-shadow: 0 10px 40px rgba(34, 211, 238, .12); }
.brand b { font-size: 1.15rem; font-weight: 700; letter-spacing: .1em; }
.brand small { font-family: var(--font-en); font-size: .6rem; letter-spacing: .3em; color: var(--muted); }
.brand img { height: 36px; width: auto; object-fit: contain; }
.partners-note { text-align: center; margin-top: 36px; color: var(--muted); font-size: .9rem; }

/* ---------- Process ---------- */
.steps { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-top: 44px; }
.steps-line { position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--border); }
.steps-line i { display: block; height: 100%; width: 0; background: var(--grad); box-shadow: 0 0 14px var(--cyan); }
.step { position: relative; padding: 28px 24px; border: 1px solid var(--border); border-radius: var(--radius); background: rgba(10, 12, 28, .6); transition: border-color .3s, transform .4s var(--ease); }
.step:hover { border-color: var(--border-hi); transform: translateY(-6px); }
.step::before { content: ''; position: absolute; top: -48px; left: 24px; width: 9px; height: 9px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.step-no { font-family: var(--font-en); font-size: 2.4rem; font-weight: 700; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; display: block; margin-bottom: 16px; }
.step h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: .9rem; font-weight: 300; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 60px; align-items: center; }
.contact-info { margin-top: 36px; display: flex; flex-direction: column; gap: 14px; }
.contact-info li { display: flex; gap: 18px; align-items: baseline; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.contact-info small { font-family: var(--font-en); font-size: .62rem; letter-spacing: .3em; color: var(--cyan); min-width: 80px; }
.contact-info span { color: var(--text); }
.contact-info span.is-placeholder { color: var(--muted); }
.contact-info a { border-bottom: 1px solid var(--border-hi); transition: color .3s, border-color .3s; }
.contact-info a:hover { color: var(--cyan); border-color: var(--cyan); }
.contact-form {
  position: relative; padding: 36px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); backdrop-filter: blur(16px);
  display: flex; flex-direction: column; gap: 18px; overflow: hidden;
  transform-style: preserve-3d;
}
.field { position: relative; }
.field input, .field textarea {
  width: 100%; padding: 20px 16px 8px; border: 1px solid var(--border); border-radius: 12px;
  background: rgba(255, 255, 255, .03); color: var(--text); font: inherit; outline: none;
  transition: border-color .3s, box-shadow .3s; resize: vertical;
}
.field label { position: absolute; left: 16px; top: 14px; color: var(--muted); font-size: .9rem; pointer-events: none; transition: all .25s var(--ease); }
.field input:focus, .field textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, .15); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label { top: 6px; font-size: .62rem; letter-spacing: .12em; color: var(--cyan); }
.field.is-error input, .field.is-error textarea { border-color: #f87171; box-shadow: 0 0 0 3px rgba(248, 113, 113, .15); }

/* ---------- Footer ---------- */
.footer {
  position: relative; z-index: 3; border-top: 1px solid var(--border);
  padding: 60px 0 clamp(90px, 13vw, 200px); overflow: hidden;
  background: linear-gradient(to bottom, transparent, rgba(5, 6, 15, .92));
}
.footer-grid { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand b { display: block; font-weight: 700; letter-spacing: .08em; }
.footer-brand small { color: var(--muted); font-family: var(--font-en); font-size: .68rem; letter-spacing: .1em; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); font-size: .88rem; transition: color .3s; }
.footer-links a:hover { color: var(--text); }
.to-top { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--border-hi); display: grid; place-items: center; font-family: var(--font-en); transition: background .3s, color .3s, transform .3s var(--ease); }
.to-top:hover { background: #fff; color: #05060f; transform: translateY(-4px); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .75rem; color: var(--muted); font-family: var(--font-en); letter-spacing: .05em; padding-top: 24px; border-top: 1px solid var(--border); }
.footer-giant {
  position: absolute; left: 50%; bottom: -.22em; transform: translateX(-50%);
  font-family: var(--font-en); font-weight: 700; font-size: clamp(5rem, 18vw, 16rem); line-height: 1; letter-spacing: -.02em;
  color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .07);
  pointer-events: none; white-space: nowrap; user-select: none;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 20px);
  padding: 14px 22px; border-radius: 14px;
  background: rgba(10, 12, 28, .92); border: 1px solid var(--border-hi); backdrop-filter: blur(14px);
  font-size: .9rem; opacity: 0; pointer-events: none; z-index: 200; max-width: 90vw; text-align: center;
  transition: opacity .4s, transform .4s var(--ease);
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 響應式 ---------- */
@media (max-width: 1024px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-a, .bento-b, .bento-c, .bento-d { grid-column: span 1; }
  .bento-e { grid-column: span 2; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); padding-top: 0; }
  .steps-line, .step::before { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-side { display: none; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .pcard-inner { grid-template-columns: 1fr; gap: 32px; min-height: auto; }
  .pcard-visual { min-height: auto; padding: 20px 0; }
}
@media (max-width: 768px) {
  :root { --nav-h: 64px; }
  .nav-links { display: none; }
  .burger { display: block; }
  .sound-text { display: none; }
  .nav-actions .btn { display: none; }
  .hero { padding-top: calc(var(--nav-h) + 30px); padding-bottom: 100px; align-items: flex-end; }
  .hero::before { background: linear-gradient(to top, rgba(5, 6, 15, .92) 0%, rgba(5, 6, 15, .7) 45%, transparent 80%); }
  .hero-coords { display: none; }
  .eyebrow { font-size: .62rem; }
  .bento { grid-template-columns: 1fr; }
  .bento-e { grid-column: span 1; }
  .card { padding: 26px; min-height: auto; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 24px 18px; }
  .steps { grid-template-columns: 1fr; }
  .pcard { top: calc(var(--nav-h) + 10px); border-radius: 22px; }
  .pcard-inner { padding: 24px; }
  .mock-order { flex-direction: column; }
  .mock-call { right: 0; top: -16px; }
  .mock-erp { gap: 10px; }
  .ai-core { display: none; }
  .contact-form { padding: 24px; }
  .footer-grid { flex-direction: column; align-items: flex-start; }
  .brand { min-width: 180px; height: 84px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .grain { display: none; }
}
