/*--------------------------------------------------------------
# Brand Improvements - January 2026
# Companion stylesheet for enhanced branding and UX
--------------------------------------------------------------*/

/* ============================================
   Brand Color Variables
   ============================================ */
:root {
  /* Official AltNrd Brand Colors */
  --brand-orange: #f76b1c;
  --brand-green: #7fd858;
  --brand-blue: #43bce3;
  --brand-yellow: #f9d663;
  --brand-purple: #6078ea;
  
  /* Gradient Overlays */
  --gradient-primary: linear-gradient(135deg, var(--brand-purple) 0%, var(--brand-blue) 100%);
  --gradient-secondary: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-yellow) 100%);
  --gradient-accent: linear-gradient(135deg, var(--brand-green) 0%, var(--brand-blue) 100%);
}

/* ============================================
   Logo Container Styling
   ============================================ */
.featured-item .logo-container {
  width: 120px;
  height: 120px;
  margin: 0 auto 18px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  position: relative;
  overflow: hidden;
}

/* Logo Container Inner Shadow */
.featured-item .logo-container::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 2px;
  background: linear-gradient(135deg, rgba(96,120,234,0.3), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.featured-item .logo-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: brightness(0.95);
  transition: filter 0.25s ease, transform 0.25s ease;
}

/* Hover State */
.featured-item:hover .logo-container {
  transform: translateY(-4px) scale(1.03);
  background: radial-gradient(circle at top, rgba(96,120,234,0.4), rgba(0,0,0,0.9));
  box-shadow: 0 10px 30px rgba(0,0,0,0.45), 0 0 40px rgba(96,120,234,0.2);
}

.featured-item:hover .logo-container::before {
  opacity: 1;
}

.featured-item:hover .logo-container img {
  filter: brightness(1.1);
  transform: scale(1.05);
}

/* ============================================
   Enhanced Card Hover Effects
   ============================================ */
.featured-item {
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

/* Animated Top Border */
.featured-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, 
    var(--brand-orange) 0%,
    var(--brand-green) 25%,
    var(--brand-blue) 50%,
    var(--brand-yellow) 75%,
    var(--brand-purple) 100%
  );
  background-size: 200% 100%;
  opacity: 0;
  transition: opacity 0.3s ease;
  animation: gradientShift 3s linear infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.featured-item:hover::before {
  opacity: 1;
}

/* Glow Effect */
.featured-item::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: var(--gradient-primary);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.featured-item:hover::after {
  opacity: 0.6;
}

/* ============================================
   Product-Specific Brand Colors
   ============================================ */
/* BAcTrakr - Orange */
.featured-item:nth-child(1):hover .icon-circle,
.featured-item:nth-child(1):hover .logo-container {
  background: radial-gradient(circle at top, rgba(247,107,28,0.4), rgba(0,0,0,0.9));
  box-shadow: 0 10px 30px rgba(0,0,0,0.45), 0 0 40px rgba(247,107,28,0.3);
}

.featured-item:nth-child(1):hover::after {
  background: var(--brand-orange);
}

/* AltArmor - Green */
.featured-item:nth-child(2):hover .icon-circle,
.featured-item:nth-child(2):hover .logo-container {
  background: radial-gradient(circle at top, rgba(127,216,88,0.4), rgba(0,0,0,0.9));
  box-shadow: 0 10px 30px rgba(0,0,0,0.45), 0 0 40px rgba(127,216,88,0.3);
}

.featured-item:nth-child(2):hover::after {
  background: var(--brand-green);
}

/* WTF.Recipes - Yellow */
.featured-item:nth-child(3):hover .icon-circle,
.featured-item:nth-child(3):hover .logo-container {
  background: radial-gradient(circle at top, rgba(249,214,99,0.4), rgba(0,0,0,0.9));
  box-shadow: 0 10px 30px rgba(0,0,0,0.45), 0 0 40px rgba(249,214,99,0.3);
}

.featured-item:nth-child(3):hover::after {
  background: var(--brand-yellow);
}

/* AltPod - Blue */
.featured-item:nth-child(4):hover .icon-circle,
.featured-item:nth-child(4):hover .logo-container {
  background: radial-gradient(circle at top, rgba(67,188,227,0.4), rgba(0,0,0,0.9));
  box-shadow: 0 10px 30px rgba(0,0,0,0.45), 0 0 40px rgba(67,188,227,0.3);
}

.featured-item:nth-child(4):hover::after {
  background: var(--brand-blue);
}

/* ============================================
   Typography Scale Improvements
   ============================================ */
h1 { 
  font-size: clamp(2.2rem, 4vw, 3rem); 
  line-height: 1.2; 
  font-weight: 700;
}

h2 { 
  font-size: clamp(1.8rem, 3vw, 2.5rem); 
  line-height: 1.25; 
  font-weight: 700;
}

h3 { 
  font-size: clamp(1.4rem, 2.5vw, 1.8rem); 
  line-height: 1.3; 
  font-weight: 600;
}

h4 { 
  font-size: 1.25rem; 
  line-height: 1.4;
  font-weight: 600;
}

h5 { 
  font-size: 1.1rem; 
  line-height: 1.4;
  font-weight: 500;
}

h6 { 
  font-size: 0.95rem; 
  line-height: 1.5;
  font-weight: 500;
}

/* Hero Specific Typography */
.hero-content h1,
.hero-content h2 {
  font-size: clamp(2.2rem, 4vw, 3rem);
  line-height: 1.2;
}

.hero-content h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  line-height: 1.3;
  font-weight: 500;
}

/* ============================================
   Mobile Optimizations
   ============================================ */
@media (max-width: 768px) {
  /* Logo Container */
  .featured-item .logo-container {
    width: 100px;
    height: 100px;
    padding: 12px;
    margin-bottom: 15px;
  }
  
  /* Reduce animation intensity on mobile */
  .featured-item:hover .logo-container {
    transform: translateY(-2px) scale(1.02);
  }
  
  /* Typography adjustments */
  h1 { font-size: clamp(1.8rem, 6vw, 2.2rem); }
  h2 { font-size: clamp(1.5rem, 5vw, 1.8rem); }
  h3 { font-size: clamp(1.2rem, 4vw, 1.4rem); }
  
  /* Hero mobile */
  .hero.section {
    min-height: 60vh;
    padding: 2rem 1rem;
  }
  
  .hero-content {
    padding: 30px 15px;
  }
}

/* ============================================
   Service Name Text Wrap Fix
   ============================================ */
.service-name {
  white-space: normal !important;
  word-wrap: break-word !important;
  line-height: 1.4;
  max-width: 100%;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
}

/* ============================================
   Benefits Grid Enhancement
   ============================================ */
@media (max-width: 768px) {
  #benefits .benefits-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  #benefits .benefit-item {
    padding: 1.5rem;
  }
}

/* ============================================
   Accessibility Improvements
   ============================================ */
/* Focus visible for keyboard navigation */
.featured-item:focus-visible,
.btn-get-started:focus-visible,
.open-modal-button:focus-visible {
  outline: 3px solid var(--brand-purple);
  outline-offset: 4px;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .featured-item::before {
    animation: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .featured-item {
    border: 2px solid currentColor;
  }
  
  .featured-item:hover {
    border-color: var(--brand-purple);
  }
}

/* ============================================
   Performance Optimizations
   ============================================ */
/* GPU acceleration for animations */
.featured-item,
.logo-container,
.logo-container img {
  will-change: transform;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Remove will-change after animation completes */
.featured-item:not(:hover) {
  will-change: auto;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
  .featured-item::before,
  .featured-item::after {
    display: none;
  }
  
  .logo-container {
    background: transparent !important;
    box-shadow: none !important;
  }
}