/* ===================================
   CORE FOUNDATION
   =================================== */

/* MODERN COLOR SCHEME & VARIABLES */
:root {
  /* Color Palette */
  --primary: #dc2626;
  --primary-dark: #b91c1c;
  --primary-light: #ef4444;
  --secondary: #7c3aed;
  --secondary-dark: #6d28d9;
  --secondary-light: #8b5cf6;
  --accent: #f59e0b;
  --accent-neon: #06b6d4;
  --neon-pink: #ec4899;
  --neon-green: #10b981;
  --carousel-bg: #0a0a0f;
  --text-primary: #f5f0e8;
  --text-secondary: #a8a199;
  --accent: #d4af37;
  --accent-glow: rgba(212, 175, 55, 0.3);
  --card-bg: #1a1a24;
  --shadow-color: rgba(0, 0, 0, 0.6);

  /* Neutral Colors */
  --dark: #0f172a;
  --dark-light: #1e293b;
  --gray: #475569;
  --gray-light: #94a3b8;
  --gray-lighter: #e2e8f0;
  --gray-lightest: #f1f5f9;
  --white: #ffffff;
  --black: #000000;
  --color-darker: #05050c;
  --color-gray-800: #171b26;

  /* Status Colors */
  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  --info: #3b82f6;

  /* Background Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-dark: #000000;
  --bg-overlay: rgba(15, 23, 42, 0.8);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--primary), var(--primary-dark));
  --gradient-secondary: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
  --gradient-hero: linear-gradient(135deg, var(--secondary), var(--primary));
  --gradient-neon: linear-gradient(135deg, var(--neon-pink), var(--accent-neon));

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-25: 6rem;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  /* Shadows */
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-neon: 0 0 20px rgba(220, 38, 38, 0.3);
  --shadow-neon-purple: 0 0 30px rgba(124, 58, 237, 0.4);

  /* Borders */
  --border-radius: 0.75rem;
  --border-radius-sm: 0.5rem;
  --border-radius-lg: 1rem;
  --border-radius-xl: 1.5rem;
  --border-radius-full: 9999px;

  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-index */
  --z-negative: -1;
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-overlay: 400;
  --z-modal-backdrop: 500;
  --z-modal: 600;
  --z-popover: 700;
  --z-tooltip: 800;
  --z-toast: 900;
  --z-age-gate: 950;
  --z-critical: 1000;
  --z-chat: 2147483647;

  /* Animations */
  --float-animation: float 6s ease-in-out infinite;
  --glow-animation: glow 2s ease-in-out infinite alternate;
  --slide-up: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;

  /* Mobile Safe Areas */
  --safe-area-inset-top: env(safe-area-inset-top);
  --safe-area-inset-bottom: env(safe-area-inset-bottom);
  --safe-area-inset-left: env(safe-area-inset-left);
  --safe-area-inset-right: env(safe-area-inset-right);
}

/* ENHANCED RESET & BASE STYLES */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #b91c1c;
  color: white;
  padding: 8px 16px;
  z-index: 1000;
  text-decoration: none;
  border-radius: 0 0 4px 0;
}
.skip-link:focus {
  top: 0;
}

:focus {
  outline: 2px solid #dc2626;
  outline-offset: 2px;
}
:focus:not(:focus-visible) {
  outline: none;
}
:focus-visible {
  outline: 2px solid #dc2626;
  outline-offset: 2px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scroll-padding-top: 120px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--text-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeSpeed;
  background: radial-gradient(circle at center, #530505, #5b0140eb, #000000);
  background-image: url(/assets/images/homepage/contact-us.webp);
  background-attachment: fixed;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, transparent 20%, rgba(0,0,0,0.4) 100%);
  pointer-events: none;
  z-index: -1;
}
body.modal-open .header {
  z-index: calc(var(--z-modal) - 150) !important;
  pointer-events: none;
}
body:not(.modal-open) .header {
  pointer-events: auto;
}
body.modal-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

ul, ol {
  list-style: none;
}

/* ENHANCED UTILITY CLASSES */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-4);
  padding-left: calc(var(--space-4) + var(--safe-area-inset-left));
  padding-right: calc(var(--space-4) + var(--safe-area-inset-right));
}

.w-full { width: 100%; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.d-flex { display: flex; }
.d-grid { display: grid; }
.d-none { display: none; }
.d-block { display: block; }

.fade-in { animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.slide-up { animation: var(--slide-up); }
.float { animation: var(--float-animation); }
.neon-pulse { animation: neonPulse 2s ease-in-out infinite; }

.loading {
  text-align: center;
  padding: var(--space-8);
  color: var(--gray);
  font-size: var(--text-lg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* CUSTOM ANIMATIONS */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

@keyframes glow {
  from { box-shadow: 0 0 20px rgba(220, 38, 38, 0.3); }
  to { box-shadow: 0 0 30px rgba(220, 38, 38, 0.6), 0 0 40px rgba(124, 58, 237, 0.4); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(100px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInFromBottom {
  from { opacity: 0; transform: translateY(100px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes neonPulse {
  0%, 100% { text-shadow: 0 0 10px rgba(236, 72, 153, 0.8); }
  50% { text-shadow: 0 0 20px rgba(236, 72, 153, 1), 0 0 30px rgba(236, 72, 153, 0.6); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(-50px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

@keyframes pulse-whatsapp {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes gentleFlow {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

/* 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;
    scroll-behavior: auto !important;
  }
}