/* ========================================
   SOF瞬息态 官网样式 - "外太空·瞬息万变"
   深色宇宙科技感 | 纯静态 | 响应式
   ======================================== */

/* ===== CSS 变量 ===== */
:root {
  /* 背景色系 */
  --bg-deep: #06060f;
  --bg-space: #0d0b1e;
  --bg-nebula: #15102e;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --bg-glass: rgba(20, 16, 45, 0.6);

  /* 品牌色系 */
  --c-flux: #7B68EE;
  --c-flux-bright: #9F8CFF;
  --c-quantum: #00E5FF;
  --c-quantum-dim: #00B8D4;
  --c-nebula: #FF6B35;
  --c-nebula-dim: #E55100;
  --c-aurora: #B388FF;

  /* 文字色 */
  --t-primary: #F5F5FA;
  --t-secondary: #A0A0B8;
  --t-tertiary: #606078;
  --t-flux: #9F8CFF;
  --t-quantum: #00E5FF;

  /* 边框/分割 */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(123, 104, 238, 0.3);
  --border-hover: rgba(123, 104, 238, 0.5);

  /* 字体 */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-display: 'Helvetica Neue', 'PingFang SC', 'Microsoft YaHei', sans-serif;

  /* 尺寸 */
  --max-width: 1200px;
  --nav-height: 70px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* 动效 */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --transition: 0.35s var(--ease);
}

/* ===== Reset ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--t-primary);
  background: var(--bg-deep);
  overflow-x: hidden;
  min-height: 100vh;
}

/* ===== 宇宙背景层 ===== */
.cosmos-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(123, 104, 238, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(0, 229, 255, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(255, 107, 53, 0.05) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-space) 50%, var(--bg-deep) 100%);
}

/* 星点效果 */
.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.6;
}

.stars::before,
.stars::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(1px 1px at 25% 5%, white, transparent),
    radial-gradient(1px 1px at 50% 15%, rgba(159, 140, 255, 0.8), transparent),
    radial-gradient(1px 1px at 75% 10%, white, transparent),
    radial-gradient(1px 1px at 15% 25%, rgba(0, 229, 255, 0.6), transparent),
    radial-gradient(1px 1px at 85% 30%, white, transparent),
    radial-gradient(1px 1px at 35% 45%, white, transparent),
    radial-gradient(1px 1px at 65% 40%, rgba(159, 140, 255, 0.7), transparent),
    radial-gradient(1px 1px at 10% 60%, white, transparent),
    radial-gradient(1px 1px at 90% 55%, rgba(0, 229, 255, 0.5), transparent),
    radial-gradient(1px 1px at 45% 75%, white, transparent),
    radial-gradient(1px 1px at 70% 85%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1px 1px at 20% 90%, white, transparent);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.stars::after {
  animation: twinkle 4s ease-in-out infinite alternate;
  opacity: 0.5;
}

@keyframes twinkle {
  0% { opacity: 0.3; }
  100% { opacity: 0.7; }
}

/* ===== 光影追随（JS动态创建的元素）===== */
.cursor-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123, 104, 238, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease-out;
  will-change: transform;
}

/* ===== 容器 ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== 导航栏 ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 100;
  background: rgba(6, 6, 15, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(6, 6, 15, 0.9);
  border-bottom: 1px solid var(--border-glow);
}

.nav-inner {
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--t-primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 2px;
}

.nav-logo img {
  height: 36px;
  width: auto;
  object-fit: contain;
}

.nav-logo-text {
  background: linear-gradient(135deg, var(--c-flux-bright), var(--c-quantum));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--t-secondary);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 1px;
  position: relative;
  transition: var(--transition);
  padding: 4px 0;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--t-primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--c-flux), var(--c-quantum));
  transition: width 0.3s var(--ease);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* 移动端菜单按钮 */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--t-primary);
  border-radius: 1px;
  transition: var(--transition);
}

/* ===== Hero 区 ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: var(--nav-height) 24px 80px;
}

.hero-content {
  max-width: 900px;
}

.hero-logo-mark {
  width: 80px;
  height: 80px;
  margin: 0 auto 40px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123, 104, 238, 0.2) 0%, transparent 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 3s ease-in-out infinite;
}

.hero-logo-mark img {
  max-width: 60px;
  max-height: 60px;
  object-fit: contain;
  opacity: 0.9;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 9vw, 120px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #F5F5FA 0%, var(--c-flux-bright) 40%, var(--c-quantum) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 400;
  color: var(--t-primary);
  margin-bottom: 12px;
  letter-spacing: 4px;
}

.hero-subtitle-en {
  font-size: clamp(14px, 2vw, 17px);
  font-weight: 300;
  color: var(--t-secondary);
  letter-spacing: 3px;
  margin-bottom: 48px;
}

.hero-tagline {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--t-secondary);
  max-width: 600px;
  margin: 0 auto 48px;
  line-height: 1.8;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 36px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 2px;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--c-flux) 0%, var(--c-quantum-dim) 100%);
  color: white;
  box-shadow: 0 0 30px rgba(123, 104, 238, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 50px rgba(123, 104, 238, 0.5);
}

.btn-outline {
  background: transparent;
  color: var(--t-primary);
  border: 1px solid var(--border-glow);
}

.btn-outline:hover {
  border-color: var(--c-flux-bright);
  background: rgba(123, 104, 238, 0.1);
}

/* ===== 区块通用 ===== */
.section {
  padding: 100px 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 4px;
  color: var(--c-quantum);
  text-transform: uppercase;
  margin-bottom: 16px;
  padding: 6px 16px;
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 20px;
  background: rgba(0, 229, 255, 0.05);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--t-primary) 0%, var(--c-flux-bright) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-desc {
  font-size: 16px;
  color: var(--t-secondary);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ===== 品牌定义区 ===== */
.brand-def {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.brand-def-text {
  font-size: clamp(18px, 2.5vw, 24px);
  line-height: 1.9;
  color: var(--t-primary);
  margin-bottom: 20px;
  font-weight: 300;
}

.brand-def-text strong {
  font-weight: 500;
  color: var(--c-flux-bright);
}

.brand-def-en {
  font-size: 15px;
  color: var(--t-tertiary);
  line-height: 1.8;
  font-style: italic;
}

/* ===== 产品卡片 ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
}

.product-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
}

.product-card-image {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-nebula);
  position: relative;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.product-card:hover .product-card-image img {
  transform: scale(1.05);
}

/* 光栅变色悬浮覆盖 */
.product-card-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, transparent 40%, rgba(123, 104, 238, 0.1) 50%, transparent 60%);
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}

.product-card:hover .product-card-image::after {
  opacity: 1;
}

.product-card-body {
  padding: 28px 24px;
}

.product-card-name {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--t-primary);
}

.product-card-name-en {
  font-size: 13px;
  color: var(--t-tertiary);
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.product-card-desc {
  font-size: 14px;
  color: var(--t-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.product-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.product-tag {
  display: inline-block;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(123, 104, 238, 0.1);
  border: 1px solid rgba(123, 104, 238, 0.2);
  color: var(--t-flux);
  letter-spacing: 0.5px;
}

.product-card-link {
  font-size: 13px;
  color: var(--c-quantum);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.product-card-link:hover {
  color: var(--c-quantum-bright, #40E0FF);
  gap: 10px;
}

/* ===== 技术说明区 ===== */
.tech-block {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  position: relative;
}

.tech-block::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--c-flux), transparent, var(--c-quantum));
  opacity: 0.15;
  z-index: -1;
}

.tech-block-title {
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 20px;
  color: var(--c-flux-bright);
}

.tech-block p {
  color: var(--t-secondary);
  font-size: 15px;
  line-height: 1.9;
  margin-bottom: 16px;
}

.tech-block p:last-child {
  margin-bottom: 0;
}

.tech-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.tech-keyword {
  font-size: 12px;
  color: var(--t-tertiary);
  padding: 6px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
}

/* ===== CTA 区 ===== */
.cta-section {
  text-align: center;
  padding: 80px 0;
}

.cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== 品牌故事（关于我们页）===== */
.story-section {
  max-width: 800px;
  margin: 0 auto;
}

.story-text {
  font-size: 16px;
  line-height: 2;
  color: var(--t-secondary);
  margin-bottom: 24px;
}

.story-text strong {
  color: var(--c-flux-bright);
  font-weight: 500;
}

.story-quote {
  font-size: 22px;
  font-weight: 300;
  font-style: italic;
  color: var(--t-primary);
  text-align: center;
  margin: 40px auto;
  padding: 32px;
  border-left: 3px solid var(--c-flux);
  background: var(--bg-card);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  max-width: 600px;
}

/* ===== 信息卡片网格（关于我们页）===== */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.info-card {
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: var(--transition);
}

.info-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.info-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(123, 104, 238, 0.15), rgba(0, 229, 255, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 22px;
}

.info-card-title {
  font-size: 17px;
  font-weight: 500;
  margin-bottom: 10px;
  color: var(--t-primary);
}

.info-card-text {
  font-size: 14px;
  color: var(--t-secondary);
  line-height: 1.7;
}

/* ===== 联系信息 ===== */
.contact-info {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: center;
  align-items: center;
  margin-top: 40px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--t-secondary);
  font-size: 14px;
}

.contact-item strong {
  color: var(--t-primary);
}

/* ===== 页脚 ===== */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 60px 0 30px;
  background: rgba(6, 6, 15, 0.5);
}

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

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.footer-brand {
  flex: 1;
  min-width: 250px;
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--c-flux-bright), var(--c-quantum));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-brand-desc {
  font-size: 14px;
  color: var(--t-tertiary);
  max-width: 300px;
  line-height: 1.7;
}

.footer-social {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--t-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}

.footer-social a:hover {
  border-color: var(--c-flux);
  color: var(--c-flux-bright);
  background: rgba(123, 104, 238, 0.1);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 30px;
  border-top: 1px solid var(--border-subtle);
}

.footer-icp {
  font-size: 13px;
  color: var(--t-tertiary);
}

.footer-icp a {
  color: var(--t-tertiary);
  text-decoration: none;
  transition: var(--transition);
}

.footer-icp a:hover {
  color: var(--t-secondary);
}

.footer-copy {
  font-size: 13px;
  color: var(--t-tertiary);
}

/* ===== 产品详情列表（产品页）===== */
.product-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  transition: var(--transition);
}

.product-detail:hover {
  border-color: var(--border-glow);
}

.product-detail.reverse {
  direction: rtl;
}

.product-detail.reverse > * {
  direction: ltr;
}

.product-detail-image {
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-nebula);
}

.product-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail-info h3 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--t-primary);
}

.product-detail-info .name-en {
  font-size: 15px;
  color: var(--t-tertiary);
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.product-detail-info .desc {
  font-size: 15px;
  color: var(--t-secondary);
  line-height: 1.9;
  margin-bottom: 24px;
}

.product-specs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.spec-row {
  display: flex;
  gap: 12px;
  font-size: 14px;
}

.spec-label {
  color: var(--t-tertiary);
  min-width: 80px;
  flex-shrink: 0;
}

.spec-value {
  color: var(--t-primary);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    height: 0;
    background: rgba(6, 6, 15, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    transition: height 0.35s var(--ease);
    border-bottom: 1px solid var(--border-subtle);
  }

  .nav-links.open {
    height: auto;
    padding: 20px 0;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    display: block;
    padding: 14px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .hero {
    padding-top: calc(var(--nav-height) + 20px);
  }

  .section {
    padding: 60px 0;
  }

  .product-detail {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px;
  }

  .product-detail.reverse {
    direction: ltr;
  }

  .footer-top {
    flex-direction: column;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}

/* ===== 无障碍 ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* 焦点样式 */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--c-quantum);
  outline-offset: 3px;
  border-radius: 4px;
}

/* 屏幕阅读器专用 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
