/* =====================================================================
 * 知影的Ai日志 — 样式表
 * 设计语言：暗色科技风 + 蓝紫渐变，玻璃拟态卡片，平滑滚动揭示动画。
 * 采用 CSS 变量统一主题，便于后续微调配色。
 * ===================================================================== */

/* ---------- 设计变量 ---------- */
:root {
  --bg: #070b16;
  --bg-soft: #0c1326;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #e8edf7;
  --text-dim: #9aa6c2;
  --text-faint: #6b7796;

  --primary: #6366f1;
  --secondary: #8b5cf6;
  --accent: #22d3ee;
  --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 48%, #22d3ee 100%);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 60px -12px rgba(139, 92, 246, 0.45);

  --max-width: 1120px;
  --nav-height: 68px;

  --font-sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB",
    system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 16px);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

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

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s ease, box-shadow 0.25s ease,
    background 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 70px -10px rgba(139, 92, 246, 0.7);
}

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

.btn-ghost:hover {
  background: var(--surface-strong);
  transform: translateY(-2px);
}

/* ---------- 导航栏 ---------- */
.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-height);
  z-index: 100;
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease,
    backdrop-filter 0.3s ease;
}

.navbar.scrolled {
  background: rgba(7, 11, 22, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.08rem;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--gradient);
  box-shadow: var(--shadow-glow);
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 4px;
  background: var(--bg);
}

.brand-accent {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-links a {
  position: relative;
  font-size: 0.96rem;
  color: var(--text-dim);
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--gradient);
  border-radius: 2px;
  transition: width 0.25s ease;
}

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

.nav-links a:hover::after {
  width: 100%;
}

/* 移动端汉堡按钮 */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin-inline: auto;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

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

/* ---------- Hero 首屏 ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: var(--nav-height);
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: 18%;
  left: 50%;
  width: 760px;
  height: 760px;
  transform: translateX(-50%);
  background: radial-gradient(
    circle at center,
    rgba(139, 92, 246, 0.35),
    rgba(99, 102, 241, 0.12) 40%,
    transparent 70%
  );
  filter: blur(20px);
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.035) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at center, #000 0%, transparent 75%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.hero-eyebrow {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  color: var(--text-dim);
}

.hero-title {
  font-size: clamp(2.6rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-slogan {
  font-size: clamp(1.05rem, 2.4vw, 1.45rem);
  color: var(--text-dim);
  max-width: 640px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

.hero-note {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}

/* ---------- 通用区块 ---------- */
.section {
  padding: 110px 0;
}

.section-alt {
  background: linear-gradient(
    180deg,
    transparent,
    rgba(12, 19, 38, 0.6) 50%,
    transparent
  );
}

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

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-desc {
  margin-top: 14px;
  color: var(--text-dim);
  font-size: 1.02rem;
}

/* ---------- 关于 ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

.about-lead {
  font-size: 1.18rem;
  color: var(--text-dim);
  max-width: 760px;
}

.about-lead strong {
  color: var(--text);
}

.feature-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.feature-card {
  padding: 30px 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.3s ease, border-color 0.3s ease,
    background 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  background: var(--surface-strong);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--gradient);
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 18px;
  box-shadow: var(--shadow-glow);
}

.feature-card h3 {
  font-size: 1.12rem;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-dim);
  font-size: 0.96rem;
}

/* ---------- AI日志 卡片 ---------- */
.logs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.log-card {
  display: flex;
  flex-direction: column;
  padding: 28px 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.3s ease, border-color 0.3s ease,
    box-shadow 0.3s ease, background 0.3s ease;
}

.log-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.log-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.log-tag {
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.16);
  color: #c7caff;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.log-date {
  font-size: 0.85rem;
  color: var(--text-faint);
}

.log-title {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 12px;
}

.log-summary {
  color: var(--text-dim);
  font-size: 0.96rem;
  flex-grow: 1;
}

.log-link {
  margin-top: 22px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.25s ease;
}

.log-link:hover {
  gap: 12px;
}

/* ---------- 联系 ---------- */
.contact-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  padding: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-label {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.contact-value {
  font-size: 1.08rem;
  font-weight: 600;
}

a.contact-value {
  color: var(--accent);
  transition: color 0.2s ease;
}

a.contact-value:hover {
  color: #7defff;
}

/* ---------- 页脚 ---------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 56px 0 34px;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.footer-brand .brand-name {
  font-size: 1.1rem;
  font-weight: 700;
}

.footer-slogan {
  margin-top: 10px;
  color: var(--text-dim);
  font-size: 0.94rem;
  max-width: 320px;
}

.footer-nav {
  display: flex;
  gap: 28px;
}

.footer-nav a {
  color: var(--text-dim);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 26px;
}

.copyright {
  color: var(--text-faint);
  font-size: 0.88rem;
}

.beian-link {
  color: var(--text-faint);
  font-size: 0.88rem;
  border-bottom: 1px dashed var(--text-faint);
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.beian-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- 滚动揭示动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  will-change: opacity, transform;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .feature-cards,
  .logs-grid,
  .contact-card {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 84px 0;
  }
}

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

  .nav-links {
    position: fixed;
    inset: var(--nav-height) 0 auto 0;
    flex-direction: column;
    gap: 0;
    padding: 12px 24px 22px;
    background: rgba(7, 11, 22, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .nav-links.open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    width: 100%;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .footer-inner {
    flex-direction: column;
  }
}

/* ---------- 无障碍：尊重减少动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn,
  .log-card,
  .feature-card {
    transition: none;
  }
}
