/* ============================================
   Lex Tec — Landing Page Styles
   ============================================ */

/* RESET */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: 'Inter', sans-serif;
  background: #09090b;
  color: #e4e4e7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ACCESSIBILITY */
.skip-to-main {
  position: absolute;
  top: -40px;
  left: 0;
  background: #8b5cf6;
  color: #fff;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 10000;
  font-weight: 600;
  border-radius: 0 0 8px 0;
}
.skip-to-main:focus {
  top: 0;
}

/* FOCUS STYLES */
a:focus-visible, button:focus-visible {
  outline: 3px solid #8b5cf6;
  outline-offset: 3px;
}

/* PREFERS REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* NAV */
nav {
  position: fixed; top: 0; width: 100%; z-index: 100;
  padding: 20px 40px;
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(9,9,11,.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(139,92,246,.1);
  transition: all .3s;
}
.logo {
  font-size: 1.5rem; font-weight: 800;
  background: linear-gradient(135deg, #8b5cf6, #06b6d4);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; color: transparent;
  letter-spacing: -0.5px; text-decoration: none;
  transition: opacity .3s;
}
.logo:hover { opacity: .85; }
.logo span { font-weight: 400; opacity: .7; }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a {
  color: #a1a1aa; text-decoration: none; font-size: .9rem; font-weight: 500;
  transition: color .3s; position: relative; cursor: pointer;
}
.nav-links a:hover { color: #e4e4e7; }
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px;
  background: linear-gradient(90deg, #8b5cf6, #06b6d4);
  transition: width .3s;
}
.nav-links a:hover::after { width: 100%; }
.nav-cta {
  padding: 10px 24px; border: none; border-radius: 50px; cursor: pointer;
  font-family: inherit; font-size: .9rem; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  transition: all .3s; box-shadow: 0 0 20px rgba(139,92,246,.3);
  text-decoration: none; display: inline-block; line-height: 1.4;
  will-change: transform;
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 0 30px rgba(139,92,246,.5); }
.nav-cta:active { transform: translateY(0); }

/* HERO */
.hero {
  min-height: 100vh;
  height: 100vh; /* Prevents CLS by setting explicit height */
  display: flex; align-items: center; justify-content: center;
  position: relative; padding: 120px 40px 80px; text-align: center;
}
.hero-bg {
  position: absolute; inset: 0; overflow: hidden; z-index: 0;
}
.hero-bg .orb {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: .35;
  animation: float 8s ease-in-out infinite;
}
.orb-1 { width: 500px; height: 500px; background: #8b5cf6; top: -10%; left: -5%; animation-delay: 0s; }
.orb-2 { width: 400px; height: 400px; background: #06b6d4; bottom: -10%; right: -5%; animation-delay: 2s; }
.orb-3 { width: 300px; height: 300px; background: #a855f7; top: 40%; left: 50%; animation-delay: 4s; }
@keyframes float {
  0%,100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(30px,-20px) scale(1.05); }
  66% { transform: translate(-20px,20px) scale(.95); }
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(139,92,246,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139,92,246,.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}
.hero-content { position: relative; z-index: 1; max-width: 800px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 20px; border-radius: 50px; font-size: .85rem; font-weight: 500;
  background: rgba(139,92,246,.1); border: 1px solid rgba(139,92,246,.2);
  color: #c4b5fd; margin-bottom: 32px;
  animation: fadeInUp .8s ease;
}
.badge-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #8b5cf6;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(.8); } }
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 900; line-height: 1.1;
  letter-spacing: -2px; margin-bottom: 24px;
  animation: fadeInUp .8s ease .1s both;
}
.gradient {
  background: linear-gradient(135deg, #8b5cf6, #06b6d4, #8b5cf6);
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; color: transparent;
  animation: shimmer 3s linear infinite;
}
@keyframes shimmer { 0% { background-position: 0% center; } 100% { background-position: 200% center; } }
.hero p {
  font-size: 1.2rem; color: #a1a1aa; line-height: 1.7; max-width: 600px; margin: 0 auto 40px;
  animation: fadeInUp .8s ease .2s both;
}
.hero-buttons {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
  animation: fadeInUp .8s ease .3s both;
}
.btn-primary {
  padding: 16px 36px; border: none; border-radius: 50px; cursor: pointer;
  font-family: inherit; font-size: 1rem; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  transition: all .3s; box-shadow: 0 4px 30px rgba(139,92,246,.4);
  text-decoration: none; display: inline-block; line-height: 1.4;
  will-change: transform;
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 40px rgba(139,92,246,.6); }
.btn-primary:active { transform: translateY(-1px); }
.btn-secondary {
  padding: 16px 36px; border-radius: 50px; cursor: pointer;
  font-family: inherit; font-size: 1rem; font-weight: 600; color: #e4e4e7;
  background: transparent; border: 1px solid rgba(139,92,246,.3);
  transition: all .3s; text-decoration: none; display: inline-block; line-height: 1.4;
  will-change: transform;
}
.btn-secondary:hover { border-color: #8b5cf6; background: rgba(139,92,246,.1); transform: translateY(-3px); }
.btn-secondary:active { transform: translateY(-1px); }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* SECTION SHARED */
section { padding: 120px 40px; position: relative; }
.section-label {
  font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 3px;
  color: #8b5cf6; margin-bottom: 16px;
}
.section-title {
  font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -1px; margin-bottom: 20px;
}
.section-desc { color: #a1a1aa; font-size: 1.1rem; line-height: 1.7; max-width: 600px; }
.section-header { text-align: center; max-width: 700px; margin: 0 auto 64px; }
.section-header .section-desc { margin: 0 auto; }

/* SERVICES */
.services { background: #09090b; }
.services-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px; max-width: 1100px; margin: 0 auto;
}
.service-card {
  padding: 40px 32px; border-radius: 20px;
  background: rgba(24,24,27,.6);
  border: 1px solid rgba(139,92,246,.08);
  transition: all .4s; position: relative; overflow: hidden;
  will-change: transform;
}
.service-card:hover {
  border-color: rgba(139,92,246,.3);
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(139,92,246,.1);
}
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, #8b5cf6, #06b6d4, transparent);
  opacity: 0; transition: opacity .4s;
}
.service-card:hover::before { opacity: 1; }
.service-icon {
  width: 56px; height: 56px; min-width: 56px; min-height: 56px; /* Prevents CLS */
  border-radius: 16px; display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; margin-bottom: 24px;
  background: linear-gradient(135deg, rgba(139,92,246,.15), rgba(6,182,212,.1));
  border: 1px solid rgba(139,92,246,.15);
}
.service-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 12px; color: #f4f4f5; }
.service-card p { color: #a1a1aa; line-height: 1.7; font-size: .95rem; }

/* TECH */
.tech { background: #0c0c0f; }
.tech-grid {
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: center;
  max-width: 900px; margin: 0 auto;
}
.tech-tag {
  padding: 14px 28px; border-radius: 50px;
  background: rgba(24,24,27,.8); border: 1px solid rgba(139,92,246,.1);
  font-size: .95rem; font-weight: 500; color: #c4b5fd;
  transition: all .3s; cursor: default;
  will-change: transform;
}
.tech-tag:hover {
  border-color: rgba(139,92,246,.4);
  background: rgba(139,92,246,.1);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(139,92,246,.15);
}

/* PORTFOLIO */
.portfolio { background: #09090b; }
.portfolio-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px; max-width: 1100px; margin: 0 auto;
}
.project-card {
  border-radius: 20px; overflow: hidden;
  background: rgba(24,24,27,.6); border: 1px solid rgba(139,92,246,.08);
  transition: all .4s;
  will-change: transform;
}
.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(139,92,246,.25);
  box-shadow: 0 20px 60px rgba(139,92,246,.1);
}
.project-thumb {
  height: 200px; min-height: 200px; /* Prevents CLS */
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.project-thumb .overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; font-weight: 900; color: rgba(255,255,255,.08);
  letter-spacing: -2px;
}
.pt-1 { background: linear-gradient(135deg, #1e1b4b, #312e81); }
.pt-2 { background: linear-gradient(135deg, #0c4a6e, #164e63); }
.pt-3 { background: linear-gradient(135deg, #3b0764, #581c87); }
.project-info { padding: 28px; }
.project-info h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.project-info p { color: #a1a1aa; font-size: .9rem; line-height: 1.6; }
.project-tags { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.project-tags span {
  padding: 6px 14px; border-radius: 50px; font-size: .75rem; font-weight: 500;
  background: rgba(139,92,246,.1); color: #c4b5fd;
}

/* STATS */
.stats-bar {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px; max-width: 1000px; margin: 0 auto; padding: 80px 40px;
  text-align: center;
}
.stat-item .stat-value {
  font-size: 3rem; font-weight: 900; letter-spacing: -2px;
  background: linear-gradient(135deg, #8b5cf6, #06b6d4);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; color: transparent;
}
.stat-item .stat-label { color: #71717a; font-size: .95rem; margin-top: 8px; font-weight: 500; }

/* CTA */
.cta {
  text-align: center; padding: 120px 40px;
  background: linear-gradient(180deg, #09090b 0%, #0f0a1a 50%, #09090b 100%);
  position: relative;
}
.cta-glow {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,.12), transparent 70%);
  pointer-events: none;
}
.cta h2 {
  font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 900; letter-spacing: -1.5px;
  margin-bottom: 20px; position: relative;
}
.cta p { color: #a1a1aa; font-size: 1.15rem; line-height: 1.7; max-width: 550px; margin: 0 auto 40px; position: relative; }
.cta .btn-primary { position: relative; }

/* FOOTER */
footer {
  padding: 40px; text-align: center;
  border-top: 1px solid rgba(139,92,246,.08);
  color: #52525b; font-size: .85rem;
}
footer a { color: #8b5cf6; text-decoration: none; }

/* FAQ */
.faq { background: #0c0c0f; }
.faq-list {
  max-width: 800px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 16px;
}
.faq-item {
  border-radius: 16px;
  background: rgba(24,24,27,.6);
  border: 1px solid rgba(139,92,246,.08);
  transition: border-color .3s;
  overflow: hidden;
}
.faq-item[open] {
  border-color: rgba(139,92,246,.25);
}
.faq-question {
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px 28px; cursor: pointer;
  font-size: 1.05rem; font-weight: 600; color: #f4f4f5;
  list-style: none; /* remove default marker */
  transition: color .3s;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::marker { display: none; content: ''; }
.faq-question:hover { color: #c4b5fd; }
.faq-icon {
  position: relative; flex-shrink: 0;
  width: 24px; height: 24px; margin-left: 16px;
}
.faq-icon::before,
.faq-icon::after {
  content: ''; position: absolute;
  background: #8b5cf6; border-radius: 2px;
  transition: transform .3s ease;
}
.faq-icon::before {
  width: 2px; height: 16px;
  top: 4px; left: 11px;
}
.faq-icon::after {
  width: 16px; height: 2px;
  top: 11px; left: 4px;
}
.faq-item[open] .faq-icon::before {
  transform: rotate(90deg);
}
.faq-answer {
  padding: 0 28px 24px;
}
.faq-answer p {
  color: #a1a1aa; font-size: .95rem; line-height: 1.8;
}

/* IMAGE OPTIMIZATION - Aspect Ratio Boxes for Future Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Lazy loading skeleton (for future use) */
.img-loading {
  background: linear-gradient(90deg, rgba(24,24,27,.8) 25%, rgba(139,92,246,.1) 50%, rgba(24,24,27,.8) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* MOBILE */
@media (max-width: 768px) {
  nav { padding: 16px 20px; }
  .nav-links { display: none; }
  .nav-cta { padding: 8px 20px; font-size: .85rem; }
  section { padding: 80px 20px; }
  .hero { height: auto; min-height: 100vh; padding: 100px 20px 60px; }
  .hero h1 { font-size: 2.5rem; }
  .hero p { font-size: 1rem; }
  .services-grid, .portfolio-grid { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); gap: 24px; padding: 60px 20px; }
  .stat-item .stat-value { font-size: 2.5rem; }
  .cta h2 { font-size: 2rem; }
  .btn-primary, .btn-secondary { padding: 14px 28px; font-size: .95rem; }

  /* Disable hover effects on mobile */
  .service-card:hover,
  .project-card:hover,
  .tech-tag:hover {
    transform: none;
  }
}

/* SCROLL ANIMATIONS */
.reveal {
  opacity: 0; transform: translateY(40px);
  transition: all .8s cubic-bezier(.16, 1, .3, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* PRINT STYLES */
@media print {
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  .hero-bg,
  .orb,
  .hero-grid,
  .cta-glow,
  .badge-dot,
  nav,
  .skip-to-main {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }

  h1, h2, h3 {
    page-break-after: avoid;
  }

  img {
    max-width: 100% !important;
  }

  @page {
    margin: 2cm;
  }
}
