/* ==========================================================================
   CO2TRACK - Design System & Modern CSS Stylesheet
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-dark: #090D16;
  --bg-card: rgba(18, 26, 43, 0.75);
  --bg-card-hover: rgba(26, 38, 62, 0.85);
  --bg-glass: rgba(15, 23, 42, 0.65);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(16, 185, 129, 0.3);

  /* Primary & Accent Colors */
  --primary-emerald: #10B981;
  --primary-green-glow: rgba(16, 185, 129, 0.4);
  --accent-cyan: #06B6D4;
  --accent-blue: #3B82F6;
  --accent-gradient: linear-gradient(135deg, #10B981 0%, #06B6D4 50%, #3B82F6 100%);
  --accent-gradient-hover: linear-gradient(135deg, #34D399 0%, #22D3EE 50%, #60A5FA 100%);

  /* Text Colors */
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  
  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Spacing & Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 25px rgba(16, 185, 129, 0.15);
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

/* Background Gradients Glows */
.bg-glow-1 {
  position: absolute;
  top: -100px;
  right: -50px;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, rgba(6, 182, 212, 0.04) 50%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.bg-glow-2 {
  position: absolute;
  top: 40%;
  left: -150px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.1) 0%, rgba(59, 130, 246, 0.03) 50%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Containers & Grid Layout */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

section {
  padding: 6rem 0;
  position: relative;
}

/* Typography & Badges */
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-main);
}

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

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--border-glow);
  color: var(--primary-emerald);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

.badge-icon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-emerald);
  box-shadow: 0 0 8px var(--primary-emerald);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.75; }
  50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 12px var(--primary-emerald); }
  100% { transform: scale(0.95); opacity: 0.75; }
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 4rem auto;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.15rem;
}

/* Buttons & Interactive Elements */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
  border: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #04121E;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
  background: var(--accent-gradient-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(16, 185, 129, 0.45);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  color: var(--primary-emerald);
  transform: translateY(-2px);
}

/* Navigation Bar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: var(--transition-smooth);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--text-main);
}

.logo-symbol {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #04121E;
  font-weight: 900;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

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

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

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

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Mobile Drawer */
.mobile-menu {
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  background: rgba(9, 13, 22, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 2rem;
  display: none;
  flex-direction: column;
  gap: 1.25rem;
  z-index: 999;
}

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

.mobile-menu a {
  color: var(--text-main);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
}

/* Hero Section */
.hero {
  padding-top: 10rem;
  padding-bottom: 6rem;
  background: radial-gradient(100% 100% at 50% 0%, rgba(16, 185, 129, 0.08) 0%, transparent 80%);
}

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

.hero-content h1 {
  font-size: 3.4rem;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.hero-content p {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2.2rem;
  max-width: 580px;
}

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

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.stat-item h3 {
  font-size: 1.8rem;
  color: var(--primary-emerald);
  margin-bottom: 0.2rem;
}

.stat-item p {
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* Hero Media / Banner Card */
.hero-media {
  position: relative;
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.glass-card img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  display: block;
  object-fit: cover;
}

.hero-media-badge {
  position: absolute;
  bottom: 2rem;
  left: 2rem;
  right: 2rem;
  background: rgba(9, 13, 22, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glow);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hero-media-badge .badge-icon-lg {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  color: var(--primary-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* Pillars Section */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.pillar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  transition: var(--transition-smooth);
  position: relative;
}

.pillar-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
}

.pillar-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.12);
  color: var(--primary-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.pillar-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.8rem;
}

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

/* Interactive Simulator Section */
.simulator-section {
  background: linear-gradient(180deg, var(--bg-dark) 0%, rgba(18, 26, 43, 0.5) 50%, var(--bg-dark) 100%);
}

.simulator-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.sim-form-group {
  margin-bottom: 1.4rem;
}

.sim-form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.sim-input, .sim-select {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(9, 13, 22, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.sim-input:focus, .sim-select:focus {
  outline: none;
  border-color: var(--primary-emerald);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.certificate-preview {
  background: rgba(9, 13, 22, 0.9);
  border: 1px dashed var(--primary-emerald);
  border-radius: var(--radius-md);
  padding: 2rem;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.cert-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--primary-emerald);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cert-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.cert-row span:first-child {
  color: var(--text-dim);
}

.cert-row span:last-child {
  color: var(--text-main);
  font-weight: 600;
  font-family: monospace;
}

.cert-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 1.25rem;
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.qr-code-box {
  width: 60px;
  height: 60px;
  background: #ffffff;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-code-box svg {
  width: 100%;
  height: 100%;
}

/* CCUS Workflow Section */
.workflow-pipeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  position: relative;
  margin-top: 3rem;
}

.pipeline-step {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.8rem 1.2rem;
  text-align: center;
  position: relative;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.pipeline-step.active, .pipeline-step:hover {
  border-color: var(--primary-emerald);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
  transform: translateY(-4px);
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  color: var(--primary-emerald);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem auto;
  font-size: 0.95rem;
}

.pipeline-step h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

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

/* Anti-Fraud / Comparison Section */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.comp-card {
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

.comp-card.trad {
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.comp-card.co2track {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid var(--border-glow);
  box-shadow: var(--shadow-glow);
}

.comp-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.comp-list {
  list-style: none;
}

.comp-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.comp-list .icon-fail {
  color: #EF4444;
}

.comp-list .icon-success {
  color: var(--primary-emerald);
}

/* FAQ Accordion */
.faq-accordion {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: var(--transition-fast);
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.faq-answer {
  padding: 0 1.5rem 1.25rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  color: var(--primary-emerald);
}

/* Contact Modal & CTA Footer */
.cta-banner {
  background: radial-gradient(circle at center, rgba(16, 185, 129, 0.15) 0%, rgba(9, 13, 22, 0.95) 70%);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 4rem 2rem;
  text-align: center;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 10, 20, 0.85);
  backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-container {
  background: var(--bg-dark);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 520px;
  padding: 2.5rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  position: relative;
  transform: translateY(20px);
  transition: var(--transition-smooth);
}

.modal-overlay.active .modal-container {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text-main);
}

/* Form Alert & Feedback Messages */
.form-alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  line-height: 1.4;
}

.form-alert.success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34D399;
}

.form-alert.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #F87171;
}

.form-alert svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spin-icon {
  animation: spin 1s linear infinite;
  display: inline-block;
  vertical-align: middle;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem 0;
  background: #060911;
  color: var(--text-dim);
  font-size: 0.9rem;
}

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

.footer-col h4 {
  color: var(--text-main);
  font-size: 1rem;
  margin-bottom: 1.2rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.6rem;
}

.footer-col ul li a {
  color: var(--text-dim);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-col ul li a:hover {
  color: var(--primary-emerald);
}

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

/* Responsive Media Queries */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content p {
    margin-left: auto;
    margin-right: auto;
  }

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

  .simulator-box {
    grid-template-columns: 1fr;
  }

  .workflow-pipeline {
    grid-template-columns: 1fr 1fr;
  }

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

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

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  .hero-content h1 {
    font-size: 2.4rem;
  }

  .workflow-pipeline {
    grid-template-columns: 1fr;
  }

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

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
