/* ═══════════════════════════════════════════════════
   ASG Pay Ecosystem — Page-Specific Overrides
   Extends shared.css
   ═══════════════════════════════════════════════════ */

/* ─── Hero ─── */
.eco-hero {
  position: relative;
  text-align: center;
  padding: 120px 24px 60px;
  overflow: hidden;
}

.eco-hero-glow {
  position: absolute;
  top: -300px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 900px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.eco-hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}

.eco-hero-content .badge {
  margin-bottom: 28px;
  animation: fadeInUp 0.5s var(--ease);
}

.eco-hero-content h1 {
  margin-bottom: 20px;
  animation: fadeInUp 0.5s var(--ease) 0.1s both;
}

.eco-hero .hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
  animation: fadeInUp 0.5s var(--ease) 0.2s both;
}

/* ─── Lifecycle Flow ─── */
.lifecycle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  max-width: 800px;
  margin: 0 auto;
  animation: fadeInUp 0.5s var(--ease) 0.3s both;
}

.lifecycle-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-sans);
  color: var(--text-primary);
}

.lifecycle-step:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.lifecycle-step svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.lifecycle-step .lbl {
  font-size: 14px;
  font-weight: 700;
}

.lifecycle-step .sub {
  font-size: 11px;
  color: var(--text-muted);
}

.lifecycle-step.settled {
  pointer-events: none;
}

.lifecycle-connector {
  width: 32px;
  height: 1px;
  background: var(--border);
  flex-shrink: 0;
}

.lifecycle-step.active {
  border-color: var(--accent-purple);
  box-shadow: 0 0 24px rgba(168, 85, 247, 0.12);
}

.lifecycle-step.active svg {
  color: var(--accent-purple);
}

/* ─── Tabs ─── */
.eco-tabs {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 40px;
}

.tab-nav {
  display: flex;
  gap: 4px;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 28px;
  border: 1px solid var(--border);
}

.tab-btn {
  flex: 1;
  padding: 12px 18px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
  color: white;
  background: var(--accent-purple);
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.2);
}

.tab-btn svg {
  flex-shrink: 0;
}

/* Tab Panels — cross-fade transition */
.tab-panel {
  display: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.tab-panel.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
  animation: tabFadeIn 0.4s var(--ease);
}

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* ─── Fund Tab ─── */
.fund-checkout {
  background: var(--bg-base);
  border-radius: var(--radius-sm);
  padding: 24px;
  border: 1px solid var(--border);
}

.agent-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.agent-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.agent-avatar svg {
  color: var(--accent-purple);
}

.agent-info h4 {
  font-size: 15px;
  font-weight: 700;
}

.agent-info p {
  font-size: 12px;
  color: var(--text-muted);
}

.fund-amount-display {
  text-align: center;
  padding: 20px;
  margin-bottom: 16px;
}

.fund-amount-display .amount {
  font-size: 44px;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: var(--gradient-fund);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.fund-amount-display .token {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.payment-methods {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.payment-method {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-size: 13px;
}

.payment-method:hover {
  border-color: var(--border-hover);
}

.payment-method.selected {
  border-color: var(--accent-purple);
  background: rgba(168, 85, 247, 0.04);
}

.payment-method svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.payment-method .name {
  font-weight: 600;
  flex: 1;
  color: var(--text-primary);
}

.payment-method .status {
  font-size: 11px;
  color: var(--accent-green);
}

/* ─── Virtual Card ─── */
.virtual-card {
  width: 100%;
  aspect-ratio: 1.586;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #0a0a0a 0%, #111111 40%, #0a0a0a 100%);
  border: 1px solid var(--border);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  transition: transform 0.4s var(--ease);
  animation: cardEntrance 0.8s var(--ease) 0.2s both;
}

.virtual-card:hover {
  transform: perspective(600px) rotateY(-4deg) rotateX(2deg);
}

/* Holographic shine */
.vc-shine {
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(168, 85, 247, 0.04) 38%,
    rgba(6, 182, 212, 0.06) 42%,
    rgba(168, 85, 247, 0.04) 46%,
    transparent 54%
  );
  pointer-events: none;
  transition: transform 0.6s var(--ease);
}

.virtual-card:hover .vc-shine {
  transform: translateX(40%) translateY(20%);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}

.card-brand {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 1px;
  background: var(--gradient-card);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card-type {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
  letter-spacing: 0.5px;
}

.card-chip {
  width: 36px;
  height: 26px;
  background: linear-gradient(135deg, #c9a94e 0%, #dbb85d 50%, #b8962f 100%);
  border-radius: 4px;
  position: relative;
  z-index: 1;
}

.card-number {
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: 3px;
  color: var(--text-primary);
  opacity: 0.85;
  position: relative;
  z-index: 1;
}

.card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  position: relative;
  z-index: 1;
}

.card-holder-label {
  font-size: 8px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.card-holder-name {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
}

.card-expiry { text-align: right; }

.card-mc-logo {
  display: flex;
}

.card-mc-logo .circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
}

.card-mc-logo .circle:first-child { background: #EB001B; }
.card-mc-logo .circle:last-child { background: #F79E1B; margin-left: -8px; opacity: 0.85; }

.card-limits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
}

.limit-item {
  padding: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
}

.limit-item .value {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-cyan);
  letter-spacing: -0.02em;
}

.limit-item .label {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ─── Products Grid ─── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
}

.product-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: var(--transition);
  color: var(--text-primary);
}

.product-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-elevated);
  transform: translateY(-2px);
  opacity: 1;
}

.product-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-base);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.product-icon svg {
  color: var(--text-muted);
}

.product-info {
  flex: 1;
}

.product-info h4 {
  font-size: 14px;
  font-weight: 700;
}

.product-info p {
  font-size: 11px;
  color: var(--text-muted);
}

.product-card .arrow {
  color: var(--text-muted);
  flex-shrink: 0;
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: var(--transition);
}

.product-card:hover .arrow {
  opacity: 1;
  transform: translate(0, 0);
}

/* Product staggered entrance */
.products-grid .product-card:nth-child(1) { animation-delay: 0s; }
.products-grid .product-card:nth-child(2) { animation-delay: 0.06s; }
.products-grid .product-card:nth-child(3) { animation-delay: 0.12s; }
.products-grid .product-card:nth-child(4) { animation-delay: 0.18s; }
.products-grid .product-card:nth-child(5) { animation-delay: 0.24s; }
.products-grid .product-card:nth-child(6) { animation-delay: 0.30s; }

/* ─── Sponsors Section ─── */
.sponsors-section {
  padding-top: 0;
}

.sponsors-title {
  text-align: center;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ─── Header Link ─── */
.header-link {
  font-size: 12px;
  color: var(--accent-purple);
  font-weight: 500;
}

.header-link:hover {
  opacity: 0.8;
}

/* ─── Terminal Tags (for ecosystem.js) ─── */
.terminal-line .tag { font-weight: 600; }
.terminal-line .tag-ows { color: var(--accent-cyan); }
.terminal-line .tag-policy { color: var(--accent-gold); }
.terminal-line .tag-base { color: var(--accent-blue); }
.terminal-line .tag-api { color: var(--accent-green); }
.terminal-line .tag-agent { color: var(--accent-purple); }
.terminal-line .dim { color: var(--text-muted); }
.terminal-line .success { color: var(--accent-green); }
.terminal-line .warn { color: var(--accent-gold); }
.terminal-line .error { color: #ef4444; }
.terminal-line .highlight { color: var(--accent-cyan); }

/* Terminal line entrance animation */
.terminal-line {
  animation: termLineIn 0.15s var(--ease) both;
}

@keyframes termLineIn {
  from { opacity: 0; transform: translateX(-4px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Result card slide-in */
.result-card {
  animation: resultSlideIn 0.5s var(--ease-spring) both;
}

@keyframes resultSlideIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Virtual card entrance */
@keyframes cardEntrance {
  from {
    opacity: 0;
    transform: perspective(600px) rotateY(15deg) translateY(20px);
  }
  to {
    opacity: 1;
    transform: perspective(600px) rotateY(0) translateY(0);
  }
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .eco-hero {
    padding: 100px 16px 40px;
  }

  .lifecycle {
    flex-direction: column;
    gap: 0;
  }

  .lifecycle-connector {
    width: 1px;
    height: 20px;
  }

  .lifecycle-step {
    width: 100%;
    max-width: 280px;
  }

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

  .tab-btn {
    font-size: 12px;
    padding: 10px 12px;
    gap: 4px;
  }

  .tab-btn svg {
    display: none;
  }

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

  .virtual-card {
    padding: 20px;
  }

  .card-number {
    font-size: 14px;
    letter-spacing: 2px;
  }
}
