/* Enercode 官网 · 基础层：token / 导航 / 按钮 / 首屏 / 动效 */
:root {
  --bg: #f6f5ff;
  --ink: #14132b;
  --muted: #5d5c78;
  --line: rgba(20, 19, 43, 0.08);
  --blue: #448aff;
  --violet: #5e62e9;
  --lilac: #a79bff;
  --pink: #ff8fb1;
  --sun: #f6b40c;
  --mint: #4fd8bd;
  --grad: linear-gradient(115deg, #448aff 0%, #7681ed 40%, #ff8fb1 72%, #f6b40c 100%);
  --radius: 28px;
  --shadow: 0 30px 60px -24px rgba(62, 56, 160, 0.28), 0 8px 20px -8px rgba(20, 19, 43, 0.08);
  --font: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
/* 细颗粒噪点，压掉大面积渐变的塑料感 */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 100; 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='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.15; font-weight: 800; }
p { margin: 0; }
.container { width: min(1180px, 100% - 48px); margin: 0 auto; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- 导航 ---------- */
.nav {
  position: fixed; top: 14px; left: 50%; z-index: 50; transform: translateX(-50%);
  width: min(1180px, 100% - 28px); display: flex; align-items: center; gap: 28px;
  padding: 10px 10px 10px 18px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.62); border: 1px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  transition: box-shadow 0.3s, background 0.3s;
}
.nav.scrolled { background: rgba(255, 255, 255, 0.85); box-shadow: 0 10px 30px -12px rgba(62, 56, 160, 0.25); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -0.01em; }
.brand img { width: 34px; height: 34px; border-radius: 10px; }
.nav-links { display: flex; gap: 6px; margin-left: auto; }
.nav-links a { padding: 8px 14px; border-radius: 999px; font-size: 15px; color: var(--muted); transition: 0.2s; }
.nav-links a:hover { color: var(--ink); background: rgba(94, 98, 233, 0.08); }
.nav-toggle { display: none; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; font-weight: 700; border: 0; cursor: pointer; transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-dark { background: var(--ink); color: #fff; box-shadow: 0 10px 24px -10px rgba(20, 19, 43, 0.6); }
.btn-sm { padding: 10px 20px; font-size: 14px; }
.store {
  display: inline-flex; align-items: center; gap: 12px; padding: 12px 22px 12px 18px; border-radius: 18px;
  background: var(--ink); color: #fff; min-width: 186px; transition: transform 0.25s var(--ease), box-shadow 0.25s;
  box-shadow: 0 16px 30px -16px rgba(20, 19, 43, 0.7);
}
.store svg { width: 28px; height: 28px; flex: none; }
.store span { display: flex; flex-direction: column; font-size: 17px; font-weight: 700; line-height: 1.2; }
.store small { font-size: 11px; font-weight: 500; opacity: 0.7; letter-spacing: 0.02em; }
.store:hover { transform: translateY(-3px); box-shadow: 0 22px 36px -16px rgba(94, 98, 233, 0.8); }
.store.light { background: #fff; color: var(--ink); box-shadow: 0 16px 30px -16px rgba(62, 56, 160, 0.35); }
.store.is-current { outline: 3px solid rgba(246, 180, 12, 0.9); outline-offset: 3px; }

.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--violet); background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(94, 98, 233, 0.15);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(79, 216, 189, 0.2); animation: pulse 2s infinite; }

/* ---------- 首屏 ---------- */
.hero { position: relative; padding: 150px 0 90px; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.55; z-index: -1; animation: drift 18s ease-in-out infinite alternate; }
.b1 { width: 520px; height: 520px; background: #b9c8ff; top: -120px; left: -140px; }
.b2 { width: 460px; height: 460px; background: #ffc9da; top: 60px; right: -120px; animation-delay: -6s; }
.b3 { width: 380px; height: 380px; background: #ffe7a3; bottom: -160px; left: 38%; animation-delay: -12s; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(42px, 6vw, 76px); margin: 22px 0 22px; }
.lead { font-size: clamp(16px, 1.4vw, 19px); color: var(--muted); max-width: 520px; }
.store-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-meta { list-style: none; display: flex; gap: 36px; padding: 0; margin: 40px 0 0; color: var(--muted); font-size: 14px; }
.hero-meta b { display: block; font-size: 30px; color: var(--ink); line-height: 1.1; }

.hero-visual { position: relative; height: 640px; }
.phone {
  position: absolute; width: 290px; aspect-ratio: 9 / 20; border-radius: 44px; padding: 9px;
  background: linear-gradient(160deg, #2a2950, #0f0e22); box-shadow: var(--shadow), inset 0 0 0 1.5px rgba(255, 255, 255, 0.12);
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 36px; }
.phone::after { content: ""; position: absolute; top: 18px; left: 50%; width: 76px; height: 20px; transform: translateX(-50%); border-radius: 20px; background: #0b0a1a; }
.hero-visual .phone.tilt { left: 22%; top: 0; z-index: 2; transform: rotate(-5deg); animation: float 7s ease-in-out infinite; }
.hero-visual .phone-back { left: 52%; top: 70px; width: 250px; transform: rotate(7deg); opacity: 0.95; animation: float 7s ease-in-out -3.5s infinite; }
.sticker { position: absolute; z-index: 3; filter: drop-shadow(0 14px 18px rgba(62, 56, 160, 0.25)); }
.s1 { width: 130px; left: 4%; bottom: 60px; animation: bob 4.5s ease-in-out infinite; }
.s2 { width: 104px; right: 0; top: 10px; animation: bob 5s ease-in-out -2s infinite; }
.chip {
  position: absolute; z-index: 4; display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-size: 14px; font-weight: 600; box-shadow: 0 14px 30px -14px rgba(62, 56, 160, 0.35); white-space: nowrap;
}
.chip i { width: 10px; height: 10px; border-radius: 4px; }
.c1 { left: 0; top: 120px; animation: bob 6s ease-in-out infinite; }
.c1 i { background: var(--blue); }
.c2 { right: 2%; bottom: 120px; animation: bob 6s ease-in-out -3s infinite; }
.c2 i { background: var(--sun); }

/* ---------- 跑马灯 ---------- */
.marquee-wrap { overflow: hidden; padding: 24px 0; }
.marquee { overflow: hidden; padding: 18px 0; background: var(--ink); color: #fff; transform: rotate(-1.5deg); margin: 0 -20px; }
.track { display: flex; width: max-content; animation: scroll 30s linear infinite; }
.track span { display: flex; align-items: center; gap: 28px; padding-right: 28px; font-size: 20px; font-weight: 700; white-space: nowrap; }
.track span::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--grad); }

/* ---------- 进场动效 ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@keyframes float { 50% { translate: 0 -14px; } }
@keyframes bob { 50% { transform: translateY(-10px) rotate(2deg); } }
@keyframes drift { to { transform: translate(60px, 40px) scale(1.1); } }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(79, 216, 189, 0); } }
@keyframes scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .hero { padding: 120px 0 60px; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .lead { margin: 0 auto; }
  .store-row, .hero-meta { justify-content: center; }
  .hero-visual { height: 560px; max-width: 460px; width: 100%; margin: 0 auto; }
}
@media (max-width: 720px) {
  .nav { gap: 12px; }
  .nav-links {
    position: fixed; top: 70px; left: 0; right: 0; flex-direction: column; gap: 4px; padding: 12px;
    border-radius: 24px; background: rgba(255, 255, 255, 0.96); box-shadow: var(--shadow);
    opacity: 0; pointer-events: none; transform: translateY(-8px); transition: 0.25s var(--ease);
  }
  .nav.open .nav-links { opacity: 1; pointer-events: auto; transform: none; }
  .nav-links a { padding: 14px 18px; font-size: 16px; }
  .nav .btn-sm { margin-left: auto; }
  .nav-toggle { display: grid; place-content: center; gap: 5px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(94, 98, 233, 0.1); cursor: pointer; }
  .nav-toggle span { width: 16px; height: 2px; border-radius: 2px; background: var(--ink); transition: 0.25s; }
  .nav.open .nav-toggle span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .nav.open .nav-toggle span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .container { width: calc(100% - 36px); }
  .hero-meta { gap: 22px; }
  .hero-meta b { font-size: 24px; }
  .store { min-width: 0; flex: 1 1 150px; padding: 11px 16px; }
  .hero-visual { height: 470px; }
  .phone { width: 220px; border-radius: 36px; padding: 7px; }
  .phone img { border-radius: 30px; }
  .hero-visual .phone.tilt { left: 12%; }
  .hero-visual .phone-back { width: 190px; left: 46%; top: 50px; }
  .s1 { width: 92px; bottom: 30px; }
  .s2 { width: 76px; }
  .chip { font-size: 12px; padding: 8px 12px; }
  .c1 { top: 70px; }
  .track span { font-size: 16px; }
}
