/* GeoMemory 官网
   色彩：暮色紫墨（文字）、记忆紫（唯一强调色）、薰衣草雾（底色）、地图色（陆地 / 水面）
   字体：Bricolage Grotesque（标题与拉丁文）+ Noto Sans SC（中文正文） */

:root {
  --ink: #2b2452;
  --ink-soft: #5d5784;
  --memory: #6b5cf6;
  --memory-deep: #4f3fe0;
  --mist: #f4f2fc;
  --paper: #ffffff;
  --land: #e3ecee;
  --water: #cde2ea;
  --park: #d6e8d8;
  --road: #ffffff;
  --line: #ddd9f0;
  --amber: #f0a458;

  --font-display: "Bricolage Grotesque", "Noto Sans SC", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", system-ui, sans-serif;
}
/* 英文页：正文也用 Bricolage（不加载中文字体）；页面里的少量中文回退到系统中文字体 */
html[lang="en"] {
  --font-body: "Bricolage Grotesque", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;

  /* 字号阶梯（约 1.25 比例） */
  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: 2.25rem;
  --step-4: clamp(2.6rem, 6vw, 4.4rem);

  --gutter: clamp(16px, 5vw, 64px);
  --measure: 34rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--memory); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---------- 页眉 ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px var(--gutter);
  max-width: 1240px; margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); }
.brand-mark { width: 32px; height: 32px; }
.site-header nav { display: flex; gap: clamp(14px, 3vw, 32px); font-size: var(--step--1); }
.site-header nav { align-items: center; }
.site-header nav a { text-decoration: none; color: var(--ink-soft); white-space: nowrap; }
/* 窄屏只保留语言切换，章节链接靠滚动即可到达 */
@media (max-width: 640px) { .site-header nav a:not(.lang) { display: none; } }
.site-header nav a:hover { color: var(--ink); }
.site-header nav a.lang { padding: 2px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); }
.site-header nav a.lang:hover { border-color: var(--memory); }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center;
  max-width: 1240px; margin: 0 auto;
  padding: clamp(24px, 6vw, 72px) var(--gutter) clamp(48px, 8vw, 112px);
}
@media (min-width: 960px) { .hero { grid-template-columns: 1fr 1.05fr; gap: 64px; } }

.hero h1 { font-size: var(--step-4); font-weight: 800; line-height: 1.08; }
.hero-en { margin-top: 14px; font-family: var(--font-display); font-size: var(--step-2); font-weight: 400; color: var(--memory-deep); }
.hero-lede { margin-top: 22px; max-width: var(--measure); color: var(--ink-soft); font-size: var(--step-1); line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; margin-top: 34px; }

.store-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 20px 10px 16px; border-radius: 14px;
  background: var(--ink); color: var(--paper);
  font-family: var(--font-display); font-size: var(--step-1); line-height: 1.1;
}
.store-badge svg { width: 26px; height: 26px; fill: currentColor; }
.store-badge small { display: block; font-size: 0.7rem; opacity: 0.75; font-family: var(--font-body); }
.text-link { color: var(--memory-deep); text-underline-offset: 5px; text-decoration-thickness: 2px; }

/* 靠近 → 解锁 演示 */
.approach { position: relative; margin: 0; justify-self: center; width: min(100%, 520px); }
.approach-map { width: 100%; height: auto; filter: drop-shadow(0 30px 60px rgb(43 36 82 / 0.16)); }
.map-land { fill: var(--land); }
.map-water { fill: var(--water); }
.map-park { fill: var(--park); }
.map-road path { fill: none; stroke: var(--road); stroke-width: 11; stroke-linecap: round; }
.map-street path { fill: none; stroke: var(--road); stroke-width: 4; opacity: 0.55; }
.map-dot { fill: var(--memory); opacity: 0.35; }

.ring { fill: none; stroke: var(--memory); stroke-width: 1.5; stroke-dasharray: 4 7; opacity: 0.45; transform-origin: 260px 260px; }
.ring-2 { stroke-dasharray: none; stroke-width: 2; opacity: 0.7; }
.glow { transform-origin: 260px 260px; }
.pin-body { fill: var(--memory); stroke: var(--paper); stroke-width: 4; }
.lock-body { fill: var(--paper); }
.lock-shackle { fill: none; stroke: var(--paper); stroke-width: 2.6; stroke-linecap: round; transition: transform 0.4s ease; transform-origin: 5.5px -3px; }
.you-halo { fill: rgb(240 164 88 / 0.28); }
.you-dot { fill: var(--amber); stroke: var(--paper); stroke-width: 3; }

.approach-card {
  position: absolute; left: 50%; bottom: -26px; transform: translateX(-50%);
  width: min(88%, 360px);
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 16px;
  padding: 16px 20px; border-radius: 20px;
  background: var(--paper); box-shadow: 0 16px 40px rgb(43 36 82 / 0.14);
}
.approach-status { font-weight: 700; }
.approach-hint { grid-row: 2; font-size: var(--step--1); color: var(--ink-soft); }
.approach-distance { grid-row: 1 / 3; grid-column: 2; align-self: center; font-family: var(--font-display); font-size: var(--step-2); color: var(--memory-deep); font-variant-numeric: tabular-nums; }
.approach-distance b { font-weight: 800; }
.approach.is-unlocked .approach-distance { color: var(--ink); }
.approach.is-unlocked .lock-shackle { transform: translateY(-3px) rotate(-28deg); }

.replay {
  position: absolute; top: 16px; right: 16px;
  border: 0; border-radius: 999px; padding: 8px 14px;
  background: rgb(255 255 255 / 0.9); color: var(--ink); font: inherit; font-size: var(--step--1); cursor: pointer;
}
.replay:hover { background: var(--paper); }

/* ---------- 章节通用 ---------- */
.journey, .privacy, .values, .get { max-width: 1240px; margin: 0 auto; padding: clamp(56px, 9vw, 120px) var(--gutter); }
.section-head { display: grid; gap: 12px; max-width: var(--measure); }
.journey h2, .privacy h2, .values h2, .get h2 { font-size: var(--step-3); font-weight: 800; }
.section-head p { color: var(--ink-soft); }

/* ---------- 体验流程：横向滚动 ---------- */
.journey { padding-right: 0; padding-bottom: clamp(24px, 4vw, 48px); }
.steps {
  counter-reset: step;
  list-style: none; margin: 40px 0 0; padding: 36px var(--gutter) 24px 0;
  display: flex; gap: 28px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 0;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.steps li { counter-increment: step; position: relative; flex: 0 0 236px; scroll-snap-align: start; }
/* 每一幕的开头标出所属阶段 */
.steps li.act-start::before {
  content: attr(data-act);
  position: absolute; top: -34px; left: 0;
  font-family: var(--font-display); font-weight: 600; color: var(--memory-deep);
}
.steps li.act-start:not(:first-child) { margin-left: 28px; }
.steps li.act-start:not(:first-child)::after {
  content: ""; position: absolute; left: -42px; top: 0; bottom: 0; width: 1px; background: var(--line);
}
.steps img {
  width: 100%; height: 400px; object-fit: cover; object-position: top;
  border-radius: 28px; background: var(--paper);
  /* 参考截图底部被裁切，用渐隐收尾 */
  -webkit-mask-image: linear-gradient(to bottom, black 82%, transparent);
          mask-image: linear-gradient(to bottom, black 82%, transparent);
}
.steps h3 { margin-top: 8px; font-size: var(--step-1); font-weight: 600; }
.steps h3::before { content: counter(step) "\2002"; color: var(--memory); font-variant-numeric: tabular-nums; }
.steps p { margin-top: 6px; color: var(--ink-soft); font-size: var(--step--1); }

/* ---------- 隐私 ---------- */
.privacy { display: grid; gap: 40px; }
.privacy-body { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) {
  .privacy { grid-template-columns: 1fr 1.6fr; align-items: start; }
  .privacy-body { grid-template-columns: 220px 1fr; }
}
.radius { position: relative; width: 220px; height: 220px; justify-self: center; }
.radius-ring { position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: start center; }
.radius-50 { border: 1.5px dashed var(--memory); background: rgb(107 92 246 / 0.06); }
.radius-2 { inset: 88px; border: 2px solid var(--memory); background: var(--memory); place-items: center; }
.radius-ring span { font-family: var(--font-display); font-weight: 600; color: var(--memory-deep); transform: translateY(-1.7em); }
.radius-2 span { transform: translateY(2.6em); }
.rules { display: grid; gap: 28px; margin: 0; }
.rules dt { font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); }
.rules dd { margin: 6px 0 0; color: var(--ink-soft); max-width: var(--measure); }

/* ---------- 亮点 ---------- */
.values ul { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 0; grid-template-columns: 1fr; border-top: 1px solid var(--line); }
@media (min-width: 720px) { .values ul { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1080px) { .values ul { grid-template-columns: repeat(3, 1fr); } }
.values li { display: grid; grid-template-columns: 40px 1fr; column-gap: 16px; padding: 28px 24px 28px 0; border-bottom: 1px solid var(--line); }
.values svg { grid-row: 1 / 3; width: 28px; height: 28px; fill: none; stroke: var(--memory); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.values h3 { font-size: var(--step-1); font-weight: 600; }
.values p { color: var(--ink-soft); font-size: var(--step--1); margin-top: 4px; }

/* ---------- 获取 ---------- */
.get { text-align: left; }
.get p { margin-top: 14px; color: var(--ink-soft); max-width: var(--measure); }

/* ---------- 页脚 ---------- */
.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  max-width: 1240px; margin: 0 auto; padding: 32px var(--gutter) 40px;
  color: var(--ink-soft); font-size: var(--step--1); border-top: 1px solid var(--line);
}

/* ---------- 邀请页 ---------- */
.invite { max-width: 560px; margin: 0 auto; padding: clamp(40px, 10vw, 96px) var(--gutter); text-align: center; }
.invite .invite-pin { width: 120px; height: 120px; margin: 0 auto 32px; }
.invite h1 { font-size: var(--step-3); font-weight: 800; }
.invite p { margin-top: 16px; color: var(--ink-soft); }
.invite ol { text-align: left; margin: 32px auto 0; padding-left: 1.4em; max-width: 26rem; color: var(--ink); }
.invite li + li { margin-top: 10px; }
.invite .store-badge { margin-top: 36px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lock-shackle { transition: none; }
}
