/* ===================================
   CRITICAL CSS - Inline in <head>
   Target: < 3KB for fast first paint
   =================================== */
/* Version 1.13 */

/* CSS Variables for theming & performance control */
:root {
  /* Brand Colors - Fiducial Communications */
  /* Primary - Fiducial Red */
  --primary-deep: #cd2e26;      /* Fiducial red - 主按钮、CTA */
  --primary: #cd2e26;           /* Fiducial red - 次要按钮 */
  --primary-light: #cd2e26;     /* Fiducial red - 悬停态 */
  --primary-soft: #E7646A;      /* 柔和红 - 标签、点缀 */
  --primary-subtle: #F5EAEB;    /* 淡红 - 背景 */

  /* Neutral - Fiducial Gray Scale */
  --neutral-ink: #222222;       /* Fiducial dark - 正文、深色背景 */
  --neutral-slate: #222222;     /* Fiducial dark - 标题、导航 */
  --neutral-graphite: #222;     /* 深灰 - 次要文本 */
  --neutral-cool: #5a5a5a;      /* Fiducial gray - 辅助文本、图标 */
  --neutral-mist: #f1f1f1;      /* 浅灰 - 卡片背景 */
  --neutral-warm: #ffffff;      /* 白色 - 页面背景 */
  --neutral-stone: #ececec;     /* 边框灰 - 边框、分隔线 */
  --neutral-paper: #FFFFFF;     /* 纯白 - 卡片 */

  /* Accent - Removed gold/copper, use Fiducial red */
  --accent-gold: #cd2e26;       /* Fiducial red (was gold) */
  --accent-copper: #cd2e26;     /* Fiducial red (was copper) */
  --accent-bronze: #cd2e26;     /* Fiducial red (was bronze) */

  /* Semantic - 语义色 */
  --success: #129E6C;           /* 翠绿 - 成功、收益 */
  --success-light: #E6F7F0;     /* 淡绿 - 成功背景 */
  --info: #cd2e26;              /* Fiducial red - 信息 (was blue) */
  --info-light: #F5EAEB;        /* 淡红 - 信息背景 (was blue) */
  --warning: #E88B2E;           /* 橙色 - 警告 */
  --warning-light: #FEF5E7;     /* 淡橙 - 警告背景 */

  /* Animation Control (A/B testing) */
  --animation-level: full; /* full | minimal | none */
  --animation-duration: 0.3s;
  --animation-timing: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
  :root {
    --animation-level: none;
    --animation-duration: 0.01ms;
  }
}

/* Base reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--neutral-ink);
  background-color: #ffffff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
  max-width: min(94vw, 1480px);
  margin: 0 auto;
  padding: 0;
}

/* Header - Glassmorphism effect */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(249, 246, 242, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--neutral-stone);
  box-shadow: 0 1px 3px rgba(31, 34, 39, 0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Hero Section - Light Editorial Blog Style */
.hero {
  /* 纯黑背景 */
  background: url('../images/black-bg.png') no-repeat center center;
  background-size: cover;
  color: #ffffff;
  padding: 8rem 0 5rem; /* Edge-to-edge design */
  position: relative;
  overflow: visible;
  border-bottom: 1px solid rgba(205, 46, 38, 0.2);
}

/* Hero 右下角 Logo - 放大并与角落交叉 */
.hero::before {
  content: '';
  position: absolute;
  bottom: -220px;
  right: -180px;
  width: 700px;
  height: 700px;
  background: url('../images/no-bg-black-logo.png') no-repeat center center;
  background-size: contain;
  opacity: 0.08;
  z-index: 10;
  pointer-events: none;
  filter: invert(1) brightness(0.9);
}

/* Hero subtle accent - thin red keyline at bottom */
.hero::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100px;
  height: 3px;
  background: #cd2e26;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  align-items: start;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem; /* Content breathing space */
}

@media (min-width: 768px) {
  .hero {
    padding: 10rem 0 7rem; /* Edge-to-edge design */
  }

  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
  }
}

/* Hero Content - Editorial style with red accent bar */
.hero-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
  z-index: 1;
  padding-left: 1.5rem;
  border-left: 4px solid #cd2e26;
  max-width: 600px;
  overflow: visible;
  margin-top: auto;
  margin-bottom: auto;
}

@media (min-width: 768px) {
  .hero-content {
    gap: 2rem;
    padding-left: 2rem;
  }
	.hero-content h1{
    margin: 0 !important;
  }
}

.hero-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #ffffff;
  color: #5a5a5a;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  width: fit-content;
  border-radius: 0.375rem;
  border: 1px solid #ececec;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.hero h1 {
  font-family: 'Manrope', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 1.5rem 0;
  color: #222222;
  letter-spacing: -0.02em;
}

@media (min-width: 768px) {
  .hero h1 {
    font-size: 3.2rem;
    margin-bottom: 0rem;
  }
}

.hero-description {
  font-family: 'Roboto', sans-serif;
  font-size: 1.125rem;
  color: #444;
  line-height: 1.8;
  font-weight: 400;
  margin: 0;
  max-width: 540px;
}

/* Doodle Underline Decoration - Main Site Style */
.doodle-underline {
  width: 150px;
  height: auto;
  margin: -0.5rem 0 1.5rem 0;
  opacity: 0.7;
}

/* Hero Decorative Chart */
.hero-decoration {
  position: absolute;
  bottom: -50px;
  right: -100px;
  width: 250px;
  opacity: 0.15;
  pointer-events: none;
}

.hero-chart-decoration {
  width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  .hero-decoration {
    display: none;
  }

  .doodle-underline {
    width: 120px;
    margin: -0.5rem 0 1rem 0;
  }
}

/* Hero Cards Wrapper - Light neutral panel with corner accent */
.hero-cards-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  background: transparent; /* 改为透明，让深色背景显示 */
  padding: 2rem 2rem 2.5rem; /* 调整底部padding保持整体高度 */
  border-radius: 0.5rem;
  position: relative;
}

/* 移除不需要的装饰 */

.hero-cards-container {
  position: relative;
  width: 100%;
  max-width: 24rem; /* 减小宽度 */
  height: clamp(23.5rem, 52vh, 30rem); /* 更接近矮卡片的高度 */
  min-height: 23.5rem;
  margin-bottom: 0.5rem; /* 为author card留空间 */
}

@media (max-width: 992px) {
  .hero-cards-container {
    height: auto;
    min-height: 22rem;
  }
}

/* Stacked Background Cards */
.hero-card-bg {
  position: absolute;
  inset: 0;
  border-radius: 1.5rem;
  opacity: 0.5;
  pointer-events: none;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 15px 35px rgba(31, 34, 39, 0.15);
}

.hero-card-bg-1 {
  background: linear-gradient(135deg,
    #ffffff 0%,
    #f1f1f1 100%);
  transform: rotate(-3deg) scale(0.95) translateZ(0);
  z-index: 1;
  opacity: 0.4;
}

.hero-card-bg-2 {
  background: linear-gradient(135deg,
    #ffffff 0%,
    #f1f1f1 100%);
  transform: rotate(2deg) scale(0.97) translateZ(0);
  z-index: 2;
  opacity: 0.45;
}

.hero-card-bg-3 {
  background: linear-gradient(135deg,
    #ffffff 0%,
    #f1f1f1 100%);
  transform: rotate(-1deg) scale(0.98) translateZ(0);
  z-index: 3;
  opacity: 0.5;
}

/* Active state for background cards */
.hero-card-bg.active {
  transform: rotate(0deg) scale(0.99) translateZ(0);
  opacity: 0.6;
}

/* Main Active Card - 优化后的美学设计 */
.hero-card {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100%;
  background: #ffffff;
  /* 更精致的红色边框 */
  border: 2px solid rgba(205, 46, 38, 0.15);
  /* 更现代的圆角 */
  border-radius: 0.75rem;
  /* 更柔和的阴影，减少"浮空"感 */
  box-shadow:
    0 10px 25px -5px rgba(31, 34, 39, 0.15),
    0 5px 10px -3px rgba(31, 34, 39, 0.08),
    0 0 0 1px rgba(205, 46, 38, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 微妙的红色光晕增强品牌感 */
.hero-card::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg,
    rgba(205, 46, 38, 0.1) 0%,
    transparent 50%,
    rgba(205, 46, 38, 0.05) 100%);
  border-radius: 0.75rem;
  z-index: -1;
  opacity: 0.5;
  transition: opacity 0.4s ease;
}

/* Enhanced depth on hover */
.hero-card:hover {
  border-color: rgba(205, 46, 38, 0.25);
  box-shadow:
    0 15px 35px -8px rgba(31, 34, 39, 0.2),
    0 8px 15px -5px rgba(31, 34, 39, 0.1),
    0 0 0 1px rgba(205, 46, 38, 0.15),
    0 0 30px rgba(205, 46, 38, 0.08);
  transform: translateY(-4px) scale(1.005);
}

.hero-card:hover::after {
  opacity: 0.8;
}

.hero-card-inner {
  height: 100%;
  /* 更柔和的白色到淡粉渐变 */
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 1) 0%,
    rgba(254, 252, 252, 1) 50%,
    rgba(253, 249, 249, 1) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 0.75rem;
  padding: 1.75rem 1.75rem 4.75rem; /* 调整底部padding降低整体高度 */
  display: flex;
  flex-direction: column;
  gap: 1.1rem; /* 略收紧内文间距 */
  position: relative;
  z-index: 1;
}

/* Card Header */
.hero-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0; /* 移除margin，使用gap */
}

.hero-card-dots {
  display: flex;
  gap: 0.5rem;
}

.hero-card-dots .dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.6);
}

.hero-card-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: #ffffff;
  background-color: #cd2e26;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
}

/* Card Content */
.hero-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              filter 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 确保卡片内所有文字都是深色 - 覆盖hero的白色样式 */
.hero-card h3,
.hero-card .card-title,
.hero-card p,
.hero-card span,
.hero-card .metric-value,
.hero-card .metric-label {
  color: inherit !important;
}

.hero-card .card-title {
  color: #222222 !important;
}

.hero-card .metric-value {
  color: #cd2e26 !important;
}

.hero-card .metric-label,
.hero-card .feature-item span {
  color: #222222 !important;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .hero-card-content,
  .hero-card,
  .hero-card-bg,
  .card-nav,
  .indicator {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .hero-card-content {
    filter: none !important;
  }
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #222222 !important; /* 确保深色显示，覆盖hero样式 */
  margin: 0;
  text-shadow: none; /* 移除白色阴影 */
}

.card-metric {
  /* 微妙的红色品牌渐变 */
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 250, 250, 0.95) 50%,
    rgba(255, 245, 245, 0.95) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 0.75rem;
  padding: 1.5rem 1.25rem; /* 优化padding */
  text-align: center;
  border: 1px solid rgba(205, 46, 38, 0.1);
  box-shadow: 0 2px 8px rgba(205, 46, 38, 0.05);
}

.metric-value {
  font-size: 2.5rem; /* 增大字号 */
  font-weight: 800; /* 加粗 */
  color: #cd2e26 !important; /* 品牌红，覆盖hero样式 */
  text-shadow: none; /* 移除白色阴影 */
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.metric-label {
  font-size: 0.95rem; /* 增大字号 */
  color: #222222 !important; /* 深色，更易读，覆盖hero样式 */
  font-weight: 600; /* 加粗 */
  line-height: 1.3;
}

/* Card Features */
.card-features {
  display: flex;
  flex-direction: column;
  gap: 0.875rem; /* 增加间距 */
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem; /* 增加间距 */
  padding: 0.625rem 0.875rem; /* 优化padding */
  background: rgba(255, 255, 255, 0.4); /* 稍微加深 */
  border-radius: 0.5rem;
  border: 1px solid rgba(205, 46, 38, 0.08); /* 红色边框 */
}

.feature-icon {
  width: 1.125rem;
  height: 1.125rem;
  color: #cd2e26; /* 改为品牌红 */
  flex-shrink: 0;
  stroke-width: 2.5; /* 加粗图标 */
}

.feature-item span {
  font-size: 0.95rem; /* 增大字号 */
  color: #222222 !important; /* 深色，覆盖hero样式 */
  font-weight: 600; /* 加粗 */
  line-height: 1.3;
}

/* Author Card - 参考主站设计，增强视觉冲击 */
.hero-author-card {
  position: absolute;
  bottom: -3rem;
  right: 1rem;
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(253, 249, 249, 0.95) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  box-shadow:
    0 12px 30px -8px rgba(31, 34, 39, 0.2),
    0 4px 12px -2px rgba(31, 34, 39, 0.1),
    0 0 0 1px rgba(205, 46, 38, 0.15);
  border: 2px solid rgba(205, 46, 38, 0.15);
  min-width: 280px;
  max-width: 320px;
  z-index: 30;
}

.author-card-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-avatar {
  width: 4rem; /* 增大，更突出 */
  height: 4rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #cd2e26 0%, #be1e2c 100%); /* 渐变背景 */
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid white; /* 恢复粗边框 */
  box-shadow: 0 4px 12px rgba(205, 46, 38, 0.3); /* 增强阴影 */
  flex-shrink: 0;
  overflow: hidden; /* 裁剪图片 */
  position: relative;
}

/* 真实照片样式 */
.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 填满圆形 */
  display: block;
}

/* 保留SVG fallback样式 */
.author-avatar svg {
  width: 2rem;
  height: 2rem;
  color: white;
}

.author-info {
  flex: 1;
  min-width: 0;
}

.author-label {
  font-size: 0.7rem;
  color: #cd2e26 !important; /* 品牌红，覆盖hero样式 */
  text-transform: uppercase;
  letter-spacing: 0.12em; /* 增加字间距 */
  font-weight: 800; /* 超粗 */
  margin-bottom: 0.5rem; /* 增加间距 */
}

.author-name {
  font-size: 1.125rem; /* 增大名字 */
  font-weight: 700;
  color: #222222 !important; /* 深色，覆盖hero样式 */
  margin: 0;
  line-height: 1.2;
}

.author-title {
  font-size: 0.8125rem;
  color: #cd2e26 !important; /* 品牌红，覆盖hero样式 */
  margin-top: 0.25rem;
  font-weight: 500;
}

/* Navigation Arrows */
.card-nav {
  position: absolute;
  top: 50%;
  --card-nav-x: 0%;
  --card-nav-scale: 1;
  transform: translate(var(--card-nav-x), -50%) scale(var(--card-nav-scale));
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 30;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-nav-prev {
  left: 0;
  --card-nav-x: -50%;
}

.card-nav-next {
  right: 0;
  --card-nav-x: 50%;
}

.card-nav svg {
  width: 1.5rem;
  height: 1.5rem;
  color: #cd2e26;
}

.card-nav:hover {
  background: var(--neutral-paper);
  border-color: #cd2e26;
  --card-nav-scale: 1.1;
  box-shadow: 0 12px 28px rgba(205, 46, 38, 0.25);
}

.card-nav:hover svg {
  color: #cd2e26;
}

.card-nav:active {
  --card-nav-scale: 0.95;
}

/* Hide arrows on mobile */
@media (max-width: 767px) {
  .card-nav {
    display: none;
  }
}

/* Card Indicators */
.hero-card-indicators {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  justify-content: center;
}

.indicator {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.indicator.active {
  background: #cd2e26;
  transform: scale(1.25);
}

/* Responsive utilities */
@media (max-width: 767px) {
  .hide-mobile {
    display: none;
  }
}

@media (min-width: 768px) {
  .hide-desktop {
    display: none;
  }
}
