/* ========================================
   配方管家 RecipePad 官网样式
   纯 CSS，无外部依赖
   ======================================== */

/* CSS Variables */
:root {
  --re-primary: #e95322;
  --re-secondary: #f5cb58;
  --re-tertiary: #ffdecf;
  --re-bg: #f8f8f8;
  --re-text: #391713;
  --re-grey: #9ca3af;
  --re-white: #ffffff;
  --re-shadow: 0 4px 20px rgba(57, 23, 19, 0.08);
  --re-shadow-hover: 0 8px 30px rgba(57, 23, 19, 0.12);
  --re-radius: 12px;
  --re-radius-lg: 20px;
  --re-transition: all 0.3s ease;
  --header-height: 64px;
}

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

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

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--re-text);
  background-color: var(--re-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========================================
   Header & Navigation
   ======================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: var(--re-secondary);
  z-index: 1000;
  transition: var(--re-transition);
}

.site-header.scrolled {
  box-shadow: 0 2px 16px rgba(57, 23, 19, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--re-text);
}

.logo-img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}

.logo-text small {
  font-weight: 400;
  font-size: 0.75em;
  opacity: 0.7;
  margin-left: 4px;
}

.main-nav .nav-links {
  display: flex;
  gap: 32px;
}

.main-nav .nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--re-text);
  position: relative;
  padding: 4px 0;
  transition: var(--re-transition);
}

.main-nav .nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--re-primary);
  transition: width 0.3s ease;
}

.main-nav .nav-links a:hover::after,
.main-nav .nav-links a:focus::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  position: relative;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--re-text);
  border-radius: 2px;
  transition: var(--re-transition);
}

.hamburger {
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
}

.hamburger::before {
  top: -7px;
}

.hamburger::after {
  top: 7px;
}

.menu-toggle.active .hamburger {
  background-color: transparent;
}

.menu-toggle.active .hamburger::before {
  top: 0;
  transform: rotate(45deg);
}

.menu-toggle.active .hamburger::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 50px;
  transition: var(--re-transition);
  cursor: pointer;
}

.btn-primary {
  background-color: var(--re-primary);
  color: var(--re-white);
  box-shadow: 0 4px 14px rgba(233, 83, 34, 0.35);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #d1481c;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(233, 83, 34, 0.45);
}

.btn-outline {
  background-color: transparent;
  color: var(--re-primary);
  border: 2px solid var(--re-primary);
}

.btn-outline:hover,
.btn-outline:focus {
  background-color: var(--re-primary);
  color: var(--re-white);
  transform: translateY(-2px);
}

.btn-white {
  background-color: var(--re-white);
  color: var(--re-primary);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.btn-white:hover,
.btn-white:focus {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* ========================================
   Hero Section
   ======================================== */
.hero-section {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--re-tertiary) 0%, var(--re-bg) 100%);
  display: flex;
  align-items: center;
  position: relative;
  padding-top: var(--header-height);
  padding-bottom: 60px;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

.hero-content {
  flex: 1;
  max-width: 540px;
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
  color: var(--re-text);
}

.hero-title-accent {
  color: var(--re-primary);
}

.hero-subtitle {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--re-text);
  margin-bottom: 16px;
  opacity: 0.9;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--re-text);
  opacity: 0.85;
  margin-bottom: 32px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-visual {
  flex: 0 0 auto;
  position: relative;
}

.hero-phone-mockup {
  position: relative;
  width: 300px;
}

.hero-phone-mockup::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  height: 100%;
  background: radial-gradient(circle, rgba(233, 83, 34, 0.1) 0%, transparent 70%);
  z-index: 0;
}

.hero-screenshot {
  width: 100%;
  border-radius: 20px;
  box-shadow: var(--re-shadow-hover);
  position: relative;
  z-index: 1;
}

.scroll-down {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--re-primary);
  animation: bounce 2s infinite;
}

.scroll-arrow {
  width: 24px;
  height: 24px;
  border-right: 3px solid var(--re-primary);
  border-bottom: 3px solid var(--re-primary);
  transform: rotate(45deg);
}

/* ========================================
   Section Common
   ======================================== */
section {
  padding: 100px 0;
}

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

.section-title {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--re-text);
}

.section-title.light {
  color: var(--re-white);
}

.section-desc {
  font-size: 1.1rem;
  color: var(--re-text);
  opacity: 0.7;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

.section-desc.light {
  color: var(--re-tertiary);
  opacity: 0.9;
}

/* ========================================
   Features Section
   ======================================== */
.features-section {
  background-color: var(--re-bg);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-card {
  background-color: var(--re-white);
  border-radius: var(--re-radius);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--re-shadow);
  transition: var(--re-transition);
  border: 2px solid transparent;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--re-shadow-hover);
  border-color: var(--re-primary);
}

.feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--re-tertiary) 0%, var(--re-secondary) 100%);
  color: var(--re-primary);
}

.feature-icon svg {
  width: 32px;
  height: 32px;
}

.feature-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--re-text);
}

.feature-desc {
  font-size: 0.9rem;
  color: var(--re-text);
  opacity: 0.75;
  line-height: 1.6;
}

/* ========================================
   Showcase Section
   ======================================== */
.showcase-section {
  background-color: var(--re-white);
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.showcase-item {
  background-color: var(--re-bg);
  border-radius: var(--re-radius-lg);
  overflow: hidden;
  box-shadow: var(--re-shadow);
  transition: var(--re-transition);
}

.showcase-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--re-shadow-hover);
}

.showcase-item img {
  width: 100%;
  height: auto;
  display: block;
}

.showcase-item figcaption {
  padding: 14px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--re-text);
  text-align: center;
  background-color: var(--re-white);
}

.showcase-item.wide {
  grid-column: span 2;
}

/* ========================================
   AI Section
   ======================================== */
.ai-section {
  background-color: var(--re-text);
  padding: 100px 0;
  overflow: hidden;
}

.ai-inner {
  display: flex;
  align-items: center;
  gap: 60px;
}

.ai-content {
  flex: 1;
}

.ai-content .section-title {
  margin-bottom: 16px;
}

.ai-content .section-desc {
  margin-bottom: 32px;
  margin-left: 0;
}

.ai-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ai-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--re-white);
  font-size: 1.05rem;
}

.ai-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--re-secondary);
  flex-shrink: 0;
}

.ai-visual {
  flex: 0 0 300px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(245, 203, 88, 0.15) 0%, transparent 60%);
}

.ai-icon svg {
  width: 200px;
  height: 200px;
  position: relative;
  z-index: 2;
}

/* ========================================
   Cost Section
   ======================================== */
.cost-section {
  background-color: var(--re-secondary);
}

.cost-stats {
  display: flex;
  justify-content: center;
  gap: 80px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--re-text);
  line-height: 1;
  margin-bottom: 12px;
}

.stat-number span {
  font-size: 0.5em;
  font-weight: 600;
}

.stat-label {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--re-text);
  opacity: 0.85;
}

/* ========================================
   Platform Section
   ======================================== */
.platform-section {
  background-color: var(--re-bg);
}

.platform-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 520px;
  flex: 1;
}

.platform-item {
  background-color: var(--re-white);
  border-radius: var(--re-radius);
  padding: 36px 24px;
  text-align: center;
  box-shadow: var(--re-shadow);
  transition: var(--re-transition);
}

.platform-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--re-shadow-hover);
}

.platform-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--re-primary);
}

.platform-icon svg {
  width: 100%;
  height: 100%;
}

.platform-item h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--re-text);
}

.platform-item p {
  font-size: 0.9rem;
  color: var(--re-grey);
  margin-bottom: 12px;
}

.platform-link {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--re-primary);
  padding: 6px 18px;
  border: 2px solid var(--re-primary);
  border-radius: 50px;
  transition: var(--re-transition);
}

.platform-link:hover {
  background-color: var(--re-primary);
  color: var(--re-white);
}

.platform-hint {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--re-primary);
  background-color: var(--re-tertiary);
  padding: 6px 14px;
  border-radius: 50px;
  font-weight: 500;
}

.platform-qr {
  flex: 0 0 280px;
  text-align: center;
}

.platform-qr img {
  width: 100%;
  max-width: 260px;
  border-radius: var(--re-radius);
  box-shadow: var(--re-shadow);
  margin: 0 auto 12px;
}

.platform-qr p {
  font-size: 0.95rem;
  color: var(--re-text);
  opacity: 0.85;
}

/* ========================================
   CTA Section
   ======================================== */
.cta-section {
  background: linear-gradient(135deg, var(--re-primary) 0%, #f08a35 100%);
  padding: 100px 0;
  text-align: center;
}

.cta-inner {
  max-width: 700px;
  margin: 0 auto;
}

.cta-title {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--re-white);
  margin-bottom: 12px;
}

.cta-desc {
  font-size: 1.1rem;
  color: var(--re-tertiary);
  margin-bottom: 32px;
}

.cta-actions {
  margin-bottom: 40px;
}

.cta-wechat {
  background-color: var(--re-white);
  border-radius: var(--re-radius-lg);
  padding: 24px;
  max-width: 320px;
  margin: 0 auto;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.cta-wechat img {
  width: 100%;
  border-radius: var(--re-radius);
  margin-bottom: 12px;
}

.cta-wechat p {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--re-text);
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
  background-color: var(--re-text);
  color: var(--re-white);
  padding: 48px 0 24px;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
}

.footer-brand strong {
  display: block;
  font-size: 1.1rem;
}

.footer-brand span {
  display: block;
  font-size: 0.85rem;
  opacity: 0.6;
}

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

.footer-nav a {
  font-size: 0.9rem;
  opacity: 0.7;
  transition: var(--re-transition);
}

.footer-nav a:hover {
  opacity: 1;
  color: var(--re-secondary);
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  font-size: 0.85rem;
  opacity: 0.5;
  margin-bottom: 4px;
}

/* ========================================
   Animations
   ======================================== */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* Scroll animation base state */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays for children */
.features-grid .feature-card:nth-child(1) { transition-delay: 0s; }
.features-grid .feature-card:nth-child(2) { transition-delay: 0.08s; }
.features-grid .feature-card:nth-child(3) { transition-delay: 0.16s; }
.features-grid .feature-card:nth-child(4) { transition-delay: 0.24s; }
.features-grid .feature-card:nth-child(5) { transition-delay: 0.32s; }
.features-grid .feature-card:nth-child(6) { transition-delay: 0.40s; }
.features-grid .feature-card:nth-child(7) { transition-delay: 0.48s; }
.features-grid .feature-card:nth-child(8) { transition-delay: 0.56s; }

.platform-grid .platform-item:nth-child(1) { transition-delay: 0s; }
.platform-grid .platform-item:nth-child(2) { transition-delay: 0.1s; }

.showcase-grid .showcase-item:nth-child(1) { transition-delay: 0s; }
.showcase-grid .showcase-item:nth-child(2) { transition-delay: 0.08s; }
.showcase-grid .showcase-item:nth-child(3) { transition-delay: 0.16s; }
.showcase-grid .showcase-item:nth-child(4) { transition-delay: 0.24s; }
.showcase-grid .showcase-item:nth-child(5) { transition-delay: 0.32s; }
.showcase-grid .showcase-item:nth-child(6) { transition-delay: 0.40s; }

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-title {
    font-size: 2.6rem;
  }

  .hero-phone-mockup {
    width: 260px;
  }

  .section-title {
    font-size: 2rem;
  }

  .showcase-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .showcase-item.wide {
    grid-column: span 2;
  }

  .platform-content {
    flex-direction: column;
  }

  .platform-grid {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 56px;
  }

  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: var(--re-secondary);
    padding: 16px 24px;
    box-shadow: 0 4px 16px rgba(57, 23, 19, 0.1);
    transform: translateY(-150%);
    transition: transform 0.3s ease;
    z-index: 999;
  }

  .main-nav.active {
    transform: translateY(0);
  }

  .nav-links {
    flex-direction: column;
    gap: 16px !important;
  }

  .hero-inner {
    flex-direction: column-reverse;
    text-align: center;
    gap: 40px;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.2rem;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-phone-mockup {
    width: 220px;
  }

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

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

  .showcase-item.wide {
    grid-column: span 1;
  }

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

  .ai-features li {
    justify-content: center;
  }

  .ai-visual {
    flex: none;
  }

  .ai-icon svg {
    width: 140px;
    height: 140px;
  }

  .cost-stats {
    gap: 40px;
  }

  .stat-number {
    font-size: 2.5rem;
  }

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

  .platform-qr {
    flex: none;
    width: 100%;
    max-width: 280px;
  }

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

  .section-title {
    font-size: 1.7rem;
  }

  section {
    padding: 60px 0;
  }

  .cta-title {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.7rem;
  }

  .hero-phone-mockup {
    width: 180px;
  }

  .btn {
    padding: 10px 24px;
    font-size: 0.9rem;
  }

  .stat-number {
    font-size: 2rem;
  }
}

/* Reduced motion */
@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;
  }

  .animate-on-scroll {
    opacity: 1;
    transform: none;
  }
}
