/* ================================================
   极拓工坊 · Design System
   共享样式基础 — 所有页面统一引用
   ================================================ */

/* ─── Design Tokens ─── */
:root {
  --primary: #ec5b13;
  --primary-hover: #d45311;
  --primary-10: rgba(236, 91, 19, 0.1);
  --primary-30: rgba(236, 91, 19, 0.3);
  --ink: #111111;
  --ink-2: #1a1a1a;
  --ink-secondary: #4b5563;
  --paper: #ffffff;
  --bg: #f8f6f6;
  --ash: #f5f5f5;
  --line: #e5e7eb;
  --muted: #6b7280;
  --faint: #9ca3af;
  --dim: #d1d5db;
  --success: #10b981;
  --error: #ef4444;
  --font-sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-serif: "Noto Serif SC", "Songti SC", serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 0.2s;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5 {
  margin: 0;
  font-family: var(--font-serif);
  letter-spacing: -0.02em;
}
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; height: auto; }

/* ─── Layout ─── */
.wrap {
  width: min(1200px, calc(100vw - 48px));
  margin: 0 auto;
}
.desktop-layout { display: block; }
.mobile-layout { display: none; }

/* ─── Buttons ─── */
.btn {
  border: 1px solid transparent;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 18px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--duration) var(--ease);
}
.btn:hover { background: var(--primary); }
.btn.primary { background: var(--primary); }
.btn.primary:hover { background: var(--primary-hover); }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn.ghost:hover { background: var(--ink); color: #fff; }
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-buy {
  flex: 1;
  padding: 9px 0;
  text-align: center;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  text-decoration: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--duration) var(--ease);
}
.btn-buy:hover { background: var(--primary); color: #fff; }
.btn-buy.secondary { border-color: var(--dim); color: #374151; }
.btn-buy.secondary:hover { background: #f3f4f6; color: var(--ink); }
.btn-buy.disabled {
  border-color: var(--line);
  color: var(--faint);
  cursor: not-allowed;
  background: #f9fafb;
}
.btn-buy.disabled:hover { background: #f9fafb; color: var(--faint); }

/* ─── Status Badges ─── */
.status-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.06em;
  pointer-events: none;
  z-index: 2;
}
.status-badge.online { background: #dcfce7; color: #166534; }
.status-badge.coming { background: #f1f5f9; color: #64748b; }

/* ─── Site Header ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 246, 246, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header-inner {
  width: min(1240px, calc(100vw - 48px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.site-brand-mark {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.site-brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.site-brand-text {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.01em;
}
.site-nav {
  display: inline-flex;
  gap: 28px;
  align-items: center;
}
.site-nav a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-secondary);
  transition: color var(--duration) var(--ease);
  position: relative;
  padding: 4px 0;
}
.site-nav a:hover { color: var(--primary); }
.site-nav a.active { color: var(--primary); }
.site-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}
/* ─── Nav Dropdown ─── */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nav-dropdown-trigger {
  cursor: pointer;
  user-select: none;
}
.nav-arrow {
  font-size: 10px;
  margin-left: 2px;
  opacity: 0.5;
}
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 0;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  min-width: 140px;
  padding: 14px 0 6px 0;
  z-index: 200;
}
.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}
.nav-dropdown-menu a {
  display: block;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
}
.nav-dropdown-menu a:hover {
  color: var(--primary);
  background: var(--primary-10);
}
.nav-dropdown-menu a.active {
  color: var(--primary);
}
.nav-dropdown-menu a.active::after {
  display: none;
}

.site-nav .nav-divider {
  width: 1px;
  height: 16px;
  background: var(--line);
  flex-shrink: 0;
}
.site-mobile-back {
  display: none;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: color var(--duration) var(--ease);
}
.site-mobile-back:hover { color: var(--primary); }

/* ─── Site Footer ─── */
.site-footer {
  border-top: 1px solid var(--line);
  background: #f1f5f9;
  padding: 64px 0 24px;
}
.site-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.site-footer h4 {
  font-size: 20px;
  font-weight: 900;
}
.site-footer .tagline {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.72;
}
.site-footer h5 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 14px;
  color: var(--ink);
}
.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.site-footer ul a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: color var(--duration) var(--ease);
}
.site-footer ul a:hover { color: var(--primary); }
.site-footer-bottom {
  border-top: 1px solid #dbe2ea;
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  color: #94a3b8;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ─── Responsive ─── */
@media (max-width: 980px) {
  .site-nav { display: none; }
  .site-mobile-back { display: inline-flex; }
  .site-footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .desktop-layout { display: none; }
  .mobile-layout { display: block; }
  .wrap { width: calc(100vw - 32px); }
  .status-badge { font-size: 10px; padding: 2px 8px; }
  .btn-buy { flex: none; width: 100%; padding: 11px 0; }
}
