/* Last Here 官网样式：深色、克制，强调色与 App 一致（#FFBE61） */
:root {
  --bg: #0b0b0c;
  --bg-alt: #121214;
  --card: #18181b;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f5f5f7;
  --muted: rgba(245, 245, 247, 0.66);
  --accent: #ffbe61;
  --radius: 20px;
  --wrap: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 16px; }
h1 { font-size: clamp(40px, 7vw, 72px); font-weight: 700; }
h2 { font-size: clamp(30px, 4.5vw, 46px); font-weight: 700; }
h3 { font-size: 20px; font-weight: 600; }
p { margin: 0 0 16px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap--narrow { max-width: 760px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--accent); color: #000; padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.eyebrow { color: var(--accent); font-size: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 12px; }
.lead, .section__lead { color: var(--muted); font-size: clamp(18px, 2vw, 21px); max-width: 620px; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 24px; border-radius: 999px;
  font-weight: 600; font-size: 16px; text-decoration: none;
  transition: transform .15s ease, opacity .15s ease, background .15s ease;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: #fff; color: #000; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
.btn--primary:hover { opacity: .9; }
.btn--ghost { border: 1px solid var(--line); background: rgba(255, 255, 255, .04); }
.btn--ghost:hover { background: rgba(255, 255, 255, .1); }

/* 导航 */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 11, 12, .72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; }
.brand img { border-radius: 8px; }
.nav__menu { display: flex; gap: 28px; }
.nav__menu a { color: var(--muted); text-decoration: none; font-size: 15px; }
.nav__menu a:hover, .nav__menu a[aria-current="page"] { color: var(--text); }
.nav__toggle { display: none; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; position: relative; }
.nav__toggle span { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s ease; }
.nav__toggle span:first-child { top: 17px; }
.nav__toggle span:last-child { top: 25px; }
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* 首屏 */
.hero { padding: 72px 0 96px; background: radial-gradient(60% 50% at 75% 40%, rgba(255, 190, 97, .14), transparent 70%); }
.hero__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 20px; }
.hero__note { color: var(--muted); font-size: 14px; }

/* 手机样机：模拟相机取景 + 记忆卡片 */
.phone {
  justify-self: center; width: min(320px, 80vw); aspect-ratio: 9 / 19.5;
  border-radius: 48px; padding: 10px; background: #1c1c1f;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 40px 80px rgba(0, 0, 0, .6);
}
.phone__screen { position: relative; height: 100%; border-radius: 38px; overflow: hidden; }
.viewfinder {
  position: absolute; inset: 0;
  background:
    radial-gradient(40% 25% at 70% 22%, rgba(255, 214, 150, .9), transparent 70%),
    linear-gradient(180deg, #f0a869 0%, #c96f4a 30%, #5b3a4e 55%, #22303f 75%, #11161d 100%);
  animation: drift 14s ease-in-out infinite alternate;
}
.viewfinder::after {
  content: ""; position: absolute; left: -10%; right: -10%; bottom: 0; height: 42%;
  background: linear-gradient(180deg, #1b2530, #0c1016);
  clip-path: polygon(0 40%, 12% 20%, 22% 34%, 36% 10%, 50% 30%, 64% 14%, 78% 32%, 90% 18%, 100% 30%, 100% 100%, 0 100%);
}
.phone__scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35), transparent 25%, transparent 70%, rgba(0,0,0,.55)); }
.memory { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; text-shadow: 0 2px 12px rgba(0, 0, 0, .5); padding: 0 16px; }
.memory::before { content: ""; position: absolute; width: 90%; height: 40%; background: radial-gradient(closest-side, rgba(0,0,0,.45), transparent); z-index: -1; }
.memory__hint { font-size: 16px; font-weight: 500; margin: 0 0 4px; }
.memory__days { font-size: 38px; font-weight: 600; font-variant-numeric: tabular-nums; margin: 0; letter-spacing: -0.02em; }
.memory__date { color: rgba(255, 255, 255, .78); font-size: 15px; margin: 2px 0 18px; }
.memory__pill {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 16px 6px 8px;
  border-radius: 999px; background: rgba(20, 20, 22, .55); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-size: 15px; font-weight: 600; text-shadow: none;
}
.memory__pill b { font-weight: 600; opacity: .7; }
.fan { position: relative; width: 44px; height: 34px; }
.fan i { position: absolute; top: 2px; left: 8px; width: 26px; height: 30px; border-radius: 5px; border: 1.5px solid #fff; }
.fan i:nth-child(1) { transform: rotate(-8deg) translateX(-7px); background: linear-gradient(160deg, #7cc3ff, #2c6fb5); }
.fan i:nth-child(2) { background: linear-gradient(160deg, #ffd08a, #d8733f); z-index: 1; }
.fan i:nth-child(3) { transform: rotate(8deg) translateX(7px); background: linear-gradient(160deg, #8fe39a, #3b9b55); z-index: 2; }
.shutter { position: absolute; bottom: 7%; left: 50%; transform: translateX(-50%); width: 64px; height: 64px; border-radius: 50%; border: 4px solid #fff; display: grid; place-items: center; }
.shutter span { width: 50px; height: 50px; border-radius: 50%; background: #fff; }

@keyframes drift { from { filter: hue-rotate(0deg) brightness(1); } to { filter: hue-rotate(-12deg) brightness(.92); } }

/* 通用区块 */
.section { padding: 96px 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.card p { color: var(--muted); margin: 0; }

.steps { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps__num { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #000; font-weight: 700; margin-bottom: 20px; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.icon { font-size: 28px; margin-bottom: 16px; }

.privacy { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.checks li::before { content: "✓"; flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(255, 190, 97, .16); color: var(--accent); font-weight: 700; font-size: 14px; }

.faq { margin-top: 40px; display: grid; gap: 12px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 28px 18px 0; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); color: var(--accent); font-size: 22px; transition: transform .2s ease; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 18px; margin: 0; }

.cta { text-align: center; }
.cta .section__lead { margin: 0 auto 32px; }
.cta__icon { margin: 0 auto 28px; border-radius: 22%; box-shadow: 0 16px 40px rgba(0, 0, 0, .5); }

/* 隐私政策正文 */
.legal { padding: 72px 0 96px; }
.legal h1 { font-size: clamp(36px, 6vw, 56px); }
.legal h2 { font-size: 26px; margin-top: 48px; }
.legal h3 { font-size: 19px; margin-top: 28px; }
.legal p, .legal li { color: var(--muted); }
.legal strong { color: var(--text); }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--accent); }
.legal .eyebrow { color: var(--accent); }
.legal__meta { color: var(--muted); font-size: 14px; margin-bottom: 32px; }

/* 我们的故事：信件式排版，打字机逐段显现（与 App 内 OurStoryView 一致） */
.story { padding: 72px 0 120px; background: radial-gradient(50% 40% at 50% 0%, rgba(255, 190, 97, .08), transparent 70%); }
.story .wrap--narrow { max-width: 640px; }
.story__block { white-space: pre-line; color: var(--muted); font-size: clamp(18px, 2.2vw, 21px); line-height: 1.75; margin: 0 0 30px; }
.story__heading { color: var(--text); font-size: clamp(34px, 5.5vw, 52px); line-height: 1.2; margin-bottom: 40px; }
.story__emphasis { color: var(--text); font-weight: 600; }
.story__rule { width: 48px; height: 1px; border: 0; background: var(--accent); margin: 48px 0; opacity: .7; }
.story__skip { color: var(--muted); font-size: 13px; letter-spacing: .04em; margin-top: 56px; opacity: 0; transition: opacity .6s ease; }
/* 打字进行中：未敲出的文字透明占位，版面保持最终尺寸不跳动 */
.story__rest { color: transparent; }
.story__caret { display: inline-block; width: 0; height: 1.05em; margin-right: -2px; border-left: 2px solid var(--accent); vertical-align: -0.15em; animation: caret 1s steps(1) infinite; }
.js .story.is-typing .story__rule:not(.is-done) { opacity: 0; }
.story__rule { transition: opacity .8s ease; }
.story.is-typing { cursor: pointer; }
.story.is-typing .story__skip { opacity: .6; }
@keyframes caret { 50% { opacity: 0; } }

.footer { border-top: 1px solid var(--line); padding: 32px 0 calc(32px + env(safe-area-inset-bottom)); color: var(--muted); font-size: 14px; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer p { margin: 0; }
.footer nav { display: flex; gap: 24px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--text); }

/* 滚动出现：仅在 JS 可用时生效，避免无 JS 时内容不可见 */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* 平板 */
@media (max-width: 900px) {
  .hero__inner, .privacy { grid-template-columns: 1fr; }
  .hero { padding-top: 48px; text-align: center; }
  .hero .lead { margin-inline: auto; }
  .hero__cta { justify-content: center; }
  .steps, .grid { grid-template-columns: 1fr 1fr; }
}

/* 手机 */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .section { padding: 72px 0; }
  .steps, .grid { grid-template-columns: 1fr; }
  .nav__toggle { display: block; }
  .nav__menu {
    position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: rgba(11, 11, 12, .96); border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px; display: none;
  }
  .nav__menu.is-open { display: flex; }
  .nav__menu a { padding: 14px 4px; font-size: 17px; border-bottom: 1px solid var(--line); }
  .hero__cta .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* 简体中文页：优先苹方，标题取消负字距（中文字形挤在一起会难读），正文略放大行高；eyebrow 不做大写 */
:lang(zh-Hans) { --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif; }
:lang(zh-Hans) h1, :lang(zh-Hans) h2, :lang(zh-Hans) h3 { letter-spacing: 0; line-height: 1.3; }
:lang(zh-Hans) body { line-height: 1.75; }
:lang(zh-Hans) .footer nav { flex-wrap: wrap; }
