/* =============================================
   FoliagePal Landing Page Styles
   ============================================= */

/* --- CSS Custom Properties --- */
:root {
  --bg-primary: #0a0f1e;
  --bg-secondary: #121a2f;
  --bg-card: rgba(18, 26, 47, 0.7);
  --bg-footer: #060a14;
  --accent-green: #4ade80;
  --accent-green-solid: #22c55e;
  --accent-blue: #60a5fa;
  --accent-amber: #fbbf24;
  --accent-purple: #a78bfa;
  --accent-orange: #fb923c;
  --accent-pink: #f472b6;
  --text-primary: #f1f5f9;
  --text-secondary: #b0bec5;
  --text-muted: #78909c;
  --text-dim: #546e7a;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(74, 222, 128, 0.15);
  --radius-card: 16px;
  --radius-button: 12px;
  --max-width: 1100px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 64px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

/* --- Utility --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

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

.section-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 12px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.7;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius-button);
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-green), var(--accent-green-solid));
  color: #0a0f1e;
  box-shadow: 0 4px 24px rgba(74, 222, 128, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 8px 32px rgba(74, 222, 128, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-outline {
  background: transparent;
  color: var(--accent-green);
  border: 2px solid rgba(74, 222, 128, 0.3);
  border-radius: var(--radius-button);
  padding: 12px 32px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}

.btn-outline:hover {
  transform: translateY(-2px);
  border-color: var(--accent-green);
  background: rgba(74, 222, 128, 0.05);
}

/* =============================================
   Navigation
   ============================================= */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 15, 30, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 17px;
  color: var(--text-primary);
}

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

.nav-logo-icon {
  font-size: 22px;
}

.nav-logo-sub {
  color: var(--text-dim);
  font-weight: 400;
  font-size: 13px;
  margin-left: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-green);
}

.nav-cta {
  padding: 8px 20px;
  background: linear-gradient(135deg, var(--accent-green), var(--accent-green-solid));
  color: #0a0f1e !important;
  border-radius: 8px;
  font-weight: 600;
}

.nav-cta:hover {
  box-shadow: 0 2px 16px rgba(74, 222, 128, 0.35);
}

.lang-switch {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  color: var(--text-secondary);
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.lang-switch:hover {
  color: var(--accent-green);
}

.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 1px;
  transition: 0.3s;
}

/* =============================================
   Hero Section
   ============================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(74, 222, 128, 0.08) 0%, transparent 70%),
    linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  text-align: center;
  overflow: hidden;
}

.hero-bg-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-deco {
  position: absolute;
  font-size: 40px;
  opacity: 0.04;
  animation: float 8s ease-in-out infinite;
}

.hero-deco:nth-child(2) { animation-delay: -2s; }
.hero-deco:nth-child(3) { animation-delay: -4s; }
.hero-deco:nth-child(4) { animation-delay: -6s; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(5deg); }
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  padding: 8px 20px;
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.2);
  border-radius: 24px;
  color: var(--accent-green);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 24px;
  letter-spacing: 0.5px;
}

.hero-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #f1f5f9 0%, #b0bec5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

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

/* =============================================
   Features Section
   ============================================= */
.features {
  background:
    radial-gradient(ellipse 50% 40% at 80% 50%, rgba(74, 222, 128, 0.03) 0%, transparent 70%),
    var(--bg-primary);
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 28px 24px;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: 0 8px 32px rgba(74, 222, 128, 0.06);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.feature-emoji {
  font-size: 26px;
}

.feature-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* =============================================
   Screenshots Section
   ============================================= */
.screenshots {
  background:
    radial-gradient(ellipse 50% 60% at 50% 50%, rgba(96, 165, 250, 0.04) 0%, transparent 70%),
    linear-gradient(180deg, var(--bg-primary), var(--bg-secondary), var(--bg-primary));
}

.screenshots-scroll {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: flex-end;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 20px 0;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.screenshots-scroll::-webkit-scrollbar {
  display: none;
}

.screenshot-item {
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.35s ease, opacity 0.35s ease;
  will-change: transform, opacity;
}

.screenshot-item:hover {
  transform: translateY(-8px);
}

.screenshot-item.screenshot-highlighted {
  transform: translateY(-8px);
}

.screenshot-phone {
  width: 130px;
  height: 236px;
  background: var(--bg-secondary);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  transition: border-color 0.3s, box-shadow 0.3s, width 0.3s ease, height 0.3s ease;
}

.screenshot-highlighted .screenshot-phone {
  width: 162px;
  height: 294px;
  border-color: rgba(74, 222, 128, 0.4);
  box-shadow: 0 12px 48px rgba(74, 222, 128, 0.15);
}

/* Dim non-highlighted screenshots */
.screenshots-scroll.has-highlighted .screenshot-item:not(.screenshot-highlighted) {
  opacity: 0.55;
  transform: scale(0.95);
}

.screenshot-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 10px;
}

.screenshot-placeholder span:first-child {
  font-size: 36px;
}

.screenshot-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.screenshot-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 20px;
}

.screenshot-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.2s;
}

.screenshot-dot.active {
  background: var(--accent-green);
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.4);
}

/* =============================================
   Plant Enthusiasts Section
   ============================================= */
.enthusiasts {
  background:
    radial-gradient(ellipse 50% 50% at 30% 40%, rgba(167, 139, 250, 0.05) 0%, transparent 70%),
    var(--bg-secondary);
}

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

.enthusiast-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 28px 24px;
  text-align: center;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.enthusiast-card:hover {
  transform: translateY(-4px);
  border-color: rgba(167, 139, 250, 0.25);
  box-shadow: 0 8px 32px rgba(167, 139, 250, 0.08);
}

.enthusiast-icon {
  font-size: 40px;
  margin-bottom: 14px;
}

.enthusiast-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.enthusiast-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* =============================================
   Family Section
   ============================================= */
.family {
  background: var(--bg-primary);
}

.family-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.family-step {
  text-align: center;
  flex: 1;
  max-width: 280px;
}

.family-step-icon {
  font-size: 52px;
  margin-bottom: 16px;
}

.family-step-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.family-step-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.family-step-divider {
  width: 1px;
  height: 80px;
  background: linear-gradient(180deg, transparent, var(--border-subtle), transparent);
  flex-shrink: 0;
}

/* =============================================
   Testimonials Section
   ============================================= */
.testimonials {
  background:
    radial-gradient(ellipse 40% 40% at 20% 50%, rgba(251, 191, 36, 0.03) 0%, transparent 70%),
    var(--bg-primary);
}

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

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 28px 24px;
  transition: border-color 0.25s;
}

.testimonial-card:hover {
  border-color: rgba(251, 191, 36, 0.2);
}

.testimonial-stars {
  color: var(--accent-amber);
  font-size: 16px;
  margin-bottom: 12px;
  letter-spacing: 3px;
}

.testimonial-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 14px;
  font-style: italic;
}

.testimonial-author {
  font-size: 13px;
  color: var(--text-muted);
  font-style: normal;
}

.author-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  font-style: normal;
  margin-right: 4px;
  vertical-align: middle;
}

.author-parent {
  background: rgba(251, 191, 36, 0.1);
  color: var(--accent-amber);
}

.author-enthusiast {
  background: rgba(167, 139, 250, 0.1);
  color: var(--accent-purple);
}

/* =============================================
   Download CTA
   ============================================= */
.download-cta {
  background:
    radial-gradient(ellipse 50% 50% at 50% 50%, rgba(74, 222, 128, 0.06) 0%, transparent 70%),
    var(--bg-secondary);
  text-align: center;
}

.download-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #f1f5f9, var(--accent-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.download-subtitle {
  color: var(--text-secondary);
  font-size: 17px;
  margin-bottom: 32px;
}

.download-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.download-note {
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 24px;
}

/* =============================================
   Footer
   ============================================= */
.footer {
  background: var(--bg-footer);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding: 32px 24px;
  text-align: center;
}

.footer-copy {
  color: var(--text-dim);
  font-size: 13px;
  margin-bottom: 12px;
}

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

.footer-links a {
  color: var(--text-muted);
  font-size: 12px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent-green);
}

/* =============================================
   Scroll Animations
   ============================================= */
.fade-in-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* =============================================
   Responsive: Tablet (481-767px)
   ============================================= */
@media (max-width: 767px) {
  .section { padding: 60px 0; }
  .section-title { font-size: 28px; }
  .section-subtitle { font-size: 15px; }

  .nav-mobile-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(10, 15, 30, 0.98);
    flex-direction: column;
    padding: 16px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border-subtle);
  }
  .nav-links.open { display: flex; }
  .nav-links.open .nav-link { padding: 12px 0; min-height: 44px; display: flex; align-items: center; }

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

  .screenshots-scroll { justify-content: flex-start; }

  .family-steps { flex-direction: column; gap: 16px; }
  .family-step-divider { width: 60px; height: 1px; }

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

  .hero-title { font-size: 30px; }
  .hero-subtitle { font-size: 15px; }
  .download-title { font-size: 28px; }
}

/* =============================================
   Responsive: Mobile (<=480px)
   ============================================= */
@media (max-width: 480px) {
  .section { padding: 48px 0; }
  .section-title { font-size: 24px; }
  .section-header { margin-bottom: 36px; }

  .container { padding: 0 16px; }

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

  .feature-card, .enthusiast-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px 14px;
    text-align: left;
    align-items: start;
  }
  .feature-icon, .enthusiast-icon {
    grid-row: 1 / 3;
    margin-bottom: 0;
  }
  .enthusiast-icon {
    font-size: 30px;
    line-height: 1;
  }
  .feature-title, .enthusiast-title {
    grid-column: 2;
    grid-row: 1;
    margin-bottom: 0;
  }
  .feature-desc, .enthusiast-desc {
    grid-column: 2;
    grid-row: 2;
  }

  .hero { min-height: auto; padding: 100px 16px 48px; }
  .hero-title { font-size: 26px; }
  .hero-subtitle { font-size: 14px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  .screenshot-phone { width: 100px; height: 180px; }
  .screenshot-highlighted .screenshot-phone { width: 128px; height: 230px; }

  .download-title { font-size: 24px; }
  .download-subtitle { font-size: 15px; }
  .download-actions { flex-direction: column; align-items: center; }
  .download-actions .btn,
  .download-actions .btn-outline { width: 100%; justify-content: center; }
}

/* Desktop enhancements */
@media (min-width: 768px) {
  .hero-title { font-size: 52px; }
  .hero-subtitle { font-size: 18px; }
  .section-title { font-size: 40px; }
  .download-title { font-size: 42px; }
  .download-subtitle { font-size: 18px; }
}
