html {
  scroll-behavior: smooth;
}

body {
  box-sizing: border-box;
}

* {
  box-sizing: border-box;
}

/* ============================================
   TYPOGRAPHY ENHANCEMENTS
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1 {
  letter-spacing: -0.03em;
}

h2 {
  letter-spacing: -0.025em;
}

/* Font weight scale: 400, 500, 600, 700, 800 */
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

/* Line height adjustments for readability */
p, li {
  line-height: 1.7;
}

/* ============================================
   SPACING ENHANCEMENTS
   ============================================ */
.section-padding {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.section-padding-lg {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.section-padding-xl {
  padding-top: 6rem;
  padding-bottom: 6rem;
}

/* Grid gaps */
.grid-gap-sm { gap: 1.5rem; }
.grid-gap-md { gap: 2rem; }
.grid-gap-lg { gap: 3rem; }

/* ============================================
   ANIMATIONS & KEYFRAMES
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleDown {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes checkmark {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

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

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* ============================================
   CARD ANIMATIONS
   ============================================ */
.fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

.fade-in-up-delay-1 {
  animation-delay: 0.1s;
  opacity: 0;
}

.fade-in-up-delay-2 {
  animation-delay: 0.2s;
  opacity: 0;
}

.fade-in-up-delay-3 {
  animation-delay: 0.3s;
  opacity: 0;
}

.fade-in-up-delay-4 {
  animation-delay: 0.4s;
  opacity: 0;
}

.fade-in-up-delay-5 {
  animation-delay: 0.5s;
  opacity: 0;
}

.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* Service card hover effects */
.service-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.service-card:hover::before {
  opacity: 1;
}

.service-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 25px 50px rgba(0,0,0,0.2);
}

/* Gradient borders on hover */
.gradient-border {
  position: relative;
  background: white;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, #4a5568, #1a202c);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gradient-border:hover::before {
  opacity: 1;
}

/* ============================================
   BUTTON ENHANCEMENTS
   ============================================ */
.btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn:active {
  animation: scaleDown 0.2s ease;
}

.btn-loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn-loading .button-text {
  opacity: 0;
}

.btn-loading .button-loader {
  display: flex !important;
}

.button-loader {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
}

.button-loader svg {
  animation: spin 1s linear infinite;
}

/* Ripple effect */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple::after {
  content: '';
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0);
  animation: ripple 0.6s ease-out;
  top: 50%;
  left: 50%;
  margin-left: -50px;
  margin-top: -50px;
}

.btn-ripple:active::after {
  animation: ripple 0.6s ease-out;
}

/* Disabled state */
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Success checkmark */
.btn-success {
  position: relative;
}

.btn-success::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #10b981;
  color: white;
  animation: checkmark 0.5s ease;
}

/* ============================================
   FORM ENHANCEMENTS
   ============================================ */
/* Floating labels */
.form-group {
  position: relative;
  margin-bottom: 1.5rem;
}

.form-input {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  background: white;
}

.form-input:focus {
  outline: none;
  border-color: #1f2937;
  box-shadow: 0 0 0 3px rgba(31, 41, 55, 0.1);
}

.form-label {
  position: absolute;
  left: 1rem;
  top: 1rem;
  color: #6b7280;
  transition: all 0.3s ease;
  pointer-events: none;
  background: white;
  padding: 0 0.25rem;
}

.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label {
  top: -0.5rem;
  left: 0.75rem;
  font-size: 0.75rem;
  color: #1f2937;
  font-weight: 600;
}

/* Character counter */
.char-counter {
  text-align: right;
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

.char-counter.warning {
  color: #f59e0b;
}

.char-counter.error {
  color: #ef4444;
}

/* Form validation */
.form-input.error {
  border-color: #ef4444;
}

.form-input.success {
  border-color: #10b981;
}

.form-error {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.form-success {
  color: #10b981;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Step indicator */
.step-indicator {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
  position: relative;
}

.step-indicator::before {
  content: '';
  position: absolute;
  top: 1.25rem;
  left: 0;
  right: 0;
  height: 2px;
  background: #e5e7eb;
  z-index: 0;
}

.step {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.step-number {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: white;
  border: 2px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #6b7280;
  transition: all 0.3s ease;
}

.step.active .step-number {
  background: #1f2937;
  border-color: #1f2937;
  color: white;
}

.step.completed .step-number {
  background: #10b981;
  border-color: #10b981;
  color: white;
}

.step-label {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
  text-align: center;
}

.step.active .step-label {
  color: #1f2937;
  font-weight: 600;
}

/* Progress bar */
.progress-bar {
  width: 100%;
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #1f2937, #4b5563);
  transition: width 0.5s ease;
  border-radius: 2px;
}

/* ============================================
   SCROLL EFFECTS
   ============================================ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: #1f2937;
  z-index: 9999;
  transition: width 0.15s ease;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3.5rem;
  height: 3.5rem;
  background: #1f2937;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  background: #111827;
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* ============================================
   MOBILE MENU
   ============================================ */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-toggle span {
  width: 24px;
  height: 2px;
  background: white;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 400px;
  height: 100vh;
  background: rgba(31, 41, 55, 0.98);
  backdrop-filter: blur(10px);
  z-index: 9998;
  transition: right 0.3s ease;
  padding: 5rem 2rem 2rem;
  overflow-y: auto;
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 9997;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-menu-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================
   NAVIGATION ACTIVE STATES
   ============================================ */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: white;
  animation: fadeIn 0.3s ease;
}

.nav-link.active-bg {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0.25rem;
  padding: 0.5rem 1rem;
}

/* ============================================
   GLASSMORPHISM
   ============================================ */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ============================================
   IMAGE EFFECTS
   ============================================ */
.image-lazy {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.image-lazy.loaded {
  opacity: 1;
}

.image-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* Parallax effect */
.parallax {
  transition: transform 0.3s ease-out;
}

/* ============================================
   NUMBER COUNTER ANIMATION
   ============================================ */
.counter-number {
  display: inline-block;
  animation: counter 0.8s ease-out;
}

/* ============================================
   TESTIMONIALS
   ============================================ */
.testimonial-card {
  transition: all 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.star-rating {
  display: flex;
  gap: 0.25rem;
}

.star {
  transition: transform 0.2s ease;
}

.star:hover {
  transform: scale(1.2);
}

/* ============================================
   FAQ ENHANCEMENTS
   ============================================ */
.faq-highlight {
  background: #fef3c7;
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.skip-to-main {
  position: absolute;
  top: -100px;
  left: 0;
  background: #1f2937;
  color: white;
  padding: 1rem;
  z-index: 10000;
  text-decoration: none;
  border-radius: 0 0 0.5rem 0;
}

.skip-to-main:focus {
  top: 0;
}

/* Focus visible states */
*:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* 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;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.gradient-bg {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

.promo-pulse {
  animation: pulse 2s infinite;
}

/* Loading spinner */
.spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1rem;
}

.breadcrumbs a {
  color: #1f2937;
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumbs a:hover {
  color: #4b5563;
}

.breadcrumbs span {
  color: #9ca3af;
}

/* Section dividers */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
  margin: 4rem 0;
}

/* Alternating backgrounds */
.section-alt {
  background: #f9fafb;
}

/* Touch targets for mobile */
@media (max-width: 768px) {
  button, a, input, select, textarea {
    min-height: 44px;
    min-width: 44px;
  }
}

