/* style.css - 开云 Kaiyun 官网 */
/* 全局重置与变量 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f8fafc;
  --surface: rgba(255,255,255,0.72);
  --text: #0b1a2f;
  --text2: #1e293b;
  --border: rgba(0,0,0,0.06);
  --glow: rgba(59,130,246,0.15);
  --brand: #1e3a8a;
  --brand-light: #3b82f6;
  --brand-dark: #0f172a;
  --radius: 28px;
  --shadow: 0 20px 40px -12px rgba(0,0,0,0.08);
  --glass: rgba(255,255,255,0.38);
  --grad: linear-gradient(145deg, #ffffff 0%, #f0f4fe 100%);
  --nav-bg: rgba(255,255,255,0.68);
  --card-bg: rgba(255,255,255,0.6);
  --accent: #f59e0b;
  --success: #10b981;
  --error: #ef4444;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
body.dark {
  --bg: #0e121c;
  --surface: rgba(20,28,45,0.7);
  --text: #edf2f7;
  --text2: #cbd5e1;
  --border: rgba(255,255,255,0.06);
  --glow: rgba(59,130,246,0.25);
  --brand: #60a5fa;
  --brand-light: #93bbfc;
  --brand-dark: #0f172a;
  --shadow: 0 20px 40px -12px rgba(0,0,0,0.6);
  --glass: rgba(30,40,60,0.4);
  --grad: linear-gradient(145deg, #141e2b 0%, #1a2538 100%);
  --nav-bg: rgba(14,18,28,0.78);
  --card-bg: rgba(25,35,55,0.5);
}
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s ease, color 0.3s ease;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* 毛玻璃卡片 */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.3s cubic-bezier(0.2,0.9,0.1,1), box-shadow 0.3s ease;
}
.glass-card:hover {
  box-shadow: 0 30px 50px -18px rgba(0,20,40,0.25);
  transform: translateY(-4px) scale(1.01);
}

/* 布局通用 */
header, nav, main, footer { width: 100%; }
.section { padding: 80px 0; }
.section-title {
  font-size: 2.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
  position: relative;
  display: inline-block;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-light), var(--accent));
  border-radius: 4px;
  margin-top: 12px;
}
.grid-2, .grid-3, .grid-4 { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); }
img, svg { display: block; max-width: 100%; height: auto; }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: #fff;
  padding: 14px 32px;
  border-radius: 60px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.25s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(59,130,246,0.3);
}
.btn:hover {
  background: linear-gradient(135deg, var(--brand-light), var(--brand));
  transform: scale(0.97) translateY(-1px);
  box-shadow: 0 8px 25px rgba(59,130,246,0.4);
}
.btn:active { transform: scale(0.94); }

/* 导航 */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  height: 68px;
}
.logo {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--brand), var(--brand-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a {
  text-decoration: none;
  color: var(--text2);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-light), var(--accent));
  transition: width 0.3s cubic-bezier(0.2,0.9,0.1,1);
  border-radius: 2px;
}
.nav-links a:hover { color: var(--brand); }
.nav-links a:hover::after { width: 100%; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.dark-toggle, .menu-toggle, .search-btn {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}
.dark-toggle:hover, .menu-toggle:hover, .search-btn:hover {
  background: var(--border);
  transform: scale(1.1);
}
.menu-toggle { display: none; }
.mobile-nav {
  display: none;
  background: var(--surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 0 0 28px 28px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.mobile-nav.open {
  display: block;
  position: absolute;
  top: 68px;
  left: 0;
  width: 100%;
  z-index: 99;
  animation: slideDown 0.3s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.mobile-nav ul { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.mobile-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 1.1rem;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}
.mobile-nav a:hover { color: var(--brand); }

/* Hero 区域 */
.hero {
  padding: 100px 0 80px;
  background: var(--grad);
  overflow: hidden;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 40%, var(--glow) 0%, transparent 60%);
  animation: heroGlow 8s ease-in-out infinite alternate;
}
@keyframes heroGlow {
  0% { transform: translate(0, 0); }
  100% { transform: translate(10%, 10%); }
}
.hero-banner { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-text { flex: 1 1 400px; }
.hero-text h1 {
  font-size: 3.8rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand), var(--brand-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-text p { font-size: 1.2rem; color: var(--text2); max-width: 520px; margin-bottom: 32px; line-height: 1.7; }
.hero-visual { flex: 1 1 360px; display: flex; justify-content: center; }
.hero-visual svg {
  width: 100%;
  max-width: 480px;
  height: auto;
  filter: drop-shadow(0 20px 30px var(--glow));
  transition: transform 0.5s ease;
}
.hero-visual svg:hover { transform: scale(1.03) rotate(-2deg); }

/* 轮播 */
.carousel {
  position: relative;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--border);
}
.carousel-slide {
  display: none;
  padding: 40px;
  text-align: center;
}
.carousel-slide.active { display: block; animation: fade 0.6s ease; }
@keyframes fade { from { opacity: 0.2; transform: scale(0.98); } to { opacity: 1; transform: scale(1); } }
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--glass);
  border: none;
  color: var(--text);
  font-size: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 48px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s, transform 0.2s;
}
.carousel-btn:hover { background: var(--brand-light); color: white; transform: translateY(-50%) scale(1.1); }
.carousel-btn.prev { left: 12px; }
.carousel-btn.next { right: 12px; }

/* 统计数字 */
.stat-grid { display: flex; flex-wrap: wrap; gap: 40px; justify-content: center; }
.stat-item { text-align: center; min-width: 140px; }
.stat-number { font-size: 3.2rem; font-weight: 700; color: var(--brand); line-height: 1.2; }
.stat-label { color: var(--text2); margin-top: 4px; font-size: 1rem; }

/* FAQ 折叠 */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
  transition: background 0.2s;
}
.faq-item:hover { background: rgba(59,130,246,0.03); }
.faq-question {
  display: flex;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 500;
  font-size: 1.1rem;
  user-select: none;
}
.faq-question span { transition: transform 0.3s; }
.faq-item.open .faq-question span { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.2,0.9,0.1,1), padding 0.3s ease;
  padding-top: 0;
  color: var(--text2);
}
.faq-item.open .faq-answer { max-height: 300px; padding-top: 16px; }

/* Footer */
.footer {
  background: linear-gradient(135deg, var(--brand-dark) 0%, #0b1a2f 100%);
  color: #ccd9f0;
  padding: 60px 0 30px;
  border-radius: 48px 48px 0 0;
  margin-top: 40px;
}
.footer a { color: #b0c7f0; text-decoration: none; transition: color 0.2s; }
.footer a:hover { color: white; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 40px; }
.footer h4 { font-size: 1.1rem; margin-bottom: 12px; color: #fff; }

/* 搜索覆盖层 */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 200;
  display: none;
  justify-content: center;
  align-items: flex-start;
  padding-top: 15vh;
}
.search-overlay.open { display: flex; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.search-box {
  background: var(--surface);
  padding: 28px;
  border-radius: 48px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 40px 80px rgba(0,0,0,0.3);
  border: 1px solid var(--border);
}
.search-box input {
  width: 100%;
  padding: 18px 24px;
  border: 2px solid transparent;
  border-radius: 60px;
  background: var(--bg);
  font-size: 1.1rem;
  outline: none;
  color: var(--text);
  transition: border-color 0.2s;
}
.search-box input:focus { border-color: var(--brand-light); }
.search-box input::placeholder { color: var(--text2); }

/* 响应式 */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .menu-toggle { display: flex; }
  .hero-text h1 { font-size: 2.6rem; }
  .section-title { font-size: 1.8rem; }
  .hero { padding: 80px 0 60px; }
  .stat-number { font-size: 2.4rem; }
  .footer-grid { gap: 24px; }
}
@media (max-width: 480px) {
  .hero { padding: 60px 0 40px; }
  .hero-text h1 { font-size: 2rem; }
  .section-title { font-size: 1.5rem; }
  .container { padding: 0 16px; }
  .btn { padding: 12px 24px; font-size: 0.9rem; }
  .stat-number { font-size: 2rem; }
  .carousel-slide { padding: 24px; }
}

/* 滚动动画 */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.2,0.9,0.1,1), transform 0.8s cubic-bezier(0.2,0.9,0.1,1);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* 面包屑 */
.breadcrumb {
  display: flex;
  gap: 8px;
  padding: 16px 0;
  font-size: 0.9rem;
  color: var(--text2);
}
.breadcrumb a { color: var(--brand); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* 标签 */
.tag {
  display: inline-block;
  background: linear-gradient(135deg, var(--brand-light), var(--brand));
  color: white;
  border-radius: 40px;
  padding: 6px 20px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: transform 0.2s;
}
.tag:hover { transform: scale(1.05); }

/* 返回顶部 */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 48px;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: white;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  display: none;
  z-index: 50;
  transition: transform 0.2s, box-shadow 0.2s;
}
.back-to-top.show { display: block; animation: fadeIn 0.3s; }
.back-to-top:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0,0,0,0.3); }

/* 额外细节 */
article h3, .glass-card h3 { margin-bottom: 8px; color: var(--text); }
.glass-card p { color: var(--text2); }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-light); }
::selection { background: var(--brand-light); color: white; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--brand-light); border-radius: 4px; }