/**
 * 原诚通科技官网 - Portal风格设计系统
 * 科技蓝色调 · 专业IC贸易 · 现代感
 */

/* ===== 全局色彩变量 ===== */
:root {
  --color-bg-warm: #f0f4fb;
  --color-bg-warm-alt: #e4ecf7;
  --color-bg-white: #ffffff;
  --color-text-heading: #0f172a;
  --color-text-body: #475569;
  --color-text-muted: #94a3b8;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-accent-light: #dbeafe;
  --color-accent-bg: #eff6ff;
  --color-border: #d8e2f0;
  --color-card-bg: #ffffff;
  --color-dark-section: #0c1929;
  --color-success: #059669;
  --color-success-bg: #ecfdf5;
  --color-warning: #d97706;
  --color-warning-bg: #fffbeb;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 16px rgba(15,23,42,0.06);
  --shadow-lg: 0 12px 40px rgba(15,23,42,0.08);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 999px;
}

/* ===== 基础重置 ===== */
* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  color: var(--color-text-body);
  -webkit-font-smoothing: antialiased;
}

/* ===== 背景工具类 ===== */
.bg-warm { background-color: var(--color-bg-warm); }
.bg-warm-alt { background-color: var(--color-bg-warm-alt); }

/* ===== 标题排版 ===== */
.heading-display {
  font-weight: 800;
  color: var(--color-text-heading);
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.heading-section {
  font-weight: 700;
  color: var(--color-text-heading);
  letter-spacing: -0.015em;
  line-height: 1.2;
}

/* ===== 正文排版 ===== */
.text-body {
  color: var(--color-text-body);
  line-height: 1.7;
}
.text-muted-warm {
  color: var(--color-text-muted);
}

/* ===== 渐变文字 ===== */
.text-gradient {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== 小标签 ===== */
.label-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--color-accent);
  background: var(--color-accent-bg);
  padding: 5px 16px;
  border-radius: var(--radius-full);
}

/* ===== Alpine.js cloak ===== */
[x-cloak] { display: none !important; }

/* ===== 导航链接 ===== */
.nav-link {
  color: var(--color-text-body);
  position: relative;
  padding-bottom: 4px;
}
.nav-link:hover {
  color: var(--color-accent);
}
.nav-link-active {
  color: var(--color-accent) !important;
  font-weight: 600;
}
.nav-link-active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
}

/* ===== 按钮系统 ===== */
.btn-portal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 30px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all 0.25s cubic-bezier(.4,0,.2,1);
  cursor: pointer;
  text-decoration: none;
  border: none;
  outline: none;
  position: relative;
  overflow: hidden;
}
.btn-portal::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
  pointer-events: none;
}
.btn-portal-dark {
  background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(30,64,175,0.25);
}
.btn-portal-dark:hover {
  background: linear-gradient(135deg, #172e4a 0%, #1d4ed8 100%);
  box-shadow: 0 4px 16px rgba(30,64,175,0.35);
  transform: translateY(-1px);
}
.btn-portal-accent {
  background: linear-gradient(135deg, var(--color-accent) 0%, #3b82f6 100%);
  color: #fff;
  box-shadow: 0 2px 12px rgba(37,99,235,0.3);
}
.btn-portal-accent:hover {
  background: linear-gradient(135deg, var(--color-accent-hover) 0%, #2563eb 100%);
  box-shadow: 0 6px 24px rgba(37,99,235,0.4);
  transform: translateY(-1px);
}
.btn-portal-outline {
  background: transparent;
  color: var(--color-text-heading);
  border: 2px solid var(--color-border);
}
.btn-portal-outline::after { display: none; }
.btn-portal-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-bg);
}
.btn-portal-ghost {
  background: transparent;
  color: var(--color-text-body);
  border: none;
  padding: 8px 0;
}
.btn-portal-ghost::after { display: none; }
.btn-portal-ghost:hover {
  color: var(--color-accent);
}
.btn-portal-white {
  background: #fff;
  color: var(--color-accent);
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}
.btn-portal-white:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.15);
  transform: translateY(-1px);
}

/* ===== 卡片系统 ===== */
.card-portal {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.35s cubic-bezier(.4,0,.2,1);
}
.card-portal:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: transparent;
}

/* 带顶部蓝色边框的卡片 */
.card-accent-top {
  border-top: 3px solid var(--color-accent);
}

/* 带图标的功能卡片 */
.card-feature {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: all 0.35s cubic-bezier(.4,0,.2,1);
  position: relative;
}
.card-feature:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--color-accent-light);
}
.card-feature:hover .card-feature-icon {
  background: var(--color-accent);
  color: #fff;
  transform: scale(1.05);
}

/* 功能卡片图标 */
.card-feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--color-accent-bg);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

/* 大号图标容器 */
.icon-box-lg {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  transition: all 0.3s ease;
}

/* ===== 统计数字 ===== */
.stat-number {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-number-white {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #fff;
}
.stat-label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-weight: 500;
  margin-top: 8px;
}

/* ===== Hero 渐变背景 ===== */
.hero-gradient {
  background: linear-gradient(135deg, #f0f4ff 0%, #e0e7ff 30%, #dbeafe 60%, #f0f9ff 100%);
  position: relative;
  overflow: hidden;
}
.hero-gradient::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(37,99,235,0.08) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-gradient::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(37,99,235,0.06) 0%, transparent 70%);
  border-radius: 50%;
}

/* ===== 表单输入框 ===== */
.input-portal {
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--color-text-heading);
  background: #fff;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  outline: none;
}
.input-portal:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.input-portal::placeholder {
  color: var(--color-text-muted);
}
textarea.input-portal {
  resize: none;
  min-height: 100px;
}

/* ===== 表格样式 ===== */
.table-portal {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
}
.table-portal thead {
  background: var(--color-bg-warm);
}
.table-portal th {
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-heading);
  text-align: left;
  border-bottom: 2px solid var(--color-border);
}
.table-portal td {
  padding: 14px 20px;
  font-size: 14px;
  color: var(--color-text-body);
  border-bottom: 1px solid var(--color-border);
}
.table-portal tbody tr:last-child td {
  border-bottom: none;
}
.table-portal tbody tr:hover {
  background: var(--color-accent-bg);
}

/* ===== 时间线 ===== */
.timeline-item {
  position: relative;
  padding-left: 36px;
  padding-bottom: 32px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 28px;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
}
.timeline-item:last-child::before {
  display: none;
}
.timeline-dot {
  position: absolute;
  left: 0;
  top: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 4px solid var(--color-accent-light);
  box-shadow: 0 0 0 4px #fff;
}

/* ===== 步骤编号 ===== */
.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}

/* ===== 产品截图容器 ===== */
.screenshot-frame {
  background: var(--color-bg-warm-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
}
.screenshot-frame img,
.screenshot-frame .screenshot-inner {
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* ===== 图片占位区域 ===== */
.img-placeholder {
  background: linear-gradient(135deg, var(--color-bg-warm-alt) 0%, #e0e7ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  font-size: 48px;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.img-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%232563eb' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ===== 分割线 ===== */
.divider-warm {
  border-color: var(--color-border);
}

/* ===== 特性网格图标 ===== */
.feature-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-accent);
}

/* ===== 暗色区块 ===== */
.section-dark {
  background: linear-gradient(135deg, #0c1929 0%, #0f2544 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.section-dark::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(37,99,235,0.12) 0%, transparent 70%);
  border-radius: 50%;
}
.section-dark .text-body {
  color: #94a3b8;
}

/* ===== 对勾列表 ===== */
.check-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  color: var(--color-text-body);
  font-size: 14px;
  line-height: 1.6;
}
.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-success-bg);
  color: var(--color-success);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== 悬浮徽章 ===== */
.badge-accent {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-accent);
  background: var(--color-accent-bg);
  border-radius: var(--radius-full);
}
.badge-success {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-success);
  background: var(--color-success-bg);
  border-radius: var(--radius-full);
}

/* ===== 分隔装饰 ===== */
.section-divider {
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #1d4ed8, #3b82f6);
  border-radius: 2px;
}

/* ===== FAQ 手风琴 ===== */
.faq-item {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.2s ease;
}
.faq-item:hover {
  border-color: var(--color-accent-light);
  box-shadow: var(--shadow-sm);
}

/* ===== 动画 ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
.animate-fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}
.animate-fade-in {
  animation: fadeIn 0.5s ease forwards;
}

/* ===== 响应式微调 ===== */
@media (max-width: 768px) {
  .heading-display {
    font-size: 28px !important;
  }
  .btn-portal {
    padding: 11px 22px;
    font-size: 13px;
  }
  .stat-number, .stat-number-white {
    font-size: 2.2rem;
  }
  .card-feature {
    padding: 24px 20px;
  }
  .card-feature-icon {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }
}