/* ===== 星灵元境研习社品牌样式 ===== */

:root {
  --brand-primary: #6D28D9;
  --brand-secondary: #7C3AED;
  --brand-accent: #A78BFA;
  --brand-bg: #FAFAF9;
  --brand-pink: #DB2777;
  --brand-cyan: #06B6D4;
  --brand-deep: #4C1D95;
  --group-blue: #0B1437;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-feature-settings: "tnum";
}

/* Font overrides */
.font-display {
  font-family: var(--font-display);
}

.font-sans {
  font-family: var(--font-body);
}

/* Hero canvas */
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Gradient text utility */
.gradient-text {
  background: linear-gradient(135deg, #6D28D9 0%, #DB2777 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glass morphism */
.glass {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.dark .glass {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #A78BFA;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #7C3AED;
}

/* Animations */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}
.animate-float {
  animation: float 6s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.08); }
}
.animate-pulse-glow {
  animation: pulse-glow 5s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.animate-shimmer {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

/* Selection color */
::selection {
  background: rgba(109, 40, 217, 0.25);
  color: inherit;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid #A78BFA;
  outline-offset: 2px;
}

/* Image loading optimization */
img {
  content-visibility: auto;
}

/* Responsive typography fine-tuning */
@media (max-width: 640px) {
  .font-display {
    letter-spacing: -0.02em;
  }
}

/* Hero image watermark crop: generated images have a small AI label at bottom; crop it via overflow-hidden + taller image aligned to top */
.hero-main,
.animate-float:has(img[src*="hero-float"]) {
  overflow: hidden;
  border-radius: 1.5rem;
}

.hero-main img,
.animate-float:has(img[src*="hero-float"]) img {
  height: 112%;
  object-position: top;
}

/* Community image watermark crop */
.enterprise-text + div,
#enterprise img {
  overflow: hidden;
  border-radius: 1.5rem;
}

#enterprise img {
  height: 112%;
  object-position: top;
}

/* CTA background watermark fade */
#cta::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(109, 40, 217, 0.85), transparent 35%);
  z-index: 1;
  pointer-events: none;
}

#cta > .relative,
#cta form,
#cta h2,
#cta p {
  position: relative;
  z-index: 2;
}



@keyframes blob-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -50px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}
@keyframes blob-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-40px, 30px) scale(1.15); }
  66% { transform: translate(20px, -30px) scale(0.9); }
}
@keyframes blob-3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(50px, 40px) scale(1.05); }
  66% { transform: translate(-30px, -20px) scale(1.1); }
}
.animate-blob-1 {
  animation: blob-1 12s ease-in-out infinite;
}
.animate-blob-2 {
  animation: blob-2 15s ease-in-out infinite;
}
.animate-blob-3 {
  animation: blob-3 18s ease-in-out infinite;
}

/* Hero light rays */
.bg-hero-rays {
  background: repeating-conic-gradient(
    from 0deg at 50% 50%,
    rgba(255, 255, 255, 0.06) 0deg,
    transparent 10deg,
    rgba(255, 255, 255, 0.04) 20deg,
    transparent 30deg
  );
  animation: rotate-rays 40s linear infinite;
}
@keyframes rotate-rays {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
