/* style.css */
/* 深圳丁卯信息技术有限公司样式表 */

/* 定义字体 */
@font-face {
    font-family: 'CustomFont';
    src: local('PingFang SC'), local('Microsoft YaHei'), local('Arial');
    font-weight: normal;
    font-style: normal;
}

:root {
    /* 颜色方案 */
    --primary: #2563eb;      /* 科技蓝 - 主色调 */
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --secondary: #10b981;    /* 成功绿 */
    --accent: #8b5cf6;       /* 创新紫 */
    --warning: #f59e0b;      /* 警示橙 */
    --danger: #ef4444;       /* 错误红 */
    --dark: #1f2937;         /* 深灰色 */
    --light: #f9fafb;        /* 浅灰色 */
    --gray: #6b7280;         /* 中性灰 */
    --white: #ffffff;
    
    /* 字体大小 - 响应式系统 (已调小) */
    --text-xs: 0.75rem;      /* 12px */
    --text-sm: 0.875rem;     /* 14px */
    --text-base: 0.9375rem;  /* 15px - 原16px调小 */
    --text-lg: 1.0625rem;    /* 17px - 原18px调小 */
    --text-xl: 1.1875rem;    /* 19px - 原20px调小 */
    --text-2xl: 1.375rem;    /* 22px - 原24px调小 */
    --text-3xl: 1.625rem;    /* 26px - 原30px调小 */
    --text-4xl: 1.875rem;    /* 30px - 原36px调小 */
    --text-5xl: 2.25rem;     /* 36px - 原48px调小 */
    
    /* 字间距 */
    --letter-spacing-tight: -0.025em;
    --letter-spacing-normal: 0;
    --letter-spacing-wide: 0.025em;
    --letter-spacing-wider: 0.05em;
    
    /* 行高 */
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.7;
    
    /* 间距系统 */
    --space-xs: 0.25rem;     /* 4px */
    --space-sm: 0.5rem;      /* 8px */
    --space-md: 1rem;        /* 16px */
    --space-lg: 1.5rem;      /* 24px */
    --space-xl: 2rem;        /* 32px */
    --space-2xl: 3rem;       /* 48px */
    --space-3xl: 4rem;       /* 64px */
    
    /* 阴影系统 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* 圆角系统 */
    --radius-sm: 0.25rem;    /* 4px */
    --radius-md: 0.5rem;     /* 8px */
    --radius-lg: 0.75rem;    /* 12px */
    --radius-xl: 1rem;       /* 16px */
    --radius-full: 9999px;
    
    /* 过渡动画 */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'CustomFont', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    font-size: var(--text-base);
    line-height: var(--line-height-relaxed);
    color: var(--dark);
    background-color: var(--white);
    overflow-x: hidden;
    letter-spacing: var(--letter-spacing-normal);
}

/* 响应式字体大小调整 */
@media (max-width: 768px) {
    :root {
        --text-5xl: 1.875rem;   /* 30px */
        --text-4xl: 1.625rem;   /* 26px */
        --text-3xl: 1.375rem;   /* 22px */
        --text-2xl: 1.1875rem;  /* 19px */
        --text-xl: 1.0625rem;   /* 17px */
        --text-lg: 1rem;        /* 16px */
        --text-base: 0.9375rem; /* 15px */
    }
    body {
        letter-spacing: var(--letter-spacing-normal);
    }
}

/* 容器系统 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

@media (min-width: 640px) {
    .container { padding: 0 var(--space-lg); }
}

@media (min-width: 1024px) {
    .container { padding: 0 var(--space-xl); }
}

/* 排版系统 */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: var(--line-height-tight);
    margin-bottom: var(--space-md);
    letter-spacing: var(--letter-spacing-tight);
}

h1 {
    font-size: var(--text-5xl);
}

h2 {
    font-size: var(--text-4xl);
}

h3 {
    font-size: var(--text-3xl);
}

h4 {
    font-size: var(--text-2xl);
}

h5 {
    font-size: var(--text-xl);
    letter-spacing: var(--letter-spacing-normal);
}

h6 {
    font-size: var(--text-lg);
    letter-spacing: var(--letter-spacing-normal);
}

p {
    font-size: var(--text-base);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--space-md);
    color: var(--gray);
    letter-spacing: var(--letter-spacing-normal);
}

.small-text {
    font-size: var(--text-sm);
    letter-spacing: var(--letter-spacing-normal);
}

/* 链接样式 */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
    letter-spacing: inherit;
}

a:hover {
    color: var(--primary-dark);
}

/* 按钮系统 */
.btn {
    display: inline-block;
    padding: var(--space-sm) var(--space-xl);
    font-size: var(--text-base);
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    user-select: none;
    white-space: nowrap;
    letter-spacing: var(--letter-spacing-wide);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background-color: #0da271;
}

.btn-outline {
    background-color: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* 卡片系统 */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--space-xl);
    transition: all var(--transition-base);
    height: 100%;
    letter-spacing: var(--letter-spacing-normal);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* 网格系统 */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 calc(-1 * var(--space-sm));
}

.col {
    flex: 1 0 100%;
    padding: var(--space-sm);
}

@media (min-width: 640px) {
    .col-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (min-width: 768px) {
    .col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (min-width: 1024px) {
    .col-lg-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
    .col-lg-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
    .col-lg-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    padding: var(--space-sm) 0;
    transition: all var(--transition-base);
}

.navbar.scrolled {
    padding: var(--space-xs) 0;
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--dark);
    text-decoration: none;
    letter-spacing: var(--letter-spacing-normal);
}

.navbar-brand span {
    color: var(--primary);
}

.navbar-logo {
    height: 40px;
    margin-right: var(--space-sm);
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: var(--text-xl);
    color: var(--dark);
    cursor: pointer;
    padding: var(--space-xs);
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-item {
    margin-left: var(--space-lg);
}

.nav-link {
    font-size: var(--text-base);
    font-weight: 500;
    color: var(--dark);
    text-decoration: none;
    padding: var(--space-xs) 0;
    position: relative;
    transition: color var(--transition-fast);
    letter-spacing: var(--letter-spacing-normal);
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition-base);
}

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

.nav-link.active {
    color: var(--primary);
}

.nav-link.active::after {
    width: 100%;
}

/* 响应式导航栏 */
@media (max-width: 768px) {
    .navbar-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 60px;
        left: -100%;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: center;
        transition: var(--transition-base);
        box-shadow: var(--shadow-lg);
        padding: var(--space-xl) 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-item {
        margin: var(--space-sm) 0;
    }
}

/* Hero区域 */
.hero {
    padding: calc(var(--space-3xl) * 2) 0 var(--space-3xl);
    background: linear-gradient(135deg, #f8fafc 0%, #f0f5ff 50%, #e6f0ff 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%232563eb' fill-opacity='0.1' d='M45,-78.8C58.4,-70.3,69.4,-58.4,74.6,-44.7C79.8,-31,79.1,-15.5,77.3,-1.3C75.5,13,72.5,25.9,65.5,36.4C58.5,46.8,47.5,54.8,35.6,60.6C23.7,66.4,11.8,69.9,-1,71.7C-13.8,73.5,-27.6,73.6,-39,67.7C-50.4,61.8,-59.4,50,-67.6,37.9C-75.8,25.7,-83.2,13.3,-83.9,0.5C-84.6,-12.3,-78.6,-24.6,-70.3,-34.4C-62,-44.2,-51.4,-51.6,-39.4,-60.6C-27.4,-69.6,-13.7,-80.1,1,-81.8C15.7,-83.5,31.4,-76.4,45,-78.8Z' transform='translate(100 100)' /%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right center;
    background-size: contain;
    opacity: 0.5;
}

@media (max-width: 768px) {
    .hero::before {
        display: none;
    }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: var(--text-5xl);
    line-height: 1.1;
    margin-bottom: var(--space-lg);
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: var(--letter-spacing-tight);
}

.hero-subtitle {
    font-size: var(--text-lg);
    color: var(--gray);
    margin-bottom: var(--space-xl);
    max-width: 600px;
    letter-spacing: var(--letter-spacing-normal);
}

.hero-buttons {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .hero {
        padding: calc(var(--space-2xl) * 2) 0 var(--space-2xl);
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .hero-title {
        font-size: var(--text-4xl);
    }
    
    .hero-subtitle {
        font-size: var(--text-base);
    }
}

/* 服务区域 */
.section {
    padding: var(--space-3xl) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.section-title h2 {
    position: relative;
    display: inline-block;
    padding-bottom: var(--space-sm);
    margin-bottom: var(--space-md);
    letter-spacing: var(--letter-spacing-tight);
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: var(--radius-full);
}

.section-subtitle {
    max-width: 600px;
    margin: 0 auto var(--space-xl);
    text-align: center;
    color: var(--gray);
    font-size: var(--text-lg);
    letter-spacing: var(--letter-spacing-normal);
}

/* 服务卡片 */
.service-card {
    text-align: center;
    border-radius: var(--radius-xl);
    overflow: hidden;
    height: 100%;
}

.service-icon {
    font-size: var(--text-3xl);
    color: var(--primary);
    margin-bottom: var(--space-md);
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-lg);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-icon i {
    font-size: var(--text-2xl);
}

.service-title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-sm);
    color: var(--dark);
    letter-spacing: var(--letter-spacing-normal);
}

.service-description {
    font-size: var(--text-base);
    color: var(--gray);
    line-height: var(--line-height-relaxed);
    letter-spacing: var(--letter-spacing-normal);
}

/* 项目卡片 */
.project-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    position: relative;
    letter-spacing: var(--letter-spacing-normal);
}

.project-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    transition: transform var(--transition-base);
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(37, 99, 235, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base);
    border-radius: var(--radius-lg);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-content {
    padding: var(--space-md);
    background: var(--white);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.project-content h4 {
    font-size: var(--text-lg);
    letter-spacing: var(--letter-spacing-normal);
}

.project-content p {
    font-size: var(--text-sm);
    line-height: var(--line-height-normal);
}

/* 客户评价 */
.testimonial-card {
    padding: var(--space-xl);
    background: var(--white);
    border-radius: var(--radius-lg);
    position: relative;
    letter-spacing: var(--letter-spacing-normal);
}

.testimonial-text {
    font-style: italic;
    color: var(--dark);
    margin-bottom: var(--space-lg);
    line-height: var(--line-height-relaxed);
    letter-spacing: var(--letter-spacing-normal);
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    object-fit: cover;
    margin-right: var(--space-md);
    border: 3px solid var(--primary);
}

.testimonial-info h4 {
    margin-bottom: var(--space-xs);
    font-size: var(--text-base);
    letter-spacing: var(--letter-spacing-normal);
}

.testimonial-info p {
    font-size: var(--text-sm);
    letter-spacing: var(--letter-spacing-normal);
}

/* 联系表单 */
.contact-form .form-group {
    margin-bottom: var(--space-lg);
}

.contact-form label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 500;
    color: var(--dark);
    letter-spacing: var(--letter-spacing-wide);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    transition: border-color var(--transition-fast);
    font-family: inherit;
    letter-spacing: var(--letter-spacing-normal);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* 页脚 */
.footer {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: var(--white);
    padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: var(--space-sm);
    letter-spacing: var(--letter-spacing-normal);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color var(--transition-fast);
    letter-spacing: var(--letter-spacing-normal);
}

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

.footer-bottom {
    margin-top: var(--space-2xl);
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--text-sm);
    letter-spacing: var(--letter-spacing-normal);
}

/* 加载动画 */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader {
    width: 50px;
    height: 50px;
    border: 4px solid var(--light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-lg);
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* 背景色类 */
.bg-light {
    background-color: var(--light) !important;
}

.bg-white {
    background-color: var(--white) !important;
}

/* 文字颜色类 */
.text-primary {
    color: var(--primary) !important;
}

.text-secondary {
    color: var(--secondary) !important;
}

.text-gray {
    color: var(--gray) !important;
}

.text-dark {
    color: var(--dark) !important;
}

.text-white {
    color: var(--white) !important;
}

/* 字间距类 */
.letter-spacing-tight {
    letter-spacing: var(--letter-spacing-tight) !important;
}

.letter-spacing-normal {
    letter-spacing: var(--letter-spacing-normal) !important;
}

.letter-spacing-wide {
    letter-spacing: var(--letter-spacing-wide) !important;
}

.letter-spacing-wider {
    letter-spacing: var(--letter-spacing-wider) !important;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .section {
        padding: var(--space-2xl) 0;
    }
    
    .back-to-top {
        bottom: var(--space-md);
        right: var(--space-md);
        width: 40px;
        height: 40px;
    }
    
    .service-title {
        font-size: var(--text-lg);
    }
    
    .section-subtitle {
        font-size: var(--text-base);
    }
}