/* ========================================
   Koder Marketplace - Landing Page Styles
   ======================================== */

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

/* Light Theme (default) */
:root {
  --primary: #059669;
  --primary-light: #06d6a0;
  --primary-dark: #047857;
  --primary-bg: #ecfdf5;
  --secondary: #1E40AF;
  --bg: #ffffff;
  --bg-alt: #f8fafb;
  --bg-card: #ffffff;
  --bg-card-hover: #f0fdf4;
  --text: #1a1a2e;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.08), 0 6px 12px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 40px rgba(0,0,0,0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --nav-bg: rgba(255,255,255,0.85);
  --gradient-hero: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 50%, #a7f3d0 100%);
  --gradient-text: linear-gradient(135deg, #059669, #06d6a0);
  --table-stripe: #f8fafb;
  --check-color: #059669;
  --cross-color: #ef4444;
  color-scheme: light;
}

/* Dark Theme */
[data-theme="dark"] {
  --primary: #10b981;
  --primary-light: #34d399;
  --primary-dark: #059669;
  --primary-bg: #064e3b;
  --bg: #0f172a;
  --bg-alt: #1e293b;
  --bg-card: #1e293b;
  --bg-card-hover: #1a3a2a;
  --text: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: #334155;
  --border-light: #1e293b;
  --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.2);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.3), 0 6px 12px rgba(0,0,0,0.2);
  --shadow-xl: 0 20px 40px rgba(0,0,0,0.4);
  --nav-bg: rgba(15,23,42,0.9);
  --gradient-hero: linear-gradient(135deg, #0f172a 0%, #064e3b 50%, #1e293b 100%);
  --gradient-text: linear-gradient(135deg, #10b981, #34d399);
  --table-stripe: #1e293b;
  --check-color: #10b981;
  --cross-color: #f87171;
  color-scheme: dark;
}

/* Typography */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.3s ease, color 0.3s ease;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

/* ========================================
   Navbar
   ======================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s, border-color 0.3s;
}

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

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

.nav-logo-icon {
  flex-shrink: 0;
}

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

.nav-links a:not(.btn) {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.nav-links a:not(.btn):hover {
  color: var(--primary);
}

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

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--text-secondary);
  transition: border-color 0.2s, color 0.2s;
}

.theme-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.theme-icon {
  width: 18px;
  height: 18px;
  display: none;
}

.theme-icon.active {
  display: block;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  font-family: inherit;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  padding: 10px 20px;
  font-size: 0.9rem;
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 10px 20px;
  font-size: 0.9rem;
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

/* ========================================
   Hero
   ======================================== */
.hero {
  padding: 120px 0 80px;
  background: var(--gradient-hero);
  overflow: hidden;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-title {
  font-size: 3.5rem;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

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

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

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

.hero-illustration {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-graphic {
  position: relative;
  width: 360px;
  height: 360px;
}

.hero-bag {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.hero-svg {
  width: 200px;
  height: 200px;
  filter: drop-shadow(0 20px 40px rgba(5, 150, 105, 0.2));
}

.hero-float {
  position: absolute;
  animation: float 6s ease-in-out infinite;
}

.hero-float-1 {
  top: 20px;
  right: 40px;
  animation-delay: 0s;
}

.hero-float-2 {
  bottom: 40px;
  left: 20px;
  animation-delay: 2s;
}

.hero-float-3 {
  bottom: 60px;
  right: 20px;
  animation-delay: 4s;
}

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

/* ========================================
   Stats Bar
   ======================================== */
.stats {
  padding: 48px 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.stat-label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ========================================
   Section Header
   ======================================== */
.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.section-header h2 {
  font-size: 2.2rem;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.6;
}

/* ========================================
   Features
   ======================================== */
.features {
  padding: 96px 0;
}

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

.feature-card {
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: all 0.3s ease;
}

.feature-card:hover {
  border-color: var(--primary);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--primary);
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.feature-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

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

/* ========================================
   How It Works
   ======================================== */
.how-it-works {
  padding: 96px 0;
  background: var(--bg-alt);
}

.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
}

.step {
  flex: 1;
  max-width: 300px;
  text-align: center;
  padding: 24px;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.step-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  background: var(--primary-bg);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.step-icon svg {
  width: 28px;
  height: 28px;
}

.step h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

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

.step-connector {
  width: 80px;
  flex-shrink: 0;
  padding-top: 90px;
}

.step-connector svg {
  width: 100%;
  height: 20px;
}

/* ========================================
   Comparison Table
   ======================================== */
.comparison {
  padding: 96px 0;
}

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.comparison-table th,
.comparison-table td {
  padding: 14px 20px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.comparison-table th {
  background: var(--bg-alt);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.comparison-table th.highlight {
  color: var(--primary);
  background: var(--primary-bg);
}

.comparison-table td:first-child {
  text-align: left;
  font-weight: 500;
}

.comparison-table td.highlight {
  background: rgba(5, 150, 105, 0.04);
}

[data-theme="dark"] .comparison-table td.highlight {
  background: rgba(16, 185, 129, 0.08);
}

.comparison-table tr:nth-child(even) td:not(.highlight) {
  background: var(--table-stripe);
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.check {
  color: var(--check-color);
  font-weight: 700;
  font-size: 1.1rem;
}

.cross {
  color: var(--cross-color);
  font-weight: 700;
  font-size: 1.1rem;
}

/* ========================================
   For Sellers
   ======================================== */
.for-sellers {
  padding: 96px 0;
  background: var(--bg-alt);
}

.seller-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.seller-card {
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: all 0.3s ease;
}

.seller-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.seller-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--primary);
}

.seller-card-icon svg {
  width: 24px;
  height: 24px;
}

.seller-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

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

/* ========================================
   Pricing
   ======================================== */
.pricing {
  padding: 96px 0;
}

.pricing-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.pricing-card {
  padding: 36px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  position: relative;
  transition: box-shadow 0.3s, transform 0.3s;
}

.pricing-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.pricing-card-popular {
  border-color: var(--primary);
  border-width: 2px;
  box-shadow: var(--shadow-lg);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pricing-tier {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.pricing-price {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.pricing-price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.pricing-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.5;
}

.pricing-features {
  list-style: none;
  margin-bottom: 28px;
}

.pricing-features li {
  padding: 8px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
  position: relative;
  padding-left: 24px;
}

.pricing-features li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

.pricing-features li:last-child {
  border-bottom: none;
}

/* ========================================
   FAQ
   ======================================== */
.faq {
  padding: 96px 0;
  background: var(--bg-alt);
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

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

.faq-item:hover {
  border-color: var(--primary);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  gap: 16px;
}

.faq-chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
  color: var(--primary);
}

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

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

.faq-answer p {
  padding: 0 20px 18px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ========================================
   Footer
   ======================================== */
.footer {
  padding: 64px 0 32px;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand p {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 280px;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-social a:hover {
  color: var(--primary);
}

/* ========================================
   Animations
   ======================================== */
.anim-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.anim-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 2.8rem;
  }

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

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
  }

  .nav-links.active {
    display: flex;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .hero {
    padding: 100px 0 60px;
  }

  .hero-container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-subtitle {
    margin: 0 auto 28px;
  }

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

  .hero-illustration {
    display: none;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .stats-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .section-header h2 {
    font-size: 1.8rem;
  }

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

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

  .step-connector {
    transform: rotate(90deg);
    padding-top: 0;
    width: 60px;
    height: 30px;
  }

  .seller-cards {
    grid-template-columns: 1fr;
  }

  .pricing-cards {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero-title {
    font-size: 1.9rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .stat-number {
    font-size: 1.8rem;
  }
}
