/**
 * 悠推 2.0 APP下载页样式 (严格对齐 Figma 20956:23142 及自适应响应式)
 */

/* ==========================================================================
   下载页页面容器
   ========================================================================== */
.download-page-wrap {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #FFFFFF;
  overflow-x: clip;
}

/* 消除下载页菜单下方的空行与多余边框 (严格对齐 Figma 21050:248: 纯白背景无描边) */
.download-page-wrap .site-header {
  height: var(--header-height);
  border-bottom: none !important;
  background: #FFFFFF !important;
  box-shadow: none !important;
}

.download-page-wrap .site-header.is-scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
}

/* 底部全宽装饰飘带 (Figma 20956:23143: 贴合导航栏底缘覆盖到底部) */
.download-bottom-ribbon {
  position: absolute;
  top: 72px;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1920px;
  max-width: none;
  height: calc(100% - 72px);
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.download-bottom-ribbon img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
}

/* ==========================================================================
   下载页 Hero 核心排版区
   ========================================================================== */
.download-hero-section {
  position: relative;
  z-index: 2;
  padding: 88px 0 20px;
  flex: 1;
  display: flex;
  align-items: flex-start;
}

.download-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px;
  justify-content: space-between;
  align-items: flex-start;
}

.download-hero-left {
  display: flex;
  flex-direction: column;
  max-width: 720px;
}

/* 主标题: 下载悠推APP (Figma 20956:23198: 72px / line-height 100px / 700) */
.download-hero-title {
  font-size: 68px;
  font-weight: 700;
  color: #111111;
  line-height: 100px;
  margin: 0;
  letter-spacing: 0;
  font-family: 'HarmonyOS Sans SC', sans-serif;
  white-space: nowrap;
}

.download-hero-title .hero-title-keyword {
  display: inline-block;
  position: relative;
  z-index: 0;
}

/* 手绘红色彩带装饰 (严格对齐 Figma 20956:23197: 宽186 高40，置于文字底层) */
.download-hero-title .hero-title-brush {
  position: absolute;
  left: 6px;
  top: 60px;
  width: 186px;
  height: 40px;
  max-width: none !important;
  pointer-events: none;
  z-index: -1;
}

.download-hero-title .keyword-text {
  position: relative;
  z-index: 1;
}

/* 副标题: 项目与工具 一处搞定 (Figma 20956:23697 & 23698) */
.download-hero-subtitle {
  font-size: 72px;
  font-weight: 700;
  line-height: 100px;
  margin: 8px 0 20px;
  color: #111111;
  letter-spacing: 0;
  font-family: 'HarmonyOS Sans SC', sans-serif;
  white-space: nowrap;
}

/* Figma 20956:23697 专用渐变色: #FFA83E -> #FF3B30 */
.download-hero-subtitle .highlight-orange {
  background: linear-gradient(90deg, #FFA83E 0%, #FF3B30 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  margin-right: 16px;
}

.download-hero-desc {
  font-size: 16px;
  font-weight: 400;
  color: #666666;
  line-height: 32px;
  margin: 0 0 51px;
}

/* 两个独立大白卡片二维码 (Figma 20956:23701 / 20960:23711: 192x223 白卡 + 140x140 灰底框) */
.download-qr-group {
  display: flex;
  align-items: center;
  gap: 32px;
}

.download-qr-card {
  width: 192px;
  height: 223px;
  background: #FFFFFF;
  border-radius: 16px;
  box-sizing: border-box;
  padding: 24px 26px 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  border: none;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  text-align: center;
}

.download-qr-card:hover {
  transform: translateY(-4px);
  /* box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08); */
}

.download-qr-box {
  width: 140px;
  height: 140px;
  background: #F4F4F6;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  box-sizing: border-box;
}

.download-qr-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.download-qr-name {
  font-size: 16px;
  font-weight: 500;
  color: #444444;
  line-height: 19px;
  margin-top: 16px;
  white-space: nowrap;
  font-family: 'HarmonyOS Sans SC', sans-serif;
}

/* 手机端专用大按钮 (默认在 PC 隐藏，移动端显示) */
.mobile-app-download-btn {
  display: none;
  width: 100%;
  max-width: 320px;
  height: 52px;
  background: #FF3B30;
  color: var(--color-white);
  font-size: 17px;
  font-weight: 700;
  border-radius: var(--radius-full);
  text-decoration: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(255, 59, 48, 0.3);
  margin-top: 24px;
  transition: all var(--transition-normal);
}

.mobile-app-download-btn:hover {
  background: #E02B21;
}

/* 右侧倾斜透视手机模型 (Figma 20956:23103: 469x622 高清立体展示) */
.download-hero-visual {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  position: relative;
  margin-top: -60px;
  max-width: 480px;
  flex-shrink: 0;
}

.download-hero-visual img {
  width: 470px;
  height: auto;
  max-width: none;
  object-fit: contain;
  filter: none;
  pointer-events: none;
  display: block;
}

/* 底部法律信息页脚调整 */
.download-page-wrap .site-footer-minimal {
  padding: 0 0 20px;
  background: transparent !important;
}

.download-page-wrap .site-footer-minimal .container {
  color: #666666;
  font-size: 12px;
  font-weight: 500;
  line-height: 14px;
}

/* ==========================================================================
   全断点响应式适配：拖动浏览器窗口自适应无错乱
   ========================================================================== */

/* 1. 宽屏至标准笔记本 (1200px ~ 1440px) */
@media (max-width: 1440px) {
  .download-hero-section {
    padding: 64px 0 20px;
  }

  .download-hero-title {
    font-size: 60px;
    line-height: 84px;
  }

  .download-hero-title .hero-title-brush {
    left: 5px;
    top: 50px;
    width: 155px;
    height: 33px;
  }

  .download-hero-subtitle {
    font-size: 60px;
    line-height: 84px;
    margin: 6px 0 18px;
  }

  .download-hero-visual {
    margin-top: -40px;
    max-width: 420px;
  }

  .download-hero-visual img {
    width: 420px;
  }
}

/* 2. 紧凑型笔记本 (992px ~ 1199.98px) */
@media (max-width: 1199.98px) {
  .download-hero-section {
    padding: 48px 0 20px;
  }

  .download-hero-grid {
    gap: 30px;
  }

  .download-hero-title {
    font-size: 48px;
    line-height: 68px;
  }

  .download-hero-title .hero-title-brush {
    left: 4px;
    top: 40px;
    width: 124px;
    height: 27px;
  }

  .download-hero-subtitle {
    font-size: 48px;
    line-height: 68px;
    margin: 4px 0 16px;
  }

  .download-hero-desc {
    margin-bottom: 36px;
  }

  .download-qr-group {
    gap: 20px;
  }

  .download-qr-card {
    width: 168px;
    height: 200px;
    padding: 20px 18px 12px;
  }

  .download-qr-box {
    width: 120px;
    height: 120px;
  }

  .download-qr-name {
    font-size: 14px;
    margin-top: 12px;
  }

  .download-hero-visual {
    margin-top: -20px;
    max-width: 360px;
  }

  .download-hero-visual img {
    width: 360px;
  }
}

/* 3. 平板端 (768px ~ 991.98px) */
@media (max-width: 991.98px) {
  .download-page-wrap .site-header {
    height: 64px;
  }

  .download-bottom-ribbon {
    top: 64px;
    width: 100%;
    min-width: 100%;
    left: 0;
    transform: none;
    height: calc(100% - 64px);
  }

  .download-bottom-ribbon img {
    object-fit: cover;
  }

  .download-hero-section {
    padding: 40px 0 40px;
  }

  .download-hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 36px;
  }

  .download-hero-left {
    max-width: 100%;
    align-items: center;
  }

  .download-hero-title {
    font-size: 42px;
    line-height: 58px;
  }

  .download-hero-title .hero-title-brush {
    left: 4px;
    top: 35px;
    width: 108px;
    height: 23px;
  }

  .download-hero-subtitle {
    font-size: 42px;
    line-height: 58px;
    margin: 4px 0 16px;
  }

  .download-hero-desc {
    max-width: 560px;
    margin: 0 auto 36px;
  }

  .download-qr-group {
    justify-content: center;
  }

  .download-hero-visual {
    max-width: 380px;
    margin: 10px auto 0;
    justify-content: center;
  }

  .download-hero-visual img {
    width: 100%;
    max-width: 380px;
  }
}

/* 4. 手机端 (<= 767.98px) */
@media (max-width: 767.98px) {
  /* 顶部导航与全站手机端统一 44px (Figma 21289:4489) */
  .download-page-wrap .site-header {
    height: 44px;
  }

  /* 手机端改用整屏背景图 (Figma 21289:4492 Mask group)：内置手机模型与浮动图标，
     故隐藏 PC 飘带与右侧透视手机；背景自屏幕底部对齐并铺满，底部自带白色渐隐 */
  .download-bottom-ribbon,
  .download-hero-visual {
    display: none;
  }

  /* Hero 改为整屏：内容自导航下 60px 起排，与设计稿坐标一致 (标题 104 / 副标题 158 / 描述 212 / 按钮 308)
     底图按宽度缩放 + 底部对齐，视口偏矮时手机模型会上移压到按钮，
     故按底图几何反推最小高度，保证按钮下沿到模型顶边至少 56px：
     模型顶边在底图第 810 行，距底图下沿 (1624-810) × (100vw/750) ≈ 108.6vw，
     再加按钮底 354 + 间距 56 - 导航 44 = 366 */
  .download-hero-section {
    padding: 60px 0 0;
    min-height: max(calc(100vh - 44px), calc(108.6vw + 366px));
    background: url('../images/figma/download_mobile_bg.png') no-repeat center bottom / cover;
  }

  .download-hero-grid {
    grid-template-columns: 1fr;
    gap: 0;
    text-align: left;
  }

  .download-hero-left {
    max-width: 100%;
    align-items: flex-start;
  }

  /* 标题 36/42，红色笔触按设计稿移到「下载」两字下方 (36px × 2 字 = 72px 回退) */
  .download-hero-title {
    font-size: 36px;
    line-height: 42px;
    white-space: normal;
  }

  .download-hero-title .hero-title-brush {
    left: -68px;
    top: 27px;
    width: 68px;
    height: 16px;
  }

  .download-hero-subtitle {
    font-size: 36px;
    line-height: 42px;
    margin: 12px 0 0;
  }

  .download-hero-subtitle .highlight-orange {
    margin-right: 0; /* 标签与「一处搞定」之间已有空格 ≈12px，正好等于设计稿间距 */
  }

  /* 描述 16/32、两行、整体居中 */
  .download-hero-desc {
    font-size: 16px;
    line-height: 32px;
    color: #454545;
    margin: 12px 0 0;
    padding: 0;
    max-width: none;
    align-self: center;
    text-align: center;
  }

  /* 移动端隐藏桌面双二维码卡片，展示点击直达的大下载按钮 */
  .download-qr-group {
    display: none;
  }

  /* 下载按钮 193x46、圆角 8、深色底 15/500，无图标 (Figma 21289:4520) */
  .mobile-app-download-btn {
    display: inline-flex;
    align-self: center;
    margin: 32px auto 0;
    width: auto;
    max-width: none;
    height: 46px;
    padding: 0 52px;
    gap: 0;
    background: #181C29;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    box-shadow: none;
  }

  .mobile-app-download-btn:hover {
    background: #181C29;
  }

  .mobile-app-download-btn svg {
    display: none;
  }

  /* 手机端设计稿为一屏 (375x812)，不展示页脚法律信息栏 */
  .download-page-wrap .site-footer-minimal {
    display: none;
  }
}

/* 宽屏手机 / 横屏 (601~767.98px)：底图按设计宽度上限展示，
   避免整图按宽度放大后手机模型上移与文案重叠；
   最小高度同理反推：模型顶边距底图下沿 = (1624-810) × (480/750) = 521，
   本区间按钮下沿为 322，521 + 322 + 间距 56 - 导航 44 = 855 */
@media (min-width: 601px) and (max-width: 767.98px) {
  .download-hero-section {
    background-size: 480px auto;
    min-height: max(calc(100vh - 44px), 855px);
  }
}
