/* ==========================================================================
   恋小喵 落地页样式
   --------------------------------------------------------------------------
   目录
   01. 设计变量与基础重置
   02. 首屏 Hero
   03. 功能区块（通用）
   04. 各色区块
   05. 装饰（爱心 / 光晕）
   06. 扫码区块与协议链接
   07. 页脚
   08. 动效与提示
   09. 手机端响应式（<= 767px）
   --------------------------------------------------------------------------
   桌面端以 1920px 设计稿为基准：--u = 1 设计像素对应的实际 CSS 像素。
   修改任意尺寸只需调整 calc(N * var(--u)) 里的 N，无需逐个改断点。
   手机端以 390px 设计稿为基准，使用常规 px / flex 自适应。
   所有图片路径均为英文，资源位于 ../images/。
   主要资源对照（替换图片时保持同名即可，无需改代码）：
     hero-bg-desktop.png / hero-bg-mobile.png  首屏背景（PC / 手机）
     hero-title.png                           首屏主标题切图（白字透明底）
     logo-app.png / logo-horizontal.png       竖版 App 图标 / 横版角标
     icon-apple.png / icon-android.png         下载按钮图标
     phone-match / phone-video / phone-chat    手机端完整长手机
     phone-screen-match / video / chat / feed PC 端底部渐隐版手机（与手机端不同）
     heart-cluster-*.png / heart-outline-*.png 手机端描边爱心装饰
     qrcode.jpg                                公众号二维码
     reference-desktop.png / reference-mobile.png  原始设计稿（仅参考）
   ========================================================================== */

/* 01. 设计变量与基础重置 ================================================== */
:root {
  /* 1 设计像素 = 1920 分之一的视口宽，最大 1px（超宽屏不再放大） */
  --u: min(1px, 0.0520833vw);

  /* 区块渐变色（取自设计稿） */
  --blue-top:    #3292ff;
  --blue-bottom: #32b0ff;
  --purple-top:  #A264FF;
  --purple-bottom: #DC73FF;
  --orange-top:  #FF9F19;
  --orange-bottom: #FFBD3B;
  --pink-top:    #FF4CCC;
  --pink-bottom: #FF73A4;

  --text-light: #ffffff;
  --text-dark: #1a1a1a;
  --footer-bg: #171717;
  --footer-bg-mobile: #994365;

  --font-cn: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
             "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;

  /* PC 垂直节奏（手机端在断点里重置为 0）：
     - 手机样机在区块内垂直居中，不再做内容行整体位移；
     - 文案沿用 78.13 : 216.41 的留白比例，相对区块中心上提 142 设计px；
     - 扫码区文案单独居中，见 06 节。
     调整下面三个变量即可整体改垂直节奏，无需逐个改断点。 */
  --copy-shift: calc(-142 * var(--u));

  /* 三个功能区块等高；扫码区比它们高 43px（底部留给协议链接）。
     43px 写死为 CSS px，保证任意视口下高度差都精确等于 43px；
     若希望随设计稿等比缩放，改成 calc(43 * var(--u)) 即可。 */
  --feature-height: calc(880 * var(--u));
  --pink-extra: 43px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-cn);
  color: var(--text-light);
  background: var(--text-dark);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }

/* 仅供屏幕阅读器 */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* 02. 首屏 Hero ========================================================== */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  height: calc(900 * var(--u));
  min-height: 560px;
  overflow: hidden;
  background-color: #241a12;
  background-image: linear-gradient(90deg, rgba(0, 0, 0, .38) 0%, rgba(0, 0, 0, .08) 55%, rgba(0, 0, 0, 0) 100%),
                    url("../images/hero-bg-desktop.png");
  background-position: center, center;
  background-size: cover, cover;
  background-repeat: no-repeat;
}

.hero__inner {
  width: calc(1200 * var(--u));
  margin: 0 auto;
  transform: translateY(calc(-24 * var(--u))); /* 设计稿内容整体略偏上 */
}

.hero__title { margin-bottom: calc(48 * var(--u)); }
.hero__title img { width: calc(590 * var(--u)); }

/* 可编辑文案方案：把标题切图换成文本时启用（见 index.html 注释） */
.hero__title--text {
  font-size: calc(76 * var(--u));
  font-weight: 800;
  letter-spacing: calc(2 * var(--u));
  line-height: 1.1;
}
.hero__title--text .paw { font-size: .55em; vertical-align: .55em; margin-left: .1em; }
.hero__subtitle {
  font-size: calc(46 * var(--u));
  font-weight: 700;
  letter-spacing: calc(1 * var(--u));
  margin-top: calc(14 * var(--u));
}

.hero__actions { display: flex; gap: calc(24 * var(--u)); }

.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: calc(10 * var(--u));
  min-width: calc(235 * var(--u));
  height: calc(75 * var(--u));
  padding: 0 calc(20 * var(--u));
  border-radius: 999px;
  background: #fff;
  color: var(--text-dark);
  font-size: calc(28 * var(--u));
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
  box-shadow: 0 calc(6 * var(--u)) calc(20 * var(--u)) rgba(0, 0, 0, .12);
  transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease;
}
.btn-download img {
  width: calc(40 * var(--u));
  height: calc(40 * var(--u));
  object-fit: contain;
}
.btn-download:hover {
  transform: translateY(calc(-4 * var(--u)));
  background: #fff6fb;
  box-shadow: 0 calc(12 * var(--u)) calc(26 * var(--u)) rgba(0, 0, 0, .2);
}
.btn-download:active { transform: translateY(0); }
.btn-download:focus-visible { outline: 3px solid #ff70a8; outline-offset: 4px; }

.hero__app-icon { display: none; }

.hero__corner-logo {
  position: absolute;
  right: 9%;
  bottom: 9%;
  width: calc(160 * var(--u));
  pointer-events: none;
}

/* 03. 功能区块（通用） ==================================================== */
.feature {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  min-height: var(--feature-height);
  isolation: isolate;
}

.feature__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: calc(40 * var(--u));
  width: calc(1200 * var(--u));
  margin: 0 auto;
  /* 不做整体位移：手机样机由 flex / grid 的 align-items 保持在区块内垂直居中，
     文案的上提只作用在 .feature__copy 自身，不会带着图片一起偏移。 */
}
/* 反向布局：手机在左、文案在右（紫 / 粉区块） */
.feature__inner--reverse .feature__visual { order: 1; }
.feature__inner--reverse .feature__copy   { order: 2; }

.feature__copy {
  position: relative;
  top: var(--copy-shift);
  max-width: calc(520 * var(--u));
}

.feature__title {
  font-size: calc(48 * var(--u));
  font-weight: 800;
  letter-spacing: calc(1 * var(--u));
  line-height: 1.25;
}
.feature__desc {
  margin-top: calc(28 * var(--u));
  font-size: calc(26 * var(--u));
  font-weight: 400;
  letter-spacing: .02em;
  line-height: 1.6;
  opacity: .95;
}

.feature__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* PC 端使用底部渐隐版截图（picture 会在手机端切回完整长手机）。
   图片自带左右透明留白，手机主体约占 62% 宽度，故整体宽度设为 530 设计px。 */
.feature__phone {
  position: relative;
  z-index: 2;
  display: block;
  width: calc(530 * var(--u));
  filter: drop-shadow(0 calc(12 * var(--u)) calc(22 * var(--u)) rgba(0, 0, 0, .08));
}
.feature__phone img { display: block; width: 100%; height: auto; }

/* 手机背后只保留阴影轮廓：多层同心圆环 + 柔和外发光，无实心填充 */
.feature__glow {
  position: absolute;
  z-index: 1;
  width: calc(430 * var(--u));
  height: calc(430 * var(--u));
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 0 0 calc(34 * var(--u)) rgba(255, 255, 255, .05),
              0 0 0 calc(68 * var(--u)) rgba(255, 255, 255, .035),
              0 0 calc(40 * var(--u)) rgba(255, 255, 255, .06);
}

/* 04. 各色区块 =========================================================== */
/* 蓝 / 紫 / 橙 三个区块等高，高度统一由 --feature-height 控制 */
.feature--blue   { background: linear-gradient(160deg, var(--blue-top), var(--blue-bottom)); }
.feature--purple { background: linear-gradient(180deg, var(--purple-top), var(--purple-bottom)); }
.feature--orange { background: linear-gradient(180deg, var(--orange-top), var(--orange-bottom)); }
/* 扫码区比其余三个高 43px，多出来的高度用于承载底部协议链接 */
.feature--pink {
  background: linear-gradient(180deg, var(--pink-top), var(--pink-bottom));
  min-height: calc(var(--feature-height) + var(--pink-extra));
}

/* 05. 装饰 =============================================================== */
/* 描边爱心为手机端设计元素，桌面端保持干净只留光晕 */
.feature__decor { display: none; }

/* 06. 扫码区块与协议链接 ================================================= */
/* 扫码区沿用同一套 PC 渐隐截图与同心圆轮廓。
   与其余三个模块的区别：文案不上提，和手机样机一起在区块内垂直居中。 */
.feature__inner--download { align-items: center; }
.feature--pink .feature__copy { top: 0; }

.feature__title--download { font-size: calc(44 * var(--u)); }
.feature__desc--download  { font-size: calc(40 * var(--u)); font-weight: 700; margin-top: calc(26 * var(--u)); }

.qrcode {
  width: calc(210 * var(--u));
  margin-top: calc(46 * var(--u));
  padding: calc(8 * var(--u));
  border-radius: calc(14 * var(--u));
  background: #fff;
  transition: transform .3s ease, box-shadow .3s ease;
}
.qrcode:hover { transform: scale(1.04); box-shadow: 0 12px 30px rgba(0, 0, 0, .18); }
.qrcode img { width: 100%; border-radius: calc(6 * var(--u)); }

.legal-links {
  position: absolute;
  z-index: 3;
  bottom: calc(50 * var(--u));
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(24 * var(--u));
  font-size: calc(20 * var(--u));
  font-weight: 600;
}
.legal-links a { opacity: .9; transition: opacity .2s ease; }
.legal-links a:hover { opacity: 1; text-decoration: underline; }
.legal-links__divider { opacity: .6; }

/* 07. 页脚 =============================================================== */
.site-footer {
  background: var(--footer-bg);
  padding: calc(26 * var(--u)) 0;
}
.site-footer__inner {
  /* border: 1px solid red; */
  display: grid;
  text-align: center;
  justify-content: center;
  grid-template-columns: repeat(3, 1fr);
  gap: calc(40 * var(--u));
  width: calc(1200 * var(--u));
  margin: 0 auto;
}
.footer-item__label {
  /* border: 1px solid red; */
  font-size: calc(20 * var(--u));
  font-weight: 700;
  margin-bottom: calc(18 * var(--u));
}
.footer-item__value {
  display: flex;
  justify-content: center;
  /* border: 1px solid red; */
  align-items: center;
  gap: calc(8 * var(--u));
  font-size: calc(18 * var(--u));
  color: rgba(255, 255, 255, .45);
  line-height: 1.5;
  transition: color .2s ease;
}
a.footer-item__value:hover { color: rgba(255, 255, 255, .85); }
.footer-item__icon { display: none; }

/* 08. 动效与提示 ========================================================= */
/* 内容默认可见：即使脚本未加载 / 被禁用，页面也完整可读。
   脚本只在元素进入视口时追加一次性入场动画。 */
.reveal { opacity: 1; }
.js .reveal.is-entering { animation: fade-up .7s cubic-bezier(.22, .8, .3, 1) both; }
@keyframes fade-up {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}

.toast {
  position: fixed;
  z-index: 99;
  left: 50%;
  bottom: 40px;
  transform: translate(-50%, 20px);
  padding: 12px 22px;
  border-radius: 999px;
  background: rgba(24, 24, 28, .92);
  color: #fff;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* 09. 手机端响应式（<= 767px，以 390px 设计稿为基准） =================== */
@media (max-width: 767px) {
  /* 手机端回到常规上下堆叠，取消桌面端的整体上移 */
  :root {
    --u: 1px;
    --copy-shift: 0px;
    --feature-height: 0px; /* 手机端高度由内容撑开，见下方 .feature 规则 */
  }

  /* --- Hero --- */
  .hero {
    height: 100svh;
    min-height: 700px;
    max-height: 900px;
    align-items: stretch;
    background-image: linear-gradient(180deg, rgba(0, 0, 0, .42) 0%, rgba(0, 0, 0, 0) 34%,
                                      rgba(0, 0, 0, 0) 68%, rgba(0, 0, 0, .28) 100%),
                      url("../images/hero-bg-mobile.png");
    background-position: center, center top;
  }
  .hero__inner {
    width: 100%;
    height: 100%;
    padding: 88px 0 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    transform: none;
  }
  .hero__title { margin: 0; }
  .hero__title img { width: 290px; }
  .hero__title--text { font-size: 42px; }
  .hero__subtitle { font-size: 21px; margin-top: 10px; text-align: center; }

  .hero__app-icon {
    display: block;
    width: 72px;
    margin: auto 0;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .35));
  }

  .hero__actions {
    flex-direction: column;
    gap: 14px;
    width: 100%;
    padding: 0 40px;
    flex: 0 0 auto;
  }
  .btn-download {
    width: 100%;
    min-width: 0;
    height: 52px;
    gap: 8px;
    font-size: 17px;
  }
  .btn-download img { width: 24px; height: 24px; }
  .hero__corner-logo { display: none; }

  /* --- 功能区块 --- */
  .feature {
    min-height: 0;
    padding: 72px 0 66px;
    text-align: center;
  }
  .feature--purple, .feature--orange, .feature--pink { min-height: 0; }

  .feature__inner {
    width: 100%;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 44px;
  }
  /* 手机端统一：文案在上，手机在下 */
  .feature__inner .feature__copy,
  .feature__inner .feature__visual { order: 0; }
  .feature__inner--reverse .feature__copy   { order: 1; }
  .feature__inner--reverse .feature__visual { order: 2; }

  .feature__copy { max-width: none; }
  .feature__title { font-size: 30px; letter-spacing: .5px; }
  .feature__desc { margin-top: 12px; font-size: 16px; line-height: 1.6; }
  .feature__phone { width: 272px; }
  .feature__glow { display: none; } /* 手机端用描边爱心代替圆形光晕 */

  /* 描边爱心自带约 20% 白色透明度（与设计稿一致），此处不再叠加 opacity */
  .feature__decor {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
  }
  .decor {
    position: absolute;
    opacity: 1;
    width: 76px;
  }
  .decor--heart-1 { top: 34px;  left: -14px; width: 68px; opacity: .95; }
  .decor--heart-2 { top: 128px; left: 24px;  width: 46px; opacity: .9; }
  .decor--heart-3 { bottom: 196px; right: 26px; width:86px; opacity: .9; }
  .decor--heart-4 { bottom: 210px; left: 8px; width: 86px; opacity: .85; }
  .decor--heart-behind {
    top: 32px;
    left: 19px;
    width: 130px;
    /* transform: translateX(-64%); */
    /* opacity: .8; */
  }
  .feature--purple .decor--heart-1 { left: auto; right: -10px; }
  .feature--purple .decor--heart-2 {width: 130px; top: 32px; left: auto; right: 19px; }
  .feature--purple .decor--heart-3 {width: 86px; right: auto; left: 0px; }
  .feature--pink .decor--heart-1 { top: 18px; right: 8px; left: auto; }

  /* --- 扫码区块 --- */
  /* feature 默认是横向 flex；手机端改为纵向，协议链接才会排在内容下方 */
  .feature--pink {
    flex-direction: column;
    justify-content: space-between;
    min-height: 720px;
    padding: 108px 0 56px;
  }
  .feature__inner--download { gap: 0; }
  .feature__visual--feed { display: none; } /* 手机端设计稿无此手机图 */
  .feature__copy--download {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .qrcode { order: -1; width: 172px; margin: 0 0 34px; padding: 6px; border-radius: 10px; }
  .qrcode img { border-radius: 4px; }
  .feature__title--download { font-size: 30px; }
  .feature__desc--download { font-size: 17px; font-weight: 400; margin-top: 12px; }

  .legal-links {
    position: static;
    margin-top: 60px;
    gap: 16px;
    font-size: 15px;
  }

  /* --- 页脚 --- */
  .site-footer {
    background: var(--footer-bg-mobile);
    padding: 22px 24px 26px;
  }
  .site-footer__inner {
    width: 100%;
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
  }
  .footer-item__label { display: none; }
  .footer-item:nth-child(3) { grid-column: 1 / -1; }
  .footer-item__value {
    justify-content: start;
    gap: 5px;
    font-size: 11px;
    color: rgba(255, 255, 255, .92);
  }
  .footer-item__value span { min-width: 0; white-space: nowrap; }
  .footer-item__icon {
    display: block;
    flex: 0 0 auto;
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .toast { bottom: 24px; font-size: 13px; white-space: nowrap; }
}

/* 小屏手机（<= 360px）等比例收紧 */
@media (max-width: 360px) {
  .hero__title img { width: 260px; }
  .hero__actions { padding: 0 28px; }
  .feature__title { font-size: 27px; }
  .feature__phone { width: 240px; }
  .qrcode { width: 156px; }
}

/* 尊重系统「减少动态效果」设置 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js .reveal.is-entering { animation: none; }
}
