/* 
   杭州富阳颛码软件开发工作室 - 全局样式系统
   Theme: 暗色/科技蓝为主的高级科技感风格
*/

:root {
  /* 颜色系统 */
  --bg-color: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  
  --primary-color: #58a6ff;
  --primary-glow: rgba(88, 166, 255, 0.4);
  --secondary-color: #79c0ff;
  --accent-color: #2ea043;
  
  --text-main: #c9d1d9;
  --text-muted: #8b949e;
  --text-heading: #ffffff;
  
  --border-color: #30363d;
  --glass-bg: rgba(22, 27, 34, 0.7);
  --glass-border: rgba(48, 54, 61, 0.5);

  /* 排版 */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--secondary-color);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-heading);
  font-weight: 700;
  line-height: 1.2;
}

ul {
  list-style: none;
}

/* ====== 导航栏 ====== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: background-color var(--transition-normal), backdrop-filter var(--transition-normal), border-bottom var(--transition-normal);
  padding: 20px 0;
  border-bottom: 1px solid transparent;
}

#navbar.scrolled {
  padding: 15px 0;
  background-color: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-heading);
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 8px;
  position: relative;
}

.logo-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background-color: var(--bg-color);
  border-radius: 2px;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width var(--transition-normal);
}

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

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-heading);
  transition: var(--transition-fast);
}

/* ====== 首屏 Hero ====== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px;
  overflow: hidden;
}

.hero-bg-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.5;
}

.primary-glow {
  width: 500px;
  height: 500px;
  background-color: var(--primary-glow);
  top: -100px;
  left: -100px;
}

.secondary-glow {
  width: 400px;
  height: 400px;
  background-color: rgba(46, 160, 67, 0.2);
  bottom: -50px;
  right: -100px;
}

.grid-pattern {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(var(--border-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.15;
}

.hero-content {
  max-width: 800px;
  z-index: 1;
}

.badge {
  display: inline-block;
  padding: 6px 16px;
  background-color: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  color: var(--primary-color);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
  backdrop-filter: blur(4px);
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  background: linear-gradient(to right, #ffffff, #8b949e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #000;
  border: none;
  box-shadow: 0 0 20px var(--primary-glow);
}

.btn-primary:hover {
  background-color: var(--secondary-color);
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 4px 25px var(--primary-glow);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-heading);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  border-color: var(--text-heading);
  background-color: rgba(255, 255, 255, 0.05);
}

/* ====== 通用 Section ====== */
.section {
  padding: 100px 24px;
}

.section-alt {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header h2 {
  font-size: 2.25rem;
  margin-bottom: 16px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ====== 服务范围 Services ====== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.service-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 40px 32px;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(88, 166, 255, 0.1), transparent 70%);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  width: 48px;
  height: 48px;
  color: var(--primary-color);
  margin-bottom: 24px;
}

.service-card h3 {
  font-size: 1.25rem;
  margin-bottom: 16px;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ====== 关于我们 About ====== */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-text h2 {
  font-size: 2.25rem;
  margin-bottom: 24px;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 1.05rem;
}

.about-features {
  margin-top: 32px;
}

.about-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--text-main);
}

.about-features span {
  color: var(--accent-color);
}

/* 编辑器视窗 */
.code-window {
  background-color: #010409;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.window-header {
  background-color: var(--bg-tertiary);
  padding: 12px 16px;
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
}

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

.dot.red { background-color: #ff5f56; }
.dot.yellow { background-color: #ffbd2e; }
.dot.green { background-color: #27c93f; }

.window-body {
  padding: 24px;
  overflow-x: auto;
}

.window-body pre {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.5;
}

.keyword { color: #ff7b72; }
.variable { color: #79c0ff; }
.property { color: #d2a8ff; }
.string { color: #a5d6ff; }
.boolean { color: #79c0ff; }
.function { color: #d2a8ff; }

/* ====== 联系我们 Contact ====== */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  text-align: center;
}

.contact-item {
  background-color: var(--glass-bg);
  border: 1px solid var(--border-color);
  padding: 48px 24px;
  border-radius: 16px;
  transition: all var(--transition-normal);
}

.contact-item:hover {
  background-color: var(--bg-tertiary);
  border-color: var(--primary-color);
}

.contact-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.contact-item h4 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.contact-item p, .contact-item a {
  color: var(--text-muted);
}

/* ====== 页脚 Footer ====== */
.footer {
  background-color: var(--bg-color);
  border-top: 1px solid var(--border-color);
  padding: 40px 24px;
  margin-top: 40px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.legal-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.legal-links a {
  color: var(--text-muted);
}

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

.divider {
  color: var(--border-color);
}

/* ====== 动画与交互 ====== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ====== 响应式 ====== */
@media (max-width: 992px) {
  .about-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 24px;
    gap: 24px;
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: clip-path var(--transition-normal);
  }

  .nav-links.active {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }

  .mobile-menu-btn {
    display: flex;
  }

  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero-actions {
    flex-direction: column;
  }
  
  .section {
    padding: 60px 24px;
  }
}
