:root {
  --bg: #05060a;
  --bg-soft: #0b0f1a;
  --bg-card: #0f1422;
  --line: #1c2238;
  --text: #e6e9f2;
  --muted: #8a91a8;
  --blue: #3a7bff;
  --blue-bright: #5a96ff;
  --blue-soft: rgba(58, 123, 255, 0.12);
  --gradient: linear-gradient(135deg, #3a7bff 0%, #6aa6ff 100%);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ===== Scroll progress ===== */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--gradient);
  z-index: 200;
  transition: width 0.05s linear;
  box-shadow: 0 0 12px rgba(58, 123, 255, 0.6);
}

/* ===== Background glow ===== */
body::before {
  content: '';
  position: fixed;
  top: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(58, 123, 255, 0.18) 0%, transparent 60%);
  z-index: -1;
  pointer-events: none;
}
body::after {
  content: '';
  position: fixed;
  bottom: -30%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(58, 123, 255, 0.10) 0%, transparent 60%);
  z-index: -1;
  pointer-events: none;
}

/* ===== Navigation ===== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: 20px 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(5, 6, 10, 0.65);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
nav.scrolled { border-bottom-color: var(--line); }

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}
.brand span { color: var(--blue-bright); }

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
  padding: 7px 14px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 7px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.nav-cta:hover { border-color: var(--blue); color: var(--blue-bright); }

.menu-toggle { display: none; background: none; border: none; color: var(--text); cursor: pointer; padding: 6px; }
.mobile-panel { display: none; }

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}

/* Animated dotted grid in hero */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(58, 123, 255, 0.18) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 0%, transparent 75%);
  animation: gridDrift 30s linear infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes gridDrift {
  0% { background-position: 0 0; }
  100% { background-position: 32px 32px; }
}

/* Constellation canvas */
.constellation {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.hero .container { position: relative; z-index: 2; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--blue-soft);
  border: 1px solid rgba(58, 123, 255, 0.3);
  border-radius: 100px;
  font-size: 13px;
  color: var(--blue-bright);
  font-weight: 500;
  margin-bottom: 28px;
}
.hero-eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--blue-bright);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--blue-bright);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 10px var(--blue-bright); transform: scale(1); }
  50% { box-shadow: 0 0 20px var(--blue-bright); transform: scale(1.3); }
}

/* Rotating word */
.rotator {
  display: inline-block;
  position: relative;
  overflow: hidden;
  vertical-align: bottom;
  height: 1.05em;
  min-width: 6ch;
}
.rotator span {
  display: block;
  line-height: 1.05em;
  animation: rotateWords 12s infinite;
  background: linear-gradient(135deg, #3a7bff 0%, #6aa6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
@keyframes rotateWords {
  0%, 22% { transform: translateY(0); }
  25%, 47% { transform: translateY(-1.05em); }
  50%, 72% { transform: translateY(-2.10em); }
  75%, 97% { transform: translateY(-3.15em); }
  100% { transform: translateY(-4.20em); }
}

.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(40px, 7vw, 84px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin-bottom: 28px;
  max-width: 900px;
}
.hero h1 .accent {
  background: linear-gradient(90deg, #3a7bff 0%, #8ab8ff 25%, #3a7bff 50%, #8ab8ff 75%, #3a7bff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 6s linear infinite;
  position: relative;
  display: inline-block;
}
.hero h1 .accent::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--gradient);
  border-radius: 3px;
  transform-origin: left;
  animation: underlineGrow 1.6s cubic-bezier(0.65, 0, 0.35, 1) 0.4s both;
  opacity: 0.5;
}
@keyframes shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}
@keyframes underlineGrow {
  0% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

.hero p {
  font-size: clamp(16px, 1.5vw, 19px);
  color: var(--muted);
  max-width: 620px;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 30px rgba(58, 123, 255, 0.3);
}
.btn-primary:hover {
  background: var(--blue-bright);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(58, 123, 255, 0.4);
}
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-secondary:hover {
  border-color: var(--blue);
  color: var(--blue-bright);
}

/* ===== Section base ===== */
section {
  padding: 100px 0;
  position: relative;
}

.section-eyebrow {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-bright);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  max-width: 800px;
}

.section-intro {
  color: var(--muted);
  font-size: 17px;
  max-width: 640px;
  margin-bottom: 64px;
}

/* ===== Services ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 640px) {
  .services-grid { grid-template-columns: 1fr; }
}

.service-card {
  padding: 36px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: transform 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
  z-index: 2;
}
/* Cursor-tracking spotlight */
.service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    400px circle at var(--mx, 50%) var(--my, 50%),
    rgba(58, 123, 255, 0.18),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
}
.service-card > * { position: relative; z-index: 2; }
.service-card:hover {
  border-color: rgba(58, 123, 255, 0.4);
  transform: translateY(-6px);
}
.service-card:hover::before { transform: scaleX(1); }
.service-card:hover::after { opacity: 1; }

.service-num {
  position: absolute;
  top: 24px; right: 28px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.15em;
  z-index: 3;
}

.service-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: var(--blue-soft);
  border: 1px solid rgba(58, 123, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-bright);
  margin-bottom: 24px;
}

.service-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.service-card p {
  color: var(--muted);
  font-size: 15px;
}
.service-card ul {
  list-style: none;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.service-card li {
  color: var(--muted);
  font-size: 13px;
  padding: 4px 0;
  position: relative;
  padding-left: 18px;
}
.service-card li::before {
  content: '';
  position: absolute;
  left: 0; top: 11px;
  width: 6px; height: 6px;
  background: var(--blue);
  border-radius: 50%;
}

/* ===== About / Stats ===== */
.about {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: center;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.stat {
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 40px;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.about-text p {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 18px;
}
.about-text p strong { color: var(--text); font-weight: 600; }

/* ===== Process ===== */
.process-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  counter-reset: step;
}
.process-step {
  padding: 32px 28px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  counter-increment: step;
  position: relative;
}
.process-step::before {
  content: '0' counter(step);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue-bright);
  display: block;
  margin-bottom: 16px;
  letter-spacing: 0.1em;
}
.process-step h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  margin-bottom: 8px;
}
.process-step p {
  color: var(--muted);
  font-size: 14px;
}

/* ===== Contact ===== */
.contact {
  text-align: center;
}
.contact-card {
  background: linear-gradient(135deg, rgba(58, 123, 255, 0.10) 0%, rgba(58, 123, 255, 0.02) 100%);
  border: 1px solid rgba(58, 123, 255, 0.25);
  border-radius: 24px;
  padding: 80px 40px;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}
.contact-card::before {
  content: '';
  position: absolute;
  top: -50%; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(58, 123, 255, 0.15) 0%, transparent 70%);
  pointer-events: none;
}
.contact-card > * { position: relative; z-index: 1; }

.contact-card h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.contact-card p {
  color: var(--muted);
  font-size: 17px;
  max-width: 540px;
  margin: 0 auto 32px;
}

.contact-info {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.contact-info a {
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: color 0.2s ease;
}
.contact-info a:hover { color: var(--blue-bright); }

.contact-meta {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
}

/* ===== Footer ===== */
footer {
  padding: 40px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

/* ===== Reveal animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 820px) {
  .menu-toggle { display: block; }
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  section { padding: 72px 0; }
  .container { padding: 0 24px; }
  .contact-card { padding: 56px 24px; }

  nav .nav-links,
  nav .nav-cta {
    display: none;
  }

  nav.open {
    background: rgba(5, 6, 10, 0.96);
    border-bottom-color: var(--line);
  }
  .mobile-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(5, 6, 10, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 24px;
    flex-direction: column;
  }
  nav.open .mobile-panel {
    display: flex;
  }
  .mobile-panel a {
    color: var(--text);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 14px 8px;
    border-bottom: 1px solid var(--line);
  }
  .mobile-panel a:last-of-type {
    border-bottom: none;
  }
  .mobile-panel .nav-cta-mobile {
    margin-top: 16px;
    padding: 12px;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    font-size: 14px;
  }
}
