/* 趣野 · PlayNature 下载站
 * 设计 Token 来源：app/constants/Colors.ts · docs/STYLE_GUIDE.md
 */

:root {
  --primary: #4caf50;
  --primary-dark: #2e7d32;
  --primary-darker: #1b5e20;
  --secondary: #5bc0eb;
  --accent: #ffd54f;
  --highlight: #ff6b6b;
  --nature: #8bcf7a;
  --earth: #c89f65;
  --background: #f8faf7;
  --title: #2e3a3a;
  --body: #666666;
  --text-tertiary: #9aa5a0;
  --divider: #e6ece6;
  --surface: #ffffff;
  --overlay: rgba(46, 58, 58, 0.5);

  --font-page-title: 30px;
  --font-section: 22px;
  --font-card-title: 18px;
  --font-body: 16px;
  --font-caption: 13px;

  --radius-card: 24px;
  --radius-media: 16px;
  --radius-sm: 12px;
  --radius-full: 999px;

  --page-padding: 24px;
  --card-gap: 16px;
  --section-gap: 32px;
  --card-padding: 24px;

  --shadow-light: 0 2px 8px rgba(46, 58, 58, 0.06);
  --shadow-float: 0 4px 16px rgba(46, 58, 58, 0.12);

  --header-height: 72px;
  --max-width: 1200px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans SC", "HarmonyOS Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: var(--font-body);
  line-height: 1.6;
  color: var(--body);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--page-padding);
}

/* ── Header ── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(248, 250, 247, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.site-header.scrolled {
  border-bottom-color: var(--divider);
  box-shadow: var(--shadow-light);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--title);
  letter-spacing: -0.02em;
}

.logo-text span {
  color: var(--primary);
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-desktop a {
  font-size: 15px;
  color: var(--title);
  transition: color 0.2s;
}

.nav-desktop a:hover {
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 24px;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, opacity 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-light);
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: var(--shadow-float);
}

.btn-outline {
  background: var(--surface);
  color: var(--title);
  border: 1.5px solid var(--divider);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-ghost-light {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
}

.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.25);
}

.btn-white {
  background: #fff;
  color: var(--title);
}

.btn-white:hover {
  box-shadow: var(--shadow-float);
}

.btn-lg {
  min-height: 52px;
  padding: 0 32px;
  font-size: 16px;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--title);
}

.menu-toggle:hover {
  background: var(--divider);
}

.nav-mobile {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--divider);
  padding: 16px var(--page-padding) 24px;
  box-shadow: var(--shadow-float);
  flex-direction: column;
  gap: 4px;
}

.nav-mobile.open {
  display: flex;
}

.nav-mobile a {
  display: block;
  padding: 12px 0;
  font-size: 16px;
  color: var(--title);
  border-bottom: 1px solid var(--divider);
}

.nav-mobile a:last-child {
  border-bottom: none;
}

.nav-mobile .btn {
  margin-top: 12px;
  width: 100%;
}

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(27, 94, 32, 0.72) 0%, rgba(46, 58, 58, 0.35) 45%, rgba(46, 58, 58, 0.15) 100%),
    linear-gradient(180deg, #3d6b4f 0%, #6b9a72 40%, #a8c9a0 100%);
  /* 替换为正式素材：background-image: url('../assets/hero-forest.jpg'); */
  background-size: cover;
  background-position: center;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 560px;
  padding: 80px 0 96px;
  color: #fff;
}

.hero-tag {
  display: inline-block;
  padding: 6px 14px;
  margin-bottom: 20px;
  background: rgba(139, 207, 122, 0.25);
  border: 1px solid rgba(139, 207, 122, 0.45);
  border-radius: var(--radius-full);
  font-size: var(--font-caption);
  font-weight: 600;
  color: #e8f5e9;
  letter-spacing: 0.04em;
}

.hero-title {
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.hero-desc {
  font-size: 17px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 32px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  width: max-content;
  max-width: 100%;
}

.hero-actions .store-btn {
  min-width: 0;
  flex: 0 1 auto;
  padding: 0 18px;
  gap: 10px;
}

.hero-actions .store-btn strong {
  font-size: 15px;
}

.hero-actions .btn-outline {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

.hero-actions .btn-outline:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: #fff;
  color: #fff;
}

/* ── Section common ── */
.section {
  padding: 96px 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.section-tag {
  display: inline-block;
  font-size: var(--font-caption);
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  color: var(--title);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-desc {
  font-size: 17px;
  color: var(--body);
}

/* ── Features（统一左文右图） ── */
.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.feature-card {
  border-radius: var(--radius-card);
  padding: 28px;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px 24px;
  min-height: 300px;
  transition: transform 0.25s, box-shadow 0.25s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-float);
}

.feature-card--white {
  background: var(--surface);
  box-shadow: var(--shadow-light);
}

.feature-card--nature {
  background: var(--nature);
  color: #fff;
}

.feature-card--earth {
  background: linear-gradient(135deg, #f5efe6 0%, #ede4d4 100%);
  color: var(--title);
}

.feature-card--map {
  background: #e8f2ea;
  color: var(--title);
}

.feature-body {
  min-width: 0;
}

.feature-card h3 {
  font-size: var(--font-section);
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.feature-card--nature h3,
.feature-card--nature p {
  color: #fff;
}

.feature-card p {
  font-size: 15px;
  line-height: 1.65;
  opacity: 0.92;
  margin: 0;
}

.feature-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

.feature-stats li {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(46, 58, 58, 0.06);
  font-size: 13px;
  font-weight: 500;
  color: var(--body);
  line-height: 1.3;
}

.feature-stats li strong {
  color: #2e7d32;
  font-weight: 700;
}

.feature-stats--on-dark li {
  background: rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.95);
}

.feature-stats--on-dark li strong {
  color: #fff;
}

.feature-shot {
  margin: 0;
  width: 148px;
  flex-shrink: 0;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid rgba(46, 58, 58, 0.1);
  box-shadow: 0 10px 24px rgba(46, 58, 58, 0.12);
  background: #f4f7f3;
}

.feature-shot img {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: cover;
  object-position: top center;
}

/* 地图截图裁到附近卡片区域，避免只见顶栏 */
.feature-shot--map img {
  object-position: center 62%;
}

/* ── Showcase ── */
.showcase {
  background: var(--surface);
}

.showcase-stage {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 28px;
  padding: 8px 16px 0;
}

.phone-frame {
  margin: 0;
  width: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.phone-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 390 / 844;
  object-fit: cover;
  object-position: top center;
  border-radius: 28px;
  border: 3px solid #1a1f1a;
  box-shadow: var(--shadow-float);
  background: #f8faf7;
  display: block;
}

.phone-frame figcaption {
  font-size: 14px;
  font-weight: 600;
  color: var(--title);
}

.phone-frame--center {
  width: 248px;
  transform: translateY(-20px);
  z-index: 1;
}

.phone-frame--center img {
  border-radius: 32px;
  box-shadow: 0 20px 48px rgba(46, 58, 58, 0.18);
}

/* ── CTA ── */
.cta-section {
  background: var(--primary-darker);
  color: #fff;
  text-align: center;
  padding: 96px 0;
}

.cta-section .section-title {
  color: #fff;
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 16px;
}

.cta-section .section-desc {
  color: rgba(255, 255, 255, 0.82);
  max-width: 520px;
  margin: 0 auto 40px;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 168px;
  min-height: 56px;
  padding: 0 20px;
  border-radius: var(--radius-full);
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.store-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.store-btn small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  opacity: 0.75;
  text-align: left;
}

.store-btn strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
}

.store-btn svg {
  flex-shrink: 0;
}

/* ── Footer ── */
.site-footer {
  background: var(--background);
  padding: 64px 0 32px;
  border-top: 1px solid var(--divider);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 48px 32px;
  margin-bottom: 48px;
}

.footer-grid--no-social {
  grid-template-columns: 1.6fr 1fr 1fr;
}

.footer-brand p {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.7;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--title);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li + li {
  margin-top: 10px;
}

.footer-col a {
  font-size: 14px;
  color: var(--body);
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-contact {
  font-size: 14px;
  color: var(--body);
  word-break: break-all;
}

.footer-contact a {
  color: var(--body);
  transition: color 0.2s;
}

.footer-contact a:hover {
  color: var(--primary);
}

.social-links {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--title);
  transition: border-color 0.2s, color 0.2s;
}

.social-link:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--divider);
  font-size: var(--font-caption);
  color: var(--text-tertiary);
}

.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-icp {
  color: var(--text-tertiary);
  text-decoration: none;
}

.footer-icp:hover {
  color: var(--primary);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-legal a:hover {
  color: var(--primary);
}

/* ── Toast ── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 48px;
  transform: translateX(-50%) translateY(12px);
  z-index: 1000;
  padding: 12px 22px;
  border-radius: 999px;
  background: rgba(46, 58, 58, 0.92);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 24px rgba(46, 58, 58, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── QR Modal（电脑端扫码） ── */
.qr-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.qr-modal[hidden] {
  display: none !important;
}

.qr-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(46, 58, 58, 0.55);
}

.qr-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 340px);
  padding: 28px 24px 32px;
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: 0 16px 48px rgba(46, 58, 58, 0.22);
  text-align: center;
}

.qr-modal__close {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.qr-modal__close:hover {
  color: var(--title);
}

.qr-modal__title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--title);
}

.qr-modal__hint {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--body);
  line-height: 1.5;
}

.qr-modal__img {
  display: block;
  width: 220px;
  height: 220px;
  margin: 0 auto;
  border-radius: 12px;
  background: #f8faf7;
  object-fit: contain;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .feature-card {
    min-height: 0;
    gap: 16px 18px;
    padding: 22px;
  }

  .feature-shot {
    width: 128px;
  }

  .feature-shot img {
    height: 220px;
  }

  .footer-grid,
  .footer-grid--no-social {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-desktop,
  .header-actions .btn-primary {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .hero-content {
    padding: 48px 0 64px;
  }

  .hero-actions {
    flex-wrap: wrap;
    width: 100%;
  }

  .hero-actions .store-btn {
    flex: 1 1 calc(50% - 10px);
    min-width: 140px;
    justify-content: center;
  }

  .section {
    padding: 64px 0;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    grid-template-columns: 1fr;
    justify-items: start;
    min-height: 0;
    padding: 24px;
  }

  .feature-shot,
  .feature-shot--map {
    width: min(180px, 56vw);
    justify-self: center;
  }

  .feature-shot img {
    height: 300px;
  }

  .showcase-stage {
    flex-direction: column;
    align-items: center;
  }

  .phone-frame,
  .phone-frame--center {
    width: min(280px, 86vw);
    transform: none;
  }

  .phone-frame--center {
    order: -1;
  }

  .footer-grid,
  .footer-grid--no-social {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
