/* LingJi Garden — wellness palette, mobile-first */
:root {
  --bg-base: #FAF6EF;
  --surface-card: #FFFCF6;
  --text-primary: #3D3A35;
  --text-secondary: #7A7568;
  --text-tertiary: #A8A498;
  --divider: rgba(61, 58, 53, 0.08);
  --wood:  #A8C4A2;
  --fire:  #E8A598;
  --earth: #D4B581;
  --metal: #C8C2B6;
  --water: #7B8FA3;
  --max-width: 1120px;
  --section-py: 96px;
  --section-py-mobile: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Noto Sans SC', 'Noto Sans JP', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html[lang="zh-Hans"] body, html[lang="zh-Hant"] body { font-family: 'Noto Sans SC', 'Noto Sans TC', -apple-system, system-ui, sans-serif; }
html[lang="ja"] body { font-family: 'Noto Sans JP', -apple-system, system-ui, sans-serif; }
html[lang="ko"] body { font-family: 'Noto Sans KR', -apple-system, system-ui, sans-serif; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--text-primary); text-decoration: none; }
a:hover { opacity: 0.7; }

h1, h2, h3 {
  font-family: 'Cormorant Garamond', 'Noto Serif SC', 'Noto Serif JP', 'Noto Serif KR', Georgia, serif;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.15; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.25; }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); line-height: 1.3; }

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

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 239, 0.92);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--divider);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: 'Cormorant Garamond', 'Noto Serif SC', serif; font-size: 20px; font-weight: 500; }
.brand img { width: 32px; height: 32px; }
.lang-switcher { background: transparent; border: 1px solid var(--divider); border-radius: 8px; padding: 6px 10px; font-size: 13px; color: var(--text-secondary); cursor: pointer; }

/* Hero */
.hero { padding: 80px 0 64px; position: relative; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.hero-text h1 { margin-bottom: 16px; }
.hero-text .lead { font-size: 18px; color: var(--text-secondary); margin-bottom: 32px; }
.hero-mockup { display: flex; justify-content: center; }
.hero-mockup img { max-height: 560px; filter: drop-shadow(0 20px 40px rgba(61, 58, 53, 0.12)); }

/* Download CTAs */
.download-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn-store {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--text-primary); color: var(--surface-card);
  padding: 12px 20px; border-radius: 12px; font-weight: 500;
  transition: transform 0.15s ease;
}
.btn-store:hover { transform: translateY(-1px); opacity: 1; }
.btn-store svg { width: 22px; height: 22px; }
.btn-store .small { font-size: 11px; opacity: 0.7; display: block; }
.btn-store .big { font-size: 15px; }
.btn-apk { font-size: 13px; color: var(--text-secondary); text-decoration: underline; padding: 8px; }

/* Friction-Free row */
.friction-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; padding: 40px 0; border-top: 1px solid var(--divider); border-bottom: 1px solid var(--divider); }
.friction-item { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--text-secondary); }
.friction-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--wood); flex-shrink: 0; }

/* Sections */
section { padding: var(--section-py) 0; }
section.alt { background: var(--surface-card); }
.section-head { text-align: center; margin-bottom: 56px; }
.section-head h2 { margin-bottom: 12px; }
.section-head .sub { color: var(--text-secondary); font-size: 17px; max-width: 600px; margin: 0 auto; }

.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.feature-grid.reverse { direction: rtl; }
.feature-grid.reverse > * { direction: ltr; }
.feature-grid img { border-radius: 24px; box-shadow: 0 10px 30px rgba(61, 58, 53, 0.08); }
.feature-text h3 { margin-bottom: 16px; }
.feature-text p { color: var(--text-secondary); font-size: 16px; margin-bottom: 12px; }

.element-swatches { display: flex; gap: 4px; margin-top: 24px; height: 8px; border-radius: 4px; overflow: hidden; }
.element-swatches span { flex: 1; }
.sw-wood { background: var(--wood); }
.sw-fire { background: var(--fire); }
.sw-earth { background: var(--earth); }
.sw-metal { background: var(--metal); }
.sw-water { background: var(--water); }

/* Final CTA */
.final-cta { text-align: center; padding: 96px 0; }
.final-cta h2 { margin-bottom: 24px; }
.final-cta .download-cta { justify-content: center; }
.final-cta .reassure { color: var(--text-tertiary); font-size: 14px; margin-top: 20px; }

/* Footer */
footer { background: var(--text-primary); color: var(--surface-card); padding: 48px 0 32px; }
footer a { color: var(--surface-card); opacity: 0.75; }
footer a:hover { opacity: 1; }
footer .wrap { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 24px; align-items: center; }
footer .footer-links { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; }
footer .footer-end { text-align: right; font-size: 13px; opacity: 0.6; }

/* Support page FAQ */
.faq { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.faq details { background: var(--surface-card); border-radius: 12px; margin-bottom: 12px; padding: 20px 24px; }
.faq summary { font-weight: 500; cursor: pointer; font-size: 16px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; font-size: 20px; color: var(--text-tertiary); transition: transform 0.2s ease; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin-top: 12px; color: var(--text-secondary); font-size: 15px; }

/* Privacy/Terms long-form */
.legal { max-width: 760px; margin: 0 auto; padding: 64px 24px; }
.legal h1 { margin-bottom: 8px; }
.legal .updated { color: var(--text-tertiary); font-size: 14px; margin-bottom: 32px; }
.legal h2 { margin-top: 40px; margin-bottom: 12px; font-size: 22px; }
.legal p, .legal li { color: var(--text-secondary); font-size: 15px; margin-bottom: 12px; }
.legal ul { padding-left: 20px; margin-bottom: 16px; }
.legal a { color: var(--water); text-decoration: underline; }

/* APK modal */
.apk-modal {
  display: none; position: fixed; inset: 0; z-index: 100;
  background: rgba(61, 58, 53, 0.4); align-items: center; justify-content: center;
}
.apk-modal.open { display: flex; }
.apk-modal-inner {
  background: var(--surface-card); border-radius: 16px; padding: 32px; max-width: 440px; margin: 24px;
}
.apk-modal h3 { margin-bottom: 16px; }
.apk-modal p { color: var(--text-secondary); font-size: 14px; margin-bottom: 12px; }
.apk-modal code { font-family: ui-monospace, SFMono-Regular, monospace; font-size: 11px; word-break: break-all; background: var(--bg-base); padding: 4px 6px; border-radius: 4px; display: inline-block; }
.apk-modal .row { display: flex; gap: 12px; margin-top: 24px; }
.apk-modal button { flex: 1; padding: 12px; border-radius: 10px; border: 0; cursor: pointer; font-size: 14px; font-weight: 500; }
.apk-modal .primary { background: var(--text-primary); color: var(--surface-card); }
.apk-modal .secondary { background: var(--bg-base); color: var(--text-primary); }

/* Mobile */
@media (max-width: 768px) {
  section { padding: var(--section-py-mobile) 0; }
  .hero { padding: 48px 0 32px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .feature-grid { grid-template-columns: 1fr; gap: 32px; }
  .feature-grid.reverse { direction: ltr; }
  .friction-row { grid-template-columns: 1fr; gap: 16px; }
  footer .wrap { grid-template-columns: 1fr; text-align: center; }
  footer .footer-end { text-align: center; }
  .download-cta { justify-content: center; }
  .hero-mockup img { max-height: 420px; }
}
