:root {
  --pink: #FF3B8E;
  --pink-hover: #E11D74;
  --slate-950: #020617;
  --slate-900: #0F172A;
  --slate-500: #64748B;
  --slate-200: #E2E8F0;
  --nav-height: 80px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  background-color: #fff;
  line-height: 1.5;
  /* Prevent blue tap highlight on mobile */
  -webkit-tap-highlight-color: transparent;
}

/* Visibility Fallback for Deployment */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  animation: visibilityFallback 0.5s ease-out 2s forwards;
}

@keyframes visibilityFallback {
  to { opacity: 1; transform: translateY(0); }
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
  animation: none;
}

/* Institutional Blueprint Background */
.logic-blueprint {
  background-color: #ffffff;
  background-image: 
    linear-gradient(rgba(226, 232, 240, 0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(226, 232, 240, 0.4) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* Navbar Transition States */
#navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
  padding-top: 1rem;
  padding-bottom: 1rem;
}

/* --- MOBILE NAVIGATION UI/UX POLISH --- */

#mobile-nav-overlay {
  transition: 
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.3s ease,
    visibility 0.3s;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  height: 100dvh; /* Dynamic viewport height for mobile browsers */
  width: 100%;
  overscroll-behavior: contain;
}

#mobile-nav-overlay.visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

/* Enhanced Menu Links & Interaction */
#mobile-nav-overlay a {
  transition: transform 0.2s ease, background-color 0.2s ease;
}

#mobile-nav-overlay a:active {
  transform: scale(0.97);
  background-color: #f1f5f9;
}

/* Mobile Menu Button Animation State */
#mobile-menu-btn.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
#mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
#mobile-menu-btn.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Buttons & Interactive Elements Touch Feedback */
a, button {
  touch-action: manipulation; /* Faster response on mobile */
}

.btn-active-effect:active {
  transform: scale(0.96);
}

/* Stats Graph Animate */
.animate-draw {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: draw 2.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

::selection {
  background-color: var(--pink);
  color: #fff;
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 3.25rem; /* ~52px for mobile */
    line-height: 0.9;
  }
}