/* ============================================================
   HOME PAGE STYLES
   ============================================================ */

/* ---- Hero ---- */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 4rem 0 2rem;
  animation: fadeInUp 0.7s ease-out;
}

.hero-section .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-badge {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.hero-stat-value {
  font-size: 1.8rem;
  font-weight: 900;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.hero-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.hero-stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border-color);
}

/* ---- Hero Visual / Barcode Card ---- */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.barcode-preview-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-card), 0 0 60px rgba(0,255,136,0.05);
  animation: glowPulse 4s ease-in-out infinite;
}

[data-theme="light"] .barcode-preview-card {
  box-shadow: var(--shadow-card), 0 0 60px rgba(0,85,204,0.05);
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.preview-dots {
  display: flex;
  gap: 5px;
}

.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}

.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }

.preview-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.preview-body {
  padding: 1.5rem;
  background: #fff;
  position: relative;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#heroBarcode {
  max-width: 100%;
  image-rendering: pixelated;
}

.preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

/* Floating state chips */
.floating-card {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: var(--shadow-card);
  animation: floatCard 3s ease-in-out infinite;
}

.fc-1 { top: -20px; right: -30px; animation-delay: 0s; }
.fc-2 { bottom: 20px; right: -40px; animation-delay: -1s; }
.fc-3 { bottom: -20px; left: -30px; animation-delay: -2s; }

.stagger-children > * {
  animation: fadeInUp 0.6s ease-out;
}

.stagger-children > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.5s; }

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

/* ---- States Ticker ---- */
.states-ticker-wrapper {
  overflow: hidden;
  position: relative;
  padding: 1rem 0;
}

.states-ticker-wrapper::before,
.states-ticker-wrapper::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}

.states-ticker-wrapper::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-primary), transparent);
}

.states-ticker-wrapper::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-primary), transparent);
}

.states-ticker {
  display: flex;
  gap: 0.75rem;
  animation: tickerScroll 40s linear infinite;
  width: max-content;
}

.states-ticker:hover { animation-play-state: paused; }

@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.state-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.875rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
  flex-shrink: 0;
}

.state-chip:hover {
  border-color: var(--accent-primary);
  color: var(--text-accent);
  background: rgba(0,255,136,0.05);
}

[data-theme="light"] .state-chip:hover {
  background: rgba(0,85,204,0.05);
}

/* ---- Features Grid ---- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  padding: 1.75rem;
}

.feature-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: rgba(0,255,136,0.1);
  border: 1px solid rgba(0,255,136,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--accent-primary);
  font-size: 1.3rem;
}

[data-theme="light"] .feature-icon {
  background: rgba(0,85,204,0.08);
  border-color: rgba(0,85,204,0.15);
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ---- How It Works ---- */
.how-section {
  background: var(--bg-secondary);
}

.steps-container {
  display: flex;
  align-items: flex-start;
  gap: 0;
  position: relative;
}

.step-item {
  flex: 1;
  padding: 2rem;
  text-align: center;
}

.step-number {
  font-size: 3rem;
  font-weight: 900;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.step-item h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.step-item p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.step-connector {
  width: 60px;
  height: 2px;
  background: var(--border-color);
  align-self: center;
  flex-shrink: 0;
  position: relative;
  top: -20px;
}

.step-connector::after {
  content: '→';
  position: absolute;
  right: -8px;
  top: -10px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---- FAQ ---- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-item.open {
  border-color: rgba(0,255,136,0.3);
}

[data-theme="light"] .faq-item.open {
  border-color: rgba(0,85,204,0.3);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s;
  gap: 1rem;
}

.faq-question:hover { color: var(--accent-primary); }

.faq-icon {
  font-size: 1.2rem;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.faq-item.open .faq-icon {
  color: var(--accent-primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.faq-item.open .faq-answer {
  max-height: 400px;
}

.faq-answer p {
  padding: 0 1.5rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---- CTA Section ---- */
.cta-section { padding: 4rem 0; }

.cta-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: calc(var(--radius) * 1.5);
  padding: 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-primary);
}

.cta-glow {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(0,255,136,0.04), transparent 70%);
  pointer-events: none;
}

[data-theme="light"] .cta-glow {
  background: radial-gradient(circle, rgba(0,85,204,0.04), transparent 70%);
}

.cta-card h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 900;
  margin-bottom: 1rem;
  position: relative;
}

.cta-card p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  position: relative;
}

.cta-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

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

@media (max-width: 768px) {
  .hero-section .container {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

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

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

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

  .hero-visual { display: none; }

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

  .steps-container {
    flex-direction: column;
    align-items: center;
  }

  .step-connector { display: none; }

  .cta-card { padding: 2rem; }
}
