:root {
  --bg-dark: #020617;
  --bg-card: rgba(30, 41, 59, 0.4);
  --primary: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.5);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-glass: rgba(255, 255, 255, 0.05);
  --font-heading: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Outfit', sans-serif;
  --ease-elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  overflow-x: hidden;
  cursor: none;
  /* Hide default cursor */
  /* Reverted from none */
  line-height: 1.8;
  /* Increased global line-height */
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: 9999;
  pointer-events: none;
}

.cursor-dot {
  width: 8px;
  height: 8px;
  background-color: var(--primary);
  box-shadow: 0 0 10px var(--primary);
  /* Glow effect */
}

.cursor-outline {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  /* More visible border */
  transition: width 0.2s, height 0.2s, background-color 0.2s;
  mix-blend-mode: difference;
  /* Ensures visibility on all backgrounds */
}

body:hover .cursor-outline {
  opacity: 1;
}

/* Navigation */
/* ... */

/* Hide default cursor on interactive elements to let custom cursor shine */
a,
button,
input,
textarea,
.glass-card,
.clickable {
  cursor: none !important;
}

/* ...rest... */

/* Typography */
h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-heading);
  color: #fff;
  letter-spacing: -0.02em;
  /* Slight tight tracking for modern feel */
  margin-bottom: 1.5rem;
  /* Ensure consistent heading spacing */
}

p {
  margin-bottom: 2rem;
  /* More space after paragraphs */
}

.text-accent {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.container {
  max-width: 1300px;
  /* Wider for "Wow" factor */
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header - Floating Island */
.main-header {
  position: fixed;
  top: 20px;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100;
  transition: 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  justify-content: center;
}

.main-header.scrolled {
  top: 10px;
  /* Slight movement on scroll */
}

.header-inner {
  background: rgba(15, 23, 42, 0.6);
  /* Dark glass */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50px;
  /* Pill shape */
  padding: 0.8rem 2rem;
  width: 90%;
  max-width: 1200px;
  height: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  transition: 0.4s;
}

.main-header.scrolled .header-inner {
  background: rgba(2, 6, 23, 0.85);
  border-color: rgba(59, 130, 246, 0.2);
  box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.7);
}

/* Logo */
.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  z-index: 102;
}

.logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.brand-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
}

/* Navigation */
.nav-menu {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  gap: 0.5rem;
  /* Gap handled by padding */
  list-style: none;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.6rem 1.2rem;
  border-radius: 20px;
  transition: 0.3s;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  /* Subtle pill hover */
}

/* Remove old underline effect */
.nav-link::after {
  display: none;
}

/* CTA Button in Nav */
.nav-cta-btn {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.8rem 1.5rem;
  margin-left: 1rem;
  border-radius: 30px;
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
  transition: 0.3s;
}

.nav-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6);
  background: #2563eb;
}

.nav-cta-btn.active {
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
}

/* Mobile Menu Toggle */
.menu-toggle-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  font-size: 1.5rem;
}


/* Hero Section */
.hero-wrapper {
  height: 100vh;
  min-height: 800px;
  /* Increased from 700px */
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 180px;
  /* Increased from 150px */
  padding-bottom: 100px;
}

.hero-content h1 {
  font-size: 5.5rem;
  /* Larger font */
  line-height: 1.2;
  /* More breathing room */
  font-weight: 800;
  margin-bottom: 3rem;
  /* Increased margin */
  opacity: 0;
  /* JS Reveal */
  transform: translateY(30px);
}

.hero-content p {
  font-size: 1.35rem;
  /* Slightly larger text */
  color: var(--text-muted);
  max-width: 650px;
  line-height: 1.8;
  /* More readable spacing */
  margin-bottom: 4rem;
  /* Huge gap before buttons */
  opacity: 0;
  transform: translateY(20px);
}

.hero-btns {
  display: flex;
  gap: 3rem;
  /* Wider gap between buttons */
  align-items: center;
}

/* Glass Cards */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 3rem;
  transition: 0.4s;
  backdrop-filter: blur(10px);
}

.glass-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(30, 41, 59, 0.6);
  transform: translateY(-5px);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
}

/* Services Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

/* Ambient Background Mesh */
.ambient-mesh {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -2;
  /* Moved back */
  background:
    radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.08), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(99, 102, 241, 0.08), transparent 25%);
  filter: blur(60px);
  animation: pulseMesh 10s infinite alternate ease-in-out;
}

#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  /* Just above mesh */
  pointer-events: none;
}

/* Preloader */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #020617;
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.loader-content {
  text-align: center;
}

.loader-text {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.2rem;
  color: white;
  display: block;
  margin-bottom: 1rem;
  animation: pulse 1.5s infinite;
}

.loader-bar {
  width: 200px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.bar-fill {
  width: 0%;
  height: 100%;
  background: var(--primary);
  animation: loadBar 1.5s ease-in-out forwards;
}

@keyframes loadBar {
  0% {
    width: 0%;
  }

  100% {
    width: 100%;
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }
}

/* Language Switcher */
.lang-switch {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-left: 2rem;
}

/* Lenis Recommended */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

/* Responsive */
@media(max-width: 900px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-dark);
    flex-direction: column;
    justify-content: center;
    transform: translateX(100%);
    transition: 0.5s cubic-bezier(0.7, 0, 0.3, 1);
  }

  .nav-menu.active {
    transform: translateX(0);
  }

  .nav-list {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }

  .nav-link {
    font-size: 2rem;
  }

  .menu-toggle-btn {
    display: block;
    z-index: 101;
    font-size: 1.5rem;
  }

  .hero-content h1 {
    font-size: 3rem;
  }

  .cursor-dot,
  .cursor-outline {
    display: none;
  }

  /* Disable custom cursor on touch */
  body {
    cursor: auto;
  }
}

/* Utility */
.section-padding {
  padding: 160px 0;
  /* Massively increased from 120px */
}

.btn-magnetic {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--primary);
  color: #fff;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 10px 20px -5px rgba(59, 130, 246, 0.4);
  transition: 0.3s;
}

.btn-magnetic:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -5px rgba(59, 130, 246, 0.6);
}

/* --- Tech Marquee --- */
.tech-marquee-section {
  padding: 3rem 0;
  border-top: 1px solid var(--border-glass);
  border-bottom: 1px solid var(--border-glass);
  background: rgba(2, 6, 23, 0.3);
  overflow: hidden;
  position: relative;
  white-space: nowrap;
}

.marquee-track {
  display: inline-flex;
  align-items: center;
  /* Speed control: slower is more elegant */
  animation: scrollMarquee 45s linear infinite;
  gap: 6rem;
  /* Good spacing */
  padding-left: 0;
  /* Remove offset for seamless flow */
}

.tech-item {
  font-size: 3.5rem;
  /* Balanced size */
  font-weight: 800;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.25);
  text-transform: uppercase;
  transition: 0.3s;
  user-select: none;
  /* No margin-right needed if gap is used on flex container */
}

.tech-item:hover {
  color: #fff;
  text-shadow: 0 0 30px var(--primary);
  -webkit-text-stroke: 0;
  transform: scale(1.1);
}

@keyframes scrollMarquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* --- FOOTER --- */
.main-footer {
  display: block;
  border-top: 1: 1px solid var(--border-glass);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
  position: relative;
  z-index: 10;
  background: rgba(2, 6, 23, 0.4);
  backdrop-filter: blur(10px);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-logo {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: white;
}

.footer-desc {
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 350px;
}

.footer-links-group h3 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: white;
}

.footer-links-group ul {
  list-style: none;
}

.footer-link {
  display: block;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
  text-decoration: none;
  transition: 0.3s;
}

.footer-link:hover {
  color: var(--primary);
  transform: translateX(5px);
}

.footer-bottom {
  border-top: 1px solid var(--border-glass);
  padding-top: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-desc {
    margin: 0 auto;
  }
}

/* --- MOBILE UI OPTIMIZATIONS (ADDED) --- */
@media (max-width: 900px) {

  /* Global Spacing */
  .section-padding {
    padding: 80px 0;
    /* Reduced from 160px */
  }

  .container {
    padding: 0 1.5rem;
  }

  /* Typography */
  h1 {
    font-size: 2.8rem !important;
  }

  h2 {
    font-size: 2.0rem !important;
  }

  h3 {
    font-size: 1.5rem !important;
  }

  p {
    font-size: 1rem !important;
  }

  /* Navigation & Header */
  .main-header {
    top: 0;
  }

  .header-inner {
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border-glass);
    background: rgba(2, 6, 23, 0.95);
    padding: 0.8rem 1.5rem;
    justify-content: space-between;
  }

  .nav-menu {
    position: fixed;
    top: 60px;
    /* Below header height approx */
    left: 0;
    width: 100%;
    height: 100vh;
    background: #020617;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 4rem;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 99;
    pointer-events: none;
    /* Interact only when active */
  }

  .nav-menu.active {
    transform: translateX(0);
    pointer-events: auto;
  }

  .nav-list {
    flex-direction: column;
    gap: 2rem;
  }

  .nav-link {
    font-size: 1.5rem;
  }

  .nav-cta-btn {
    margin: 2rem auto 0;
    width: 80%;
    display: block;
    text-align: center;
  }

  /* Hero Section */
  .hero-wrapper {
    min-height: auto;
    padding-top: 140px;
    padding-bottom: 60px;
    text-align: center;
    height: auto;
  }

  .hero-content h1 {
    margin-bottom: 1.5rem;
  }

  .hero-content p {
    margin-bottom: 2.5rem;
    font-size: 1rem;
  }

  .hero-btns {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
  }

  .btn-magnetic {
    width: 100%;
    text-align: center;
    padding: 1rem;
  }

  /* Cards & Grids */
  .glass-card {
    padding: 2rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .service-layout {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
    text-align: center;
  }

  .service-layout>div:nth-child(2) {
    order: -1;
    margin-bottom: 1rem;
  }

  .icon-box {
    margin: 0 auto 1.5rem;
  }

  /* Tech Marquee Mobile */
  .tech-marquee-section {
    padding: 2rem 0;
  }

  .marquee-track {
    gap: 3rem;
    animation-duration: 25s;
  }

  .tech-item {
    font-size: 2rem;
    -webkit-text-stroke: 0.5px rgba(255, 255, 255, 0.3);
  }

  /* Footer & Floating Buttons */
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .footer-desc {
    margin: 0 auto;
  }

  .fab-container {
    bottom: 20px;
    right: 20px;
    gap: 10px;
  }

  .fab-btn {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
  }

  /* 404 Mobile */
  .glitch {
    font-size: 4rem;
    letter-spacing: 0.2rem;
  }
}

/* --- HAMBURGER MENU ICON (FIXED) --- */
.hamburger-box {
  width: 30px;
  height: 24px;
  display: inline-block;
  position: relative;
}

.hamburger-inner {
  display: block;
  top: 50%;
  margin-top: -2px;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
  width: 30px;
  height: 2px;
  background-color: #fff;
  border-radius: 4px;
  position: absolute;
  transition-property: transform;
  transition-duration: 0.15s;
  transition-timing-function: ease;
}

.hamburger-inner::before,
.hamburger-inner::after {
  content: "";
  /* Must have content */
  display: block;
}

.hamburger-inner::before {
  top: -10px;
}

.hamburger-inner::after {
  bottom: -10px;
}

/* Active State Styles */
.menu-toggle-btn.active .hamburger-inner {
  transform: rotate(45deg);
  background-color: transparent !important;
  /* Hide middle bar */
}

.menu-toggle-btn.active .hamburger-inner::before {
  top: 0;
  transform: rotate(0);
}

.menu-toggle-btn.active .hamburger-inner::after {
  bottom: 0;
  transform: rotate(-90deg);
}

/* --- TYPOGRAPHY REFINEMENTS --- */
@media (max-width: 900px) {

  /* Better Readable Fonts */
  h1 {
    font-size: 2.2rem !important;
    /* Adjusted for better fit */
    line-height: 1.2 !important;
  }

  h2 {
    font-size: 1.8rem !important;
  }

  p {
    font-size: 1rem !important;
    line-height: 1.6 !important;
    margin-bottom: 1.5rem !important;
  }

  /* Ensure Toggle Button Visibility */
  .menu-toggle-btn {
    display: block !important;
    /* Force visible */
    position: relative;
    z-index: 200;
    /* Above everything */
    background: transparent;
    border: none;
    padding: 5px;
    /* larger touch target */
  }

  /* Fix Menu Z-Index */
  .nav-menu {
    z-index: 150;
    /* Below toggle button but above content */
    padding-top: 80px;
    /* Clear header */
  }
}