/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red: #D7494C;
  --red-light: #F5E0E1;
  --red-dark: #B03A3D;
  --white: #FFFFFF;
  --bg: #FAFAFA;
  --text: #1D1D1F;
  --text-secondary: #666666;
  --text-muted: #999999;
  --border: #E5E5E5;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-1: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-2: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-3: 0 8px 40px rgba(0,0,0,0.12);
  --max-w: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", system-ui, "Segoe UI", sans-serif;
  --font-serif: Georgia, "Noto Serif SC", "Songti SC", serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); }

img { max-width: 100%; display: block; }

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

/* ===== Nav ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}

.nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; transition: height 0.3s;
}

.nav-logo {
  font-size: 18px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}

.nav-logo:hover { color: var(--red); }

.nav-logo-icon {
  width: 24px; height: 28px; display: inline-block;
  background: var(--red); border-radius: 3px;
  position: relative;
}
.nav-logo-icon::after {
  content: ''; position: absolute;
  top: 3px; left: 3px; right: 3px; bottom: 6px;
  background: white; border-radius: 1px;
}

.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a { font-size: 14px; color: var(--text-secondary); font-weight: 500; }
.nav-links a:hover { color: var(--red); }

.lang-toggle {
  background: var(--red-light); border: none; color: var(--red);
  font-size: 13px; font-weight: 600; padding: 6px 12px;
  border-radius: var(--radius-sm); cursor: pointer;
  transition: background 0.2s;
}
.lang-toggle:hover { background: var(--red); color: white; }

/* ===== Hero ===== */
.hero {
  padding: 140px 24px 100px;
  text-align: center;
  background: linear-gradient(180deg, var(--red-light) 0%, var(--white) 100%);
  min-height: 90vh;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}

.hero-inner { max-width: 680px; margin: 0 auto; position: relative; z-index: 2; }

.hero-character {
  margin-bottom: 48px;
  display: flex; flex-direction: column; align-items: center;
}

/* Pixel character animation */
.pixel-character { position: relative; height: 160px; width: 144px; }

.char-frame {
  position: absolute; top: 0; left: 0;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.char-idle { opacity: 1; }
.char-walk { opacity: 0; }

@keyframes walk-cycle {
  0%, 45% { opacity: 1; }
  50%, 95% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes walk-cycle-alt {
  0%, 45% { opacity: 0; }
  50%, 95% { opacity: 1; }
  100% { opacity: 0; }
}

.pixel-character .char-idle { animation: walk-cycle 1.2s steps(1) infinite; }
.pixel-character .char-walk { animation: walk-cycle-alt 1.2s steps(1) infinite; }

/* Trail dots */
.hero-trail {
  display: flex; gap: 12px; margin-top: 16px;
}

.trail-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--red);
  opacity: 0.2;
  animation: trail-pulse 2s ease-in-out infinite;
}
.trail-dot:nth-child(1) { animation-delay: 0s; }
.trail-dot:nth-child(2) { animation-delay: 0.3s; }
.trail-dot:nth-child(3) { animation-delay: 0.6s; }
.trail-dot:nth-child(4) { animation-delay: 0.9s; }
.trail-dot:nth-child(5) { animation-delay: 1.2s; }

@keyframes trail-pulse {
  0%, 100% { opacity: 0.15; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.5); }
}

.hero-title {
  font-size: 48px; font-weight: 800; line-height: 1.2;
  margin-bottom: 20px; color: var(--text);
}

.hero-sub {
  font-size: 20px; color: var(--text-secondary);
  margin-bottom: 36px; line-height: 1.5;
}

.hero-platform {
  margin-top: 16px; font-size: 13px; color: var(--text-muted);
}

/* ===== Buttons ===== */
.btn {
  display: inline-block; font-weight: 600; border: none;
  cursor: pointer; transition: all 0.2s; text-align: center;
  font-family: var(--font);
}

.btn-primary {
  background: var(--red); color: white;
  padding: 14px 36px; border-radius: var(--radius);
  font-size: 16px;
}
.btn-primary:hover { background: var(--red-dark); color: white; transform: translateY(-1px); box-shadow: var(--shadow-2); }

.btn-lg { padding: 18px 48px; font-size: 18px; border-radius: var(--radius-lg); }

.btn-coming-soon {
  position: relative; overflow: hidden;
}
.btn-coming-soon::after {
  content: ''; position: absolute; top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 3s infinite;
}
@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* ===== Sections ===== */
.section { padding: 100px 0; }
.section:nth-child(even) { background: var(--bg); }

.section-title {
  font-size: 36px; font-weight: 800; text-align: center;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 18px; color: var(--text-secondary);
  text-align: center; margin-bottom: 56px; max-width: 560px; margin-left: auto; margin-right: auto;
}

/* ===== Philosophy Cards ===== */
.cards-3 {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}

.card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 36px 28px; box-shadow: var(--shadow-1);
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }

.card-icon { font-size: 32px; margin-bottom: 16px; }

.card h3 { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.card p { font-size: 15px; color: var(--text-secondary); line-height: 1.6; }

/* ===== Steps ===== */
.steps {
  display: flex; align-items: flex-start; justify-content: center; gap: 16px;
}

.step {
  flex: 1; max-width: 280px; text-align: center;
  padding: 32px 20px;
}

.step-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--red); color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; margin-bottom: 16px;
}

.step-icon { font-size: 40px; margin-bottom: 16px; }
.step h3 { font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.step p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

.step-arrow {
  font-size: 28px; color: var(--red); font-weight: 300;
  padding-top: 80px; flex-shrink: 0;
}

.privacy-note {
  text-align: center; font-size: 13px; color: var(--text-muted);
  margin-top: 40px; padding: 12px 20px;
  background: var(--red-light); border-radius: var(--radius);
  display: inline-block;
}

.how-it-works .container { display: flex; flex-direction: column; align-items: center; }

/* ===== Postcards — Horizontal Spread ===== */
.postcard-scroll {
  display: flex; gap: 24px; justify-content: center;
  padding: 0 20px;
}

.postcard {
  flex: 0 0 340px; max-width: 340px;
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2); overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
  cursor: default;
}

.postcard:nth-child(1) { transform: rotate(-2deg) translateY(8px); }
.postcard:nth-child(2) { transform: rotate(0.5deg) translateY(-4px); }
.postcard:nth-child(3) { transform: rotate(1.5deg) translateY(12px); }

.postcard:hover {
  transform: rotate(0deg) translateY(-8px) scale(1.03) !important;
  box-shadow: var(--shadow-3);
  z-index: 5;
}

.postcard-img {
  height: 170px; position: relative; overflow: hidden;
}

.postcard-svg {
  width: 100%; height: 100%; display: block;
  image-rendering: pixelated; image-rendering: crisp-edges;
}

.postcard-tag {
  position: absolute; top: 10px; right: 10px;
  background: rgba(255,255,255,0.85); color: var(--text-secondary);
  font-size: 11px; font-weight: 600; padding: 3px 8px;
  border-radius: 6px; backdrop-filter: blur(4px);
}

.postcard-tag-group {
  background: var(--red); color: white;
}

.postcard-body { padding: 18px 20px; }
.postcard-body h4 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.postcard-body p { font-size: 14px; color: var(--text-secondary); line-height: 1.5; font-style: italic; }
.postcard-date { font-size: 12px; color: var(--text-muted); margin-top: 10px; display: block; }

.group-label { color: var(--red); font-weight: 600; font-size: 14px; }

/* ===== Creator ===== */
.creator {
  background: var(--white);
  padding: 120px 0;
}

.creator-inner {
  max-width: 640px; margin: 0 auto; text-align: center;
}

.creator-title {
  font-family: var(--font-serif);
  font-size: 32px; font-weight: 400; line-height: 1.5;
  color: var(--text); margin-bottom: 40px;
}

.creator-quote {
  font-family: var(--font-serif);
  font-size: 18px; line-height: 2; color: var(--text-secondary);
  border: none; padding: 0; margin: 0 0 40px;
  text-align: left;
  position: relative;
}

.creator-quote::before {
  content: '"'; font-size: 80px; color: var(--red-light);
  font-family: Georgia, serif;
  position: absolute; top: -30px; left: -20px;
  line-height: 1;
}

.creator-sig {
  display: flex; align-items: center; justify-content: center; gap: 12px;
}

.creator-avatar {
  width: 36px; height: 40px;
  image-rendering: pixelated;
}

.creator-sig strong { font-size: 15px; display: block; }
.creator-sig span { font-size: 13px; color: var(--text-muted); display: block; }

/* ===== Pricing ===== */
.pricing { background: var(--bg); }

.pricing-cards {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
  max-width: 720px; margin: 0 auto;
}

.pricing-card {
  background: var(--white); border-radius: var(--radius-xl);
  padding: 40px 32px; text-align: center;
  border: 2px solid var(--border);
  transition: transform 0.2s;
}
.pricing-card:hover { transform: translateY(-4px); }

.pricing-card-featured {
  border-color: var(--red);
  position: relative;
  box-shadow: 0 0 0 1px var(--red), var(--shadow-2);
}

.pricing-badge {
  font-size: 14px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.pricing-card-featured .pricing-badge { color: var(--red); }

.pricing-amount {
  font-size: 48px; font-weight: 800; margin-bottom: 24px;
}
.pricing-amount span { font-size: 18px; font-weight: 500; color: var(--text-muted); }

.pricing-card ul {
  list-style: none; text-align: left; margin-bottom: 20px;
}

.pricing-card li {
  font-size: 15px; color: var(--text-secondary);
  padding: 8px 0; border-bottom: 1px solid var(--border);
}
.pricing-card li::before {
  content: '✓ '; color: var(--red); font-weight: 700;
}
.pricing-card li:last-child { border-bottom: none; }

.pricing-note {
  font-size: 13px; color: var(--text-muted); margin-top: 8px;
}

/* ===== Footer ===== */
.footer {
  padding: 80px 0 40px;
  text-align: center;
  background: var(--text);
  color: rgba(255,255,255,0.7);
}

.footer-cta { margin-bottom: 40px; }
.footer-cta h2 { font-size: 32px; color: white; margin-bottom: 24px; }

.footer-platform { margin-top: 12px; font-size: 13px; }

.install-guide {
  max-width: 480px; margin: 0 auto 40px;
  text-align: left;
}

.install-guide summary {
  cursor: pointer; font-size: 14px; color: rgba(255,255,255,0.6);
  padding: 12px 0;
}
.install-guide summary:hover { color: rgba(255,255,255,0.9); }

.install-steps {
  padding: 16px 20px; background: rgba(255,255,255,0.06);
  border-radius: var(--radius); margin-top: 8px;
}
.install-steps p {
  font-size: 13px; line-height: 1.8; color: rgba(255,255,255,0.6);
}

.footer-links {
  margin-bottom: 20px;
}
.footer-links a {
  color: rgba(255,255,255,0.5); font-size: 14px;
}
.footer-links a:hover { color: white; }
.footer-sep { color: rgba(255,255,255,0.2); margin: 0 8px; }

.footer-made { font-size: 13px; color: rgba(255,255,255,0.3); }

/* ===== Subscribe Button ===== */
.btn-subscribe {
  width: 100%; margin-top: 16px; padding: 14px;
  border-radius: var(--radius); font-size: 16px;
}

/* ===== QR Modal ===== */
.qr-modal {
  display: none; position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(6px);
  align-items: center; justify-content: center;
}
.qr-modal.active { display: flex; }

.qr-modal-inner {
  background: white; border-radius: var(--radius-xl); padding: 40px 36px;
  max-width: 360px; width: 90%; text-align: center;
  position: relative; box-shadow: var(--shadow-3);
  animation: modal-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.qr-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none; font-size: 28px;
  color: var(--text-muted); cursor: pointer; line-height: 1;
}
.qr-close:hover { color: var(--text); }

.qr-img {
  width: 200px; height: 200px; margin: 0 auto 20px;
  border-radius: var(--radius); object-fit: contain;
}

.qr-modal-inner h3 {
  font-size: 18px; font-weight: 700; margin-bottom: 12px;
}

.qr-modal-inner p {
  font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 12px;
}

.qr-email {
  display: inline-block; font-size: 15px; font-weight: 600;
  color: var(--red); padding: 8px 16px;
  background: var(--red-light); border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.qr-renew {
  font-size: 12px !important; color: var(--text-muted) !important;
}

.qr-steps {
  text-align: left; padding-left: 20px; margin: 0 auto 16px;
  max-width: 240px;
}
.qr-steps li {
  font-size: 14px; color: var(--text); line-height: 1.8;
  font-weight: 500;
}

/* ===== Scroll Progress Bar ===== */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--red), var(--red-dark));
  z-index: 200; transition: width 0.1s linear;
}

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.revealed { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.25s; }
.reveal-delay-3 { transition-delay: 0.4s; }

/* ===== Hero Particles ===== */
.hero-particles {
  position: absolute; inset: 0; pointer-events: none; z-index: 1;
  overflow: hidden;
}

.particle {
  position: absolute; width: 4px; height: 4px;
  background: var(--red); border-radius: 50%;
  opacity: 0;
  animation: particle-float 6s ease-in-out infinite;
}

.particle-city {
  width: auto; height: auto;
  background: none; border-radius: 0;
  font-size: 11px; font-weight: 500; color: var(--red);
  opacity: 0; white-space: nowrap;
  letter-spacing: 0.02em;
}

@keyframes particle-float {
  0% { opacity: 0; transform: translateY(20px) scale(0.8); }
  20% { opacity: 0.25; }
  50% { opacity: 0.15; transform: translateY(-30px) scale(1); }
  80% { opacity: 0.2; }
  100% { opacity: 0; transform: translateY(-60px) scale(0.8); }
}

/* ===== Token Counter ===== */
.token-ticker {
  display: inline-flex; align-items: baseline; gap: 8px;
  margin-bottom: 32px;
  padding: 8px 20px;
  background: rgba(215, 73, 76, 0.08);
  border: 1px solid rgba(215, 73, 76, 0.15);
  border-radius: 100px;
}

.ticker-num {
  font-size: 28px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--red);
  font-family: "SF Mono", "Fira Code", "Cascadia Code", monospace;
}

.ticker-label {
  font-size: 13px; color: var(--text-muted); font-weight: 500;
}

/* ===== Nav Scrolled ===== */
.nav-scrolled {
  box-shadow: var(--shadow-1);
}
.nav-scrolled .nav-inner { height: 48px; }

/* ===== Card 3D Tilt ===== */
.card, .pricing-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  will-change: transform;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links a:not(.lang-toggle) { display: none; }

  .hero { padding: 120px 20px 80px; min-height: auto; }
  .hero-title { font-size: 32px; }
  .hero-sub { font-size: 17px; }

  .cards-3 { grid-template-columns: 1fr; gap: 16px; }

  .steps { flex-direction: column; align-items: center; }
  .step-arrow { display: none; }

  .postcard-scroll {
    flex-direction: column; align-items: center;
  }
  .postcard {
    flex: none; max-width: 100%; width: 100%;
    transform: none !important;
  }
  .postcard:hover { transform: none !important; }

  .pricing-cards { grid-template-columns: 1fr; }

  .section { padding: 64px 0; }
  .section-title { font-size: 28px; }
  .section-desc { font-size: 16px; }

  .creator-title { font-size: 24px; }
  .creator-quote { font-size: 16px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 26px; }
  .pixel-character { transform: scale(0.75); }
}
