/* ==========================================================================
   NextChaat - Core Design System & Global Styles
   Author: Mohamed Jammoun (Digital Solutions & AI Growth Architect)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Cairo:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Color Palette - Classic Luxury Black, White & Sapphire Blue #5170ff */
  --bg-deep: #050507;
  --bg-surface: #0b0b0e;
  --bg-elevated: #131317;
  --bg-card: rgba(18, 18, 22, 0.85);
  --bg-card-hover: rgba(26, 26, 32, 0.95);

  --accent-primary: #5170ff;
  --accent-primary-hover: #708bff;
  --accent-primary-glow: rgba(81, 112, 255, 0.4);

  /* Unified luxury #5170ff aliases */
  --accent-red: #5170ff;
  --accent-red-hover: #708bff;
  --accent-crimson: #3b5beb;
  --accent-dark-red: #1e2f97;
  --accent-red-glow: rgba(81, 112, 255, 0.4);

  --accent-cyan: #5170ff;
  --accent-cyan-glow: rgba(81, 112, 255, 0.4);
  --accent-blue: #3b5beb;
  --accent-violet: #253cb8;
  --accent-purple: #5170ff;
  --accent-gold: #f59e0b;
  --accent-emerald: #10b981;

  /* Gradients */
  --grad-primary: linear-gradient(135deg, #5170ff 0%, #3b5beb 50%, #253cb8 100%);
  --grad-red: linear-gradient(135deg, #5170ff 0%, #253cb8 100%);
  --grad-cyan-blue: linear-gradient(135deg, #5170ff 0%, #253cb8 100%);
  --grad-violet-pink: linear-gradient(135deg, #5170ff 0%, #253cb8 100%);
  --grad-hero-text: linear-gradient(135deg, #ffffff 25%, #a9baff 65%, #5170ff 100%);
  --grad-glow-mesh: radial-gradient(circle at 50% 0%, rgba(81, 112, 255, 0.16), transparent 60%),
                    radial-gradient(circle at 85% 25%, rgba(59, 91, 235, 0.08), transparent 50%),
                    radial-gradient(circle at 15% 75%, rgba(37, 60, 184, 0.08), transparent 45%);

  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: #a3a3a3;
  --text-muted: #737373;
  --text-inverse: #050507;

  /* Borders & Shadows */
  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-light: rgba(255, 255, 255, 0.16);
  --border-glow: rgba(81, 112, 255, 0.4);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.8);
  --shadow-neon: 0 0 30px rgba(81, 112, 255, 0.3);
  --shadow-red-neon: 0 0 35px rgba(81, 112, 255, 0.35);

  /* Typography */
  --font-base: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-arabic: 'Cairo', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Transitions */
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --container-max: 1240px;
  --header-height: 80px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;
}

/* Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  position: relative;
  background-color: var(--bg-deep);
  background-image: var(--grad-glow-mesh);
  background-attachment: fixed;
  background-repeat: no-repeat;
  line-height: 1.65;
}

/* Typography Defaults */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
}

p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: 1rem;
}

ul, ol {
  list-style: none;
}

/* Container & Layout */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.section {
  padding-top: 6.5rem;
  padding-bottom: 6.5rem;
  position: relative;
  overflow: hidden;
  max-width: 100%;
}

.section-alt {
  background: rgba(11, 11, 14, 0.6);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

/* Section Header Styles */
.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 3.5rem auto;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  background: rgba(81, 112, 255, 0.1);
  border: 1px solid rgba(81, 112, 255, 0.3);
  color: #8fa6ff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(8px);
}

.section-badge.purple {
  background: rgba(81, 112, 255, 0.1);
  border-color: rgba(81, 112, 255, 0.3);
  color: #8fa6ff;
}

.section-badge.green {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.section-title {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  font-weight: 800;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Gradient Text Utilities */
.text-gradient {
  background: var(--grad-hero-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-cyan {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-violet {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Glassmorphism Card Utility */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.glass-card:hover {
  border-color: rgba(81, 112, 255, 0.35);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.glass-card-glow:hover {
  border-color: rgba(81, 112, 255, 0.5);
  box-shadow: var(--shadow-neon);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--grad-primary);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 20px var(--accent-red-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(81, 112, 255, 0.65);
  background: linear-gradient(135deg, #708bff 0%, #5170ff 50%, #253cb8 100%);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.btn-whatsapp {
  background: #25d366;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.35);
}

.btn-whatsapp:hover {
  background: #20bd5a;
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(37, 211, 102, 0.5);
}

.btn-lg {
  padding: 1.1rem 2.25rem;
  font-size: 1.1rem;
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
}

/* Global Grid Utilities */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

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

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  .section {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }
}

/* Animations */
@keyframes floatAnimation {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.05); }
}

.animate-float {
  animation: floatAnimation 4s ease-in-out infinite;
}

.animate-pulse {
  animation: pulseGlow 3s ease-in-out infinite;
}
