@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600&display=swap");

:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --secondary: #0ea5e9;
  --accent: #8b5cf6;
  --dark: #0f172a;
  --dark-light: #1e293b;
  --light: #f8fafc;
  --white: #ffffff;
  --text-main: #334155;
  --text-light: #64748b;
  --surface: #ffffff;
  --bg: #f8fafc;

  --font-heading: "Outfit", sans-serif;
  --font-body: "Inter", sans-serif;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-lg:
    0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-xl:
    0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 10px 25px -5px rgba(79, 70, 229, 0.4);

  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html,
body {
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background: var(--bg);
  line-height: 1.7;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--dark);
  font-weight: 700;
  line-height: 1.2;
}
p {
  color: var(--text-light);
}
a {
  text-decoration: none;
  transition: var(--transition);
}
section {
  padding: 40px 0;
  position: relative;
}

.section-title {
  text-align: center;
  margin-bottom: 20px;
}
.section-title h2 {
  font-size: 2.75rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--dark), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section-title p {
  font-size: 1.125rem;
  max-width: 650px;
  margin: 0 auto;
}

/* Buttons */
.btn-primary-custom {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  border: none;
  box-shadow: var(--shadow-glow);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.btn-primary-custom:hover {
  transform: translateY(-3px);
  color: var(--white);
  box-shadow: 0 15px 30px -5px rgba(79, 70, 229, 0.5);
}
.btn-outline-custom {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 600;
  transition: var(--transition);
}
.btn-outline-custom:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-3px);
}

/* Navbar */
.navbar {
  padding: 20px 0;
  transition: var(--transition);
  background: transparent;
}
.navbar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  box-shadow: none;
  z-index: -1;
  transition: var(--transition);
}
.navbar.scrolled {
  padding: 15px 0;
}
.navbar.scrolled::before {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}
.navbar-brand {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.75rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: var(--transition);
}

.nav-link {
  font-weight: 500;
  color: var(--text-main) !important;
  margin: 0 12px;
  position: relative;
  transition: var(--transition);
}

/* Ensure text is white against the dark hero on desktop when not scrolled */
.navbar:not(.scrolled) .navbar-brand {
  background: none;
  color: var(--white) !important;
  -webkit-text-fill-color: var(--white);
}
.navbar:not(.scrolled) .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.5);
}
.navbar:not(.scrolled) .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

@media (min-width: 992px) {
  .navbar:not(.scrolled) .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
  }
  .navbar:not(.scrolled) .nav-link:hover,
  .navbar:not(.scrolled) .nav-link.active {
    color: var(--white) !important;
  }
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: var(--transition);
  border-radius: 2px;
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}
.nav-link:hover,
.nav-link.active {
  color: var(--primary) !important;
}
.offcanvas {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
}
.offcanvas-body .nav-link {
  width: max-content;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background-color: var(--dark);
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.8)),
    url("https://images.unsplash.com/photo-1555066931-4365d14bab8c?q=80&w=2070&auto=format&fit=crop");
  background-size: cover;
  background-position: center;
  overflow: hidden;
  padding-top: 100px;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at center,
    transparent 0%,
    rgba(15, 23, 42, 0.9) 100%
  );
  pointer-events: none;
  z-index: 0;
}
.hero .container {
  position: relative;
  z-index: 2;
}
.hero h1 {
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: -1.5px;
}
.hero h1 span {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
}

/* About */
.about-section {
  background: var(--surface);
}
.about-image {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.about-image img {
  width: 100%;
  transition: transform 0.7s ease;
}
.about-image:hover img {
  transform: scale(1.05);
}
.mission-vision-card {
  background: var(--light);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  display: flex;
  gap: 15px;
  transition: var(--transition);
  border: 1px solid transparent;
  margin-bottom: 1rem;
}
.mission-vision-card:hover {
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  border-color: rgba(79, 70, 229, 0.1);
  transform: translateY(-5px);
}
.mv-icon {
  font-size: 2rem;
  color: var(--primary);
  background: rgba(79, 70, 229, 0.1);
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

/* Services */
.services-section {
  background: linear-gradient(180deg, var(--light) 0%, var(--surface) 100%);
}
.service-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  height: 100%;
  transition: var(--transition);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: hidden;
  z-index: 1;
  text-align: center;
}
.service-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(79, 70, 229, 0.03),
    rgba(14, 165, 233, 0.03)
  );
  z-index: -1;
  opacity: 0;
  transition: var(--transition);
}
.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(79, 70, 229, 0.1);
}
.service-card:hover::after {
  opacity: 1;
}
.service-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(
    135deg,
    rgba(79, 70, 229, 0.1),
    rgba(139, 92, 246, 0.1)
  );
  color: var(--primary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.5rem;
  transition: var(--transition);
}
.service-card:hover .service-icon {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--white);
  transform: scale(1.1) rotate(5deg);
  box-shadow: var(--shadow-glow);
}

/* Technologies */
.tech-section {
  background-color: var(--dark);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.tech-section .section-title h2 {
  color: var(--white);
  background: none;
  -webkit-text-fill-color: initial;
}
.tech-section .section-title p {
  color: rgba(255, 255, 255, 0.7);
}
.marquee-wrapper {
  overflow: hidden;
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
}
.marquee-wrapper::before,
.marquee-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  width: 15%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}
.marquee-wrapper::before {
  left: 0;
  background: linear-gradient(to right, var(--dark) 0%, transparent 100%);
}
.marquee-wrapper::after {
  right: 0;
  background: linear-gradient(to left, var(--dark) 0%, transparent 100%);
}
.marquee-content {
  display: flex;
  gap: 1.5rem;
  padding-left: 1.5rem; /* Space between loops */
  animation: scroll 20s linear infinite;
  width: max-content;
}
.marquee-wrapper:hover .marquee-content {
  animation-play-state: paused;
}
@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-50% - 0.75rem));
  }
}
.tech-item {
  min-width: 160px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.tech-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.tech-item i {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  transition: var(--transition);
}
.tech-item:hover i {
  transform: scale(1.2);
}

/* Projects */
.projects-section {
  background-color: var(--light);
}
.project-wrap {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--surface);
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.03);
}
.project-img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
}
.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.project-wrap:hover .project-img img {
  transform: scale(1.1);
}
.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to top,
    rgba(15, 23, 42, 0.9),
    rgba(15, 23, 42, 0.1)
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  opacity: 0;
  transition: var(--transition);
}
.project-wrap:hover .project-overlay {
  opacity: 1;
}
.project-info {
  transform: translateY(20px);
  transition: transform 0.4s ease;
}
.project-wrap:hover .project-info {
  transform: translateY(0);
}
.project-info h3 {
  color: var(--white);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.project-info p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.5rem;
}

/* Timeline Process */
.process-section {
  background-color: var(--surface);
}
.process-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem;
  position: relative;
  margin-top: 3rem;
}
.process-step {
  text-align: center;
  position: relative;
}
@media (min-width: 768px) {
  .process-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 40px;
    right: -50%;
    width: 100%;
    height: 3px;
    background: linear-gradient(
      90deg,
      var(--primary) 0%,
      rgba(79, 70, 229, 0.1) 100%
    );
    z-index: 0;
  }
}
.step-number {
  width: 80px;
  height: 80px;
  background: var(--surface);
  border: 3px solid var(--light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--primary);
  margin: 0 auto 1.5rem;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}
.process-step:hover .step-number {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  border-color: transparent;
  transform: scale(1.1);
  box-shadow: var(--shadow-glow);
}
.process-step h4 {
  font-size: 1.25rem;
}

/* CTA */
.cta-box {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-xl);
  padding: 5rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  margin-top: 2rem;
}
.cta-box::before,
.cta-box::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}
.cta-box::before {
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
}
.cta-box::after {
  bottom: -50%;
  left: -20%;
  width: 300px;
  height: 300px;
}
.cta-box h2,
.cta-box p {
  color: var(--white);
  position: relative;
  z-index: 1;
}
.cta-box h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
}
.btn-white {
  background: var(--white);
  color: var(--primary);
  padding: 15px 40px;
  border-radius: 50px;
  font-weight: 700;
  transition: var(--transition);
  position: relative;
  z-index: 1;
  display: inline-block;
}
.btn-white:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.2);
  color: var(--primary-hover);
}

/* Contact */
.contact-section {
  background-color: var(--light);
}
.contact-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.03);
}
.info-item {
  display: flex;
  align-items: center;
  background: var(--light);
  border-radius: var(--radius-lg);
  transition: var(--transition);
  border: 1px solid transparent;
}
.info-item:hover {
  background: var(--surface);
  border-color: rgba(79, 70, 229, 0.1);
  box-shadow: var(--shadow-lg);
  transform: translateX(5px);
}
.info-icon {
  width: 50px;
  height: 50px;
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.info-text h4 {
  font-size: 1.125rem;
}
.contact-form .form-control {
  background: var(--light);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  transition: var(--transition);
}
.contact-form .form-control:focus {
  background: var(--surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
  outline: none;
}

/* Footer */
.footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 80px 0 30px;
}
.footer-brand {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 1.5rem;
  display: inline-block;
}
.footer-brand span {
  color: var(--primary);
}
.social-icons a {
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--white);
  transition: var(--transition);
}
.social-icons a:hover {
  background: var(--primary);
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
}
.footer h4 {
  color: var(--white);
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 10px;
}
.footer h4::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--primary);
}
.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--primary);
  transform: translateX(8px);
  display: inline-block;
}

/* Animations */
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
  100% {
    transform: translateY(0px);
  }
}
@keyframes float-slow {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(30px, -30px) scale(1.1);
  }
}

@media (max-width: 991px) {
  .hero h1 {
    font-size: 3rem;
  }
  .process-step:not(:last-child)::after {
    display: none;
  }
}
@media (max-width: 768px) {
  section {
    padding: 30px 0;
  }
  .section-title {
    margin-bottom: 25px;
  }
  .section-title h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
  }
  .section-title p {
    font-size: 1rem;
  }
  .hero {
    text-align: center;
    padding-top: 130px;
  }
  .hero h1 {
    font-size: 2.5rem;
  }
  .floating-card {
    display: none;
  }
  .btn-group-custom {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }
  .process-timeline {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 1rem;
  }
  .cta-box {
    padding: 3rem 2rem;
  }
  .cta-box h2 {
    font-size: 2rem;
  }
}

/* Swiper Controls & Desktop Fallback */
.swiper-pagination-bullet-active {
  background-color: var(--primary) !important;
}
.services-swiper .swiper-pagination {
  bottom: 0 !important;
}
@media (min-width: 992px) {
  .services-swiper {
    padding-bottom: 0 !important;
  }
  .services-swiper .swiper-wrapper {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2rem !important;
  }
  .services-swiper .swiper-slide {
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
  }
  .services-swiper .swiper-pagination {
    display: none;
  }
}

/* Back to Top CSS */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  transform: translateY(20px);
}
.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--primary-hover);
  color: var(--white);
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
}
