/* ===== CSS VARIABLES & RESET ===== */
:root {
  --primary: #16a34a;
  --primary-dark: #15803d;
  --primary-light: #22c55e;
  --dark: #0f172a;
  --dark-secondary: #1e293b;
  --dark-card: #1a2332;
  --light: #f8fafc;
  --white: #ffffff;
  --gray: #64748b;
  --gray-light: #e2e8f0;
  --gradient-green: linear-gradient(135deg, #16a34a, #15803d);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 10px 40px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.7;
  color: var(--dark);
  background: var(--white);
  overflow-x: hidden;
}

/* ===== CUSTOM SCROLLBAR ===== */
/* For Webkit browsers (Chrome, Safari, Edge, Opera) */

::-webkit-scrollbar-thumb {
  background: #16a34a; /* Primary green color */
}

::-webkit-scrollbar-thumb:hover {
  cursor: pointer;
  background: #15803d; /* Primary dark green on hover */
}

/* For Firefox */
* {
  scrollbar-color: #16a34a #f1f5f9;
}

/* For Firefox with more specific styling */
html {
  scrollbar-color: #16a34a #f1f5f9;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition);
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

.container {
  width: min(90%, 1200px);
  margin: 0 auto;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

p {
  color: var(--gray);
  margin-bottom: 1rem;
}

.section-tag {
  display: inline-block;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.text-accent {
  color: var(--primary);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 0.85rem 1.8rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition);
  text-align: center;
  line-height: 1.4;
}

.btn-primary {
  background: var(--gradient-green);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(22, 163, 74, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #15803d, #16a34a);
  box-shadow: 0 6px 25px rgba(22, 163, 74, 0.4);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--dark);
  border: 2px solid var(--gray-light);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-light {
  background: var(--white);
  color: var(--dark);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-light:hover {
  background: var(--light);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

.btn-lg {
  padding: 1rem 2.2rem;
  font-size: 1.05rem;
}

.btn-block {
  width: 100%;
  display: block;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  transition: box-shadow var(--transition), background var(--transition);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid var(--gray-light);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--gradient-green);
  color: var(--white);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
}

.logo-green {
  color: var(--primary);
}

.desktop-nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.desktop-nav a {
  color: var(--dark-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 0.25rem 0;
}

.desktop-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition);
}

.desktop-nav a:hover::after {
  width: 100%;
}

.desktop-nav a:hover {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-cta {
  padding: 0.6rem 1.5rem;
  font-size: 0.9rem;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 5px;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--dark);
  transition: all var(--transition);
  border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 72px;
  left: 0;
  right: 0;
  background: var(--white);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  transform: translateY(-10px);
  opacity: 0;
  transition: all var(--transition);
  pointer-events: none;
}

.mobile-menu.active {
  display: block;
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-menu a {
  color: var(--dark);
  font-weight: 500;
  padding: 0.5rem 0;
  font-size: 1.1rem;
}

.mobile-menu a:hover {
  color: var(--primary);
}

.mobile-cta {
  margin-top: 1rem;
  text-align: center;
}

/* ===== HERO ===== */
.hero {
  padding-top: 140px;
  padding-bottom: 80px;
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(22, 163, 74, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
}

.hero-content {
  animation: fadeInUp 0.6s ease;
}

.eyebrow {
  display: inline-block;
  background: rgba(22, 163, 74, 0.1);
  color: var(--primary-dark);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--gray);
  margin-bottom: 2rem;
  max-width: 500px;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.hero-metrics {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.hero-metrics div {
  display: flex;
  flex-direction: column;
}

.hero-metrics strong {
  font-size: 1.4rem;
  color: var(--dark);
}

.hero-metrics span {
  font-size: 0.85rem;
  color: var(--gray);
}

/* Hero Visual */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.dashboard-card {
  background: var(--dark);
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 420px;
  color: var(--white);
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: float 6s ease-in-out infinite;
}

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.traffic-dots {
  display: flex;
  gap: 5px;
}

.traffic-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray-light);
  display: block;
}

.traffic-dots i:first-child {
  background: #ef4444;
}

.traffic-dots i:nth-child(2) {
  background: #f59e0b;
}

.traffic-dots i:nth-child(3) {
  background: #10b981;
}

.dash-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.metric {
  background: var(--dark-secondary);
  padding: 1rem;
  border-radius: 10px;
  flex: 1;
}

.metric span {
  display: block;
  font-size: 0.8rem;
  color: var(--gray);
}

.metric strong {
  font-size: 1.5rem;
  color: var(--primary-light);
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 100px;
}

.chart-bars span {
  flex: 1;
  background: var(--gradient-green);
  border-radius: 4px 4px 0 0;
  animation: growBar 1s ease;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--gray-light);
}

.green-dot {
  width: 8px;
  height: 8px;
  background: var(--primary-light);
  border-radius: 50%;
  display: inline-block;
  animation: pulse 2s infinite;
}

.floating-card {
  position: absolute;
  background: var(--white);
  color: var(--dark);
  padding: 0.8rem 1.2rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.85rem;
  box-shadow: var(--shadow-md);
}

.float-1 {
  top: -15px;
  right: -20px;
  animation: float 4s ease-in-out infinite;
}

.float-2 {
  bottom: -15px;
  left: -20px;
  animation: float 5s ease-in-out infinite 0.5s;
}

/* ===== VALUE STRIP ===== */
.value-strip {
  background: var(--dark);
  padding: 2.5rem 0;
  margin-top: -1px;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.value-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--white);
  font-weight: 500;
}

.value-item svg {
  width: 28px;
  height: 28px;
  color: var(--primary-light);
  flex-shrink: 0;
}

/* ===== SECTIONS ===== */
.section-pad {
  padding: 100px 0;
}

.section-alt {
  background: var(--light);
}

.section-heading {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 3.5rem;
}

.section-heading p {
  font-size: 1.1rem;
}

/* ===== SERVICES ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.card-service {
  background: var(--white);
  padding: 2.5rem 2rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--gray-light);
  transition: all var(--transition);
  cursor: default;
}

.card-service:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.icon-bg {
  width: 50px;
  height: 50px;
  background: rgba(22, 163, 74, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.icon-bg svg {
  width: 26px;
  height: 26px;
  color: var(--primary);
}

/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.about-visual {
  display: flex;
  justify-content: center;
}

.code-card {
  background: var(--dark);
  border-radius: 16px;
  padding: 1.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  color: var(--gray-light);
  font-size: 0.85rem;
}

.code-card pre {
  color: #a7f3d0;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  overflow-x: auto;
}

.float-badge {
  position: absolute;
  bottom: -15px;
  right: -15px;
  background: var(--white);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ===== WHY US ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.feature-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--border-radius);
  border-left: 4px solid var(--primary);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.feature-card:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 40px;
  height: 40px;
  background: rgba(22, 163, 74, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

/* ===== PROCESS ===== */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  position: relative;
}

.process-grid::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: var(--gray-light);
  z-index: 0;
}

.process-step {
  text-align: center;
  position: relative;
  z-index: 1;
  padding: 0 1rem;
}

.step-number {
  width: 60px;
  height: 60px;
  background: var(--white);
  border: 3px solid var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 auto 1rem;
  position: relative;
  z-index: 1;
}

.process-step h3 {
  margin-bottom: 0.5rem;
}

/* ===== CTA ===== */
.cta-section {
  background: var(--dark);
  padding: 100px 0;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.cta-bg-decor {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(22, 163, 74, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(22, 163, 74, 0.2) 0%, transparent 50%);
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 1;
}

.cta-content h2 {
  color: var(--white);
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

.cta-content p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

/* ===== CONTACT ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-info p {
  font-size: 1.1rem;
}

.email-link {
  display: inline-block;
  color: var(--primary);
  font-weight: 600;
  font-size: 1.2rem;
  margin-top: 1rem;
  border-bottom: 2px solid var(--primary);
}

.email-link:hover {
  color: var(--primary-dark);
}

.contact-form-wrap {
  background: var(--white);
  padding: 2.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-light);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--dark);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid var(--gray-light);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.form-group input.error,
.form-group textarea.error {
  border-color: #ef4444;
}

.error-message {
  display: block;
  color: #ef4444;
  font-size: 0.85rem;
  margin-top: 0.25rem;
  min-height: 1.2em;
}

.form-note {
  font-size: 0.85rem;
  color: var(--gray);
  text-align: center;
  margin-top: 1rem;
  margin-bottom: 0;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--dark);
  color: var(--white);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand .logo {
  color: var(--white);
  margin-bottom: 1rem;
}

.footer-brand p {
  color: var(--gray);
}

.footer-links h4,
.footer-contact h4 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--white);
}

.footer-links a,
.footer-contact a {
  display: block;
  color: var(--gray);
  margin-bottom: 0.5rem;
}

.footer-links a:hover,
.footer-contact a:hover {
  color: var(--primary-light);
}

.copyright {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--gray);
  font-size: 0.9rem;
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--gradient-green);
  color: var(--white);
  border-radius: 50%;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

@keyframes growBar {
  from {
    height: 0;
  }
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
  
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .hero-visual {
    order: -1;
  }
  
  .dashboard-card {
    max-width: 500px;
  }
  
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .process-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem 2rem;
  }
  
  .process-grid::before {
    display: none;
  }
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }
  
  .hamburger {
    display: flex;
  }
  
  .nav-cta {
    display: none;
  }
  
  .hero {
    padding-top: 110px;
    padding-bottom: 60px;
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .hero-buttons .btn {
    width: 100%;
  }
  
  .value-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .process-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .section-pad {
    padding: 70px 0;
  }
  
  .floating-card {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-metrics {
    gap: 1.5rem;
  }
  
  .hero-metrics strong {
    font-size: 1.2rem;
  }
  
  .value-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-form-wrap {
    padding: 1.5rem;
  }
  
  .btn-lg {
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
  }
}