/**
 * LyDian Global Branding & Design System Normalization
 * Ensures ALL pages match the index.html (homepage) design system
 * Version: 2.0.0
 * Date: 2026-03-15
 *
 * Design System Reference (index.html):
 *   Font: Inter (400-900)
 *   Body BG: #0a0b0d
 *   Header: glassmorphism (rgba(0,0,0,0.6) + blur(20px))
 *   Brand text: #ffffff, 900 weight
 *   Nav links: #ffffff, 700 weight
 *   Accents: #C41E3A (green), #6e84ff (blue), #b86bff (purple)
 */

/* ========== NAVBAR / HEADER NORMALIZATION ========== */

/* Navbar glassmorphism - match header-2025 from index.html */
.navbar {
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  background: rgba(0, 0, 0, 0.6) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.9) !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
  width: 100% !important;
}

/* Nav inner container - horizontal flex layout */
.nav-container {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  max-width: 1400px !important;
  margin: 0 auto !important;
  padding: 0 2rem !important;
  height: 64px !important;
  box-sizing: border-box !important;
}

/* Nav links list - horizontal row */
.nav-links {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.5rem !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Nav CTA area - horizontal flex */
.nav-cta {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.75rem !important;
}

/* Nav links - full white, bold weight (not dimmed 0.7 opacity) */
.navbar .nav-links a,
.navbar .nav-link,
.nav-links a,
.nav-link {
  color: #ffffff !important;
  font-weight: 700 !important;
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif !important;
  font-size: 16px !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
}

.navbar .nav-links a:hover,
.navbar .nav-link:hover,
.nav-links a:hover,
.nav-link:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

/* ========== LOGO / BRAND TYPOGRAPHY ========== */

/* Logo Container - All variants */
.logo,
.nav-logo,
.brand,
a[href='/'].logo,
a[href='index.html'].logo,
.navbar .logo,
.navbar .brand,
header .logo,
header .brand {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif !important;
  font-size: 30px !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  text-decoration: none !important;
  letter-spacing: 0.05em !important;
  line-height: 1 !important;
  transition: all 0.3s ease !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

/* Logo text spans - override Righteous gradients */
.logo-text,
.logo span,
.brand span {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif !important;
  color: #ffffff !important;
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: #ffffff !important;
  background-clip: unset !important;
}

/* Logo Icon */
.logo img,
.brand img {
  width: auto !important;
  height: 40px !important;
  object-fit: contain !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
  vertical-align: middle !important;
  display: inline-block !important;
  position: relative !important;
  top: -1px !important;
}

/* Logo in Footer */
footer .logo,
footer .brand,
.footer-logo,
.footer .brand,
.footer .logo {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif !important;
  font-size: 1.5rem !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  text-decoration: none !important;
  letter-spacing: 0.05em !important;
}

/* Footer logo img */
.footer-logo img,
footer .logo img,
footer .brand img {
  width: 36px !important;
  height: 36px !important;
  border-radius: 8px !important;
}

/* Logo Hover State */
.logo:hover,
.brand:hover,
.nav-logo:hover,
footer .logo:hover {
  opacity: 0.8 !important;
  transform: translateY(-1px) !important;
}

/* ========== CTA BUTTONS ========== */

.navbar .cta,
.nav-right .cta,
a.cta {
  background: linear-gradient(135deg, #ffffff, #f0f0f0) !important;
  color: #1a1a1a !important;
  font-weight: 800 !important;
  border-radius: 11px !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  font-size: 13.5px !important;
  text-decoration: none !important;
}

.navbar .cta:hover,
.nav-right .cta:hover,
a.cta:hover {
  transform: translateY(-1px) !important;
  box-shadow:
    0 12px 50px rgba(255, 255, 255, 0.4),
    0 6px 30px rgba(255, 255, 255, 0.3) !important;
}

/* ========== BTN BUTTONS (nav-cta, page CTAs) ========== */

.btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0.5rem 1.15rem !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  font-family: 'Inter', sans-serif !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  line-height: 1.4 !important;
}

.btn-secondary {
  background: transparent !important;
  color: #ffffff !important;
  border: 1.5px solid rgba(255, 255, 255, 0.5) !important;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 1) !important;
  color: #000000 !important;
  border-color: #ffffff !important;
}

.btn-primary {
  background: #c41e3a !important;
  color: #ffffff !important;
  border: 1.5px solid #c41e3a !important;
}

.btn-primary:hover {
  background: #a01830 !important;
  border-color: #a01830 !important;
  transform: translateY(-1px) !important;
}

/* ========== RESPONSIVE LOGO SIZES ========== */

@media (max-width: 768px) {
  .logo,
  .brand,
  .nav-logo {
    font-size: 1.5rem !important;
  }

  .logo img,
  .brand img {
    width: auto !important;
    height: 36px !important;
  }

  footer .logo,
  footer .brand {
    font-size: 1.25rem !important;
  }
}

@media (max-width: 480px) {
  .logo,
  .brand,
  .nav-logo {
    font-size: 1.25rem !important;
    gap: 8px !important;
  }

  .logo img,
  .brand img {
    width: auto !important;
    height: 32px !important;
  }

  footer .logo,
  footer .brand {
    font-size: 1.125rem !important;
  }
}

/* ========== MOBILE MENU (DARK THEME) ========== */

/* Mobile Menu Container */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 85vw;
  height: 100vh;
  background: rgba(10, 11, 13, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
  z-index: 9999;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Mobile Menu Open State */
.mobile-menu.active {
  transform: translateX(0) !important;
}

/* Mobile Menu Items - Dark theme */
.mobile-menu a {
  display: block !important;
  padding: 1.25rem 1.5rem !important;
  color: #ffffff !important;
  text-decoration: none !important;
  font-size: 1.125rem !important;
  font-weight: 600 !important;
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif !important;
  border-radius: 12px !important;
  transition: all 0.2s ease !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border-left: 3px solid transparent !important;
  min-height: 56px !important;
  display: flex !important;
  align-items: center !important;
}

.mobile-menu a:hover,
.mobile-menu a:active {
  background: rgba(196, 30, 58, 0.15) !important;
  border-left-color: #c41e3a !important;
  transform: translateX(4px) !important;
}

/* Mobile Menu Toggle Button - White bars */
.menu-toggle,
.mobile-menu-toggle,
.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 10001;
  transition: transform 0.3s ease;
}

.menu-toggle span,
.mobile-menu-toggle span,
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hamburger Active State (X) */
.menu-toggle.active span:nth-child(1),
.mobile-menu-toggle.active span:nth-child(1),
.hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2),
.mobile-menu-toggle.active span:nth-child(2),
.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3),
.mobile-menu-toggle.active span:nth-child(3),
.hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Overlay */
.mobile-overlay,
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 9998;
}

.mobile-overlay.active,
.menu-overlay.active {
  opacity: 1 !important;
  visibility: visible !important;
}

/* ========== RESPONSIVE BREAKPOINTS ========== */

@media (max-width: 768px) {
  .menu-toggle,
  .mobile-menu-toggle,
  .hamburger {
    display: flex !important;
  }

  .mobile-menu {
    max-width: 100%;
  }
}

@media (min-width: 769px) {
  .mobile-menu,
  .menu-toggle,
  .mobile-menu-toggle,
  .hamburger,
  .mobile-overlay,
  .menu-overlay {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

/* ========== BODY SCROLL LOCK ========== */

body.menu-open {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
}

/* ========== ACCESSIBILITY ========== */

.menu-toggle:focus-visible,
.mobile-menu a:focus-visible,
.nav-links a:focus-visible,
.nav-link:focus-visible {
  outline: 2px solid #ffffff !important;
  outline-offset: 2px !important;
}

.skip-to-main {
  position: absolute;
  top: -40px;
  left: 0;
  background: #ffffff;
  color: #0a0b0d;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 10000;
  font-family: 'Inter', sans-serif;
}

.skip-to-main:focus {
  top: 0;
}

/* ========== LIGHT THEME HEADER + LOGO/NAV OVERRIDES ========== */

/* Header background → white/light in light theme */
[data-theme='light'] .header-2025,
[data-theme='light'] header,
[data-theme='light'] .navbar,
[data-theme='light'] .site-header {
  background: rgba(255, 255, 255, 0.92) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06) !important;
}

/* Logo/Brand text → dark in light theme */
[data-theme='light'] .logo,
[data-theme='light'] .nav-logo,
[data-theme='light'] .brand,
[data-theme='light'] a[href='/'].logo,
[data-theme='light'] a[href='index.html'].logo,
[data-theme='light'] .navbar .logo,
[data-theme='light'] .navbar .brand,
[data-theme='light'] header .logo,
[data-theme='light'] header .brand {
  color: #1a1a2e !important;
}

/* Search input → dark text on light bg in light theme */
[data-theme='light'] #live-search-input,
[data-theme='light'] .search-input,
[data-theme='light'] #search-container input {
  background: rgba(0, 0, 0, 0.04) !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  color: #1a1a2e !important;
}

[data-theme='light'] #live-search-input::placeholder,
[data-theme='light'] .search-input::placeholder {
  color: rgba(0, 0, 0, 0.4) !important;
}

/* Search icon SVG → dark in light theme */
[data-theme='light'] #search-container svg {
  color: rgba(0, 0, 0, 0.4) !important;
  stroke: rgba(0, 0, 0, 0.4) !important;
}

[data-theme='light'] .logo-text,
[data-theme='light'] .logo span,
[data-theme='light'] .brand span {
  color: #1a1a2e !important;
  -webkit-text-fill-color: #1a1a2e !important;
}

/* Nav links → dark in light theme */
[data-theme='light'] .navbar .nav-links a,
[data-theme='light'] .navbar .nav-link,
[data-theme='light'] .nav-links a,
[data-theme='light'] .nav-link {
  color: #1a1a2e !important;
}

[data-theme='light'] .navbar .nav-links a:hover,
[data-theme='light'] .navbar .nav-link:hover,
[data-theme='light'] .nav-links a:hover,
[data-theme='light'] .nav-link:hover {
  color: #1a1a2e !important;
  background: rgba(0, 0, 0, 0.06) !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
}

/* Footer logo → dark in light theme */
[data-theme='light'] footer .logo,
[data-theme='light'] footer .brand,
[data-theme='light'] .footer-logo,
[data-theme='light'] .footer .brand,
[data-theme='light'] .footer .logo {
  color: #1a1a2e !important;
}

/* CTA button in light theme → dark bg */
[data-theme='light'] .navbar .cta,
[data-theme='light'] .nav-right .cta,
[data-theme='light'] a.cta {
  background: linear-gradient(135deg, #1a1a2e, #22223a) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 4px 16px rgba(26, 26, 46, 0.25) !important;
}

[data-theme='light'] .navbar .cta:hover,
[data-theme='light'] .nav-right .cta:hover,
[data-theme='light'] a.cta:hover {
  box-shadow: 0 8px 28px rgba(26, 26, 46, 0.4) !important;
  background: linear-gradient(135deg, #22223a, #2e2e50) !important;
}

/* Mobile menu → light bg in light theme */
[data-theme='light'] .mobile-menu {
  background: rgba(255, 255, 255, 0.98) !important;
}

[data-theme='light'] .mobile-menu a {
  color: #1a1a2e !important;
  background: rgba(0, 0, 0, 0.03) !important;
}

[data-theme='light'] .mobile-menu a:hover,
[data-theme='light'] .mobile-menu a:active {
  background: rgba(196, 30, 58, 0.08) !important;
}

/* Hamburger bars → dark in light theme */
[data-theme='light'] .menu-toggle span,
[data-theme='light'] .mobile-menu-toggle span,
[data-theme='light'] .hamburger span,
[data-theme='light'] .mobile-menu-btn span {
  background: #1a1a2e !important;
}

/* Mobile overlay → lighter in light theme */
[data-theme='light'] .mobile-overlay,
[data-theme='light'] .menu-overlay {
  background: rgba(0, 0, 0, 0.3) !important;
}

/* Focus outlines → dark in light theme */
[data-theme='light'] .menu-toggle:focus-visible,
[data-theme='light'] .mobile-menu a:focus-visible,
[data-theme='light'] .nav-links a:focus-visible,
[data-theme='light'] .nav-link:focus-visible {
  outline-color: #1a1a2e !important;
}

/* ========== PRINT STYLES ========== */

@media print {
  .mobile-menu,
  .menu-toggle,
  .mobile-menu-toggle,
  .hamburger,
  .mobile-overlay,
  .menu-overlay {
    display: none !important;
  }
}

/* ========== PERFORMANCE ========== */

.mobile-menu,
.menu-toggle,
.mobile-overlay {
  will-change: transform, opacity;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* ========== CUSTOM SCROLLBAR (DARK) ========== */

.mobile-menu::-webkit-scrollbar {
  width: 6px;
}

.mobile-menu::-webkit-scrollbar-track {
  background: transparent;
}

.mobile-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.mobile-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}
