/* styles.css */

/* ========== 全局重置 ========== */
* {
  margin: 0; 
  padding: 0; 
  box-sizing: border-box;
}
html, body {
  width: 100%; 
  min-height: 100%;
  font-family: "Helvetica Neue", Arial, sans-serif;
  background: #fff;
  color: #333;
  scroll-behavior: smooth; /* 点击同页锚点时平滑滚动 */
}

/* ========== 顶部导航 ========== */
header {
  position: fixed;
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 60px;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 9999;
  display: flex; 
  align-items: center; 
  justify-content: space-between;
  padding: 0 2rem;
}
.nav-left {
  font-weight: bold; 
  font-size: 1.2rem;
  letter-spacing: 1px;
}
nav ul {
  list-style: none; 
  display: flex; 
  gap: 1.5rem;
}
nav ul li a {
  text-decoration: none; 
  color: #333; 
  transition: color 0.3s;
}
nav ul li a:hover {
  color: #666;
}

/* ========== 动画区 + spacer ========== */
.animated-section {
  margin-top: 60px; /* 让出导航栏位置 */
  background: #fff;
}
.animation-container {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  background: #fff;
  overflow: hidden;
}

/* 圆形容器 (动画主角) */
.circle {
  position: absolute; 
  left: 50%; 
  top: 50%;
  transform: translate(-50%, -50%);
  width: 200px; 
  height: 200px;
  border-radius: 50%;
  background: #000; /* 初始黑色 */
  display: flex; 
  justify-content: center; 
  align-items: center;
  color: #fff; 
  font-size: 0;
  overflow: hidden; /* 确保图片不溢出圆外 */
  transition: transform 0.3s ease, background-color 0.3s ease; /* 添加过渡效果 */
}
.circle-text {
  position: relative;
  transition: font-size 0.3s, opacity 0.3s; 
}

/* LOGO 图片 */
#circleLogo {
  position: absolute;
  top: 0; 
  left: 0;
  width: 100%; 
  height: 100%;
  border-radius: 50%;
  object-fit: cover;    
  opacity: 0;          
  transition: opacity 0.5s ease; 
}

/* 单词散射容器 */
.words-container {
  position: absolute;
  left: 50%; 
  top: 50%;
  transform: translate(-50%, -50%);
  width: 400px; 
  height: 400px;
  pointer-events: none;
}
.word {
  position: absolute; 
  left: 50%; 
  top: 50%;
  font-size: 18px; 
  font-weight: 500;
  color: #000;
  opacity: 0; 
  transform: translate(-50%, -50%);
  transition: transform 0.3s ease, opacity 0.3s ease; /* 添加过渡效果 */
}

/*
  pinnedRange=4000: 需要滚动4000px 
  才能从progress=0到1，给足动画最后LOGO淡入的时间
*/
.scroll-space {
  background: #fff;
  height: 4000px;
}

/* ========== 介绍区块，模糊->清晰 ========== */
#intro {
  padding: 4rem 2rem;
  background: #fff;
  opacity: 0;
  filter: blur(10px);
  transition: opacity 1s ease, filter 1s ease;
}
#intro.appear {
  opacity: 1;
  filter: blur(0);
}
#intro h2 {
  margin-bottom: 1rem;
  font-size: 1.6rem;
}
#intro p {
  max-width: 800px;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
    gap: 1rem;
  }
  .circle {
    width: 150px;
    height: 150px;
  }
  .words-container {
    width: 300px;
    height: 300px;
  }
}
