:root {
  --bg-page: #ffffff;
  --bg-alt: #f6f8fc;
  --bg-navy-2: #f6f8fc; /* alternate section background, kept for backward-compat naming */
  --card-bg: #ffffff;
  --accent-blue: #4f6bff;
  --accent-purple: #9b5bff;
  --accent-gradient: linear-gradient(135deg, #4f6bff 0%, #9b5bff 100%);
  --text-heading: #10142c;
  --text-white: #10142c; /* kept for backward-compat; now maps to dark heading color */
  --text-body: #5b6480;
  --text-secondary: #5b6480;
  --border-subtle: rgba(16, 20, 44, 0.08);
  --shadow-soft: 0 10px 30px rgba(16, 20, 44, 0.06);
  --shadow-hover: 0 24px 48px rgba(79, 107, 255, 0.14);
  --radius-lg: 20px;
  --radius-md: 14px;

  --nav-bg: rgba(255, 255, 255, 0.85);
  --nav-bg-scrolled: rgba(255, 255, 255, 0.97);
  --nav-shadow-scrolled: 0 4px 20px rgba(16, 20, 44, 0.04);

  --tint-blue: rgba(79, 107, 255, 0.08);
  --tint-blue-strong: rgba(79, 107, 255, 0.14);
  --tint-purple: rgba(155, 91, 255, 0.10);
  --badge-industry-text: #7c4fd6;

  color-scheme: light;
}

/* Dark mode palette — activated via <html data-theme="dark"> */
[data-theme="dark"] {
  --bg-page: #070b18;
  --bg-alt: #0b1226;
  --bg-navy-2: #0b1226;
  --card-bg: #101a34;
  --accent-blue: #4f7dff;
  --accent-purple: #9b5bff;
  --accent-gradient: linear-gradient(135deg, #4f7dff 0%, #9b5bff 100%);
  --text-heading: #f5f7ff;
  --text-white: #f5f7ff;
  --text-body: #97a1c2;
  --text-secondary: #97a1c2;
  --border-subtle: rgba(255, 255, 255, 0.09);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 24px 48px rgba(0, 0, 0, 0.45);

  --nav-bg: rgba(7, 11, 24, 0.75);
  --nav-bg-scrolled: rgba(7, 11, 24, 0.92);
  --nav-shadow-scrolled: 0 4px 20px rgba(0, 0, 0, 0.3);

  --tint-blue: rgba(79, 125, 255, 0.12);
  --tint-blue-strong: rgba(79, 125, 255, 0.18);
  --tint-purple: rgba(155, 91, 255, 0.16);
  --badge-industry-text: #c7b3ff;

  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  background: var(--bg-page);
  color: var(--text-body);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
  transition: background-color .25s ease, color .25s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Sora', 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-heading);
}

.text-heading { color: var(--text-heading) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-white { color: var(--text-heading) !important; } /* legacy class override, theme-aware */

a { text-decoration: none; }

.section { padding: 100px 0; position: relative; }
.section-sm { padding: 60px 0; }
.section-alt { background: var(--bg-alt); }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-blue);
  background: var(--tint-blue);
  border: 1px solid var(--tint-blue-strong);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 18px;
}

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

.btn-gradient {
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-weight: 600;
  padding: 12px 28px;
  transition: transform .25s ease, box-shadow .25s ease;
  box-shadow: 0 10px 24px rgba(79, 107, 255, 0.28);
}
.btn-gradient:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(155, 91, 255, 0.32); color: #fff; }

.btn-outline-light-glow {
  border: 1.5px solid var(--border-subtle);
  color: var(--text-heading);
  border-radius: 999px;
  padding: 12px 28px;
  font-weight: 600;
  background: var(--card-bg);
  transition: all .25s ease;
}
.btn-outline-light-glow:hover { border-color: var(--accent-blue); background: var(--tint-blue); color: var(--text-heading); }

/* Theme toggle button */
.theme-toggle-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border-subtle); background: var(--card-bg); color: var(--text-heading);
  display: flex; align-items: center; justify-content: center; font-size: 1.05rem;
  transition: all .2s ease; flex-shrink: 0;
}
.theme-toggle-btn:hover { border-color: var(--accent-blue); color: var(--accent-blue); }

/* Navbar */
.site-navbar {
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: all .3s ease;
  padding: 16px 0;
}
.site-navbar.scrolled {
  background: var(--nav-bg-scrolled);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: var(--nav-shadow-scrolled);
  padding: 10px 0;
}
#siteNavbar .nav-link { color: var(--text-body) !important; font-weight: 500; margin: 0 6px; transition: color .2s; }
#siteNavbar .nav-link:hover, #siteNavbar .nav-link.active { color: var(--accent-blue) !important; }
.navbar-brand { color: var(--text-heading) !important; font-size: 1.25rem; display: flex; align-items: center; }
.navbar-toggler { border-color: var(--border-subtle); }
.navbar-toggler-icon-custom { color: var(--text-heading); font-size: 1.5rem; line-height: 1; }

/* Hero */
.hero-section {
  padding: 180px 0 110px;
  background:
    radial-gradient(circle at 15% 20%, var(--tint-blue-strong), transparent 45%),
    radial-gradient(circle at 85% 15%, var(--tint-purple), transparent 45%),
    var(--bg-page);
  position: relative;
  overflow: hidden;
}
.hero-headline { font-size: clamp(2.2rem, 5vw, 3.75rem); line-height: 1.08; }
.hero-visual {
  background: linear-gradient(160deg, var(--tint-blue), rgba(155,91,255,0.04));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 28px;
  position: relative;
  min-height: 420px;
}
.hero-visual .code-line { font-family: 'Courier New', monospace; font-size: 0.85rem; color: var(--text-secondary); }
.hero-visual .glass-card {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-soft);
}
.float-anim { animation: float 5s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0);} 50% { transform: translateY(-14px);} }

.trust-strip { color: var(--text-secondary); font-size: 0.95rem; letter-spacing: 0.02em; }

/* Stats */
.stat-card { text-align: center; padding: 28px 10px; }
.stat-value { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 800; background: var(--accent-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Cards */
.glass-panel {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease, background-color .25s ease;
}
.glass-panel:hover {
  transform: translateY(-6px);
  border-color: rgba(79,107,255,0.3);
  box-shadow: var(--shadow-hover);
}

.service-card { padding: 34px 28px; height: 100%; }
.service-icon {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-gradient);
  font-size: 1.4rem; margin-bottom: 22px;
}
.service-card .feature-list { list-style: none; padding: 0; margin: 16px 0 0; }
.service-card .feature-list li { color: var(--text-secondary); font-size: 0.9rem; padding: 4px 0; }
.service-card .feature-list li::before { content: "✓"; color: var(--accent-blue); margin-right: 8px; }
.learn-more-link { color: var(--accent-blue); font-weight: 600; font-size: 0.9rem; }
.learn-more-link i { transition: transform .2s; }
.service-card:hover .learn-more-link i { transform: translateX(4px); }

/* Why choose us */
.why-card { padding: 26px; height: 100%; }
.why-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--tint-blue); border: 1px solid var(--tint-blue-strong); display: flex; align-items: center; justify-content: center; color: var(--accent-blue); margin-bottom: 16px; }

/* Tech badges */
.tech-group-title { color: var(--text-secondary); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 14px; }
.tech-badge {
  display: inline-block; padding: 8px 16px; margin: 4px 6px 4px 0;
  border: 1px solid var(--border-subtle); border-radius: 999px;
  background: var(--bg-alt); color: var(--text-heading); font-size: 0.88rem;
  transition: all .2s ease;
}
.tech-badge:hover { border-color: var(--accent-blue); background: var(--tint-blue); }

/* Portfolio */
.portfolio-card { overflow: hidden; height: 100%; }
.portfolio-thumb {
  height: 200px; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(135deg, rgba(79,107,255,0.18), rgba(155,91,255,0.14));
  display: flex; align-items: center; justify-content: center; font-size: 2.4rem;
}
.portfolio-body { padding: 24px; }
.badge-industry { background: var(--tint-purple); color: var(--badge-industry-text); border: 1px solid rgba(155,91,255,0.3); font-weight: 500; }
.filter-btn {
  border: 1px solid var(--border-subtle); background: var(--card-bg); color: var(--text-secondary);
  border-radius: 999px; padding: 8px 20px; font-size: 0.88rem; margin: 4px; transition: all .2s;
}
.filter-btn.active, .filter-btn:hover { background: var(--accent-gradient); color: #fff; border-color: transparent; }

/* Process timeline */
.process-step { padding: 26px; height: 100%; position: relative; }
.process-number {
  font-size: 2.2rem; font-weight: 800; color: transparent;
  -webkit-text-stroke: 1.5px rgba(79,107,255,0.4);
}

/* Industries */
.industry-chip {
  padding: 22px 14px; text-align: center; border-radius: var(--radius-md);
  background: var(--bg-alt); border: 1px solid var(--border-subtle);
  transition: all .25s ease; height: 100%;
}
.industry-chip:hover { background: var(--tint-blue); border-color: rgba(79,107,255,0.25); transform: translateY(-4px); }

/* Testimonials */
.testimonial-card { padding: 28px; height: 100%; }
.testimonial-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent-gradient); display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff;
}
.stars i { color: #ffb84f; }

/* CTA */
.cta-section {
  background: radial-gradient(circle at 50% 0%, var(--tint-blue), transparent 60%), var(--bg-alt);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 70px 40px;
  margin: 0 auto;
}

/* Contact */
.contact-form-panel { padding: 40px; }
.form-control, .form-select {
  background: var(--card-bg); border: 1px solid var(--border-subtle); color: var(--text-heading);
  border-radius: 10px; padding: 12px 14px;
}
.form-control:focus, .form-select:focus {
  background: var(--card-bg); border-color: var(--accent-blue); color: var(--text-heading);
  box-shadow: 0 0 0 3px var(--tint-blue-strong);
}
.form-control::placeholder { color: var(--text-secondary); opacity: 0.7; }
label.form-label { color: var(--text-secondary); font-size: 0.88rem; margin-bottom: 6px; }
.contact-info-item { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.contact-info-icon {
  width: 42px; height: 42px; border-radius: 10px; background: var(--tint-blue);
  color: var(--accent-blue); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* Footer */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border-subtle); }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: var(--text-secondary); }
.footer-links a:hover { color: var(--accent-blue); }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: center; color: var(--text-secondary);
  background: var(--card-bg);
  transition: all .2s;
}
.footer-social a:hover { color: #fff; border-color: var(--accent-blue); background: var(--accent-gradient); }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Page header (used on inner pages) */
.page-header {
  padding: 160px 0 60px;
  background: radial-gradient(circle at 20% 0%, var(--tint-blue), transparent 50%), var(--bg-page);
  text-align: center;
}

@media (max-width: 991px) {
  .hero-section { padding: 130px 0 70px; }
  .page-header { padding: 130px 0 50px; }
  .section { padding: 70px 0; }
}
