/* ========== YuukiLa 独立站 · 米纸 × 墨 × 朱 ========== */
:root {
  --bg: #f5f1e8;
  --bg-2: #ede7d9;
  --text: #211d19;
  --dim: #7d756a;
  --acc-1: #d94f30;              /* 朱 */
  --acc-2: #2e5f8a;              /* 藍 */
  --acc-3: #e8a33c;              /* 琥珀 */
  --grad: linear-gradient(120deg, #d94f30, #e8a33c);
  --card-bg: rgba(255, 255, 255, 0.6);
  --card-border: rgba(33, 29, 25, 0.1);
  --shadow-soft: 0 18px 48px rgba(33, 29, 25, 0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  overflow-x: hidden;
  cursor: default;
}

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

/* ---------- 背景粒子画布 ---------- */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* 氛围光斑 */
body::before, body::after {
  content: "";
  position: fixed;
  width: 55vw;
  height: 55vw;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.28;
  z-index: 0;
  pointer-events: none;
}
body::before { background: #f2c48d; top: -18vw; left: -14vw; animation: blob 18s ease-in-out infinite alternate; }
body::after { background: #b8cfc9; bottom: -20vw; right: -12vw; animation: blob 22s ease-in-out infinite alternate-reverse; }

@keyframes blob {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(8vw, 6vw) scale(1.15); }
}

/* ---------- 鼠标辉光 ---------- */
.cursor-glow {
  position: fixed;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 79, 48, 0.1), transparent 65%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.3s;
}

/* ---------- 加载动画 ---------- */
.loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  transition: opacity 0.7s, visibility 0.7s;
}
.loader.done { opacity: 0; visibility: hidden; }
.loader-logo {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.55; transform: scale(0.97); } }
.loader-bar {
  width: 220px; height: 3px;
  background: rgba(33, 29, 25, 0.12);
  border-radius: 99px;
  overflow: hidden;
}
.loader-bar span {
  display: block; height: 100%; width: 0;
  background: var(--grad);
  border-radius: 99px;
  animation: load 1.6s ease forwards;
}
@keyframes load { to { width: 100%; } }

/* ---------- 导航 ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 64px);
  backdrop-filter: blur(14px);
  background: rgba(245, 241, 232, 0.6);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s, background 0.4s;
}
.nav.scrolled { border-color: var(--card-border); background: rgba(245, 241, 232, 0.85); }
.nav-logo {
  font-size: 1.25rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--acc-1);
  box-shadow: 0 0 10px rgba(217, 79, 48, 0.5);
  animation: pulse 2s infinite;
}
.logo-suffix { color: var(--acc-2); }
.nav-links { display: flex; gap: clamp(14px, 3vw, 36px); }
.nav-links a {
  color: var(--dim);
  text-decoration: none;
  font-size: 0.95rem;
  position: relative;
  transition: color 0.3s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: var(--grad);
  transition: width 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
}
.hero-badge {
  font-size: 0.8rem;
  letter-spacing: 0.35em;
  color: var(--acc-1);
  border: 1px solid rgba(217, 79, 48, 0.4);
  padding: 8px 20px;
  border-radius: 99px;
  margin-bottom: 34px;
  background: rgba(217, 79, 48, 0.06);
  animation: floatY 4s ease-in-out infinite;
}
@keyframes floatY { 50% { transform: translateY(-8px); } }

.hero-title {
  font-size: clamp(2.6rem, 8vw, 6rem);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: 0.02em;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .word {
  display: inline-block;
  transform: translateY(110%);
  animation: riseUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-title .line:nth-child(1) .word:nth-child(1) { animation-delay: 1.55s; }
.hero-title .line:nth-child(1) .word:nth-child(2) { animation-delay: 1.68s; }
.hero-title .line:nth-child(1) .word:nth-child(3) { animation-delay: 1.8s; }
.hero-title .line:nth-child(2) .word:nth-child(1) { animation-delay: 1.95s; }
.hero-title .line:nth-child(2) .word:nth-child(2) { animation-delay: 2.08s; }
.hero-title .line:nth-child(2) .word:nth-child(3) { animation-delay: 2.2s; }
@keyframes riseUp { to { transform: translateY(0); } }

.gradient-text {
  background: var(--grad);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: riseUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards, gradShift 5s linear infinite;
}
.gradient-text-2 {
  background: linear-gradient(120deg, #2e5f8a, #4f8fb0, #d94f30);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: riseUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards, gradShift 5s linear infinite reverse;
}
@keyframes gradShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-sub {
  margin-top: 28px;
  color: var(--dim);
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  line-height: 1.9;
}

.hero-cta { display: flex; gap: 18px; margin-top: 44px; flex-wrap: wrap; justify-content: center; }

.btn {
  position: relative;
  display: inline-block;
  padding: 15px 42px;
  border-radius: 99px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}
.btn span { position: relative; z-index: 2; }
.btn-primary {
  color: #fff;
  background: var(--grad);
  background-size: 200% 200%;
  animation: gradShift 4s linear infinite;
  box-shadow: 0 10px 30px rgba(217, 79, 48, 0.35);
}
.btn-primary:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 16px 42px rgba(217, 79, 48, 0.5); }
.btn-ghost {
  color: var(--text);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  backdrop-filter: blur(8px);
}
.btn-ghost::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad);
  opacity: 0;
  transition: opacity 0.3s;
}
.btn-ghost:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); }
.btn-ghost:hover::before { opacity: 0.12; }

.hero-stats {
  display: flex;
  gap: clamp(28px, 6vw, 72px);
  margin-top: 64px;
}
.stat { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.stat b {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat i { font-style: normal; color: var(--dim); font-size: 0.85rem; letter-spacing: 0.1em; }

.scroll-hint {
  position: absolute;
  bottom: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--dim);
  font-size: 0.7rem;
  letter-spacing: 0.4em;
}
.scroll-hint span {
  width: 1px; height: 46px;
  background: linear-gradient(to bottom, transparent, var(--acc-1));
  animation: scrollLine 1.8s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- 跑马灯 ---------- */
.marquee {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.4);
  padding: 18px 0;
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 42px;
  width: max-content;
  animation: marquee 26s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  white-space: nowrap;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.marquee-track em { color: var(--acc-2); font-style: normal; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- 通用 Section ---------- */
.section {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(80px, 12vw, 150px) 24px;
}
.section-title {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 900;
  margin-bottom: 48px;
  display: flex;
  align-items: baseline;
  gap: 18px;
}
.section-title .num {
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: var(--acc-1);
  border: 1px solid rgba(217, 79, 48, 0.4);
  border-radius: 8px;
  padding: 4px 10px;
}

/* ---------- 作品卡片 ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}
.card {
  position: relative;
  display: block;
  text-decoration: none;
  color: var(--text);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 42px 34px;
  backdrop-filter: blur(12px);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: border-color 0.4s, box-shadow 0.4s;
}
.card:hover { border-color: rgba(217, 79, 48, 0.45); box-shadow: 0 24px 60px rgba(217, 79, 48, 0.18); }
.card-glow {
  position: absolute;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 163, 60, 0.25), transparent 65%);
  top: var(--gy, 50%);
  left: var(--gx, 50%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}
.card:hover .card-glow { opacity: 1; }
.card-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  display: inline-block;
  animation: floatY 3.5s ease-in-out infinite;
  filter: drop-shadow(0 6px 14px rgba(217, 79, 48, 0.35));
}
.lotto-icon { animation-delay: 1.2s; }
.card h3 { font-size: 1.6rem; font-weight: 800; margin-bottom: 8px; }
.card .tag { color: var(--acc-2); font-size: 0.82rem; letter-spacing: 0.12em; margin-bottom: 16px; }
.card .desc { color: var(--dim); line-height: 1.85; font-size: 0.95rem; }
.card-more {
  display: inline-block;
  margin-top: 24px;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: transform 0.3s;
}
.card:hover .card-more { transform: translateX(6px); }

/* ---------- 产品详情 ---------- */
.feature {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}
.feature.reverse .feature-visual { order: 2; }
.slogan {
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  font-weight: 700;
  margin: -20px 0 34px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.feature-list { list-style: none; display: flex; flex-direction: column; gap: 18px; }
.feature-list li {
  color: var(--dim);
  line-height: 1.8;
  padding: 16px 20px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.feature-list li:hover { transform: translateX(8px); border-color: rgba(46, 95, 138, 0.4); box-shadow: var(--shadow-soft); }
.feature-list b {
  display: block;
  color: var(--text);
  font-size: 1.02rem;
  margin-bottom: 4px;
}
.feature-tags { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.feature-tags span {
  font-size: 0.8rem;
  color: var(--acc-2);
  border: 1px solid rgba(46, 95, 138, 0.35);
  background: rgba(46, 95, 138, 0.06);
  padding: 6px 16px;
  border-radius: 99px;
}

/* ---------- 归零塔动画 ---------- */
.feature-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
}
.tower {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 6px;
  position: relative;
  perspective: 600px;
}
.tower-floor {
  width: calc(70px + var(--i) * 16px);
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #d94f30, #e8a33c);
  box-shadow: 0 6px 18px rgba(217, 79, 48, 0.3);
  animation: floorIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both, floorGlow 3s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.12s), calc(var(--i) * 0.3s);
}
.tower-floor.cleared {
  background: rgba(255, 255, 255, 0.5);
  border: 1px dashed rgba(46, 95, 138, 0.55);
  box-shadow: none;
  animation: floorIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--i) * 0.12s);
}
@keyframes floorIn {
  from { opacity: 0; transform: translateY(50px) rotateX(60deg); }
  to   { opacity: 1; transform: translateY(0) rotateX(0); }
}
@keyframes floorGlow {
  50% { box-shadow: 0 6px 28px rgba(232, 163, 60, 0.55); filter: brightness(1.1); }
}
.tower-flag {
  position: absolute;
  top: -38px;
  font-size: 1.8rem;
  animation: flagWave 2s ease-in-out infinite;
}
@keyframes flagWave {
  0%, 100% { transform: rotate(-8deg) translateY(0); }
  50% { transform: rotate(8deg) translateY(-6px); }
}

/* ---------- 智选彩球动画 ---------- */
.lotto-machine {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  max-width: 340px;
}
.lotto-ball {
  width: 72px; height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.3rem;
  color: #fff;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,0.75), var(--c) 42%, rgba(0,0,0,0.3));
  box-shadow: 0 10px 24px rgba(33, 29, 25, 0.18), 0 0 20px var(--c);
  animation: ballBounce 2.4s cubic-bezier(0.36, 0, 0.64, 1) infinite;
  animation-delay: calc(var(--i) * 0.22s);
}
.lotto-ball.special { box-shadow: 0 10px 24px rgba(33, 29, 25, 0.2), 0 0 30px var(--c); }
@keyframes ballBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  30% { transform: translateY(-26px) scale(1.04); }
  50% { transform: translateY(0) scale(0.96, 1.04); }
  65% { transform: translateY(-10px) scale(1); }
}

/* ---------- 关于 ---------- */
.about-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  padding: clamp(36px, 5vw, 64px);
  backdrop-filter: blur(12px);
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.about-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: conic-gradient(from var(--angle, 0deg), transparent 60%, rgba(217, 79, 48, 0.45), transparent);
  animation: rotateBorder 6s linear infinite;
  z-index: -1;
}
@keyframes rotateBorder { to { --angle: 360deg; } }
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

.avatar {
  width: 92px; height: 92px;
  margin: 0 auto 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  font-weight: 900;
  color: #fff;
  background: var(--grad);
  background-size: 200% 200%;
  animation: gradShift 5s linear infinite;
  box-shadow: 0 12px 36px rgba(217, 79, 48, 0.4);
}
.about-card p { color: var(--dim); line-height: 2.1; font-size: 1.02rem; }
.about-card b { color: var(--text); }
.about-card .dim { opacity: 0.75; font-size: 0.92rem; }
.about-quote {
  margin-top: 30px;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- 页脚 ---------- */
.footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 56px 24px;
  border-top: 1px solid var(--card-border);
  color: var(--dim);
}
.footer-logo {
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 12px;
  color: var(--text);
}
.footer-logo span { color: var(--acc-2); }
.beian { margin-top: 10px; font-size: 0.82rem; }
.beian a {
  color: var(--dim);
  text-decoration: none;
  transition: color 0.3s;
}
.beian a:hover { color: var(--acc-1); }

/* ---------- 滚动显现 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(42px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .feature, .feature.reverse { grid-template-columns: 1fr; }
  .feature.reverse .feature-visual { order: 0; }
  .nav-links { display: none; }
  .hero-stats { gap: 24px; }
}
