/* MaxCryptoSpace — 現代 SaaS 風格，溫暖淺底、白卡片、留白多、陰影輕 */
/* TODO: 主色 #F8A848 僅少量強調 */

:root {
  --brand: #F4C542;
  --brand-hover: #E0B437;
  --brand-accent: #F8A848;
  --bg: #FAFAF8;
  --text: #0F1115;
  --muted: #6B7280;
  --border: #ECECEC;
  --card-bg: #FFFFFF;
  --radius: 20px;
  --shadow: 0 2px 16px rgba(15, 17, 21, 0.04);
  --shadow-hover: 0 8px 28px rgba(15, 17, 21, 0.06);
  --transition: 0.2s ease;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft JhengHei", "PingFang TC", sans-serif;
  font-size: 18px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ----- 導覽列 ----- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.nav-brand {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a.active { color: var(--text); }

.btn-nav { display: none; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--text); }

/* ----- 按鈕 ----- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.22s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.22s ease;
  text-decoration: none;
  color: var(--text);
  background: var(--brand);
}
.btn:hover {
  background: var(--brand-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(244, 197, 66, 0.35);
}
.btn-block { width: 100%; text-align: center; }
.btn-secondary {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-secondary:hover {
  border-color: var(--muted);
  background: var(--bg);
  transform: translateY(-1px);
}

/* ----- Hero：免費禮物優先 ----- */
.hero {
  padding: 4rem 1.5rem 5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

/* 第一屏：訂閱＝拿到免費框架（醒目但不吵） */
/* 🎁 Hero Gift Highlight */
.hero-gift-highlight {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  margin-bottom: 16px;
  background: rgba(248, 168, 72, 0.12);
  border: 1px solid #F8A848;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
}
.hero-gift-highlight .gift-icon {
  font-size: 18px;
}
.hero-gift-highlight strong {
  color: #F8A848;
}

/* 社會證明（次要） */
.hero-badge {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 13px;
  font-weight: 500;
  color: #F8A848;
  background: rgba(248, 168, 72, 0.08);
  border: 1px solid rgba(248, 168, 72, 0.4);
  border-radius: 999px;
  padding: 6px 12px;
}

.hero-headline {
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  color: var(--text);
}

.hero-subtext {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
  max-width: 36ch;
}

.hero-benefits {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}
.hero-benefits li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.6rem;
  font-size: 0.98rem;
}
.hero-benefits li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.stat-badge {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

/* Substack mini embed：原生訂閱卡片風格，無 logo/外框 */
.substack-mini-embed {
  max-width: 420px;
  margin-top: 1.25rem;
  padding: 18px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}
.substack-mini-embed iframe {
  display: block;
  width: 100%;
  height: 150px;
  border: 0;
}
@media (max-width: 640px) {
  .substack-mini-embed {
    max-width: 100%;
    padding: 16px;
    margin-top: 1rem;
  }
  .substack-mini-embed iframe {
    min-width: 0;
  }
}

.hero-right { display: flex; justify-content: center; align-items: center; }
.hero-image {
  width: 100%;
  max-width: 520px;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ----- Sections 通用 ----- */
.section {
  padding: 4rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}
.section-title {
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 2rem;
  color: var(--text);
}
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

/* ----- Reveal 動畫（僅 opacity + transform） ----- */
html.reveal-ready .reveal {
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
html.reveal-ready .reveal:not(.is-visible) {
  opacity: 0;
  transform: translateY(22px);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.22s; }
.reveal-delay-3 { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal:not(.is-visible),
  .reveal.is-visible {
    opacity: 1 !important;
    transform: none !important;
  }
  .card:hover,
  .btn:hover {
    transform: none !important;
  }
}

/* ----- section-mission ----- */
.section-mission { background: var(--card-bg); border-top: 1px solid var(--border); }
.mission-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2.5rem;
  padding: 2.5rem;
  align-items: center;
}
.mission-lead { font-size: 1.15rem; font-weight: 600; margin: 0 0 1rem; color: var(--text); }
.mission-goal { font-size: 1.05rem; margin: 0 0 1rem; color: var(--text); border-left: 3px solid var(--brand-accent); padding-left: 1rem; }
.mission-note { font-size: 0.98rem; color: var(--muted); margin: 0; }
.mission-visual img { width: 100%; max-width: 320px; height: auto; border-radius: 12px; }

/* ----- section-content 精彩內容 3 cards ----- */
.section-content { background: var(--bg); }
.content-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.content-card {
  padding: 2rem;
  display: flex;
  flex-direction: column;
}
.content-card h3 { font-size: 1.15rem; font-weight: 700; margin: 0 0 1rem; color: var(--text); }
.content-card ul { list-style: none; margin: 0 0 1.25rem; padding: 0; flex: 1; }
.content-card li { position: relative; padding-left: 1.1rem; margin-bottom: 0.4rem; font-size: 0.95rem; }
.content-card li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 5px; height: 5px; border-radius: 50%; background: var(--brand-accent); }
.content-card-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--brand-accent);
  text-decoration: none;
}
.content-card-link:hover { text-decoration: underline; }

/* ----- section-why 痛點 → 解法 row ----- */
.section-why { background: var(--card-bg); border-top: 1px solid var(--border); }
.why-rows { display: flex; flex-direction: column; gap: 1rem; }
.why-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1.25rem 1.5rem;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.why-pain { font-size: 0.95rem; color: var(--muted); }
.why-arrow { font-size: 1.1rem; color: var(--brand-accent); font-weight: 700; text-align: center; }
.why-solution { font-size: 0.95rem; color: var(--text); }

/* ----- section-3 會員制度 ----- */
.section-plans { background: var(--bg); }
.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.plan-card {
  padding: 2rem;
  display: flex;
  flex-direction: column;
}
.plan-card-featured { border: 2px solid var(--brand-accent); }
.plan-name { font-size: 1.2rem; font-weight: 700; margin: 0 0 0.2rem; color: var(--text); }
.plan-en { font-size: 0.85rem; color: var(--muted); margin: 0 0 0.75rem; }
.plan-who { font-size: 0.9rem; color: var(--muted); margin: 0 0 1.25rem; line-height: 1.4; }
.plan-features { list-style: none; margin: 0 0 1.5rem; padding: 0; flex: 1; }
.plan-features li {
  position: relative;
  padding-left: 1.2rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}
.plan-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand-accent);
}

/* ----- section-4 讀者證詞 carousel ----- */
.section-testimonials { background: var(--card-bg); border-top: 1px solid var(--border); }
.carousel-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.carousel-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.carousel-btn:hover {
  background: var(--brand-accent);
  border-color: var(--brand-accent);
  transform: scale(1.05);
}
.carousel-track {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem 0;
  scrollbar-width: thin;
}
.carousel-track::-webkit-scrollbar { height: 6px; }
.carousel-track::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.section-testimonials .testimonial-card {
  flex: 0 0 300px;
  width: 300px;
  scroll-snap-align: start;
  padding: 1.75rem;
}
.testimonial-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow);
}
.testimonial-role { font-size: 0.9rem; font-weight: 600; color: var(--text); margin: 0 0 0.2rem; }
.testimonial-followers { font-size: 0.8rem; color: var(--brand-accent); font-weight: 500; margin: 0 0 0.5rem; }
.testimonial-quote { font-size: 0.95rem; font-style: italic; margin: 0 0 0.5rem; color: var(--text); line-height: 1.5; }
.testimonial-source { font-size: 0.8rem; color: var(--muted); margin: 0.5rem 0 0; }
.testimonial-source a { color: var(--muted); text-decoration: none; }
.testimonial-source a:hover { color: var(--brand-accent); }

/* ----- section-founder 創辦人 ----- */
.section-founder { background: var(--bg); }
.founder-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2.5rem;
  padding: 2.5rem;
  align-items: start;
  max-width: 800px;
  margin: 0 auto;
}
.founder-avatar {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow);
}
.founder-bio p { margin: 0 0 1rem; font-size: 1rem; color: var(--text); }
.founder-stats { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.founder-stats li { margin-bottom: 0.5rem; font-size: 0.98rem; color: var(--text); padding-left: 1.2rem; position: relative; }
.founder-stats li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 5px; height: 5px; border-radius: 50%; background: var(--brand-accent); }
.founder-ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ----- section-gift 提醒區塊 ----- */
.section-gift {
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 3rem 1.5rem;
}
.gift-reminder { font-size: 1.1rem; font-weight: 600; margin: 0 0 1rem; color: var(--text); }
.gift-note { font-size: 0.85rem; color: var(--muted); margin: 0.75rem 0 0; }

/* ----- Footer ----- */
.footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  padding: 1.5rem;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 0.9rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 0.85rem; color: var(--muted); margin: 0; }

/* ----- Toast ----- */
/* ----- RWD ----- */
@media (min-width: 900px) {
  .btn-nav { display: inline-block; }
}

@media (max-width: 899px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 1rem;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open li { padding: 0.65rem 0; border-bottom: 1px solid var(--border); }
  .nav-links.open li:last-child { border-bottom: none; }
  .nav-toggle { display: flex; }
  .btn-nav { display: none; }

  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-subtext { max-width: none; }
  .hero-benefits { text-align: left; max-width: 320px; margin-left: auto; margin-right: auto; }
  .hero-stats { justify-content: center; }
  .hero-right { order: -1; }
  .hero-image { max-width: 100%; }

  .mission-card { grid-template-columns: 1fr; text-align: center; }
  .mission-visual { order: -1; }
  .mission-visual img { max-width: 100%; }

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

  .why-row { grid-template-columns: 1fr; gap: 0.5rem; }
  .why-arrow { order: -1; }

  .plans-grid { grid-template-columns: 1fr; }

  .section-testimonials .testimonial-card { flex: 0 0 280px; width: 280px; }
  .carousel-btn { width: 38px; height: 38px; font-size: 1.25rem; }

  .founder-card { grid-template-columns: 1fr; text-align: center; }
  .founder-avatar { margin: 0 auto; }
  .founder-ctas { justify-content: center; }

  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 600px) {
  .hero { padding: 2.5rem 1rem 3.5rem; }
  .section { padding: 3rem 1rem; }
  .mission-card { padding: 1.5rem; }
  .why-row { padding: 1rem; }
  .plan-card { padding: 1.5rem; }
}
