/* PassionfruitAI 发行品牌官网。官网只做印象:
   首屏几张照片慢慢轮换,只有一句 slogan;关于左字右图;三张竖图并排留气氛;产品一行一款;联系压在照片上。
   照片都放在大圆角的面板里,四周留一圈底色,不铺满全屏。
   字体:正文与大标题用思源黑体(标题细字重、正文常规、界面小字中等),标准字 PassionfruitAI 用 Nunito。
   字体是按页面用字裁的子集,改文案要重新裁。 */

@font-face {
  font-family: 'Noto Sans SC';
  src: url('./assets/fonts/noto-sans-sc.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('./assets/fonts/nunito-latin.woff2') format('woff2');
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --bg: #f5f5f7;
  --ink: #1d1d1f;
  --soft: #6e6e73;
  --hair: #d2d2d7;
  --lift: cubic-bezier(0.25, 0.1, 0.25, 1); /* 悬停放大的曲线 */
  --night: #0b0a0e;
  --side: clamp(16px, 9vw, 200px); /* 面板离窗口左右边 */
  --gutter: clamp(24px, 4.5vw, 80px); /* 面板里文字离面板边 */
  --max: 1080px;
  --space: 144px; /* 段与段之间 */
  --font: 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  --frame: 16px; /* 首屏面板离窗口上边 */
  /* 圆角按 Apple 的连续圆角画(main.js 用 60% 平滑生成 clip-path),这里的数值是半径,也是不跑脚本时的普通圆角 */
  --navh: 60px; /* 顶栏胶囊高度 */
  /* 面板左右外边距:至少 --side;超宽屏时面板也封顶在「内容 + 两侧内距」,和顶栏、正文对齐 */
  --edge: max(var(--side), calc((100% - var(--max) - var(--gutter) * 2) / 2));
  --r-panel: 56px;
  --r-photo: 44px;
  color-scheme: light;
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
img { display: block; }
figure { margin: 0; }

.wrap {
  box-sizing: border-box;
  width: 100%;
  max-width: calc(var(--max) + (var(--gutter) + var(--side)) * 2);
  margin: 0 auto;
  padding: 0 calc(var(--gutter) + var(--side));
}
/* 面板里的内容:面板本身已经让出了留边,只留内距,和页面上的文字落在同一条线上 */
.hero .wrap,
.contact .wrap {
  max-width: calc(var(--max) + var(--gutter) * 2);
  padding: 0 var(--gutter);
}

/* ---- 滚动浮现 ---- */
[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 1s ease, transform 1.3s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--rd, 0s);
}
[data-reveal][data-in] { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---- 浮动胶囊顶栏:照片上是深色玻璃,滚到浅色区换浅色玻璃 ---- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  /* 顶栏在照片面板外面,和面板同宽 */
  padding: var(--frame) var(--edge) 0;
  pointer-events: none;
}
.nav__pill {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--navh);
  margin: 0 auto;
  padding: 0 20px 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: rgba(251, 251, 253, 0.82);
  -webkit-backdrop-filter: saturate(1.4) blur(20px);
  backdrop-filter: saturate(1.4) blur(20px);
  box-shadow: 0 8px 24px -12px rgba(20, 15, 10, 0.2);
  pointer-events: auto;
  transition: background 0.4s ease, border-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}
.nav[data-over] .nav__pill {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(15, 12, 14, 0.24);
  box-shadow: none;
  color: #fff;
}
.nav[data-over] .nav__links a { color: rgba(255, 255, 255, 0.8); }
.nav[data-over] .nav__links a:hover { color: #fff; }
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Nunito', var(--font); /* 标准字沿用旧字体,和正文分开 */
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.nav__brand img { border-radius: 8px; }
.nav__links { display: flex; gap: 28px; margin-left: auto; font-size: 15px; font-weight: 500; }
.nav__links a { text-decoration: none; color: var(--soft); transition: color 0.3s ease; white-space: nowrap; }
.nav__links a:hover { color: var(--ink); }

/* ---- 首屏:照片轮换 + 一句话 ---- */
.hero {
  position: relative;
  --top: calc(var(--frame) * 2 + var(--navh)); /* 顶栏占掉的高度 */
  display: grid;
  place-items: center;
  height: calc(100vh - var(--top) - var(--frame));
  height: calc(100svh - var(--top) - var(--frame));
  min-height: 540px;
  margin: 0 var(--edge);
  overflow: hidden;
  border-radius: var(--r-panel);
  isolation: isolate;
  background: var(--night);
  color: #fff;
}
.hero__slides { position: absolute; inset: 0; }
.hero__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 2s ease, transform 9s linear;
  user-select: none;
}
.hero__slide[data-on] { opacity: 1; transform: scale(1); }
.hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 8, 10, 0.38), rgba(10, 8, 10, 0) 30%),
    linear-gradient(0deg, rgba(10, 8, 10, 0.62), rgba(10, 8, 10, 0) 55%);
}
.hero__copy {
  position: relative;
  text-align: center;
}
.hero__title {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(38px, 4.8vw, 76px);
  font-weight: 300;
  line-height: 1.26;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.3);
  animation: rise 1.6s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}
.hero__br { display: none; } /* 宽屏一行,窄屏断成两行 */
.hero__en {
  margin: 26px 0 0;
  font-family: var(--font);
  font-size: clamp(17px, 1.7vw, 24px);
  font-weight: 300;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.82);
  animation: rise 1.6s cubic-bezier(0.22, 1, 0.36, 1) 0.45s both;
}
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

/* 右下角:第几张 */
.hero__count {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 15px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.82);
  animation: fade 1.2s ease 1s both;
}
@keyframes fade { from { opacity: 0; } }
.hero__bars { display: flex; gap: 6px; }
.hero__bars i { position: relative; display: block; width: 36px; height: 3px; overflow: hidden; border-radius: 2px; background: rgba(255, 255, 255, 0.28); }
.hero__bars i::after { content: ''; position: absolute; inset: 0; background: #fff; transform: scaleX(0); transform-origin: left; }
.hero__bars i[data-done]::after { transform: scaleX(1); }
.hero__bars i[data-on]::after { transform: scaleX(1); transition: transform var(--dwell, 6s) linear; }
.hero__num--total { color: rgba(255, 255, 255, 0.5); }

@media (prefers-reduced-motion: reduce) {
  .hero__slide { transition: none; transform: none; }
  .hero__title, .hero__en, .hero__count { animation: none; }
  .hero__count { display: none; }
}

/* ---- 小标签 ---- */
.label { margin: 0; font-size: 13px; font-weight: 500; letter-spacing: 0.16em; color: var(--soft); }

/* ---- 关于:左字右图 ---- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 96px;
  align-items: center;
  padding-top: var(--space);
  padding-bottom: var(--space);
}
.about__big {
  margin: 28px 0 0;
  font-family: var(--font);
  font-size: clamp(36px, 4.4vw, 64px);
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: 0;
  word-break: keep-all;
}
/* keep-all 不让折行,所以字号要跟着列宽走:最长一行 9 个字,按容器宽的 1/9 收 */
@supports (font-size: 1cqw) {
  .about__text { container-type: inline-size; }
  .about__big { font-size: min(clamp(36px, 4.4vw, 64px), 10.9cqw); }
}
.about__body {
  max-width: 30em;
  margin: 36px 0 0;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.9;
  color: var(--soft);
  text-wrap: pretty;
}
.about__photo { overflow: hidden; border-radius: var(--r-photo); aspect-ratio: 4 / 5; }
.about__photo img { width: 100%; height: 100%; object-fit: cover; }

/* ---- 我们相信:三条主张压在三张竖图上 ---- */
.beliefs .label { margin-bottom: 28px; }
.beliefs__row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 0 var(--edge);
}
.belief {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: var(--r-photo);
  color: #fff;
}
.belief img { width: 100%; height: 100%; object-fit: cover; }
.belief::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(10, 8, 10, 0.78), rgba(10, 8, 10, 0.32) 45%, rgba(10, 8, 10, 0) 72%);
  pointer-events: none;
}
.belief figcaption { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 32px; }
.belief__title { margin: 0; font-family: var(--font); font-size: clamp(26px, 2.6vw, 36px); font-weight: 400; letter-spacing: 0.04em; }
.belief__body { margin: 12px 0 0; max-width: 22em; font-size: 15px; font-weight: 400; line-height: 1.75; color: rgba(255, 255, 255, 0.84); text-wrap: pretty; }

/* ---- 悬停放大:配图和手机上的主张卡,整块等比放大一点 ----
   只动 transform,不改宽高,里面的字不会重新折行。 */
.about__photo,
.belief[data-settled] { transition: transform 0.6s var(--lift); }
@media (hover: hover) and (pointer: fine) {
  .about__photo:hover,
  .belief:hover { transform: scale(1.03); }
  .belief:hover { z-index: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .about__photo, .belief[data-settled] { transition: none; }
  .about__photo:hover, .belief:hover { transform: none; }
}

/* ---- 滚动叙事(Apple 式):全部由滚动进度驱动,往回滚倒着播 ---- */

/* 首屏:钉住一段,面板随滚动后退缩小,照片继续推近,字向上散去 */
.hero-track { height: 170vh; padding-top: calc(var(--frame) * 2 + var(--navh)); box-sizing: border-box; }
.hero-stick { position: sticky; top: calc(var(--frame) * 2 + var(--navh)); }
.hero { transform-origin: 50% 0; will-change: transform; }
.hero__slides { will-change: transform; }
.hero__copy, .hero__count { will-change: transform, opacity; }

/* 大字逐字点亮 */
[data-light] .ch { color: rgba(29, 29, 31, 0.16); transition: color 0.35s ease; }
[data-light] .ch[data-lit] { color: var(--ink); }

/* 配图、联系面板:进场时从小一点长到原大 */
[data-grow] { transform-origin: 50% 100%; will-change: transform; }
.contact { transform-origin: 50% 0; will-change: transform; }

/* 品牌主张:宽屏钉住三屏,左边三条逐条点亮,右边大图跟着换 */
.beliefs__row { display: none; }
.beliefs { height: 300vh; }
.beliefs__pin {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100vh;
  height: 100svh;
  padding-top: 76px;
  box-sizing: border-box;
}
.beliefs__pin .label { margin-bottom: 0; }
.beliefs__stage {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 80px;
  align-items: center;
  margin-top: 32px;
}
.beliefs__list { display: grid; gap: 36px; margin: 0; padding: 0; list-style: none; }
.tenet { display: grid; grid-template-columns: 3px minmax(0, 1fr); gap: 24px; }
.tenet__bar { position: relative; overflow: hidden; border-radius: 2px; background: var(--hair); }
.tenet__bar i { position: absolute; inset: 0; background: var(--ink); transform: scaleY(var(--fill, 0)); transform-origin: top; }
.tenet__title {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(28px, 2.8vw, 40px);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(29, 29, 31, 0.22);
  transition: color 0.5s var(--lift);
}
.tenet__body {
  max-width: 24em;
  margin: 10px 0 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.8;
  color: rgba(110, 110, 115, 0.4);
  transition: color 0.5s var(--lift);
}
.tenet[data-on] .tenet__title { color: var(--ink); }
.tenet[data-on] .tenet__body { color: var(--soft); }
.beliefs__media {
  position: relative;
  height: min(68svh, 640px);
  overflow: hidden;
  border-radius: var(--r-panel);
  background: var(--night);
}
.tenet__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 0.9s ease, transform 1.4s var(--lift);
}
.tenet__img[data-on] { opacity: 1; transform: scale(1); }

/* 窄屏和减弱动态效果:不钉住,主张回到横滑卡片,大字直接全亮 */
@media (max-width: 899px), (prefers-reduced-motion: reduce) {
  .hero-track { height: auto; }
  .hero-stick { position: static; }
  .beliefs { height: auto; }
  .beliefs__pin { position: static; height: auto; padding-top: 0; }
  .beliefs__stage { display: none; }
  .beliefs__row { display: grid; }
  .beliefs__pin .label { margin-bottom: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  [data-light] .ch { color: inherit; transition: none; }
  .tenet__img, .tenet__title, .tenet__body { transition: none; }
}

/* ---- 产品:一行一款,细线分隔 ---- */
.apps {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 96px;
  padding-top: var(--space);
  padding-bottom: var(--space);
}
.apps { align-items: center; }
.apps__big {
  margin: 28px 0 0;
  font-family: var(--font);
  font-size: clamp(36px, 4.4vw, 64px);
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: 0;
  word-break: keep-all;
}
/* 同上:最长一行 8 个字 */
@supports (font-size: 1cqw) {
  .apps__intro { container-type: inline-size; }
  .apps__big { font-size: min(clamp(36px, 4.4vw, 64px), 12.2cqw); }
}
.apps__list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--hair); }
.app {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 26px 0;
  border-bottom: 1px solid var(--hair);
}
.app__icon { width: 56px; height: 56px; border-radius: 22.37%; /* iOS 图标的圆角比例 */ }
.app__name { margin: 0; font-size: 21px; font-weight: 500; letter-spacing: -0.005em; }
.app__tag { margin: 2px 0 0; font-size: 15px; font-weight: 400; color: var(--soft); }
.app__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.app__link:hover { text-decoration: underline; }
.app__link--soon { color: var(--soft); }
.app__link--soon:hover { text-decoration: none; }

/* ---- 联系:压在照片上 ---- */
.contact {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 84vh;
  margin: 0 var(--edge);
  padding: 128px 0;
  box-sizing: border-box;
  overflow: hidden;
  border-radius: var(--r-panel);
  isolation: isolate;
  background: var(--night);
  color: #fff;
}
.contact__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
  user-select: none;
}
.contact__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 7, 10, 0.82), rgba(8, 7, 10, 0.4) 75%); }
.contact__inner { position: relative; }
.contact__title {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(44px, 6vw, 88px);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: 0.02em;
}
.contact__lead { margin: 22px 0 0; font-size: 17px; font-weight: 400; line-height: 1.8; color: rgba(255, 255, 255, 0.76); }
.contact__list { max-width: 640px; margin: 48px 0 0; }
.contact__row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 24px;
  align-items: baseline;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}
.contact__row dt { font-size: 15px; font-weight: 500; letter-spacing: 0.1em; }
.contact__row dd { margin: 0; font-size: 16px; font-weight: 400; color: rgba(255, 255, 255, 0.82); }
.contact__row a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.4); text-underline-offset: 4px; }
.contact__row a:hover { text-decoration-color: #fff; }

/* ---- 页脚 ---- */
.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 40px;
  padding-bottom: 48px;
}
.foot .nav__brand { font-size: 15px; }
.foot__fine { margin: 0; font-size: 13px; font-weight: 400; color: var(--soft); }
.foot__icp { margin-left: 14px; color: inherit; text-decoration: none; }
.foot__icp:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---- 平板宽度:产品列表在窄的两栏里会被挤成一字一行,先改成单栏 ---- */
@media (max-width: 1199px) {
  .apps { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

/* ---- 手机宽度 ---- */
@media (max-width: 799px) {
  :root { --side: 14px; --gutter: 24px; --space: 96px; --r-panel: 40px; --r-photo: 34px; }
  :root { --navh: 52px; --frame: calc(10px + env(safe-area-inset-top, 0px)); } /* 独立窗口时让开状态栏 */
  .nav__pill { gap: 16px; padding: 0 16px 0 12px; }
  .nav__links { gap: 18px; font-size: 14px; }
  .nav__links a { padding: 12px 3px; margin: -12px -3px; } /* 加大点击区域,不改变胶囊高度 */
  .hero__br { display: inline; }
  .hero__title { font-size: clamp(40px, 12vw, 52px); letter-spacing: 0.01em; }

  .hero__count { bottom: 32px; }
  .hero__bars i { width: 24px; }

  .about { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .about__body { font-size: 17px; }
  /* 大字按最长的「是让人更好地生活。」(9 字)收字号,避免 keep-all 把行撑出容器 */
  .about__big, .apps__big { font-size: clamp(26px, 8.2vw, 36px); }

  .beliefs .beliefs__row { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 0 var(--side); scroll-padding: 0 var(--side); }
  .beliefs__row::-webkit-scrollbar { display: none; }
  .belief { flex: 0 0 78vw; scroll-snap-align: start; }
  .belief figcaption { padding: 24px; }

  .apps { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  /* 手机上链接换到下一行:描述能占满整行,不会把「同一天」断成两半 */
  .app {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "icon text" "link link";
    column-gap: 14px;
    row-gap: 4px;
    padding: 20px 0;
  }
  .app__icon { grid-area: icon; align-self: start; width: 48px; height: 48px; }
  .app__text { grid-area: text; }
  .app__link { grid-area: link; justify-self: end; padding: 8px 2px; }
  .app__name { font-size: 19px; }
  .app__tag { font-size: 14px; }

  .contact { min-height: 0; padding: 96px 0; }
  .contact__shade { background: rgba(8, 7, 10, 0.68); }
  .contact__row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .foot { flex-direction: column; align-items: flex-start; padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px)); }
}

/* ---- 窄手机(320 一类):顶栏再收紧一档,链接不换行 ---- */
@media (max-width: 359px) {
  .nav__pill { gap: 12px; padding: 0 12px 0 10px; }
  .nav__brand { gap: 8px; font-size: 15px; }
  .nav__links { gap: 14px; font-size: 13px; }
}
