/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Add your application-specific styles here */

:root {
  color-scheme: light;

  --radius-1: 0.85rem;
  --radius-2: 1.15rem;

  --shadow-sm: 0 8px 24px -20px rgba(15, 23, 42, 0.35);
  --shadow-md: 0 16px 44px -30px rgba(15, 23, 42, 0.45);
  --shadow-lg: 0 26px 70px -44px rgba(15, 23, 42, 0.60);

  --ring: 0 0 0 1px rgba(148, 163, 184, 0.30);
  --ring-strong: 0 0 0 1px rgba(59, 130, 246, 0.22);
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* Subtle app background so sections don't feel like flat blocks */
  background:
    radial-gradient(900px circle at 20% 0%, rgba(59, 130, 246, 0.10), transparent 55%),
    radial-gradient(900px circle at 85% 10%, rgba(14, 165, 233, 0.10), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

/* Shared surfaces */
.surface {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 250, 252, 0.88) 100%);
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: var(--radius-2);
  box-shadow: var(--shadow-sm);
}

.surface-strong {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: var(--radius-2);
  box-shadow: var(--shadow-md);
}

/* Soft section background with a faint grid texture */
.section-surface {
  position: relative;
  background:
    radial-gradient(1100px circle at 15% -10%, rgba(37, 99, 235, 0.10), transparent 48%),
    radial-gradient(900px circle at 90% 0%, rgba(79, 70, 229, 0.08), transparent 55%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.96) 0%, rgba(255, 255, 255, 0.96) 100%);
}

.section-surface::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(15, 23, 42, 0.06) 1px, transparent 0);
  background-size: 28px 28px;
  opacity: 0.25;
  pointer-events: none;
}

/* A thin gradient separator that adds “crafted” feel between sections */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.35), rgba(14, 165, 233, 0.25), transparent);
}

/* Brand gradient text */
.gradient-text {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 50%, #0ea5e9 100%);
  background-size: 200% 200%;
  animation: gradient-x 6s ease infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Focus styles shared across components */
.focus-ring:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px rgba(37, 99, 235, 0.55),
    0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Primary and secondary buttons (used across pages) */
.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.35rem;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 55%, #1d4ed8 100%);
  color: white;
  font-weight: 650;
  border-radius: 0.9rem;
  border: none;
  box-shadow:
    0 10px 28px -12px rgba(37, 99, 235, 0.65),
    0 0 0 1px rgba(59, 130, 246, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  transform: translateY(0);
  overflow: hidden;
  text-decoration: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 55%, #1e40af 100%);
  transform: translateY(-1px);
  box-shadow:
    0 14px 34px -14px rgba(37, 99, 235, 0.75),
    0 0 0 1px rgba(59, 130, 246, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.35rem;
  background: rgba(255, 255, 255, 0.92);
  color: #1d4ed8;
  font-weight: 650;
  border-radius: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow:
    0 10px 28px -16px rgba(15, 23, 42, 0.22),
    0 0 0 1px rgba(226, 232, 240, 0.55);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  transform: translateY(0);
  text-decoration: none;
}

.btn-secondary:hover {
  background: #ffffff;
  border-color: rgba(59, 130, 246, 0.35);
  transform: translateY(-1px);
  box-shadow:
    0 14px 34px -18px rgba(37, 99, 235, 0.22),
    0 0 0 1px rgba(59, 130, 246, 0.18);
}

/* Card hover: higher perceived depth + subtle specular highlight */
.card-hover {
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  border: 1px solid rgba(226, 232, 240, 0.92);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.90) 100%);
  box-shadow: var(--shadow-sm);
}

.card-hover::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(500px circle at 30% 0%, rgba(59, 130, 246, 0.10), transparent 45%);
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(59, 130, 246, 0.32);
}

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

.feature-icon {
  transition: transform 0.18s ease;
}

.card-hover:hover .feature-icon {
  transform: scale(1.04);
}

/* Glass surface used for hero mockups */
.glass-effect {
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 18px 42px -30px rgba(15, 23, 42, 0.55);
}

/* Crisp pill badges that sit well on both light & dark backgrounds */
.pill {
  border-radius: 9999px;
  box-shadow:
    0 14px 30px -24px rgba(15, 23, 42, 0.55),
    0 0 0 1px rgba(15, 23, 42, 0.06);
}

.pill-light {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(226, 232, 240, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Header elevated state (toggle via Stimulus) */
.site-header.is-scrolled {
  box-shadow: 0 18px 40px -30px rgba(15, 23, 42, 0.45);
}

/* Consistent hero background across pages */
.hero-custom-gradient {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1200px circle at 20% -10%, rgba(255, 255, 255, 0.22), transparent 45%),
    radial-gradient(900px circle at 90% 10%, rgba(14, 165, 233, 0.18), transparent 50%),
    linear-gradient(135deg, #1d4ed8 0%, #4f46e5 45%, #0ea5e9 100%);
}

.hero-custom-gradient::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.14) 1px, transparent 0);
  background-size: 26px 26px;
  opacity: 0.18;
  pointer-events: none;
}

/* Enhanced shine effect with better animation */
.shine-effect {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.08) 30%, rgba(255,255,255,0.02) 60%, rgba(255,255,255,0) 80%);
  border-radius: 50%;
  pointer-events: none;
  top: -20%;
  left: 50%;
  opacity: 0.8;
  filter: blur(40px);
  animation: shineEnhanced 12s infinite alternate;
  z-index: 5;
  position: absolute;
  transform: translateX(-50%);
}

/* Secondary glare with improved movement */
.random-glare {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.06) 40%, rgba(255,255,255,0.02) 70%, rgba(255,255,255,0) 90%);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.6;
  filter: blur(30px);
  animation: randomShineEnhanced 16s infinite alternate;
  z-index: 4;
  position: absolute;
}

@keyframes randomShineEnhanced {
  0% {
    opacity: 0.2;
    transform: scale(0.8) translate(-10px, 10px);
  }
  25% {
    opacity: 0.6;
    transform: scale(1.1) translate(5px, -5px);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.9) translate(15px, 5px);
  }
  75% {
    opacity: 0.7;
    transform: scale(1.2) translate(-5px, -10px);
  }
  100% {
    opacity: 0.3;
    transform: scale(0.95) translate(10px, 20px);
  }
}

@keyframes shineEnhanced {
  0% {
    opacity: 0.4;
    transform: translateX(-50%) scale(0.8) rotate(0deg);
  }
  25% {
    opacity: 0.8;
    transform: translateX(-50%) scale(1.1) rotate(45deg);
  }
  50% {
    opacity: 0.6;
    transform: translateX(-50%) scale(1.2) rotate(90deg);
  }
  75% {
    opacity: 0.9;
    transform: translateX(-50%) scale(0.9) rotate(135deg);
  }
  100% {
    opacity: 0.5;
    transform: translateX(-50%) scale(1.0) rotate(180deg);
  }
}

/* Enhanced module card animations */
.module-card {
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
}

.module-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(145deg, transparent 0%, rgba(59, 130, 246, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
}

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

.module-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow:
    0 20px 40px -8px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(59, 130, 246, 0.1),
    0 0 30px -5px rgba(59, 130, 246, 0.15);
}

/* Enhanced floating animations */
@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  25% {
    transform: translateY(-10px) rotate(1deg);
  }
  50% {
    transform: translateY(-20px) rotate(0deg);
  }
  75% {
    transform: translateY(-5px) rotate(-1deg);
  }
}

/* Enhanced gradient animations */
@keyframes gradient-x {
  0%, 100% {
    background-size: 200% 200%;
    background-position: left center;
  }
  50% {
    background-size: 200% 200%;
    background-position: right center;
  }
}

/* Pulse animation improvements */
@keyframes pulseEnhanced {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.05);
  }
}

.animate-pulse-enhanced {
  animation: pulseEnhanced 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Loading state animations */
@keyframes shimmer {
  0% {
    background-position: -468px 0;
  }
  100% {
    background-position: 468px 0;
  }
}

.loading-shimmer {
  background: linear-gradient(
    90deg,
    #f3f4f6 25%,
    #e5e7eb 50%,
    #f3f4f6 75%
  );
  background-size: 468px 100%;
  animation: shimmer 1.5s infinite;
}

/* Enhanced button hover effects */
.btn-enhanced {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.btn-enhanced:hover::before {
  left: 100%;
}

/* Typography enhancements */
.text-shadow-sm {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.text-shadow-md {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.text-shadow-lg {
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Enhanced glass morphism */
.glass-enhanced {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow:
    0 8px 32px 0 rgba(31, 38, 135, 0.2),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Scroll-triggered animations */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Enhanced feature card styles */
.feature-card-enhanced {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.feature-card-enhanced::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: left;
}

.feature-card-enhanced:hover::after {
  transform: scaleX(1);
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .hero-custom-gradient {
    min-height: auto;
    padding: 2rem 0;
  }

  .shine-effect {
    width: 250px;
    height: 250px;
    top: -10%;
  }

  .random-glare {
    width: 200px;
    height: 200px;
  }

  /* Mobile-first animations */
  .mobile-fade-in {
    animation: mobileSlideUp 0.6s ease-out;
  }

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

/* Dark mode preparations */
@media (prefers-color-scheme: dark) {
  .hero-custom-gradient {
    background: linear-gradient(135deg, #1e293b 0%, #334155 25%, #1e293b 50%, #334155 75%, #1e293b 100%);
  }
}

/* Accessibility: Screen reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.focus\:not-sr-only:focus {
  position: static;
  width: auto;
  height: auto;
  padding: inherit;
  margin: inherit;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Improve secondary text contrast */
.text-gray-500 {
  color: #6b7280;
}

.text-gray-600 {
  color: #4b5563;
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .card-hover {
    border: 2px solid currentColor !important;
  }

  .btn-primary {
    border: 2px solid currentColor !important;
  }
}

/* Timeline Component Enhanced */
.timeline-track {
  position: absolute;
  left: 2rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, 
    rgba(59, 130, 246, 0) 0%,
    rgba(59, 130, 246, 0.2) 10%,
    rgba(59, 130, 246, 0.2) 90%,
    rgba(59, 130, 246, 0) 100%
  );
  z-index: 0;
}

.timeline-node {
  width: 4rem;
  height: 4rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 10;
  box-shadow: 
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.timeline-item:hover .timeline-node {
  transform: scale(1.1) rotate(-3deg);
  box-shadow: 
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.timeline-connector {
  position: absolute;
  left: 2rem;
  top: 4rem;
  bottom: -2rem;
  width: 2px;
  background: inherit;
  opacity: 0.3;
}

.timeline-card-content {
  padding-left: 1.5rem;
  padding-top: 0.5rem;
  transition: transform 0.3s ease;
}

.timeline-item:hover .timeline-card-content {
  transform: translateX(4px);
}

.timeline-year {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  letter-spacing: 0.05em;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.timeline-item {
  animation: slideInLeft 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }

.timeline-dot {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.timeline-item:hover .timeline-dot {
  transform: scale(1.2);
  box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.15);
}

/* Achievement badges animation */
@keyframes badgeFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  25% { transform: translateY(-6px) rotate(1deg); }
  75% { transform: translateY(-3px) rotate(-1deg); }
}

.achievement-badge {
  animation: badgeFloat 4s ease-in-out infinite;
}

.achievement-badge:nth-child(2) {
  animation-delay: 0.5s;
}

/* Milestone bar animations */
@keyframes barGrow {
  from { height: 0; opacity: 0; }
  to { opacity: 1; }
}

.timeline-bar > div {
  animation: barGrow 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.timeline-bar:nth-child(1) > div { animation-delay: 0.2s; }
.timeline-bar:nth-child(2) > div { animation-delay: 0.35s; }
.timeline-bar:nth-child(3) > div { animation-delay: 0.5s; }
.timeline-bar:nth-child(4) > div { animation-delay: 0.65s; }

/* Team member card animations */
.team-card {
  position: relative;
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow-sm);
  border-radius: 1.25rem;
  overflow: hidden;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.28s ease, border-color 0.28s ease;
}

.team-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(500px circle at 30% 0%, rgba(59, 130, 246, 0.08), transparent 55%);
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: none;
}

.team-card::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(59,130,246,0.9), rgba(147,51,234,0.9), rgba(16,185,129,0.9), rgba(249,115,22,0.9));
}

.team-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-md);
  border-color: rgba(59, 130, 246, 0.25);
}

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

.team-avatar-wrap {
  transition: transform 0.28s ease, filter 0.28s ease;
}

.team-card:hover .team-avatar-wrap {
  transform: scale(1.06) rotate(4deg);
}

.team-role {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: 9999px;
  background: rgba(59, 130, 246, 0.08);
  color: #1d4ed8;
  font-weight: 600;
  font-size: 0.85rem;
}

.team-social a {
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.team-social a:hover {
  transform: translateY(-2px);
}
.input-hint {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 0.25rem;
}
.contact-input {
  background: #f9fafb;
  border: 1px solid #e2e8f0;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
}

.contact-input:focus {
  background: #ffffff;
  border-color: rgba(59,130,246,0.6);
  box-shadow:
    0 0 0 1px rgba(59,130,246,0.08),
    0 6px 20px -12px rgba(59,130,246,0.35);
}

.consent-row {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .hero-custom-gradient {
    animation: none;
  }

  .shine-effect,
  .random-glare {
    animation: none;
    opacity: 0.3;
  }

  .card-hover {
    transition: none;
  }

  .card-hover:hover {
    transform: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  }
}

/* Loading states and spinners */
.spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

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

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

/* Success state animations */
.success-checkmark {
  display: inline-block;
  animation: checkmarkBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes checkmarkBounce {
  0% {
    transform: scale(0) rotate(-45deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
}

.success-message {
  animation: slideInDown 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced button loading state */
.btn-primary.is-loading,
.btn-secondary.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.8;
}

.btn-primary.is-loading::after,
.btn-secondary.is-loading::after {
  content: '';
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* Floating label styles */
.floating-label-group {
  position: relative;
}

.floating-label-input {
  padding-top: 1.5rem;
  padding-bottom: 0.5rem;
}

.floating-label-input:focus,
.floating-label-input:not(:placeholder-shown) {
  padding-top: 1.75rem;
  padding-bottom: 0.25rem;
}

.floating-label {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: 1rem;
  color: #64748b;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.floating-label-input:focus ~ .floating-label,
.floating-label-input:not(:placeholder-shown) ~ .floating-label {
  top: 0.35rem;
  font-size: 0.75rem;
  color: #3b82f6;
  font-weight: 600;
}

/* Input validation feedback */
.form-input {
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input.is-valid {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-input.is-invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-input-feedback {
  font-size: 0.875rem;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: slideInDown 0.3s ease-out;
}

.form-input-feedback.is-valid {
  color: #10b981;
}

.form-input-feedback.is-invalid {
  color: #ef4444;
}

.form-input-feedback i {
  flex-shrink: 0;
}

/* Character counter */
.char-counter {
  font-size: 0.75rem;
  color: #94a3b8;
  text-align: right;
  margin-top: 0.5rem;
  transition: color 0.2s;
}

.char-counter.near-limit {
  color: #f97316;
  font-weight: 600;
}

.char-counter.at-limit {
  color: #ef4444;
  font-weight: 600;
}
.pill-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-weight: 650;
  font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 6px 18px -12px rgba(0,0,0,0.6);
}

.pill-chip.light {
  background: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
  border: 1px solid rgba(59, 130, 246, 0.18);
  box-shadow: none;
}

.support-tile {
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease, border-color 0.22s ease;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow-sm);
}

.support-tile:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(59, 130, 246, 0.22);
}

/* Animated chart bars with stagger */
@keyframes chartBarGrow {
  from {
    height: 0;
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.chart-bar {
  animation: chartBarGrow 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.chart-bar:nth-child(1) { animation-delay: 0.1s; }
.chart-bar:nth-child(2) { animation-delay: 0.2s; }
.chart-bar:nth-child(3) { animation-delay: 0.3s; }
.chart-bar:nth-child(4) { animation-delay: 0.4s; }
.chart-bar:nth-child(5) { animation-delay: 0.5s; }
.chart-bar:nth-child(6) { animation-delay: 0.6s; }

/* Testimonial carousel styles */
.testimonial-card {
  position: relative;
  border-radius: var(--radius-2);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.90) 100%);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 0.5rem;
  left: 0.75rem;
  font-size: 3rem;
  color: rgba(59, 130, 246, 0.1);
  font-weight: 900;
  line-height: 1;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(59, 130, 246, 0.30);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(226, 232, 240, 0.95);
}

.testimonial-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  flex-shrink: 0;
  font-size: 1.125rem;
}

.testimonial-meta-name {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.9375rem;
}

.testimonial-meta-title {
  color: #64748b;
  font-size: 0.875rem;
}

.testimonial-stats {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(226, 232, 240, 0.95);
}

.testimonial-stat {
  text-align: center;
  flex: 1;
}

.testimonial-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #3b82f6;
  display: block;
}

.testimonial-stat-label {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-top: 0.25rem;
}

/* Contact reason cards */
.contact-reason-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 0.5rem;
  border-radius: 0.875rem;
  border: 1.5px solid rgba(226, 232, 240, 0.95);
  background: #ffffff;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
  min-height: 4.5rem;
}

.contact-reason-card:hover {
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 4px 12px -4px rgba(59, 130, 246, 0.15);
}

.contact-reason-icon {
  font-size: 1.25rem;
  color: #9ca3af;
  transition: color 0.15s ease;
  line-height: 1;
}

/* Accordion open state */
[data-accordion-target="item"].is-open {
  border-color: rgba(59, 130, 246, 0.3);
}

[data-accordion-target="item"].is-open > button {
  background: #f8faff;
}

[data-accordion-target="item"].is-open [data-accordion-icon] {
  color: #2563eb;
}

/* Print styles */
@media print {
  .hero-custom-gradient {
    background: #f8fafc !important;
    color: #1e293b !important;
    min-height: auto !important;
  }

  .shine-effect,
  .random-glare {
    display: none !important;
  }

  .card-hover {
    box-shadow: none !important;
    border: 1px solid #e2e8f0 !important;
  }
}

/* Performance optimizations */
.will-change-transform {
  will-change: transform;
}

.will-change-opacity {
  will-change: opacity;
}

/* Custom selection styling */
::selection {
  background-color: rgba(59, 130, 246, 0.25);
  color: #1e40af;
}

::-moz-selection {
  background-color: rgba(59, 130, 246, 0.25);
  color: #1e40af;
}

/* Section header component */
.section-header {
  position: relative;
  margin-bottom: 4.5rem;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.9);
  color: #1d4ed8;
  font-size: 0.875rem;
  font-weight: 650;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(226, 232, 240, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  margin-bottom: 1.25rem;
}

.section-title {
  font-size: clamp(1.9rem, 3.1vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin-bottom: 1.25rem;
}

.section-description {
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.125rem;
  line-height: 1.65;
  color: #475569;
}

/* Feature tiles (used for feature grids) */
.feature-tile {
  position: relative;
  border-radius: var(--radius-2);
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Top accent bar - minimal and refined */
.feature-tile::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.8), rgba(79, 70, 229, 0.8), rgba(14, 165, 233, 0.8));
  opacity: 1;
}

/* Subtle hover overlay */
.feature-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(500px circle at 50% 0%, rgba(59, 130, 246, 0.04), transparent 60%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  border-radius: inherit;
}

.feature-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(59, 130, 246, 0.2);
}

.feature-tile:hover::before {
  opacity: 1;
}

/* Refined feature icon styling */
.feature-tile .feature-icon {
  transition: transform 0.2s ease, color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(79, 70, 229, 0.06) 100%);
  border-radius: 1.25rem;
  width: 4rem;
  height: 4rem;
}

.feature-tile:hover .feature-icon {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(79, 70, 229, 0.10) 100%);
}

.feature-tile .feature-icon i {
  font-size: 1.75rem;
  transition: color 0.2s ease;
}

/* Icon color variations */
.feature-tile:nth-child(1) .feature-icon i { color: #3b82f6; }
.feature-tile:nth-child(2) .feature-icon i { color: #10b981; }
.feature-tile:nth-child(3) .feature-icon i { color: #a855f7; }
.feature-tile:nth-child(4) .feature-icon i { color: #f59e0b; }

/* Enhance link appearance */
.feature-tile a {
  transition: all 0.2s ease;
}

.feature-tile:hover a {
  transform: translateX(2px);
}

/* Module tiles (home modules grid) */
.module-tile {
  position: relative;
  border-radius: var(--radius-2);
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.90) 100%);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.module-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(640px circle at 25% 0%, rgba(59, 130, 246, 0.10), transparent 50%);
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}

.module-tile:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(59, 130, 246, 0.30);
}

.module-tile:hover::before {
  opacity: 1;
}

.module-tile-topline {
  height: 3px;
  background: linear-gradient(90deg, rgba(37, 99, 235, 1), rgba(79, 70, 229, 1), rgba(14, 165, 233, 1));
}

.module-icon-tile {
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 14px 28px -22px rgba(15, 23, 42, 0.55),
    0 0 0 1px rgba(15, 23, 42, 0.05);
}

.module-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 650;
  text-decoration: none;
}

.module-link i {
  transition: transform 0.18s ease;
}

.module-tile:hover .module-link i {
  transform: translateX(3px);
}

/* Footer: moved inline styles from _footer.html.erb */
footer .animate-float {
  animation: float 6s ease-in-out infinite;
}

footer input:focus {
  transform: scale(1.02);
}

footer .fab {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

footer .bg-gradient-to-r {
  background-size: 200% 200%;
  animation: gradient-x 4s ease infinite;
}

@media (max-width: 768px) {
  footer {
    padding-top: 3rem;
  }

  footer .grid {
    gap: 2rem;
  }
}
