/*
  泰禾官网首页（未登录访客）
  ------------------------------------------------------------------
  1. 只在官网首页生效，不影响工作台、总台与登录页的任何样式。
  2. 字号与对比度沿用 theme.css 的清晰度基线：正文不低于 14px，说明文字不低于 13px。
  3. 桌面优先，同时保证客户用手机打开代理链接时排版不溢出。
*/

.home-page {
  --home-ink: #17233a;
  --home-ink-2: #3d4b61;
  --home-muted: #46536a;
  --home-line: #dbe3ee;
  --home-line-soft: #e8eef7;
  --home-surface: #ffffff;
  --home-bg: #f5f8fc;
  --home-navy: #1c3a63;
  --home-blue: #1f6feb;
  --home-blue-soft: #e8f1fe;
  --home-green: #0f7a4f;
  --home-green-dark: #0b6440;
  --home-amber: #a76512;
  --home-amber-soft: #fdf3e2;

  margin: 0;
  background: var(--home-bg);
  color: var(--home-ink);
}

.home-page *,
.home-page *::before,
.home-page *::after {
  box-sizing: border-box;
}

.home-page img {
  max-width: 100%;
}

/* 1. 顶部导航 ------------------------------------------------------ */
.home-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--home-line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(8px);
}

.home-nav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 24px;
}

.home-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  flex: 0 1 auto;
  min-width: 0;
}

.home-brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--home-line);
  background: #fff;
  flex: 0 0 auto;
}

.home-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.home-brand-text strong {
  font-size: 16px;
  line-height: 1.25;
  color: var(--home-ink);
  letter-spacing: 0;
}

.home-brand-text small {
  font-size: 13px;
  line-height: 1.3;
  color: var(--home-muted);
  white-space: nowrap;
}

.home-nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: 12px;
}

.home-nav-links a {
  color: var(--home-ink-2);
  font-size: 14px;
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.home-nav-links a:hover {
  color: var(--home-blue);
  border-bottom-color: var(--home-blue);
}

.home-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex: 0 0 auto;
}

/* 2. 按钮 ---------------------------------------------------------- */
.home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

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

.home-btn.primary:hover {
  background: var(--home-green-dark);
  border-color: var(--home-green-dark);
}

.home-btn.ghost {
  background: #fff;
  border-color: #c6d2e2;
  color: var(--home-ink);
}

.home-btn.ghost:hover {
  border-color: var(--home-blue);
  color: var(--home-blue);
}

.home-btn.large {
  height: 48px;
  padding: 0 26px;
  font-size: 16px;
}

.home-btn:focus-visible,
.home-nav-links a:focus-visible {
  outline: 2px solid var(--home-blue);
  outline-offset: 2px;
}

/* 3. 首屏 ---------------------------------------------------------- */
.home-hero {
  max-width: 900px;
  margin: 0 auto;
  padding: 56px 24px 48px;
  text-align: center;
}

.home-hero-mark img {
  width: 168px;
  height: auto;
  display: block;
  margin: 0 auto 4px;
  /* Logo 源图是浅灰底，放在白底圆角底座上才不像一块方形色差 */
  padding: 10px;
  border: 1px solid var(--home-line);
  border-radius: 12px;
  background: #fff;
}

.home-eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  padding: 5px 12px;
  border-radius: 6px;
  background: var(--home-blue-soft);
  color: #17509f;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
}

.home-hero h1 {
  margin: 0 0 14px;
  font-size: 44px;
  line-height: 1.15;
  color: var(--home-navy);
  letter-spacing: 0;
}

.home-lead {
  max-width: 720px;
  margin: 0 auto 28px;
  color: var(--home-ink-2);
  font-size: 16px;
  line-height: 1.75;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.home-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 42px 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.home-facts li {
  padding: 14px 16px;
  border: 1px solid var(--home-line);
  border-left: 3px solid var(--home-blue);
  border-radius: 8px;
  background: var(--home-surface);
}

.home-facts li b {
  display: block;
  font-size: 15px;
  color: var(--home-ink);
  line-height: 1.4;
}

.home-facts li span {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--home-muted);
  line-height: 1.5;
}

/* 4. 通用分节 ------------------------------------------------------ */
/* 顶部导航是吸顶的，锚点跳转时留出高度，标题和“联系我”不会被导航盖住 */
.home-section[id] {
  scroll-margin-top: 82px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

.home-section {
  padding: 56px 24px;
  border-top: 1px solid var(--home-line-soft);
  background: var(--home-surface);
}

.home-section.is-tinted {
  background: var(--home-bg);
}

.home-section-head {
  max-width: 1180px;
  margin: 0 auto 30px;
}

.home-section-head h2 {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1.3;
  color: var(--home-navy);
  letter-spacing: 0;
}

.home-section-lead {
  margin: 0;
  max-width: 720px;
  color: var(--home-muted);
  font-size: 14px;
  line-height: 1.7;
}

/* 5. 功能卡片 ------------------------------------------------------ */
.home-features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.home-feature {
  padding: 18px;
  border: 1px solid var(--home-line);
  border-radius: 8px;
  background: var(--home-surface);
}

.home-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: var(--home-blue-soft);
  color: var(--home-blue);
}

.home-feature-icon svg {
  width: 20px;
  height: 20px;
}

.home-feature h3 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--home-ink);
}

.home-feature p {
  margin: 0;
  color: var(--home-muted);
  font-size: 13px;
  line-height: 1.65;
}

/* 6. 流程 ---------------------------------------------------------- */
.home-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.home-flow li {
  position: relative;
  padding: 20px 18px 18px;
  border: 1px solid var(--home-line);
  border-radius: 8px;
  background: var(--home-surface);
}

.home-flow em {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--home-amber-soft);
  color: var(--home-amber);
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0;
}

.home-flow h3 {
  margin: 0 0 6px;
  font-size: 15px;
  color: var(--home-ink);
}

.home-flow p {
  margin: 0;
  color: var(--home-muted);
  font-size: 13px;
  line-height: 1.65;
}

/* 7. 联系我 -------------------------------------------------------- */
.home-contact {
  text-align: center;
}

.home-contact .home-section-head {
  text-align: center;
}

.home-contact .home-section-lead {
  margin: 0 auto;
}

.home-qr-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
}

.home-qr-card {
  width: 208px;
  padding: 14px;
  border: 1px solid var(--home-line);
  border-radius: 8px;
  background: var(--home-surface);
}

.home-qr-card img {
  display: block;
  width: 180px;
  height: 180px;
  margin: 0 auto;
  object-fit: contain;
  background: #fff;
}

.home-qr-card figcaption {
  margin-top: 10px;
  color: var(--home-ink-2);
  font-size: 13px;
  line-height: 1.5;
}

.home-qr-loading,
.home-qr-empty {
  margin: 0;
  padding: 22px;
  width: 100%;
  border: 1px dashed var(--home-line);
  border-radius: 8px;
  background: var(--home-surface);
  color: var(--home-muted);
  font-size: 14px;
}

.home-contact-note {
  margin: 18px auto 0;
  max-width: 720px;
  color: var(--home-muted);
  font-size: 13px;
  line-height: 1.6;
}

.home-contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
}

/* 8. 页脚 ---------------------------------------------------------- */
.home-footer {
  border-top: 1px solid var(--home-line);
  background: var(--home-surface);
}

.home-footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 24px;
  color: var(--home-muted);
  font-size: 13px;
}

/* 9. 响应式：代理链接大多是客户用手机打开，所以窄屏必须完整可用 ---------- */
@media (max-width: 1080px) {
  .home-features,
  .home-flow,
  .home-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .home-nav-inner {
    gap: 12px;
    padding: 10px 16px;
  }

  .home-brand-text small,
  .home-nav-links {
    display: none;
  }

  .home-nav-actions {
    gap: 8px;
  }

  .home-btn {
    height: 38px;
    padding: 0 14px;
  }

  .home-hero {
    padding: 36px 18px 34px;
  }

  .home-hero-mark img {
    width: 128px;
  }

  .home-hero h1 {
    font-size: 32px;
  }

  .home-lead {
    font-size: 15px;
  }

  .home-section {
    padding: 38px 18px;
  }

  .home-section-head h2 {
    font-size: 22px;
  }

  .home-features,
  .home-flow,
  .home-facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-btn.large {
    height: 46px;
    padding: 0 20px;
    font-size: 15px;
  }

  .home-qr-card {
    width: 100%;
    max-width: 320px;
  }

  .home-qr-card img {
    width: min(100%, 240px);
    height: auto;
    aspect-ratio: 1 / 1;
  }
}
