/* ============================================================
   cofree 官网样式 · 轻净柔和自然精准
   零 CDN · 系统字体 · 支持浅色/深色模式
   ============================================================ */

:root {
  --ink: #0a0a0a;
  --ink-soft: #262626;
  --muted: #6e6e6e;
  --faint: #9a9a9a;
  --bg: #ffffff;
  --bg-soft: #fafaf8;
  --line: #e8e8e5;
  --warm: #e6f1e6;
  --cool: #eef2f7;
  --card: #f7f7f5;
  --radius: 14px;
  --radius-lg: 22px;
  --max: 1120px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 30px rgba(0,0,0,.05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f5f5f2;
    --ink-soft: #d9d9d5;
    --muted: #9a9a96;
    --faint: #6e6e6a;
    --bg: #0a0a0a;
    --bg-soft: #121211;
    --line: #262624;
    --warm: #17211a;
    --cool: #161b22;
    --card: #161615;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 30px rgba(0,0,0,.45);
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.8;
  letter-spacing: .2px;
  -webkit-font-smoothing: antialiased;
  transition: background .35s ease, color .35s ease;
}

/* height:auto 必须显式写：HTML 的 width/height 属性是"表现层提示"，
   任何 CSS width 都会覆盖它，但 height 不会 → 只覆盖宽会留下固定像素高 → 图片被拉变形 */
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

::selection { background: var(--ink); color: var(--bg); }

/* ---------- 顶部导航 ---------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: var(--max); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}

.brand { display: flex; align-items: center; gap: 10px; }

.brand img { width: 30px; height: 30px; }
.brand .wordmark {
  font-size: 19px; font-weight: 700; letter-spacing: .5px;
}

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-size: 14px; color: var(--muted);
  transition: color .2s ease;
}
.nav-links a:hover { color: var(--ink); }

.status-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; letter-spacing: 1px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 13px;
  white-space: nowrap;
}
.status-badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #3f9d63;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

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

.hero { padding: 92px 0 0; text-align: center; }

.kicker {
  display: inline-block;
  font-size: 12px; letter-spacing: 4px;
  color: var(--faint);
  margin-bottom: 26px;
}

.hero h1 {
  font-size: clamp(38px, 6.4vw, 68px);
  line-height: 1.28;
  font-weight: 700;
  letter-spacing: 1px;
  max-width: 15em;
  margin: 0 auto 20px;
}

.hero .sub {
  font-size: clamp(16px, 2.2vw, 20px);
  color: var(--muted);
  margin-bottom: 8px;
}
.hero .sub-en {
  font-size: 13px; letter-spacing: 3px;
  color: var(--faint);
  margin-bottom: 34px;
}

.hero-lead {
  max-width: 34em; margin: 0 auto 40px;
  font-size: 16px; color: var(--ink-soft);
}

.hero-figure {
  max-width: 980px; margin: 0 auto; padding: 0 24px;
}
.hero-figure img {
  width: 100%; height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.hero-figure figcaption {
  margin-top: 14px;
  font-size: 12px; color: var(--faint);
}

/* ---------- 通用章节 ---------- */

section { padding: 96px 0; }
.section-soft { background: var(--bg-soft); }

.sec-head { text-align: center; margin-bottom: 64px; }
.sec-head .kicker { margin-bottom: 14px; }
.sec-head h2 {
  font-size: clamp(26px, 3.6vw, 36px);
  font-weight: 700; letter-spacing: .5px;
  margin-bottom: 14px;
}
.sec-head p {
  color: var(--muted); max-width: 36em; margin: 0 auto;
  font-size: 15.5px;
}

/* ---------- 三条价值 ---------- */

.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.value {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 38px 32px;
  text-align: left;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.value:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--ink) 24%, var(--line));
}

.value .num {
  font-size: 12px; letter-spacing: 3px;
  color: var(--faint);
  display: block; margin-bottom: 42px;
}
.value h3 {
  font-size: 20px; font-weight: 700; letter-spacing: .5px;
  margin-bottom: 12px;
}
.value p { font-size: 14.5px; color: var(--muted); }
.value .tail {
  display: block; margin-top: 18px;
  font-size: 13px; color: var(--ink-soft);
}

/* ---------- 关于 cofree（事实卡） ---------- */

.about-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 52px 56px;
  background: var(--bg-soft);
}
.about-card .kicker { margin-bottom: 18px; }
.about-def {
  font-size: 16.5px; line-height: 1.95; color: var(--ink-soft);
  max-width: 44em; margin-bottom: 34px;
}
.about-def strong { font-weight: 700; color: var(--ink); }

.about-dl {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 22px 32px;
  border-top: 1px solid var(--line);
  padding-top: 30px;
}
.about-dl dt {
  font-size: 12px; letter-spacing: 2px;
  color: var(--faint); margin-bottom: 5px;
}
.about-dl dd { font-size: 14.5px; color: var(--ink-soft); }

/* ---------- 常见问题 ---------- */

.faq {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 30px 48px;
  max-width: 1000px; margin: 0 auto;
}
.qa { border-top: 1px solid var(--line); padding-top: 20px; }
.qa h3 {
  font-size: 16px; font-weight: 700; letter-spacing: .4px;
  margin-bottom: 9px;
}
.qa p { font-size: 14.3px; color: var(--muted); }
/* 最后一条单独成行时居中 */
.faq .qa:last-child:nth-child(odd) { grid-column: 1 / -1; max-width: 476px; }

/* ---------- 界面预览 ---------- */

.preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.preview .shot img {
  width: 100%; height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.preview .desc .kicker { margin-bottom: 12px; }
.preview .desc h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700; margin-bottom: 18px;
  letter-spacing: .5px;
}
.preview .desc p { color: var(--muted); font-size: 15px; margin-bottom: 14px; }
.preview .desc .flow {
  margin-top: 26px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  font-size: 13px;
}
.preview .desc .flow span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 15px;
  color: var(--ink-soft);
  background: var(--card);
}
.preview .desc .flow i {
  font-style: normal; color: var(--faint);
}

/* ---------- 功能网格 ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.feature {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-align: left;
}

.feature svg { width: 26px; height: 26px; margin-bottom: 20px; }
.feature h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 10px; letter-spacing: .4px; }
.feature p { font-size: 13.8px; color: var(--muted); }

/* ---------- Apple 生态 ---------- */

.eco {
  background: var(--warm);
  border-radius: var(--radius-lg);
  padding: 72px 60px;
}
.eco-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}
.eco h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700; letter-spacing: .5px; margin-bottom: 16px;
}
.eco .eco-lead { color: var(--muted); font-size: 15px; margin-bottom: 26px; }
.eco .eco-note { font-size: 13px; color: var(--faint); }

.entries { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.entry {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.entry b { display: block; font-size: 14.5px; font-weight: 700; margin-bottom: 3px; }
.entry span { font-size: 12.5px; color: var(--muted); }

/* ---------- Apple Watch ---------- */

.watch-figure {
  max-width: 1040px; margin: 0 auto; padding: 0 24px;
}
.watch-figure picture {
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--warm);
}
.watch-figure img {
  width: 100%; height: auto;
  display: block;
}
.watch-figure figcaption {
  margin-top: 14px; text-align: center;
  font-size: 12px; color: var(--faint);
}

/* ---------- 接下来 ---------- */

.next-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.next-item {
  border-top: 2px solid var(--ink);
  padding-top: 22px;
}
.next-item .stage {
  font-size: 12px; letter-spacing: 3px;
  color: var(--faint);
  display: block; margin-bottom: 12px;
}
.next-item h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.next-item p { font-size: 14px; color: var(--muted); }
.next-item ul { list-style: none; margin-top: 10px; }
.next-item li {
  font-size: 13.5px; color: var(--ink-soft);
  padding-left: 16px; position: relative; margin-bottom: 4px;
}
.next-item li::before {
  content: "—"; position: absolute; left: 0;
  color: var(--faint);
}

/* ---------- 开发者 ---------- */

.author {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 56px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 56px 60px;
  background: var(--card);
}
.author h2 {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700; margin-bottom: 16px; letter-spacing: .5px;
}
.author p { color: var(--muted); font-size: 15px; margin-bottom: 10px; max-width: 34em; }
.author .sign {
  font-size: 13px; color: var(--faint); margin-top: 18px;
}
.author .badge {
  text-align: center; white-space: nowrap;
}
.author .badge .avatar {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 700;
  margin: 0 auto 14px;
}
.author .badge .who { font-size: 15px; font-weight: 700; }
.author .badge .role { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

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

footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 44px;
  text-align: center;
}
footer .f-logo {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 16px;
}
footer .f-logo img { width: 26px; height: 26px; }
footer .f-logo span { font-size: 17px; font-weight: 700; letter-spacing: .5px; }
footer .slogan { font-size: 13.5px; color: var(--muted); margin-bottom: 6px; }
footer .slogan-en { font-size: 11px; letter-spacing: 3px; color: var(--faint); margin-bottom: 26px; }
footer .disclaimer {
  font-size: 12px; color: var(--faint);
  max-width: 40em; margin: 0 auto 20px;
}
footer .copy { font-size: 12px; color: var(--faint); }

/* ---------- 显现动画 ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

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

@media (max-width: 900px) {
  .values, .features, .next-grid { grid-template-columns: 1fr 1fr; }
  .preview, .eco-grid { grid-template-columns: 1fr; gap: 40px; }
  .eco { padding: 48px 32px; }
  .about-card { padding: 40px 32px; }
  .about-dl { grid-template-columns: 1fr 1fr; }
  .faq { grid-template-columns: 1fr; }
  .faq .qa:last-child:nth-child(odd) { max-width: none; }
  .author { grid-template-columns: 1fr; padding: 44px 32px; }
  .author .badge { text-align: left; display: flex; align-items: center; gap: 18px; }
  .author .badge .avatar { margin: 0; }
}

@media (max-width: 620px) {
  .values, .features, .next-grid, .about-dl { grid-template-columns: 1fr; }
  section { padding: 64px 0; }
  .hero { padding-top: 64px; }
  .nav-links a { display: none; }
  .nav-links a.keep { display: inline; }
  .entries { grid-template-columns: 1fr 1fr; }
}
