/* ===== XDayan 门户 · 设计令牌 ===== */
:root {
  --bg: #0B1220;
  --bg-elevated: #111827;
  --border: #1E293B;
  --grad-hero: 135deg, #0B1220 0%, #065F46 100%;
  --primary: #10B981;
  --primary-strong: #059669;
  --accent: #34D399;
  --text: #FFFFFF;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;

  --radius: 12px;
  --radius-lg: 20px;
  --container: 1080px;
  --nav-h: 64px;
  --font: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* ===== 基础重置 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--primary);
  color: #06241c;
}
.btn-primary:hover { background: var(--primary-strong); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--primary); }

.btn-lg { padding: 16px 36px; font-size: 18px; border-radius: var(--radius-lg); }

.btn[disabled] {
  opacity: .5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ===== 顶部导航 ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(11, 18, 32, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .5px;
}
.brand .accent { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 15px;
  color: var(--text-secondary);
  transition: color .2s ease;
}
.nav-links a:hover { color: var(--text); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(var(--grad-hero));
  padding: 120px 0 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 300px at 50% 0%, rgba(16, 185, 129, .18), transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; }
.hero-eyebrow {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero-title {
  font-size: 52px;
  line-height: 1.15;
  font-weight: 800;
  margin-bottom: 20px;
}
.hero-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 36px;
}
.hero-actions { display: flex; justify-content: center; gap: 16px; }

/* ===== 通用区块 ===== */
.section { padding: 96px 0; }
.section-title {
  font-size: 32px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 48px;
}

/* ===== 公司介绍 ===== */
.about { background: var(--bg); }
.about-body {
  max-width: 720px;
  margin: 0 auto;
  color: var(--text-secondary);
  font-size: 17px;
}
.about-body p + p { margin-top: 16px; }

/* ===== 产品区 ===== */
.products { background: var(--bg-elevated); border-block: 1px solid var(--border); }
.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.product-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.product-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
}
.product-logo--text {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  color: var(--text-muted);
}
.product-name { font-size: 26px; font-weight: 800; }
.product-tagline { color: var(--text-secondary); font-size: 16px; }
.product-actions { display: flex; gap: 12px; margin-top: 8px; }

.product-card--muted { opacity: .75; }
.badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

/* ===== 下载区 ===== */
.download { background: var(--bg); }
.download-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 720px;
  margin: 0 auto;
}
.download-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.download-card h3 { font-size: 20px; font-weight: 700; }
.qr {
  width: 200px;
  height: 200px;
  border-radius: var(--radius);
  background: #fff;
  padding: 10px;
}
.download-hint { color: var(--text-muted); font-size: 14px; }
.ios-status {
  color: var(--text-muted);
  font-size: 16px;
  padding: 30px 0;
}

/* ===== 页脚 ===== */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 48px 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.footer-brand { font-size: 20px; font-weight: 800; }
.footer-contact { color: var(--text-secondary); font-size: 14px; }
.footer-contact a:hover { color: var(--accent); }
.footer-icp { color: var(--text-muted); font-size: 13px; }

/* ===== 下载引导页 ===== */
.download-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.dl-inner {
  width: 100%;
  max-width: 420px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.dl-logo { width: 72px; height: 72px; border-radius: 18px; }
.dl-title { font-size: 26px; font-weight: 800; }
.dl-subtitle { color: var(--text-secondary); font-size: 15px; }
.dl-actions { width: 100%; margin-top: 8px; }
.dl-actions .btn { width: 100%; }
.dl-ios { color: var(--text-muted); font-size: 14px; }

/* 微信内提示遮罩 */
.wechat-mask {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(11, 18, 32, .96);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 120px 32px 0;
  gap: 12px;
}
.wechat-mask[hidden] { display: none; }
.wechat-arrow {
  font-size: 64px;
  color: var(--accent);
  position: absolute;
  top: 20px;
  right: 24px;
}
.wechat-mask p { color: var(--text); font-size: 20px; font-weight: 600; text-align: center; }
.wechat-mask strong { color: var(--accent); font-size: 26px; }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .hero { padding: 80px 0 70px; }
  .hero-title { font-size: 34px; }

  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 24px; width: 100%; }
  .nav-toggle { display: flex; }
  .nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.active span:nth-child(2) { opacity: 0; }
  .nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .product-grid,
  .download-grid { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .section-title { font-size: 26px; margin-bottom: 32px; }
}