/* 翻忆 Riffle · 落地页专用样式
   只服务 index.html。privacy / terms / support 三页仍用 styles.css，互不影响。
   设计取向：极致暗黑 OLED —— 纯黑底、大留白、克制的细体大标题，
   唯一点缀色是 App 图标里那个蓝。语义色沿用 App 内 AppTheme.swift。 */

:root {
  --bg: #000000;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-solid: #0c0c0d;
  --stroke: rgba(255, 255, 255, 0.10);
  --hairline: rgba(255, 255, 255, 0.08);

  --text: #f5f5f7;
  --text-dim: rgba(245, 245, 247, 0.64);
  --text-faint: rgba(245, 245, 247, 0.46);

  --accent: #5cc8ec;

  /* 与 App 内四个语义色一致 */
  --delete: #ff6b6b;
  --favorite: #ffc85c;
  --viewed: #59c7e8;
  --freed: #70e3b5;

  --maxw: 1080px;
  --maxw-wide: 1300px;
  --section-y: clamp(4.5rem, 9vw, 8rem);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "PingFang SC", "Segoe UI", Roboto, sans-serif;
  --font-display: "Covered By Your Grace", "Bradley Hand", "Segoe Print", var(--font);
}

* { box-sizing: border-box; }

figure { margin: 0; }
ul { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

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

/* ---------- 版心 ---------- */

.shell {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 2.5rem);
}
.shell--wide { max-width: var(--maxw-wide); }

section { padding-block: var(--section-y); }

/* ---------- 排版 ---------- */

.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.1rem;
}

h1, h2, h3 {
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.06;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 7vw, 5rem); }
h2 { font-size: clamp(1.9rem, 4.6vw, 3.35rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.015em; }

/* 区块小标题用手写体 Covered By Your Grace（呼应 App Store 截图里的营销字体）。
   Hero 和尾部那句品牌语用回原本的系统字体。该字体单字重、仅拉丁，
   中文标题一律回退系统字体。 */
main h2 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.16;
  font-size: clamp(2.3rem, 5.2vw, 3.9rem);
}
.closer h2 {
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.06;
  font-size: clamp(1.9rem, 4.6vw, 3.35rem);
}

:lang(zh-Hans) main h2 {
  font-family: var(--font);
  font-weight: 600;
  line-height: 1.1;
  font-size: clamp(1.9rem, 4.6vw, 3.35rem);
}
:lang(zh-Hans) h1,
:lang(zh-Hans) h2,
:lang(zh-Hans) h3 { letter-spacing: 0; }
:lang(zh-Hans) .lede { max-width: 34ch; }

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.55;
  color: var(--text-dim);
  max-width: 40ch;
  margin: 1.6rem 0 0;
}

p { margin: 0; }

/* ---------- 顶栏 ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem clamp(1.25rem, 5vw, 2.5rem);
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: saturate(1.6) blur(18px);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border-bottom-color: var(--hairline);
}

.nav__mark img { height: 22px; width: auto; }

.langswitch {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 999px;
}
.langswitch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-faint);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}
.langswitch button[aria-pressed="true"] {
  background: var(--text);
  color: #000;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding-top: clamp(3.5rem, 9vw, 7rem);
  padding-bottom: 0;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -18%;
  left: 50%;
  width: min(900px, 120vw);
  aspect-ratio: 1;
  translate: -50% 0;
  background: radial-gradient(circle, rgba(92, 200, 236, 0.16), transparent 62%);
  pointer-events: none;
}
.hero__inner { position: relative; }

.hero h1 { margin-inline: auto; max-width: 16ch; }
.hero .lede { margin-inline: auto; text-align: center; max-width: 46ch; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.4rem;
  align-items: center;
  justify-content: center;
  margin-top: 2.4rem;
}

.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--text);
  color: #000;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.btn-store:hover { transform: translateY(-1px); opacity: 0.92; }
.btn-store svg { width: 18px; height: 18px; fill: currentColor; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-dim);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.18s ease;
}
.btn-ghost:hover { color: var(--text); }

.cta-note {
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--text-faint);
  letter-spacing: 0.01em;
}

.hero__shot {
  position: relative;
  margin: clamp(3rem, 7vw, 5.5rem) auto 0;
  max-width: 1120px;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
}
.hero__shot img {
  width: 100%;
  border-radius: clamp(16px, 2.2vw, 26px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 60px 120px -40px rgba(0, 0, 0, 0.9);
}

/* ---------- 通用：区块标题 ---------- */

.section-head { max-width: 34ch; }
.section-head .lede { text-align: left; margin-left: 0; }

/* ---------- 机制：三张流程截图 ---------- */

.flow__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 3vw, 2.25rem);
  margin-top: clamp(3rem, 6vw, 4.5rem);
}

.shot {
  border-radius: clamp(20px, 2.2vw, 30px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 40%), var(--panel-solid);
  overflow: hidden;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.8);
}
.shot img { width: 100%; }

.flow__item figcaption {
  margin-top: 1.1rem;
  color: var(--text-dim);
  font-size: 0.95rem;
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
}
.flow__item figcaption .dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  translate: 0 -2px;
}
.dot.viewed { background: var(--viewed); }
.dot.delete { background: var(--delete); }
.dot.favorite { background: var(--favorite); }
.dot.freed { background: var(--freed); }

/* ---------- 三条主线 ---------- */

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}
.pillar {
  padding-top: 1.6rem;
  border-top: 2px solid var(--edge, var(--stroke));
}
.pillar--viewed { --edge: var(--viewed); }
.pillar--freed { --edge: var(--freed); }
.pillar--favorite { --edge: var(--favorite); }

.pillar h3 { margin-bottom: 0.7rem; }
.pillar p { color: var(--text-dim); font-size: 0.98rem; }

/* ---------- Relive 特写 ---------- */

.relive {
  text-align: center;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(92, 200, 236, 0.10), transparent 60%);
}
.relive h2 { max-width: 18ch; margin-inline: auto; }
.relive .lede { text-align: center; margin-inline: auto; max-width: 44ch; }
.relive__device {
  margin: clamp(2.5rem, 5vw, 3.5rem) auto 0;
  max-width: 340px;
}
.relive__device img {
  filter: drop-shadow(0 50px 90px rgba(0, 0, 0, 0.75));
}

/* ---------- 顺带的收获 / 数据 ---------- */

.tally__grid {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}
.tally__shot {
  max-width: 264px;
  margin-inline: auto;
}
.tally__shot img {
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.8);
}
.tally__figures {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  margin-top: 2rem;
}
.figure b {
  display: block;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.figure.viewed b { color: var(--viewed); }
.figure.delete b { color: var(--delete); }
.figure.freed b { color: var(--freed); }
.figure span {
  font-size: 0.85rem;
  color: var(--text-faint);
}
.tally__note {
  margin-top: 1.6rem;
  font-size: 0.8rem;
  color: var(--text-faint);
}

/* ---------- 信任 ---------- */

.trust { text-align: center; }
.trust h2 { max-width: 16ch; margin-inline: auto; }
.trust p {
  color: var(--text-dim);
  max-width: 52ch;
  margin: 1.4rem auto 0;
  font-size: 1rem;
}
.trust__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
  margin-top: 2.2rem;
}
.trust__chips li {
  list-style: none;
  font-size: 0.85rem;
  color: var(--text-dim);
  padding: 0.5rem 1rem;
  border: 1px solid var(--stroke);
  border-radius: 999px;
}

/* ---------- 如何造出来的：AI 工具 logo 滚动 ---------- */

.builtwith {
  text-align: center;
  border-top: 1px solid var(--hairline);
  padding-block: clamp(4rem, 8vw, 6.5rem);
}
.builtwith__line {
  color: var(--text-dim);
  font-size: 1rem;
  max-width: 34ch;
  margin: 1rem auto 0;
}
:lang(zh-Hans) .builtwith__line { max-width: 28ch; }

.mq {
  margin-top: clamp(2.5rem, 5vw, 3.75rem);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}
.mq__track {
  display: flex;
  width: max-content;
  animation: mq-scroll 34s linear infinite;
}
.mq:hover .mq__track { animation-play-state: paused; }

.mq__set {
  display: flex;
  align-items: center;
  gap: clamp(2.75rem, 7vw, 5.5rem);
  padding-right: clamp(2.75rem, 7vw, 5.5rem);
  margin: 0;
  list-style: none;
}

.ml {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: none;
  color: rgba(245, 245, 247, 0.5);
}
.ml svg { width: 21px; height: 21px; fill: currentColor; flex: none; }
.ml--oc svg { fill: none; stroke: currentColor; stroke-width: 7; stroke-linejoin: round; }
.ml span {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

@keyframes mq-scroll {
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .mq { -webkit-mask-image: none; mask-image: none; }
  .mq__track { animation: none; width: 100%; }
  .mq__set { flex-wrap: wrap; justify-content: center; gap: 1.5rem 2.5rem; padding: 0; }
  .mq__set + .mq__set { display: none; }
}

/* ---------- 尾部 CTA ---------- */

.closer {
  text-align: center;
  border-top: 1px solid var(--hairline);
}
.closer img.closer__mark {
  height: 30px;
  width: auto;
  margin: 0 auto 2rem;
  opacity: 0.9;
}
.closer h2 { max-width: 18ch; margin-inline: auto; }
.closer .cta-row { margin-top: 2.4rem; }

/* ---------- 页脚 ---------- */

.foot {
  border-top: 1px solid var(--hairline);
  padding-block: 3rem 3.5rem;
}
.foot__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  align-items: center;
  justify-content: space-between;
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  font-size: 0.88rem;
}
.foot nav a { color: var(--text-dim); transition: color 0.18s ease; }
.foot nav a:hover { color: var(--text); }
.foot__tagline { font-size: 0.82rem; color: var(--text-faint); }
.foot__meta {
  margin-top: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  font-size: 0.8rem;
  color: var(--text-faint);
}
.foot__meta a { color: var(--text-faint); }
.foot__meta a:hover { color: var(--text-dim); }

/* ---------- 滚动淡入 ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */

@media (max-width: 860px) {
  .pillars { grid-template-columns: 1fr; }
  .tally__grid { grid-template-columns: 1fr; }
  .tally__shot { order: -1; }
  .section-head { max-width: none; }
}

@media (max-width: 720px) {
  .flow__grid { grid-template-columns: 1fr; max-width: 340px; margin-inline: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn-store:hover { transform: none; }
}
