/* Toknix 官网样式：移动优先，原生字体栈，自动适配深色模式 */
:root {
  --bg: #fafaf8;
  --bg-alt: #f1f0ec;
  --surface: #ffffff;
  --ink: #111111;
  --ink-2: #55554f;
  --line: #e4e2dc;
  --accent: #111111;
  --accent-ink: #ffffff;
  --paper: #fffef9;
  --radius: 20px;
  --maxw: 1080px;
  --gutter: clamp(16px, 5vw, 32px);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e0d;
    --bg-alt: #161614;
    --surface: #1b1b19;
    --ink: #f4f3ee;
    --ink-2: #a3a29a;
    --line: #2a2a27;
    --accent: #f4f3ee;
    --accent-ink: #111111;
  }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }

.container { width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; }

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: 8px 14px; border-radius: 10px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

/* ---------- 导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; text-decoration: none; letter-spacing: -0.02em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav-links { display: flex; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; color: var(--ink-2); font-size: 15px; transition: color .2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.lang-switch { border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; font-size: 13px !important; }

.nav-toggle {
  display: none; width: 44px; height: 44px; margin-right: -10px;
  background: none; border: 0; color: var(--ink); cursor: pointer; border-radius: 12px;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px;
  margin: auto; position: relative; transition: transform .25s, opacity .25s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; left: 0; right: 0; top: 60px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 12px 0; font-size: 17px; }
  .lang-switch { border: 0; padding: 12px 0 !important; border-radius: 0; font-size: 17px !important; }
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; font-size: 16px; text-decoration: none;
  border: 1px solid var(--accent); transition: transform .2s, opacity .2s;
}
.btn:hover { opacity: .88; }
.btn:active { transform: scale(.98); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 8vw, 96px) 0 clamp(40px, 7vw, 80px); overflow: hidden; }
.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 880px) { .hero-grid { grid-template-columns: 1.1fr 0.9fr; } }

.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; margin-bottom: 20px;
}
.hero h1 { font-size: clamp(34px, 6.5vw, 62px); font-weight: 800; letter-spacing: -0.035em; }
.hero .lead { margin-top: 20px; font-size: clamp(17px, 2.4vw, 20px); color: var(--ink-2); max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-note { margin-top: 16px; font-size: 14px; color: var(--ink-2); }

/* 小票示意（纯 CSS，等宽字体） */
.receipt-wrap { display: flex; justify-content: center; }
.receipt {
  width: min(100%, 320px); background: var(--paper); color: #1a1a18;
  font: 13px/1.7 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  padding: 28px 24px 34px; border-radius: 4px 4px 0 0;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.35), 0 0 0 1px rgba(0,0,0,.05);
  transform: rotate(2deg);
  /* 底部锯齿撕边 */
  --tooth: 10px;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / var(--tooth) 100%;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / var(--tooth) 100%;
  padding-bottom: 40px;
}
.receipt h3 { text-align: center; font-size: 18px; letter-spacing: .2em; font-weight: 800; }
.receipt .sub { text-align: center; font-size: 11px; letter-spacing: .12em; opacity: .65; margin-bottom: 10px; }
.receipt hr { border: 0; border-top: 1px dashed #1a1a18; opacity: .45; margin: 10px 0; }
.receipt .row { display: flex; justify-content: space-between; gap: 12px; }
.receipt .total { font-size: 15px; font-weight: 800; }
.receipt .bars { text-align: center; letter-spacing: 3px; font-size: 20px; margin-top: 6px; overflow: hidden; white-space: nowrap; }
.receipt .thanks { text-align: center; font-size: 11px; opacity: .65; margin-top: 4px; }

/* ---------- 通用区块 ---------- */
section { padding: clamp(48px, 8vw, 96px) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(28px, 4.5vw, 40px); font-weight: 800; }
.section-head p { margin-top: 14px; color: var(--ink-2); font-size: 18px; }

.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card .ico { font-size: 26px; line-height: 1; margin-bottom: 14px; }
.card h3 { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.card p { color: var(--ink-2); font-size: 15.5px; }

.steps { counter-reset: step; display: grid; gap: 16px; padding: 0; margin: 0; list-style: none; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; margin-bottom: 14px;
}
.steps h3 { font-size: 18px; margin-bottom: 6px; }
.steps p { color: var(--ink-2); font-size: 15.5px; }
.steps code, .prose code { font: 0.9em ui-monospace, Menlo, monospace; background: var(--bg-alt); padding: 2px 6px; border-radius: 6px; }

.privacy-points { display: grid; gap: 12px; padding: 0; margin: 0; list-style: none; }
@media (min-width: 760px) { .privacy-points { grid-template-columns: repeat(2, 1fr); } }
.privacy-points li { display: flex; gap: 12px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; color: var(--ink-2); }
.privacy-points strong { color: var(--ink); }
.more-link { display: inline-block; margin-top: 24px; font-weight: 600; }

/* FAQ */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--ink-2); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); padding: 0 0 18px; }

/* 下载 CTA */
.cta-band { text-align: center; }
.cta-band h2 { font-size: clamp(28px, 4.5vw, 40px); font-weight: 800; }
.cta-band p { color: var(--ink-2); margin: 14px 0 28px; font-size: 18px; }
.cta-band .cta-row { justify-content: center; }

/* ---------- 文档页（隐私协议） ---------- */
.doc { padding: clamp(32px, 6vw, 72px) 0 clamp(48px, 8vw, 96px); }
.doc h1 { font-size: clamp(30px, 5vw, 44px); font-weight: 800; }
.doc .meta { color: var(--ink-2); margin-top: 10px; font-size: 14.5px; }
.prose { max-width: 720px; margin-top: 32px; }
.prose h2 { font-size: 22px; margin: 40px 0 12px; scroll-margin-top: 80px; }
.prose p, .prose li { color: var(--ink-2); }
.prose p + p { margin-top: 12px; }
.prose ul { padding-left: 1.3em; margin: 12px 0; }
.prose li + li { margin-top: 6px; }
.prose strong { color: var(--ink); }
.prose .table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 14px; }
.prose table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 14.5px; }
.prose th, .prose td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-2); }
.prose th { color: var(--ink); background: var(--bg-alt); font-weight: 600; }
.prose tr:last-child td { border-bottom: 0; }

/* ---------- 页脚 ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--ink-2); font-size: 14px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; list-style: none; margin: 0; padding: 0; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--ink); }

/* 入场动效：仅在支持且未要求减少动效时启用 */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
  .reveal.in { opacity: 1; transform: none; }
  .receipt { animation: print 1s cubic-bezier(.2,.8,.2,1) both; transform-origin: top center; }
  @keyframes print { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
