/* Offset for fixed header when scrolling to anchors */
section[id],
.portfolio-item[id] {
  scroll-margin-top: 100px;
}

/* Kill heavy background animations that overheat the GPU */
.galaxy-bg, .milky-way, .nebula, .shooting-star,
.hero-stars, .floating-element, .cosmic-particles,
.nebula-bg, .dust-particle, .hero-circle, .hero-line,
.cosmic-dust, .twinkling-star, .ufo, .hero-decoration {
  display: none !important;
}

/* Logo — gradient text matching homepage */
.logo, .footer-logo {
  display: flex;
  align-items: center;
  font-size: 1.8rem;
  font-weight: 700;
  position: relative;
  flex-direction: row;
}
.logo::after, .footer-logo::after {
  display: none; /* kill the underline bar from style.min.css */
}
.logo-text {
  letter-spacing: 1px;
  margin-right: 3px;
  display: flex;
  flex-direction: row;
}
.logo-elv {
  font-weight: 800;
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.5px;
}
.logo-ifi {
  font-weight: 600;
  background: linear-gradient(135deg, #9f7aea, #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.5px;
}
.logo-icon {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  color: #60a5fa;
  font-size: 18px;
  margin-left: 3px;
  position: relative;
  background: none;
  border-radius: 0;
  box-shadow: none;
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
}
.footer-logo {
  margin-bottom: 1rem;
}

/* Shared styles — matching main site visual DNA */

/* Page hero — mirroring homepage hero style */
.page-hero {
  padding: 8rem 2rem 4.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(128, 90, 213, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin: 0 0 1rem;
  max-width: 850px;
  margin-left: auto;
  margin-right: auto;
  background: linear-gradient(135deg, #60a5fa, #818cf8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.03em;
  line-height: 1.15;
  position: relative;
}
.page-hero .page-subtitle {
  font-size: 1.2rem;
  color: #a0aec0;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
  position: relative;
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.01em;
}

/* Prose content — articles, case studies, service pages */
.prose {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 2rem 4rem;
  line-height: 1.8;
  color: #e2e8f0;
}
.prose h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 3.5rem 0 1rem;
  color: #fff;
  position: relative;
  padding-bottom: 0.75rem;
}
.prose h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color, #9f7aea), transparent);
  border-radius: 2px;
}
.prose h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 2.5rem 0 0.75rem;
  color: #f1f5f9;
}
.prose p {
  margin: 0 0 1.25rem;
  color: #cbd5e1;
  font-size: 1.05rem;
}
.prose a {
  color: #9f7aea;
  text-decoration: none;
  transition: color 0.2s ease;
}
.prose a:hover {
  color: #d6bcfa;
}
.prose strong {
  color: #fff;
  font-weight: 600;
}
.prose ul, .prose ol {
  margin: 0 0 1.5rem;
  padding-left: 1.5rem;
  color: #cbd5e1;
}
.prose li {
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 2rem 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.prose blockquote {
  border-left: 3px solid #9f7aea;
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  background: rgba(159, 122, 234, 0.06);
  border-radius: 0 0.75rem 0.75rem 0;
  color: #d6bcfa;
  font-style: italic;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Tech stack badges — pill style matching homepage tags */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 2rem;
}
.tech-badge {
  background: rgba(159, 122, 234, 0.1);
  color: #d6bcfa;
  padding: 0.35rem 0.85rem;
  border-radius: 2rem;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid rgba(159, 122, 234, 0.15);
  transition: all 0.2s ease;
}
.tech-badge:hover {
  background: rgba(159, 122, 234, 0.2);
  border-color: rgba(159, 122, 234, 0.3);
}

/* Stats grid — card style matching homepage benefit cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}
.stat-card {
  text-align: center;
  padding: 1.75rem 1rem;
  background: rgba(21, 21, 49, 0.6);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 40px;
  background: var(--accent-color, #805ad5);
  border-radius: 0 0 4px;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.3), 0 0 15px rgba(128, 90, 213, 0.15);
}
.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: #9f7aea;
  display: block;
  letter-spacing: -0.02em;
  text-shadow: 0 0 20px rgba(159, 122, 234, 0.3);
}
.stat-label {
  font-size: 0.85rem;
  color: #a0aec0;
  margin-top: 0.25rem;
}

/* FAQ accordion — matching homepage card style */
.faq-section {
  margin: 2.5rem 0;
  background: rgba(21, 21, 49, 0.4);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.5rem 1.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}
.faq-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.faq-item:last-child {
  border-bottom: none;
}
.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1.25rem 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #f1f5f9;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: inherit;
  transition: color 0.2s ease;
}
.faq-question:hover {
  color: #9f7aea;
}
.faq-question::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: #9f7aea;
  flex-shrink: 0;
  margin-left: 1rem;
  transition: transform 0.2s ease;
}
.faq-item.open .faq-question::after {
  content: '\2212';
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-answer p {
  padding: 0 0 1.25rem;
  color: #a0aec0;
  line-height: 1.7;
}
.faq-answer a {
  color: #9f7aea;
}
.faq-item.open .faq-answer {
  max-height: 600px;
}

/* CTA banner — matching homepage gradient style */
.page-cta {
  background: linear-gradient(135deg, #121224, #1b1b42);
  border-top: 1px solid rgba(159, 122, 234, 0.1);
  color: #fff;
  text-align: center;
  padding: 6rem 2rem;
  position: relative;
  overflow: hidden;
}
.page-cta::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(128, 90, 213, 0.08) 0%, transparent 70%);
  pointer-events: none;
}
.page-cta h2 {
  font-size: 2rem;
  margin: 0 0 1rem;
  font-weight: 700;
  position: relative;
}
.page-cta p {
  color: #cbd5e1;
  margin: 0 0 2rem;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.1rem;
  line-height: 1.6;
  position: relative;
}
.page-cta .cta-button {
  display: inline-block;
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: #fff;
  padding: 1rem 2.25rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(128, 90, 213, 0.3);
  position: relative;
  overflow: hidden;
}
.page-cta .cta-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(214, 188, 250, 0.2), transparent);
  transition: all 0.8s;
  z-index: -1;
}
.page-cta .cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(128, 90, 213, 0.5);
}
.page-cta .cta-button:hover::before {
  left: 100%;
}

/* Case study image gallery */
.case-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}
.case-gallery img {
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.3);
}
.case-gallery img:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(128, 90, 213, 0.15);
}

/* Nav layout - spread items across the bar */
.nav-container {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 0 2rem;
}
.nav-links {
  display: flex !important;
  align-items: center !important;
  flex: 1 !important;
  justify-content: space-evenly !important;
  margin-left: 3rem;
}

/* Nav dropdown menus */
.nav-dropdown {
  position: relative;
}
.nav-dropdown > a,
.nav-dropdown-label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.nav-dropdown-label {
  cursor: default;
  color: #cbd5e1;
  font-size: inherit;
  font-family: inherit;
  user-select: none;
}
.nav-chevron {
  font-size: 0.55rem;
  opacity: 0.6;
  transition: transform 0.2s ease;
}
.nav-dropdown:hover .nav-chevron {
  transform: rotate(180deg);
}
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  background: #151531;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  z-index: 1000;
}
.nav-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -0.5rem;
  left: 0;
  right: 0;
  height: 0.5rem;
}
.nav-dropdown-menu a {
  display: block;
  padding: 0.6rem 1.25rem;
  color: #cbd5e1;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-dropdown-menu a:hover {
  background: rgba(159, 122, 234, 0.1);
  color: #d6bcfa;
}
.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}

/* Portfolio showcase — project cards */
.portfolio-showcase {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 4rem;
}
.portfolio-item {
  background: rgba(21, 21, 49, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.portfolio-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 20px rgba(128, 90, 213, 0.1);
}
.portfolio-image {
  width: 100%;
  overflow: hidden;
}
.portfolio-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}
.portfolio-item:hover .portfolio-image img {
  transform: scale(1.02);
}
.portfolio-info {
  padding: 2rem 2.5rem 2.5rem;
}
.portfolio-info h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 1rem;
}
.portfolio-info p {
  color: #a0aec0;
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0 0 1.5rem;
}
.portfolio-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #9f7aea;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border: 1px solid rgba(159, 122, 234, 0.3);
  border-radius: 50px;
  transition: all 0.3s ease;
  background: rgba(159, 122, 234, 0.05);
}
.portfolio-link:hover {
  background: rgba(159, 122, 234, 0.15);
  border-color: rgba(159, 122, 234, 0.5);
  color: #d6bcfa;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(128, 90, 213, 0.2);
}
.portfolio-link i {
  font-size: 0.8rem;
}

/* Tech stack alignment in prose context */
.prose .tech-stack {
  justify-content: flex-start;
}

/* Consistent section spacing across all pages */
.benefits-section,
.process-section,
.pricing-section,
.testimonials-section,
.contact-section {
  padding: 4rem 2rem;
}

/* Homepage section spacing — more breathing room between major sections */
.services-section,
.portfolio-section,
.testimonials-section,
.contact-section {
  padding-top: 6rem;
  padding-bottom: 6rem;
}
.portfolio-section {
  padding-bottom: 4rem;
}

/* Responsive */
@media (max-width: 768px) {
  .benefits-section,
  .process-section,
  .pricing-section,
  .testimonials-section,
  .contact-section {
    padding: 3rem 1.25rem;
  }
  .services-section,
  .portfolio-section,
  .testimonials-section,
  .contact-section {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
  .page-hero {
    padding: 5rem 1.25rem 2rem;
  }
  .prose {
    padding: 1.5rem 1.25rem 3rem;
  }
  .prose h2 {
    font-size: 1.4rem;
  }
  .prose p, .prose li {
    font-size: 1rem;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-cta {
    padding: 4rem 1.25rem;
  }
  .portfolio-showcase {
    padding: 0 1.25rem 3rem;
    gap: 3rem;
  }
  .portfolio-info {
    padding: 1.5rem 1.5rem 2rem;
  }
  .faq-section {
    padding: 0.5rem 1rem;
  }
  /* Flatten dropdown menus into mobile hamburger menu */
  .nav-dropdown {
    position: static;
  }
  .nav-chevron {
    display: none;
  }
  .nav-dropdown-menu {
    display: block;
    position: static;
    transform: none;
    min-width: 0;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }
  .nav-dropdown-menu a {
    padding: 0.5rem 1rem 0.5rem 1.5rem;
    font-size: 0.85rem;
    color: #a0aec0;
  }
}

@media (max-width: 480px) {
  .page-hero h1 {
    font-size: 1.5rem;
  }
  .stats-grid {
    gap: 0.75rem;
  }
  .stat-card {
    padding: 1.25rem 0.75rem;
  }
  .stat-number {
    font-size: 1.6rem;
  }
}
