/* ============================================================
   HOME PAGE — PREMIUM STYLES v2.0
   ============================================================ */

/* ---- Hero ---- */
.hero-section {
  min-height: 60vh;
  display: flex;
  align-items: center;
  padding: 1.5rem 0 1rem;
  position: relative;
  overflow: hidden;
}

/* Decorative hero glow orbs */
.hero-section::before {
  content: '';
  position: absolute;
  top: -10%;
  left: -5%;
  width: 55%;
  height: 80%;
  background: radial-gradient(ellipse, rgba(0, 229, 255, 0.07) 0%, transparent 65%);
  pointer-events: none;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: -5%;
  width: 45%;
  height: 60%;
  background: radial-gradient(ellipse, rgba(124, 58, 237, 0.08) 0%, transparent 65%);
  pointer-events: none;
}

.hero-section .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

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

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

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 24px rgba(0, 229, 255, 0.3));
}

/* Hero subtitle */
.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

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

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

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

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

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

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

/* ---- 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-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-card), 0 0 80px rgba(0, 229, 255, 0.08);
  animation: glowPulse 4s ease-in-out infinite;
  position: relative;
}

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

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

.preview-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
}

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

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

.dot-red    { background: #ff5f57; box-shadow: 0 0 6px rgba(255, 95, 87, 0.5); }
.dot-yellow { background: #febc2e; box-shadow: 0 0 6px rgba(254, 188, 46, 0.5); }
.dot-green  { background: #28c840; box-shadow: 0 0 6px rgba(40, 200, 64, 0.5); }

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

.preview-body {
  padding: 2rem 1.5rem;
  background: #fff;
  position: relative;
  min-height: 150px;
  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.875rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
}

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

.fc-1 { top: -24px; right: -36px; animation-delay: 0s; }
.fc-2 { bottom: 24px; right: -44px; animation-delay: -1.2s; }
.fc-3 { bottom: -24px; left: -36px; animation-delay: -2.4s; }

@keyframes floatCard {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}

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

.states-ticker-wrapper::before,
.states-ticker-wrapper::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 100px;
  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 45s 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.5rem;
  padding: 0.45rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  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(--border-glow);
  color: var(--accent-primary);
  background: rgba(0, 229, 255, 0.06);
  transform: translateY(-1px);
}

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

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

.feature-card {
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover {
  border-color: rgba(0, 229, 255, 0.22);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 229, 255, 0.06);
  transform: translateY(-4px);
}

.feature-card:hover::before {
  opacity: 1;
}

[data-theme="light"] .feature-card:hover {
  border-color: rgba(0, 102, 255, 0.18);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.06);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--accent-primary);
  transition: var(--transition);
}

.feature-card:hover .feature-icon {
  background: rgba(0, 229, 255, 0.14);
  border-color: rgba(0, 229, 255, 0.3);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.15);
}

[data-theme="light"] .feature-icon {
  background: rgba(0, 102, 255, 0.07);
  border-color: rgba(0, 102, 255, 0.14);
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}

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

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

.how-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(124, 58, 237, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

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

.step-item {
  flex: 1;
  padding: 1.5rem 1rem;
  text-align: center;
  position: relative;
}

.step-number {
  font-size: 3.5rem;
  font-weight: 900;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 1.25rem;
  opacity: 0.35;
  letter-spacing: -0.04em;
}

.step-item:hover .step-number {
  opacity: 0.7;
}

.step-item h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}

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

.step-connector {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, var(--border-color), transparent);
  align-self: center;
  flex-shrink: 0;
  position: relative;
  top: -30px;
}

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

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

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

.faq-item.open {
  border-color: rgba(0, 229, 255, 0.25);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .faq-item.open {
  border-color: rgba(0, 102, 255, 0.25);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.375rem 1.75rem;
  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;
  font-family: var(--font-main);
  letter-spacing: -0.01em;
}

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

.faq-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: var(--transition);
}

.faq-item.open .faq-icon {
  background: rgba(0, 229, 255, 0.1);
  border-color: rgba(0, 229, 255, 0.25);
  color: var(--accent-primary);
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.open .faq-answer {
  max-height: 500px;
  opacity: 1;
  transform: translateY(0);
}

.faq-answer p {
  padding: 0 1.75rem 1.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin: 0;
}

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

.cta-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 3.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

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

.cta-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: var(--gradient-primary);
  opacity: 0.3;
}

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

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

.cta-card h2 {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 900;
  margin-bottom: 1.25rem;
  position: relative;
  letter-spacing: -0.03em;
}

.cta-card p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  position: relative;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.75;
}

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

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

  .hero-badge { justify-content: center; }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-visual { display: none; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .features-grid { grid-template-columns: 1fr; }

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

  .step-connector {
    width: 2px;
    height: 40px;
    top: 0;
    background: linear-gradient(180deg, var(--border-color), transparent);
  }

  .step-connector::after {
    content: '↓';
    top: auto;
    bottom: -12px;
    right: -6px;
  }

  .cta-card { padding: 3rem 1.5rem; }
}

@media (max-width: 640px) {
  .hero-title { font-size: 2.4rem; }
  .hero-stats { gap: 1.5rem; }
  .hero-stat-value { font-size: 1.6rem; }
}
