/* ==============================================
   撑伞人 UMBRELLA CARE — 全局样式
   ============================================== */

/* ----- CSS Variables ----- */
:root {
  --blue:       #396496;
  --blue-light: #6297C9;
  --amber:      #E69340;
  --charcoal:   #2A2E35;
  --gray:       #555A63;
  --bg:         #FDFAF5;
  --white:      #FFFFFF;
  --glass-bg:   rgba(255,255,255,0.62);
  --glass-blur: blur(12px);
  --radius:     16px;
  --radius-lg:  20px;
  --ease:       cubic-bezier(0.25, 0, 0.25, 1);
  --nav-height: 56px;
}

/* ----- Reset ----- */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Source Han Sans SC", "Noto Sans SC", "PingFang SC",
               "Microsoft YaHei", -apple-system, sans-serif;
  color: var(--charcoal);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ==============================================
   Hero Block — 首屏
   ============================================== */

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ----- Video Background ----- */
.hero-video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.82);
}
/* 底部保留柔米白过渡，顶部不压暗——让视频全屏通透 */
.hero-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.08) 0%,
    transparent 35%,
    rgba(253,250,245,0.55) 80%,
    rgba(253,250,245,0.85) 100%
  );
}

/* ----- Particle Canvas ----- */
#particleCanvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* ----- Navigation — 全局毛玻璃底（所有页面清晰可读） ----- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: rgba(255,255,255,0.68);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(57,100,150,0.06);
  box-shadow: 0 1px 8px rgba(57,100,150,0.04);
  transition: background 400ms var(--ease),
              box-shadow 400ms var(--ease);
}
/* 滚动后强化 */
.nav.scrolled {
  background: rgba(255,255,255,0.90);
  box-shadow: 0 1px 20px rgba(57,100,150,0.08);
}

/* 默认深色文字 */
.nav .nav-item {
  color: var(--charcoal);
}
.nav .nav-item:hover { color: var(--blue); }
.nav .nav-item.active {
  color: var(--blue);
  font-weight: 600;
}
.nav .nav-item::after { background: var(--amber); }
.nav .nav-brand-text { color: var(--blue); }
.nav .nav-login { color: var(--charcoal); }
.nav .nav-login:hover { color: var(--amber); }
.nav .nav-register { background: var(--amber); color: #fff; }

/* 首页 Hero 页：悬浮透明 + 白色文字（通过 page-home 类触发） */
.page-home .nav {
  top: 18px; left: 24px; right: 24px;
  border-radius: 16px;
  background: transparent;
  backdrop-filter: none;
  border: none;
  box-shadow: none;
}
.page-home .nav .nav-item { color: rgba(255,255,255,0.88); }
.page-home .nav .nav-item:hover,
.page-home .nav .nav-item.active { color: #fff; }
.page-home .nav .nav-brand-text { color: #fff; }
.page-home .nav .nav-login { color: rgba(255,255,255,0.80); }
.page-home .nav .nav-login:hover { color: var(--amber); }

.page-home .nav.scrolled {
  top: 0; left: 0; right: 0; border-radius: 0;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(57,100,150,0.06);
}
.page-home .nav.scrolled .nav-item { color: var(--charcoal); }
.page-home .nav.scrolled .nav-item:hover,
.page-home .nav.scrolled .nav-item.active { color: var(--blue); }
.page-home .nav.scrolled .nav-brand-text { color: var(--blue); }
.page-home .nav.scrolled .nav-login { color: var(--charcoal); }

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.nav-logo {
  width: 48px; height: 48px;
  border-radius: 8px;
  object-fit: contain;
}
.nav-brand-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.nav-item {
  position: relative;
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--charcoal);
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: color 320ms var(--ease), transform 320ms var(--ease);
  cursor: pointer;
  white-space: nowrap;
}
.nav-item::after {
  content: '';
  position: absolute;
  left: 15%;
  bottom: 2px;
  width: 70%;
  height: 2px;
  border-radius: 4px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 320ms var(--ease);
}
.nav-item:hover {
  color: var(--blue);
  transform: scale(1.025);
}
.nav-item:hover::after { transform: scaleX(1); }
.nav-item.active {
  color: var(--blue);
}
.nav-item.active::after { transform: scaleX(1); }

/* 时光信箱 ✦ 标识 */
.nav-item.gem::before {
  content: '✦';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: var(--amber);
  opacity: 0;
  transition: opacity 320ms var(--ease);
}
.nav-item.gem:hover::before,
.nav-item.gem.active::before { opacity: 0.75; }

/* ----- Nav Auth Buttons ----- */
.nav-auth {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-login {
  font-size: 14px;
  color: var(--charcoal);
  text-decoration: none;
  padding: 6px 16px;
  border-radius: 8px;
  transition: color 320ms var(--ease);
}
.nav-login:hover { color: var(--amber); }
.nav-register {
  font-size: 14px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber), #F0A050);
  text-decoration: none;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 500;
  transition: box-shadow 320ms var(--ease), transform 320ms var(--ease);
}
.nav-register:hover {
  box-shadow: 0 4px 20px rgba(230,147,64,0.35);
  transform: translateY(-1px);
}

/* ----- Hamburger (mobile) ----- */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  z-index: 101;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--charcoal);
  border-radius: 2px;
  transition: all 320ms var(--ease);
}
.page-home .nav-hamburger span { background: rgba(255,255,255,0.85); }
.page-home .nav.scrolled .nav-hamburger span { background: var(--charcoal); }

/* ----- Mobile Nav Drawer ----- */
.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms var(--ease);
}
.nav-mobile.open {
  opacity: 1;
  pointer-events: auto;
}
.nav-mobile .nav-item { font-size: 18px; }

/* ----- Dropdown Sub-menus ----- */
.nav-dropdown {
  position: relative;
  list-style: none;
}
.nav-sub {
  position: absolute;
  top: calc(var(--nav-height) - 8px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 150px;
  padding: 8px 0;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(57,100,150,0.10);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(57,100,150,0.10);
  list-style: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms var(--ease),
              transform 320ms var(--ease);
  z-index: 200;
}
.nav-dropdown:hover .nav-sub {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-sub li a {
  display: block;
  padding: 8px 20px;
  font-size: 14px;
  color: #3A3F48;
  text-decoration: none;
  white-space: nowrap;
  transition: background 240ms var(--ease),
              color 240ms var(--ease);
}
.nav-sub li a:hover {
  background: rgba(230,147,64,0.12);
  color: var(--blue);
}

/* ----- Hero Content ----- */
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 720px;
  padding: 0 24px;
  animation: contentFadeIn 1.2s var(--ease) 0.3s both;
}
@keyframes contentFadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-title {
  font-size: clamp(36px, 6vw, 60px);
  font-weight: 700;
  color: var(--white);
  text-shadow:
    0 0 40px rgba(230,147,64,0.30),
    0 2px 8px rgba(0,0,0,0.25);
  letter-spacing: 4px;
  margin-bottom: 16px;
  animation: breathe 3.5s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { text-shadow: 0 0 40px rgba(230,147,64,0.30), 0 2px 8px rgba(0,0,0,0.25); }
  50%      { text-shadow: 0 0 60px rgba(230,147,64,0.50), 0 2px 12px rgba(0,0,0,0.20); }
}

.hero-subtitle {
  font-size: clamp(15px, 2vw, 18px);
  color: rgba(255,255,255,0.88);
  letter-spacing: 3px;
  margin-bottom: 28px;
  font-weight: 400;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 40px;
}
.hero-tag {
  padding: 8px 22px;
  border: 1px solid rgba(255,255,255,0.40);
  border-radius: 24px;
  font-size: 14px;
  color: rgba(255,255,255,0.90);
  backdrop-filter: blur(6px);
  background: rgba(255,255,255,0.08);
  transition: all 320ms var(--ease);
}
.hero-tag:hover {
  border-color: rgba(255,255,255,0.70);
  background: rgba(255,255,255,0.16);
  transform: translateY(-2px);
}

/* ----- CTA Buttons ----- */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  border-radius: 12px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 320ms var(--ease);
  position: relative;
  overflow: hidden;
}
.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, #E69340 0%, #F0A050 50%, #E69340 100%);
  background-size: 200% 100%;
  box-shadow: 0 6px 28px rgba(230,147,64,0.35);
}
.btn-primary:hover {
  background-position: 100% 0;
  box-shadow: 0 8px 36px rgba(230,147,64,0.50);
  transform: translateY(-2px);
}
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.6s;
}
.btn-primary:hover::before { left: 100%; }

.btn-ghost {
  color: var(--white);
  background: rgba(255,255,255,0.10);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.40);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.20);
  border-color: rgba(255,255,255,0.70);
  box-shadow: 0 0 24px rgba(255,255,255,0.12);
  transform: translateY(-2px);
}

/* ----- Scroll Indicator ----- */
.scroll-indicator {
  position: absolute;
  right: 24px;
  bottom: 50%;
  transform: translateY(50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.scroll-dot {
  width: 8px;
  height: 8px;
  border-radius: 8px;
  background: rgba(255,255,255,0.45);
  transition: all 320ms var(--ease);
  cursor: pointer;
}
.scroll-dot.active {
  background: var(--amber);
  box-shadow: 0 0 10px rgba(230,147,64,0.50);
  width: 10px; height: 10px;
}

/* ----- Scroll Down Hint ----- */
.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.60);
  font-size: 12px;
  letter-spacing: 2px;
  animation: hintFloat 2.5s ease-in-out infinite;
}
.scroll-hint-arrow {
  width: 20px; height: 20px;
  border-right: 1.5px solid rgba(255,255,255,0.55);
  border-bottom: 1.5px solid rgba(255,255,255,0.55);
  transform: rotate(45deg);
  animation: hintDrift 2.8s cubic-bezier(0.33, 1, 0.68, 1) infinite;
}
@keyframes hintFloat {
  0%, 100% { opacity: 0.45; }
  50%      { opacity: 1; }
}
@keyframes hintDrift {
  0%   { transform: rotate(45deg) translateY(0); opacity: 0.7; }
  60%  { transform: rotate(45deg) translateY(8px); opacity: 0.2; }
  100% { transform: rotate(45deg) translateY(0); opacity: 0.7; }
}

/* ==============================================
   Responsive — 移动端
   ============================================== */
@media (max-width: 768px) {
  .nav {
    top: 10px;
    left: 12px;
    right: 12px;
    padding: 0 16px;
    border-radius: 12px;
  }
  .nav.scrolled {
    top: 0; left: 0; right: 0;
    border-radius: 0;
  }
  .nav-links { display: none; }
  .nav-auth .nav-register { display: none; }
  .nav-hamburger { display: flex; }
  .nav-mobile { display: flex; }

  .hero-video-wrap video { display: none; }
  .hero-video-wrap {
    background: linear-gradient(
      170deg,
      #284B78 0%,
      #396496 30%,
      #6297C9 60%,
      #8AB4D6 100%
    );
  }
  .hero-video-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
      ellipse at 50% 40%,
      rgba(230,147,64,0.12) 0%,
      transparent 70%
    );
  }

  #particleCanvas { display: none; }

  .hero-tags { gap: 10px; }
  .hero-tag { padding: 6px 16px; font-size: 13px; }
  .btn { padding: 12px 28px; font-size: 15px; }
  .scroll-indicator { display: none; }
}

/* ==============================================
   Accessibility — 减弱动画
   ============================================== */
@media (prefers-reduced-motion: reduce) {
  .hero-title { animation: none; }
  .scroll-hint { animation: none; }
  .scroll-hint-arrow { animation: none; }
  #particleCanvas { display: none; }
}
