/* ==========================================================================
   entry-motion.css · PC维护团队官网（concept-review-20261023.html）
   动效与排版精修层：
   1. 首屏分层入场（无 JS 锁屏依赖，animation-fill-mode: backwards，总时长 <= 860ms）
   2. 按钮、双通道发行卡、工作区抽屉卡、硬件档案卡的触感悬停与 :active 按压反馈
   3. 触屏/移动端隔离悬停位移，完整支持 prefers-reduced-motion 与 .no-motion 状态
   4. 字体渲染、字距与 CTA 可读性精调（零外部字体或网络依赖，严守 1440/390 视口边界）
   ========================================================================== */

:root {
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-press: cubic-bezier(0.32, 0.72, 0, 1);
}

/* --------------------------------------------------------------------------
   1. 排版渲染与 CTA 可读性精修（Typography & Legibility Refinements）
   -------------------------------------------------------------------------- */

html {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
}

.hero h1,
.section-header h2,
.release-body h3,
.drawer-header h3,
.board-body h3,
.dialog-head h2 {
  font-feature-settings: "kern" 1;
  text-wrap: balance;
}

.hero h1 {
  line-height: 1.12;
  letter-spacing: -0.032em;
}

.hero-lead {
  line-height: 1.74;
  letter-spacing: 0.004em;
  color: #364d67;
}

.section-header h2 {
  line-height: 1.18;
  letter-spacing: -0.028em;
}

.section-header p {
  line-height: 1.7;
  color: #3b526d;
}

/* 技术编号、版本号、通道标识统一等宽对齐 */
.prototype-pill,
.ledger-code,
.stage-caption,
.stage-pill-btn span,
.section-meta-note,
.channel-tag,
.manifest-value,
.manifest-sub,
.drawer-index,
.drawer-stage-title code,
.board-code-tag,
.board-model-line,
.board-cpu-chip,
.dialog-code {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "zero" 1;
}

/* CTA 文本对比度与字距精调 */
.btn-primary,
.btn-secondary,
.download-prototype-btn,
.board-spec-trigger,
.stage-pill-btn {
  letter-spacing: 0.01em;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.btn-primary {
  font-weight: 700;
  text-shadow: 0 1px 1px rgba(7, 36, 84, 0.28);
}

.btn-secondary {
  font-weight: 650;
  border-color: rgba(29, 74, 125, 0.26);
  background: rgba(255, 255, 255, 0.86);
  color: #132840;
}

.download-prototype-btn {
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   2. 首屏分层入场动效（Layered First-Load Entrance · Max <= 860ms）
   - 不依赖 JS class，默认属性保持 opacity: 1 / transform: none
   - 使用 animation-fill-mode: backwards，任何时候脚本失败或慢速设备都不会隐藏内容
   - 阶梯间隔 70ms ~ 90ms，传递“顶栏 -> 主标题 -> 导语 -> 行动点 -> 通道台账 + 实截视窗”层级
   -------------------------------------------------------------------------- */

@keyframes studio-header-enter {
  from {
    opacity: 0.01;
    transform: translate3d(0, -8px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes studio-rise-enter {
  from {
    opacity: 0.01;
    transform: translate3d(0, 14px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes studio-stage-enter {
  from {
    opacity: 0.01;
    transform: translate3d(0, 16px, 0) scale(0.986);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes studio-screen-settle {
  from {
    filter: brightness(0.92) contrast(0.96);
  }
  to {
    filter: brightness(1) contrast(1);
  }
}

@media (prefers-reduced-motion: no-preference) {
  /* 0ms -> 420ms: 顶栏稳固就位 */
  html:not(.no-motion) .site-header {
    animation: studio-header-enter 420ms var(--ease-out-expo) 0ms backwards;
  }

  /* 70ms -> 550ms: 首屏主标题 */
  html:not(.no-motion) .hero h1 {
    animation: studio-rise-enter 480ms var(--ease-out-expo) 70ms backwards;
  }

  /* 150ms -> 630ms: 首屏副标题导语 */
  html:not(.no-motion) .hero-lead {
    animation: studio-rise-enter 480ms var(--ease-out-expo) 150ms backwards;
  }

  /* 230ms -> 710ms: 首屏双行动按钮组 */
  html:not(.no-motion) .hero-cta-row {
    animation: studio-rise-enter 480ms var(--ease-out-expo) 230ms backwards;
  }

  /* 310ms -> 770ms & 390ms -> 850ms: 双通道状态台账依次入场 */
  html:not(.no-motion) .hero-channel-ledger .ledger-item:nth-child(1) {
    animation: studio-rise-enter 460ms var(--ease-out-expo) 310ms backwards;
  }

  html:not(.no-motion) .hero-channel-ledger .ledger-item:nth-child(2) {
    animation: studio-rise-enter 460ms var(--ease-out-expo) 390ms backwards;
  }

  /* 130ms -> 810ms: 右侧真实软件截图检视台同步浮现 */
  html:not(.no-motion) .hero-stage {
    animation: studio-stage-enter 680ms var(--ease-out-expo) 130ms backwards;
  }

  html:not(.no-motion) .hero-screen-frame img {
    animation: studio-screen-settle 560ms var(--ease-out-quart) 220ms backwards;
  }
}

/* --------------------------------------------------------------------------
   3. 按钮、软件卡、抽屉卡、硬件卡的触感交互（Tactile Hover & :active Feedback）
   -------------------------------------------------------------------------- */

/* 基础过渡定义（包含非位移属性，兼顾触屏与键盘） */
.btn-primary,
.btn-secondary,
.download-prototype-btn,
.board-spec-trigger,
.stage-pill-btn,
.dialog-close,
.menu-toggle {
  transition:
    transform 180ms var(--ease-out-quart),
    background-color 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.btn-icon {
  transition: transform 180ms var(--ease-out-quart);
}

.release-card,
.board-card,
.ledger-item {
  transition:
    transform 240ms var(--ease-out-expo),
    border-color 220ms ease,
    box-shadow 240ms ease,
    background-color 220ms ease;
}

.app-tile {
  transition: transform 240ms var(--ease-out-expo), box-shadow 240ms ease;
}

.drawer-card {
  transition:
    transform 220ms var(--ease-out-expo),
    border-color 200ms ease,
    background-color 200ms ease,
    background 200ms ease,
    box-shadow 220ms ease;
}

.drawer-sheet {
  transition:
    opacity 260ms var(--ease-out-expo),
    transform 260ms var(--ease-out-expo);
}

/* 仅在精细指针设备（桌面鼠标/触控笔）启用悬停空间位移 */
@media (hover: hover) and (pointer: fine) {
  /* 主次 CTA 与下载按钮悬停 */
  .btn-primary:hover {
    transform: translate3d(0, -1.5px, 0);
    box-shadow:
      0 18px 34px -12px rgba(11, 84, 190, 0.62),
      inset 0 1px 0 rgba(255, 255, 255, 0.34);
  }

  .btn-secondary:hover {
    transform: translate3d(0, -1.5px, 0);
    border-color: rgba(23, 101, 209, 0.48);
    background: #ffffff;
    box-shadow: 0 12px 26px -14px rgba(17, 45, 85, 0.24);
  }

  .btn-primary:hover .btn-icon,
  .btn-secondary:hover .btn-icon,
  .board-spec-trigger:hover .btn-icon {
    transform: translate3d(3px, 0, 0);
  }

  .download-prototype-btn:hover {
    transform: translate3d(0, -1.5px, 0);
    box-shadow: 0 12px 24px -10px rgba(4, 12, 24, 0.72);
  }

  .release-card.primary-release .download-prototype-btn:hover {
    background: linear-gradient(180deg, #e8f4ff 0%, #c6e1fc 100%);
  }

  .release-card.secondary-release .download-prototype-btn:hover {
    background: rgba(33, 56, 86, 0.98);
    border-color: rgba(125, 211, 252, 0.68);
  }

  .download-prototype-btn:hover .btn-icon {
    transform: translate3d(0, 2px, 0);
  }

  /* 首屏截图切换胶囊按钮 */
  .stage-pill-btn:hover {
    border-color: rgba(125, 211, 252, 0.36);
    background: rgba(18, 31, 48, 0.84);
    color: #edf3fa;
  }

  /* 首屏通道台账微反馈 */
  .ledger-item:hover {
    border-color: rgba(23, 101, 209, 0.32);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 10px 24px -16px rgba(17, 45, 85, 0.25);
  }

  /* 软件发行卡悬停 */
  .release-card:hover {
    transform: translate3d(0, -3px, 0);
    border-color: rgba(147, 213, 255, 0.56);
    box-shadow:
      0 28px 60px -28px rgba(16, 42, 82, 0.52),
      inset 0 1px 0 rgba(235, 245, 255, 0.2);
  }

  .release-card:hover .app-tile {
    transform: translate3d(0, -1px, 0) scale(1.02);
  }

  /* 工作区抽屉卡悬停 */
  .drawer-card:not([data-active="true"]):hover {
    transform: translate3d(3px, 0, 0);
    border-color: rgba(166, 204, 242, 0.34);
    background: rgba(19, 32, 50, 0.88);
  }

  @media (min-width: 1121px) {
    .drawer-card[data-active="true"] {
      transform: translate3d(5px, 0, 0);
    }
  }

  /* 配套硬件卡悬停 */
  .board-card:hover {
    transform: translate3d(0, -3px, 0);
    border-color: rgba(125, 211, 252, 0.48);
    box-shadow:
      0 26px 54px -26px rgba(16, 42, 82, 0.48),
      inset 0 1px 0 rgba(235, 245, 255, 0.16);
  }

  .board-card:hover .board-photo-well:not(.rotate-cw) img {
    transform: scale(1.035);
  }

  /* 严守昆仑3450顺时针 90° 朝向契约 */
  .board-card:hover .board-photo-well.rotate-cw img {
    transform: rotate(90deg) scale(1.035);
  }

  .board-spec-trigger:hover {
    transform: translate3d(0, -1px, 0);
    border-color: rgba(125, 211, 252, 0.55);
    background: rgba(26, 45, 70, 0.96);
  }

  .dialog-close:hover {
    border-color: rgba(147, 213, 255, 0.45);
    background: rgba(28, 45, 68, 0.95);
  }
}

/* --------------------------------------------------------------------------
   4. 物理按压反馈（:active Tactile Press States · 桌面与触屏通用）
   -------------------------------------------------------------------------- */

.btn-primary:active,
.btn-secondary:active,
.download-prototype-btn:active,
.board-spec-trigger:active,
.stage-pill-btn:active,
.dialog-close:active,
.menu-toggle:active {
  transform: translate3d(0, 1px, 0) scale(0.985);
  transition-duration: 90ms;
  transition-timing-function: var(--ease-press);
}

.drawer-card:active {
  transform: scale(0.992);
  transition-duration: 90ms;
  transition-timing-function: var(--ease-press);
}

/* --------------------------------------------------------------------------
   5. 触屏与移动端保护（Touch & Mobile Safeguards · 1440px / 390px 无溢出）
   -------------------------------------------------------------------------- */

@media (hover: none), (pointer: coarse), (max-width: 760px) {
  .btn-primary:hover,
  .btn-secondary:hover,
  .download-prototype-btn:hover,
  .board-spec-trigger:hover,
  .stage-pill-btn:hover,
  .release-card:hover,
  .release-card:hover .app-tile,
  .drawer-card:hover,
  .drawer-card[data-active="true"],
  .board-card:hover {
    transform: none;
  }

  .board-card:hover .board-photo-well:not(.rotate-cw) img {
    transform: none;
  }

  .board-card:hover .board-photo-well.rotate-cw img {
    transform: rotate(90deg);
  }
}

/* --------------------------------------------------------------------------
   6. 减少动态效果与显式无动画模式（prefers-reduced-motion & .no-motion）
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .site-header,
  .hero h1,
  .hero-lead,
  .hero-cta-row,
  .hero-channel-ledger .ledger-item,
  .hero-stage,
  .hero-screen-frame img {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  .btn-primary,
  .btn-secondary,
  .download-prototype-btn,
  .board-spec-trigger,
  .stage-pill-btn,
  .release-card,
  .drawer-card,
  .drawer-sheet,
  .board-card,
  .board-photo-well img,
  .btn-icon {
    transition-property: background-color, border-color, color, opacity, box-shadow !important;
    transition-duration: 120ms !important;
  }

  .drawer-card[data-active="true"],
  .drawer-sheet,
  .drawer-sheet[data-sheet-active="true"] {
    transform: none !important;
  }
}

html.no-motion *,
html.no-motion *::before,
html.no-motion *::after,
html[data-motion="reduced"] *,
html[data-motion="reduced"] *::before,
html[data-motion="reduced"] *::after {
  animation: none !important;
  transition: none !important;
}

/* The download action only becomes interactive after valid signed release data. */
.download-prototype-btn[aria-disabled="true"] {
  opacity: .52;
  pointer-events: none;
  cursor: not-allowed;
  filter: saturate(.4);
}
