/* ================================
   SWISHR - Main Stylesheet
   Mobile-first, dark mode, gradient vibes
   ================================ */

/* === CSS Variables === */
:root {
  /* Colors */
  --primary: #9333ea;
  --primary-light: #a855f7;
  --secondary: #ec4899;
  --secondary-light: #f472b6;
  --accent-gradient: linear-gradient(135deg, #9333ea 0%, #ec4899 50%, #f472b6 100%);
  --accent-gradient-hover: linear-gradient(135deg, #a855f7 0%, #f472b6 50%, #f9a8d4 100%);
  
  /* Dark Theme */
  --bg-dark: #0a0612;
  --bg-card: #140d1f;
  --bg-card-hover: #1a1229;
  --bg-elevated: #1f1630;
  
  /* Text */
  --text-primary: #faf5ff;
  --text-secondary: #c4b5fd;
  --text-muted: #8b7aa8;
  
  /* Borders & Shadows */
  --border-subtle: rgba(147, 51, 234, 0.2);
  --border-glow: rgba(236, 72, 153, 0.4);
  --shadow-glow: 0 0 40px rgba(147, 51, 234, 0.3), 0 0 80px rgba(236, 72, 153, 0.15);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(147, 51, 234, 0.1);
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Typography */
  --font-display: 'Outfit', 'Poppins', system-ui, sans-serif;
  --font-body: 'DM Sans', 'Inter', system-ui, sans-serif;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-medium: 250ms ease;
  --transition-slow: 400ms ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Background gradient atmosphere */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(147, 51, 234, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 50%, rgba(236, 72, 153, 0.08) 0%, transparent 40%),
    radial-gradient(ellipse 50% 30% at 20% 80%, rgba(147, 51, 234, 0.1) 0%, transparent 40%);
  pointer-events: none;
  z-index: -1;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 8vw, 4rem);
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  color: var(--text-primary);
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  color: var(--text-primary);
}

p {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 65ch;
}

a {
  color: var(--secondary-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--text-primary);
}

/* === Layout === */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-3xl) 0;
}

/* === Header === */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-md) 0;
  background: rgba(10, 6, 18, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-medium);
}

.header.scrolled {
  background: rgba(10, 6, 18, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--text-primary);
  text-decoration: none;
}

.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  object-fit: contain;
}

.logo-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-buttons {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all var(--transition-medium);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 20px rgba(147, 51, 234, 0.4);
}

.btn-primary:hover {
  background: var(--accent-gradient-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(147, 51, 234, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: var(--space-sm) var(--space-md);
}

.btn-ghost:hover {
  color: var(--text-primary);
}

.btn-large {
  padding: var(--space-md) var(--space-xl);
  font-size: 1rem;
}

/* Hide on mobile */
.btn-desktop {
  display: none;
}

@media (min-width: 640px) {
  .btn-desktop {
    display: inline-flex;
  }
}

/* === Hero Section with Background Image === */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px; /* Account for fixed header */
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10, 6, 18, 0.85) 0%,
    rgba(10, 6, 18, 0.7) 40%,
    rgba(147, 51, 234, 0.3) 100%
  );
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 4rem 0;
}

.hero-content {
  max-width: 600px;
  animation: fadeInUp 0.8s ease-out;
}

/* Mobile: center text */
@media (max-width: 767px) {
  .hero-content {
    text-align: center;
    margin: 0 auto;
  }
  
  .hero-cta {
    justify-content: center;
  }
  
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
}

/* === Social Proof Row === */
.social-proof {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(20, 13, 31, 0.5);
}

.proof-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  text-align: center;
}

@media (min-width: 640px) {
  .proof-items {
    flex-direction: row;
    justify-content: center;
    gap: var(--space-2xl);
  }
}

.proof-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.proof-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-gradient);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.proof-icon svg {
  width: 14px;
  height: 14px;
  color: white;
}

/* === How It Works === */
.how-it-works {
  background: linear-gradient(180deg, transparent 0%, rgba(20, 13, 31, 0.5) 50%, transparent 100%);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-header h2 {
  margin-bottom: var(--space-md);
}

.section-header p {
  margin: 0 auto;
  color: var(--text-muted);
}

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2xl);
  }
}

.step {
  text-align: center;
  padding: var(--space-xl);
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-medium);
}

.step:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-4px);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: white;
  margin-bottom: var(--space-lg);
}

.step-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-md);
  opacity: 0.9;
}

.step h3 {
  margin-bottom: var(--space-sm);
}

.step p {
  font-size: 0.95rem;
  margin: 0 auto;
}

/* === Features Grid === */
.features {
  position: relative;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  padding: var(--space-xl);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-medium);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity var(--transition-medium);
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

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

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.2) 0%, rgba(236, 72, 153, 0.2) 100%);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  color: var(--secondary-light);
}

.feature-card h3 {
  margin-bottom: var(--space-sm);
  font-size: 1.125rem;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* === CTA Section === */
.cta-section {
  background: linear-gradient(180deg, transparent 0%, rgba(147, 51, 234, 0.05) 50%, transparent 100%);
}

.cta-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  padding: var(--space-2xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(147, 51, 234, 0.1) 0%, transparent 50%);
  animation: rotate 20s linear infinite;
}

.cta-content {
  position: relative;
  z-index: 1;
}

.cta-mascot {
  width: 100px;
  height: 100px;
  margin: 0 auto var(--space-lg);
  animation: bounce 2s ease-in-out infinite;
}

.cta-card h2 {
  margin-bottom: var(--space-sm);
}

.cta-card p {
  margin: 0 auto var(--space-xl);
  max-width: 400px;
}

/* Email Form */
.email-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-width: 440px;
  margin: 0 auto;
}

@media (min-width: 480px) {
  .email-form {
    flex-direction: row;
  }
}

.email-input {
  flex: 1;
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all var(--transition-fast);
}

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

.email-input:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.2);
}

.email-form .btn {
  flex-shrink: 0;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: var(--space-md) var(--space-xl);
  background: var(--bg-elevated);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.95rem;
  box-shadow: var(--shadow-glow);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-medium);
  z-index: 2000;
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* === Footer === */
.footer {
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--border-subtle);
  background: rgba(10, 6, 18, 0.8);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  text-align: center;
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md) var(--space-lg);
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

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

.footer-copyright {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* === Animations === */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
}

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

@keyframes floatParticle {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.3;
  }
  90% {
    opacity: 0.3;
  }
  100% {
    transform: translateY(-100vh) rotate(720deg);
    opacity: 0;
  }
}

/* Scroll reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease-out;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.6s; }

.stagger-children.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* === Accessibility === */
:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

/* === Utility Classes === */
.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
