/* ===== ChinaLLM Landing Page — Custom Styles ===== */

/* --- Base & Reset --- */
html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Scroll-triggered fade-up --- */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children animation */
.fade-up.delay-1 { transition-delay: 0.1s; }
.fade-up.delay-2 { transition-delay: 0.2s; }
.fade-up.delay-3 { transition-delay: 0.3s; }

/* --- Region Tab active state (Tailwind can't do dynamic inline styles) --- */
.region-tab[style*="background: rgb(255, 107, 43)"] {
  color: #fff !important;
}

.region-tab {
  color: #4b5563;
  background: transparent;
  transition: background 0.2s, color 0.2s;
}

.region-tab:hover {
  background: #ff6b2b15;
  color: #ff6b2b;
}

/* --- Hero gradient glow pulse (suble) --- */
@keyframes pulseGlow {
  0%, 100% { opacity: 0.12; transform: scale(1); }
  50%      { opacity: 0.2;  transform: scale(1.05); }
}

.hero-glow {
  animation: pulseGlow 6s ease-in-out infinite;
}

/* --- Code block enhancements --- */
.code-block::-webkit-scrollbar {
  height: 6px;
}

.code-block::-webkit-scrollbar-thumb {
  background: #4a4a5e;
  border-radius: 3px;
}

/* --- Card hover lift --- */
.card-lift {
  transition: transform 0.25s ease-out, box-shadow 0.25s ease-out;
}

.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -4px rgba(255, 107, 43, 0.1),
              0 4px 6px -2px rgba(0,0,0,0.05);
}

/* --- Animated price number --- */
@keyframes countUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.price-animate {
  animation: countUp 0.5s ease-out;
}

/* --- CTA button pulse (suble attention) --- */
@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 43, 0.4); }
  50%      { box-shadow: 0 0 0 12px rgba(255, 107, 43, 0); }
}

.cta-pulse:hover {
  animation: ctaPulse 1.5s ease-in-out infinite;
}

/* --- Model logo strip scroll (JS-driven fallback if CSS fails) --- */
@keyframes scrollLeft {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.logo-scroll {
  animation: scrollLeft 20s linear infinite;
}

.logo-scroll:hover {
  animation-play-state: paused;
}

/* --- Mobile menu transition --- */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

#mobile-menu:not(.hidden) {
  max-height: 300px;
  padding-bottom: 1rem;
}

/* --- Custom scrollbar (body) --- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #f8f9fb;
}

::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #ff6b2b;
}

/* --- Pricing card popular badge --- */
.popular-badge {
  background: linear-gradient(135deg, #ff6b2b, #ff9f43);
}

/* --- Loading shimmer (for future use) --- */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

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

/* --- Reduce motion for accessibility --- */
@media (prefers-reduced-motion: reduce) {
  .fade-up,
  .card-lift,
  .cta-pulse,
  .logo-scroll,
  .hero-glow {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
