/* ============================================================
   设计系统令牌 (Design System Tokens)
   ============================================================ */
:root {
  /* ── 色彩 ── */
  --color-bg:          #f8f6f0;       /* 温暖米白背景 */
  --color-surface:     #ffffff;       /* 卡片表面 */
  --color-primary:     #1a1a2e;       /* 深炭色主色 */
  --color-primary-soft:#2d2d44;      /* 主色柔和变体 */
  --color-accent:      #c9a84c;       /* 琥珀金强调色 */
  --color-accent-soft: rgba(201, 168, 76, 0.12);
  --color-text:        #1a1a2e;       /* 正文色 */
  --color-text-muted:  #6b6b7b;      /* 次要文字 */
  --color-text-light:  #9a9aaa;      /* 辅助文字 */
  --color-border:      #e8e4dc;      /* 边框色 */
  --color-line:        #06C755;       /* LINE 品牌绿 */
  --color-line-hover:  #05a848;       /* LINE 悬停态 */
  --color-line-dark:   #048f3c;       /* LINE 按压态 */
  --color-white:       #ffffff;       /* 纯白 */

  /* ── 字体 ── */
  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-body:    'DM Sans', 'Helvetica Neue', sans-serif;

  /* ── 字号 ── */
  --text-xs:    0.75rem;    /* 12px */
  --text-sm:    0.875rem;   /* 14px */
  --text-base:  1rem;       /* 16px */
  --text-lg:    1.125rem;   /* 18px */
  --text-xl:    1.5rem;     /* 24px */
  --text-2xl:   2rem;       /* 32px */
  --text-3xl:   2.75rem;    /* 44px */

  /* ── 间距 (8px 基数) ── */
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.5rem;    /* 24px */
  --space-6: 2rem;      /* 32px */
  --space-8: 3rem;      /* 48px */
  --space-10: 4rem;     /* 64px */
  --space-12: 5rem;     /* 80px */

  /* ── 圆角 ── */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-full: 50%;

  /* ── 阴影 ── */
  --shadow-sm:  0 1px 3px rgba(26, 26, 46, 0.06);
  --shadow-md:  0 4px 16px rgba(26, 26, 46, 0.08);
  --shadow-lg:  0 8px 32px rgba(26, 26, 46, 0.10);
  --shadow-glow: 0 0 0 4px var(--color-accent-soft);

  /* ── 过渡 ── */
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --duration:   0.3s;
}

/* ============================================================
   基础重置
   ============================================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-6) var(--space-4);
}

/* ============================================================
   页面容器
   ============================================================ */
.page-wrapper {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

/* ============================================================
   员工卡片
   ============================================================ */
.employee-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-8) var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  position: relative;
  overflow: hidden;

  /* 顶部装饰线 */
  border-top: 3px solid var(--color-accent);
}

/* 卡片内微妙纹理 */
.employee-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(
    180deg,
    var(--color-accent-soft) 0%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   头像
   ============================================================ */
.avatar-wrapper {
  position: relative;
  z-index: 1;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 3px solid var(--color-surface);
  box-shadow:
    var(--shadow-md),
    0 0 0 2px var(--color-accent);
  transition: transform var(--duration) var(--ease-out),
              box-shadow var(--duration) var(--ease-out);
}

.avatar:hover {
  transform: scale(1.04);
  box-shadow:
    var(--shadow-lg),
    0 0 0 3px var(--color-accent);
}

/* 头像占位符（无图片时显示） */
.avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-soft) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  box-shadow:
    var(--shadow-md),
    0 0 0 2px var(--color-accent);
}

/* ============================================================
   姓名 & 职位
   ============================================================ */
.identity-block {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
}

.employee-name {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.employee-title {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* ============================================================
   分隔线
   ============================================================ */
.divider {
  width: 48px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
  opacity: 0.6;
}

/* ============================================================
   介绍内容
   ============================================================ */
.intro-block {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 100%;
}

.intro-text {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.75;
  max-width: 340px;
  margin: 0 auto;
}

/* ============================================================
   LINE 按钮
   ============================================================ */
.line-cta {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: var(--space-2);
}

.line-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-4) var(--space-6);
  background: var(--color-line);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color var(--duration) var(--ease-out),
    transform var(--duration) var(--ease-out),
    box-shadow var(--duration) var(--ease-out);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--color-line) 25%, transparent);
}

.line-button:hover {
  background: var(--color-line-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--color-line) 35%, transparent);
}

.line-button:active {
  background: var(--color-line-dark);
  transform: translateY(0);
  box-shadow: 0 1px 4px color-mix(in srgb, var(--color-line) 20%, transparent);
}

/* LINE 图标 (SVG 内联) */
.line-button .line-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* ============================================================
   页脚
   ============================================================ */
.card-footer {
  position: relative;
  z-index: 1;
  font-size: var(--text-xs);
  color: var(--color-text-light);
  text-align: center;
  padding-top: var(--space-2);
}

/* ============================================================
   入场动画
   ============================================================ */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.employee-card {
  animation: fadeSlideUp 0.6s var(--ease-out) both;
}

.employee-card > * {
  animation: fadeSlideUp 0.5s var(--ease-out) both;
}

/* 逐级延迟 */
.avatar-wrapper      { animation-delay: 0.1s; }
.identity-block      { animation-delay: 0.2s; }
.divider             { animation-delay: 0.3s; }
.intro-block         { animation-delay: 0.35s; }
.line-cta            { animation-delay: 0.45s; }
.card-footer         { animation-delay: 0.55s; }

/* ============================================================
   响应式：平板及以上
   ============================================================ */
@media (min-width: 768px) {
  body {
    padding: var(--space-10) var(--space-6);
  }

  .page-wrapper {
    max-width: 460px;
  }

  .employee-card {
    padding: var(--space-10) var(--space-8);
    gap: var(--space-6);
  }

  .avatar-wrapper {
    width: 140px;
    height: 140px;
  }

  .employee-name {
    font-size: var(--text-3xl);
  }

  .intro-text {
    font-size: var(--text-lg);
    max-width: 380px;
  }
}

/* ============================================================
   响应式：小屏手机
   ============================================================ */
@media (max-width: 360px) {
  .employee-card {
    padding: var(--space-6) var(--space-4);
    gap: var(--space-4);
  }

  .avatar-wrapper {
    width: 100px;
    height: 100px;
  }

  .employee-name {
    font-size: var(--text-xl);
  }

  .intro-text {
    font-size: var(--text-sm);
  }
}

/* ============================================================
   无障碍 & 减弱动画
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   加载转圈动画 (Loading Spinner)
   ============================================================ */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-10);
  color: var(--color-text-muted);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--color-accent-soft);
  border-top: 4px solid var(--color-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 默认隐藏卡片 */
.employee-card {
  display: none;
}
