/* =========================================
   1. 字体定义
   ========================================= */
@font-face {
  font-family: "Outfit";
  src: url("./fonts/Outfit-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Alibaba PuHuiTi";
  src: url("./fonts/Alibaba-PuHuiTi-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Alibaba PuHuiTi";
  src: url("./fonts/Alibaba-PuHuiTi-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Alibaba PuHuiTi";
  src: url("./fonts/Alibaba-PuHuiTi-Heavy.woff2") format("woff2");
  font-weight: 900;
  font-display: swap;
}

/* =========================================
   2. 全局变量与全局设置
   ========================================= */
:root {
  --font-main: "Outfit", "Alibaba PuHuiTi", -apple-system, BlinkMacSystemFont,
    sans-serif;

  --anim-duration: 1.2s;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* 桃粉橙主题 */
  --accent-peach: #ff9f6f;
  --accent-gradient: linear-gradient(120deg, #ff9f6f 0%, #ffc3a0 100%);
  --accent-gradient-text: linear-gradient(120deg, #ff8c69 0%, #ffd3b5 100%);

  /* --- 深色模式 (默认) --- */
  --bg-color: #000000;
  --nav-bg: rgba(20, 20, 22, 0.6);
  --nav-border: rgba(255, 255, 255, 0.08);
  --card-bg: #1c1c1e;
  --card-border: transparent;
  --text-primary: #f5f5f7;
  --text-secondary: #86868b;
  --text-highlight-gradient: linear-gradient(180deg, #fff 0%, #b0b0b0 100%);
  --switcher-bg: #2c2c2e;
  --switcher-btn-active: #636366;
  --glow-opacity: 0.25;
  --credit-border: rgba(128, 128, 128, 0.2);
}

/* --- 浅色模式 --- */
[data-theme="light"] {
  --bg-color: #f5f5f7;
  --nav-bg: rgba(255, 255, 255, 0.65);
  --nav-border: rgba(0, 0, 0, 0.05);
  --card-bg: #ffffff;
  --card-border: rgba(0, 0, 0, 0.04);
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-highlight-gradient: linear-gradient(180deg, #1d1d1f 0%, #424245 100%);
  --switcher-bg: #e5e5ea;
  --switcher-btn-active: #ffffff;
  --glow-opacity: 0.4;
  --credit-border: rgba(0, 0, 0, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  width: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  overflow-x: hidden;
  background-color: var(--bg-color);
  font-family: var(--font-main);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s var(--ease-out-expo), color 0.4s;
  position: relative;
}

/* =========================================
   3. 导航栏
   ========================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border-bottom: 1px solid var(--nav-border);
  transition: background-color 0.4s, border-color 0.4s;
}

.nav-content {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.nav-logo {
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s;
}
.nav-logo:hover {
  opacity: 0.7;
}

.nav-links {
  display: none;
}
@media (min-width: 768px) {
  .nav-links {
    display: flex;
    gap: 32px;
  }
  .nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
  }
  .nav-links a:hover {
    color: var(--text-primary);
  }
}

.theme-switch-wrapper {
  background: var(--switcher-bg);
  border-radius: 99px;
  padding: 3px;
  display: flex;
  position: relative;
  height: 34px;
  align-items: center;
}

.theme-btn {
  background: none;
  border: none;
  width: 34px;
  height: 28px;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  position: relative;
  transition: color 0.3s;
}
.theme-btn.active {
  color: var(--text-primary);
}

.switch-bg {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 34px;
  height: 28px;
  background: var(--switcher-btn-active);
  border-radius: 99px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s var(--ease-bounce);
  z-index: 1;
}

/* =========================================
   4. 内容区域
   ========================================= */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(
    circle,
    var(--accent-peach) 0%,
    rgba(0, 0, 0, 0) 70%
  );
  opacity: var(--glow-opacity);
  filter: blur(80px);
  transition: opacity 0.4s;
  max-width: 100vw;
}
.top-glow {
  width: 60vw;
  height: 60vw;
  top: -5%;
  left: -10%;
}
.bottom-glow {
  width: 80vw;
  height: 80vw;
  bottom: -10%;
  right: -20%;
  background: radial-gradient(circle, #ffc3a0 0%, rgba(0, 0, 0, 0) 60%);
}

/* --- 重点修复区域：Hero Section --- */
.hero-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center; /* 垂直居中 */
  position: relative;

  /* 1. 限制最大宽度，与 Navbar 保持一致 */
  max-width: 1200px;

  /* 2. 关键：上下 0，左右 auto，实现水平居中 */
  margin: 0 auto;

  /* 3. 内边距与 Navbar (24px) 保持一致，确保 Logo 和标题左对齐 */
  padding: 0 24px;
}

.hero-title {
  font-size: clamp(36px, 9vw, 110px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 30px;
}

.hero-title span {
  margin: 5px 0;
  display: block;
  opacity: 0;
  transform: translateY(40px);
  color: var(--text-primary);
  animation: slideUpFade var(--anim-duration) var(--ease-out-expo) forwards;
}

.floating-anim {
  animation: slideUpFade var(--anim-duration) var(--ease-out-expo) forwards,
    floatBreath 4s ease-in-out infinite 1.5s !important;
  background: var(--accent-gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block !important;
}

@keyframes floatBreath {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.caption {
  margin-top: 60px;
  margin-left: 5px;
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(20px);
  animation: slideUpFade var(--anim-duration) var(--ease-out-expo) forwards;
}

.hero-title span:nth-child(1) {
  animation-delay: 0.2s;
}
.hero-title span:nth-child(2) {
  animation-delay: 0.4s;
}
.hero-title span:nth-child(3) {
  animation-delay: 0.6s;
}
.caption {
  animation-delay: 1s;
}

@keyframes slideUpFade {
  0% {
    opacity: 0;
    transform: translateY(40px);
    filter: blur(15px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.content-wrapper {
  max-width: 1120px;
  margin: 0 auto;
  padding: 100px 20px;
}

.intro-text {
  font-size: clamp(28px, 5vw, 64px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 80px;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
  transition: color 0.4s;
}
.intro-text .text-highlight {
  color: var(--text-primary);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 120px;
}

.bento-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 40px;
  padding: 32px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: transform 0.5s var(--ease-bounce), background-color 0.4s,
    box-shadow 0.4s;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.03);
}
.bento-card:hover {
  transform: scale(1.03);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.08);
}

.bento-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: "Outfit", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.bento-card p {
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
  background: var(--text-highlight-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: "Outfit", sans-serif;
}

.peach-text {
  color: var(--accent-peach) !important;
}
.wide {
  grid-column: 1 / -1;
  min-height: 400px;
}
.big-statement {
  font-size: clamp(40px, 6vw, 80px) !important;
  letter-spacing: -0.02em;
}

.card-glow {
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: var(--accent-peach);
  filter: blur(100px);
  opacity: 0.15;
  border-radius: 50%;
  transition: opacity 0.4s;
}
[data-theme="light"] .card-glow {
  opacity: 0.3;
}

.specs-list {
  border-top: 1px solid var(--credit-border);
  padding-top: 60px;
}
.spec-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid var(--credit-border);
  font-size: 17px;
  transition: border-color 0.4s;
}
.spec-label {
  color: var(--text-secondary);
}
.spec-value {
  font-weight: 600;
  font-family: "Outfit", sans-serif;
  text-align: right;
}

.credits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  padding-bottom: 40px;
}
.credit-item {
  display: flex;
  flex-direction: column;
}
.credit-item .role {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}
.credit-item .name {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
  font-family: "Outfit", sans-serif;
}

/* =========================================
   5. Footer & Icons (简单模式)
   ========================================= */
footer {
  text-align: center;
  padding: 60px 0 40px;
  border-top: 1px solid var(--credit-border);
  margin-top: 50px;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.social-icon {
  display: inline-block;
  cursor: pointer;
  transition: transform 0.3s var(--ease-bounce);
}

.social-icon img {
  display: block;
  width: 24px;
  height: 24px;
  transition: transform 0.3s, filter 0.3s;
}

.social-icon:hover img {
  filter: brightness(0.8); /* 悬停加深 */
}

.social-icon:hover {
  transform: scale(1.15) translateY(-3px);
}

footer p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.scroll-reveal {
  opacity: 0;
  transform: translateY(60px) scale(0.95);
  filter: blur(10px);
  transition: all 1.2s var(--ease-out-expo);
}
.scroll-reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}
