/**
 * Modern Theme - Minimal Professional Character
 * ONLY character properties (shadows, radius, animations, layout character)
 * NO hardcoded colors (use CSS variables only)
 */

/* Theme root character variables */
.theme-modern {
  /* Override radius defaults with modern character */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Override shadows with modern character */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
  --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.25);
}

/* ============================================================================
   NAVBAR CHARACTER - Light Glass Professional
   ============================================================================ */

.theme-modern .navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(var(--color-surface-rgb), 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(var(--color-border-rgb), 0.1);
  z-index: 1000;
}

.theme-modern .nav-link {
  position: relative;
  transition: color var(--transition-base);
}

/* Clean underline animation */
.theme-modern .nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-primary);
  transform: scaleX(0);
  transition: transform var(--transition-base);
}

.theme-modern .nav-link:hover::after,
.theme-modern .nav-link.active::after {
  transform: scaleX(1);
}

/* ============================================================================
   HERO CHARACTER - Refined Breathing Motion
   Minimal, professional, subtle with sophisticated micro-animations
   ============================================================================ */

.theme-modern .hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  background:
    radial-gradient(
      ellipse 80% 60% at 30% 20%,
      rgba(var(--color-primary-rgb), 0.08),
      transparent 50%
    ),
    radial-gradient(
      ellipse 80% 60% at 70% 80%,
      rgba(var(--color-accent-rgb), 0.06),
      transparent 50%
    ),
    var(--color-background);
}

/* Subtle ambient glow that breathes */
.theme-modern .hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(var(--color-primary-rgb), 0.15),
    transparent 70%
  );
  filter: blur(80px);
  animation: modern-breathe 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes modern-breathe {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.3;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.5;
  }
}

/* Content fades in with elegant precision */
.theme-modern .hero-content {
  animation: modern-reveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes modern-reveal {
  0% {
    opacity: 0;
    transform: translateY(20px);
    filter: blur(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* Staggered reveal for child elements */
.theme-modern .hero-title {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: modern-reveal 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.theme-modern .hero-subtitle {
  animation: modern-reveal 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

.theme-modern .hero .btn,
.theme-modern .hero-cta {
  animation: modern-reveal 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

/* Subtle shimmer on hover for interactive elements */
.theme-modern .hero .btn {
  position: relative;
  overflow: hidden;
}

.theme-modern .hero .btn::after {
  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.6s ease;
}

.theme-modern .hero .btn:hover::after {
  left: 100%;
}

/* ============================================================================
   LANDING PAGE ANIMATIONS - Subtle Progressive Reveals (Scroll-Triggered)
   ============================================================================ */

/* Initial hidden state for scroll-triggered elements */
/* ONLY hide elements when animations are ready to prevent FOUC */
body.animations-ready.theme-modern .service-card.animate-on-scroll:not(.animate-visible),
body.animations-ready.theme-modern .portfolio-card.animate-on-scroll:not(.animate-visible),
body.animations-ready.theme-modern .testimonial-card.animate-on-scroll:not(.animate-visible),
body.animations-ready.theme-modern .section-title.animate-on-scroll:not(.animate-visible),
body.animations-ready.theme-modern .section-header h2.animate-on-scroll:not(.animate-visible),
body.animations-ready.theme-modern .stat-item.animate-on-scroll:not(.animate-visible),
body.animations-ready.theme-modern .cta-content.animate-on-scroll:not(.animate-visible),
body.animations-ready.theme-modern [data-aos].animate-on-scroll:not(.animate-visible),
body.animations-ready.theme-modern .section-eyebrow.animate-on-scroll:not(.animate-visible),
body.animations-ready.theme-modern .section-subtitle.animate-on-scroll:not(.animate-visible),
body.animations-ready.theme-modern .hero-eyebrow.animate-on-scroll:not(.animate-visible),
body.animations-ready.theme-modern .hero-title.animate-on-scroll:not(.animate-visible),
body.animations-ready.theme-modern .hero-subtitle.animate-on-scroll:not(.animate-visible),
body.animations-ready.theme-modern .hero-actions.animate-on-scroll:not(.animate-visible),
body.animations-ready.theme-modern .hero-stats.animate-on-scroll:not(.animate-visible),
body.animations-ready.theme-modern .scroll-indicator.animate-on-scroll:not(.animate-visible),
body.animations-ready.theme-modern .portfolio-filter.animate-on-scroll:not(.animate-visible),
body.animations-ready.theme-modern .clients-title.animate-on-scroll:not(.animate-visible),
body.animations-ready.theme-modern .clients-grid.animate-on-scroll:not(.animate-visible),
body.animations-ready.theme-modern .process-header.animate-on-scroll:not(.animate-visible),
body.animations-ready.theme-modern .process-flow-item.animate-on-scroll:not(.animate-visible) {
  opacity: 0;
  transform: translateY(20px);
  filter: blur(10px);
}

/* Trigger animation when visible */
.theme-modern .service-card.animate-visible,
.theme-modern .portfolio-card.animate-visible,
.theme-modern .testimonial-card.animate-visible,
.theme-modern [data-aos].animate-visible,
.theme-modern .section-eyebrow.animate-visible,
.theme-modern .section-subtitle.animate-visible,
.theme-modern .hero-eyebrow.animate-visible,
.theme-modern .hero-subtitle.animate-visible,
.theme-modern .hero-actions.animate-visible,
.theme-modern .hero-stats.animate-visible,
.theme-modern .scroll-indicator.animate-visible,
.theme-modern .portfolio-filter.animate-visible,
.theme-modern .clients-grid.animate-visible,
.theme-modern .process-flow-item.animate-visible {
  animation: modern-reveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.theme-modern .section-title.animate-visible,
.theme-modern .section-header h2.animate-visible,
.theme-modern .hero-title.animate-visible,
.theme-modern .clients-title.animate-visible,
.theme-modern .process-header.animate-visible {
  animation: modern-reveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.theme-modern .stat-item.animate-visible {
  animation: modern-reveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.theme-modern .cta-content.animate-visible {
  animation: modern-reveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

/* Staggered delays for cards within same container */
.theme-modern .service-card.animate-visible:nth-child(1) { animation-delay: 0.1s; }
.theme-modern .service-card.animate-visible:nth-child(2) { animation-delay: 0.2s; }
.theme-modern .service-card.animate-visible:nth-child(3) { animation-delay: 0.3s; }
.theme-modern .service-card.animate-visible:nth-child(4) { animation-delay: 0.4s; }
.theme-modern .service-card.animate-visible:nth-child(5) { animation-delay: 0.5s; }
.theme-modern .service-card.animate-visible:nth-child(6) { animation-delay: 0.6s; }

.theme-modern .portfolio-card.animate-visible:nth-child(1) { animation-delay: 0.1s; }
.theme-modern .portfolio-card.animate-visible:nth-child(2) { animation-delay: 0.2s; }
.theme-modern .portfolio-card.animate-visible:nth-child(3) { animation-delay: 0.3s; }
.theme-modern .portfolio-card.animate-visible:nth-child(4) { animation-delay: 0.4s; }
.theme-modern .portfolio-card.animate-visible:nth-child(5) { animation-delay: 0.5s; }
.theme-modern .portfolio-card.animate-visible:nth-child(6) { animation-delay: 0.6s; }

.theme-modern .stat-item.animate-visible:nth-child(1) { animation-delay: 0.2s; }
.theme-modern .stat-item.animate-visible:nth-child(2) { animation-delay: 0.3s; }
.theme-modern .stat-item.animate-visible:nth-child(3) { animation-delay: 0.4s; }
.theme-modern .stat-item.animate-visible:nth-child(4) { animation-delay: 0.5s; }

/* Button hover effect - minimal movement */
.theme-modern .btn:hover {
  transform: translateY(-2px);
}

/* Card hover effect - subtle lift */
.theme-modern .card:hover,
.theme-modern .stat-card:hover,
.theme-modern .admin-card:hover,
.theme-modern .dashboard-widget:hover {
  transform: translateY(-2px);
}

/* NO background orbs */
.theme-modern::before,
.theme-modern::after {
  display: none;
}

/* Disable unwanted animations but allow scroll-triggered and hero animations */

/* Smooth transitions only */
.theme-modern * {
  transition-timing-function: ease-out;
}

/* Navbar - minimal shadow */
.theme-modern .navbar,
.theme-modern .admin-navbar {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Sidebar - flat design */
.theme-modern .admin-sidebar,
.theme-modern .dashboard-sidebar {
  box-shadow: none;
}

/* Dropdowns - subtle shadow */
.theme-modern .dropdown-menu,
.theme-modern .search-dropdown,
.theme-modern .notification-dropdown,
.theme-modern .admin-dropdown-menu {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Modals - strong shadow */
.theme-modern .modal {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

/* Form focus - minimal glow */
.theme-modern .form-input:focus,
.theme-modern input:focus,
.theme-modern textarea:focus,
.theme-modern select:focus {
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

/* Tables - clean lines */
.theme-modern .table,
.theme-modern table {
  border-radius: 0;
}

/* Badges - sharp corners for modern look */
.theme-modern .badge {
  border-radius: 4px;
}

/* Auth card - strong shadow for focus */
.theme-modern .auth-card {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Kanban cards - minimal shadow */
.theme-modern .kanban-card {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.theme-modern .kanban-card:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

/* Loading states - simple spinner */
.theme-modern .loading,
.theme-modern .spinner {
  animation: spin 0.8s linear infinite !important;
}

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

/* Refined timing for minimal aesthetic */
.theme-modern .btn:hover {
  transition-duration: 200ms;
}

.theme-modern .card:hover,
.theme-modern .stat-card:hover {
  transition-duration: 250ms;
}

/* Refined focus states - structure only, color in colors.css */
.theme-modern *:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Stat item hover - subtle scale */
.theme-modern .stat-item {
  transition: transform var(--transition-base);
  cursor: default;
}

.theme-modern .stat-item:hover {
  transform: scale(1.03);
}

/* Service icon hover - refined rotation */
.theme-modern .service-card:hover .service-icon {
  transform: scale(1.05) rotate(3deg);
}

/* Settings tabs - minimal character */
.theme-modern .tab-item:hover {
  transform: translateY(-1px);
}

.theme-modern .tab-item.active {
  box-shadow: none;
}

/* Responsive - maintain character */
@media (max-width: 768px) {
  .theme-modern .btn:hover,
  .theme-modern .card:hover,
  .theme-modern .stat-card:hover {
    transform: none;
  }

  .theme-modern .stat-item:hover {
    transform: none;
  }
}

/**
 * Accessibility: Reduced Motion
 * Respects user's OS-level motion preferences
 * WCAG 2.1 Level AAA
 */
@media (prefers-reduced-motion: reduce) {
  .theme-modern *,
  .theme-modern *::before,
  .theme-modern *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
