/* PureCurrency — Editorial Minimalism Web Stylesheet
 * Palette mirrors PureCurrency DESIGN.md & ReceiptPosterView (Warm Paper / Charcoal Ink)
 * Zero external dependencies, automatic Light/Dark mode, tabular numerals, responsive layout.
 */

:root {
  --bg: #f6f4ee;
  --bg-subtle: #eeeae0;
  --surface: #fdfcf9;
  --surface-elevated: #ffffff;
  --ink: #141418;
  --ink-secondary: #5c5a56;
  --ink-tertiary: #848078;
  --border: rgba(20, 20, 24, 0.09);
  --border-strong: rgba(20, 20, 24, 0.16);
  --dash: rgba(20, 20, 24, 0.15);
  --pill-bg: rgba(20, 20, 24, 0.055);
  --cta-bg: #141418;
  --cta-ink: #fdfcf9;
  --accent: #1d5fc4;
  --shadow: 0 14px 36px rgba(20, 20, 24, 0.06), 0 2px 8px rgba(20, 20, 24, 0.04);
  --radius-lg: 22px;
  --radius-md: 14px;
  --max-w: 980px;
  --prose-w: 760px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0c10;
    --bg-subtle: #14141a;
    --surface: #15151b;
    --surface-elevated: #1c1c24;
    --ink: #f4f4f6;
    --ink-secondary: #a1a0a8;
    --ink-tertiary: #75747d;
    --border: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.17);
    --dash: rgba(255, 255, 255, 0.16);
    --pill-bg: rgba(255, 255, 255, 0.075);
    --cta-bg: #f4f4f6;
    --cta-ink: #0e0e12;
    --accent: #74b0ff;
    --shadow: 0 18px 44px rgba(0, 0, 0, 0.45), 0 2px 10px rgba(0, 0, 0, 0.28);
  }
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang TC", "Noto Sans TC", "Hiragino Sans", sans-serif;
  font-size: 16px;
  line-height: 1.68;
  font-variant-numeric: tabular-nums;
}

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

.prose a,
.inline-link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.16s ease, color 0.16s ease;
}

.prose a:hover,
.inline-link:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

code {
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  font-size: 0.87em;
  background: var(--pill-bg);
  padding: 0.14em 0.42em;
  border-radius: 6px;
}

/* Language Toggle Visibility */
[data-lang="zh"] { display: none; }
html.lang-zh [data-lang="en"] { display: none; }
html.lang-zh [data-lang="zh"] { display: revert; }

/* Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 600;
  letter-spacing: -0.015em;
  font-size: 17px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 7.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-elevated);
  border: 1px solid var(--border-strong);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  color: var(--ink);
  flex-shrink: 0;
}

.brand-mark svg {
  width: 24px;
  height: 24px;
  display: block;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14.5px;
  color: var(--ink-secondary);
}

.nav-links a {
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
  font-weight: 500;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  background: var(--pill-bg);
  border: 1px solid var(--border);
}

.lang-switch button {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.lang-switch button.active {
  background: var(--surface-elevated);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Containers */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

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

/* Hero */
.hero {
  padding: 76px 0 64px;
  text-align: center;
}

.hero-icon-wrap {
  width: 92px;
  height: 92px;
  margin: 0 auto 28px;
  border-radius: 22px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}

.hero-icon-wrap svg {
  width: 76px;
  height: 76px;
}

.eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
  margin-bottom: 14px;
}

.hero h1 {
  margin: 0 auto 18px;
  max-width: 720px;
  font-size: clamp(34px, 5.4vw, 56px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.hero-lead {
  margin: 0 auto 34px;
  max-width: 600px;
  font-size: clamp(16.5px, 2vw, 19.5px);
  line-height: 1.6;
  color: var(--ink-secondary);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 42px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.14s ease, opacity 0.14s ease, border-color 0.14s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--cta-bg);
  color: var(--cta-ink);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border-strong);
}

.metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 780px;
  margin: 0 auto;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.metric-item {
  text-align: center;
  padding: 4px 6px;
}

.metric-value {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.metric-label {
  font-size: 12.5px;
  color: var(--ink-secondary);
  margin-top: 4px;
}

/* Editorial Dashed Divider (Thermal Receipt Motif) */
.dashed-rule {
  border: 0;
  border-top: 1px dashed var(--dash);
  margin: 48px 0;
}

/* Feature Grid */
.section {
  padding: 44px 0;
}

.section-header {
  max-width: 620px;
  margin-bottom: 34px;
}

.section-header h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3.2vw, 32px);
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.section-header p {
  margin: 0;
  color: var(--ink-secondary);
  font-size: 16px;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.025);
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.card-num {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink-tertiary);
  margin-bottom: 14px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.card p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.62;
  color: var(--ink-secondary);
}

/* Privacy Promise Strip */
.promise-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: var(--shadow);
}

.promise-text {
  max-width: 560px;
}

.promise-text h2 {
  margin: 0 0 8px;
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.promise-text p {
  margin: 0;
  color: var(--ink-secondary);
  font-size: 15px;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.pill {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-secondary);
  background: var(--pill-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
}

/* Free vs. Pro Monochrome Comparison */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.tier-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.025);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tier-card.tier-pro {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.tier-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.tier-head h3 {
  margin: 0;
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.tier-badge {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--ink-secondary);
  border: 1px solid var(--border);
  white-space: nowrap;
}

.tier-pro .tier-badge {
  background: var(--cta-bg);
  color: var(--cta-ink);
  border-color: transparent;
}

.tier-sub {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-secondary);
}

.tier-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 14px 0 0;
  border-top: 1px dashed var(--dash);
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 14.5px;
  color: var(--ink-secondary);
}

.tier-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.tier-list li::before {
  content: "✓";
  color: var(--ink);
  font-weight: 600;
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

/* Document Pages (Privacy & Support) */
.page-hero {
  padding: 56px 0 32px;
  border-bottom: 1px dashed var(--dash);
  margin-bottom: 36px;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.18;
}

.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  font-size: 14px;
  color: var(--ink-secondary);
}

.prose {
  padding-bottom: 64px;
}

.prose section {
  margin-bottom: 34px;
}

.prose h2 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.35;
}

.prose p {
  margin: 0 0 12px;
  color: var(--ink-secondary);
}

.prose ul {
  margin: 10px 0 14px;
  padding-left: 20px;
  color: var(--ink-secondary);
}

.prose li {
  margin-bottom: 8px;
}

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin: 16px 0;
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 42px;
}

details.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  transition: border-color 0.15s ease;
}

details.faq-item[open] {
  border-color: var(--border-strong);
}

details.faq-item summary {
  list-style: none;
  cursor: pointer;
  font-size: 16.5px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  line-height: 1.45;
}

details.faq-item summary::-webkit-details-marker {
  display: none;
}

details.faq-item summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 400;
  color: var(--ink-tertiary);
  line-height: 1.1;
  flex-shrink: 0;
  transition: transform 0.16s ease;
}

details.faq-item[open] summary::after {
  content: "−";
  color: var(--ink);
}

.faq-body {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--dash);
  color: var(--ink-secondary);
  font-size: 15px;
}

.faq-body p {
  margin: 0 0 10px;
}

.faq-body p:last-child,
.faq-body ul:last-child {
  margin-bottom: 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 46px;
  margin-top: 36px;
  font-size: 13.5px;
  color: var(--ink-tertiary);
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a:hover {
  color: var(--ink);
}

@media (max-width: 820px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .metrics-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 580px) {
  .nav-inner {
    padding: 12px 16px;
  }
  .nav-right {
    gap: 12px;
  }
  .nav-links {
    gap: 12px;
    font-size: 13.5px;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 52px 0 44px;
  }
  .promise-box {
    padding: 24px 20px;
  }
}
