/* 凯瑞莱品牌官网 - 简约科技 高级质感 */

/* 鸿蒙字体 */
@font-face {
    font-family: 'HarmonyOS Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: local('HarmonyOS Sans'), local('PingFang SC'), local('Microsoft YaHei');
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'HarmonyOS Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: linear-gradient(180deg, #fafaf9 0%, #f5f5f4 100%);
    color: #292524;
    line-height: 1.6;
}

/* 容器 */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* 导航栏 - 玻璃态科技感 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(231, 229, 228, 0.3);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 8px 24px rgba(0, 0, 0, 0.03);
    z-index: 50;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.navbar-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #292524 0%, #1c1917 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.375rem;
    box-shadow: 0 4px 12px rgba(41, 37, 36, 0.2), 0 2px 4px rgba(41, 37, 36, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo:hover .logo-icon {
    box-shadow: 0 6px 16px rgba(41, 37, 36, 0.3), 0 2px 4px rgba(41, 37, 36, 0.15);
    transform: translateY(-2px);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 300;
    color: #292524;
    letter-spacing: 0.12em;
}

.nav-menu {
    display: none;
    gap: 2.5rem;
}

@media (min-width: 768px) {
    .nav-menu {
        display: flex;
    }
    .mobile-menu-btn {
        display: none;
    }
}

.nav-link {
    font-size: 0.9375rem;
    color: #78716c;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.5rem 0;
    position: relative;
    font-weight: 400;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    right: 50%;
    height: 2px;
    background: linear-gradient(90deg, #292524 0%, #44403c 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.nav-link:hover::before,
.nav-link.active::before {
    left: 0;
    right: 0;
    opacity: 1;
}

.nav-link:hover,
.nav-link.active {
    color: #292524;
    font-weight: 500;
}

.mobile-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: #292524;
    transition: transform 0.2s;
}

.mobile-menu-btn:active {
    transform: scale(0.95);
}

.mobile-menu {
    display: none;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-top: 1px solid #e7e5e4;
    padding: 1rem 1.5rem;
}

.mobile-menu.active {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-menu .nav-link {
    display: block;
    padding: 0.875rem 1.25rem;
    color: #57534e;
    border-radius: 12px;
    margin-bottom: 0.25rem;
}

.mobile-menu .nav-link:hover {
    background: linear-gradient(135deg, #fafaf9 0%, #f5f5f4 100%);
    color: #292524;
}

/* 页面内容区 */
.page-content {
    padding-top: 80px;
    min-height: calc(100vh - 80px);
}

/* Section通用样式 */
section {
    padding: 5rem 1.5rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h1,
.section-header h2 {
    font-size: 2.75rem;
    font-weight: 300;
    color: #292524;
    margin-bottom: 1rem;
    letter-spacing: 0.03em;
    line-height: 1.2;
}

.section-header p {
    color: #57534e;
    font-size: 1.125rem;
    line-height: 1.7;
}

/* 按钮 - 科技感升级 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.125rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, #292524 0%, #1c1917 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(41, 37, 36, 0.25), 0 2px 6px rgba(41, 37, 36, 0.15);
}

.btn-primary:hover {
    box-shadow: 0 8px 24px rgba(41, 37, 36, 0.35), 0 4px 8px rgba(41, 37, 36, 0.2);
    transform: translateY(-3px);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: linear-gradient(135deg, #f5f5f4 0%, #e7e5e4 100%);
    color: #57534e;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #e7e5e4 0%, #d6d3d1 100%);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
    color: #292524;
}

.btn-outline {
    background: transparent;
    color: #57534e;
    border: 2px solid #d6d3d1;
    box-shadow: none;
}

.btn-outline:hover {
    background: rgba(250, 250, 249, 0.8);
    border-color: #292524;
    color: #292524;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* 卡片 - 高级质感 */
.card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03), 0 8px 24px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(231, 229, 228, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.card:hover::before {
    left: 100%;
}

.card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06), 0 16px 48px rgba(0, 0, 0, 0.1);
    transform: translateY(-6px);
    border-color: rgba(231, 229, 228, 0.6);
}

/* 网格 */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Footer - 科技感 */
.footer {
    background: linear-gradient(180deg, #1c1917 0%, #0c0a09 100%);
    color: #a8a29e;
    padding: 3.5rem 1.5rem;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.footer-logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #44403c 0%, #292524 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.12), 0 4px 16px rgba(0, 0, 0, 0.2);
}

.footer-logo-text {
    font-size: 1.25rem;
    font-weight: 300;
    color: #e7e5e4;
    letter-spacing: 0.12em;
}

.footer-info {
    text-align: center;
}

@media (min-width: 768px) {
    .footer-info {
        text-align: right;
    }
}

.footer-info p {
    font-size: 0.875rem;
    line-height: 1.6;
}

/* 回到顶部按钮 - 科技感强化 */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 58px;
    height: 58px;
    background: linear-gradient(135deg, #292524 0%, #1c1917 100%);
    color: white;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(41, 37, 36, 0.3), 0 2px 8px rgba(41, 37, 36, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    z-index: 40;
}

.back-to-top::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(41, 37, 36, 0.3), rgba(28, 25, 23, 0.3));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.back-to-top:hover::before {
    opacity: 1;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.back-to-top:hover {
    box-shadow: 0 8px 32px rgba(41, 37, 36, 0.4), 0 4px 12px rgba(41, 37, 36, 0.25);
    transform: translateY(-5px);
}

.back-to-top:active {
    transform: translateY(-3px);
}

/* 加载动画 - 优化 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, #fafaf9 0%, #f5f5f4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s;
}

.loading-spinner {
    width: 56px;
    height: 56px;
    border: 3px solid #e7e5e4;
    border-top-color: #292524;
    border-radius: 50%;
    animation: spin 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

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

/* 自定义滚动条 - 科技感 */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f5f5f4;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #a8a29e 0%, #78716c 100%);
    border-radius: 6px;
    border: 2px solid #f5f5f4;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #78716c 0%, #57534e 100%);
}

/* 工具类 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-8 { margin-top: 4rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-8 { margin-bottom: 4rem; }

.hidden { display: none; }
.visible { display: block; }

/* 响应式工具 */
@media (max-width: 768px) {
    .hidden-mobile { display: none; }
    section { padding: 3rem 1rem; }
    .section-header h1,
    .section-header h2 { font-size: 2.25rem; }
}

/* 精致细节增强 */
.value-icon,
.contact-icon,
.ingredient-icon {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #fafaf9 0%, #f5f5f4 100%);
}

.value-card:hover .value-icon,
.contact-card:hover .contact-icon {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px) scale(1.05);
    background: linear-gradient(135deg, #ffffff 0%, #fafaf9 100%);
}

/* 输入框样式 - 科技感 */
input, textarea, select {
    font-family: inherit;
    border: 2px solid #e7e5e4;
    border-radius: 14px;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #292524;
    box-shadow: 0 0 0 4px rgba(41, 37, 36, 0.08), 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

/* 标签/徽章 - 优化 */
.badge, .tag {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #f5f5f4 0%, #e7e5e4 100%);
    color: #57534e;
    font-size: 0.875rem;
    border-radius: 24px;
    display: inline-block;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.badge:hover, .tag:hover {
    background: linear-gradient(135deg, #e7e5e4 0%, #d6d3d1 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 分隔线 - 科技感 */
hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(41, 37, 36, 0.1), transparent);
    margin: 3rem 0;
    position: relative;
}

hr::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #292524, #44403c);
    border-radius: 2px;
}

/* 图片容器 - 优化 */
.image-wrapper {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.4s ease;
}

.image-wrapper:hover {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15), 0 8px 16px rgba(0, 0, 0, 0.1);
    transform: scale(1.02);
}

/* 链接样式 */
a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 悬停效果增强 */
.hover-lift {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-6px);
}

/* 玻璃态效果增强 */
.glass-effect {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* 渐变文字效果 */
.gradient-text {
    background: linear-gradient(135deg, #292524 0%, #44403c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 微光效果 */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* 脉冲动画 */
.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* 淡入动画 */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 优化移动端体验 */
@media (max-width: 768px) {
    .btn {
        padding: 1rem 2rem;
        font-size: 0.9375rem;
    }
    
    .card {
        padding: 2rem;
        border-radius: 16px;
    }
    
    .back-to-top {
        width: 52px;
        height: 52px;
        bottom: 1.5rem;
        right: 1.5rem;
    }
}

/* 性能优化 */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

/* 深色模式准备（可选） */
@media (prefers-color-scheme: dark) {
    /* 可以在这里添加深色模式样式 */
}