/* ============================================
   CarbonCredit.xyz — Main Stylesheet
   ============================================ */

:root {
  --carbon-50: #f0fdf4;
  --carbon-100: #dcfce7;
  --carbon-200: #bbf7d0;
  --carbon-300: #86efac;
  --carbon-400: #4ade80;
  --carbon-500: #22c55e;
  --carbon-600: #16a34a;
  --carbon-700: #15803d;
  --carbon-800: #166534;
  --carbon-900: #14532d;
  --slate-850: #1a2332;
  --slate-900: #0f172a;
  --slate-950: #0b1120;
  --glow: 0 0 40px rgba(34, 197, 94, 0.15);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--slate-950);
  color: #e2e8f0;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .font-display {
  font-family: 'Space Grotesk', system-ui, sans-serif;
}

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

img {
  max-width: 100%;
  display: block;
}

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.glass {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.gradient-text {
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 45%, #a3e635 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(74, 222, 128, 0.35), transparent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--carbon-500);
  color: #0b1120;
}
.btn-primary:hover {
  background: var(--carbon-400);
  box-shadow: 0 12px 30px -8px rgba(34, 197, 94, 0.4);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #e2e8f0;
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(74, 222, 128, 0.4);
}

.card-hover {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px -12px rgba(34, 197, 94, 0.12);
  border-color: rgba(74, 222, 128, 0.25);
}

/* ---------- Navigation ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(11, 17, 32, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.35);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #4ade80, #16a34a);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.25);
  transition: transform 0.3s ease;
}
.logo:hover .logo-icon {
  transform: scale(1.06);
}

.logo-icon svg {
  width: 22px;
  height: 22px;
  color: white;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: #94a3b8;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--carbon-400);
}

.nav-cta {
  padding: 0.55rem 1.35rem;
  border-radius: 9999px;
  background: var(--carbon-500);
  color: #0b1120 !important;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.3s;
}
.nav-cta:hover {
  background: var(--carbon-400);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.3);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: #cbd5e1;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu {
  display: none;
  position: fixed;
  inset: 72px 0 0 0;
  background: rgba(11, 17, 32, 0.98);
  backdrop-filter: blur(20px);
  z-index: 99;
  padding: 2rem 1.5rem;
  flex-direction: column;
  gap: 1.25rem;
}
.mobile-menu.open {
  display: flex;
}
.mobile-menu a {
  font-size: 1.15rem;
  font-weight: 500;
  color: #e2e8f0;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}
.mobile-menu a:hover {
  color: var(--carbon-400);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 7rem 0 5rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(34, 197, 94, 0.22), transparent),
    radial-gradient(ellipse 50% 40% at 85% 60%, rgba(16, 185, 129, 0.08), transparent),
    var(--slate-950);
}

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

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  color: var(--carbon-300);
  margin-bottom: 1.75rem;
}
.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--carbon-400);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-size: clamp(2.75rem, 5.5vw, 4.25rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero-sub {
  font-size: 1.15rem;
  color: #94a3b8;
  max-width: 32rem;
  margin-bottom: 2.25rem;
  line-height: 1.7;
}

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

.hero-card {
  border-radius: 1.5rem;
  padding: 2.25rem;
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 280px;
  height: 280px;
  background: rgba(34, 197, 94, 0.1);
  border-radius: 50%;
  filter: blur(60px);
}

.valuation-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #64748b;
  margin-bottom: 0.35rem;
}

.valuation-value {
  font-size: clamp(2.75rem, 5vw, 3.75rem);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.valuation-sub {
  font-size: 0.875rem;
  color: #94a3b8;
  margin-bottom: 2rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.stat-num {
  font-size: 1.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.2rem;
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--carbon-400);
  opacity: 0.6;
  animation: bounce 2s infinite;
}

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

/* ---------- Particles ---------- */
.particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.35);
}

/* ---------- Sections ---------- */
.section {
  padding: 6.5rem 0;
  position: relative;
}

.section-header {
  margin-bottom: 3.5rem;
}

.section-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--carbon-400);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.1rem;
  color: #94a3b8;
  max-width: 40rem;
  line-height: 1.7;
}

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

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.feature-card {
  border-radius: 1.25rem;
  padding: 2rem;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--carbon-400);
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.feature-card p {
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.65;
}

/* Business cards */
.biz-card {
  border-radius: 1.5rem;
  padding: 2.25rem;
  position: relative;
  overflow: hidden;
}

.biz-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.biz-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.biz-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
}

.biz-tag {
  font-size: 0.8rem;
}

.biz-list {
  list-style: none;
  margin-top: 1.5rem;
}

.biz-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: #cbd5e1;
  margin-bottom: 0.5rem;
}

.biz-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---------- Market Stats ---------- */
.stat-box {
  border-radius: 1.25rem;
  padding: 1.5rem;
  text-align: center;
}

.stat-box .value {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.stat-box .label {
  font-size: 0.8rem;
  color: #94a3b8;
}

.chart-wrap {
  border-radius: 1.5rem;
  padding: 2rem;
  margin-top: 2.5rem;
}

.chart-container {
  height: 320px;
  position: relative;
}

/* ---------- Contact Form ---------- */
.form-card {
  border-radius: 1.5rem;
  padding: 2.5rem;
  max-width: 28rem;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(100, 116, 139, 0.4);
  color: #e2e8f0;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--carbon-500);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 110px;
}

.form-success {
  display: none;
  text-align: center;
  color: var(--carbon-400);
  font-weight: 500;
  margin-top: 1rem;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  padding: 3rem 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.footer-links {
  display: flex;
  gap: 1.75rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: #94a3b8;
  transition: color 0.2s;
}
.footer-links a:hover {
  color: var(--carbon-400);
}

.footer-copy {
  font-size: 0.8rem;
  color: #64748b;
  text-align: center;
}

/* ---------- Page Hero (inner pages) ---------- */
.page-hero {
  padding: 9rem 0 4rem;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(34, 197, 94, 0.15), transparent),
    var(--slate-950);
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.page-hero p {
  font-size: 1.15rem;
  color: #94a3b8;
  max-width: 36rem;
  margin: 0 auto;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .hero-card {
    max-width: 480px;
  }
  .grid-3 {
    grid-template-columns: 1fr 1fr;
  }
  .grid-4 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .grid-4 {
    grid-template-columns: 1fr 1fr;
  }
  .section {
    padding: 4.5rem 0;
  }
  .hero {
    padding: 6.5rem 0 4rem;
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .grid-4 {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .hero-actions {
    flex-direction: column;
  }
  .btn {
    width: 100%;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0b1120;
}
::-webkit-scrollbar-thumb {
  background: #166534;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #22c55e;
}


/* ============================================================
   Institutional Settlement Terminal Styles
   ============================================================ */
.settlement-terminal-section {
  padding: 4rem 1.25rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.terminal-card {
  width: 100%;
  max-width: 580px;
  background-color: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  color: #f8fafc;
}

.terminal-top-bar {
  padding: 1rem 1.5rem;
  background-color: #020617;
  border-bottom: 1px solid #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #10b981;
  display: inline-block;
  margin-right: 8px;
}

.form-container { padding: 1.5rem; }
.form-group { margin-bottom: 1rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.75rem; }

@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

.terminal-card label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.terminal-card input, 
.terminal-card select {
  width: 100%;
  background-color: #020617;
  border: 1px solid #334155;
  border-radius: 0.5rem;
  padding: 0.65rem 0.85rem;
  color: #ffffff;
  font-size: 0.875rem;
  outline: none;
  font-family: inherit;
}

.terminal-card input:focus, 
.terminal-card select:focus {
  border-color: #06b6d4;
}

.btn-terminal-submit {
  width: 100%;
  background: #0284c7;
  color: #ffffff;
  font-weight: 600;
  padding: 0.75rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background 0.2s ease;
}

.btn-terminal-submit:hover {
  background-color: #0369a1;
}

.processing-container {
  display: none;
  padding: 3rem 1.5rem;
  text-align: center;
  flex-direction: column;
  align-items: center;
}

.spinner-ring {
  width: 65px;
  height: 65px;
  border: 4px solid #1e293b;
  border-top-color: #06b6d4;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1.25rem auto;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

.progress-track {
  width: 100%;
  max-width: 320px;
  height: 8px;
  background: #020617;
  border-radius: 999px;
  border: 1px solid #334155;
  margin: 1rem auto;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: #06b6d4;
  transition: width 0.3s;
}

.receipt-container { display: none; padding: 1.5rem; }

.receipt-card {
  background: #020617;
  border: 1px solid #1e293b;
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  font-family: monospace;
  font-size: 0.8rem;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  padding: 0.45rem 0;
  border-bottom: 1px solid #0f172a;
}

.receipt-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.85rem;
  font-size: 1rem;
  font-weight: bold;
  color: #34d399;
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid #10b981;
  color: #34d399;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: bold;
}

/* Print/PDF rules */
@media print {
  body * { visibility: hidden; }
  #printable-receipt, #printable-receipt * { visibility: visible; }
  #printable-receipt {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    background: #ffffff !important;
    color: #000000 !important;
    border: 1px solid #000000 !important;
  }
  .receipt-row { border-bottom: 1px solid #e2e8f0 !important; }
}
