/**
 * MESL (mesl.baby) - 品牌落地页核心主样式
 * 模板：054 薄荷治愈 (Mint Healing Theme) - 白色明朗纯净版
 * 框架：90 小课堂 黑板粉笔描画 (Classroom Chalkboard Theme)
 */

:root {
  /* 薄荷治愈色板 (Mint Healing Palette) */
  --color-mint-50: #f0fdf4;
  --color-mint-100: #dcfce7;
  --color-mint-200: #bbf7d0;
  --color-mint-300: #86efac;
  --color-mint-400: #4ade80;
  --color-mint-500: #22c55e;
  --color-mint-brand: #10b981;
  --color-mint-dark: #059669;
  --color-mint-deep: #065f46;
  --color-mint-bright: #10b981;
  --color-mint-glow: #34d399;
  --color-mint-soft: #a7f3d0;
  --color-mint-wash: rgba(16, 185, 129, 0.08);

  /* 白色明朗基调 (Pure White & Light Surfaces) */
  --bg-darkest: #ffffff;
  --bg-primary: #ffffff;
  --bg-surface: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f0fdf4;
  --bg-chalkboard: #0e2920; /* 黑板特色看板保留深森林黑板色，在白底中形成视觉聚焦点 */

  /* 文字颜色 (High Contrast Slate Hierarchy) */
  --text-main: #1e293b;
  --text-heading: #0f172a;
  --text-muted: #475569;
  --text-light: #64748b;

  /* 粉笔色彩 (Chalk Palette) */
  --chalk-white: #ffffff;
  --chalk-cream: #fef08a;
  --chalk-mint: #6ee7b7;
  --chalk-blue: #bae6fd;
  --chalk-pink: #fbcfe8;

  /* 边框与阴影 */
  --border-chalk: rgba(16, 185, 129, 0.35);
  --border-dashed: rgba(16, 185, 129, 0.45);
  --border-subtle: #e2e8f0;
  --shadow-mint-sm: 0 4px 14px rgba(16, 185, 129, 0.12);
  --shadow-mint-lg: 0 12px 36px rgba(16, 185, 129, 0.18);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.05);

  /* 字体族 */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* 容器最大宽度 */
  --container-max: 1200px;
  --nav-height: 74px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 16px);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: #ffffff;
  color: var(--text-main);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(16, 185, 129, 0.08), transparent 70%),
    radial-gradient(circle at 100% 30%, rgba(52, 211, 153, 0.06), transparent 40%),
    radial-gradient(circle at 0% 70%, rgba(16, 185, 129, 0.05), transparent 50%);
  background-attachment: fixed;
}

/* 统一超链接 */
a {
  color: var(--color-mint-dark);
  text-decoration: none;
  transition: all 0.25s ease;
}

a:hover {
  color: var(--color-mint-brand);
}

/* 布局容器 */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* 辅助文字与徽章 */
.section-wrapper {
  padding: 96px 0;
  position: relative;
  scroll-margin-top: calc(var(--nav-height) + 20px);
}

.section-header {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 56px auto;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 9999px;
  background: var(--color-mint-50);
  border: 1px dashed var(--color-mint-brand);
  color: var(--color-mint-deep);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-heading);
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.section-title .highlight {
  color: var(--color-mint-dark);
  position: relative;
  display: inline-block;
}

.section-title .highlight::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 6px;
  background: rgba(52, 211, 153, 0.35);
  border-radius: 4px;
  z-index: -1;
}

.section-desc {
  font-size: 1.08rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 720px;
  margin: 0 auto;
}

/* 按钮通用系统 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
  text-decoration: none;
  line-height: 1.2;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.35);
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(60deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: rotate(30deg) translateY(-100%);
  transition: transform 0.6s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(16, 185, 129, 0.45);
  color: #ffffff;
}

.btn-primary:hover::after {
  transform: rotate(30deg) translateY(100%);
}

.btn-secondary {
  background: var(--color-mint-50);
  color: var(--color-mint-deep);
  border: 1.5px dashed var(--color-mint-brand);
}

.btn-secondary:hover {
  background: var(--color-mint-100);
  transform: translateY(-2px);
  color: #064e3b;
  border-style: solid;
}

/* 固定顶部导航 (Sticky Header - White Glass) */
.header-nav {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(16, 185, 129, 0.2);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.header-nav.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border-bottom-color: rgba(16, 185, 129, 0.3);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo-img {
  height: 40px;
  width: auto;
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 24px;
}

.nav-link {
  color: #334155;
  font-size: 0.96rem;
  font-weight: 600;
  position: relative;
  padding: 8px 4px;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--color-mint-brand);
  transition: width 0.25s ease;
  border-radius: 2px;
}

.nav-link:hover {
  color: var(--color-mint-dark);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-cta-btn {
  padding: 9px 20px;
  font-size: 0.92rem;
  border-radius: 10px;
}

/* 汉堡菜单按钮 (移动端) */
.mobile-toggle-btn {
  display: none;
  background: var(--color-mint-50);
  border: 1px dashed var(--color-mint-brand);
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--color-mint-dark);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.mobile-toggle-btn svg {
  width: 24px;
  height: 24px;
}

/* 移动端菜单抽屉 */
.mobile-drawer {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-bottom: 2px dashed var(--border-dashed);
  padding: 24px 20px 32px;
  z-index: 999;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.1);
}

.mobile-drawer.open {
  display: flex;
}

.mobile-drawer .nav-link {
  font-size: 1.15rem;
  padding: 12px 0;
  color: #1e293b;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* 动效：滚动平滑进入 */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* 首屏 Hero Section */
.hero-section {
  padding: 70px 0 90px;
  position: relative;
  overflow: hidden;
}

.hero-canvas-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-content {
  text-align: left;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  background: var(--color-mint-50);
  border: 1px dashed var(--color-mint-brand);
  border-radius: 9999px;
  color: var(--color-mint-deep);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.hero-badge .pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-mint-brand);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--color-mint-brand);
  animation: pulseMint 1.8s infinite;
}

@keyframes pulseMint {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-title {
  font-size: clamp(2.4rem, 4.2vw, 3.8rem);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.8px;
  margin-bottom: 22px;
  color: var(--text-heading);
}

.hero-title .brand-callout {
  color: var(--color-mint-dark);
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 34px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.hero-proof-bar {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 24px;
  border-top: 1px dashed rgba(16, 185, 129, 0.35);
}

.proof-item {
  display: flex;
  flex-direction: column;
}

.proof-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-mint-deep);
  font-family: var(--font-mono);
  line-height: 1;
  margin-bottom: 4px;
}

.proof-label {
  font-size: 0.82rem;
  color: var(--text-light);
  letter-spacing: 0.5px;
}

/* 响应式调整 */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .nav-menu, .nav-actions .btn-primary {
    display: none;
  }
  .mobile-toggle-btn {
    display: flex;
  }
}

@media (max-width: 640px) {
  .section-wrapper {
    padding: 64px 0;
  }
  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-cta-group .btn {
    width: 100%;
  }
  .hero-proof-bar {
    gap: 16px;
    flex-wrap: wrap;
  }
  .proof-item {
    flex: 1 1 40%;
  }
}

/* 无障碍偏好：降低动效 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* =========================================================================
   文章专栏专属样式 (White Theme Article Styles)
   ========================================================================= */
.article-container {
  max-width: 860px;
  margin: 40px auto 80px;
  padding: 0 24px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: #64748b !important;
  margin-bottom: 28px;
}

.breadcrumbs a {
  color: var(--color-mint-dark) !important;
}

.article-header {
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1.5px dashed rgba(16, 185, 129, 0.3) !important;
}

.article-main-title {
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  font-weight: 900;
  line-height: 1.3;
  color: #0f172a !important;
  margin-bottom: 16px;
}

.article-meta-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.86rem;
  color: #64748b !important;
  font-family: var(--font-mono);
  flex-wrap: wrap;
}

.toc-box {
  background: #f8fafc !important;
  border: 1.5px dashed rgba(16, 185, 129, 0.4) !important;
  border-radius: 14px;
  padding: 22px 28px;
  margin: 28px 0 36px;
}

.toc-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #065f46 !important;
  margin-bottom: 12px;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toc-list a {
  color: #334155 !important;
  font-size: 0.94rem;
}

.toc-list a:hover {
  color: var(--color-mint-dark) !important;
  padding-left: 4px;
}

.article-body h2 {
  font-size: 1.55rem;
  font-weight: 800;
  color: #065f46 !important;
  margin: 38px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(16, 185, 129, 0.3) !important;
}

.article-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a !important;
  margin: 26px 0 12px;
}

.article-body p {
  font-size: 1.02rem;
  line-height: 1.8;
  color: #1e293b !important;
  margin-bottom: 18px;
}

.article-body ul, .article-body ol {
  margin: 16px 0 20px 24px;
  color: #1e293b !important;
  line-height: 1.75;
}

.article-body li {
  margin-bottom: 8px;
}

.chalk-callout {
  background: #f0fdf4 !important;
  border-left: 4px solid var(--color-mint-brand) !important;
  border-radius: 0 12px 12px 0;
  padding: 18px 22px;
  margin: 24px 0;
  font-size: 0.96rem;
  color: #064e3b !important;
  border: 1px dashed rgba(16, 185, 129, 0.3);
  border-left-style: solid !important;
}

.code-snippet, .chalk-diagram-box {
  background: #f8fafc !important;
  border: 1px dashed rgba(16, 185, 129, 0.45) !important;
  color: #065f46 !important;
}

.compare-table th {
  background: #dcfce7 !important;
  color: #065f46 !important;
}

.compare-table td {
  color: #1e293b !important;
  border-color: rgba(16, 185, 129, 0.25) !important;
}

.article-cta-box {
  background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 100%) !important;
  border: 2px dashed var(--color-mint-brand) !important;
  border-radius: 18px;
  padding: 36px;
  text-align: center;
  margin: 48px 0;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.08);
}

.article-cta-box h3 {
  color: #0f172a !important;
}

.article-cta-box p {
  color: #475569 !important;
}

.related-articles {
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1.5px dashed rgba(16, 185, 129, 0.3) !important;
}

/* ==========================================================================
   页脚通用样式 (Global Footer Styles - White & Light Slate Theme)
   ========================================================================== */
.site-footer {
  background: #f8fafc;
  border-top: 1.5px dashed rgba(16, 185, 129, 0.35);
  padding: 72px 0 36px;
  position: relative;
  width: 100%;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 56px;
}

.footer-brand-desc {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.7;
  margin-top: 14px;
  max-width: 320px;
}

.footer-heading {
  font-size: 1rem;
  font-weight: 800;
  color: #065f46;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.footer-links-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links-list li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.footer-links-list a {
  color: #475569;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.footer-links-list a:hover {
  color: var(--color-mint-dark);
  padding-left: 2px;
}

.footer-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  border-top: 1px dashed rgba(0, 0, 0, 0.08);
  font-size: 0.84rem;
  color: #64748b;
  flex-wrap: wrap;
  gap: 16px;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .footer-bottom-bar {
    flex-direction: column;
    text-align: center;
  }
}

/* ==========================================================================
   技术专栏文章页白色高对比度样式 (Article Typography & Contrast Enhancement)
   ========================================================================== */
.article-main-title {
  color: #0f172a !important;
}

.breadcrumbs {
  color: #64748b !important;
}

.breadcrumbs a {
  color: var(--color-mint-dark) !important;
}

.article-meta-bar {
  color: #64748b !important;
}

.toc-box {
  background: #f8fafc !important;
  border: 1.5px dashed rgba(16, 185, 129, 0.35) !important;
}

.toc-title {
  color: #065f46 !important;
}

.toc-list a {
  color: #334155 !important;
}

.toc-list a:hover {
  color: var(--color-mint-dark) !important;
}

.article-body h2 {
  color: #065f46 !important;
  border-bottom-color: rgba(16, 185, 129, 0.25) !important;
}

.article-body h3 {
  color: #0f172a !important;
}

.article-body p {
  color: #1e293b !important;
}

.article-body ul, 
.article-body ol {
  color: #1e293b !important;
}

.chalk-callout {
  background: #f0fdf4 !important;
  border-left-color: var(--color-mint-brand) !important;
  color: #065f46 !important;
  border-top: 1px dashed rgba(16, 185, 129, 0.2) !important;
  border-right: 1px dashed rgba(16, 185, 129, 0.2) !important;
  border-bottom: 1px dashed rgba(16, 185, 129, 0.2) !important;
}

.related-articles h3 {
  color: #065f46 !important;
}

.related-articles .chalk-box div {
  color: #0f172a !important;
}

.related-articles .chalk-box div[style*="font-size: 0.8rem"] {
  color: var(--color-mint-dark) !important;
}
