/* ============================================================
   MAIN.CSS — Chris Innovations Design System
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800;900&display=swap');

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
  /* Brand Colors */
  --primary: #125AE7;
  --primary-deep: #1700B5;
  --primary-light: #4a7ff0;
  --primary-gradient: linear-gradient(135deg, #125AE7 0%, #1700B5 100%);

  /* Neutrals */
  --white: #ffffff;
  --black: #0a0f1e;
  --surface-1: #f8f9fb;
  --surface-2: #eef1f8;
  --text-primary: #0a0f1e;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --border: rgba(18, 90, 231, 0.12);

  /* Shadows */
  --shadow-sm: 0 4px 12px -2px rgba(23, 0, 181, 0.06);
  --shadow-md: 0 12px 24px -6px rgba(23, 0, 181, 0.08);
  --shadow-lg: 0 24px 48px -12px rgba(23, 0, 181, 0.10);
  --shadow-xl: 0 40px 80px -20px rgba(23, 0, 181, 0.12);

  /* Typography */
  --font: 'Manrope', system-ui, -apple-system, sans-serif;
  --text-xs: clamp(0.75rem, 1.5vw, 0.875rem);
  --text-sm: clamp(0.875rem, 1.8vw, 1rem);
  --text-base: clamp(1rem, 2vw, 1.125rem);
  --text-lg: clamp(1.125rem, 2.2vw, 1.25rem);
  --text-xl: clamp(1.25rem, 2.5vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 3vw, 2rem);
  --text-3xl: clamp(2rem, 4vw, 2.75rem);
  --text-4xl: clamp(2.5rem, 5vw, 3.5rem);
  --text-5xl: clamp(3rem, 6vw, 4.5rem);

  /* Spacing */
  --section-py: 80px;
  --container-max: 1280px;
  --container-px: clamp(20px, 5vw, 80px);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Transitions */
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);

  /* Navbar */
  --navbar-height: 80px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
  list-style: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--font);
}

input, textarea, select {
  font-family: var(--font);
}

/* ============================================================
   PAGE LOADER — GLOW EFFECT (NO ROTATION)
   ============================================================ */
#page-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #0a0f1e;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#page-loader.loader-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.loader-logo {
  width: 180px;
  height: auto;
  animation: logoGlow 1.5s ease-in-out infinite alternate;
}

@keyframes logoGlow {
  from {
    filter: drop-shadow(0 0 10px #125AE7) drop-shadow(0 0 20px #125AE7);
  }
  to {
    filter: drop-shadow(0 0 30px #125AE7) drop-shadow(0 0 60px #1700B5) drop-shadow(0 0 100px #125AE7);
  }
}

.loader-tagline {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: fadeInUp 0.8s ease 0.3s both;
}

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

.loader-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--primary-gradient);
  animation: progressFill 2.2s ease forwards;
  box-shadow: 0 0 12px rgba(18, 90, 231, 0.8);
}

@keyframes progressFill {
  0%   { width: 0%; }
  60%  { width: 75%; }
  90%  { width: 95%; }
  100% { width: 100%; }
}

/* ============================================================
   CONTAINER & LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-px);
}

.section {
  padding-block: var(--section-py);
}

.section-sm {
  padding-block: 48px;
}

.section-lg {
  padding-block: 120px;
}

/* ============================================================
   GRID SYSTEM
   ============================================================ */
.grid {
  display: grid;
  gap: 32px;
}

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

.grid-auto-3 {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.grid-auto-4 {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

/* Flex utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.display-title {
  font-size: var(--text-5xl);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.section-title {
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 600px;
}

.text-center { text-align: center; }
.text-white { color: var(--white); }
.text-primary-color { color: var(--primary); }
.text-muted { color: var(--text-muted); }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 16px;
}

.section-label::before {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: var(--primary-gradient);
  border-radius: 2px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
  border: none;
}

.btn-primary {
  background: var(--primary-gradient);
  color: var(--white);
  box-shadow: 0 8px 24px -4px rgba(18, 90, 231, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -6px rgba(18, 90, 231, 0.5);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-white {
  background: var(--white);
  color: var(--primary);
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.15);
}

.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -6px rgba(0, 0, 0, 0.2);
}

.btn-white-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.6);
}

.btn-white-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--white);
}

.btn-lg {
  padding: 18px 44px;
  font-size: 1.0625rem;
}

.btn-sm {
  padding: 10px 22px;
  font-size: 0.875rem;
}

/* ============================================================
   IMAGE OVERLAY UTILITIES
   ============================================================ */
.img-overlay {
  position: relative;
  overflow: hidden;
}

.img-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 30, 0.6);
}

.img-overlay-blue::after {
  background: rgba(18, 90, 231, 0.88);
}

.img-overlay-dark::after {
  background: rgba(10, 15, 30, 0.75);
}

.img-overlay > * {
  position: relative;
  z-index: 1;
}

/* ============================================================
   SECTION BACKGROUNDS
   ============================================================ */
.bg-dark { background: var(--black); }
.bg-surface { background: var(--surface-1); }
.bg-white { background: var(--white); }
.bg-gradient {
  background: linear-gradient(135deg, var(--black) 0%, #0d1535 100%);
}

/* ============================================================
   LOGO
   ============================================================ */
.nav-logo {
  height: 52px;
  width: auto;
  display: block;
  transition: height var(--transition);
}

/* ============================================================
   DIVIDER
   ============================================================ */
.divider {
  width: 64px;
  height: 4px;
  background: var(--primary-gradient);
  border-radius: 4px;
  margin-block: 16px;
}

.divider-center { margin-inline: auto; }

/* ============================================================
   CARD BASE
   ============================================================ */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition);
}

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

/* ============================================================
   BADGE / TAG
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: rgba(18, 90, 231, 0.08);
  color: var(--primary);
}

/* ============================================================
   ICON CIRCLE
   ============================================================ */
.icon-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(18, 90, 231, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.5rem;
  color: var(--primary);
  transition: all var(--transition);
}

.icon-circle-lg {
  width: 80px;
  height: 80px;
  font-size: 2rem;
}

.icon-circle-gradient {
  background: var(--primary-gradient);
  color: var(--white);
  box-shadow: 0 8px 20px -4px rgba(18, 90, 231, 0.4);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  :root {
    --section-py: 64px;
  }

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

@media (max-width: 768px) {
  :root {
    --section-py: 48px;
    --navbar-height: 68px;
  }

  .nav-logo {
    height: 44px;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .display-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .section-title {
    font-size: clamp(1.75rem, 6vw, 2.25rem);
  }
}

@media (max-width: 480px) {
  :root {
    --section-py: 40px;
    --container-px: 20px;
  }
}
