/**
 * 皮皮虾首页样式
 * 复刻 Lovable 设计系统
 */

/* ============ CSS 变量 ============ */
:root {
  /* 颜色 */
  --primary: #FF6B35;
  --primary-foreground: #FFFFFF;
  --primary-rgb: 255, 107, 53;

  --background: #FFFFFF;
  --foreground: #1A1A1A;

  --secondary: #F5F5F7;
  --secondary-foreground: #1A1A1A;

  --muted: #F5F5F7;
  --muted-foreground: #6B7280;

  --border: #E5E7EB;
  --ring: #FF6B35;

  --radius: 1rem;

  /* 字体 */
  --font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* ============ 基础重置 ============ */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  margin: 0;
  padding: 0;
}

/* ============ 滚动动画 ============ */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.animate-scale {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-scale.animate-in {
  opacity: 1;
  transform: scale(1);
}

/* 交错延迟 */
[data-delay="1"] { transition-delay: 0.1s; }
[data-delay="2"] { transition-delay: 0.2s; }
[data-delay="3"] { transition-delay: 0.3s; }
[data-delay="4"] { transition-delay: 0.4s; }

/* ============ 容器 ============ */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============ 导航栏 ============ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid rgba(229, 231, 235, 0.5);
}

.nav-inner {
  display: flex;
  height: 56px;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--foreground);
}

.nav-logo {
  font-size: 28px;
}

.nav-name {
  font-size: 20px;
  font-weight: 700;
}

.nav-btn {
  padding: 8px 20px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

.nav-btn:hover {
  background: var(--secondary);
}

/* ============ Hero 区域 ============ */
.hero {
  padding-top: 128px;
  padding-bottom: 96px;
  background: var(--background);
  text-align: center;
}

.hero-lobster {
  margin-bottom: 32px;
}

.hero-lobster img {
  width: 224px;
  height: 224px;
  object-fit: contain;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* Hero 入场动画 */
.hero-lobster {
  animation: hero-scale 0.6s ease-out forwards;
}

.hero-title {
  animation: hero-up 0.6s ease-out 0.2s forwards;
  opacity: 0;
}

.hero-subtitle {
  animation: hero-up 0.6s ease-out 0.35s forwards;
  opacity: 0;
}

.hero-cta {
  animation: hero-up 0.6s ease-out 0.5s forwards;
  opacity: 0;
}

@keyframes hero-scale {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes hero-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-title {
  font-size: 72px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.highlight-text {
  color: var(--primary);
}

.hero-subtitle {
  font-size: 24px;
  line-height: 1.5;
  color: var(--muted-foreground);
  margin-bottom: 48px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  align-items: center;
}

.hero-input {
  height: 56px;
  width: 320px;
  padding: 0 32px;
  font-size: 18px;
  border: none;
  border-radius: 9999px;
  background: var(--secondary);
  color: var(--foreground);
  outline: none;
  transition: all 0.2s;
}

.hero-input:focus {
  background: var(--background);
  box-shadow: 0 0 0 2px var(--ring);
}

.hero-input::placeholder {
  color: var(--muted-foreground);
}

.hero-btn {
  height: 56px;
  padding: 0 48px;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-foreground);
  background: var(--primary);
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.3);
  transition: all 0.2s;
}

.hero-btn:hover {
  filter: brightness(1.1);
}

.hero-btn:active {
  transform: scale(0.95);
}

/* ============ 区块通用 ============ */
.section {
  padding: 96px 0;
}

.section-white {
  background: var(--background);
}

.section-gray {
  background: var(--secondary);
}

.section-label {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 9999px;
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 24px;
}

.section-title {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 64px;
  text-align: center;
}

.section-text {
  font-size: 20px;
  line-height: 1.6;
  color: var(--muted-foreground);
  margin-bottom: 16px;
  text-align: center;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.section-text.highlight {
  font-weight: 600;
  color: var(--foreground);
}

/* ============ 特性卡片 ============ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--background);
  border-radius: 1rem;
  padding: 40px;
  text-align: center;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.04),
    0 2px 4px rgba(0, 0, 0, 0.02),
    0 8px 16px -4px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s;
}

.feature-card:hover {
  transform: translateY(-8px);
}

.feature-icon {
  font-size: 40px;
  margin-bottom: 20px;
}

.feature-card h4 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--foreground);
}

.feature-card p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted-foreground);
}

/* ============ 使用场景卡片 ============ */
.usecases-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.usecase-card {
  background: var(--background);
  border-radius: 1rem;
  padding: 40px;
  text-align: center;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.04),
    0 2px 4px rgba(0, 0, 0, 0.02),
    0 8px 16px -4px rgba(0, 0, 0, 0.04);
}

.usecase-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.usecase-card h4 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--foreground);
}

.usecase-card p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted-foreground);
}

/* ============ 步骤引导 ============ */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}

/* 桌面端连接线 */
.steps-grid::before {
  content: '';
  position: absolute;
  top: 48px;
  left: 25%;
  right: 25%;
  height: 2px;
  border-top: 2px dashed rgba(var(--primary-rgb), 0.3);
  z-index: 0;
}

.step-card {
  text-align: center;
  position: relative;
  z-index: 1;
}

.step-number-wrap {
  width: 96px;
  height: 96px;
  margin: 0 auto 24px;
  background: rgba(var(--primary-rgb), 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-number {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary);
}

.step-content h4 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--foreground);
}

.step-content p {
  font-size: 16px;
  color: var(--muted-foreground);
}

/* ============ 焦虑区 ============ */
.trend-section {
  text-align: center;
}

.trend-icon {
  font-size: 80px;
  margin-bottom: 32px;
}

.trend-title {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
}

.trend-text {
  font-size: 20px;
  line-height: 1.6;
  color: var(--muted-foreground);
  max-width: 640px;
  margin: 0 auto;
}

/* ============ 底部 CTA ============ */
.section-dark {
  background: var(--foreground);
  text-align: center;
}

.cta-title {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--background);
  margin-bottom: 48px;
}

.cta-form {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  align-items: center;
}

.hero-input-dark {
  background: rgba(255, 255, 255, 0.1);
  color: var(--background);
}

.hero-input-dark::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.hero-input-dark:focus {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 2px var(--primary);
}

/* ============ Footer ============ */
.footer {
  border-top: 1px solid rgba(229, 231, 235, 0.5);
  background: var(--background);
  padding: 32px 0;
}

.footer-inner {
  text-align: center;
  font-size: 14px;
  color: var(--muted-foreground);
}

/* ============ 响应式：Tablet (768px - 1023px) ============ */
@media (max-width: 1023px) {
  .container {
    padding: 0 1.5rem;
  }

  /* Hero */
  .hero-title {
    font-size: 48px;
  }

  .hero-subtitle {
    font-size: 20px;
  }

  .hero-lobster img {
    width: 180px;
    height: 180px;
  }

  .hero-input {
    width: 280px;
    font-size: 16px;
  }

  .hero-btn {
    padding: 0 36px;
    font-size: 16px;
  }

  /* Section */
  .section-title {
    font-size: 36px;
    margin-bottom: 48px;
  }

  .section-text {
    font-size: 18px;
  }

  /* Cards */
  .features-grid,
  .usecases-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .feature-card,
  .usecase-card {
    padding: 28px;
  }

  /* Steps */
  .step-number-wrap {
    width: 80px;
    height: 80px;
  }

  .step-number {
    font-size: 32px;
  }

  .step-content h4 {
    font-size: 20px;
  }

  /* Trend */
  .trend-title {
    font-size: 36px;
  }

  .trend-text {
    font-size: 18px;
  }

  /* CTA */
  .cta-title {
    font-size: 36px;
  }
}

/* ============ 响应式：Phone (<768px) ============ */
@media (max-width: 767px) {
  /* Hero */
  .hero {
    padding-top: 96px;
    padding-bottom: 64px;
  }

  .hero-title {
    font-size: 36px;
  }

  .hero-subtitle {
    font-size: 18px;
    margin-bottom: 32px;
  }

  .hero-lobster img {
    width: 150px;
    height: 150px;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }

  .hero-input {
    width: 100%;
  }

  .hero-btn {
    width: 100%;
    justify-content: center;
  }

  /* Section */
  .section {
    padding: 64px 0;
  }

  .section-title {
    font-size: 28px;
    margin-bottom: 32px;
  }

  .section-text {
    font-size: 16px;
  }

  .section-label {
    font-size: 12px;
    padding: 4px 12px;
  }

  /* Cards */
  .features-grid,
  .usecases-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .feature-card,
  .usecase-card {
    padding: 24px;
  }

  .feature-icon,
  .usecase-icon {
    font-size: 32px;
    margin-bottom: 16px;
  }

  .feature-card h4,
  .usecase-card h4 {
    font-size: 18px;
    margin-bottom: 8px;
  }

  .feature-card p,
  .usecase-card p {
    font-size: 15px;
  }

  /* Steps */
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .steps-grid::before {
    display: none;
  }

  .step-number-wrap {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
  }

  .step-number {
    font-size: 28px;
  }

  .step-content h4 {
    font-size: 18px;
    margin-bottom: 8px;
  }

  .step-content p {
    font-size: 14px;
  }

  /* Trend */
  .trend-icon {
    font-size: 64px;
    margin-bottom: 24px;
  }

  .trend-title {
    font-size: 28px;
    margin-bottom: 24px;
  }

  .trend-text {
    font-size: 16px;
  }

  /* CTA */
  .cta-title {
    font-size: 28px;
    margin-bottom: 32px;
  }

  .cta-form {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }

  /* Nav */
  .nav-name {
    font-size: 18px;
  }

  /* Footer */
  .footer {
    padding: 24px 0;
  }
}
