/* Theme CSS - A&L Home Solutions */
/* Uniform Gold and Black Design System */

:root {
  /* Core Black and Gold Palette */
  --background: #000000;
  --foreground: #ffffff;
  --card: #0a0a0a;
  --card-foreground: #ffffff;
  --popover: #111111;
  --popover-foreground: #ffffff;
  --primary: #FFD700;
  --primary-foreground: #000000;
  --secondary: #1a1a1a;
  --secondary-foreground: #ffffff;
  --muted: #0f0f0f;
  --muted-foreground: #888888;
  --accent: #B8860B;
  --accent-foreground: #ffffff;
  --destructive: #dc2626;
  --destructive-foreground: #ffffff;
  --border: #333333;
  --input: #1a1a1a;
  --ring: #FFD700;
  --radius: 0.75rem;
  
  /* Gold Variations for Consistency */
  --gold-50: #fffbeb;
  --gold-100: #fef3c7;
  --gold-200: #fde68a;
  --gold-300: #fcd34d;
  --gold-400: #fbbf24;
  --gold-500: #f59e0b;
  --gold-600: #d97706;
  --gold-700: #b45309;
  --gold-800: #92400e;
  --gold-900: #78350f;
  --gold-primary: #FFD700;
  --gold-accent: #B8860B;
  --gold-dark: #92400e;
  
  /* Black Variations for Depth */
  --black-50: #fafafa;
  --black-100: #f5f5f5;
  --black-200: #e5e5e5;
  --black-300: #d4d4d4;
  --black-400: #a3a3a3;
  --black-500: #737373;
  --black-600: #525252;
  --black-700: #404040;
  --black-800: #262626;
  --black-900: #171717;
  --black-primary: #000000;
  --black-secondary: #1a1a1a;
  --black-tertiary: #262626;
  
  /* Modern Design System Variables */
  --glass-bg: rgba(255, 215, 0, 0.05);
  --glass-border: rgba(255, 215, 0, 0.1);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --gradient-primary: linear-gradient(135deg, #FFD700 0%, #B8860B 50%, #FFD700 100%);
  --gradient-secondary: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(184, 134, 11, 0.05) 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%);
  --blur-sm: blur(8px);
  --blur-md: blur(16px);
  --blur-lg: blur(24px);
  --shadow-gold: 0 0 20px rgba(255, 215, 0, 0.4);
  --shadow-gold-hover: 0 0 30px rgba(255, 215, 0, 0.6);
  --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --transition-spring: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  
  /* Enhanced Responsive Breakpoints */
  --breakpoint-xs: 320px;
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;
  
  /* Container Sizes */
  --container-xs: 100%;
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1536px;
  
  /* Performance Optimizations */
  --gpu-accelerated: transform translateZ(0);
  --will-change-transform: will-change transform;
  --will-change-opacity: will-change opacity;
}

/* Dark Mode Support */
@media (prefers-color-scheme: light) {
  :root {
    --background: #ffffff;
    --foreground: #000000;
    --card: #f8f8f8;
    --card-foreground: #000000;
    --popover: #f1f1f1;
    --popover-foreground: #000000;
    --secondary: #f5f5f5;
    --secondary-foreground: #000000;
    --muted: #f9f9f9;
    --muted-foreground: #666666;
    --border: #e5e5e5;
    --input: #f0f0f0;
    --glass-bg: rgba(0, 0, 0, 0.05);
    --glass-border: rgba(0, 0, 0, 0.1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  font-size: 16px;
}

body {
  background-color: var(--background) !important;
  color: var(--foreground);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* Content visibility */
.content {
  visibility: visible;
  opacity: 1;
}

/* Focus Management for Accessibility */
*:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

*:focus:not(:focus-visible) {
  outline: none;
}

*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Screen Reader Only Content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip to Main Content Link */
.skip-to-main {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 10000;
  transition: top 0.3s;
}

.skip-to-main:focus {
  top: 6px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.3);
    --primary: #FFFF00;
    --accent: #FF8C00;
  }
  
  .glass-card {
    border: 2px solid var(--primary);
  }
}

/* Eye-Catching CSS Effects */

/* Floating Animation for Key Elements */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.4); }
  50% { box-shadow: 0 0 30px rgba(255, 215, 0, 0.8); }
}

/* Glow Effect for CTA Buttons */
.glow-button {
  animation: glow 2s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Hero Title Effects */
.hero-title {
  animation: float 6s ease-in-out infinite;
  text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
  background: linear-gradient(45deg, #FFD700, #FFA500, #FFD700);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: float 6s ease-in-out infinite, shimmer 3s linear infinite;
}

/* Gold Accents with Glow */
.gold-accent {
  position: relative;
  overflow: hidden;
}

.gold-accent::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.4), transparent);
  animation: shimmer 2s infinite;
}

/* Enhanced Button Effects */
button, .cta-nav-btn, a[class*="bg-gradient"] {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

button::before, .cta-nav-btn::before, a[class*="bg-gradient"]::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

button:hover::before, .cta-nav-btn:hover::before, a[class*="bg-gradient"]:hover::before {
  width: 300px;
  height: 300px;
}

/* Keep top nav CTA text clear and black */
.cta-nav-btn {
  color: #000000 !important;
  text-shadow: none !important;
}

.cta-nav-btn::before {
  content: none !important;
}

.cta-nav-btn svg,
.cta-nav-btn span {
  color: inherit;
}

.snowfall-hidden {
  display: none;
}

.progress-fill-initial {
  width: 25%;
}

/* Reusable icon baseline to prevent rendering artifacts */
.icon-svg {
  display: inline-block;
  width: 1em;
  height: 1em;
  fill: currentColor;
  background: transparent !important;
  flex-shrink: 0;
  vertical-align: middle;
}

/* Apply safe defaults to all inline SVG icons on the site */
svg {
  background: transparent;
  shape-rendering: geometricPrecision;
}

.cash-fab {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: linear-gradient(135deg, #eab308, #ca8a04);
  color: #000000;
  border: 1px solid rgba(234, 179, 8, 0.75);
  box-shadow: 0 10px 24px rgba(234, 179, 8, 0.35);
  z-index: 9999;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.cash-fab:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 12px 28px rgba(234, 179, 8, 0.45);
}

.cash-fab:focus-visible {
  outline: 2px solid #facc15;
  outline-offset: 2px;
}

.cash-fab__icon {
  display: block;
  width: 24px;
  height: 24px;
  fill: #000000;
  background: transparent !important;
}

.consent-checkbox {
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
  border: 2px solid rgba(234, 179, 8, 0.7);
  background-color: transparent !important;
  accent-color: #d4af37;
}

.consent-checkbox:checked {
  background-color: #d4af37 !important;
  border-color: #d4af37 !important;
}

/* Card Hover Effects */
.glass-card, .bg-black\/60 {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.glass-card:hover, .bg-black\/60:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 20px 40px rgba(255, 215, 0, 0.3);
}

/* Icon Pulse Effects */
.fa-phone, .fa-envelope, .fa-calculator, 
.fa-home, .fa-cogs, .fa-info-circle, .fa-quote-left, 
.fa-map-marker-alt, .fa-bars, .fa-times, .fa-paper-plane, 
.fa-clock, .fa-user, .fa-star, .fa-play, .fa-handshake, 
.fa-dollar-sign, .fa-search, .fa-shield-alt, .fa-map-marked-alt {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Text Gradient on Hover */
.text-gradient-hover {
  background: linear-gradient(45deg, #FFD700, #FFA500);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: background-position 0.3s ease;
}

.text-gradient-hover:hover {
  background-position: 100% 0;
}

/* Border Animation */
.border-animated {
  position: relative;
  border: 2px solid transparent;
  background: linear-gradient(#000, #000) padding-box,
              linear-gradient(45deg, #FFD700, #FFA500, #FFD700) border-box;
  background-size: 200% 200%;
  animation: shimmer 3s linear infinite;
}

/* Spotlight Effect */
.spotlight {
  position: relative;
  overflow: hidden;
}

.spotlight::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.spotlight:hover::after {
  opacity: 1;
}

/* Loading Shimmer for Stats */
.stat-number {
  background: linear-gradient(90deg, #FFD700, #FFA500, #FFD700);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 2s linear infinite;
}

/* Floating Action Button Enhancement */
.fixed.bottom-8.right-8 {
  animation: float 3s ease-in-out infinite, glow 2s ease-in-out infinite;
}

/* Timeline Step Animations */
.timeline-step-simple {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-step-simple:hover {
  transform: translateY(-8px) rotate(2deg);
  filter: brightness(1.2);
}

/* Form Input Focus Effects */
input:focus, textarea:focus {
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2),
              0 0 20px rgba(255, 215, 0, 0.4);
  transform: scale(1.02);
}

/* Navigation Link Underline Animation */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #FFD700, #FFA500);
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 80%;
}

/* Holiday Snowfall Effect */
.snowfall-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.snowflake {
  position: absolute;
  top: -10px;
  color: rgba(255, 255, 255, 0.8);
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
  animation: snowfall linear infinite;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

/* Different snowflake sizes and speeds */
.snowflake:nth-child(odd) {
  font-size: 10px;
  animation-duration: 15s;
  opacity: 0.6;
}

.snowflake:nth-child(even) {
  font-size: 14px;
  animation-duration: 20s;
  opacity: 0.8;
}

.snowflake:nth-child(3n) {
  font-size: 8px;
  animation-duration: 12s;
  opacity: 0.4;
}

.snowflake:nth-child(4n) {
  font-size: 12px;
  animation-duration: 18s;
  opacity: 0.7;
}

.snowflake:nth-child(5n) {
  font-size: 16px;
  animation-duration: 25s;
  opacity: 0.9;
}

@keyframes snowfall {
  0% {
    transform: translateY(-100px) translateX(0) rotate(0deg);
    opacity: 0;
  }
  
  10% {
    opacity: 1;
  }
  
  90% {
    opacity: 1;
  }
  
  100% {
    transform: translateY(calc(100vh + 100px)) translateX(50px) rotate(360deg);
    opacity: 0;
  }
}

/* Gentle sway effect */
@keyframes sway {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(20px);
  }
}

/* Apply sway to some snowflakes */
.snowflake:nth-child(3n+1) {
  animation: snowfall linear infinite, sway 3s ease-in-out infinite;
}

.snowflake:nth-child(5n+2) {
  animation: snowfall linear infinite, sway 4s ease-in-out infinite reverse;
}

/* Gold-tinted snowflakes for brand consistency */
.snowflake:nth-child(7n) {
  color: rgba(255, 215, 0, 0.6);
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.snowflake:nth-child(11n) {
  color: rgba(255, 215, 0, 0.4);
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.3);
}
