/* =========================================================
   产品与服务页 · 专属样式
   作用域：.page-products
   ========================================================= */
.page-products {
  --p-gold: #D4AF37;
  --p-gold-soft: #F0E68C;
  --p-green: #0B3D2E;
  --p-green-deep: #072A20;
  --p-green-light: #145240;
  --p-ink: #2C2C2C;
  --p-white: #FFFFFF;
  --p-bg-light: #F5F5F5;
  --p-muted: rgba(255, 255, 255, 0.7);
  --p-radius: 18px;
}

/* ---------- 英雄区 / 产品总览 ---------- */
.page-products .p-hero {
  position: relative;
  padding: 32px 0 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 85% 18%, rgba(212, 175, 55, 0.12) 0%, transparent 55%),
    linear-gradient(135deg, var(--p-green-deep) 0%, var(--p-green) 58%, #0F4A3A 100%);
}

.page-products .p-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}

.page-products .p-hero .container {
  position: relative;
  z-index: 2;
}

.page-products .p-hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  padding: 40px 0 48px;
}

.page-products .p-hero__content {
  max-width: 700px;
}

.page-products .p-hero__content h1 {
  font-family: var(--font-heading);
  font-size: clamp(30px, 6vw, 54px);
  font-weight: 700;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--p-white);
  margin: 12px 0 18px;
}

.page-products .p-hero__lead {
  color: var(--p-muted);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  margin: 0 0 28px;
}

.page-products .p-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.page-products .p-hero__tree {
  display: none;
}

.page-products .p-hero__svg {
  width: 100%;
  max-width: 460px;
  height: auto;
}

.page-products .p-hero__banner {
  position: relative;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
  height: 200px;
  margin-top: 8px;
}

.page-products .p-hero__banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
  display: block;
}

/* 技能树 hover 交互（纯 CSS 渐进增强） */
.page-products .skill-branch {
  cursor: pointer;
}

.page-products .skill-branch path {
  transition: stroke-width 0.25s ease, stroke-dasharray 0.25s ease, opacity 0.25s ease;
  opacity: 0.75;
}

.page-products .skill-branch circle {
  transition: transform 0.25s ease;
  transform-box: fill-box;
  transform-origin: center;
}

.page-products .skill-branch--ios:hover path,
.page-products .skill-branch--api:hover path,
.page-products .skill-branch--report:hover path {
  stroke-width: 3.5;
  stroke-dasharray: 12 4;
  opacity: 1;
}

.page-products .skill-branch--ios:hover circle,
.page-products .skill-branch--api:hover circle,
.page-products .skill-branch--report:hover circle {
  transform: scale(1.12);
}

/* ---------- 三卡片总览 ---------- */
.page-products .p-overview {
  padding: 72px 0;
}

.page-products .p-overview__grid {
  margin-top: 36px;
}

.page-products .p-product-card {
  position: relative;
  padding: 28px 24px 26px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

.page-products .p-product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.page-products .p-product-card__num {
  position: absolute;
  top: 14px;
  right: 18px;
  font-family: var(--font-heading);
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(11, 61, 46, 0.16);
  pointer-events: none;
  user-select: none;
}

.page-products .p-product-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(212, 175, 55, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.page-products .p-product-card__icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--p-gold);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page-products .p-product-card__title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--p-green);
  margin: 0 0 12px;
}

.page-products .p-product-card__desc {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  color: rgba(44, 44, 44, 0.85);
  margin: 0 0 16px;
}

.page-products .p-product-card .tag {
  display: inline-block;
  margin-bottom: 16px;
}

.page-products .p-product-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--p-gold);
  text-decoration: none;
  transition: color 0.2s ease;
}

.page-products .p-product-card__link::after {
  content: "→";
  transition: transform 0.2s ease;
}

.page-products .p-product-card__link:hover {
  color: var(--p-green);
}

.page-products .p-product-card__link:hover::after {
  transform: translateX(4px);
}

/* ---------- iOS 专题下载详情 ---------- */
.page-products .p-ios {
  position: relative;
  padding: 72px 0;
  overflow: hidden;
  background:
    linear-gradient(160deg, var(--p-green-deep) 0%, var(--p-green) 55%, #104D3A 100%);
}

.page-products .p-ios::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -120px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.18);
  pointer-events: none;
}

.page-products .p-ios .chapter {
  position: relative;
  z-index: 2;
  margin-bottom: 40px;
}

.page-products .p-ios .chapter__title,
.page-products .p-ios .chapter__sub,
.page-products .p-ios .chapter__label {
  color: var(--p-white);
}

.page-products .p-ios__layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}

.page-products .p-ios__phone {
  display: flex;
  justify-content: center;
}

/* CSS 手机模型 */
.page-products .p-phone {
  position: relative;
  width: min(280px, 82vw);
  aspect-ratio: 168 / 336;
  background: linear-gradient(145deg, #1a1a2e, #0d0d18);
  border-radius: 44px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 24px 52px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.65s var(--ease-out), box-shadow 0.65s var(--ease-out);
}

.page-products .p-phone:hover {
  transform: perspective(1000px) rotateX(7deg) translateY(-6px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.page-products .p-phone::before,
.page-products .p-phone::after {
  content: "";
  position: absolute;
  width: 3px;
  height: 42px;
  background: #3a3a4a;
  border-radius: 4px;
}

.page-products .p-phone::before {
  left: -3px;
  top: 108px;
}

.page-products .p-phone::after {
  right: -3px;
  top: 152px;
  height: 68px;
}

.page-products .p-phone__speaker {
  width: 44px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.24);
  margin: 6px auto 8px;
  flex-shrink: 0;
}

.page-products .p-phone__screen {
  flex: 1;
  width: 100%;
  border-radius: 32px;
  overflow: hidden;
  background: var(--p-white);
  position: relative;
}

.page-products .p-phone__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.page-products .p-phone__home {
  width: 34px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.28);
  margin: 10px auto;
  flex-shrink: 0;
}

/* iOS 内容 */
.page-products .p-ios__content {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.page-products .p-ios__features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.page-products .p-feature {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px 20px;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.page-products .p-feature:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(212, 175, 55, 0.35);
}

.page-products .p-feature__num {
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--p-gold);
  line-height: 1.1;
  margin-top: 2px;
}

.page-products .p-feature h4 {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--p-white);
  margin: 0 0 8px;
}

.page-products .p-feature p {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  color: var(--p-muted);
  margin: 0;
}

.page-products .p-ios__flow {
  background: rgba(7, 42, 32, 0.5);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
}

.page-products .p-ios__flow .tag {
  display: inline-block;
  margin-bottom: 12px;
}

.page-products .p-ios__flow h4 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--p-white);
  margin: 0 0 12px;
  letter-spacing: 0.5px;
}

.page-products .p-steps {
  list-style: none;
  padding: 0;
  margin: 0;
}

.page-products .p-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  font-size: 15px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 12px;
}

.page-products .p-steps li:last-child {
  margin-bottom: 0;
}

.page-products .p-steps__num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--p-gold);
  color: var(--p-white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- 数据 API 服务 ---------- */
.page-products .p-api {
  padding: 72px 0;
  background: var(--p-bg-light);
}

.page-products .p-api .chapter {
  margin-bottom: 40px;
}

.page-products .p-api__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}

.page-products .p-api__visual .media-frame {
  overflow: hidden;
  border-radius: 16px;
}

.page-products .p-api__visual .media-frame img {
  height: 100%;
  object-fit: cover;
}

/* API 示例代码块 */
.page-products .p-api__demo {
  margin-top: 24px;
  background: #0E2A21;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.22);
}

.page-products .p-api__demo-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.page-products .p-api__demo-method {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  color: var(--p-gold);
  background: rgba(212, 175, 55, 0.14);
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.page-products .p-api__demo-url {
  flex: 1;
  font-family: var(--font-data);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.82);
}

.page-products .p-api__demo-code {
  margin: 0;
  padding: 16px;
  font-family: var(--font-data);
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  overflow-x: auto;
  white-space: pre;
}

/* API 内容区 */
.page-products .p-api__content {
  display: flex;
  flex-direction: column;
}

.page-products .p-api__specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.page-products .p-api__specs .stat {
  background: var(--p-white);
  border: 1px solid var(--color-line);
  border-radius: 12px;
  padding: 16px 12px;
  text-align: center;
}

.page-products .p-api__specs .stat__value {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  color: var(--p-green);
}

.page-products .p-api__specs .stat__label {
  display: block;
  margin-top: 4px;
  font-family: var(--font-body);
  font-size: 12px;
  color: rgba(44, 44, 44, 0.72);
}

.page-products .p-api__list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
}

.page-products .p-api__list li {
  position: relative;
  padding-left: 22px;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  color: var(--p-ink);
  margin-bottom: 10px;
}

.page-products .p-api__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 10px;
  height: 10px;
  background: var(--p-gold);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.page-products .p-api__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
}

/* ---------- 定制报告 ---------- */
.page-products .p-report {
  padding: 72px 0;
  background: var(--p-white);
}

.page-products .p-report .chapter {
  margin-bottom: 40px;
}

.page-products .p-report__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

.page-products .p-report__visual .media-frame {
  overflow: hidden;
  border-radius: 16px;
}

.page-products .p-report__visual .media-frame img {
  height: 100%;
  object-fit: cover;
}

.page-products .p-report__content h3 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--p-green);
  margin: 0 0 20px;
}

.page-products .p-report__list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}

.page-products .p-report__list li {
  position: relative;
  padding: 14px 16px 14px 44px;
  background: rgba(11, 61, 46, 0.03);
  border-left: 3px solid var(--p-gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--p-ink);
  margin-bottom: 12px;
}

.page-products .p-report__list li::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 22px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--p-gold);
}

.page-products .p-report__note {
  font-family: var(--font-body);
  font-size: 14px;
  color: rgba(44, 44, 44, 0.72);
  line-height: 1.7;
  margin: 0 0 24px;
  border: 1px dashed rgba(11, 61, 46, 0.22);
  padding: 14px 16px;
  border-radius: 8px;
}

.page-products .p-report__note a {
  color: var(--color-cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.page-products .p-report__note a:hover {
  color: var(--p-green);
}

/* ---------- 版本历史 ---------- */
.page-products .p-version {
  position: relative;
  padding: 72px 0;
  overflow: hidden;
  background: var(--p-green-deep);
}

.page-products .p-version__bg {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  pointer-events: none;
}

.page-products .p-version__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.page-products .p-version .chapter {
  position: relative;
  z-index: 2;
  margin-bottom: 40px;
}

.page-products .p-version .chapter__title,
.page-products .p-version .chapter__sub,
.page-products .p-version .chapter__label {
  color: var(--p-white);
}

.page-products .p-version__timeline {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 40px;
  padding-left: 24px;
  border-left: 2px solid rgba(212, 175, 55, 0.3);
}

.page-products .p-version__item {
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 16px;
  color: var(--p-white);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.page-products .p-version__item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(212, 175, 55, 0.35);
}

.page-products .p-version__item::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 22px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--p-gold);
  border: 2px solid var(--p-green-deep);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.3);
}

.page-products .p-version__item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-products .p-version__item summary::-webkit-details-marker {
  display: none;
}

.page-products .p-version__item summary::after {
  content: "＋";
  margin-left: auto;
  font-family: var(--font-heading);
  color: var(--p-gold);
  font-size: 18px;
  transition: transform 0.2s ease;
}

.page-products .p-version__item[open] summary::after {
  content: "－";
  transform: rotate(180deg);
}

.page-products .p-version__badge {
  display: inline-block;
  background: var(--p-gold);
  color: var(--p-white);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 2px 10px;
  border-radius: 999px;
  flex-shrink: 0;
}

.page-products .p-version__code {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.page-products .p-version__item p {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.65;
  color: var(--p-muted);
  margin: 12px 0 0;
}

/* ---------- 动效偏好适配 ---------- */
@media (prefers-reduced-motion: reduce) {
  .page-products .p-phone,
  .page-products .p-product-card,
  .page-products .skill-branch circle,
  .page-products .skill-branch path {
    transition: none;
    transform: none;
  }
}

/* ---------- 桌面布局（≥768px） ---------- */
@media (min-width: 768px) {
  .page-products .p-hero {
    padding-top: 40px;
  }

  .page-products .p-hero__grid {
    grid-template-columns: 1.08fr 0.92fr;
    align-items: center;
    gap: 32px;
    padding: 64px 0 72px;
  }

  .page-products .p-hero__tree {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .page-products .p-hero__svg {
    width: 460px;
  }

  .page-products .p-hero__banner {
    height: 330px;
    border-radius: 24px 24px 0 0;
  }

  .page-products .p-product-card {
    padding: 32px 28px 28px;
  }

  .page-products .p-ios__layout {
    grid-template-columns: minmax(320px, 0.9fr) 1.1fr;
    gap: 64px;
  }

  .page-products .p-phone {
    width: 292px;
  }

  .page-products .p-api__layout {
    grid-template-columns: 0.95fr 1.05fr;
    gap: 56px;
    align-items: start;
  }

  .page-products .p-api__specs {
    gap: 16px;
  }

  .page-products .p-api__specs .stat {
    padding: 20px 14px;
  }

  .page-products .p-report__layout {
    grid-template-columns: 0.95fr 1.05fr;
    gap: 56px;
  }

  .page-products .p-version__timeline {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding-left: 0;
    padding-top: 36px;
    border-left: none;
    border-top: 2px solid rgba(212, 175, 55, 0.3);
  }

  .page-products .p-version__item {
    margin-bottom: 0;
  }

  .page-products .p-version__item::before {
    left: 50%;
    top: -43px;
    transform: translateX(-50%);
  }

  .page-products .p-version__item summary {
    flex-wrap: wrap;
  }

  .page-products .p-version__item summary::after {
    display: none;
  }

  .page-products .p-version__item > p {
    margin-top: 10px;
  }
}
