/* Custom Cursor - Styled for Light Themes */
.custom-cursor {
  width: 8px;
  height: 8px;
  background: var(--accent-blue);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: width 0.1s, height 0.1s;
}

.custom-cursor-follower {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(37, 99, 235, 0.3);
  background: rgba(37, 99, 235, 0.02);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              height 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              background-color 0.3s, border-color 0.3s;
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.08);
}

/* Hover States for Cursor */
.custom-cursor.hovered {
  width: 0px;
  height: 0px;
}

.custom-cursor-follower.hovered {
  width: 60px;
  height: 60px;
  background: rgba(37, 99, 235, 0.05);
  border-color: var(--accent-blue);
  box-shadow: 0 0 25px rgba(37, 99, 235, 0.15);
}

/* Hide default cursor on desktop devices */
@media (hover: hover) and (pointer: fine) {
  body {
    cursor: none;
  }
  a, button, select, input, textarea, .interactive {
    cursor: none;
  }
}

@media (max-width: 1024px) {
  .custom-cursor, .custom-cursor-follower {
    display: none !important;
  }
}

/* Preloader Terminal */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: monospace;
  color: var(--accent-blue);
  padding: 2rem;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s;
}

.preloader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-terminal {
  max-width: 600px;
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.preloader-header {
  display: flex;
  gap: 6px;
  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.preloader-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
}

.preloader-dot:nth-child(1) { background: #ef4444; }
.preloader-dot:nth-child(2) { background: #eab308; }
.preloader-dot:nth-child(3) { background: #22c55e; }

.preloader-logs {
  font-size: 0.9rem;
  height: 120px;
  overflow-y: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  color: var(--text-secondary);
}

.preloader-line {
  white-space: nowrap;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.preloader-line span {
  color: var(--accent-blue);
  margin-right: 0.5rem;
}

.preloader-progress {
  margin-top: 2rem;
  width: 100%;
  height: 2px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.preloader-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
  box-shadow: 0 0 8px var(--accent-cyan);
  animation: loadProgress 1.8s cubic-bezier(0.1, 0.6, 0.2, 1) forwards;
}

@keyframes loadProgress {
  0% { width: 0%; }
  100% { width: 100%; }
}

/* Header / Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  transition: var(--transition-smooth);
  color: #ffffff;
  background: rgba(10, 20, 38, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

/* Scrolled Nav Header State */
header.scrolled {
  background: rgba(10, 20, 38, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  height: 76px;
}

/* Header Static State for Subpages (Sticky and Dark themed) */
header.header-static {
  position: fixed;
  background: rgba(10, 20, 38, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  height: var(--header-height);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

header.header-static.scrolled {
  background: rgba(10, 20, 38, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  height: 76px;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  width: 100%;
}

@media (min-width: 869px) {
  .nav-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }
  
  .logo {
    justify-self: start;
  }
  
  #main-nav-menu {
    justify-self: center;
  }
  
  .nav-cta {
    justify-self: end;
  }
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 5px 10px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 
              0 4px 12px rgba(0, 0, 0, 0.1);
  height: 46px;
}

@media (min-width: 869px) {
  .logo {
    border-radius: 12px;
    padding: 6px 14px;
    height: 56px;
  }
}

.logo:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 
              0 6px 16px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.logo img {
  display: block;
  height: 100%;
  width: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  position: relative;
  padding: 0.5rem 0;
  transition: var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
  transition: var(--transition-smooth);
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-cta {
  display: flex;
  align-items: center;
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
  width: 48px;
  height: 48px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 0;
}

.hamburger-bar {
  display: block;
  width: 24px;
  height: 2px;
  background-color: currentColor;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              opacity 0.3s ease, 
              width 0.3s ease;
  border-radius: 2px;
}

/* Nav Overlay Backdrop */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(11, 15, 25, 0.4);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 868px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: rgba(10, 20, 38, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
    transform: translateX(100%);
    visibility: hidden;
    z-index: 1000;
  }
  
  .nav-links.active {
    transform: translateX(0);
    visibility: visible;
  }
  
  .nav-links.active .nav-link {
    color: rgba(255, 255, 255, 0.75);
  }
  
  .nav-links.active .nav-link:hover,
  .nav-links.active .nav-link.active {
    color: var(--accent-cyan);
  }
  
  .mobile-nav-toggle {
    display: flex;
  }
  
  .mobile-nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  
  .mobile-nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(2) {
    opacity: 0;
    width: 0;
  }
  
  .mobile-nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  
  .nav-cta {
    display: none;
  }
  
  header:not(.scrolled):not(.header-static) .mobile-nav-toggle {
    color: #ffffff;
  }
  header.scrolled .mobile-nav-toggle,
  header.header-static .mobile-nav-toggle {
    color: var(--text-primary);
  }
}

/* Premium Buttons - WCAG Tap Target Size (48px Height) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0 1.8rem;
  height: 48px; /* Safe 48px touch target */
  min-width: 48px;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-cyan) 100%);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.15);
}

.btn-primary:hover {
  box-shadow: 0 6px 30px rgba(37, 99, 235, 0.35);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(0, 0, 0, 0.02);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: var(--accent-blue);
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.25) 0%, transparent 70%);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.5s ease-out;
  pointer-events: none;
}

.btn:active::before {
  transform: translate(-50%, -50%) scale(1);
  transition: transform 0s;
}

/* Glassmorphism Cards - Refined for Light Theme */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: clamp(1.25rem, 5vw, 2.5rem);
  backdrop-filter: blur(12px) saturate(180%);
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
  z-index: 1;
  box-shadow: 0 10px 30px -10px rgba(0, 84, 166, 0.08); /* Soft shadow instead of glowing borders */
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.02) 0%, transparent 60%, rgba(56, 189, 248, 0.02) 100%);
  opacity: 0;
  transition: var(--transition-smooth);
  z-index: -1;
}

.glass-card:hover {
  transform: translateY(-5px);
  border-color: var(--glass-border-hover);
  box-shadow: 0 20px 40px -10px rgba(0, 84, 166, 0.12);
}

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

/* Section Header styling */
.section-header {
  max-width: 700px;
  margin: 0 auto 5rem auto;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: var(--accent-blue);
  font-weight: 600;
  margin-bottom: 1rem;
  position: relative;
}

.section-tag::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--accent-cyan);
  margin-top: 0.3rem;
}

/* Tech icons wrapper */
.card-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  color: var(--accent-blue);
  transition: var(--transition-smooth);
}

.glass-card:hover .card-icon {
  background: rgba(37, 99, 235, 0.12);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.15);
}

.card-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Tech Partner Logo Wall */
.logo-marquee {
  width: 100%;
  overflow: hidden;
  padding: 2rem 0;
  position: relative;
  background: rgba(0, 0, 0, 0.01);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}

.logo-marquee::before, .logo-marquee::after {
  content: '';
  position: absolute;
  top: 0;
  width: 15%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.logo-marquee::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg-primary) 0%, transparent 100%);
}

.logo-marquee::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg-primary) 0%, transparent 100%);
}

.logo-track {
  display: flex;
  width: calc(250px * 20);
  animation: scrollMarquee 40s linear infinite;
}

.logo-item {
  width: 250px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-secondary);
  opacity: 0.5;
  transition: var(--transition-fast);
  gap: 0.5rem;
}

.logo-item svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.logo-item:hover {
  opacity: 1;
  color: var(--accent-blue);
}

@keyframes scrollMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-250px * 10)); }
}

/* Scroll Reveal animation triggers */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Footer Section - Keep Dark & Futuristic */
footer {
  background: #0b0f19;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 6rem 0 2rem 0;
  position: relative;
  overflow: hidden;
  color: #94a3b8;
}

footer h3, footer h4, footer .logo {
  color: #ffffff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 4rem;
  margin-bottom: 5rem;
}

.footer-info .logo {
  margin-bottom: 1.5rem;
}

.footer-info p {
  font-size: 0.95rem;
  margin-bottom: 2rem;
  max-width: 320px;
}

.footer-socials {
  display: flex;
  gap: 1rem;
}

.social-link {
  width: 44px; /* WCAG touch target */
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  transition: var(--transition-smooth);
}

.social-link:hover {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.05);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
  transform: translateY(-2px);
}

.social-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer-heading {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--accent-cyan);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-link {
  font-size: 0.95rem;
  color: #94a3b8;
  transition: var(--transition-fast);
}

.footer-link:hover {
  color: var(--accent-cyan);
  padding-left: 5px;
}

.footer-newsletter p {
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.newsletter-form {
  display: flex;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50px;
  padding: 0.3rem;
}

.newsletter-form input {
  flex: 1;
  background: none;
  border: none;
  padding: 0 1.2rem;
  height: 40px;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.newsletter-form input:focus {
  outline: none;
}

.newsletter-form button {
  background: var(--accent-blue);
  color: #ffffff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.newsletter-form button:hover {
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.85rem;
}

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

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
