/* === OPTIMIZED PERFORMANCE CSS === */

/* Force text color in inputs/selects for dark theme */
input, select, textarea { color: #ffffff !important; }
input::placeholder, textarea::placeholder { color: #6b7280 !important; }
option { background: #0d0d0f; color: #ffffff; }

* { scrollbar-width: thin; scrollbar-color: #7c3aed #0a0a0c; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0a0a0c; }
::-webkit-scrollbar-thumb { background: #7c3aed; border-radius: 3px; }

/* === ANIMATIONS (lightweight versions) === */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes floatReverse { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(12px); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes slideLeft { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes gradientShift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { border-color: transparent; } }

.animate-float { animation: float 6s ease-in-out infinite; will-change: transform; }
.animate-float-reverse { animation: floatReverse 7s ease-in-out infinite; will-change: transform; }
.animate-slide-up { animation: slideUp 0.5s ease-out; }
.animate-slide-down { animation: slideDown 0.3s ease-out; }
.animate-slide-left { animation: slideLeft 0.5s ease-out; }
.animate-fade-in { animation: fadeIn 0.4s ease-out; }
.animate-scale-in { animation: scaleIn 0.4s ease-out; }

/* Glass effects - REMOVED backdrop-filter for performance */
.glass { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07); }
.glass-strong { background: rgba(10,10,12,0.92); border: 1px solid rgba(255,255,255,0.08); }
.glass-card { background: rgba(10,10,12,0.8); border: 1px solid rgba(255,255,255,0.07); transition: border-color 0.3s, box-shadow 0.3s; }
.glass-card:hover { border-color: rgba(124,58,237,0.3); box-shadow: 0 10px 40px rgba(124,58,237,0.08); }
.glass-card-accent:hover { border-color: rgba(34,211,238,0.3); box-shadow: 0 10px 40px rgba(34,211,238,0.08); }

/* Gradient text */
.gradient-text { background: linear-gradient(135deg, #7c3aed, #22d3ee, #ec4899); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-size: 200% 200%; animation: gradientShift 4s ease infinite; }
.gradient-text-subtle { background: linear-gradient(90deg, #a855f7, #22d3ee); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.gradient-text-warm { background: linear-gradient(135deg, #f97316, #ec4899, #a855f7); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-size: 200% 200%; animation: gradientShift 5s ease infinite; }

/* Buttons */
.btn-primary { background: linear-gradient(135deg, #7c3aed, #6d28d9); transition: transform 0.2s, box-shadow 0.2s; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(124,58,237,0.3); }
.btn-cta { position: relative; overflow: hidden; background: linear-gradient(135deg, #7c3aed, #6d28d9); transition: transform 0.25s ease, box-shadow 0.25s ease; }
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 35px rgba(124,58,237,0.3); }

/* Shapes - simplified, no morphShape animation */
.organic-shape { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
.organic-shape-2 { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }

/* Micro interactions */
.micro-interact { transition: transform 0.25s ease; }
.micro-interact:hover { transform: translateY(-4px); }

/* Neon glow utilities - simplified */
.neon-glow-purple { box-shadow: 0 0 12px rgba(124,58,237,0.2); }
.neon-glow-cyan { box-shadow: 0 0 12px rgba(34,211,238,0.2); }
.neon-glow-pink { box-shadow: 0 0 12px rgba(236,72,153,0.2); }
.neon-glow-green { box-shadow: 0 0 12px rgba(16,185,129,0.2); }

/* Kinetic text */
.kinetic-text { display: inline-block; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.active { opacity: 1; transform: none; }

/* Grid/dot patterns */
.grid-pattern { background-image: linear-gradient(rgba(124,58,237,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(124,58,237,0.03) 1px, transparent 1px); background-size: 60px 60px; }
.dot-pattern { background-image: radial-gradient(rgba(124,58,237,0.15) 1px, transparent 1px); background-size: 30px 30px; }

/* Card spotlight */
.card-spotlight { position: relative; overflow: hidden; }
.card-spotlight::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(124,58,237,.1), transparent 40%); opacity: 0; transition: opacity .2s; pointer-events: none; }
.card-spotlight:hover::after { opacity: 1; }

/* Aurora bg - simplified, NO blur */
.aurora-bg::before {
  content: '';
  position: fixed;
  inset: -10%;
  background:
    radial-gradient(circle at 12% 18%, rgba(124,58,237,.15), transparent 28%),
    radial-gradient(circle at 84% 12%, rgba(34,211,238,.10), transparent 30%),
    radial-gradient(circle at 76% 76%, rgba(236,72,153,.08), transparent 26%);
  pointer-events: none;
  z-index: 0;
}

/* Section shell - NO backdrop-filter */
.section-shell {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(160deg, rgba(16,16,18,.92), rgba(8,8,10,.90));
  box-shadow: 0 20px 50px rgba(0,0,0,.3);
}
.section-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(124,58,237,.12), transparent 35%, rgba(34,211,238,.08) 72%, transparent);
  opacity: .6;
  pointer-events: none;
}

/* Legal cards */
.legal-card {
  position: relative;
  border: 1px solid rgba(255,255,255,.07);
  background: linear-gradient(165deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  border-radius: 18px;
  padding: 1rem 1rem 1rem 1.1rem;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.legal-card:hover { transform: translateY(-3px); border-color: rgba(124,58,237,.35); box-shadow: 0 10px 25px rgba(124,58,237,.12); }
.legal-card h3 { display: flex; align-items: center; gap: .55rem; color: #fff; font-weight: 700; margin-bottom: .45rem; }
.legal-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .75rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.12); color: #d8d8df; background: rgba(255,255,255,.03); font-size: .78rem; line-height: 1; }

/* Links */
.elev-link { position: relative; transition: color .2s ease; }
.elev-link::after { content: ''; position: absolute; left: 0; bottom: -6px; width: 100%; height: 1px; background: linear-gradient(90deg, rgba(124,58,237,.8), rgba(34,211,238,.8)); transform: scaleX(0); transform-origin: left; transition: transform .2s ease; }
.elev-link:hover::after { transform: scaleX(1); }

.hover-lift { transition: transform .25s ease, box-shadow .25s ease; }
.hover-lift:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,.2); }
.magnetic-btn { transition: transform .2s ease; }

/* Frosted panel - NO backdrop-filter */
.frosted-panel { background: rgba(10,10,12,.88); border: 1px solid rgba(255,255,255,.06); border-radius: 24px; }

/* Section divider */
.section-divider { height: 1px; background: linear-gradient(90deg, transparent, rgba(124,58,237,.3) 20%, rgba(34,211,238,.3) 80%, transparent); }

/* Input */
.input-modern { position: relative; background: rgba(10,10,12,.6); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; transition: border-color .2s ease, box-shadow .2s ease; }
.input-modern:focus-within { border-color: rgba(124,58,237,.5); box-shadow: 0 0 0 3px rgba(124,58,237,.1); }

/* Ribbon */
.ribbon { position: absolute; top: -5px; right: -5px; background: linear-gradient(135deg, #7c3aed, #6d28d9); color: #fff; font-size: 10px; font-weight: 800; padding: 4px 20px; transform: rotate(12deg); box-shadow: 0 4px 15px rgba(124,58,237,.4); border-radius: 4px; letter-spacing: .5px; }

/* Notifications */
.notification-toast { position: fixed; top: 24px; right: 24px; z-index: 9999; padding: 16px 24px; border-radius: 16px; animation: slideDown 0.3s ease-out; max-width: 400px; }
.toast-success { background: rgba(16,185,129,0.95); color: #fff; }
.toast-error { background: rgba(239,68,68,0.95); color: #fff; }
.toast-info { background: rgba(124,58,237,0.95); color: #fff; }

/* Stagger */
.stagger-children > * { opacity: 0; transform: translateY(15px); animation: staggerIn .4s ease-out forwards; }
.stagger-children > *:nth-child(1) { animation-delay: .03s; }
.stagger-children > *:nth-child(2) { animation-delay: .08s; }
.stagger-children > *:nth-child(3) { animation-delay: .13s; }
.stagger-children > *:nth-child(4) { animation-delay: .18s; }
.stagger-children > *:nth-child(5) { animation-delay: .23s; }
.stagger-children > *:nth-child(6) { animation-delay: .28s; }
.stagger-children > *:nth-child(7) { animation-delay: .33s; }
.stagger-children > *:nth-child(8) { animation-delay: .38s; }
@keyframes staggerIn { to { opacity: 1; transform: none; } }

/* Gradient border */
.gradient-border { position: relative; overflow: hidden; }
.gradient-border::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(135deg, #7c3aed, #22d3ee, #ec4899, #7c3aed); background-size: 300% 300%; animation: gradientShift 4s ease infinite; -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }

/* Glow border */
@keyframes borderGlow { 0%, 100% { border-color: rgba(124,58,237,0.3); } 50% { border-color: rgba(34,211,238,0.4); } }
.glow-border { animation: borderGlow 3s ease-in-out infinite; }

/* Tilt card */
.tilt-card { transition: transform .4s ease; }

/* Hover glow */
.hover-glow { position: relative; overflow: hidden; }

/* Stat card */
.stat-card { position: relative; overflow: hidden; }

/* Fancy list */
.fancy-list li { position: relative; padding-left: 1.5rem; }
.fancy-list li::before { content: ''; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: linear-gradient(135deg, #7c3aed, #22d3ee); }

/* Mobile nav */
.mobile-nav-enter { animation: slideDown .2s ease-out; }

/* Scroll indicator */
.scroll-indicator { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); animation: scrollBounce 2s ease-in-out infinite; }
@keyframes scrollBounce { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(6px); } }

/* Type cursor */
.type-cursor::after { content: '|'; animation: blink 1s step-end infinite; color: #7c3aed; font-weight: 300; }

/* Grid lines animated - simplified */
.grid-lines-animated {
  background-image: linear-gradient(rgba(124,58,237,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(124,58,237,.03) 1px, transparent 1px);
  background-size: 80px 80px;
}

/* Neumorphic */
.neumorphic { background: #0d0d0f; box-shadow: 6px 6px 12px rgba(0,0,0,0.5), -6px -6px 12px rgba(255,255,255,0.01); }
.neumorphic-inset { background: #0d0d0f; box-shadow: inset 3px 3px 6px rgba(0,0,0,0.4), inset -3px -3px 6px rgba(255,255,255,0.01); }

/* Shimmer */
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.shimmer { background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.03) 50%, transparent 100%); background-size: 200% 100%; animation: shimmer 3s infinite; }

/* Page enter */
.page-enter { animation: pageEnter 0.3s ease-out; }
@keyframes pageEnter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Pulse ring - simplified */
.pulse-ring { position: relative; }

/* Performance */
html { scroll-behavior: smooth; }
* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, video { content-visibility: auto; }
.scroll-section { scroll-margin-top: 80px; }

/* Count-up */
.count-up { display: inline-block; font-variant-numeric: tabular-nums; }

/* Responsive */
@media (max-width: 768px) {
  .section-shell { border-radius: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
