/* =====================================================
   NAVBAR.CSS — REVALABS.AI
   Shared navigation styles for all pages
   ===================================================== */

/* ── FONT FACES ── */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('/fonts/jetbrains-mono.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── COLOR SYSTEM ── */
:root {
  /* Primary Colors */
  --navy-blue: #0A1F44;
  --navy-dark: #061528;
  --navy-light: #0F2A56;
  --white: #FFFFFF;
  --black: #000000;

  /* Text Colors */
  --text-on-navy: #FFFFFF;
  --text-on-white: #111111;
  --text-on-black: #E5E5E5;
  --text-muted-on-navy: rgba(255, 255, 255, 0.75);
  --text-muted-on-white: #666666;
  --text-muted-on-black: #AAAAAA;

  /* Accent */
  --accent-blue: #3B82F6;
  --accent-blue-hover: #2563EB;
  --accent-light: #60A5FA;

  /* Borders */
  --border-light: #EAEAEA;
  --border-navy: rgba(255, 255, 255, 0.15);
  --border-black: rgba(255, 255, 255, 0.1);

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-blue: 0 10px 40px rgba(59, 130, 246, 0.2);

  /* Typography */
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Spacing (8px system) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-pill: 100px;

  /* Transitions */
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;
}

/* ── RESET & BASE ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-on-white);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  opacity: 0;
  transition: opacity 0.3s ease-out;
  width: 100%;
  position: relative;
}

/* Prevent horizontal scroll without affecting sticky positioning */
* {
  max-width: 100%;
}

/* Allow specific elements to exceed if needed for layout */
html,
body,
.frameworks-premium-section,
.frameworks-sticky-container,
.menu-dropdown,
.dropdown-submenu,
.nav-inner {
  max-width: none;
}

body.loaded {
  opacity: 1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-8);
}

@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-4);
  }
}

/* ── SCROLL PROGRESS BAR ── */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-light));
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ── FADE UP ANIMATION ── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── NAVIGATION ── */
nav {
  position: fixed;
  top: 20px;
  left: 0;
  right: 0;
  z-index: 900;
  display: flex;
  justify-content: center;
  padding: 0 var(--space-8);
  pointer-events: none;
  transition: top var(--transition-base);
}

nav.scrolled {
  top: 12px;
}

/* The floating pill container */
.nav-inner {
  pointer-events: all;
  width: 100%;
  max-width: 900px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: rgba(6, 15, 40, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  padding: 8px 10px 8px 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45),
              0 0 0 1px rgba(255, 255, 255, 0.04),
              inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: background var(--transition-base),
              box-shadow var(--transition-base);
}

nav.scrolled .nav-inner {
  background: rgba(6, 15, 40, 0.92);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55),
              0 0 0 1px rgba(255, 255, 255, 0.07),
              inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Left section */
.nav-left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

/* Center section — logo always centered */
.nav-logo {
  justify-self: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--white);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  transition: opacity var(--transition-base);
}

.nav-logo:hover {
  opacity: 0.85;
}

.nav-logo:focus,
.nav-logo:focus-visible {
  outline: none;
  box-shadow: none;
}

.nav-logo .teal {
  color: var(--accent-blue);
}

/* Right section */
.nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.nav-cta {
  background: rgba(59, 130, 246, 0.9);
  color: var(--white);
  padding: 0.5rem 0.75rem 0.5rem 1.5rem;
  border-radius: 100px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.15);
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow: hidden;
  position: relative;
}

.nav-cta-text {
  position: relative;
  z-index: 2;
}

.nav-cta-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.arrow-icon {
  color: white;
  transition: transform 0.4s ease;
  position: relative;
  z-index: 1;
  stroke-width: 2;
}

.nav-cta:hover {
  background: var(--accent-blue);
  transform: scale(1.05);
  border-color: rgba(255, 255, 255, 0.3);
}

.nav-cta:hover .nav-cta-icon {
  background: white;
}

.nav-cta:hover .arrow-icon {
  color: #000000;
  stroke-width: 2.5;
  animation: arrowSlide 0.8s ease infinite;
}

@keyframes arrowSlide {
  0% {
    transform: translateX(0);
    opacity: 1;
  }
  45% {
    transform: translateX(10px);
    opacity: 0;
  }
  55% {
    transform: translateX(-10px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

/* labs-gradient always uses light version since nav is always dark */
.labs-gradient {
  background: linear-gradient(
    90deg,
    #FFFFFF 0%,
    #60A5FA 25%,
    #EC4899 50%,
    #60A5FA 75%,
    #FFFFFF 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 3s ease-in-out infinite;
  font-weight: 800;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% center; }
  50%       { background-position: 100% center; }
}

/* Remove old hero-visible nav overrides — nav is always dark now */
body.hero-visible nav .labs-gradient {
  background: linear-gradient(
    90deg,
    #FFFFFF 0%,
    #60A5FA 25%,
    #EC4899 50%,
    #60A5FA 75%,
    #FFFFFF 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── MOBILE NAV ── */

/* Tablet and below - prevent navbar overflow */
@media (max-width: 1024px) {
  nav {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .nav-inner {
    max-width: 900px; /* Keep the design width on tablet */
  }
}

/* Mobile phones */
@media (max-width: 768px) {
  nav {
    top: 12px;
    padding: 0 1rem;
  }

  .nav-inner {
    max-width: 100%; /* Full width on mobile */
    border-radius: 16px;
    padding: 8px 12px;
    /* Keep 3-column grid to maintain centered logo */
    grid-template-columns: 1fr auto 1fr;
    gap: 0;
  }

  /* Logo stays centered */
  .nav-logo {
    justify-self: center;
    font-size: 1.05rem;
    grid-column: 2;
  }

  /* Menu button stays on left */
  .nav-left {
    grid-column: 1;
    justify-content: flex-start;
  }

  /* Hide CTA button on mobile */
  .nav-right {
    display: none;
    grid-column: 3;
  }
}

/* Extra small screens - prevent overflow */
@media (max-width: 480px) {
  nav {
    padding: 0 0.75rem;
  }

  .nav-inner {
    padding: 6px 10px;
  }

  .nav-logo {
    font-size: 0.95rem;
  }
}
