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

:root {
  /* 主色贴近豆包品牌绿色系，辅色保留蓝紫点缀以区分纯官网拷贝 */
  --brand-primary: #00a870;
  --brand-primary-hover: #008f5f;
  --brand-glow: rgba(0, 168, 112, 0.35);
  --accent-blue: #3370ff;
  --text-primary: #141414;
  --text-secondary: #5c5c5c;
  --text-light: #949494;
  --bg-page: #f3f6f4;
  --bg-white: #fff;
  --bg-nav: rgba(255, 255, 255, 0.88);
  --border-color: #e5ebe8;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-nav: 0 4px 24px rgba(0, 0, 0, 0.06);
  --shadow-card: 0 8px 32px rgba(0, 40, 24, 0.06);
  --hero-mesh: radial-gradient(ellipse 80% 60% at 50% -30%, rgba(0, 168, 112, 0.14), transparent),
    radial-gradient(ellipse 60% 40% at 100% 10%, rgba(51, 112, 255, 0.08), transparent);
  --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  --transition-fast: 0.2s ease;
  --transition-med: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: #f2f2f2;
    --text-secondary: #b8b8b8;
    --text-light: #888;
    --bg-page: #0d0f0e;
    --bg-white: #161918;
    --bg-nav: rgba(22, 25, 24, 0.9);
    --border-color: #2a2e2c;
    --shadow-nav: 0 4px 28px rgba(0, 0, 0, 0.45);
    --shadow-card: 0 8px 40px rgba(0, 0, 0, 0.35);
    --hero-mesh: radial-gradient(ellipse 80% 60% at 50% -30%, rgba(0, 168, 112, 0.22), transparent),
      radial-gradient(ellipse 60% 40% at 100% 10%, rgba(51, 112, 255, 0.12), transparent);
  }
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-family);
  color: var(--text-primary);
  background: var(--bg-page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.nav-drawer-open {
  overflow: hidden;
}

body.nav-drawer-open::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 998;
  background: rgba(0, 0, 0, 0.28);
  animation: overlayIn 0.25s ease forwards;
}

@keyframes overlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 3px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* ========== NAV ========== */
.nav-wrapper {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 50px;
  padding: 8px 8px 8px 16px;
  box-shadow: var(--shadow-nav);
  border: 1px solid rgba(0, 0, 0, 0.04);
  max-width: min(960px, calc(100vw - 24px));
}

@media (prefers-color-scheme: dark) {
  .nav {
    border-color: rgba(255, 255, 255, 0.06);
  }
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  margin-right: 8px;
  flex-shrink: 0;
}

.nav-logo img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-logo span {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 6px 14px;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 20px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.04);
}

.nav-links a.active {
  color: var(--text-primary);
  font-weight: 600;
}

.nav-download {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  background: linear-gradient(135deg, var(--brand-primary) 0%, #00c78c 100%);
  color: #fff;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  white-space: nowrap;
  margin-left: 4px;
  box-shadow: 0 2px 12px var(--brand-glow);
}

.nav-download:hover {
  background: linear-gradient(135deg, var(--brand-primary-hover) 0%, #00a870 100%);
  transform: translateY(-1px);
}

/* 移动端折叠菜单按钮 */
.nav-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-left: auto;
  margin-right: 4px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 50%;
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.nav-menu-toggle:hover {
  background: rgba(0, 0, 0, 0.06);
}

@media (prefers-color-scheme: dark) {
  .nav-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
  }
}

.nav-menu-bars {
  position: relative;
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform var(--transition-med);
}

.nav-menu-bars::before,
.nav-menu-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform var(--transition-med);
}

.nav-menu-bars::before {
  top: -6px;
}

.nav-menu-bars::after {
  top: 6px;
}

.nav.nav--open .nav-menu-bars {
  background: transparent;
}

.nav.nav--open .nav-menu-bars::before {
  top: 0;
  transform: rotate(45deg);
}

.nav.nav--open .nav-menu-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ========== HERO ========== */
.hero {
  text-align: center;
  padding: 140px 20px 48px;
  background: var(--bg-page);
  background-image: var(--hero-mesh);
}

.hero h1 {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.cta-desc {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 40px;
  background: linear-gradient(135deg, var(--brand-primary) 0%, #00c78c 55%, var(--accent-blue) 160%);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
  box-shadow: 0 6px 28px var(--brand-glow), 0 2px 8px rgba(51, 112, 255, 0.15);
}

.btn-download:hover {
  filter: brightness(1.05);
  transform: translateY(-2px);
  box-shadow: 0 10px 36px var(--brand-glow), 0 4px 14px rgba(51, 112, 255, 0.2);
}

.btn-download .apple-icon {
  width: 20px;
  height: 20px;
}

.hero-web-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 20px;
  font-size: 15px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.hero-web-link:hover {
  color: var(--text-primary);
}

.hero-web-link .arrow {
  transition: transform 0.2s;
}

.hero-web-link:hover .arrow {
  transform: translateX(3px);
}

/* ========== APP MOCKUP ========== */
.app-mockup-section {
  padding: 20px 20px 60px;
  display: flex;
  justify-content: center;
}

.app-mockup-img {
  width: 100%;
  max-width: 900px;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  display: block;
}

/* ========== FEATURES SECTION ========== */
.features-section {
  padding: 80px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-header p {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ========== FEATURES TABS ========== */
.features-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 60px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 10px 24px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-white);
  border-radius: 50px;
  font-size: 15px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
}

.tab-btn:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--brand-primary), #00b57a);
  border-color: transparent;
  color: #fff;
  font-weight: 500;
  box-shadow: 0 4px 16px var(--brand-glow);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeUp 0.4s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== FEATURE CARDS ========== */
.feature-card {
  display: flex;
  align-items: center;
  gap: 60px;
  margin-bottom: 80px;
  padding: 40px;
  background: var(--bg-white);
  border-radius: 24px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 40, 24, 0.08);
}

@media (prefers-color-scheme: dark) {
  .feature-card:hover {
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
  }
}

.feature-card:last-child {
  margin-bottom: 0;
}

.feature-card.reverse {
  flex-direction: row-reverse;
}

.feature-text {
  flex: 1;
  min-width: 280px;
}

.feature-number {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 500;
  margin-bottom: 8px;
}

.feature-text h3 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.feature-text p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.feature-visual {
  flex: 1.2;
  min-width: 280px;
}

.feature-visual img {
  width: 100%;
  border-radius: var(--radius-md);
  display: block;
}

/* ========== BOTTOM CTA ========== */
.cta-section {
  text-align: center;
  padding: 80px 20px 60px;
  background: var(--bg-page);
}

.cta-section h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 32px;
  letter-spacing: -0.01em;
}

/* ========== FOOTER ========== */
.footer {
  background: linear-gradient(180deg, #141816 0%, #0a0c0b 100%);
  color: #aaa;
  padding: 32px 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  gap: 16px;
}

.footer-info {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.footer-info span {
  white-space: nowrap;
}

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

.footer-links a {
  color: #aaa;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .hero h1 {
    font-size: 32px;
  }

  .section-header h2 {
    font-size: 30px;
  }

  .feature-card {
    flex-direction: column !important;
    gap: 30px;
    padding: 24px;
  }

  .feature-text,
  .feature-visual {
    min-width: unset;
    width: 100%;
  }

  .feature-text h3 {
    font-size: 24px;
  }

  .nav-menu-toggle {
    display: inline-flex;
  }

  .nav-download {
    margin-left: 0;
  }

  .nav {
    position: relative;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .nav-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    position: fixed;
    top: 88px;
    left: 50%;
    z-index: 999;
    width: min(360px, calc(100vw - 32px));
    max-height: min(70vh, 420px);
    overflow-y: auto;
    margin: 0;
    padding: 12px;
    list-style: none;
    background: var(--bg-nav);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-nav);
    transform: translateX(-50%) translateY(-8px) scale(0.98);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--transition-med), transform var(--transition-med), visibility var(--transition-med);
  }

  .nav.nav--open .nav-links {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0) scale(1);
  }

  .nav-links a {
    border-radius: var(--radius-sm);
    text-align: center;
  }

  .cta-section h2 {
    font-size: 26px;
  }

  .footer {
    flex-direction: column;
    text-align: center;
    padding: 32px 20px;
  }

  .footer-info {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .hero h1 {
    font-size: 26px;
  }

  .btn-download {
    padding: 12px 28px;
    font-size: 16px;
  }
}
