/* ============================================
   MalWiz - Main Stylesheet
   ============================================ */

/* Custom Properties */
:root {
  --bg: #0a0e1a;
  --card-bg: rgba(15, 23, 42, 0.6);
  --fg: #f1f5f9;
  --muted: #94a3b8;
  --accent: #22d3ee;
  --accent-secondary: #a78bfa;
  --success: #10b981;
  --border: rgba(255, 255, 255, 0.06);
  --glow: rgba(34, 211, 238, 0.15);
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--fg);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ============================================
   Background & Animations
   ============================================ */

/* Animated background container */
.bg-container {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(34, 211, 238, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(167, 139, 250, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 50% 100%, rgba(34, 211, 238, 0.04) 0%, transparent 50%),
    linear-gradient(180deg, #0a0e1a 0%, #0f1629 100%);
}

/* Floating orbs */
.floating-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  animation: float 20s infinite ease-in-out;
  pointer-events: none;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.2) 0%, transparent 70%);
  top: -200px;
  left: -200px;
  animation-delay: 0s;
}

.orb-2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.2) 0%, transparent 70%);
  bottom: -150px;
  right: -150px;
  animation-delay: -10s;
}

.orb-3 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.15) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -5s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(50px, -30px) scale(1.05); }
  50% { transform: translate(-30px, 40px) scale(0.95); }
  75% { transform: translate(30px, 20px) scale(1.02); }
}

/* Grid pattern overlay */
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(34, 211, 238, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: grid-move 10s linear infinite;
}

@keyframes grid-move {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

/* ============================================
   Layout & Main Card
   ============================================ */

/* Main container */
.container {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

/* Main card */
.card {
  max-width: 900px;
  width: 100%;
  background: var(--card-bg);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 4rem 3rem;
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 100px rgba(34, 211, 238, 0.1);
  animation: card-entrance 0.8s ease-out;
}

@keyframes card-entrance {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Animated border gradient */
.card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 24px;
  padding: 2px;
  background: linear-gradient(45deg, var(--accent), var(--accent-secondary), var(--accent));
  background-size: 200% 200%;
  animation: gradient-rotate 4s ease infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.5;
}

@keyframes gradient-rotate {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ============================================
   Typography & Content
   ============================================ */

/* Logo badge */
.logo-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1.25rem;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.1), rgba(167, 139, 250, 0.1));
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 100px;
  margin-bottom: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  color: var(--accent);
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(34, 211, 238, 0.2); }
  50% { box-shadow: 0 0 40px rgba(34, 211, 238, 0.3); }
}

.logo-badge span {
  color: var(--fg);
}

/* Main heading */
h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--fg) 0%, var(--accent) 50%, var(--accent-secondary) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-shift 6s ease infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Subtitle */
.subtitle {
  font-size: 1.375rem;
  color: var(--muted);
  margin-bottom: 3rem;
  line-height: 1.6;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   Features Section
   ============================================ */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 3rem 0;
  text-align: left;
}

.feature {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(34, 211, 238, 0.2);
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.1);
}

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

.feature-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 1rem;
  padding: 0.5rem;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(167, 139, 250, 0.2));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--fg);
}

.feature p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ============================================
   Stats Section
   ============================================ */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 3rem 0;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stat {
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================
   Email Form
   ============================================ */

.waitlist-form {
  margin: 3rem 0;
  text-align: center;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.form-group {
  display: flex;
  gap: 0.75rem;
  max-width: 500px;
  margin: 0 auto;
}

.email-input {
  flex: 1;
  padding: 0.875rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--fg);
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: inherit;
}

.email-input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

.email-input::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.submit-btn {
  padding: 0.875rem 2rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  color: #0a0e1a;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.submit-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.3);
}

.submit-btn:active::before {
  width: 300px;
  height: 300px;
}

.success-message {
  display: none;
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  color: var(--success);
  animation: slide-up 0.4s ease;
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   Footer
   ============================================ */

.footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.3s ease;
  position: relative;
}

.footer-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-links a:hover::after {
  width: 100%;
}

.copyright {
  font-size: 0.875rem;
  color: var(--muted);
  opacity: 0.7;
}

/* ============================================
   Utility Classes
   ============================================ */

/* Loading state */
.loading {
  pointer-events: none;
  opacity: 0.6;
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--fg);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
  .card {
    padding: 3rem 1.5rem;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .form-group {
    flex-direction: column;
  }

  .submit-btn {
    width: 100%;
  }

  h1 {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 1.125rem;
  }
}

@media (max-width: 480px) {
  .card {
    padding: 2rem 1rem;
    border-radius: 16px;
  }

  .logo-badge {
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
  }

  .footer-links {
    gap: 1rem;
  }
}

/* ============================================
   Accessibility
   ============================================ */

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

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --border: rgba(255, 255, 255, 0.2);
    --card-bg: rgba(15, 23, 42, 0.9);
  }
  
  .card {
    border-width: 2px;
  }
  
  .feature {
    border-width: 2px;
  }
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Skip to content (for screen readers) */
.skip-to-content {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 1rem;
  background: var(--bg);
  color: var(--fg);
  text-decoration: none;
}

.skip-to-content:focus {
  left: 50%;
  transform: translateX(-50%);
  top: 1rem;
}