/* === VARIABLES === */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a25;
  --text-primary: #f5f5f7;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.4);
  --accent-secondary: #10b981;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --gradient-1: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --gradient-2: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
  --font-display: 'Syne', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --font-body: 'Inter', sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* === GRAIN OVERLAY === */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* === NAVIGATION === */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.25rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s var(--ease-out);
  letter-spacing: 0.01em;
}

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

.nav-cta {
  padding: 0.6rem 1.25rem !important;
  background: var(--gradient-1);
  color: white !important;
  border-radius: 6px;
  font-weight: 500 !important;
}

.nav-cta:hover {
  opacity: 0.9;
}

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

.nav-mobile-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s var(--ease-out);
}

/* === HERO SECTION === */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 8rem 5rem 5rem;
  gap: 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 80%;
  height: 150%;
  background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 60%);
  opacity: 0.15;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s var(--ease-out) 0.1s both;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-secondary);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.1); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.title-line {
  display: block;
  animation: fadeInUp 0.8s var(--ease-out) both;
}

.title-line:nth-child(1) { animation-delay: 0.2s; }
.title-line:nth-child(2) { animation-delay: 0.3s; }

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

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
  animation: fadeInUp 0.8s var(--ease-out) 0.4s both;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
  animation: fadeInUp 0.8s var(--ease-out) 0.5s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.75rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s var(--ease-out);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--gradient-1);
  color: white;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-hover);
}

.btn-large {
  padding: 1.1rem 2.25rem;
  font-size: 1.05rem;
}

.hero-proof {
  display: flex;
  align-items: center;
  gap: 2rem;
  animation: fadeInUp 0.8s var(--ease-out) 0.6s both;
}

.proof-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.proof-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--accent);
}

.proof-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.proof-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

.proof-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* Hero Visual */
.hero-visual {
  position: relative;
  height: 500px;
  animation: fadeIn 1s var(--ease-out) 0.5s both;
}

.visual-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 1rem;
  transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
}

.grid-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

.grid-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(59, 130, 246, 0.05) 100%);
}

.gi-1 { animation: floatIn 0.8s var(--ease-out) 0.7s both; }
.gi-2 { animation: floatIn 0.8s var(--ease-out) 0.8s both; }
.gi-3 { animation: floatIn 0.8s var(--ease-out) 0.9s both; }
.gi-4 { animation: floatIn 0.8s var(--ease-out) 1s both; }

@keyframes floatIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.visual-orb {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200px;
  height: 200px;
  background: var(--gradient-1);
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
  transform: translate(-50%, -50%);
  animation: orbPulse 4s var(--ease-in-out) infinite;
}

@keyframes orbPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.4; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.6; }
}

/* === SERVICES SECTION === */
.services {
  padding: 8rem 5rem;
  background: var(--bg-secondary);
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.service-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-1);
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}

.service-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.service-card:hover::before {
  opacity: 1;
}

.service-featured {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.service-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 1.5rem;
  color: var(--accent);
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.service-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.service-features {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.service-features li {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.4rem 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
}

/* === ABOUT SECTION === */
.about {
  padding: 8rem 5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

.about-content .section-title {
  text-align: left;
  margin-bottom: 2rem;
}

.about-text {
  margin-bottom: 3rem;
}

.about-text .lead {
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.about-stats {
  display: flex;
  gap: 3rem;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

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

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  max-width: 400px;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.6rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  transition: all 0.3s var(--ease-out);
}

.tech-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* === PROCESS SECTION === */
.process {
  padding: 8rem 5rem;
  background: var(--bg-secondary);
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.step {
  padding: 2rem;
  position: relative;
}

.step::after {
  content: '';
  position: absolute;
  top: 2rem;
  right: -1rem;
  width: 2rem;
  height: 2px;
  background: var(--border);
}

.step:last-child::after {
  display: none;
}

.step-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.5;
  margin-bottom: 1rem;
}

.step h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.step p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* === CONTACT SECTION === */
.contact {
  padding: 8rem 5rem;
  text-align: center;
}

.contact-content {
  max-width: 600px;
  margin: 0 auto;
}

.contact-content .section-title {
  margin-bottom: 1.5rem;
}

.contact-text {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.contact-methods {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s var(--ease-out);
}

.contact-method:hover {
  color: var(--accent);
}

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

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

.footer-logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s var(--ease-out);
}

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

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

/* === ANIMATIONS === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 7rem 3rem 4rem;
  }
  
  .hero-visual {
    display: none;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .service-featured {
    grid-column: span 1;
    grid-template-columns: 1fr;
  }
  
  .about {
    grid-template-columns: 1fr;
    padding: 5rem 3rem;
    gap: 3rem;
  }
  
  .process-steps {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .step::after {
    display: none;
  }
}

@media (max-width: 768px) {
  .nav {
    padding: 1rem 1.5rem;
  }
  
  .nav-links {
    display: none;
  }
  
  .nav-mobile-toggle {
    display: flex;
  }
  
  .hero {
    padding: 6rem 1.5rem 3rem;
  }
  
  .hero-proof {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .proof-divider {
    display: none;
  }
  
  .hero-ctas {
    flex-direction: column;
  }
  
  .services, .about, .process, .contact {
    padding: 4rem 1.5rem;
  }
  
  .process-steps {
    grid-template-columns: 1fr;
  }
  
  .about-stats {
    flex-wrap: wrap;
    gap: 2rem;
  }
  
  .contact-methods {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  
  .footer {
    padding: 2rem 1.5rem;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
}
