:root {
  --avialert-orange: #F66B3D;
  --avialert-orange-dark: #E55A2C;
  --avialert-black: #000000;
  --avialert-white: #F4F4F4;
  --avialert-gray-dark: #1F1F1F;
  --avialert-gray-medium: #2D2D2D;
  --avialert-gray-light: #434343;
  --avialert-dark-bg: #080808;
  --avialert-card-bg: #181818;
  --avialert-body-text: #D4D4D4;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
  --shadow-xl: 0 12px 40px rgba(0,0,0,0.25);
}

/* Custom utility classes to use brand colors with Tailwind */
.bg-brand-orange {
  background-color: var(--avialert-orange);
}

.text-brand-orange {
  color: var(--avialert-orange);
}

.ring-brand-orange {
  --tw-ring-color: var(--avialert-orange);
}

.hover\:bg-brand-orange-dark:hover {
    background-color: var(--avialert-orange-dark);
}

/* Enhanced hover effects and transitions */
.enhanced-hover {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.enhanced-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.btn-primary {
  background: linear-gradient(135deg, var(--avialert-orange), var(--avialert-orange-dark));
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(246, 107, 61, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--avialert-orange-dark), #E55A2C);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(246, 107, 61, 0.4);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-primary:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(246, 107, 61, 0.3), 0 4px 12px rgba(246, 107, 61, 0.35);
}

.btn-primary:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(246, 107, 61, 0.3);
}

/* Enhanced button shine effect */
.btn-primary::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.6s ease;
}

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

/* Smooth animations */
.animate-fade-in {
  animation: fadeIn 0.8s ease-out;
}

.animate-slide-up {
  animation: slideUp 0.8s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* Reveal animations for sections */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.1s;
}

.reveal-delay-2 {
  transition-delay: 0.2s;
}

.reveal-delay-3 {
  transition-delay: 0.3s;
}

/* Core Pillars Section Styles */
.pillars {
  background: var(--avialert-dark-bg);
  padding: 80px 24px; /* Increased vertical padding */
}

.pillars-inner {
  max-width: 1080px; /* Increased max-width to accommodate wider gaps */
  margin: 0 auto;
}

.pillars-label {
  text-align: center;
  color: var(--avialert-body-text);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 32px;
}

.pillars-grid {
  display: flex;
  justify-content: center;
  gap: 32px; /* Increased gap */
  flex-wrap: wrap; /* Ensures stacking on smaller screens */
}

.pillar-card {
  background: var(--avialert-card-bg);
  border-radius: 20px;
  padding: 28px 24px;
  max-width: 320px;
  box-shadow: var(--shadow-lg);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.pillar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--avialert-orange);
  width: 0%;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pillar-card:hover::before {
  width: 100%;
}

.pillar-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  background: rgba(24, 24, 24, 0.98);
}

.pillar-icon {
  width: 36px;
  height: auto;
  margin-bottom: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.8;
}

.pillar-card:hover .pillar-icon {
  transform: scale(1.15);
  opacity: 1;
}

.pillar-card h3 {
  color: var(--avialert-white);
  font-size: 20px;
  font-weight: 600; /* Added semi-bold weight */
  margin-bottom: 8px;
}

.pillar-card p {
  color: var(--avialert-body-text);
  font-size: 16px;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .pillars {
    padding: 48px 16px;
  }
  .pillar-grid {
    gap: 24px;
  }
  .pillar-card {
    max-width: 100%;
  }
}

/* Feature cards enhancement */
.feature-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.feature-card img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover img {
  transform: scale(1.05);
}

/* Mobile aspect ratio adjustments for feature images */
@media (max-width: 768px) {
    /* Offline Maps: Keep tall ratio (already well-proportioned as 457×900) */
    .feature-card:first-child img {
        aspect-ratio: 1 / 2; /* Tall portrait - reveals more of map screenshot */
        height: auto;
        object-position: center;
    }
    
    /* Forecasts Terrain: Taller frame to show more weather/terrain content */
    .feature-card:nth-child(2) img {
        aspect-ratio: 4 / 5; /* Taller than default */
        height: auto;
        object-position: center 25%; /* Show upper weather maps more */
    }
    
    /* Weather Observations: Taller frame for weather detail visibility */
    .feature-card:nth-child(3) img {
        aspect-ratio: 3 / 4; /* Portrait-ish for instruments */
        height: auto;
        object-position: center top; /* Show top weather instruments more */
    }
}

/* Enhanced form feedback */
.form-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 500;
  animation: slideInUp 0.4s ease-out;
}

.form-error {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 500;
  animation: slideInUp 0.4s ease-out;
}

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

/* Typography enhancements */
.text-gradient {
  background: linear-gradient(135deg, var(--avialert-orange), var(--avialert-orange-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hero section parallax effect */
.hero-parallax {
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Button ripple effect */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.ripple:active::before {
  width: 300px;
  height: 300px;
}

.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transform: scale(0);
  animation: ripple-animation 0.6s ease-out;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Enhanced mobile responsiveness */
@media (max-width: 640px) {
  .hero-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.2) 100%);
  }
  
  .btn-primary {
    padding: 16px 24px;
    font-size: 16px;
  }
  
  .feature-card img {
    height: 200px;
    object-fit: cover;
  }
  
  .pillars-grid {
    gap: 16px;
  }
  
  .pillar-card {
    padding: 20px 16px;
  }
}

/* Touch-friendly enhancements */
@media (hover: none) {
  .enhanced-hover:hover,
  .feature-card:hover,
  .pillar-card:hover {
    transform: none;
  }
  
  .btn-primary {
    transition: background-color 0.2s ease;
  }
}

/* Loading state for images */
img {
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

.loaded img {
  opacity: 1;
}

/* Enhanced focus states for accessibility */
.btn-primary:focus-visible,
input:focus-visible {
  outline: 2px solid var(--avialert-orange);
  outline-offset: 2px;
}

/* Smooth transitions for color scheme */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Arc'teryx attribution removed */
