/* 首页专属样式。沿用 style.css 的调色板，主色取自品牌 Logo：深藏青、青蓝、草绿。 */

:root {
  --navy: #16306b;
  --navy-deep: #0f224f;
  --cyan: #22a9bd;
  --lime: #86c232;
  --home-width: 1200px;
}

.home {
  background: var(--card);
  color: var(--fg);
}

/* —— 顶部导航 —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px max(24px, calc((100% - var(--home-width)) / 2));
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.site-header:hover,
.site-header:focus-within {
  border-bottom-color: var(--border);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 15px;
}

.site-nav > a:not(.btn) {
  color: var(--fg-muted);
}

.site-nav > a:not(.btn):hover {
  color: var(--navy);
}

.site-actions {
  display: inline-flex;
  flex-shrink: 0;
  gap: 12px;
}

/* —— 主视觉 —— */
.hero {
  position: relative;
  display: block;
  overflow: hidden;
  padding: 0;
  background:
    radial-gradient(55% 70% at 88% 12%, rgba(34, 169, 189, 0.14), transparent 70%),
    radial-gradient(40% 55% at 4% 92%, rgba(134, 194, 50, 0.12), transparent 70%),
    linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
}

.hero-inner {
  max-width: var(--home-width);
  margin: 0 auto;
  padding: 72px 24px 80px;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
}

.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(32px, 4.4vw, 54px);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--navy);
}

.hero h1 .accent {
  background: linear-gradient(90deg, var(--cyan) 0%, var(--primary) 60%, var(--navy) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .lead {
  margin: 0 0 30px;
  max-width: 30em;
  font-size: 17px;
  line-height: 1.8;
  color: var(--fg-muted);
}

.btn-lg {
  height: 48px;
  padding: 0 28px;
  font-size: 16px;
  border-radius: 12px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 14px;
}

.hero-points {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 30px 0 0;
  padding: 0;
  font-size: 14px;
  color: var(--fg-subtle);
}

.hero-points li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-points li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
}

.hero-art {
  position: relative;
}

.hero-art img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 24px;
  box-shadow: 0 30px 60px -30px rgba(15, 34, 79, 0.45), 0 2px 8px rgba(15, 34, 79, 0.08);
}

/* 首屏入场动效；系统开启“减少动态效果”时不播放 */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * {
    animation: home-rise 0.6s ease-out both;
  }

  .hero-copy > *:nth-child(2) { animation-delay: 0.05s; }
  .hero-copy > *:nth-child(3) { animation-delay: 0.1s; }
  .hero-copy > *:nth-child(4) { animation-delay: 0.15s; }
  .hero-copy > *:nth-child(5) { animation-delay: 0.2s; }

  .hero-art {
    animation: home-rise 0.7s 0.15s ease-out both;
  }

  @keyframes home-rise {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

/* —— 通用分区 —— */
.section {
  max-width: var(--home-width);
  margin: 0 auto;
  padding: 88px 24px;
}

.section-alt {
  max-width: none;
  background: var(--bg);
}

/* 分区自身有 24px 左右内边距，内层容器只负责限宽，保持与其他分区左右对齐 */
.section-alt > .section-inner {
  max-width: calc(var(--home-width) - 48px);
  margin: 0 auto;
}

.section-head {
  max-width: 640px;
  margin-bottom: 44px;
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--cyan);
  text-transform: uppercase;
}

/* 窄屏断行时把一个短语作为整体换行，避免标题末行只剩一两个字 */
.nowrap {
  white-space: nowrap;
}

.section-head h2 {
  margin: 10px 0 12px;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.3;
  color: var(--navy);
}

.section-head p {
  margin: 0;
  font-size: 16px;
  line-height: 1.8;
  color: var(--fg-muted);
}

/* —— 功能卡片 —— */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.feature {
  padding: 26px 24px 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.feature:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.feature .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary-soft);
  margin-bottom: 18px;
}

.feature .icon svg {
  width: 26px;
  height: 26px;
}

.feature h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--navy);
}

.feature p {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--fg-muted);
}

/* —— 使用流程 —— */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.step {
  position: relative;
  padding: 28px 26px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.step .num {
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--cyan), var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.step h3 {
  margin: 16px 0 8px;
  font-size: 18px;
  color: var(--navy);
}

.step p {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--fg-muted);
}

.step .tag {
  display: inline-block;
  margin-top: 14px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(134, 194, 50, 0.16);
  color: #4f7d12;
  font-size: 12px;
  font-weight: 600;
}

/* —— 教学工具 —— */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.tool {
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.tool:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.tool img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--bg);
}

.tool .body {
  padding: 24px 26px 28px;
}

.tool .badge {
  background: rgba(134, 194, 50, 0.16);
  color: #4f7d12;
}

.tool h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 8px;
  font-size: 20px;
  color: var(--navy);
}

.tool p {
  margin: 0;
  font-size: 15px;
  line-height: 1.8;
  color: var(--fg-muted);
}

/* —— 行动区 —— */
.cta-band {
  max-width: var(--home-width);
  margin: 0 auto 88px;
  padding: 0 24px;
}

.cta-band .inner {
  padding: 56px 40px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 45%, var(--primary) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.cta-band h2 {
  margin: 0 0 10px;
  font-size: clamp(22px, 2.6vw, 32px);
}

.cta-band p {
  margin: 0;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.78);
}

.cta-band .btn-primary {
  background: #fff;
  color: var(--navy);
}

.cta-band .btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

/* —— 页脚 —— */
.home-footer {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  padding: 48px max(24px, calc((100% - var(--home-width)) / 2)) 28px;
  border-top: 1px solid var(--border);
  background: var(--card);
  font-size: 14px;
  color: var(--fg-muted);
}

.home-footer .brand-logo img {
  height: 30px;
}

.home-footer .about {
  margin: 14px 0 0;
  max-width: 32em;
  line-height: 1.75;
}

.home-footer h4 {
  margin: 4px 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-subtle);
  letter-spacing: 1px;
}

.home-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-footer li {
  margin-bottom: 8px;
}

.home-footer a {
  color: var(--fg-muted);
}

.home-footer a:hover {
  color: var(--navy);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 18px max(24px, calc((100% - var(--home-width)) / 2));
  border-top: 1px solid var(--bg-subtle);
  font-size: 13px;
  color: var(--fg-subtle);
}

.footer-bottom a {
  color: var(--fg-subtle);
}

.footer-bottom a:hover {
  color: var(--primary);
}

/* —— 响应式 —— */
@media (max-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .site-nav > a:not(.btn) {
    display: none;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    padding: 40px 24px 56px;
    gap: 36px;
  }

  .hero-art {
    order: -1;
  }

  .hero-art img {
    border-radius: 18px;
  }

  .steps,
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 60px 24px;
  }

  .cta-band {
    margin-bottom: 60px;
  }

  .cta-band .inner {
    padding: 40px 28px;
  }
}

@media (max-width: 600px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .site-actions {
    gap: 8px;
  }

  .site-header {
    padding: 12px 16px;
  }

  .site-header .brand-logo img {
    height: 28px;
  }

  .home-footer {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* 锚点跳转时给吸顶导航留出空间 */
html {
  scroll-padding-top: 72px;
}
