/* =============================================
   Homepage Styles — 优品农源
   ============================================= */

/* ── Hero ── */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding-block-start: var(--nav-height);
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 30% 50%, oklch(90% 0.04 120 / 0.3), transparent),
    radial-gradient(ellipse 60% 80% at 80% 30%, oklch(92% 0.06 75 / 0.2), transparent),
    var(--color-warm-bg);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 80%, oklch(85% 0.06 148 / 0.15) 0%, transparent 50%),
    radial-gradient(circle at 75% 20%, oklch(88% 0.08 72 / 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4xl);
  align-items: center;
  width: 100%;
}

.hero__content {
  animation: fadeUp 0.8s var(--ease-out-expo) both;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: oklch(100% 0 0 / 0.9);
  border: 1px solid var(--color-border);
  padding: var(--space-2xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
  color: var(--color-text-secondary);
  margin-block-end: var(--space-xl);
}

.hero__badge-dot {
  width: 8px;
  height: 8px;
  background: var(--color-success);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: var(--fw-black);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--color-text);
  margin-block-end: var(--space-lg);
}

.hero__title em {
  font-style: normal;
  color: var(--color-primary);
  position: relative;
}

.hero__title em::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: -2px;
  right: -2px;
  height: 0.3em;
  background: var(--color-accent-light);
  opacity: 0.4;
  z-index: -1;
  border-radius: 2px;
}

.hero__desc {
  font-size: var(--text-md);
  line-height: var(--lh-relaxed);
  color: var(--color-text-secondary);
  max-width: 460px;
  margin-block-end: var(--space-2xl);
}

.hero__actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.hero__visual {
  position: relative;
  animation: fadeUp 0.8s var(--ease-out-expo) 0.2s both;
}

.hero__image-frame {
  position: relative;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-lg);
}

.hero__image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, oklch(75% 0.08 140), oklch(70% 0.06 85));
  color: #fff;
  font-family: var(--font-display);
  position: relative;
  overflow: hidden;
}

.hero__image-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 30% 60%, oklch(100% 0 0 / 0.15) 0%, transparent 50%),
    radial-gradient(circle at 70% 30%, oklch(100% 0 0 / 0.1) 0%, transparent 50%);
}

.hero__image-text {
  font-size: var(--text-2xl);
  font-weight: var(--fw-bold);
  position: relative;
  z-index: 1;
}

.hero__image-sub {
  font-size: var(--text-sm);
  opacity: 0.85;
  margin-block-start: var(--space-sm);
  font-family: var(--font-body);
  position: relative;
  z-index: 1;
}

/* Hero floating cards */
.hero__floating--qc {
  bottom: -20px;
  left: -24px;
}

.hero__floating--trace {
  top: 24px;
  right: -24px;
}

/* ── Stats Strip ── */
.stats-strip {
  padding-block: var(--space-3xl);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

.stats-strip__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
  text-align: center;
}

/* ── Quality Section ── */
.quality-section {
  background: var(--color-surface);
}

/* ── Trace Section ── */
.trace-section {
  background: var(--color-primary-darker);
  color: var(--color-text-inverse);
  overflow: hidden;
  position: relative;
}

.trace-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 10% 50%, oklch(45% 0.08 150 / 0.3) 0%, transparent 50%),
    radial-gradient(circle at 90% 80%, oklch(40% 0.06 140 / 0.2) 0%, transparent 50%);
  pointer-events: none;
}

.trace-section .section-tag {
  color: var(--color-accent-light);
}

.trace-section .section-title,
.trace-section .section-desc {
  color: oklch(92% 0.02 95);
}

.trace-flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-md);
  margin-block-start: var(--space-4xl);
  position: relative;
  z-index: 1;
}

.trace-section .trace-node__title {
  color: var(--color-text-inverse);
}

.trace-section .trace-node__desc {
  color: oklch(80% 0.02 95);
}

/* ── Products Section ── */
.products-section {
  background: var(--color-warm-bg);
}

/* ── Recommender Section ── */
.recommender-section {
  background: var(--color-surface);
}

.recommender__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4xl);
  align-items: center;
}

.recommender__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  margin-block-end: var(--space-md);
}

.recommender__desc {
  color: var(--color-text-secondary);
  line-height: var(--lh-relaxed);
  margin-block-end: var(--space-xl);
}

.recommender__benefits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-block-end: var(--space-xl);
}

/* Recommender visual card stack */
.recommender__visual {
  position: relative;
}

.recommender__stack {
  position: relative;
  height: 400px;
}

.rec-card {
  position: absolute;
  background: #fff;
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  width: 280px;
  transition: transform 0.3s var(--ease-out-quart);
}

.rec-card:nth-child(1) {
  top: 0;
  left: 0;
  z-index: 3;
}

.rec-card:nth-child(2) {
  top: 60px;
  left: 60px;
  z-index: 2;
  opacity: 0.85;
}

.rec-card:nth-child(3) {
  top: 120px;
  left: 120px;
  z-index: 1;
  opacity: 0.55;
}

.rec-card__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: oklch(80% 0.06 150);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-block-end: var(--space-md);
}

.rec-card__name {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  margin-block-end: var(--space-2xs);
}

.rec-card__role {
  font-size: var(--text-xs);
  color: var(--color-primary);
  font-weight: var(--fw-semibold);
  margin-block-end: var(--space-sm);
}

.rec-card__desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: var(--lh-relaxed);
}

.rec-card__earnings {
  margin-block-start: var(--space-md);
  padding-block-start: var(--space-md);
  border-top: 1px solid var(--color-border-light);
  display: flex;
  justify-content: space-between;
}

.rec-card__earnings-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.rec-card__earnings-value {
  font-size: var(--text-md);
  font-weight: var(--fw-bold);
  color: var(--color-accent);
}

/* ── CTA Section ── */
.cta-section {
  background:
    radial-gradient(ellipse 60% 80% at 50% 50%, oklch(65% 0.12 148 / 0.15), transparent),
    var(--color-primary-dark);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section .section-title {
  color: #fff;
}

.cta-section .section-desc {
  color: oklch(88% 0.02 95);
}

.cta-section .section-header {
  position: relative;
  z-index: 1;
}

.cta__actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  margin-block-start: var(--space-2xl);
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

/* ── Responsive ── */
@media (max-width: 968px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: var(--space-3xl);
  }

  .hero__visual {
    order: -1;
    max-width: 480px;
    margin-inline: auto;
  }

  .hero__content {
    text-align: center;
  }

  .hero__desc {
    margin-inline: auto;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__floating--qc { left: 0; }
  .hero__floating--trace { right: 0; }

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

  .trace-flow {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .trace-node:not(:last-child)::after {
    content: '↓';
    right: 50%;
    transform: translateX(50%);
    top: auto;
    bottom: -22px;
  }

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

  .recommender__visual {
    display: none;
  }
}

@media (max-width: 640px) {
  .stats-strip__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }

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