/* ============================================
   Intrix Website - Global Styles
   ============================================ */

:root {
  /* Colors */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a24;
  --accent: #7c3aed;
  --accent-light: #a78bfa;
  --accent-glow: rgba(124, 58, 237, 0.4);
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --border: #27272a;
  --success: #10b981;
  --warning: #f59e0b;

  /* Pixel aesthetic colors */
  --pixel-green: #22c55e;
  --pixel-cyan: #06b6d4;
  --pixel-pink: #ec4899;
  --pixel-yellow: #eab308;

  /* Spacing */
  --section-padding: 100px 0;
  --container-width: 1200px;
  --border-radius: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

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

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p {
  color: var(--text-secondary);
}

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: var(--text-primary);
}

/* ============================================
   Navigation
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-light), var(--pixel-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo span {
  font-size: 0.75em;
  opacity: 0.7;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s;
}

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

.nav-cta {
  background: var(--accent);
  color: white !important;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
}

.nav-cta:hover {
  background: var(--accent-light);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(124, 58, 237, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(124, 58, 237, 0.2);
  border: 1px solid rgba(124, 58, 237, 0.3);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--accent-light);
  margin-bottom: 24px;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  background: var(--pixel-green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero h1 {
  margin-bottom: 24px;
}

.hero h1 .gradient {
  background: linear-gradient(135deg, var(--accent-light), var(--pixel-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.125rem;
  margin-bottom: 32px;
  color: var(--text-secondary);
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all 0.3s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #9333ea);
  color: white;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--accent);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image {
  width: 100%;
  max-width: 500px;
  border-radius: 20px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.1),
    0 20px 60px rgba(0,0,0,0.5),
    0 0 100px rgba(124, 58, 237, 0.2);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.hero-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.3) 0%, transparent 70%);
  filter: blur(60px);
  z-index: -1;
}

/* ============================================
   Stats Section
   ============================================ */
.stats {
  padding: 60px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ============================================
   Features Section
   ============================================ */
.features {
  padding: var(--section-padding);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
}

.section-label {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.section-header h2 {
  margin-bottom: 16px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  padding: 32px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--pixel-cyan));
  opacity: 0;
  transition: opacity 0.3s;
}

.feature-card:hover {
  border-color: rgba(124, 58, 237, 0.3);
  transform: translateY(-4px);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--accent), var(--pixel-cyan));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
}

.feature-card h3 {
  margin-bottom: 12px;
  font-size: 1.25rem;
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* ============================================
   AI Feature Section
   ============================================ */
.ai-section {
  padding: var(--section-padding);
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
}

.ai-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, rgba(124, 58, 237, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.ai-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.ai-visual {
  position: relative;
}

.ai-demo {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.ai-demo-header {
  background: var(--bg-primary);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

.ai-demo-header .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.ai-demo-header .dot.red { background: #ef4444; }
.ai-demo-header .dot.yellow { background: #eab308; }
.ai-demo-header .dot.green { background: #22c55e; }

.ai-demo-content {
  padding: 24px;
}

.chat-message {
  margin-bottom: 16px;
  animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-message.user {
  text-align: right;
}

.chat-bubble {
  display: inline-block;
  padding: 12px 16px;
  border-radius: 16px;
  max-width: 80%;
  font-size: 0.95rem;
}

.chat-message.ai .chat-bubble {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.chat-message.user .chat-bubble {
  background: var(--accent);
  color: white;
}

.ai-info h2 {
  margin-bottom: 24px;
}

.ai-info h2 .gradient {
  background: linear-gradient(135deg, var(--accent-light), var(--pixel-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ai-features {
  list-style: none;
  margin-top: 32px;
}

.ai-features li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.ai-features li .icon {
  width: 24px;
  height: 24px;
  background: rgba(124, 58, 237, 0.2);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent-light);
}

/* ============================================
   Products Section
   ============================================ */
.products {
  padding: var(--section-padding);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 60px;
}

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

.product-card:hover {
  border-color: var(--accent);
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.product-card.featured {
  border-color: var(--accent);
}

.product-card.featured::before {
  content: '早鸟特惠';
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--accent);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 10;
}

.product-image {
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
  padding: 20px;
}

.product-image img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.product-info {
  padding: 24px;
}

.product-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.product-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.product-specs {
  list-style: none;
  margin-bottom: 20px;
}

.product-specs li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.product-specs li:last-child {
  border-bottom: none;
}

.product-specs .label {
  color: var(--text-muted);
}

.product-specs .value {
  color: var(--text-primary);
  font-weight: 500;
}

.product-price {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
}

.product-price .current {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.product-price .original {
  font-size: 1.1rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.product-price .badge {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.product-btn {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.product-btn:hover {
  background: var(--accent-light);
}

/* ============================================
   Scenarios Section
   ============================================ */
.scenarios {
  padding: var(--section-padding);
  background: var(--bg-secondary);
}

.scenarios-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 60px;
}

.scenario-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
}

.scenario-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.scenario-card:hover img {
  transform: scale(1.1);
}

.scenario-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(transparent, rgba(0,0,0,0.9));
}

.scenario-overlay h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.scenario-overlay p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
}

/* ============================================
   Tech Section
   ============================================ */
.tech {
  padding: var(--section-padding);
}

.tech-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-top: 60px;
}

.tech-image {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.tech-image img {
  width: 100%;
  display: block;
}

.tech-info h3 {
  margin-bottom: 20px;
  font-size: 1.75rem;
}

.tech-list {
  list-style: none;
}

.tech-list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
}

.tech-list li:last-child {
  border-bottom: none;
}

.tech-list .icon {
  width: 40px;
  height: 40px;
  background: var(--bg-card);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tech-list .text h4 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.tech-list .text p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ============================================
   Support Section
   ============================================ */
.support {
  padding: var(--section-padding);
  background: var(--bg-secondary);
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 60px;
}

.support-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  padding: 32px;
  text-align: center;
  transition: all 0.3s;
}

.support-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.support-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--accent), var(--pixel-cyan));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 20px;
}

.support-card h3 {
  margin-bottom: 12px;
}

.support-card p {
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.support-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-light);
  font-weight: 500;
}

.support-link:hover {
  color: var(--text-primary);
}

/* ============================================
   Footer
   ============================================ */
.footer {
  padding: 60px 0 30px;
  border-top: 1px solid var(--border);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p {
  margin-top: 16px;
  font-size: 0.9rem;
  max-width: 300px;
}

.footer-links h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
  .hero .container,
  .ai-content,
  .tech-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .hero-image {
    max-width: 400px;
  }

  .features-grid,
  .products-grid,
  .support-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .scenarios-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ai-features li {
    justify-content: center;
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid .large {
    grid-column: span 2;
    grid-row: span 1;
  }
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid .large {
    grid-column: span 2;
  }
}

/* ============================================
   Pixel Grid Animation (Background)
   ============================================ */
.pixel-grid-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.03;
  background-image:
    linear-gradient(rgba(124, 58, 237, 0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 58, 237, 0.3) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* ============================================
   Gallery Section
   ============================================ */
.gallery {
  padding: var(--section-padding);
  background: var(--bg-secondary);
}

.gallery-group {
  margin-bottom: 60px;
}

.gallery-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.gallery-grid .large {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-item {
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card);
  aspect-ratio: 1;
}

.gallery-item.large {
  aspect-ratio: auto;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* ============================================
   Scroll Animations
   ============================================ */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}