/* ============================================================
 * home.css — 首页全新视觉（研乐学术蓝 · 自研，非目标站样式）
 * 文档站点：应用核心设计 token、断点、动效
 * ============================================================ */
:root {
  --navy-950: #101d33;
  --navy-800: #1b2c4a;
  --primary: #2b4a8b;
  --primary-600: #3d5cad;
  --primary-300: #8fa8d9;
  --primary-soft: #e8eef9;
  --gold: #e8b64c;
  --gold-soft: #fbf3df;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --ink: #1c2c4b;
  --muted: #5d6b85;
  --line: #e3e8f2;
  --radius: 14px;
  --shadow: 0 12px 30px rgba(27, 45, 75, 0.08);
  --shadow-lg: 0 22px 48px rgba(27, 45, 75, 0.14);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { max-width: 100%; }

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

/* ---------- 顶栏导航 ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--navy-800);
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(145deg, var(--primary-600), var(--navy-800));
  box-shadow: 0 6px 14px rgba(43, 74, 139, 0.28);
  font-size: 15px;
  font-weight: 900;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  transition: background 160ms ease, color 160ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--primary);
  background: var(--primary-soft);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--navy-800);
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 88% -10%, rgba(61, 92, 173, 0.14), transparent 60%),
    radial-gradient(700px 380px at -8% 110%, rgba(232, 182, 76, 0.12), transparent 55%),
    linear-gradient(180deg, #fff 0%, var(--bg) 100%);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 40px;
  align-items: center;
  padding: clamp(52px, 8vh, 96px) 0 clamp(48px, 7vh, 84px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 14px;
  border: 1px solid rgba(232, 182, 76, 0.45);
  border-radius: 999px;
  color: #9a6b12;
  background: var(--gold-soft);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero h1 {
  margin: 0 0 16px;
  color: var(--navy-950);
  font-size: clamp(34px, 4.6vw, 52px);
  line-height: 1.14;
  letter-spacing: -0.03em;
  font-weight: 900;
}

.hero-desc {
  max-width: 560px;
  margin: 0 0 26px;
  color: var(--muted);
  font-size: clamp(15px, 1.6vw, 17px);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary-600), var(--primary));
  box-shadow: 0 10px 24px rgba(43, 74, 139, 0.28);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  box-shadow: 0 14px 32px rgba(43, 74, 139, 0.36);
  transform: translateY(-2px);
}

.btn-ghost {
  color: var(--primary);
  background: #fff;
  border-color: var(--line);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--primary-300);
  background: var(--primary-soft);
}

/* 倒计时仪表卡 */
.countdown-card {
  position: relative;
  padding: 30px 28px;
  border-radius: 20px;
  color: #eef3ff;
  background:
    radial-gradient(circle at 100% 0%, rgba(143, 168, 217, 0.28), transparent 46%),
    linear-gradient(150deg, #27418a 0%, var(--navy-800) 100%);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.countdown-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--primary-300));
}

.countdown-label {
  display: block;
  color: #c6d4f2;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.countdown-value {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 14px 0 6px;
}

.countdown-value strong {
  color: var(--gold);
  font-family: var(--mono);
  font-size: clamp(56px, 7vw, 80px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.countdown-value span {
  color: #d7e0f7;
  font-size: 20px;
  font-weight: 800;
}

.countdown-note {
  margin: 0;
  color: #a9bce4;
  font-size: 13px;
}

/* ---------- 学习工具 ---------- */
.tools {
  padding: clamp(48px, 7vh, 80px) 0;
}

.section-head {
  margin-bottom: 26px;
}

.section-head h2 {
  margin: 0 0 6px;
  color: var(--navy-950);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 900;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.tool-card:hover,
.tool-card:focus-visible {
  border-color: var(--primary-300);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  outline: none;
}

.tool-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, var(--primary-600), var(--primary));
  box-shadow: 0 8px 18px rgba(43, 74, 139, 0.26);
  font-size: 19px;
  font-weight: 900;
}

.tool-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tool-cat {
  color: var(--primary-600);
  font-size: 13px;
  font-weight: 800;
}

.tool-card h3 {
  margin: 0;
  color: var(--navy-950);
  font-size: 20px;
  font-weight: 850;
  letter-spacing: -0.01em;
}

.tool-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.tool-features {
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  opacity: 0.85;
}

.tool-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
}

.tool-action i {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: var(--primary);
  background: var(--primary-soft);
  font-style: normal;
  transition: transform 160ms ease;
}

.tool-card:hover .tool-action i {
  transform: translateX(4px);
}

/* ---------- 互助群 CTA ---------- */
.community {
  padding-bottom: clamp(48px, 7vh, 80px);
}

.community-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 30px 34px;
  border-radius: 20px;
  color: #eef3ff;
  background:
    radial-gradient(circle at 100% 0%, rgba(232, 182, 76, 0.18), transparent 44%),
    linear-gradient(135deg, var(--navy-800), var(--primary));
  box-shadow: var(--shadow-lg);
}

.community-copy h2 {
  margin: 0 0 4px;
  font-size: 24px;
  font-weight: 900;
}

.community-copy p {
  margin: 0;
  color: #c3d1ef;
  font-size: 14px;
}

.btn-light {
  min-width: 190px;
  justify-content: space-between;
  color: var(--navy-800);
  background: #fff;
  box-shadow: 0 10px 24px rgba(8, 18, 40, 0.22);
  font-family: var(--mono);
}

.btn-light span {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 800;
}

.btn-light:hover,
.btn-light:focus-visible {
  transform: translateY(-2px);
}

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px 0;
  color: var(--muted);
  font-size: 13px;
  background: #fff;
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  text-align: center;
}

.site-footer p { margin: 0; }
.site-footer a:hover { color: var(--primary); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 44px 0 40px;
  }

  .community-card {
    padding: 26px 24px;
  }
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: 62px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 20px 16px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px rgba(27, 45, 75, 0.08);
  }

  .nav-open .nav-links { display: flex; }

  .nav-links a { padding: 12px 14px; }

  .container { width: calc(100% - 28px); }

  .hero { padding: 0; }

  .hero-inner {
    padding: 36px 0 32px;
    gap: 22px;
  }

  .hero h1 { font-size: 34px; }

  .hero-ctas .btn { flex: 1 1 auto; }

  .countdown-card { padding: 24px 20px; }

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

  .community-card {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 24px 18px;
  }

  .btn-light {
    width: 100%;
    min-height: 48px;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tool-card,
  .tool-action i,
  .btn,
  .nav-toggle span { transition: none; }
}