/* ============================================
   布考网络 Bukao.net 主页样式
   风格：暗黑科技感、简洁小工作室官网
   ============================================ */

/* ---------- CSS 变量：颜色与尺寸 ---------- */
:root {
  /* 主色调：深色背景 + 绿色科技点缀 */
  --bg-base: #0a0a0f;
  --bg-elevated: #12121a;
  --bg-card: #15151f;
  --bg-card-hover: #1a1a25;

  /* 边框与分割线 */
  --border: #23232f;
  --border-bright: #2d2d3a;

  /* 文字颜色 */
  --text-primary: #e8e8ed;
  --text-secondary: #a0a0ad;
  --text-muted: #6b6b78;

  /* 主点缀色：科技绿（终端感） */
  --accent: #00ff9c;
  --accent-dim: #00cc7d;
  --accent-soft: rgba(0, 255, 156, 0.1);

  /* 文字强调色（次级） */
  --accent-blue: #4d9fff;

  /* 容器宽度 */
  --container-max: 1120px;
  --container-pad: 24px;

  /* 圆角与阴影 */
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.02) inset, 0 8px 24px rgba(0, 0, 0, 0.4);

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

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

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

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* 顶部细微渐变作为底色，不刺眼 */
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 255, 156, 0.06), transparent 60%);
  background-repeat: no-repeat;
}

main {
  flex: 1;
}

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

a:hover {
  color: var(--accent-dim);
}

img, svg {
  display: block;
  max-width: 100%;
}

/* ---------- 通用容器 ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

/* ---------- 顶部导航栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 14px var(--container-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* 品牌 LOGO 区 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.2px;
}

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

.brand-logo {
  flex-shrink: 0;
}

.brand-text {
  font-family: var(--font-mono);
  color: var(--text-primary);
}

/* 导航链接列表 */
.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  display: inline-block;
  padding: 8px 14px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
  background-color: var(--bg-elevated);
}

/* 汉堡菜单按钮（移动端） */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 32px;
  height: 28px;
  padding: 6px 4px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
}

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

/* ---------- Hero 区 ---------- */
.hero {
  position: relative;
  padding: 96px 0 80px;
  overflow: hidden;
  isolation: isolate;
}

/* Hero 背景的网格装饰（纯CSS、无动画） */
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center top;
  /* 顶部淡出，营造景深 */
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent 80%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent 80%);
}

.hero .container {
  text-align: center;
  position: relative;
}

/* Hero 状态标签（在线运行） */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  margin-bottom: 32px;
  background: var(--accent-soft);
  border: 1px solid rgba(0, 255, 156, 0.25);
  border-radius: 999px;
  font-size: 13px;
  color: var(--accent);
  font-family: var(--font-mono);
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent);
}

/* Hero 主标题 */
.hero-title {
  font-size: clamp(28px, 5.5vw, 56px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 20px;
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* Hero 副标题 */
.hero-sub {
  font-size: clamp(16px, 1.8vw, 18px);
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 40px;
  line-height: 1.65;
}

/* Hero 按钮组 */
.hero-cta {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- 按钮基础样式 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-sans);
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.1s ease, background-color 0.15s ease,
              border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
  user-select: none;
}

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

.btn-primary {
  background: var(--accent);
  color: #0a0a0f;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-dim);
  border-color: var(--accent-dim);
  color: #0a0a0f;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-bright);
}

.btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--accent);
  color: var(--text-primary);
}

.btn-arrow {
  flex-shrink: 0;
}

/* ---------- 区段标题（services / about） ---------- */
.section-head {
  text-align: center;
  margin-bottom: 56px;
}

.section-title {
  font-size: clamp(24px, 3.2vw, 32px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.section-sub {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
}

/* ---------- 三个服务卡片 ---------- */
.services {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.service-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.service-card {
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.service-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--accent-soft);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.service-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  letter-spacing: -0.005em;
}

.service-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 24px;
  flex: 1;
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  font-family: var(--font-mono);
  align-self: flex-start;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, gap 0.15s ease;
}

.service-link:hover {
  border-bottom-color: var(--accent);
  color: var(--accent);
  gap: 10px;
}

/* ---------- 关于小节 ---------- */
.about {
  padding: 60px 0 100px;
  border-top: 1px solid var(--border);
}

.about-card {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  padding: 40px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.about-card .section-title {
  margin-bottom: 16px;
}

.about-card p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 10px;
}

.about-card p:last-of-type {
  margin-bottom: 28px;
}

.about-list {
  list-style: none;
  text-align: left;
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.about-list li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border-left: 2px solid var(--accent);
  border-radius: 4px;
  font-size: 14px;
}

.about-list li strong {
  color: var(--text-primary);
  font-weight: 600;
}

.about-list li span {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ---------- 页面底部 Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-base);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand .brand-text {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
}

.footer-tag {
  color: var(--text-muted);
  font-size: 13px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
}

.footer-links {
  display: flex;
  gap: 18px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 13px;
  transition: color 0.15s ease;
}

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

.footer-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.beian {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  font-size: 12px;
}

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

.copyright {
  color: var(--text-muted);
  font-size: 12px;
}

/* ============================================
   响应式：平板与移动端
   ============================================ */

/* 平板以下（≤ 900px）：服务卡片变 2 列 */
@media (max-width: 900px) {
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero {
    padding: 72px 0 60px;
  }
  .services {
    padding: 64px 0;
  }
}

/* 移动端（≤ 640px）：服务卡片变 1 列，导航变汉堡菜单 */
@media (max-width: 640px) {
  :root {
    --container-pad: 20px;
  }

  .nav {
    padding: 12px var(--container-pad);
  }

  /* 显示汉堡菜单按钮 */
  .nav-toggle {
    display: flex;
  }

  /* 移动端：导航链接变为下拉面板 */
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 8px var(--container-pad) 16px;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.2s ease, opacity 0.2s ease, visibility 0.2s ease;
  }

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

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 12px 14px;
    width: 100%;
  }

  .hero {
    padding: 56px 0 48px;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    justify-content: center;
    width: 100%;
  }

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

  .about-card {
    padding: 32px 24px;
  }

  .about-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .footer-brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .footer-tag {
    padding-left: 0;
    border-left: 0;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 12px 18px;
  }
}

/* 超小屏（≤ 400px） */
@media (max-width: 400px) {
  .hero-title {
    font-size: 26px;
    line-height: 1.2;
  }
  .hero-sub {
    font-size: 15px;
  }
  .status-pill {
    font-size: 12px;
    padding: 5px 12px;
  }
  .service-card {
    padding: 24px 20px;
  }
  .about-card {
    padding: 28px 20px;
  }
}

/* 极窄屏（≤ 360px，如 iPhone SE 1代）*/
@media (max-width: 360px) {
  :root {
    --container-pad: 16px;
  }
  .hero-title {
    font-size: 24px;
  }
  .btn {
    padding: 11px 18px;
    font-size: 13px;
  }
}

/* ---------- 减少动效偏好支持 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ---------- 选中文本样式 ---------- */
::selection {
  background: var(--accent);
  color: #0a0a0f;
}

/* ---------- 滚动条样式（仅 WebKit） ---------- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: var(--border-bright);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
