/* ========================================
   风雪少年 · 独立研学营 - 设计令牌 & 全局样式
   设计调性：极地冷白 / 风雪浅蓝 / 深岩灰 / 冰霜蓝点缀
   ======================================== */

/* ---------- 1. 设计令牌 (Design Tokens) ---------- */
:root {
  /* 色彩系统 - 核心三原色 */
  --color-arctic-white: #F6F8FA;     /* 极地冷白 - 主背景 */
  --color-snow-blue: #D8E4F0;        /* 风雪浅蓝 - 次级背景/分割线 */
  --color-deep-slate: #2C3641;       /* 深岩灰 - 主文字/深色背景 */

  /* 点缀色 - 冰霜蓝（克制使用） */
  --color-frost: #7BA3C4;            /* 冰霜蓝 - 次要点缀 */
  --color-frost-deep: #4A7A9B;       /* 深冰霜蓝 - CTA/重点 */
  --color-frost-light: #A8C4D9;      /* 浅冰霜蓝 - hover/辅助 */

  /* 功能色 */
  --color-text-primary: #2C3641;     /* 主文字 */
  --color-text-secondary: #5A6A7A;   /* 次文字 */
  --color-text-muted: #8A99A8;       /* 弱化文字 */
  --color-text-inverse: #F6F8FA;     /* 反白文字 */
  --color-bg: #F6F8FA;               /* 页面背景 */
  --color-bg-soft: #EEF2F6;          /* 柔和分区背景 */
  --color-bg-panel: #FFFFFF;         /* 卡片/面板背景 */
  --color-border: #E4EAF0;           /* 常规边框 */
  --color-border-strong: #C5D1DC;    /* 加强边框 */

  /* 阴影系统 - 克制、柔和 */
  --shadow-sm: 0 1px 2px rgba(44, 54, 65, 0.04);
  --shadow-md: 0 4px 16px rgba(44, 54, 65, 0.06);
  --shadow-lg: 0 8px 32px rgba(44, 54, 65, 0.08);
  --shadow-hover: 0 12px 40px rgba(44, 54, 65, 0.10);

  /* 圆角系统 */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* 字重 */
  --font-light: 300;
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* 过渡 */
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-base: 0.3s var(--ease-out);
  --transition-slow: 0.5s var(--ease-out);
}

/* ---------- 2. 字体系统 ---------- */
/* 中文：思源黑体/Noto Sans SC  英文：Inter 无衬线 */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans SC", "Source Han Sans CN", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue",
    Helvetica, Arial, "Inter", sans-serif;
  font-weight: var(--font-regular);
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 标题字体 - 英文用 Inter */
.font-display {
  font-family: "Inter", -apple-system, BlinkMacSystemFont,
    "Noto Sans SC", "Source Han Sans CN", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  letter-spacing: -0.02em;
}

/* 中文字体强调 */
.font-cn {
  font-family: "Noto Sans SC", "Source Han Sans CN",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

/* ---------- 3. 全局重置 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-base);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ---------- 4. Tailwind CDN 模式 ----------
   Tailwind 通过 CDN 加载，配置在 assets/js/tailwind.config.js
   这里不使用 @tailwind 指令（CDN 模式下无效）
   ---------- */

/* ---------- 5. 自定义组件样式 ---------- */

/* --- 导航栏 --- */
.nav-floating {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all var(--transition-base);
  background-color: rgba(246, 248, 250, 0);
  backdrop-filter: blur(0px);
  border-bottom: 1px solid transparent;
}

.nav-floating.scrolled {
  background-color: rgba(246, 248, 250, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.nav-link {
  position: relative;
  font-size: 0.95rem;
  font-weight: var(--font-medium);
  color: var(--color-deep-slate);
  padding: 0.5rem 0;
  transition: color var(--transition-base);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--color-frost-deep);
  transition: all var(--transition-base);
  transform: translateX(-50%);
}

.nav-link:hover {
  color: var(--color-frost-deep);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: var(--color-frost-deep);
}

.nav-link.active::after {
  width: 100%;
}

/* --- CTA 按钮 --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-size: 0.95rem;
  font-weight: var(--font-medium);
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}

.btn-primary {
  background-color: var(--color-frost-deep);
  color: var(--color-text-inverse);
  border: 1px solid var(--color-frost-deep);
}

.btn-primary:hover {
  background-color: var(--color-deep-slate);
  border-color: var(--color-deep-slate);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-deep-slate);
  border: 1px solid var(--color-border-strong);
}

.btn-secondary:hover {
  border-color: var(--color-frost-deep);
  color: var(--color-frost-deep);
  transform: translateY(-2px);
}

.btn-outline-light {
  background-color: transparent;
  color: var(--color-text-inverse);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.btn-outline-light:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.8);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1.125rem;
  font-size: 0.85rem;
}

/* --- 卡片 --- */
.card {
  background-color: var(--color-bg-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--color-border-strong);
}

/* --- 分区标题 --- */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: var(--font-medium);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-frost-deep);
  margin-bottom: 1rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--color-frost-light);
  border-radius: 999px;
  background-color: rgba(123, 163, 196, 0.08);
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: var(--font-semibold);
  color: var(--color-deep-slate);
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* --- Hero 全屏区 --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(44, 54, 65, 0.55) 0%,
    rgba(74, 122, 155, 0.35) 50%,
    rgba(44, 54, 65, 0.65) 100%
  );
}

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

.hero-title {
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: var(--font-bold);
  color: var(--color-text-inverse);
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  font-weight: var(--font-light);
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.7;
  letter-spacing: 0.1em;
  margin-bottom: 2.5rem;
}

/* Hero 向下滚动提示 */
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-10px); }
  60% { transform: translateX(-50%) translateY(-5px); }
}

/* ---------- 6. 细节样式 ---------- */

/* 数字计数（理念/数据区） */
.stat-number {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: var(--font-bold);
  color: var(--color-frost-deep);
  letter-spacing: -0.02em;
  line-height: 1;
}

/* 标签/徽章 */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: var(--font-medium);
  border-radius: 999px;
  letter-spacing: 0.05em;
}

.badge-frost {
  background-color: rgba(123, 163, 196, 0.12);
  color: var(--color-frost-deep);
  border: 1px solid rgba(123, 163, 196, 0.25);
}

.badge-deep {
  background-color: rgba(44, 54, 65, 0.08);
  color: var(--color-deep-slate);
  border: 1px solid var(--color-border);
}

/* 分割线装饰 */
.divider-line {
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-frost-light), var(--color-frost-deep));
  margin: 0 auto 1rem;
}

/* 图片遮罩层 */
.image-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(44, 54, 65, 0.7) 0%,
    rgba(44, 54, 65, 0.2) 40%,
    transparent 100%
  );
}

/* 图片容器通用 */
.img-wrapper {
  position: relative;
  overflow: hidden;
}

.img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.img-wrapper:hover img {
  transform: scale(1.05);
}

/* ---------- 7. 动画 & 渐入 ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 视差滚动 */
.parallax {
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}

/* ---------- 8. 响应式细节 ---------- */
@media (max-width: 768px) {
  .section-header {
    margin-bottom: 2rem;
  }

  .hero {
    min-height: 90vh;
  }

  .hero-bg {
    background-attachment: scroll; /* 移动端关闭视差 */
  }

  .parallax {
    background-attachment: scroll;
  }
}

/* ---------- 9. 表单样式 ---------- */
.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 0.95rem;
  color: var(--color-text-primary);
  background-color: var(--color-bg-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
  font-family: inherit;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-frost-deep);
  box-shadow: 0 0 0 3px rgba(74, 122, 155, 0.12);
}

.form-input::placeholder {
  color: var(--color-text-muted);
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: var(--font-medium);
  color: var(--color-text-secondary);
  margin-bottom: 0.5rem;
}

textarea.form-input {
  resize: vertical;
  min-height: 120px;
}

/* ---------- 10. 滚动条美化 ---------- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-soft);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border-strong);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-frost);
}

/* ---------- 11. 选中文字颜色 ---------- */
::selection {
  background-color: var(--color-frost);
  color: var(--color-text-inverse);
}
