/* ════════════════════════════════════════════════════
   无垠科技官网自定义样式
   遵循 UI/UX Pro Max 标准：
   - Government/B2B Healthcare → Accessible & Ethical + Minimalism
   - 消除 AI 味：减少装饰动画、增加信息密度、不对称布局
   - WCAG AA+ 对比度，44px 触摸目标，focus visible
   ════════════════════════════════════════════════════ */

/* ── 基础 ── */
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* ── 变量（消除魔法数字，语义化） ── */
:root {
  --ease-out: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 1px 3px oklch(47% 0.155 255 / 0.06), 0 4px 12px -2px oklch(47% 0.155 255 / 0.08);
  --shadow-elevated: 0 2px 6px oklch(47% 0.155 255 / 0.08), 0 8px 24px -4px oklch(47% 0.155 255 / 0.12);
}

/* ── 流式排版 ── */
.fluid-hero  {
  font-size: clamp(2rem, 4vw + 0.5rem, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.fluid-h2    {
  font-size: clamp(1.375rem, 2.5vw + 0.25rem, 1.75rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.fluid-h3    {
  font-size: clamp(1.25rem, 1.5vw + 0.5rem, 1.75rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

/* ── Hero 背景：减少装饰，更沉稳 ── */
.hero-bg {
  background:
    radial-gradient(ellipse 60% 50% at 65% 15%, oklch(42% 0.08 255 / 0.45), transparent),
    linear-gradient(160deg, oklch(22% 0.04 255) 0%, oklch(14% 0.02 255) 100%);
}
.hero-bg-2 {
  background:
    radial-gradient(ellipse 50% 40% at 30% 20%, oklch(48% 0.09 255 / 0.35), transparent),
    linear-gradient(160deg, oklch(28% 0.06 255) 0%, oklch(14% 0.02 255) 100%);
}
.hero-bg-3 {
  background:
    radial-gradient(ellipse 55% 45% at 50% 70%, oklch(50% 0.10 255 / 0.3), transparent),
    linear-gradient(160deg, oklch(22% 0.04 255) 0%, oklch(28% 0.06 255) 100%);
}

/* ── 微噪点纹理（替代生硬的 grid-overlay，更像真实材质） ── */
.texture-noise {
  position: relative;
}
.texture-noise::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
}

/* ── 卡片悬浮（克制：仅 border-color + shadow，少用 transform 位移） ── */
.card-hover {
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.card-hover:hover {
  border-color: oklch(55% 0.10 255 / 0.5);
  box-shadow: var(--shadow-elevated);
}

/* ── 表单聚焦 ── */
.form-input {
  transition: border-color 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out);
}
.form-input:focus {
  border-color: oklch(55% 0.14 255);
  box-shadow: 0 0 0 3px oklch(55% 0.14 255 / 0.12);
  outline: none;
}

/* ── 导航下划线 ── */
.nav-link { position: relative; }
.nav-link::after {
  content: ''; position: absolute; left: 0; bottom: -4px;
  width: 0; height: 2px;
  background: currentColor;
  transition: width 0.3s var(--ease-out);
}
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

/* ── 轮播过渡 ── */
.carousel-slide {
  opacity: 0;
  transition: opacity 0.8s var(--ease-smooth);
  position: absolute;
  inset: 0;
}
.carousel-slide.active {
  opacity: 1;
  z-index: 1;
}

/* 轮播图片背景：撑满容器 + 覆盖裁剪 + 渐变遮罩确保文字可读 */
.carousel-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  /* 用 will-change 提示浏览器提前合成层 */
  will-change: transform;
}
/* 图片上方的渐变遮罩，确保白字可读（即便是浅色图片） */
.carousel-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    oklch(14% 0.02 255 / 0.55) 0%,
    oklch(10% 0.01 255 / 0.35) 50%,
    oklch(14% 0.02 255 / 0.6) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* ── 滚动渐入（减少动画范围，只作用于可见元素） ── */
@keyframes revealUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-up {
  animation: revealUp 0.5s var(--ease-out) both;
}

/* ── 延迟 ── */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ── 滚动条 ── */
.ds-scroll::-webkit-scrollbar { width: 5px; }
.ds-scroll::-webkit-scrollbar-track { background: oklch(96% 0.005 255); }
.ds-scroll::-webkit-scrollbar-thumb {
  background: oklch(78% 0.06 255);
  border-radius: 2.5px;
}

/* ── 时间线 ── */
.timeline-item::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 28px;
  bottom: -24px;
  width: 2px;
  background: oklch(78% 0.06 255);
}
.timeline-item:last-child::before { display: none; }

/* ── 按钮 ── */
.btn-primary {
  transition: background-color 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out);
}
.btn-primary:hover {
  box-shadow: 0 4px 12px -2px oklch(47% 0.155 255 / 0.2);
}
.btn-primary:active { box-shadow: none; }

/* ── Focus ring（可访问性） ── */
*:focus-visible {
  outline: 2px solid oklch(55% 0.14 255);
  outline-offset: 2px;
}

/* ════════════════════════════════════════════════════
   Accessibility: Reduced Motion
   ════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .animate-fade-up { animation: none; opacity: 1; transform: none; }
}

/* ── 光学修正 ── */
.font-display { text-indent: -0.02em; }

/* ── 触摸目标 ── */
.icon-btn {
  position: relative;
  width: 24px; height: 24px;
}
.icon-btn::before {
  content: '';
  position: absolute;
  inset: -10px;
}

/* ── 间距工具类 ── */
.space-section { margin-top: clamp(3rem, 8vw, 7rem); }
.space-block   { margin-top: clamp(1.5rem, 4vw, 3rem); }
.space-element  { margin-top: clamp(0.75rem, 2vw, 1.5rem); }

/* ── 数字：tabular 对齐，更专业 ── */
.stat-number {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

/* ── 底线分隔（替代生硬的 border） ── */
.rule-subtle {
  border: none;
  border-top: 1px solid oklch(87% 0.005 255);
  margin: 0;
}

/* ════════════════════════════════════════════════════
   解决方案卡片（参考数字政通 solve 页效果）
   底部信息条 + hover 品牌色毛玻璃铺满整卡
   ════════════════════════════════════════════════════ */
.sol-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
}
.sol-card-img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  transition: transform 0.7s var(--ease-smooth);
}
.sol-card:hover .sol-card-img {
  transform: scale(1.08);
}
.sol-info {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 170px;
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  background: linear-gradient(to top, rgba(8,20,35,0.85) 0%, rgba(8,20,35,0.05) 100%);
  transition: height 0.45s var(--ease-out), background 0.45s var(--ease-out);
}
.sol-card:hover .sol-info {
  height: 100%;
  background: rgba(0, 88, 174, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.sol-title {
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
}
.sol-line {
  display: block;
  width: 40px;
  height: 2px;
  background: #fff;
  flex-shrink: 0;
  transition: width 0.5s var(--ease-out);
}
.sol-card:hover .sol-line {
  width: 100%;
}
.sol-desc {
  color: rgba(255,255,255,0.88);
  font-size: 14px;
  line-height: 1.7;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}
.sol-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: auto;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
}
.sol-card:hover .sol-desc,
.sol-card:hover .sol-actions {
  opacity: 1;
  transform: translateY(0);
}
.sol-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.sol-btn:hover { opacity: 0.85; }
.sol-btn-sub {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.75);
  font-size: 14px;
  font-weight: 500;
}
.sol-btn-sub:hover { color: #fff; }
@media (max-width: 1024px) {
  .sol-card-img { height: 320px; }
}
@media (max-width: 640px) {
  .sol-card-img { height: 260px; }
  .sol-info { height: 150px; padding: 20px; }
  .sol-title { font-size: 19px; }
}
