/**
 * 致其医疗官网 - 现代专业明亮医疗设备工业设计系统
 * Pure Clean Medical Technology & High-End Bright Precision System
 * 风格定位：迈瑞医疗 / 联影医疗 / 飞利浦医疗纯净明亮大气风 (Crisp Clean Medical Tech)
 * 具备完整的页面滚动过度动效、层叠瀑布流显现与微交互系统
 */

/* ==========================================================================
   1. 字体等宽数字与精准字偶排版
   ========================================================================== */
.font-tabular {
  font-feature-settings: "tnum" 1, "cv02" 1, "cv03" 1, "cv04" 1;
  letter-spacing: -0.02em;
}

.text-title-tracking {
  letter-spacing: -0.03em;
}

/* ==========================================================================
   2. 现代明亮医疗科技微网格与柔光环境
   ========================================================================== */
.medical-light-hero {
  background-color: #ffffff;
  background-image: 
    radial-gradient(at 15% 15%, rgba(2, 132, 199, 0.08) 0px, transparent 45%),
    radial-gradient(at 85% 20%, rgba(13, 148, 136, 0.07) 0px, transparent 45%),
    radial-gradient(at 50% 85%, rgba(56, 189, 248, 0.05) 0px, transparent 50%),
    linear-gradient(to right, rgba(15, 23, 42, 0.022) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.022) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 48px 48px, 48px 48px;
}

.precision-grid-light {
  background-image: 
    radial-gradient(rgba(2, 132, 199, 0.05) 1px, transparent 1px),
    linear-gradient(to right, rgba(15, 23, 42, 0.018) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.018) 1px, transparent 1px);
  background-size: 32px 32px, 96px 96px, 96px 96px;
}

/* ==========================================================================
   3. 顶级专业医疗蓝主按钮与次级按钮 (Medical Grade Action)
   ========================================================================== */
.btn-medical-primary {
  background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  box-shadow: 
    0 1px 2px rgba(15, 23, 42, 0.08),
    0 8px 20px -4px rgba(2, 132, 199, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-medical-primary:hover {
  background: linear-gradient(180deg, #0369a1 0%, #075985 100%);
  box-shadow: 
    0 2px 4px rgba(15, 23, 42, 0.12),
    0 14px 28px -4px rgba(2, 132, 199, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transform: translateY(-2px);
}

.btn-medical-secondary {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  box-shadow: 
    0 1px 3px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-medical-secondary:hover {
  background: #f8fafc;
  color: #0284c7;
  border-color: #7dd3fc;
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.15);
  transform: translateY(-2px);
}

/* ==========================================================================
   4. 纯净医疗展台微漫反射底座
   ========================================================================== */
.medical-pedestal {
  background: radial-gradient(ellipse 70% 35% at 50% 50%, rgba(2, 132, 199, 0.16) 0%, rgba(14, 165, 233, 0) 70%);
}

.medical-pedestal-light {
  background: radial-gradient(ellipse 70% 35% at 50% 50%, rgba(15, 23, 42, 0.08) 0%, rgba(15, 23, 42, 0) 70%);
}

/* ==========================================================================
   5. 生物感应状态呼吸点
   ========================================================================== */
@keyframes biosensorGreenPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.biosensor-dot {
  animation: biosensorGreenPulse 2.2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ==========================================================================
   6. SPD 流程沙盘流动能量包
   ========================================================================== */
@keyframes dataPacketMoveLight {
  0% { left: 0%; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

.data-packet-light {
  position: absolute;
  top: -2px;
  width: 28px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(2, 132, 199, 0), #0284c7, #0d9488);
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.45);
  animation: dataPacketMoveLight 3.2s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

/* ==========================================================================
   7. 纯白展厅卡片激活态
   ========================================================================== */
.active-spec-tab-light {
  background: #0284c7 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35) !important;
}

/* ==========================================================================
   8. 柔光微扫影动效
   ========================================================================== */
.shine-sweep {
  position: relative;
  overflow: hidden;
}

.shine-sweep::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 50%;
  height: 200%;
  background: linear-gradient(
    60deg,
    rgba(255, 255, 255, 0) 20%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0) 80%
  );
  transform: rotate(25deg);
  pointer-events: none;
  transition: all 0.85s ease;
  opacity: 0;
}

.shine-sweep:hover::after {
  left: 130%;
  opacity: 1;
}

/* ==========================================================================
   9. 微浮动动效
   ========================================================================== */
@keyframes floatGentle {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

.animate-float-gentle {
  animation: floatGentle 5s ease-in-out infinite;
}

/* ==========================================================================
   10. 页面全域滚动过度与显现引擎 (Scroll Driven Motion & Reveal Engine)
   ========================================================================== */

/* 顶部精准阅读滚动进度条 */
#scrollProgressBar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #0284c7 0%, #0ea5e9 50%, #0d9488 100%);
  z-index: 9999;
  transition: width 0.1s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.5);
}

/* 导航栏滚动下沉吸顶高阶态：保持 80px 稳定高度，禁止变更 height 引发文档流重排与滚动死循环抖动 */
.header-scrolled {
  background-color: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  box-shadow: 0 4px 20px -4px rgba(15, 23, 42, 0.08), 0 1px 0 rgba(226, 232, 240, 0.8) !important;
}

/* 向上淡入显现 (Default Reveal) */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: 
    opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* 保护页面主布局容器，防止巨幅内容高度导致白屏 */
main.reveal,
main.revealed {
  opacity: 1 !important;
  transform: none !important;
}

/* 向左滑入显现 */
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: 
    opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* 向右滑入显现 */
.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: 
    opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* 缩放升维显现 */
.reveal-scale {
  opacity: 0;
  transform: scale(0.93) translateY(20px);
  transition: 
    opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* 瀑布式层叠渐入 (Staggered Children Reveal) */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(28px);
  transition: 
    opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-stagger.revealed > *:nth-child(1) { transition-delay: 0.05s; opacity: 1; transform: translateY(0); }
.reveal-stagger.revealed > *:nth-child(2) { transition-delay: 0.14s; opacity: 1; transform: translateY(0); }
.reveal-stagger.revealed > *:nth-child(3) { transition-delay: 0.23s; opacity: 1; transform: translateY(0); }
.reveal-stagger.revealed > *:nth-child(4) { transition-delay: 0.32s; opacity: 1; transform: translateY(0); }
.reveal-stagger.revealed > *:nth-child(5) { transition-delay: 0.41s; opacity: 1; transform: translateY(0); }
.reveal-stagger.revealed > *:nth-child(6) { transition-delay: 0.50s; opacity: 1; transform: translateY(0); }
.reveal-stagger.revealed > *:nth-child(7) { transition-delay: 0.59s; opacity: 1; transform: translateY(0); }
.reveal-stagger.revealed > *:nth-child(8) { transition-delay: 0.68s; opacity: 1; transform: translateY(0); }

/* ==========================================================================
   11. 高端医疗设备卡片悬浮升维 (Medical Studio Card Hover Dynamics)
   ========================================================================== */
.medical-card-hover {
  transition: 
    transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.medical-card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 
    0 24px 48px -12px rgba(2, 132, 199, 0.12),
    0 12px 24px -8px rgba(15, 23, 42, 0.06);
  border-color: rgba(56, 189, 248, 0.6);
}

/* ==========================================================================
   12. 悬浮回到顶部组件 (Scroll To Top with Circular Meter)
   ========================================================================== */
.scroll-to-top-btn {
  position: fixed;
  bottom: 152px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  background: #ffffff;
  color: #0284c7;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.9);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 80;
  cursor: pointer;
}

.scroll-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.scroll-to-top-btn:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 16px 32px -6px rgba(2, 132, 199, 0.35);
  transform: translateY(-3px) scale(1.05);
}

/* 页面极速渲染与平滑过渡（消除跳转白屏突兀感） */
@keyframes pageSmoothIn {
  from { opacity: 0.88; }
  to { opacity: 1; }
}
body {
  animation: pageSmoothIn 0.1s cubic-bezier(0, 0, 0.2, 1);
}

/* ==========================================================================
   响应式微调与断点补丁 (保证全站各尺寸设备精准还原)
   ========================================================================== */
@media (min-width: 640px) {
  .sm\:w-auto {
    width: auto !important;
  }
}
@media (min-width: 1024px) {
  .lg\:w-auto {
    width: auto !important;
  }
}

/* 首页硬件矩阵 Tab 响应式系统 (手机端2x2对称四宫格，PC/平板端单行紧凑高定 Segmented Controls) */
@media (max-width: 640px) {
  .studio-tabs-responsive {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    width: 100% !important;
    gap: 6px !important;
  }
  .studio-tabs-responsive > button {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
    padding: 10px 12px !important;
  }
}
@media (min-width: 641px) {
  .studio-tabs-responsive {
    display: inline-flex !important;
    align-items: center !important;
    width: auto !important;
    flex-shrink: 0 !important;
    align-self: flex-end !important;
  }
  .studio-tabs-responsive > button {
    width: auto !important;
  }
}
