/* SPDX-License-Identifier: MIT — Copyright (c) 2026 CareerAgent contributors */

/* ==========================================================================
   CareerAgent 静态主页样式
   设计取向：现代、简洁、专业工具质感；蓝/靛蓝主色 + 黑白灰打底
   ========================================================================== */

:root {
  /* 颜色 */
  --bg: #ffffff;
  --bg-alt: #f6f7fb;
  --bg-dark: #0b0f1a;
  --surface: #ffffff;
  --border: #e6e8ef;
  --border-strong: #d7dae4;

  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #6b7280;

  --primary: #4f46e5;
  --primary-strong: #4338ca;
  --primary-soft: #eef2ff;
  --primary-border: #c7d2fe;

  --footer-text: #94a3b8;
  --footer-text-strong: #cbd5e1;

  /* 形状 */
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 6px 24px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 18px 48px rgba(15, 23, 42, 0.10);

  /* 布局 */
  --container: 1120px;
  --section-pad: 96px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.16s ease;
}

a:hover {
  color: var(--primary-strong);
}

img,
svg {
  vertical-align: middle;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.only-desktop {
  display: inline;
}

/* ==========================================================================
   顶部导航
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

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

.brand:hover {
  color: var(--text);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--primary);
  color: #fff;
}

.brand-inverse {
  color: #fff;
}

.brand-inverse:hover {
  color: #fff;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 9px;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
}

.nav-link:hover {
  color: var(--text);
  background: var(--bg-alt);
}

.nav-link-github {
  margin-left: 6px;
  color: var(--text);
  border: 1px solid var(--border);
}

.nav-link-github:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 9px;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* 移动端菜单展开状态 */
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   Hero 区
   ========================================================================== */

.hero {
  padding: 88px 0 96px;
  background:
    radial-gradient(1100px 480px at 12% -8%, #eef2ff 0%, transparent 60%),
    radial-gradient(900px 420px at 95% 0%, #f5f3ff 0%, transparent 55%),
    var(--bg);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  padding: 6px 13px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  border-radius: 999px;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
}

.hero-title {
  margin: 0 0 20px;
  font-size: 48px;
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  margin: 0 0 32px;
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.hero-subtitle strong {
  color: var(--text);
  font-weight: 600;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 26px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-trust li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  color: var(--text-muted);
}

.hero-trust svg {
  color: #10b981;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: 11px;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease,
    transform 0.12s ease, box-shadow 0.16s ease;
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.28);
}

.btn-primary:hover {
  background: var(--primary-strong);
  color: #fff;
  box-shadow: 0 8px 22px rgba(79, 70, 229, 0.34);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--bg-alt);
  color: var(--text);
  border-color: var(--text-muted);
}

.btn-block {
  width: 100%;
}

/* Hero 产品示意 */
.hero-visual {
  position: relative;
}

.app-window {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.app-window-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: #fbfbfd;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.dot-red {
  background: #f87171;
}
.dot-yellow {
  background: #fbbf24;
}
.dot-green {
  background: #34d399;
}

.app-window-title {
  margin-left: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.app-window-body {
  display: grid;
  grid-template-columns: 150px 1fr;
  min-height: 300px;
}

.app-side {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 10px;
  background: var(--bg-alt);
  border-right: 1px solid var(--border);
}

.app-side-item {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.app-side-item.is-active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

.app-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.app-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fff;
}

.app-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.app-row-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.app-row-main strong {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-row-main span {
  font-size: 12px;
  color: var(--text-muted);
}

.badge {
  flex: none;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}

.badge-blue {
  color: #1d4ed8;
  background: #dbeafe;
}

.badge-gray {
  color: #475569;
  background: #e2e8f0;
}

.badge-warn {
  color: #b45309;
  background: #fef3c7;
}

.app-local {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding: 10px 12px;
  font-size: 12px;
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 9px;
}

/* ==========================================================================
   通用 Section
   ========================================================================== */

.section {
  padding: var(--section-pad) 0;
}

.section-pain {
  background: var(--bg-alt);
}

.section-solution {
  background: var(--bg);
}

.section-features {
  background: var(--bg-alt);
}

.section-trust {
  background: var(--bg);
}

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

.section-kicker {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

.section-title {
  margin: 0 0 14px;
  font-size: 34px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.section-desc {
  margin: 0;
  font-size: 17px;
  color: var(--text-secondary);
}

/* ==========================================================================
   卡片（痛点 / 方案）
   ========================================================================== */

.cards-grid {
  display: grid;
  gap: 24px;
}

.cards-3 {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    border-color 0.18s ease;
}

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

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  border-radius: 12px;
}

.icon-slate {
  background: #f1f5f9;
  color: #475569;
}

.icon-indigo {
  background: var(--primary-soft);
  color: var(--primary);
}

.card h3 {
  margin: 0 0 10px;
  font-size: 19px;
  font-weight: 700;
}

.card p {
  margin: 0;
  font-size: 15px;
  color: var(--text-secondary);
}

.pain-card h3 {
  color: var(--text);
}

/* ==========================================================================
   功能亮点
   ========================================================================== */

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.feature {
  display: flex;
  gap: 18px;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    border-color 0.18s ease;
}

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

.feature-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 13px;
  background: var(--primary-soft);
  color: var(--primary);
}

.feature-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
}

.feature-body p {
  margin: 0;
  font-size: 15px;
  color: var(--text-secondary);
}

/* ==========================================================================
   信任区
   ========================================================================== */

.trust-panel {
  padding: 56px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(900px 400px at 90% -10%, rgba(79, 70, 229, 0.14) 0%, transparent 55%),
    linear-gradient(180deg, #111827 0%, #0b0f1a 100%);
  color: #e5e7eb;
}

.trust-head {
  max-width: 640px;
  margin: 0 auto 44px;
  text-align: center;
}

.trust-shield {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  border-radius: 18px;
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.trust-panel .section-title {
  color: #fff;
}

.trust-panel .section-desc {
  color: #cbd5e1;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.trust-item {
  padding: 22px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.trust-item h3 {
  margin: 0 0 8px;
  font-size: 16.5px;
  font-weight: 700;
  color: #fff;
}

.trust-item p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.7;
  color: #cbd5e1;
}

/* ==========================================================================
   下载区
   ========================================================================== */

.download-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 860px;
  margin: 0 auto;
}

.download-card {
  display: flex;
  flex-direction: column;
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.download-os {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.download-os svg {
  color: var(--primary);
}

.download-os h3 {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
}

.download-format {
  margin: 2px 0 0;
  font-size: 13.5px;
  color: var(--text-muted);
}

.download-specs {
  margin: 0 0 22px;
  padding: 0 0 0 18px;
  font-size: 14px;
  color: var(--text-secondary);
}

.download-specs li {
  margin-bottom: 6px;
}

.download-note {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--bg-dark);
  color: var(--footer-text);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-tagline {
  margin: 16px 0 0;
  max-width: 320px;
  font-size: 14.5px;
  color: var(--footer-text);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col h4 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--footer-text-strong);
}

.footer-col a {
  font-size: 14.5px;
  color: var(--footer-text);
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 26px;
  font-size: 13.5px;
  color: var(--footer-text);
}

.footer-bottom p {
  margin: 0;
}

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

.footer-bottom a:hover {
  color: #fff;
}

/* ==========================================================================
   响应式
   ========================================================================== */

@media (max-width: 960px) {
  :root {
    --section-pad: 72px;
  }

  .hero {
    padding: 64px 0 72px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-title {
    font-size: 40px;
  }

  .hero-visual {
    max-width: 560px;
  }

  .cards-3 {
    grid-template-columns: 1fr;
  }

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

  .trust-panel {
    padding: 40px 28px;
  }

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

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

  .nav-menu {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 16px 16px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.18s ease, opacity 0.18s ease, visibility 0.18s ease;
  }

  .nav-menu.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    padding: 11px 13px;
    font-size: 16px;
  }

  .nav-link-github {
    margin-left: 0;
  }

  .hero-title {
    font-size: 33px;
  }

  .hero-subtitle {
    font-size: 16.5px;
  }

  .only-desktop {
    display: none;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .section-title {
    font-size: 27px;
  }

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

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

@media (max-width: 420px) {
  .hero-title {
    font-size: 28px;
  }

  .app-window-body {
    grid-template-columns: 1fr;
  }

  .app-side {
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .app-side-item {
    flex: none;
  }
}
