/* 昌如科技官网样式 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;800&display=swap');

/* ========== 基础重置与全局样式 ========== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, video, canvas, svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

ul, ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
}

/* ========== 工具类 ========== */
.antialiased {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.text-slate-800 { color: #1e293b; }
.text-slate-900 { color: #0f172a; }
.text-slate-600 { color: #475569; }
.text-slate-500 { color: #64748b; }
.text-slate-400 { color: #94a3b8; }
.text-slate-300 { color: #cbd5e1; }
.text-indigo-600 { color: #4f46e5; }
.text-indigo-700 { color: #4338ca; }
.text-indigo-500 { color: #6366f1; }
.text-indigo-400 { color: #818cf8; }
.text-indigo-200 { color: #c7d2fe; }
.text-blue-600 { color: #2563eb; }
.text-blue-500 { color: #3b82f6; }
.text-blue-400 { color: #60a5fa; }
.text-purple-600 { color: #9333ea; }
.text-purple-400 { color: #c084fc; }
.text-white { color: #fff; }
.text-transparent { color: transparent; }

.bg-white { background-color: #fff; }
.bg-slate-50 { background-color: #f8fafc; }
.bg-slate-100 { background-color: #f1f5f9; }
.bg-slate-200 { background-color: #e2e8f0; }
.bg-slate-700 { background-color: #334155; }
.bg-slate-800 { background-color: #1e293b; }
.bg-slate-900 { background-color: #0f172a; }
.bg-slate-950 { background-color: #020617; }
.bg-indigo-50 { background-color: #eef2ff; }
.bg-indigo-200 { background-color: #c7d2fe; }
.bg-indigo-500 { background-color: #6366f1; }
.bg-indigo-600 { background-color: #4f46e5; }
.bg-blue-100 { background-color: #dbeafe; }
.bg-purple-200 { background-color: #e9d5ff; }

/* ========== 布局 ========== */
.max-w-7xl { max-width: 80rem; margin-left: auto; margin-right: auto; }
.max-w-4xl { max-width: 56rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-2xl { max-width: 42rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

.flex { display: flex; }
.inline-block { display: inline-block; }
.block { display: block; }
.grid { display: grid; }
.hidden { display: none; }

.flex-col { flex-direction: column; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.inset-0 { inset: 0; }
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }

.w-full { width: 100%; }
.w-20 { width: 5rem; }
.w-14 { width: 3.5rem; }
.w-10 { width: 2.5rem; }
.w-8 { width: 2rem; }
.h-20 { height: 5rem; }
.h-48 { height: 12rem; }
.h-14 { height: 3.5rem; }
.h-10 { height: 2.5rem; }
.h-1 { height: 0.25rem; }
.h-40 { height: 10rem; }
.w-40 { width: 10rem; }
.min-h-screen { min-height: 100vh; }

.overflow-hidden { overflow: hidden; }

/* ========== 间距 ========== */
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-24 { padding-top: 6rem; padding-bottom: 6rem; }
.pt-8 { padding-top: 2rem; }
.pt-20 { padding-top: 5rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pb-4 { padding-bottom: 1rem; }
.pl-10 { padding-left: 2.5rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-16 { margin-bottom: 4rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 0.75rem; }
.mr-4 { margin-right: 1rem; }
.ml-1 { margin-left: 0.25rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.-ml-5 { margin-left: -1.25rem; }
.-right-10 { right: -2.5rem; }
.-top-10 { top: -2.5rem; }
.-top-6 { top: -1.5rem; }
.right-6 { right: 1.5rem; }
.mt-0\.5 { margin-top: 0.125rem; }

.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }
.space-x-4 > :not(:first-child) { margin-left: 1rem; }
.space-x-8 > :not(:first-child) { margin-left: 2rem; }
.space-y-2 > :not(:first-child) { margin-top: 0.5rem; }
.space-y-3 > :not(:first-child) { margin-top: 0.75rem; }
.space-y-4 > :not(:first-child) { margin-top: 1rem; }
.space-y-6 > :not(:first-child) { margin-top: 1.5rem; }

/* ========== 排版 ========== */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wide { letter-spacing: 0.025em; }
.text-center { text-align: center; }
.text-left { text-align: left; }

/* ========== 边框与圆角 ========== */
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

.border { border-width: 1px; border-style: solid; }
.border-4 { border-width: 4px; border-style: solid; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.border-t { border-top-width: 1px; border-top-style: solid; }

.border-slate-100 { border-color: #f1f5f9; }
.border-slate-200 { border-color: #e2e8f0; }
.border-slate-700 { border-color: #334155; }
.border-slate-800 { border-color: #1e293b; }
.border-indigo-100 { border-color: #e0e7ff; }
.border-indigo-200 { border-color: #c7d2fe; }
.border-indigo-600 { border-color: #4f46e5; }
.border-blue-500 { border-color: #3b82f6; }
.border-indigo-400 { border-color: #818cf8; }
.border-purple-500 { border-color: #a855f7; }

/* ========== 阴影 ========== */
.shadow-sm { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
.shadow { box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); }
.shadow-indigo-200 { box-shadow: 0 10px 15px -3px rgba(199, 210, 254, 0.6), 0 4px 6px -4px rgba(199, 210, 254, 0.4); }

/* ========== 渐变 ========== */
.bg-gradient-to-b { background-image: linear-gradient(to bottom, var(--tw-gradient-stops, #f1f5f9, #fff)); }
.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-stops)); }
.bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)); }
.bg-clip-text { -webkit-background-clip: text; background-clip: text; }

/* 具名渐变 */
.gradient-orange { background: linear-gradient(to bottom right, #fb923c, #ea580c); }
.gradient-green { background: linear-gradient(to bottom right, #22c55e, #0f766e); }
.gradient-purple { background: linear-gradient(to bottom right, #9333ea, #3730a3); }
.gradient-hero-text { background: linear-gradient(to right, #4f46e5, #9333ea); }

/* Hero 渐变文字 */
.hero-gradient-text {
    background: linear-gradient(to right, #4f46e5, #9333ea);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Hero 渐变背景 */
#home { background: linear-gradient(to bottom, #f1f5f9, #fff); }

/* ========== 透明度与滤镜 ========== */
.opacity-50 { opacity: 0.5; }
.opacity-80 { opacity: 0.8; }
.opacity-90 { opacity: 0.9; }
.blur-3xl { filter: blur(64px); }

/* ========== 过渡动画 ========== */
.transition {
    transition-property: color, background-color, border-color, box-shadow, transform, opacity;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}
.duration-300 { transition-duration: 300ms; }

/* ========== 组件样式 ========== */

/* 毛玻璃导航面板 */
.glass-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

/* 导航链接 */
.nav-link {
    transition: color 0.3s;
    position: relative;
}
.nav-link:hover,
.nav-link.active {
    color: #4f46e5;
    font-weight: 600;
}

/* Hero 粒子画布 */
#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.6;
}

/* 卡片悬浮效果 */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 解决方案标签按钮 */
.tab-btn {
    transition: all 0.3s ease;
    cursor: pointer;
}
.tab-btn.active {
    background-color: #4f46e5;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4);
}

/* 图表容器 */
.chart-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    height: 350px;
    max-height: 400px;
    background: #ffffff;
    border-radius: 0.75rem;
    padding: 1rem;
}

/* 案例卡片渐变覆盖层 */
.group .absolute.inset-0 {
    transition: opacity 0.3s;
}

/* 时间线伪元素 */
.before\:absolute::before { content: ''; position: absolute; }
.before\:inset-0::before { inset: 0; }
.before\:ml-5::before { margin-left: 1.25rem; }
.before\:h-full::before { height: 100%; }
.before\:w-0\.5::before { width: 0.125rem; }
.before\:-translate-x-px::before { transform: translateX(-1px); }
.before\:bg-gradient-to-b::before { background-image: linear-gradient(to bottom, #6366f1, #1e293b); }

/* 网格列 */
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.col-span-2 { grid-column: span 2 / span 2; }

/* ========== 悬浮状态 ========== */
.hover\:bg-indigo-700:hover { background-color: #4338ca; }
.hover\:bg-indigo-600:hover { background-color: #4f46e5; }
.hover\:bg-indigo-50:hover { background-color: #eef2ff; }
.hover\:bg-slate-800:hover { background-color: #1e293b; }
.hover\:bg-slate-100:hover { background-color: #f1f5f9; }
.hover\:bg-slate-50:hover { background-color: #f8fafc; }
.hover\:text-white:hover { color: #fff; }
.hover\:text-indigo-800:hover { color: #3730a3; }
.hover\:text-purple-800:hover { color: #6b21a8; }
.hover\:shadow-xl:hover { box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); }
.hover\:border-indigo-200:hover { border-color: #c7d2fe; }
.hover\:border-purple-200:hover { border-color: #e9d5ff; }

/* ========== 响应式 ========== */
@media (min-width: 640px) {
    .sm\:flex-row { flex-direction: row; }
    .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
}

@media (min-width: 768px) {
    .md\:flex { display: flex; }
    .md\:block { display: block; }
    .md\:hidden { display: none; }
    .md\:flex-row { flex-direction: row; }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:w-1\/2 { width: 50%; }
    .md\:w-\[45\%\] { width: 45%; }
    .md\:ml-auto { margin-left: auto; }
    .md\:ml-0 { margin-left: 0; }
    .md\:mt-0 { margin-top: 0; }
    .md\:mb-0 { margin-bottom: 0; }
    .md\:p-8 { padding: 2rem; }
    .md\:pl-0 { padding-left: 0; }
    .md\:text-left { text-align: left; }
    .md\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
    .md\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
    .md\:text-7xl { font-size: 4.5rem; line-height: 1; }
    .md\:justify-start { justify-content: flex-start; }
    .md\:justify-end { justify-content: flex-end; }
    .md\:-right-14 { right: -3.5rem; }
    .md\:-left-14 { left: -3.5rem; }
    .md\:left-auto { left: auto; }
    .md\:before\:mx-auto::before { margin-left: auto; margin-right: auto; }
    .md\:before\:translate-x-0::before { transform: translateX(0); }
}

@media (min-width: 1024px) {
    .lg\:flex-row { flex-direction: row; }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\:w-1\/3 { width: 33.333333%; }
    .lg\:w-2\/3 { width: 66.666667%; }
    .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
}

@media (min-width: 768px) {
    .chart-container { height: 400px; }
}

/* ========== FAQ 手风琴 ========== */
.faq-toggle {
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
    transition: background-color 0.2s;
}
.faq-toggle:hover {
    background-color: #f8fafc;
}
.faq-item {
    transition: box-shadow 0.3s;
}
.faq-item.open {
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
    border-color: #c7d2fe;
}
.faq-answer {
    padding: 0 1.5rem 1.25rem 1.5rem;
    border-top: 1px solid #f1f5f9;
    margin-top: 0;
    padding-top: 1rem;
}

/* ========== 打印样式 ========== */
@media print {
    nav, #hero-canvas, .tab-btn { display: none; }
    section { page-break-inside: avoid; }
}
