/* ============================================================
   xue Craft launcher · 官网样式
   视觉方向：暖色调编辑式 — 深色暖底 + 红橙渐变 + 樱花飘落
   ============================================================ */

:root {
  --bg: #140f0d;
  --bg-2: #1d1511;
  --surface: #271c17;
  --surface-2: #32241d;
  --border: rgba(255, 214, 180, 0.12);
  --border-strong: rgba(255, 214, 180, 0.22);
  --text: #f6ede2;
  --text-dim: #cdbba9;
  --muted: #9c8a7a;
  --accent: #e9762e;
  --accent-2: #d63f36;
  --accent-3: #f3a48b;
  --cream: #fff5ea;
  --gold: #e8b65f;
  --ok: #6fd18a;

  --max: 1180px;
  --radius: 16px;
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui,
    -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
code {
  font-family: "SF Mono", Consolas, "Courier New", monospace;
  background: rgba(233, 118, 46, 0.14);
  color: var(--accent-3);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.9em;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* 跳转链接 */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ============ 飘落樱花 ============ */
.petals {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.petals span {
  position: absolute;
  top: -30px;
  left: var(--x);
  width: var(--s);
  height: var(--s);
  background: radial-gradient(circle at 30% 30%, #ffd6cc, #f3a48b 60%, #e07a6b);
  border-radius: 50% 0 50% 50%;
  opacity: 0.75;
  filter: drop-shadow(0 0 4px rgba(243, 164, 139, 0.4));
  animation: fall var(--dur) linear infinite;
  animation-delay: var(--d);
}
@keyframes fall {
  0% { transform: translateY(-30px) translateX(0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.8; }
  90% { opacity: 0.6; }
  100% { transform: translateY(110vh) translateX(60px) rotate(540deg); opacity: 0; }
}

/* ============ 顶部导航 ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(20, 15, 13, 0.78);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand img {
  width: 36px; height: 36px;
  border-radius: 10px;
  box-shadow: 0 0 0 1px var(--border-strong), 0 4px 16px rgba(214, 63, 54, 0.35);
}
.brand-name { font-weight: 800; letter-spacing: 0.5px; }
.brand-tag {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 2px;
}
.nav-links {
  display: flex;
  gap: 28px;
  margin-left: auto;
}
.nav-links a {
  font-size: 14px;
  color: var(--text-dim);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-cta { margin-left: 8px; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--accent-3); outline-offset: 3px; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent-2) 0%, var(--accent) 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(214, 63, 54, 0.35);
}
.btn-primary:hover { box-shadow: 0 12px 32px rgba(233, 118, 46, 0.5); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.09); }
.btn-block { width: 100%; }

/* ============ Hero ============ */
.hero { position: relative; padding: 72px 0 56px; z-index: 2; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--accent-3);
  text-transform: uppercase;
  margin: 0 0 18px;
  font-weight: 700;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.15;
  margin: 0 0 22px;
  font-weight: 800;
  letter-spacing: -1px;
}
.hero h1 .accent {
  background: linear-gradient(120deg, var(--accent-3), var(--accent) 55%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  font-size: 17px;
  color: var(--text-dim);
  max-width: 540px;
  margin: 0 0 30px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-meta {
  margin-top: 22px;
  font-size: 13px;
  color: var(--muted);
}
.hero-meta strong { color: var(--text); }

.hero-visual { position: relative; display: flex; justify-content: center; }
.mascot-ring {
  width: min(440px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 14px;
  background: conic-gradient(from 120deg, var(--accent-2), var(--accent), var(--gold), var(--accent-3), var(--accent-2));
  box-shadow: 0 30px 80px -20px rgba(214, 63, 54, 0.55),
              0 0 60px rgba(233, 118, 46, 0.25);
  animation: float 6s ease-in-out infinite;
}
.mascot-ring img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--bg);
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
.float-card {
  position: absolute;
  background: rgba(39, 28, 23, 0.92);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(8px);
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  color: var(--text-dim);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.float-card-a { top: 12%; left: -6%; animation: float 5s ease-in-out infinite; }
.float-card-b { bottom: 10%; right: -4%; animation: float 7s ease-in-out infinite 0.5s; }
.dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.dot-green { background: var(--ok); box-shadow: 0 0 8px var(--ok); }

/* ============ 滚动条 ============ */
.marquee {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
  overflow: hidden;
  padding: 16px 0;
  position: relative;
  z-index: 2;
}
.marquee-track {
  display: inline-flex;
  gap: 24px;
  white-space: nowrap;
  animation: scroll 40s linear infinite;
  padding-left: 24px;
}
.marquee-track span { color: var(--text-dim); font-size: 14px; }
.marquee-track span:nth-child(even) { color: var(--accent); }
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============ 通用区块标题 ============ */
section { position: relative; z-index: 2; }
.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 48px;
}
.section-head h2 {
  font-size: clamp(28px, 3.6vw, 40px);
  margin: 0 0 14px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.section-sub { color: var(--text-dim); margin: 0; font-size: 16px; }

/* ============ 功能 bento 网格 ============ */
.features { padding: 88px 0; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
.feature:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.feature-lg { grid-column: span 2; }
.feature-wide { grid-column: span 2; }
.feature-num {
  font-family: "SF Mono", Consolas, monospace;
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 1px;
  margin-bottom: 14px;
}
.feature h3 { margin: 0 0 10px; font-size: 19px; }
.feature p { margin: 0; color: var(--text-dim); font-size: 15px; }

/* ============ 下载卡片 ============ */
.compare { padding: 88px 0; background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.download-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.download-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
  display: flex;
  flex-direction: column;
}
.download-card.featured {
  border-color: rgba(233, 118, 46, 0.55);
  box-shadow: 0 20px 60px -20px rgba(214, 63, 54, 0.45);
  background: linear-gradient(180deg, var(--surface) 0%, #2c1f17 100%);
}
.card-ribbon {
  position: absolute;
  top: -12px; right: 24px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 999px;
  letter-spacing: 1px;
}
.download-card h3 { margin: 0 0 8px; font-size: 24px; }
.card-desc { color: var(--text-dim); margin: 0 0 18px; font-size: 15px; }
.card-list { list-style: none; padding: 0; margin: 0 0 22px; flex: 1; }
.card-list li {
  padding: 8px 0 8px 24px;
  position: relative;
  font-size: 14px;
  color: var(--text-dim);
  border-bottom: 1px dashed var(--border);
}
.card-list li:last-child { border-bottom: none; }
.card-list li::before {
  content: "✓";
  position: absolute; left: 0;
  color: var(--ok);
  font-weight: 800;
}
.card-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
}
.card-meta strong { color: var(--text); font-weight: 600; }
.download-note {
  text-align: center;
  margin-top: 28px;
  font-size: 13px;
  color: var(--muted);
}
.download-note a { color: var(--accent-3); text-decoration: underline; }

/* ============ 上手步骤 ============ */
.guide { padding: 88px 0; }
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}
.steps li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  position: relative;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 16px;
  box-shadow: 0 6px 18px rgba(214, 63, 54, 0.4);
}
.steps h3 { margin: 0 0 10px; font-size: 19px; }
.steps p { margin: 0; color: var(--text-dim); font-size: 15px; }

/* ============ FAQ ============ */
.faq { padding: 88px 0; background: var(--bg-2); border-top: 1px solid var(--border); }
.faq-inner { max-width: 820px; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px 20px;
  transition: border-color 0.2s;
}
.faq details[open] { border-color: var(--border-strong); }
.faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  padding: 16px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 22px;
  color: var(--accent);
  font-weight: 400;
  transition: transform 0.2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--text-dim); font-size: 15px; }

/* ============ 免责声明 ============ */
.disclaimer { padding: 70px 0; }
.disclaimer .container { max-width: 880px; }
.disclaimer h2 { font-size: 24px; margin: 0 0 20px; }
.disclaimer ul { padding-left: 22px; margin: 0; }
.disclaimer li { color: var(--text-dim); font-size: 14.5px; margin-bottom: 10px; }

/* ============ 页脚 ============ */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  padding: 40px 0 28px;
  position: relative;
  z-index: 2;
}
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { border-radius: 8px; }
.footer-brand div { display: flex; flex-direction: column; line-height: 1.4; }
.footer-brand span { font-size: 12px; color: var(--muted); }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { font-size: 14px; color: var(--text-dim); }
.footer-links a:hover { color: var(--text); }
.copyright { width: 100%; text-align: center; margin: 18px 0 0; font-size: 12px; color: var(--muted); }

/* ============ 滚动渐入 ============ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ============ 响应式 ============ */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-visual { order: -1; }
  .mascot-ring { width: min(300px, 70%); }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .feature-lg, .feature-wide { grid-column: span 2; }
  .download-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .float-card-a { left: 2%; }
  .float-card-b { right: 2%; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-lg, .feature-wide { grid-column: span 1; }
  .hero { padding-top: 48px; }
  .nav-cta { padding: 8px 14px; font-size: 13px; }
  .section-head { margin-bottom: 32px; }
  .features, .compare, .guide, .faq { padding: 60px 0; }
}

/* ============ 减弱动效 ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .petals span { display: none; }
}
