/*
 * Main stylesheet for faceswapai.guru
 * Featuring a modern purple-indigo gradient design
 */

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

:root {
  /* Primary colors */
  --primary: #6366F1;
  --secondary: #EC4899;
  --dark: #111827;
  --dark-alt: #1F2937;
  --light: #F9FAFB;
  --light-alt: #F3F4F6;
  --gray: #9CA3AF;
  --gray-dark: #4B5563;
  
  /* Gradients */
  --gradient-main: linear-gradient(135deg, var(--primary), var(--secondary));
  --gradient-dark: linear-gradient(135deg, var(--dark), var(--dark-alt));
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-xxl: 5rem;
  
  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--light);
  background-color: var(--dark);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.3s ease;
}

img, svg {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

ul, ol {
  list-style: none;
}

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

section {
  padding: var(--space-xxl) 0;
  position: relative;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
  margin-bottom: var(--space-md);
  font-weight: 700;
  line-height: 1.2;
}

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

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: var(--space-lg);
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: var(--space-md);
}

/* === Header === */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: var(--space-md) 0;
  background-color: rgba(17, 24, 39, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo img {
  width: 40px;
  height: 40px;
}

nav ul {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

nav a {
  font-weight: 500;
  position: relative;
}

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

.cta-btn {
  background: var(--gradient-main);
  color: var(--light);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--light);
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* === Hero Section === */
#hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  background: var(--dark);
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.05;
  z-index: 0;
}

#hero::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: var(--secondary);
  opacity: 0.05;
  z-index: 0;
}

#hero .container {
  position: relative;
  z-index: 1;
  text-align: center;
}

#hero h1 {
  margin-bottom: var(--space-lg);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

#hero p {
  font-size: 1.25rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-xl);
  color: var(--gray);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: var(--shadow-md);
}

.btn.primary {
  background: var(--gradient-main);
  color: var(--light);
}

.btn.primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* === Features Section === */
.features-section {
  background-color: var(--dark);
  padding: var(--space-xxl) 0;
  position: relative;
  overflow: hidden;
}

.features-section::before {
  content: '';
  position: absolute;
  top: -300px;
  right: -200px;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.03;
  z-index: 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-xl);
}

.feature-card {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  background-color: rgba(255, 255, 255, 0.03);
}

.feature-icon {
  margin-bottom: var(--space-md);
}

/* === How It Works Section === */
.how-section {
  background-color: var(--dark-alt);
  padding: var(--space-xxl) 0;
  position: relative;
  overflow: hidden;
}

.how-section::after {
  content: '';
  position: absolute;
  bottom: -300px;
  left: -200px;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: var(--secondary);
  opacity: 0.03;
  z-index: 0;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  max-width: 800px;
  margin: 0 auto var(--space-xl);
  position: relative;
  z-index: 1;
}

.step {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
  transition: all 0.3s ease;
}

.step-number {
  background: var(--gradient-main);
  min-width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--light);
  box-shadow: var(--shadow-md);
}

.step-content {
  flex: 1;
}

.cta-container {
  text-align: center;
  margin-top: var(--space-xl);
}

/* === Animations === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animated,
.animate.shown {
  opacity: 1;
  transform: translateY(0);
}

/* Apply different delays to staggered elements */
.features-grid .feature-card:nth-child(2),
.steps .step:nth-child(2) {
  transition-delay: 0.2s;
}

.features-grid .feature-card:nth-child(3),
.steps .step:nth-child(3) {
  transition-delay: 0.4s;
}

.faq-container .faq-item:nth-child(2) {
  transition-delay: 0.2s;
}

.faq-container .faq-item:nth-child(3) {
  transition-delay: 0.3s;
}

/* === FAQ Section === */
.faq-section {
  background-color: var(--dark);
  padding: var(--space-xxl) 0;
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: var(--space-md);
  transition: all 0.3s ease;
}

.faq-question {
  padding: var(--space-md) 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question h3 {
  margin: 0;
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

.faq-question:hover h3 {
  color: var(--primary);
}

.toggle {
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--primary);
  transition: transform 0.3s ease;
}

.faq-item.active .toggle {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 200px;
  padding-bottom: var(--space-md);
}

.faq-answer p {
  color: var(--gray);
  margin-bottom: 0;
}

/* === CTA Section === */
.cta-section {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.1));
  text-align: center;
  padding: var(--space-xxl) 0;
}

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

.cta-section p {
  max-width: 600px;
  margin: 0 auto var(--space-xl);
  color: var(--gray);
}

.btn.large {
  padding: 1.2rem 2.5rem;
  font-size: 1.2rem;
}

/* === Footer === */
footer {
  background-color: var(--dark-alt);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: var(--space-xl) 0 var(--space-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-lg);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

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

.footer-logo span {
  font-weight: 700;
  font-size: 1.2rem;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.footer-brand p {
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 0;
}

.footer-links h4 {
  color: var(--light);
  margin-bottom: var(--space-md);
  font-size: 1.1rem;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-links a {
  color: var(--gray);
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

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

.copyright {
  text-align: center;
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

footer p {
  margin-bottom: 0;
  font-size: 0.875rem;
  color: var(--gray);
}

/* === Responsive Styles === */
@media (max-width: 991px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }
  
  .footer-brand {
    grid-column: 1 / -1;
    text-align: center;
    align-items: center;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  
  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: right 0.3s ease;
    z-index: 999;
  }
  
  nav.active {
    right: 0;
  }
  
  nav ul {
    flex-direction: column;
    align-items: center;
    gap: var(--space-xl);
  }
  
  nav a {
    font-size: 1.25rem;
  }
  
  .step {
    flex-direction: column;
    text-align: center;
  }
  
  .step-number {
    margin: 0 auto var(--space-md);
  }
  
  .features-grid,
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    text-align: center;
  }
  
  .footer-links {
    text-align: center;
  }
  
  .footer-links ul {
    align-items: center;
  }
}

@media (max-width: 576px) {
  .logo span {
    font-size: 1rem;
  }
  
  .cta-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
  
  h1 {
    font-size: clamp(2rem, 5vw, 2.5rem);
  }
  
  h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
  }
  
  .btn {
    padding: 0.75rem 1.5rem;
  }
}
