/* Google Fonts are now loaded non-blocking via index.html preload link */
/* Fallback: system fonts render instantly before webfonts load */


:root {
  --color-primary: #163f91;
  --color-secondary: #faa916;
  --color-cyan-400: #00f0ff;
  --color-purple-400: #b300ff;
  --animate-border-pulse: border-pulse 4s infinite ease-in-out;
}

@keyframes border-pulse {

  0%,
  100% {
    opacity: 0.3;
  }

  50% {
    opacity: 0.6;
  }
}

:root {
  /* Brand Colors */
  --primary: #163f91;
  --primary-light: #2d5eb8;
  --primary-dark: #0e2a63;
  --secondary: #faa916;
  /* Complementary gold/yellow for accents */

  /* Gradients */
  --primary-gradient: linear-gradient(135deg, #163f91 0%, #2d5eb8 100%);
  --surface-gradient: linear-gradient(135deg, #ffffff 0%, #f3f6fc 100%);

  /* Neutrals - Light Theme */
  --bg-body: #ffffff;
  --bg-surface: #f8f9fc;
  --bg-card: #ffffff;
  --text-primary: #1a1a1a;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --border-color: #e2e8f0;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(22, 63, 145, 0.1), 0 2px 4px -1px rgba(22, 63, 145, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(22, 63, 145, 0.1), 0 4px 6px -2px rgba(22, 63, 145, 0.05);
  --shadow-glow: 0 0 20px rgba(22, 63, 145, 0.15);

  /* Layout */
  --container-padding: 1.5rem;
  --border-radius: 12px;
  --transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease, border-color 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  /* Improve scroll performance */
  overscroll-behavior-y: none;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-surface);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  /* Smooth hardware accelerated scrolling */
  -webkit-overflow-scrolling: touch;
}

/* Optimization for all motion elements */
.motion-safe {
  will-change: transform, opacity;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Outfit', sans-serif;
  color: var(--primary);
  font-weight: 700;
  line-height: 1.2;
}

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

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
}

/* Accessible focus styles for keyboard navigation */
*:focus-visible {
  outline: 3px solid var(--secondary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Respect user's motion preference */
@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;
  }
}

@media (max-width: 768px) {
  .section-title {
    margin-bottom: 2.5rem;
  }

  .section-title h2 {
    font-size: 2rem;
  }

  .section-subtitle {
    font-size: 1rem;
  }
}

/* Container logic - Mobile First */
.container {
  width: 100%;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 480px) {
  :root {
    --container-padding: 1rem;
  }
}

/* Responsive Container widths */
@media (min-width: 640px) {
  .container {
    max-width: 600px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 960px;
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: 1200px;
  }
}

/* Common Components */
.section {
  padding: 4.5rem 0;
  position: relative;
  min-height: auto;
  /* Remove 100vh by default to reduce gaps */
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* Optimization for large pages */
  content-visibility: auto;
  contain-intrinsic-size: 1px 500px;
  will-change: transform, opacity;
  transform: translateZ(0);
  /* Force layer creation */
}

.section-title {
  text-align: left;
  margin-bottom: 3.5rem;
}

.section-title h2 {
  font-size: 2.5rem;
  /* Larger font for left-aligned headings */
  margin-bottom: 0.5rem;
  display: inline-block;
  position: relative;
  font-weight: 800;
}

.section-title h2::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: var(--secondary);
  margin: 0.5rem 0 0;
  /* Left align underline */
  border-radius: 2px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.15rem;
  max-width: 700px;
  margin-top: 1rem;
  font-weight: 500;
  line-height: 1.6;
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 8px;
  font-size: 1rem;
  gap: 0.5rem;
  transition: var(--transition);
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

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

/* Card Style */
.card {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

/* Simple Loader for Suspense */
.loader {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-bottom-color: var(--primary);
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}