/* 顺心嘉商城落地页 — 由 Figma 设计稿转换，设计宽 1920px */
:root {
  --brand-text: #1f2633;
  --gradient-title:
    linear-gradient(-18.45deg, #ff3300 6.16%, rgba(255, 255, 255, 0) 19.45%),
    linear-gradient(167.87deg, #ff3300 0.85%, rgba(255, 255, 255, 0) 31.04%),
    linear-gradient(90deg, #000 0%, #000 100%);
  --gradient-tag:
    linear-gradient(166.27deg, #b4132e 6.62%, rgba(255, 255, 255, 0) 67.88%),
    linear-gradient(-32.52deg, #972876 3.21%, rgba(255, 255, 255, 0) 40.19%),
    linear-gradient(90deg, #000 0%, #000 100%);
  --gradient-section-title:
    linear-gradient(
      177.03deg,
      rgba(255, 0, 140, 0.5) 8.94%,
      rgba(255, 255, 255, 0) 34.83%
    ),
    linear-gradient(
      -13.58deg,
      rgba(255, 0, 140, 0.5) 0.98%,
      rgba(255, 255, 255, 0) 38.4%
    ),
    linear-gradient(90deg, #000 0%, #000 100%);
  --page-pad-x: clamp(16px, 4vw, 80px);
  --hero-pad-x: clamp(16px, 5.2vw, 158px);
  --content-max: min(1524px, calc(100vw - 32px));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--brand-text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
    env(safe-area-inset-bottom) env(safe-area-inset-left);
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

.page {
  width: 100%;
  margin: 0 auto;
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  background: #fff;
}

/* ========== Hero ========== */
.hero {
  position: relative;
  min-height: clamp(520px, 78svh, 860px);
  overflow: hidden;
}

/* 设计稿首屏高度 860px；手机 mockup 较高，需限制高度并裁切底部以与 Figma 蒙版一致 */
@media (min-width: 901px) {
  .hero {
    min-height: 860px;
    max-height: 860px;
  }
}

.hero__gradient {
  position: absolute;
  inset: 0;
  /* 与 Figma Rectangle 920：bg-gradient-to-b from #ffdeef to #ffefdc */
  background: linear-gradient(180deg, #ffdeef 0%, #ffefdc 100%);
  z-index: 0;
}

.hero__deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.hero__deco-img {
  position: absolute;
  display: block;
}

.hero__deco--v1 {
  left: max(-102px, -12vw);
  bottom: -50px;
  width: min(661px, 92vw);
  height: auto;
  opacity: 0.95;
}

.hero__deco--v2 {
  left: max(-46px, -8vw);
  top: max(-98px, -12vh);
  width: min(1165px, 135vw);
  height: auto;
  opacity: 0.9;
}

.hero__deco--v3 {
  right: max(-200px, -28vw);
  top: max(-197px, -22vh);
  width: min(986px, 115vw);
  height: auto;
  opacity: 0.85;
}

.hero__deco--ellipse {
  right: max(-80px, -12vw);
  top: max(-162px, -18vh);
  width: min(364px, 48vw);
  height: auto;
}

@media (max-width: 640px) {
  .hero__deco {
    opacity: 0.75;
  }

  .hero__deco--v2,
  .hero__deco--v3 {
    opacity: 0.55;
  }
}

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: 1920px;
  margin: 0 auto;
  /* 行间距与 hero__copy 上边距联动，避免拉大第二行导致 hero__phone-wrap 下移 */
  --hero-row-gap: clamp(16px, 3vw, 24px);
  /* 手机框与顶部 hint 同水平位移，保持相对居中 */
  --hero-phone-shift: -200px;
  /* 设计稿左侧文案区约 x=300px；桌面整体左移共 200px 见下方 min-width 901 */
  padding: clamp(32px, 6vw, 60px) clamp(16px, 5.2vw, 158px)
    clamp(32px, 5vw, 48px) clamp(16px, 15.625vw, 320px);
  display: grid;
  grid-template-columns: 1fr minmax(0, min(480px, 92vw));
  grid-template-areas:
    "logo hint"
    "copy phone";
  align-items: start;
}

@media (min-width: 901px) {
  .hero__inner {
    padding-left: max(16px, calc(clamp(16px, 15.625vw, 320px) - 200px));
  }
}

@media (max-width: 1200px) {
  .hero__inner {
    grid-template-columns: 1fr minmax(0, min(420px, 88vw));
  }
}

@media (min-width: 901px) and (max-width: 1200px) {
  .hero__inner {
    column-gap: 32px;
  }
}

@media (max-width: 900px) {
  .hero__inner {
    padding-left: var(--hero-pad-x);
    padding-right: var(--hero-pad-x);
    grid-template-columns: 1fr;
    grid-template-areas:
      "logo"
      "copy"
      "phone"
      "hint";
  }
}

.hero__logo-wrap {
  grid-area: logo;
}

.hero__logo {
  width: min(200px, 48vw);
  height: auto;
  display: block;
}

.hero__copy {
  grid-area: copy;
  /* 与手机列同高时勿垂直居中，否则会整体偏下；对齐设计稿从标题区向下排布 */
  align-self: start;
  padding-top: clamp(0px, 1.2vw, 16px);
}

@media (min-width: 901px) {
  .hero__copy {
    padding-top: 0;
    /* 相对左侧栏再右移 142px（与稿对齐） */
    margin-left: 142px;
    /* logo 底到文案区约 165px：行间距由 grid gap 承担，余量只加在左侧栏，右侧手机列不动 */
    margin-top: calc(165px - var(--hero-row-gap));
  }
}

@media (max-width: 900px) {
  .hero__copy {
    padding-top: clamp(8px, 2vw, 24px);
    margin-left: 0;
    margin-top: 0;
  }
}

.hero__title {
  margin: 0;
  font-size: clamp(32px, 5.5vw + 0.5rem, 80px);
  font-weight: 700;
  line-height: 1.15;
  background: var(--gradient-title);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: "MiSans", "PingFang SC", sans-serif;
}

/* Figma 7:93：底图 Rectangle923 336×88，文案 32px Semibold 居中渐变 */
.hero__tag {
  margin-top: clamp(20px, 3vw, 32px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: min(336px, 100%);
  height: 88px;
  min-height: 88px;
  padding: 0 24px;
  overflow: hidden;
  /* SVG viewBox 大于实际图形，100% 铺满会露出边缘浅色；略放大后裁切 */
  background: url("./assets/hero-tag-bg.svg") center / 110% 130% no-repeat;
  flex-shrink: 0;
}

.hero__tag span {
  font-size: clamp(18px, 2.2vw, 32px);
  font-weight: 600;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--gradient-tag);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .hero__tag {
    width: min(336px, 100%);
    height: auto;
    min-height: 72px;
    aspect-ratio: 336 / 88;
    padding: 0 clamp(16px, 4vw, 24px);
  }
}

@media (max-width: 480px) {
  .hero__tag span {
    white-space: normal;
    text-align: center;
  }
}

.hero__phone-wrap {
  grid-area: phone;
  justify-self: end;
  position: relative;
  width: 100%;
  max-width: min(480px, 92vw);
}

@media (max-width: 900px) {
  .hero__phone-wrap {
    justify-self: center;
  }
}

.hero__phone-frame {
  border-radius: clamp(28px, 7vw, 55px);
  border: max(2px, 0.2vw) solid #fff;
  background: rgba(255, 250, 250, 0.8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 0 24px 3.2px rgba(214, 57, 161, 0.1);
  padding: clamp(8px, 1.5vw, 12px);
  overflow: hidden;
}

@media (min-width: 901px) {
  .hero__phone-frame {
    transform: translate(var(--hero-phone-shift), 10px);
  }
}

@media (max-width: 900px) {
  .hero__phone-frame {
    transform: none;
  }
}

.hero__phone-screen {
  border-radius: clamp(22px, 5.5vw, 42px);
  overflow: hidden;
  aspect-ratio: 454 / 984;
}

.hero__phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero__hint {
  grid-area: hint;
  margin: 0;
  justify-self: end;
  align-self: start;
  font-size: clamp(14px, 1.8vw, 20px);
  color: rgba(31, 38, 51, 0.3);
  text-align: right;
  white-space: nowrap;
}

@media (min-width: 901px) {
  .hero__hint {
    /* 与 hero__phone-wrap 同宽、同侧对齐，并与 hero__phone-frame 同位移，保证与手机框水平居中一致 */
    justify-self: end;
    width: 100%;
    max-width: min(480px, 92vw);
    text-align: center;
    transform: translateX(var(--hero-phone-shift));
  }
}

@media (max-width: 900px) {
  .hero__hint {
    justify-self: center;
    text-align: center;
    white-space: normal;
    max-width: none;
    transform: none;
  }
}

/* ========== 服务优势 ========== */
.advantages {
  position: relative;
  padding: clamp(48px, 8vw, 80px) var(--page-pad-x) clamp(56px, 9vw, 100px);
}

.advantages__bg {
  position: absolute;
  inset: 0;
  background: url("./assets/advantages-bg.svg") center top / cover no-repeat;
  z-index: 0;
}

.advantages__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
}

.advantages__head {
  text-align: center;
  margin-bottom: clamp(32px, 5vw, 48px);
  padding-inline: clamp(0px, 2vw, 16px);
}

.advantages__title {
  margin: 0;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  font-family: "MiSans", "PingFang SC", sans-serif;
  background: var(--gradient-section-title);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.advantages__sub {
  margin: 20px 0 0;
  font-size: clamp(15px, 2vw + 0.25rem, 20px);
  color: var(--brand-text);
  font-weight: 400;
  line-height: 1.5;
}

.advantages__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2.5vw, 28px);
  justify-content: center;
  max-width: 1628px;
  margin-inline: auto;
}

@media (max-width: 1400px) {
  .advantages__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .advantages__grid {
    grid-template-columns: 1fr;
  }
}

.adv-card {
  border-radius: clamp(20px, 3vw, 28px);
  padding: clamp(40px, 8vw, 72px) clamp(16px, 3vw, 24px) clamp(28px, 5vw, 48px);
  text-align: center;
  min-height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (min-width: 641px) {
  .adv-card {
    min-height: min(600px, 85vh);
  }
}

@media (min-width: 1401px) {
  .adv-card {
    min-height: 600px;
  }
}

.adv-card--a {
  background: linear-gradient(to bottom, #fbd7bd, #fff5f2);
}

.adv-card--b {
  background: linear-gradient(to bottom, #d1bdfb, #faf6fe);
}

.adv-card--c {
  background: linear-gradient(to bottom, #99b4ff, #f5f8ff);
}

.adv-card--d {
  background: linear-gradient(to bottom, #7dd8df, #f0feff);
}

.adv-card__img {
  width: min(274px, 78vw);
  height: auto;
  max-height: 40vh;
  object-fit: contain;
  margin-bottom: auto;
}

/* 设计稿仅「好物优选」插图带浅色外发光 */
.adv-card--a .adv-card__img {
  filter: drop-shadow(0 0 4px rgba(255, 111, 0, 0.25));
}

.adv-card__title {
  margin: 24px 0 0;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 600;
  color: #000;
}

.adv-card__desc {
  margin: 12px 0 0;
  font-size: clamp(15px, 1.8vw + 0.2rem, 20px);
  color: rgba(31, 38, 51, 0.72);
  font-weight: 400;
}

/* ========== 关于我们 ========== */
.about {
  position: relative;
  padding: clamp(48px, 8vw, 80px) var(--page-pad-x) clamp(72px, 12vw, 120px);
  overflow: hidden;
}

.about__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #e8f4ff 0%, #f5fbff 100%);
}

.about__bg-img {
  position: absolute;
  left: 50%;
  bottom: clamp(-80px, -12vw, -120px);
  transform: translateX(-50%);
  /* 与页面同宽撑满，避免超宽屏两侧露白（原 1920px 上限会裁窄） */
  width: min(220vw, 100%);
  max-width: none;
  height: auto;
  min-height: min(400px, 50vh);
  object-fit: cover;
  mask-image: url("./assets/about-mask.svg");
  mask-size: cover;
  mask-position: center bottom;
  -webkit-mask-image: url("./assets/about-mask.svg");
  -webkit-mask-size: cover;
}

.about__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: min(820px, 100% - 32px);
  margin: 0 auto;
  text-align: center;
}

.about__title {
  margin: 0;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  font-family: "MiSans", "PingFang SC", sans-serif;
  color: #000;
}

.about__text {
  margin: 32px 0 0;
  font-size: clamp(15px, 2vw + 0.35rem, 20px);
  line-height: 1.75;
  color: var(--brand-text);
}

.about__text p {
  margin: 0 0 0.5em;
}

/* ========== Footer ========== */
.footer {
  position: relative;
  background-color: #1a1a1a;
  background-image: url("./assets/footer-bg.svg");
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  color: #fff;
  padding: clamp(36px, 5vw, 48px) clamp(16px, 6vw, 300px) clamp(24px, 4vw, 32px);
}

.footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(24px, 4vw, 40px);
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

@media (max-width: 600px) {
  .footer__top {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer__brand {
    flex-direction: column;
    align-items: center;
  }

  .footer__download {
    width: 100%;
    justify-content: center;
  }
}

.footer__brand {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.footer__brand-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.footer__brand-icon img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.footer__brand-text strong {
  display: block;
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 500;
  margin-bottom: 8px;
}

.footer__brand-text span {
  font-size: clamp(13px, 1.6vw, 16px);
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
}

.footer__download {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer__qr {
  width: 80px;
  height: 80px;
  border-radius: 4px;
  border: 2px solid #ffaa89;
  overflow: hidden;
  flex-shrink: 0;
}

.footer__qr img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.footer__dl-text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
}

.footer__dl-text img {
  width: 24px;
  height: 24px;
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  margin-top: 28px;
  font-size: clamp(11px, 1.4vw, 12px);
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.5);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  text-align: center;
}

@media (min-width: 900px) {
  .footer__legal {
    justify-content: flex-start;
    text-align: left;
  }
}

.footer__legal a {
  color: inherit;
  text-decoration: none;
}

.footer__legal a:hover {
  text-decoration: underline;
}

.footer__sep {
  width: 1px;
  height: 10px;
  background: rgba(255, 255, 255, 0.5);
  display: inline-block;
  vertical-align: middle;
}

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