/**
 * Weborix — Future-styled landing
 * src/index.css
 */

/* Visually hidden utility */
.visually-hidden { 
  position: absolute !important; 
  width: 1px; 
  height: 1px; 
  padding: 0; 
  margin: -1px; 
  overflow: hidden; 
  clip: rect(0, 0, 0, 0); 
  white-space: nowrap; 
  border: 0; 
}

/* Base styles & Custom properties */
:root {
  --primary: #6366f1; /* Indigo */
  --primary-dark: #4f46e5;
  --secondary: #06b6d4; /* Cyan */
  --accent: #a855f7; /* Purple */
  --dark-bg: #111827;
  --darker-bg: #030712;
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --navbar-bg: rgba(17, 24, 39, 0.7);
  --glass-effect: blur(12px);
  --transition-normal: all 0.3s ease;
  --border-glow: rgba(99, 102, 241, 0.3);
  --neon-shadow: 0 0 15px rgba(6, 182, 212, 0.5);
  --glow-cyan: 0 0 15px rgba(6, 182, 212, 0.5);
  --glow-indigo: 0 0 15px rgba(99, 102, 241, 0.5);
  --glow-purple: 0 0 15px rgba(168, 85, 247, 0.5);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth scroll padding for fixed navbar when Tailwind isn't handling it */
html {
  scroll-padding-top: 80px;
  cursor: default !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0f172a; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #0891b2, #4f46e5);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #06b6d4, #6366f1);
}

/* Navbar tweak when scrolled (class toggled by JS) */
#navbar.scrolled {
  padding: 0.5rem 0;
  background-color: rgba(17, 24, 39, 0.9);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Nav link underline + active state (works with Tailwind classes) */
.nav-link { position: relative; overflow: hidden; }
.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0; left: 50%;
  width: 0; height: 2px;
  background: linear-gradient(to right, rgb(6, 182, 212), rgb(99, 102, 241));
  transition: width 0.3s ease;
  transform: translateX(-50%);
}
.nav-link:hover::after, .nav-link.active::after { width: 80%; }
.nav-link:hover { color: var(--secondary); text-shadow: 0 0 8px rgba(6, 182, 212, 0.3); }

/* Mobile menu open state */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
#mobile-menu.open { max-height: 300px; }

/* Section reveal animations (IntersectionObserver toggles) */
.section-hidden { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.section-visible { opacity: 1; transform: translateY(0); }

/* Header title fade-in */
.text-6xl { opacity: 0; transform: translateY(20px); transition: opacity 1s ease, transform 1s ease; }

/* Focus styles */
a:focus, button:focus {
  outline: 2px solid rgba(6, 182, 212, 0.5);
  outline-offset: 2px;
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
