/* MakerGen Homepage - 青少年物联网创新平台 */

/* === Fonts === */
@import url('https://fonts.googleapis.com/css2?family=ZCOOL+QingKe+HuangYou&display=swap');

/* === 1. Home Page Variables === */
.home-page {
  --home-primary: #1e40af;
  --home-accent: #06b6d4;
  --home-green: #10b981;
  --home-orange: #f59e0b;
  --home-bg: #f8fafc;
  --home-section-bg: #ffffff;
  --home-text: #1e293b;
  --home-text-secondary: #64748b;
  --home-gradient-blue: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  --home-gradient-cyan: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
  --home-gradient-green: linear-gradient(135deg, #059669 0%, #10b981 100%);
  --home-gradient-orange: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  font-family: 'Noto Sans SC', sans-serif;
  color: var(--home-text);
  background: var(--home-bg);
  overflow-x: hidden;
}

.home-page * {
  box-sizing: border-box;
}

/* Display font for headlines */
.display-font {
  font-family: 'ZCOOL QingKe HuangYou', 'Noto Sans SC', sans-serif;
}

/* === 2. Navigation === */
.home-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.home-nav.scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.home-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.home-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'ZCOOL QingKe HuangYou', 'Noto Sans SC', sans-serif;
  font-size: 1.5rem;
  color: var(--home-primary);
  text-decoration: none;
}

.home-logo-icon {
  width: 2rem;
  height: 2rem;
  color: var(--home-primary);
}

.home-nav-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.home-nav-link {
  padding: 0.5rem 1rem;
  color: var(--home-text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: color 0.2s, background 0.2s;
}

.home-nav-link:hover {
  color: var(--home-primary);
  background: rgba(59, 130, 246, 0.06);
  text-decoration: none;
}

/* === 3. Hero Section === */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(160deg, #f0f4ff 0%, #f8fafc 40%, #ecfeff 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  pointer-events: none;
}

.hero-glow-1 {
  width: 500px;
  height: 500px;
  background: rgba(59, 130, 246, 0.2);
  top: -10%;
  right: -5%;
  animation: heroGlow 12s ease-in-out infinite alternate;
}

.hero-glow-2 {
  width: 400px;
  height: 400px;
  background: rgba(6, 182, 212, 0.15);
  bottom: -8%;
  left: -5%;
  animation: heroGlow 15s ease-in-out infinite alternate-reverse;
}

.hero-glow-3 {
  width: 300px;
  height: 300px;
  background: rgba(16, 185, 129, 0.12);
  top: 40%;
  left: 60%;
  animation: heroGlow 10s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -20px) scale(1.1); }
}

.hero-shape {
  position: absolute;
  border: 2px solid rgba(59, 130, 246, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.hero-shape-1 {
  width: 60px;
  height: 60px;
  top: 15%;
  right: 12%;
  animation: heroFloat 20s ease-in-out infinite;
}

.hero-shape-2 {
  width: 40px;
  height: 40px;
  top: 25%;
  left: 8%;
  border-radius: 8px;
  border-color: rgba(6, 182, 212, 0.1);
  animation: heroFloat 18s ease-in-out infinite reverse;
  transform: rotate(45deg);
}

.hero-shape-3 {
  width: 25px;
  height: 25px;
  bottom: 20%;
  right: 25%;
  border-color: rgba(16, 185, 129, 0.1);
  animation: heroFloat 22s ease-in-out infinite 2s;
}

.hero-shape-4 {
  width: 50px;
  height: 50px;
  bottom: 30%;
  left: 15%;
  border-radius: 12px;
  border-color: rgba(245, 158, 11, 0.08);
  animation: heroFloat 16s ease-in-out infinite 1s;
  transform: rotate(15deg);
}

.hero-shape-5 {
  width: 16px;
  height: 16px;
  top: 60%;
  right: 8%;
  background: rgba(59, 130, 246, 0.08);
  border: none;
  animation: heroFloat 14s ease-in-out infinite 3s;
}

.hero-shape-6 {
  width: 20px;
  height: 20px;
  top: 10%;
  left: 20%;
  border-radius: 4px;
  border-color: rgba(6, 182, 212, 0.08);
  animation: heroFloat 24s ease-in-out infinite 2s;
  transform: rotate(30deg);
}

@keyframes heroFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(15px, -20px) rotate(5deg); }
  50% { transform: translate(-10px, -10px) rotate(-3deg); }
  75% { transform: translate(20px, 10px) rotate(8deg); }
}

.hero-dot {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--home-primary);
  opacity: 0.15;
  animation: heroPulse 3s ease-in-out infinite;
}

.hero-dot:nth-child(7) { top: 30%; right: 30%; animation-delay: 0s; }
.hero-dot:nth-child(8) { top: 50%; left: 12%; animation-delay: 0.8s; }
.hero-dot:nth-child(9) { bottom: 15%; right: 40%; animation-delay: 1.6s; }
.hero-dot:nth-child(10) { top: 12%; left: 40%; animation-delay: 2.4s; }
.hero-dot:nth-child(11) { bottom: 35%; right: 15%; animation-delay: 0.4s; }

@keyframes heroPulse {
  0%, 100% { opacity: 0.15; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(2); }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 6rem 1.5rem 4rem;
  max-width: 820px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 1rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 100px;
  font-size: 0.8125rem;
  color: var(--home-primary);
  font-weight: 500;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s ease-out both;
}

.hero-badge-icon {
  width: 1em;
  height: 1em;
}

.hero-title {
  font-family: 'ZCOOL QingKe HuangYou', 'Noto Sans SC', sans-serif;
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  line-height: 1.15;
  color: var(--home-primary);
  margin-bottom: 1.25rem;
  animation: fadeInUp 0.8s ease-out 0.15s both;
}

.hero-title-em {
  background: var(--home-gradient-blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--home-text-secondary);
  line-height: 1.7;
  margin-bottom: 2.25rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease-out 0.45s both;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-size: 1.0625rem;
  font-weight: 600;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.hero-btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.hero-btn:active {
  transform: scale(0.98);
}

.hero-btn-primary {
  background: var(--home-gradient-blue);
  color: white;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.hero-btn-primary:hover {
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
}

.hero-btn-outline {
  background: transparent;
  color: var(--home-primary);
  border: 2px solid rgba(59, 130, 246, 0.25);
}

.hero-btn-outline:hover {
  border-color: var(--home-primary);
  background: rgba(59, 130, 246, 0.05);
}

.hero-btn-icon {
  width: 1.25em;
  height: 1.25em;
}

/* === 4. Stats Section === */
.stats {
  padding: 2.5rem 1.5rem;
  background: white;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.stats-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.stat-item {
  text-align: center;
  padding: 0.5rem;
}

.stat-number {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--home-primary);
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--home-text-secondary);
}

.stat-icon {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--home-accent);
}

/* === 5. Features Section === */
.features {
  padding: 5rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-label {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--home-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: var(--home-text);
  margin-bottom: 0.75rem;
}

.section-desc {
  font-size: 1.0625rem;
  color: var(--home-text-secondary);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.feature-card:nth-child(1)::before { background: var(--home-gradient-blue); }
.feature-card:nth-child(2)::before { background: var(--home-gradient-cyan); }
.feature-card:nth-child(3)::before { background: var(--home-gradient-green); }
.feature-card:nth-child(4)::before { background: var(--home-gradient-orange); }

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}

.feature-icon-wrap {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.feature-card:nth-child(1) .feature-icon-wrap { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.feature-card:nth-child(2) .feature-icon-wrap { background: rgba(6, 182, 212, 0.1); color: #06b6d4; }
.feature-card:nth-child(3) .feature-icon-wrap { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.feature-card:nth-child(4) .feature-icon-wrap { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }

.feature-icon {
  width: 1.5rem;
  height: 1.5rem;
}

.feature-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--home-text);
  margin-bottom: 0.5rem;
}

.feature-desc {
  font-size: 0.9375rem;
  color: var(--home-text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.feature-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.feature-tag {
  padding: 0.1875rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.04);
  color: var(--home-text-secondary);
}

/* === 6. How It Works === */
.how-it-works {
  padding: 5rem 1.5rem;
  background: white;
}

.how-inner {
  max-width: 1000px;
  margin: 0 auto;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  position: relative;
  margin-top: 1rem;
}

.steps::before {
  content: '';
  position: absolute;
  top: 2.5rem;
  left: calc(16.67% + 2rem);
  right: calc(16.67% + 2rem);
  height: 2px;
  background: linear-gradient(90deg, #3b82f6 0%, #06b6d4 50%, #10b981 100%);
  z-index: 0;
}

.step {
  text-align: center;
  position: relative;
  z-index: 1;
}

.step-number {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-family: 'ZCOOL QingKe HuangYou', 'Noto Sans SC', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: white;
  position: relative;
}

.step:nth-child(1) .step-number { background: var(--home-gradient-blue); }
.step:nth-child(2) .step-number { background: var(--home-gradient-cyan); }
.step:nth-child(3) .step-number { background: var(--home-gradient-green); }

.step-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--home-text);
  margin-bottom: 0.5rem;
}

.step-desc {
  font-size: 0.9375rem;
  color: var(--home-text-secondary);
  line-height: 1.7;
  max-width: 280px;
  margin: 0 auto;
}

/* === 7. Platforms Section === */
.platforms {
  padding: 5rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.platforms-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.platform-card {
  background: white;
  border-radius: 1rem;
  padding: 1.75rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.platform-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
}

.platform-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  color: var(--home-primary);
}

.platform-name {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--home-text);
  margin-bottom: 0.25rem;
}

.platform-desc {
  font-size: 0.8125rem;
  color: var(--home-text-secondary);
}

/* === 8. CTA Section === */
.cta {
  padding: 5rem 1.5rem;
  background: var(--home-gradient-blue);
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.08) 0%, transparent 50%);
}

.cta-inner {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.cta-title {
  font-family: 'ZCOOL QingKe HuangYou', 'Noto Sans SC', sans-serif;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  color: white;
  margin-bottom: 1rem;
}

.cta-desc {
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--home-primary);
  background: white;
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  color: var(--home-primary);
}

.cta-btn:active {
  transform: scale(0.98);
}

/* === 9. Footer === */
.home-footer {
  padding: 3rem 1.5rem 2rem;
  background: #0f172a;
  color: rgba(255, 255, 255, 0.6);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'ZCOOL QingKe HuangYou', 'Noto Sans SC', sans-serif;
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
}

.footer-brand-icon {
  width: 1.5rem;
  height: 1.5rem;
}

.footer-text {
  font-size: 0.875rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-link {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-link:hover {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

/* === 10. Animations === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.animate-on-scroll-delay-1 { transition-delay: 0.1s; }
.animate-on-scroll-delay-2 { transition-delay: 0.2s; }
.animate-on-scroll-delay-3 { transition-delay: 0.3s; }
.animate-on-scroll-delay-4 { transition-delay: 0.4s; }

/* === 11. Responsive === */
@media (max-width: 900px) {
  .stats-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

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

  .steps {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .steps::before {
    display: none;
  }

  .step-desc {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .home-nav-inner {
    padding: 0.625rem 1rem;
  }

  .home-nav-links .home-nav-link:not(.home-nav-btn) {
    display: none;
  }

  .hero-content {
    padding: 5rem 1rem 3rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

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

  .features {
    padding: 3rem 1rem;
  }

  .how-it-works {
    padding: 3rem 1rem;
  }

  .platforms {
    padding: 3rem 1rem;
  }

  .platforms-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .platform-card {
    padding: 1.25rem;
  }

  .cta {
    padding: 3rem 1rem;
  }

  .home-footer {
    padding: 2rem 1rem 1.5rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .stat-item {
    padding: 0.25rem;
  }

  .stats {
    padding: 1.5rem 1rem;
  }
}
