/* =========================================== */
/* AWARD-WINNING UX/UI IMPROVEMENTS 2026 */
/* =========================================== */

/* Enhanced Focus Indicators (WCAG AAA Compliance) */
:focus-visible {
  outline: 3px solid var(--bs-primary, #6366f1) !important;
  outline-offset: 4px !important;
  box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.2) !important;
  border-radius: 4px !important;
  transition: outline 0.2s ease, box-shadow 0.2s ease !important;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :focus-visible {
    outline: 4px solid #000000 !important;
    outline-offset: 6px !important;
    box-shadow: 0 0 0 8px rgba(0, 0, 0, 0.3) !important;
  }
}

/* Enhanced Scroll Reveal Animations */
.scroll-reveal-award {
  opacity: 0;
  transform: translateY(40px) scale(0.95);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal-award.revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Staggered animation delays */
.scroll-reveal-stagger-1 { transition-delay: 0.1s; }
.scroll-reveal-stagger-2 { transition-delay: 0.2s; }
.scroll-reveal-stagger-3 { transition-delay: 0.3s; }
.scroll-reveal-stagger-4 { transition-delay: 0.4s; }
.scroll-reveal-stagger-5 { transition-delay: 0.5s; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .scroll-reveal-award {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Enhanced Button Ripple Effects */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease, opacity 0.6s ease;
  opacity: 0;
  pointer-events: none;
}

.btn-ripple:active::before {
  width: 300px;
  height: 300px;
  opacity: 1;
}

/* Magnetic hover effect enhancement */
.btn-magnetic-premium {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.btn-magnetic-premium:hover {
  transform: translateY(-4px) scale(1.05) !important;
}

/* Smart Loading States - Skeleton Shimmer */
.skeleton-shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

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

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

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* =========================================== */
/* CONTEXTUAL HELP & TOOLTIPS */
/* =========================================== */
.contextual-help {
  position: fixed;
  bottom: 6rem;
  right: 2rem;
  z-index: 1000;
}

.help-trigger {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.help-trigger:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.help-content {
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 0.5rem;
  padding: 1rem 1.25rem;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  color: #fff;
  border-radius: 12px;
  max-width: 320px;
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.help-content::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 1.5rem;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid rgba(0, 0, 0, 0.95);
}

.help-trigger[aria-expanded="true"] + .help-content {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.help-content kbd {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.875rem;
}

/* =========================================== */
/* EMOTION-CENTRIC DESIGN ELEMENTS */
/* =========================================== */
.celebration-animation {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
}

.celebration-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--bs-primary, #6366f1);
  border-radius: 50%;
  animation: celebrate 1s ease-out forwards;
}

@keyframes celebrate {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) scale(0);
    opacity: 0;
  }
}

/* Celebration confetti effect */
.confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  background: var(--confetti-color, #6366f1);
  position: fixed;
  animation: confetti-fall 3s linear forwards;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(-100vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* =========================================== */
/* ADVANCED TYPOGRAPHY SYSTEM */
/* =========================================== */
:root {
  --font-size-min: 1rem;
  --font-size-max: 1.25rem;
  --line-height-min: 1.5;
  --line-height-max: 1.75;
}

.fluid-typography {
  font-size: clamp(
    var(--font-size-min),
    1rem + 0.5vw,
    var(--font-size-max)
  );
  line-height: clamp(
    var(--line-height-min),
    1.5 + 0.5vw,
    var(--line-height-max)
  );
}

/* Reading mode */
.reading-mode {
  max-width: 65ch;
  font-size: 1.125rem;
  line-height: 1.8;
  letter-spacing: 0.01em;
}

body.reading-mode-active {
  font-size: 1.125rem;
  line-height: 1.8;
}

body.reading-mode-active .container {
  max-width: 65ch;
}

/* Reading mode toggle button */
.reading-mode-toggle {
  position: fixed;
  bottom: 10rem;
  right: 2rem;
  z-index: 1000;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
  transition: all 0.3s ease;
}

.reading-mode-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.reading-mode-toggle.active {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
}

/* =========================================== */
/* SUSTAINABLE DESIGN INDICATORS */
/* =========================================== */
.sustainability-indicator {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.sustainability-badge,
.performance-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #059669;
}

.sustainability-badge i,
.performance-badge i {
  font-size: 1rem;
}

.performance-badge {
  color: #6366f1;
}

/* Related Content Section */
.related-content-section {
  padding: 4rem 0;
}

.related-content-section .section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

