:root {
  --bg: #0f172a;
  --card: #1a2332;
  --accent: #6366f1;
  --accent-soft: #8b5cf6;
  --accent-bright: #a78bfa;
  --text: #f8fafc;
  --muted: #cbd5e1;
  --border: rgba(148, 163, 184, 0.3);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: "Outfit", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.25), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.2), transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(167, 139, 250, 0.1), transparent 70%),
    var(--bg);
  background-size: 200% 200%;
  animation: gradient-shift 15s ease infinite;
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.muted {
  color: var(--muted);
}

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  backdrop-filter: blur(20px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text);
}

.logo-mark {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(130deg, var(--accent), var(--accent-soft), var(--accent-bright));
  background-size: 200% 200%;
  animation: gradient-shift 3s ease infinite;
  display: grid;
  place-items: center;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo-mark:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.brand span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links a {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-weight: 500;
  color: var(--muted);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.nav-links a::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--accent), var(--accent-soft));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.nav-links a:hover,
.nav-links a:focus {
  color: var(--text);
  transform: translateY(-2px);
}

.nav-links a:hover::before,
.nav-links a:focus::before {
  opacity: 0.15;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-soft), var(--accent-bright));
  background-size: 200% 200%;
  animation: gradient-shift 3s ease infinite;
  color: #fff;
  box-shadow: 
    0 10px 25px rgba(99, 102, 241, 0.4),
    0 4px 10px rgba(99, 102, 241, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 
    0 20px 50px rgba(99, 102, 241, 0.5),
    0 8px 20px rgba(99, 102, 241, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:active {
  transform: translateY(-1px) scale(0.98);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 25px;
  height: 2px;
  background: var(--text);
}

main {
  padding-bottom: 4rem;
}

section {
  padding: 4rem 0;
}

.hero {
  padding: 8rem 0 6rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15), transparent 70%);
  animation: pulse 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

.hero > .container {
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  margin-bottom: 1rem;
}

.hero p {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.stat-card {
  padding: 2rem;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: linear-gradient(135deg, rgba(26, 35, 50, 0.95), rgba(17, 28, 48, 0.9));
  backdrop-filter: blur(20px);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 4px 6px rgba(0, 0, 0, 0.1),
    0 2px 4px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft), var(--accent-bright));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.stat-card:hover {
  transform: translateY(-8px);
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 
    0 20px 40px rgba(99, 102, 241, 0.25),
    0 8px 16px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.stat-card:hover::before {
  transform: scaleX(1);
}

.stat-card strong {
  display: block;
  font-size: 2rem;
  background: linear-gradient(120deg, var(--accent), var(--accent-soft));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
  justify-items: stretch;
}

/* Prevent cards from stretching too wide when there are few items */
.card-grid > .card {
  max-width: 100%;
}

/* On medium screens, use 2 columns max for better balance */
@media (min-width: 768px) and (max-width: 1199px) {
  .card-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    max-width: 100%;
  }
  
  /* Force 2 columns when we have 3-4 items */
  .card-grid > .card:nth-child(3):not(:nth-child(4)) ~ .card,
  .card-grid > .card:nth-child(4):last-child {
    grid-column: span 1;
  }
}

/* On large screens, limit individual card width to prevent awkward layouts */
@media (min-width: 1200px) {
  .card-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 350px));
    justify-content: center;
  }
}

.card {
  padding: 2rem;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: linear-gradient(135deg, rgba(26, 35, 50, 0.95), rgba(17, 28, 48, 0.9));
  backdrop-filter: blur(20px);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 4px 6px rgba(0, 0, 0, 0.1),
    0 2px 4px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-12px) scale(1.01);
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 
    0 25px 50px rgba(99, 102, 241, 0.3),
    0 10px 20px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.98), rgba(26, 35, 50, 0.95));
}

.card:hover::after {
  opacity: 1;
}

/* Cards will animate via JavaScript, but visible by default */
.card.fade-in {
  opacity: 0;
  transform: translateY(30px);
}

.card.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.card p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0;
}

/* Service cards with aligned buttons */
.service-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.service-card .card-footer {
  margin-top: auto;
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
}

.service-card .btn {
  width: 100%;
  justify-content: center;
  text-align: center;
}

/* Process Number Badge */
.process-number-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}


.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(99, 102, 241, 0.3);
  animation: pulse 2s ease-in-out infinite;
  transition: all 0.3s ease;
}

.badge:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.badge i {
  animation: float 2s ease-in-out infinite;
}

.section-title {
  margin-bottom: 3rem;
  text-align: center;
}

.section-title h2 {
  text-align: center;
  margin: 0.5rem 0 1rem;
}

.section-title > p {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.card {
  text-align: left;
}

.card h3 {
  text-align: left;
}

.card p {
  text-align: left;
}

.section-title span {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  font-size: 0.8rem;
}

.section-title h2 {
  margin: 0.25rem 0 0.75rem;
  font-size: clamp(2rem, 3vw, 2.75rem);
}

.pricing-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.pricing-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(15, 23, 42, 0.65);
  border-radius: 18px;
  overflow: hidden;
  table-layout: fixed;
}

.pricing-table th,
.pricing-table td {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  text-align: left;
  vertical-align: top;
  line-height: 1.6;
}

.pricing-table td {
  color: var(--muted);
}

.pricing-table th:first-child,
.pricing-table td:first-child {
  width: 35%;
  min-width: 120px;
}

.pricing-table th:last-child,
.pricing-table td:last-child {
  width: 65%;
}

.pricing-table th {
  background: rgba(79, 70, 229, 0.12);
  font-weight: 600;
}

.pricing-table tr:last-child td {
  border-bottom: none;
}

.features-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.features-list li {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  margin-bottom: 0.4rem;
  color: var(--muted);
}

.features-list li i {
  color: var(--success);
  margin-top: 0.2rem;
}

.timeline {
  border-left: 2px solid rgba(148, 163, 184, 0.3);
  padding-left: 1.5rem;
  margin-left: 0.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.timeline-item {
  margin-bottom: 1.5rem;
}

.timeline-item h3 {
  margin-bottom: 0.5rem;
}

.timeline-item p {
  color: var(--muted);
  line-height: 1.6;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.contact-card {
  padding: 2.5rem;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: linear-gradient(135deg, rgba(26, 35, 50, 0.95), rgba(17, 28, 48, 0.9));
  backdrop-filter: blur(20px);
  box-shadow: 
    0 8px 16px rgba(0, 0, 0, 0.15),
    0 4px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.4s ease;
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: 
    0 16px 32px rgba(99, 102, 241, 0.2),
    0 8px 16px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  transition: all 0.3s ease;
}

.contact-info-item:last-child {
  border-bottom: none;
}

.contact-info-item:hover {
  padding-left: 0.5rem;
}

.contact-info-item i {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-soft);
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.contact-info-item strong {
  display: block;
  color: var(--text);
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.contact-info-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

form {
  display: grid;
  gap: 1rem;
}

.form-row {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

label {
  font-weight: 600;
  margin-bottom: 0.35rem;
  display: inline-block;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.65);
  color: var(--text);
  font-family: inherit;
  transition: all 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  background: rgba(15, 23, 42, 0.8);
  transform: translateY(-2px);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.form-success {
  padding: 1rem;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  background: rgba(12, 20, 36, 0.95);
  padding: 3rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
  margin: 2rem 0;
}

.footer-grid a {
  transition: all 0.3s ease;
  display: inline-block;
}

.footer-grid a:hover {
  color: var(--accent-soft);
  transform: translateX(4px);
}

.social-links a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.5rem;
  color: var(--text);
}

.copyright {
  color: var(--muted);
  font-size: 0.9rem;
}

.service-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.25), rgba(167, 139, 250, 0.2));
  background-size: 200% 200%;
  animation: gradient-shift 4s ease infinite, float 3s ease-in-out infinite;
  display: grid;
  place-items: center;
  font-size: 32px;
  color: var(--accent-soft);
  margin-bottom: 1.5rem;
  box-shadow: 
    0 8px 20px rgba(99, 102, 241, 0.35),
    0 4px 10px rgba(99, 102, 241, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.service-icon::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
  filter: blur(8px);
}

.service-icon:hover {
  transform: scale(1.15) rotate(8deg);
  box-shadow: 
    0 12px 30px rgba(99, 102, 241, 0.5),
    0 6px 15px rgba(99, 102, 241, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.service-icon:hover::before {
  opacity: 0.6;
}

.tech-image {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2), rgba(167, 139, 250, 0.15));
  background-size: 200% 200%;
  animation: gradient-shift 8s ease infinite;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 2rem 0;
  position: relative;
  overflow: hidden;
}

.tech-image::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  animation: shimmer 3s infinite;
}

.tech-image i {
  animation: float 4s ease-in-out infinite;
  opacity: 0.4;
}

.pricing-section {
  margin: 4rem 0;
}

.pricing-section:first-of-type {
  margin-top: 2rem;
}

.pricing-table small {
  color: var(--muted);
  font-size: 0.85rem;
  display: block;
  margin-top: 0.5rem;
}

/* Scroll animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Loading animation */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(99, 102, 241, 0.3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    inset: 70px 1rem auto;
    flex-direction: column;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 18px;
    padding: 1rem;
    display: none;
    animation: slide-up 0.3s ease;
  }

  .nav-links.open {
    display: flex;
  }

  .hero-grid {
    text-align: center;
  }

  .stats-grid {
    text-align: center;
  }
}

