/* 高级首页 Hero 区域样式 */

.home-hero {
  min-height: 75vh; /* 从 100vh 改为 75vh，让内容更紧凑 */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 3rem 2rem; /* 从 5rem 减少到 3rem */
  color: var(--color-text);
  background: var(--color-bg);
  overflow: hidden;
}

/* 白天模式：Notion 风格的简洁背景 */
.home-hero__bg {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 15% 20%, rgba(59, 130, 246, 0.08), transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(16, 185, 129, 0.06), transparent 55%),
    var(--color-bg);
  z-index: var(--z-content);
}

/* 暗色模式：保持动态背景效果 */
body[theme="dark"] .home-hero__bg,
html[data-theme="dark"] .home-hero__bg,
.dark .home-hero__bg {
  background: 
    radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.15), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.12), transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.08), transparent 60%),
    var(--color-hero-bg);
  animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

.home-hero__glow {
  position: absolute;
  inset: 0;
  background: var(--color-hero-overlay);
  filter: blur(100px);
  z-index: var(--z-content);
  opacity: 0;
}

/* 暗色模式显示 glow 效果 */
body[theme="dark"] .home-hero__glow,
html[data-theme="dark"] .home-hero__glow,
.dark .home-hero__glow {
  opacity: 0.6;
}

.home-hero__content {
  position: relative;
  z-index: var(--z-overlay);
  max-width: 800px;
  width: min(100%, 760px);
  margin: 0 auto;
  text-align: center;
  padding: 0 1.25rem;
  animation: fadeInUp 1s ease-out;
}

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

.home-hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.5em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

/* 暗色模式：使用半透明背景 */
body[theme="dark"] .home-hero__eyebrow,
html[data-theme="dark"] .home-hero__eyebrow,
.dark .home-hero__eyebrow {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.home-hero__title {
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--color-text);
  white-space: nowrap;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 0.35em;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  text-rendering: optimizeLegibility;
}

/* 暗色模式：使用渐变文字 */
body[theme="dark"] .home-hero__title,
html[data-theme="dark"] .home-hero__title,
.dark .home-hero__title {
  color: rgba(248, 250, 252, 0.95);
  text-shadow: 0 10px 35px rgba(8, 145, 178, 0.35);
}

.home-hero__title-en {
  display: inline-block;
  font-weight: 900;
  letter-spacing: 0.2em;
  margin-left: 0;
  text-transform: uppercase;
  color: inherit;
}

body[theme="dark"] .home-hero__title-en,
html[data-theme="dark"] .home-hero__title-en,
.dark .home-hero__title-en {
  color: rgba(248, 250, 252, 0.95);
  text-shadow: 0 0 18px rgba(248, 250, 252, 0.35);
}

.home-hero__subtitle {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  line-height: 1.8;
  color: var(--color-text-muted);
  margin-bottom: 2rem; /* 从 3rem 减少到 2rem */
  font-weight: 400;
}

/* 暗色模式：使用半透明白色 */
body[theme="dark"] .home-hero__subtitle,
html[data-theme="dark"] .home-hero__subtitle,
.dark .home-hero__subtitle {
  color: rgba(255, 255, 255, 0.8);
}

.home-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem; /* 从 3rem 减少到 2rem */
}

.home-hero__chips .chip {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.home-hero__chips .chip:hover {
  background: var(--color-surface-muted);
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* 暗色模式：使用半透明背景 */
body[theme="dark"] .home-hero__chips .chip,
html[data-theme="dark"] .home-hero__chips .chip,
.dark .home-hero__chips .chip {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
}

body[theme="dark"] .home-hero__chips .chip:hover,
html[data-theme="dark"] .home-hero__chips .chip:hover,
.dark .home-hero__chips .chip:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.home-hero__cta {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
}

.home-hero__cta .btn.primary {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  box-shadow: 0 20px 40px rgba(59, 130, 246, 0.3);
}

.home-hero__cta .btn.primary:hover {
  box-shadow: 0 25px 50px rgba(59, 130, 246, 0.4);
  transform: translateY(-3px);
}

.home-hero__cta .btn.ghost {
  background: var(--color-surface);
  border-color: var(--color-border);
  color: var(--color-text);
  backdrop-filter: blur(10px);
}

.home-hero__cta .btn.ghost:hover {
  background: var(--color-surface-muted);
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-3px);
}

/* 暗色模式：使用半透明背景 */
body[theme="dark"] .home-hero__cta .btn.ghost,
html[data-theme="dark"] .home-hero__cta .btn.ghost,
.dark .home-hero__cta .btn.ghost {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

body[theme="dark"] .home-hero__cta .btn.ghost:hover,
html[data-theme="dark"] .home-hero__cta .btn.ghost:hover,
.dark .home-hero__cta .btn.ghost:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

/* 主页容器 */
.home-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 3.5rem; /* keep hero content below the fixed header */
}

/* 高级面板设计 */
.home-panels {
  max-width: 1200px;
  margin: -8rem auto 4rem; /* 从 -5rem 改为 -8rem，向上移动更多；从 6rem 改为 4rem */
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  position: relative;
  z-index: var(--z-sticky);
}

.panel {
  background: var(--color-surface);
  padding: 2rem; /* 从 2.5rem 减少到 2rem */
  border-radius: 24px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-xl);
  color: var(--color-text);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 0.75rem; /* 从 1rem 减少到 0.75rem */
}

.panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--color-accent-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.panel:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-2xl), var(--shadow-colored);
  border-color: var(--color-accent);
}

.panel:hover::before {
  opacity: 1;
}

.panel__icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 0.5rem;
  filter: grayscale(0.3);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
}

.panel__icon .icon {
  width: 1em;
  height: 1em;
  fill: currentColor;
}

.panel:hover .panel__icon {
  filter: grayscale(0);
  transform: scale(1.1) rotate(5deg);
  color: var(--color-accent);
}

.panel h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.panel p {
  color: var(--color-text-muted);
  line-height: 1.8;
  font-size: 1rem;
  margin: 0;
  flex: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .home-container {
    padding-top: 4rem;
  }

  .home-hero {
    padding: 3rem 1.5rem;
    min-height: auto; /* 改为 auto，让内容决定高度 */
    padding-bottom: 4rem; /* 增加底部 padding，确保按钮不被遮住 */
  }

  .home-hero__title {
    font-size: 2.5rem;
    white-space: normal;
  }

  .home-hero__subtitle {
    font-size: 1.125rem;
    margin-bottom: 2rem;
  }

  .home-hero__chips {
    margin-bottom: 2rem;
  }

  .home-hero__cta {
    margin-bottom: 2rem; /* 增加底部间距 */
    z-index: var(--z-dropdown); /* 确保按钮在最上层 */
    position: relative;
  }

  .home-panels {
    margin-top: 2rem; /* 改为正值，避免遮住按钮 */
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1.5rem;
    position: relative;
    z-index: var(--z-content); /* 确保在按钮下方 */
  }

  .panel {
    padding: 2rem;
  }

  .panel__icon {
    font-size: 2.5rem;
  }
}

@media (max-width: 1023px) {
  .home-hero__title {
    white-space: normal;
    flex-wrap: wrap;
    font-size: clamp(2rem, 7vw, 3rem);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .home-hero__content {
    padding: 0 1rem;
  }

  .home-hero__eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    padding: 0.4rem 1rem;
  }

  .home-hero__title {
    font-size: clamp(1.9rem, 9vw, 2.25rem);
    white-space: normal;
    flex-wrap: wrap;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .home-hero__subtitle {
    font-size: 1rem;
    line-height: 1.7;
  }

  .home-hero__chips {
    gap: 0.75rem;
  }

  .home-hero__chips .chip {
    padding: 0.5rem 0.85rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .home-container {
    padding-top: 4.25rem;
  }

  .home-hero {
    padding: 2.5rem 1rem;
    padding-bottom: 3.5rem; /* 确保有足够空间 */
  }

  .home-hero__title {
    font-size: clamp(1.6rem, 8vw, 2rem);
    white-space: normal;
    flex-wrap: wrap;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .home-hero__cta {
    flex-direction: column;
    width: 100%;
    margin-bottom: 2rem;
  }

  .home-hero__cta .btn {
    width: 100%;
  }

  .home-panels {
    margin-top: 1.5rem; /* 改为正值 */
    padding: 0 1rem;
  }

  .panel {
    padding: 1.75rem;
    border-radius: 20px;
  }
}

@media (max-width: 360px) {
  .home-container {
    padding-top: 4.5rem;
  }

  .home-hero {
    padding: 2rem 0.75rem;
    padding-bottom: 3rem;
  }

  .home-hero__eyebrow {
    font-size: 0.6rem;
    letter-spacing: 0.2em;
  }

  .home-hero__title {
    font-size: clamp(1.4rem, 7vw, 1.6rem);
    white-space: normal;
    flex-wrap: wrap;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .home-hero__subtitle {
    font-size: 0.95rem;
  }

  .home-hero__cta {
    gap: 0.75rem;
  }

  .home-panels {
    margin-top: 0.5rem;
    padding: 0 0.75rem;
  }
}

@media (max-height: 880px) {
  .home-hero {
    padding-bottom: 5.5rem;
  }

  .home-hero__cta {
    margin-bottom: 3rem;
  }

  .home-panels {
    margin-top: 1.5rem;
  }
}

/* 加载动画 */
.panel {
  animation: fadeInUp 0.8s ease-out backwards;
}

.panel:nth-child(1) { animation-delay: 0.2s; }
.panel:nth-child(2) { animation-delay: 0.4s; }
.panel:nth-child(3) { animation-delay: 0.6s; }
