/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #09090b;
  --bg-raised: #131316;
  --bg-card: #18181b;
  --border: #27272a;
  --text: #fafafa;
  --text-muted: #a1a1aa;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --gradient: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
  --radius: 12px;
  --radius-lg: 20px;
}

html {
  scroll-behavior: smooth;
}

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

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

a {
  text-decoration: none;
  color: inherit;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(99, 102, 241, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.btn-sm {
  padding: 10px 24px;
  font-size: 0.875rem;
  border-radius: 8px;
  background: var(--accent);
  color: white;
}

.btn-sm:hover {
  background: var(--accent-light);
}

.btn-full {
  width: 100%;
}

/* ===== NAV ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(9, 9, 11, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

.nav.scrolled {
  border-bottom-color: var(--border);
}

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

.logo-binary {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a:not(.btn) {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:not(.btn):hover {
  color: var(--text);
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  padding: 180px 0 100px;
  text-align: center;
  overflow: hidden;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
}

.hero-inner {
  position: relative;
}

.hero-badge {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-light);
  border: 1px solid rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.08);
  margin-bottom: 32px;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.03em;
}

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

.hero-sub {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 80px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 64px;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== SECTIONS SHARED ===== */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-light);
  border: 1px solid rgba(99, 102, 241, 0.25);
  background: rgba(99, 102, 241, 0.06);
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 550px;
  margin: 0 auto;
}

/* ===== SERVICES ===== */
.services {
  padding: 120px 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  padding: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
}

.service-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 8px 40px rgba(99, 102, 241, 0.08);
}

.service-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--accent-glow);
  color: var(--accent-light);
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ===== RESULTS ===== */
.results {
  padding: 120px 0;
  background: var(--bg-raised);
}

.results-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.result-card {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 36px 48px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  flex-wrap: wrap;
}

.result-before-after {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
}

.result-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.result-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.25rem;
  font-weight: 600;
}

.result-val.muted {
  color: var(--text-muted);
}

.result-val.highlight {
  color: #34d399;
}

.result-arrow {
  color: var(--text-muted);
}

.result-desc {
  flex: 1;
  color: var(--text-muted);
  font-size: 0.9rem;
  min-width: 200px;
}

/* ===== ABOUT ===== */
.about {
  padding: 120px 0;
}

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

.about-content .section-tag {
  margin-bottom: 20px;
}

.about-content h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.about-content p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 16px;
  line-height: 1.7;
}

.about-features {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 32px;
}

.about-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
}

.about-feature svg {
  color: #34d399;
  flex-shrink: 0;
}

.about-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.binary-art {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 1.5;
  opacity: 0.06;
  user-select: none;
  letter-spacing: 0.1em;
  text-align: center;
}

/* ===== CONTACT ===== */
.contact {
  padding: 120px 0;
  background: var(--bg-raised);
}

.cta-box {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.cta-box h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.cta-box > p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 48px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--text-muted);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
}

.contact-form select {
  cursor: pointer;
  color: var(--text-muted);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23a1a1aa' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.contact-form select:valid {
  color: var(--text);
}

.contact-form textarea {
  resize: vertical;
  min-height: 100px;
}

.contact-form .btn {
  margin-top: 8px;
}

.contact-form .btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

.contact-form {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}

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

.form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 48px 0;
}

.success-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.form-success h3 {
  font-size: 1.5rem;
  font-weight: 700;
}

.form-success p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* ===== FOOTER ===== */
.footer {
  padding: 48px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 4px;
}

.footer-links {
  display: flex;
  gap: 28px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-visual {
    display: none;
  }

  .result-card {
    flex-direction: column;
    text-align: center;
    padding: 32px;
    gap: 16px;
  }

  .result-before-after {
    min-width: auto;
  }

  .result-arrow {
    transform: rotate(90deg);
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    z-index: 99;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: 1.2rem;
  }

  .mobile-toggle {
    display: flex;
    z-index: 101;
  }

  .mobile-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .mobile-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .mobile-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

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

  .hero-stats {
    gap: 32px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 140px 0 80px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}
