/* ======================================== 全局变量与基础设置 ======================================== */ :root { /* 莫兰迪色系 - 苔绿色主题 */ --primary-color: #8A9B7E; --primary-light: #A8B89E; --primary-dark: #6B7D60; --primary-muted: #C5D1BE; /* 背景色 */ --bg-primary: #F5F5F2; --bg-secondary: #EDEDE8; --bg-card: #FFFFFF; /* 文字颜色 */ --text-primary: #3D3D3D; --text-secondary: #6B6B6B; --text-light: #999999; /* 阴影 */ --shadow-soft: 0 4px 20px rgba(138, 155, 126, 0.12); --shadow-medium: 0 8px 30px rgba(138, 155, 126, 0.18); --shadow-hover: 0 12px 40px rgba(138, 155, 126, 0.25); /* 间距 */ --spacing-xs: 0.5rem; --spacing-sm: 1rem; --spacing-md: 2rem; --spacing-lg: 3rem; --spacing-xl: 5rem; /* 圆角 */ --border-radius: 12px; /* 过渡 */ --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); } * { margin: 0; padding: 0; box-sizing: border-box; } html { scroll-behavior: smooth; font-size: 16px; } body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; background-color: var(--bg-primary); color: var(--text-primary); line-height: 1.8; overflow-x: hidden; } /* ======================================== 导航栏样式 ======================================== */ .navbar { position: fixed; top: 0; left: 0; right: 0; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); z-index: 1000; transition: var(--transition); } .nav-container { max-width: 1400px; margin: 0 auto; padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center; } .nav-logo { font-size: 1.25rem; font-weight: 600; color: var(--primary-color); letter-spacing: 1px; } .nav-menu { display: flex; list-style: none; gap: 2rem; } .nav-link { text-decoration: none; color: var(--text-secondary); font-size: 0.9rem; font-weight: 500; padding: 0.5rem 0; position: relative; transition: var(--transition); } .nav-link::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--primary-color); transition: var(--transition); } .nav-link:hover { color: var(--primary-color); } .nav-link:hover::after { width: 100%; } .hamburger { display: none; flex-direction: column; cursor: pointer; gap: 4px; } .hamburger span { width: 25px; height: 2px; background: var(--primary-color); transition: var(--transition); } /* ======================================== Hero区域 ======================================== */ .hero { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%); padding: 6rem 2rem 4rem; text-align: center; } .hero-content { max-width: 800px; } .hero-title { font-size: 3rem; font-weight: 700; color: var(--text-primary); margin-bottom: 1.5rem; letter-spacing: 2px; line-height: 1.3; } .hero-subtitle { font-size: 1.5rem; color: var(--primary-color); margin-bottom: 1rem; font-weight: 500; letter-spacing: 3px; } .hero-description { font-size: 1.1rem; color: var(--text-secondary); letter-spacing: 1px; } /* ======================================== 通用区块样式 ======================================== */ .section { padding: var(--spacing-xl) 2rem; } .section-alt { background-color: var(--bg-secondary); } .container { max-width: 1400px; margin: 0 auto; } .section-title { font-size: 2.5rem; font-weight: 600; color: var(--text-primary); text-align: center; margin-bottom: var(--spacing-lg); letter-spacing: 2px; position: relative; } .section-title::after { content: ''; display: block; width: 60px; height: 3px; background: var(--primary-color); margin: 1rem auto 0; border-radius: 2px; } /* ======================================== 卡片样式 ======================================== */ .card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: var(--spacing-md); margin-top: var(--spacing-md); } .card-grid.two-columns { grid-template-columns: repeat(auto-fit, minmax(500px, 1fr)); } .card { background: var(--bg-card); border-radius: var(--border-radius); overflow: hidden; box-shadow: var(--shadow-soft); transition: var(--transition); } .card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); } .card-image { width: 100%; height: 300px; overflow: hidden; } .card-image.wide { height: 400px; } .card-content { padding: var(--spacing-md); } .card-content h3 { font-size: 1.5rem; color: var(--text-primary); margin-bottom: var(--spacing-sm); font-weight: 600; } .card-content p { color: var(--text-secondary); line-height: 1.8; margin-bottom: var(--spacing-sm); } .single-card { max-width: 900px; margin: 0 auto; } .centered { text-align: center; } .large-text { font-size: 1.15rem; line-height: 2; margin-bottom: var(--spacing-md); } .project-info { margin-top: var(--spacing-lg); padding-top: var(--spacing-md); border-top: 1px solid var(--primary-muted); } .project-info p { margin-bottom: var(--spacing-xs); color: var(--text-secondary); } .mb-large { margin-bottom: var(--spacing-lg); } /* ======================================== 占位图样式 ======================================== */ .placeholder-img { width: 100%; height: 100%; background: linear-gradient(135deg, var(--primary-muted) 0%, var(--primary-light) 100%); display: flex; align-items: center; justify-content: center; color: var(--primary-dark); font-size: 1.2rem; font-weight: 500; letter-spacing: 1px; } .placeholder-img.tall { height: 500px; } /* ======================================== 画廊样式 ======================================== */ .gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--spacing-md); margin-top: var(--spacing-md); } .gallery-item.large { grid-column: span 2; grid-row: span 2; } .gallery-item .placeholder-img { height: 300px; border-radius: var(--border-radius); } .gallery-item.large .placeholder-img { height: 100%; min-height: 600px; } /* ======================================== 列表样式 ======================================== */ .info-list { list-style: none; margin-top: var(--spacing-sm); } .info-list li { padding: var(--spacing-xs) 0; color: var(--text-secondary); position: relative; padding-left: 1.5rem; } .info-list li::before { content: '•'; position: absolute; left: 0; color: var(--primary-color); font-weight: bold; } /* ======================================== 表格样式 ======================================== */ .data-table { width: 100%; border-collapse: collapse; margin-top: var(--spacing-sm); } .data-table thead { background: var(--primary-muted); } .data-table th { padding: 1rem; text-align: left; font-weight: 600; color: var(--text-primary); border-bottom: 2px solid var(--primary-color); } .data-table td { padding: 1rem; border-bottom: 1px solid var(--bg-secondary); color: var(--text-secondary); } .data-table tbody tr:hover { background: var(--bg-secondary); transition: var(--transition); } /* ======================================== 页脚样式 ======================================== */ .footer { background: var(--text-primary); color: var(--bg-primary); padding: var(--spacing-lg) 2rem; text-align: center; } .footer p { font-size: 0.9rem; letter-spacing: 1px; } /* ======================================== 响应式设计 ======================================== */ @media (max-width: 768px) { html { font-size: 14px; } .nav-menu { position: fixed; left: -100%; top: 70px; flex-direction: column; background: white; width: 100%; text-align: center; transition: var(--transition); box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05); padding: 2rem 0; gap: 0; } .nav-menu.active { left: 0; } .nav-menu li { margin: 1rem 0; } .hamburger { display: flex; } .hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); } .hamburger.active span:nth-child(2) { opacity: 0; } .hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); } .hero-title { font-size: 2rem; } .hero-subtitle { font-size: 1.2rem; } .section-title { font-size: 2rem; } .card-grid { grid-template-columns: 1fr; } .card-grid.two-columns { grid-template-columns: 1fr; } .gallery-item.large { grid-column: span 1; grid-row: span 1; } .gallery-item.large .placeholder-img { min-height: 300px; } .section { padding: var(--spacing-lg) 1rem; } } @media (max-width: 480px) { .hero-title { font-size: 1.75rem; } .nav-container { padding: 1rem; } .card-content { padding: var(--spacing-sm); } } /* ======================================== 动画效果 ======================================== */ @keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } } .card { animation: fadeInUp 0.6s ease-out; } .section-title { animation: fadeInUp 0.6s ease-out; } /* ======================================== 前期分析板块 - 8张图片统一格式(完整展示+白底) ======================================== */ .analysis-grid { /* 4列布局,确保图片上下底平齐 */ grid-template-columns: repeat(4, 1fr) !important; gap: var(--spacing-md); } .analysis-img { /* 固定高度,确保所有图片底部对齐 */ height: 280px; width: 100%; overflow: hidden; position: relative; background: #FFFFFF; /* 白色背景 */ display: flex; align-items: center; justify-content: center; } .analysis-img img { /* 关键:使用object-fit: contain确保图片完整展示,不裁剪 */ max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; /* 完整展示,允许白边 */ object-position: center; display: block; } .analysis-img .placeholder-text { /* 占位文字样式 */ width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--primary-dark); font-size: 1.1rem; font-weight: 500; letter-spacing: 1px; } /* 响应式:平板设备改为2列 */ @media (max-width: 1024px) { .analysis-grid { grid-template-columns: repeat(2, 1fr) !important; } .analysis-img { height: 300px; /* 平板端稍高一些 */ } } /* 响应式:手机设备改为1列 */ @media (max-width: 768px) { .analysis-grid { grid-template-columns: 1fr !important; } .analysis-img { height: 350px; /* 手机端更高 */ } }