/* ============ CSS Variables & Reset ============ */
:root {
  --color-bg: #faf9f5;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-text-secondary: #6b6b6b;
  --color-accent: #d97757;
  --color-accent-hover: #c56a4a;
  --color-accent-light: #fef0ea;
  --color-border: #e8e6dc;
  --color-dark: #141413;
  --color-mid: #b0aea5;
  --color-subtle: #f5f3ee;
  --font-heading: 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08);
  --transition-fast: 150ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-base: 300ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ============ Navigation ============ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: var(--transition-base);
}

.navbar.scrolled {
  background: rgba(250, 249, 245, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--color-border);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--color-dark);
  letter-spacing: -0.5px;
}

.logo-img {
  height: 36px;
  width: auto;
  display: block;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
  transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-text);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-cta {
  background: var(--color-accent);
  color: #fff !important;
  padding: 10px 22px;
  border-radius: 100px;
  font-weight: 600;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.nav-cta:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
}

.nav-cta::after {
  display: none;
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-dark);
  border-radius: 1px;
  transition: var(--transition-base);
}

/* ============ Hero ============ */
.hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 120px 24px 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-particle {
  position: absolute;
  border-radius: 50%;
  background: var(--color-accent);
  opacity: 0.06;
  animation: float 20s infinite ease-in-out;
}

.hero-particle:nth-child(1) { width: 300px; height: 300px; top: -10%; left: -5%; animation-delay: 0s; animation-duration: 25s; }
.hero-particle:nth-child(2) { width: 200px; height: 200px; top: 20%; right: -3%; animation-delay: -5s; animation-duration: 22s; }
.hero-particle:nth-child(3) { width: 150px; height: 150px; bottom: 10%; left: 20%; animation-delay: -10s; animation-duration: 18s; }
.hero-particle:nth-child(4) { width: 100px; height: 100px; top: 40%; left: 50%; animation-delay: -15s; animation-duration: 20s; }
.hero-particle:nth-child(5) { width: 250px; height: 250px; bottom: -5%; right: 15%; animation-delay: -8s; animation-duration: 24s; }
.hero-particle:nth-child(6) { width: 80px; height: 80px; top: 60%; left: 10%; animation-delay: -12s; animation-duration: 16s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -30px) scale(1.1); }
  50% { transform: translate(-20px, -50px) scale(0.95); }
  75% { transform: translate(-40px, -10px) scale(1.05); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 6px 20px;
  background: var(--color-accent-light);
  color: var(--color-accent);
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 32px;
  letter-spacing: 0.5px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(42px, 7vw, 80px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 28px;
}

.title-line {
  display: block;
}

.title-line.accent {
  background: linear-gradient(135deg, var(--color-accent) 0%, #e8946e 50%, #c56a4a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 18px;
  color: var(--color-text-secondary);
  line-height: 1.8;
  max-width: 560px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 100px;
  font-size: 16px;
  font-weight: 600;
  transition: all var(--transition-base);
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 4px 20px rgba(217, 119, 87, 0.3);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(217, 119, 87, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 2px solid var(--color-border);
}

.btn-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 18px 40px;
  font-size: 18px;
}

/* Hero Stats */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-num {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 800;
  color: var(--color-dark);
  letter-spacing: -1px;
  display: inline;
}

.stat-suffix {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-accent);
  margin-left: 2px;
}

.stat-label {
  display: block;
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-top: 4px;
}

/* ============ Section Common ============ */
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 64px;
}

.section-badge {
  display: inline-block;
  padding: 4px 16px;
  background: var(--color-accent-light);
  color: var(--color-accent);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
  color: var(--color-dark);
}

.section-desc {
  font-size: 17px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ============ Tools ============ */
.tools {
  padding: 100px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.tool-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  transition: all var(--transition-base);
  cursor: pointer;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s var(--transition-slow) forwards;
  animation-delay: calc(var(--delay, 0) * 1ms + 100ms);
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tool-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.tool-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
  color: var(--color-accent);
}

.tool-icon svg {
  width: 100%;
  height: 100%;
}

.tool-card h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--color-dark);
}

.tool-card p {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

.tool-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-accent);
  transition: gap var(--transition-fast);
}

.tool-link:hover span {
  transform: translateX(4px);
}

.tool-link span {
  transition: transform var(--transition-fast);
  display: inline-block;
}

/* ============ Features ============ */
.features {
  padding: 100px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.feature-item {
  text-align: center;
  padding: 32px 24px;
  border-radius: var(--radius-lg);
  transition: background var(--transition-base);
}

.feature-item:hover {
  background: var(--color-subtle);
}

.feature-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  color: var(--color-accent);
}

.feature-icon svg {
  width: 100%;
  height: 100%;
}

.feature-item h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--color-dark);
}

.feature-item p {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ============ Fun Section ============ */
.fun-section {
  padding: 100px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.fun-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.fun-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}

.fun-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.fun-card-bg {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fun-card-icon {
  width: 64px;
  height: 64px;
}

.fun-card h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  padding: 20px 24px 8px;
  color: var(--color-dark);
}

.fun-card p {
  font-size: 14px;
  color: var(--color-text-secondary);
  padding: 0 24px 24px;
  line-height: 1.6;
}

/* ============ CTA Section ============ */
.cta-section {
  padding: 100px 24px;
  text-align: center;
}

.cta-content {
  max-width: 600px;
  margin: 0 auto;
  padding: 64px 48px;
  background: linear-gradient(135deg, var(--color-accent-light), #fff5f0);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(217, 119, 87, 0.15);
}

.cta-content h2 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
  color: var(--color-dark);
}

.cta-content p {
  font-size: 17px;
  color: var(--color-text-secondary);
  margin-bottom: 36px;
  line-height: 1.7;
}

.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============ About ============ */
.about {
  padding: 100px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.about-content {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.about-content p {
  font-size: 17px;
  color: var(--color-text-secondary);
  line-height: 1.9;
  margin-bottom: 20px;
}

/* ============ Footer ============ */
.footer {
  background: var(--color-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 64px 24px 32px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand {
  max-width: 240px;
}

.footer-brand .footer-logo-img {
  height: 32px;
  width: auto;
  display: block;
  margin-bottom: 4px;
}

.footer-brand .logo-text {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-left: 8px;
}

.footer-brand p {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 14px;
  margin-bottom: 10px;
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 14px;
}

.footer-icp {
  margin-top: 8px;
  opacity: 0.5;
  font-size: 13px;
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .tools-grid,
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .fun-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100dvh;
    background: var(--color-surface);
    flex-direction: column;
    padding: 80px 32px 32px;
    box-shadow: var(--shadow-lg);
    transition: right var(--transition-base);
    gap: 24px;
  }

  .nav-links.active {
    right: 0;
  }

  .mobile-toggle {
    display: flex;
    position: relative;
    z-index: 1001;
  }

  .hero-stats {
    gap: 32px;
  }

  .tools-grid,
  .features-grid,
  .fun-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .cta-content {
    padding: 48px 24px;
  }

  .footer-container {
    flex-direction: column;
    gap: 32px;
  }

  .footer-links {
    gap: 32px;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .tools, .features, .fun-section, .about {
    padding: 64px 16px;
  }

  .cta-section {
    padding: 64px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
