/* ==========================================================================
   Trash2Cash Design System (Clean, Modern, Responsive & Production-Ready)
   ========================================================================== */

/* --- CSS Variables / Design System Tokens --- */
:root {
  --font-family: 'Prompt', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Palette: Professional Eco & FinTech */
  --primary: #059669;
  --primary-hover: #047857;
  --primary-light: #ecfdf5;
  --primary-border: #a7f3d0;

  --accent-gold: #d97706;
  --accent-gold-bg: #fffbeb;
  --accent-blue: #2563eb;
  
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-light: #f1f5f9;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #94a3b8;
  
  --border-color: #e2e8f0;
  --shadow-subtle: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
  --shadow-card: 0 10px 25px -5px rgba(15, 23, 42, 0.08);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}

.bg-light {
  background-color: var(--bg-light);
}

.text-center { text-align: center; }
.text-green { color: var(--primary) !important; font-weight: 600; }
.text-gold { color: var(--accent-gold) !important; font-weight: 600; }
.hidden { display: none !important; }

/* --- Typography Helpers --- */
.highlight-green { color: var(--primary); }
.highlight-cash { color: var(--accent-gold); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.98rem;
  transition: var(--transition);
  min-height: 44px;
}

.btn-lg {
  padding: 14px 30px;
  font-size: 1.05rem;
  min-height: 50px;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.25);
}

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

.btn-outline {
  background-color: #ffffff;
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: var(--primary-light);
}

.btn-block {
  width: 100%;
}

/* ==========================================================================
   Navigation & Mobile Drawer
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  height: 70px;
  display: flex;
  align-items: center;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: var(--primary);
  color: #ffffff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.brand-name .highlight {
  color: var(--accent-gold);
}

.brand-sub {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

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

.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: var(--transition);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wallet-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
}

.wallet-badge i { color: var(--accent-gold); }
.wallet-val { color: var(--primary); }

.mobile-menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  background: #ffffff;
}

/* Mobile Drawer Overlay */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  height: 100%;
  background: #ffffff;
  z-index: 1001;
  box-shadow: -5px 0 25px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  padding: 20px;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-drawer.open {
  right: 0;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.drawer-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  color: var(--text-muted);
}

.drawer-wallet {
  margin: 16px 0;
  padding: 12px 16px;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.d-wallet-title {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.d-wallet-amount {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.drawer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--text-main);
  transition: var(--transition);
}

.drawer-link:hover {
  background: var(--bg-light);
  color: var(--primary);
}

.drawer-cta-link {
  background: var(--primary);
  color: #ffffff !important;
  font-weight: 600;
  margin-bottom: 8px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding-top: 130px;
  padding-bottom: 70px;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-body) 100%);
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  gap: 20px;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 500;
}

.hero-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.25;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-muted);
  max-width: 680px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

.hero-metrics {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  width: 100%;
  justify-content: center;
}

.metric-item {
  display: flex;
  flex-direction: column;
}

.m-val {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
}

.m-lbl {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.metric-divider {
  width: 1px;
  height: 36px;
  background: var(--border-color);
}

/* ==========================================================================
   Section Header
   ========================================================================== */
.section-header {
  margin-bottom: 44px;
}

.section-tag {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
  display: block;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.2rem);
  font-weight: 700;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ==========================================================================
   Interactive AI Demo App
   ========================================================================== */
.demo-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

/* Toolbar Chips */
.demo-toolbar {
  padding: 16px 20px;
  background: var(--bg-light);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 16px;
}

.toolbar-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.sample-scroll-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.sample-scroll-wrapper::-webkit-scrollbar { display: none; }

.sample-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  transition: var(--transition);
}

.sample-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.sample-chip.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  font-weight: 600;
}

/* Demo Body Grid */
.demo-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 24px;
}

/* Camera Viewport */
.camera-screen {
  position: relative;
  width: 100%;
  height: 340px;
  background: #0f172a;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.target-box {
  position: absolute;
  top: 20%;
  left: 20%;
  width: 60%;
  height: 60%;
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.35);
  transition: var(--transition);
}

.target-badge {
  position: absolute;
  top: -14px;
  left: 10px;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.camera-bar {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-rescan {
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-status-text {
  font-size: 0.76rem;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.7);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Calculator Container */
.calculator-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.result-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.item-title-group h3 {
  font-size: 1.15rem;
  font-weight: 600;
}

.item-code {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.grade-badge {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: var(--bg-light);
  padding: 10px;
  border-radius: var(--radius-sm);
}

.spec-item {
  display: flex;
  flex-direction: column;
}

.spec-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.spec-val {
  font-size: 0.9rem;
  font-weight: 600;
}

/* Weight Box */
.weight-box {
  border: 1px solid var(--border-color);
  padding: 14px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.weight-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 500;
}

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

.weight-input {
  width: 100%;
  accent-color: var(--primary);
  height: 6px;
  cursor: pointer;
}

.quick-weights {
  display: flex;
  gap: 6px;
}

.qw-btn {
  font-size: 0.78rem;
  padding: 4px 10px;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-muted);
}

.qw-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Payout Summary */
.payout-summary {
  background: #0f172a;
  color: #ffffff;
  padding: 16px;
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
}

.payout-col {
  display: flex;
  flex-direction: column;
}

.payout-right {
  text-align: right;
}

.payout-lbl {
  font-size: 0.78rem;
  color: #94a3b8;
}

.payout-amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: #34d399;
}

.payout-points {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.action-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Toast */
.toast-card {
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  color: var(--primary);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Demo Footer Wallet History */
.demo-footer-wallet {
  padding: 16px 24px;
  background: var(--bg-light);
  border-top: 1px solid var(--border-color);
}

.df-wallet-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.df-wallet-bal { color: var(--primary); }

.df-wallet-logs {
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.log-entry {
  display: flex;
  justify-content: space-between;
  background: #ffffff;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.empty-history {
  color: var(--text-light);
}

/* ==========================================================================
   Grids & Content Cards
   ========================================================================== */
.cards-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.cards-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 28px 20px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.icon-emerald { background: var(--primary); }
.icon-amber { background: var(--accent-gold); }
.icon-blue { background: var(--accent-blue); }

.info-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
}

.info-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.check-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  margin-top: auto;
}

.check-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-main);
}

.check-list i {
  color: var(--primary);
  width: 14px;
  height: 14px;
}

/* Logistics Boxes */
.logistics-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 28px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.border-highlight {
  border-color: var(--primary-border);
  background: linear-gradient(180deg, #ffffff 0%, var(--primary-light) 100%);
}

.l-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.l-icon {
  width: 44px;
  height: 44px;
  background: var(--bg-light);
  color: var(--text-main);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.l-badge {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  background: var(--bg-light);
  border-radius: var(--radius-full);
}

.badge-green {
  background: var(--primary-light);
  color: var(--primary);
}

.l-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.l-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.l-item i { color: var(--primary); }

/* Steps Grid */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.step-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 24px 16px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  position: relative;
}

.active-step {
  border-color: var(--primary);
  background: var(--primary-light);
}

.step-num {
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--bg-light);
  color: var(--primary);
  padding: 2px 10px;
  border-radius: var(--radius-full);
}

.step-icon {
  width: 44px;
  height: 44px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-item h4 {
  font-size: 0.98rem;
  font-weight: 600;
}

.step-item p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* BCG & EEC */
.bcg-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 24px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bcg-badge {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
}

.badge-c { color: var(--accent-gold); }
.badge-g { color: var(--accent-blue); }

.eec-banner {
  margin-top: 32px;
  background: #0f172a;
  color: #ffffff;
  padding: 28px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.eec-icon {
  width: 50px;
  height: 50px;
  background: rgba(255,255,255,0.1);
  color: #34d399;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.eec-text h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.eec-text p {
  font-size: 0.9rem;
  color: #94a3b8;
}

/* Footer */
.footer {
  background: #090d16;
  color: #94a3b8;
  padding: 48px 0 24px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand .brand-name { color: #ffffff; }

.footer-links {
  display: flex;
  gap: 20px;
  font-size: 0.9rem;
  flex-wrap: wrap;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 20px;
  font-size: 0.82rem;
}

/* ==========================================================================
   Responsive Breakpoints (Mobile & Tablet)
   ========================================================================== */

@media (max-width: 900px) {
  .desktop-nav { display: none; }
  .mobile-menu-btn { display: flex; }
  
  .demo-body {
    grid-template-columns: 1fr;
  }

  .camera-screen {
    height: 280px;
  }

  .cards-grid-3, .cards-grid-2, .steps-grid {
    grid-template-columns: 1fr;
  }

  .eec-banner {
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .hero-section {
    padding-top: 110px;
    padding-bottom: 44px;
  }

  .hero-metrics {
    flex-direction: column;
    gap: 16px;
  }

  .metric-divider {
    width: 60px;
    height: 1px;
  }

  .demo-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
  }

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