/* GRIT Marketing Solutions - Custom Styles */
/* Futuristic landing page with glass header, animated orbs, and glow effects */

/* ========================================
   Smooth Scrolling
   ======================================== */
html {
  scroll-behavior: smooth;
}

/* ========================================
   Glass Header
   ======================================== */
.glass-header {
  background: #1d1d1c;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px); /* Safari */
  border-bottom: 1px solid rgba(161, 205, 64, 0.1);
  transition: transform 0.3s ease, background 0.3s ease;
}

.glass-header.scrolled {
  background: rgba(29, 29, 28, 0.98);
}

/* Fallback for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(12px)) {
  .glass-header {
    background: #1d1d1c;
  }
}

/* ========================================
   Animated Gradient Orbs
   ======================================== */
.gradient-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

.gradient-orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(161, 205, 64, 0.15) 0%, transparent 70%);
  top: -200px;
  right: -100px;
  animation: float 20s ease-in-out infinite;
}

.gradient-orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(161, 205, 64, 0.1) 0%, transparent 70%);
  bottom: -100px;
  left: -50px;
  animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(50px, -30px) scale(1.05);
  }
  50% {
    transform: translate(-30px, 50px) scale(0.95);
  }
  75% {
    transform: translate(-50px, -20px) scale(1.02);
  }
}

/* ========================================
   Scroll Reveal
   ======================================== */
.reveal-section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), 
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Staggered reveal for children */
.reveal-section.revealed > * {
  animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.reveal-section.revealed > *:nth-child(1) { animation-delay: 0.1s; }
.reveal-section.revealed > *:nth-child(2) { animation-delay: 0.2s; }
.reveal-section.revealed > *:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   Hover Effects for Illustrations
   ======================================== */
.glow-hover {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.glow-hover:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

/* ========================================
   Button Styles
   ======================================== */
.btn-outline {
  border: 2px solid #a1cd40;
  color: #a1cd40;
  background: transparent;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
  text-decoration: none;
}

.btn-outline:hover {
  background: #a1cd40;
  color: #0a0a0a;
  box-shadow: 0 0 20px rgba(161, 205, 64, 0.4);
}

.btn-solid {
  background: #a1cd40;
  color: #0a0a0a;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
  text-decoration: none;
  border: none;
}

.btn-solid:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(161, 205, 64, 0.5);
}

/* ========================================
   Focus Styles (Accessibility)
   ======================================== */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #a1cd40;
  outline-offset: 2px;
}

/* ========================================
   Active Navigation Link
   ======================================== */
nav a.active {
  color: #a1cd40;
  border-bottom: 2px solid #a1cd40;
}

/* ========================================
   Custom Bullet Lists
   ======================================== */
.custom-bullet {
  list-style: none;
  padding-left: 0;
}

.custom-bullet li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}

.custom-bullet li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 0.5rem;
  height: 0.5rem;
  background: #a1cd40;
  border-radius: 50%;
}

/* ========================================
   Section Transitions
   ======================================== */
section {
  position: relative;
  z-index: 1;
}

/* ========================================
   Navigation Menu
   ======================================== */
#mobile-menu {
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  padding: 1rem;
  background: rgba(21, 21, 21, 0.95);
  border-radius: 0.5rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@media (min-width: 768px) {
  #mobile-menu {
    max-width: 500px;
  }
}

/* ========================================
   Hamburger Menu Icon
   ======================================== */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger span {
  width: 1.5rem;
  height: 2px;
  background: #a1cd40;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================
   Reduced Motion Preferences
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .gradient-orb {
    animation: none;
  }

  .reveal-section {
    opacity: 1 !important;
    transform: none !important;
    transition: none;
  }

  .reveal-section.revealed > * {
    animation: none;
  }

  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========================================
   Mobile Animation Optimizations
   ======================================== */
@media (max-width: 767px) {
  .reveal-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
  }

  .reveal-section.revealed > * {
    animation: none;
  }

  .gradient-orb {
    display: none;
  }
}

/* ========================================
   DESKTOP DROPDOWN NAVIGATION
   ======================================== */

/* Dropdown wrapper positioning context */
.nav-dropdown-wrapper {
  position: relative;
}

/* Bridge area to prevent dropdown from closing when moving mouse */
.nav-dropdown-wrapper::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 0.5rem;
  pointer-events: none;
}

.nav-dropdown-wrapper:hover::after {
  pointer-events: auto;
}

/* Dropdown trigger button - styled as nav link */
.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  padding: 0;
}

/* Chevron icon styling */
.dropdown-chevron {
  transition: transform 0.2s ease;
  opacity: 0.7;
}

.nav-dropdown-trigger:hover .dropdown-chevron,
.nav-dropdown-trigger[aria-expanded="true"] .dropdown-chevron {
  opacity: 1;
  transform: rotate(180deg);
}

/* Dropdown menu container */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  min-width: 200px;
  background: rgba(11, 11, 11, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(161, 205, 64, 0.2);
  border-radius: 0.5rem;
  padding: 0.5rem 0;
  list-style: none;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(161, 205, 64, 0.1);
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
  z-index: 100;
}

/* Show dropdown on hover or when expanded */
.nav-dropdown-wrapper:hover .nav-dropdown,
.nav-dropdown-wrapper:focus-within .nav-dropdown,
.nav-dropdown.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Dropdown links */
.dropdown-link {
  display: block;
  padding: 0.625rem 1.25rem;
  color: #fff;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
  font-size: 0.9375rem;
}

.dropdown-link:hover,
.dropdown-link:focus {
  background: rgba(161, 205, 64, 0.1);
  color: #a1cd40;
  outline: none;
}

.dropdown-link.active {
  color: #a1cd40;
  background: rgba(161, 205, 64, 0.05);
  border-left: 3px solid #a1cd40;
  padding-left: calc(1.25rem - 3px);
}

/* Parent category active state (when child is active) */
.nav-dropdown-trigger.parent-active {
  color: #a1cd40;
  position: relative;
}

.nav-dropdown-trigger.parent-active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: #a1cd40;
}

/* ========================================
   MOBILE ACCORDION NAVIGATION
   ======================================== */

.mobile-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem 0;
}

/* Accordion trigger button */
.mobile-nav-accordion-trigger {
  background: none;
  border: none;
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease;
  font-family: inherit;
}

.mobile-nav-accordion-trigger:hover,
.mobile-nav-accordion-trigger:focus {
  color: #a1cd40;
  outline: none;
}

/* Active accordion trigger (when child is active) */
.mobile-nav-accordion-trigger.parent-active {
  color: #a1cd40;
}

/* Chevron rotation */
.mobile-chevron {
  transition: transform 0.2s ease;
}

.mobile-nav-accordion-trigger[aria-expanded="true"] .mobile-chevron {
  transform: rotate(180deg);
}

/* Accordion content */
.mobile-accordion-content {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}

.mobile-accordion-content.expanded {
  max-height: 500px;
  opacity: 1;
}

/* Mobile nav links (nested) */
.mobile-nav-link.active {
  color: #a1cd40;
  font-weight: 600;
  border-left: 3px solid #a1cd40;
  padding-left: 0.5rem;
}

/* Touch target sizing for mobile */
@media (max-width: 768px) {
  .mobile-nav-accordion-trigger {
    min-height: 44px;
  }

  .mobile-nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 1024px) {
  .nav-dropdown {
    min-width: 180px;
    font-size: 0.875rem;
  }
}
