/* ========================================
   COMPONENTS
   ======================================== */

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md) var(--space-xl);
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  font-family: var(--font-secondary);
  font-weight: var(--font-secondary-weight-regular);
  font-size: var(--text-xl);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-all);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-neural-primary), var(--color-neural-secondary));
  color: var(--color-black);
  border-color: var(--color-neural-primary);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-neural-accent), var(--color-neural-primary));
  color: var(--color-black);
  box-shadow: var(--shadow-neural);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--color-neural-primary);
  border-color: var(--color-neural-primary);
}

.btn-secondary:hover {
  background: var(--color-neural-primary);
  color: var(--color-black);
  box-shadow: var(--shadow-neural);
  transform: translateY(-2px);
}

.btn-large {
  padding: var(--space-lg) var(--space-2xl);
  font-size: var(--text-lg);
}

/* === NAVIGATION === */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-navbar);
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-gray-800);
  transition: var(--transition-all);
}

.nav-container {
  max-width: var(--container-7xl);
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.nav-logo .logo-text {
  font-size: var(--text-3xl);
  font-weight: var(--font-primary-weight-black);
  color: var(--color-neural-primary);
  text-shadow: 0 0 10px var(--color-neural-glow);
  margin: 0;
}

.nav-logo-img {
  height: 30px;
  width: auto;
  filter: brightness(0) invert(1);
  transition: var(--transition-all);
}

.nav-logo-img:hover {
  filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: var(--space-xl);
}

.nav-menu a,
.nav-link {
  font-family: var(--font-secondary);
  font-weight: var(--font-secondary-weight-regular);
  font-size: var(--text-sm);
  color: var(--color-gray-200);
  /* visually normalize to sentence case: force lowercase then capitalize first letter */
  text-transform: lowercase;
  letter-spacing: 0.05em;
  transition: var(--transition-all);
  position: relative;
}

/* Capitalize only the first letter while keeping the rest lowercase */
.nav-menu a::first-letter,
.nav-link::first-letter {
  text-transform: uppercase;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-neural-primary);
  transition: var(--transition-all);
}

.nav-link:hover {
  color: var(--color-neural-primary);
}

.nav-link:hover::after {
  width: 100%;
}

/* Special CTA button in navbar */
.nav-cta {
  background: linear-gradient(135deg, var(--color-neural-primary), var(--color-neural-secondary)) !important;
  color: var(--color-black) !important;
  padding: var(--space-sm) var(--space-lg) !important;
  border-radius: var(--radius-lg) !important;
  font-weight: var(--font-secondary-weight-regular) !important;
  /* keep CTA visually sentence-case too */
  text-transform: lowercase !important;
  font-style: italic !important;
  letter-spacing: 0.05em !important;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3) !important;
  transition: var(--transition-all) !important;
  margin-left: var(--space-md) !important;
}

.nav-cta::first-letter {
  text-transform: uppercase !important;
}

.nav-cta::after {
  display: none !important;
}

.nav-cta:hover {
  background: linear-gradient(135deg, var(--color-neural-accent), var(--color-neural-primary)) !important;
  color: var(--color-black) !important;
  box-shadow: var(--shadow-neural-intense) !important;
  transform: translateY(-2px) !important;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--color-white);
  transition: var(--transition-all);
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background: rgba(0, 0, 0, 0.95);
    flex-direction: column;
    align-items: center;
    justify-content: start;
    padding-top: var(--space-4xl);
    gap: var(--space-2xl);
    transition: var(--transition-all);
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .hamburger {
    display: flex;
  }
  
  .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(7px, -6px);
  }
}

/* === SECTION HEADERS === */
.section-header {
  text-align: center;
  margin-bottom: var(--space-4xl);
}

.section-title {
  font-size: var(--text-5xl);
  font-weight: var(--font-primary-weight-black);
  margin-bottom: var(--space-lg);
  background: linear-gradient(135deg, var(--color-white), var(--color-neural-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-family: var(--font-secondary);
  font-weight: var(--font-secondary-weight-regular);
  font-size: var(--text-2xl);
  color: var(--color-gray-300);
  max-width: 600px;
  margin: 0 auto;
}

/* === CARDS === */
.card {
  background: rgba(26, 26, 26, 0.8);
  border: 1px solid var(--color-gray-700);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  backdrop-filter: blur(10px);
  transition: var(--transition-all);
}

.card:hover {
  border-color: var(--color-neural-primary);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
  transform: translateY(-5px);
}

/* === GRID LAYOUTS === */
.grid {
  display: grid;
  gap: var(--space-2xl);
}

.grid-cols-1 {
  grid-template-columns: 1fr;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .grid-cols-4,
  .grid-cols-3,
  .grid-cols-2 {
    grid-template-columns: 1fr;
  }
}

/* === FLEX LAYOUTS === */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-sm {
  gap: var(--space-sm);
}

.gap-md {
  gap: var(--space-md);
}

.gap-lg {
  gap: var(--space-lg);
}

.gap-xl {
  gap: var(--space-xl);
}

.gap-2xl {
  gap: var(--space-2xl);
}

/* === NEURAL GLOW EFFECTS === */
.neural-glow {
  position: relative;
}

.neural-glow::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, var(--color-neural-primary), var(--color-neural-accent), var(--color-neural-primary));
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  filter: blur(10px);
  transition: var(--transition-all);
}

.neural-glow:hover::before {
  opacity: 0.7;
}

/* === IMAGE PLACEHOLDERS === */
.image-placeholder,
.logo-placeholder {
  background: linear-gradient(135deg, var(--color-gray-800), var(--color-gray-700));
  border: 2px dashed var(--color-gray-600);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gray-400);
  font-family: var(--font-secondary);
  font-weight: var(--font-secondary-weight-regular);
  transition: var(--transition-all);
}

.image-placeholder:hover,
.logo-placeholder:hover {
  border-color: var(--color-neural-primary);
  color: var(--color-neural-primary);
}

/* === SCROLL INDICATOR === */
.scroll-indicator {
  position: absolute;
  bottom: var(--space-2xl);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--color-neural-primary);
  border-bottom: 2px solid var(--color-neural-primary);
  transform: rotate(45deg);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: rotate(45deg) translateY(0);
  }
  40% {
    transform: rotate(45deg) translateY(-10px);
  }
  60% {
    transform: rotate(45deg) translateY(-5px);
  }
}