/* 
   NEXUS UI - THE HYBRID FRAMEWORK (LUXURY EDITION)
   Combining Bento Structure + High-End Aesthetics
   Theme: Royal Gold & Clean White
*/

:root {
  /* 基础色板 - 亮色奢华系 */
  --bg: #f9f9fb;         /* 极浅冷灰白，比纯白更有质感 */
  --surface: #ffffff;    /* 纯白卡片 */
  --surface-hover: #ffffff;
  
  --border: #e2e2e7;     /* 细腻的灰边框 */
  --border-active: #d4af37; /* 激活/Hover时的金色 */
  
  --primary: #d4af37;    /* 香槟金 */
  --primary-light: rgba(212, 175, 55, 0.1);
  --primary-foreground: #ffffff;
  
  --text-main: #27272a;  /* 深灰黑，柔和 */
  --text-muted: #71717a; /* 次级灰 */
  
  /* 尺寸系统 - 紧凑 */
  --radius: 0.75rem;     /* 稍微减小圆角，更干练 */
  --container-width: 1100px; /* 稍微收窄容器，增加精致感 */
  
  /* 排版 */
  --font-sans: "Inter", system-ui, sans-serif;
  --font-display: "Playfair Display", "Georgia", serif; 
  
  --text-h1: 2.5rem;
  --text-h2: 1.75rem;
  --text-h3: 1.15rem;
  --text-body: 0.9rem;
}

/* 全局设置 */
body {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: var(--font-sans);
  margin: 0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* 噪点纹理 - 极淡 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: multiply;
}

/* 布局容器 */
.nx-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

.nx-section {
  padding: 4rem 0; /* 减小垂直间距 */
}

/* -----------------------------
   导航栏 (跑马灯边框版)
   ----------------------------- */
.nx-nav-wrapper {
  position: fixed;
  top: 1rem;
  left: 0;
  width: 100%;
  z-index: 999;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.nx-nav {
  pointer-events: auto;
  position: relative;
  border-radius: 9999px;
  padding: 2px; /* 这就是边框宽度 */
  background: #e0e0e0; /* 默认淡灰边框 */
  box-shadow: 0 8px 32px -4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* 旋转的光束 - 使用 ::before */
.nx-nav::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150%;
  aspect-ratio: 1;
  background: conic-gradient(
    from 0deg,
    transparent 0deg 300deg,
    var(--primary) 330deg,
    #fff8dc 345deg,
    var(--primary) 360deg
  );
  transform: translate(-50%, -50%);
  animation: nav-beam-spin 2.5s linear infinite;
}

@keyframes nav-beam-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 内层容器 - 遮住中间，只露出边缘的旋转光 */
.nx-nav-inner {
  position: relative;
  z-index: 1;
  background: white;
  border-radius: 9999px;
  padding: 0.5rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nx-nav-logo {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--text-main);
  white-space: nowrap;
}

.nx-nav-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.nx-nav-links a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
  font-weight: 500;
  white-space: nowrap;
}

.nx-nav-links a:hover {
  color: var(--primary);
}

.nx-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.nx-nav-actions a {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
}

.nx-nav-actions a:hover {
  color: var(--primary);
}

/* -----------------------------
   混合卡片 (Bento Grid)
   ----------------------------- */
.nx-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
  grid-auto-rows: minmax(100px, auto);
}

.nx-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.nx-card:hover {
  border-color: var(--border-active);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -8px rgba(212, 175, 55, 0.15);
}

/* 卡片内容 */
.nx-card-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Spotlight 效果 (可选，仅在 hover 时显示微光) */
.nx-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    600px circle at var(--mouse-x) var(--mouse-y),
    rgba(212, 175, 55, 0.05), 
    transparent 40%
  );
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.nx-grid:hover .nx-card::before {
  opacity: 1;
}

/* 字体排版 */
h1 {
  font-family: var(--font-display);
  font-size: var(--text-h1);
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

h2 {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  margin-bottom: 1rem;
}

h3 {
  font-family: var(--font-sans);
  font-size: var(--text-h3);
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

p {
  color: var(--text-muted);
  font-size: var(--text-body);
  margin-bottom: 1rem;
}

/* 按钮 (精致版) */
.nx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 99px;
  background: var(--primary);
  color: white;
  font-weight: 500;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.nx-btn:hover {
  transform: translateY(-1px);
  background: #c5a028;
}

.nx-btn-text {
  background: transparent;
  color: inherit;
  font-weight: 500;
}

.nx-btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  box-shadow: none;
}

.nx-btn-outline:hover {
  border-color: var(--text-main);
  color: var(--text-main);
  background: transparent;
}

/* 装饰性元素 */
.nx-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  font-size: 0.75rem;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.nx-gradient-text {
  background: linear-gradient(135deg, #27272a 0%, #52525b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 辅助类 */
.text-center { text-align: center; }
.col-span-12 { grid-column: span 12; }
.col-span-8 { grid-column: span 8; }
.col-span-6 { grid-column: span 6; }
.col-span-4 { grid-column: span 4; }
.col-span-3 { grid-column: span 3; }

/* 输入框 */
input[type="email"],
input[type="text"] {
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="email"]:focus,
input[type="text"]:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

input[type="email"]::placeholder {
  color: rgba(255,255,255,0.5);
}

/* Footer 链接悬浮 */
footer a:hover {
  color: var(--primary) !important;
}

/* 响应式 */
@media (max-width: 768px) {
  .nx-nav { min-width: auto; width: 90%; }
  .nx-nav-links { display: none; }
  .col-span-12, .col-span-8, .col-span-6, .col-span-4, .col-span-3 {
    grid-column: span 12;
  }
  
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.35rem; }
}

