/**
 * Landing Page Styles
 * High-converting landing page for FairyTale Genie
 */

/* Global landing page container */
.landing-page {
  width: 100%;
  margin: 0;
  padding: 0;
}

/* Compact Benefits Section */
.benefits-section {
  padding: 80px 30px;
  background: white;
  text-align: center;
}

.benefits-container {
  max-width: 900px;
  margin: 0 auto;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 50px;
  margin-bottom: 60px;
}

.benefit-item {
  text-align: center;
}

.benefit-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.benefit-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 10px;
  line-height: 1.3;
}

.benefit-description {
  color: #718096;
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 280px;
  margin: 0 auto;
}

/* Utility Classes */
.hidden {
  display: none !important;
}

.fade-out {
  opacity: 0 !important;
}

/* Cycling Occasion Text */
.occasion-cycling {
  color: #ff6b6b;
  font-weight: 800;
  transition: opacity 0.3s ease-in-out;
  display: inline-block;
  min-width: 200px;
  text-align: center;
  opacity: 1;
}

/* Videos Grid Layout */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1100px;
  margin: 0 auto;
}

/* Inline Video Styles */
.inline-video-wrapper {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  transition: all 0.4s ease-in-out;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.inline-video-wrapper:hover {
  transform: scale(1.02);
}

.inline-video-wrapper.expanded {
  max-width: 450px;
  z-index: 100;
  transform: scale(1.1);
  cursor: default;
}

.inline-video-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 40px;
  text-align: center;
  line-height: 1.4;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
}

.inline-video-container {
  position: relative;
  width: 100%;
  padding-bottom: 94.83%; /* Increased by 2/3 for taller shorts */
  height: 0;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  transition: all 0.4s ease-in-out;
}

.inline-video-wrapper.expanded .inline-video-container {
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  padding-bottom: 140%; /* Even taller when expanded */
}

.inline-video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* CTA Section Enhancements */
.cta-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.cta-video-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
  margin-bottom: 15px;
  margin-top: 30px;
}

.cta-video-container {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  padding-bottom: 94.83%; /* Increased by 2/3 for taller shorts */
  height: 0;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.cta-video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.cta-subtext {
  color: rgba(255,255,255,0.9);
  font-size: 0.95rem;
  margin: 20px 0 30px;
}

.cta-subtitle {
  margin-bottom: 30px;
}

.cta-button {
  display: inline-block;
  margin-bottom: 30px;
}

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

.feature-card {
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }

/* Loading state for demo form */
.demo-form.loading .generate-button {
  background: #9ca3af;
  cursor: not-allowed;
  position: relative;
}

.demo-form.loading .generate-button::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s linear infinite;
}

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

/* Trust indicators */
.trust-badges {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
}

.trust-badge i {
  font-size: 1.2rem;
}

/* Social proof section */
.social-proof {
  padding: 40px 20px;
  background: #f7fafc;
  text-align: center;
}

.testimonial {
  max-width: 600px;
  margin: 0 auto 30px;
  padding: 30px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.testimonial-text {
  font-style: italic;
  margin-bottom: 15px;
  color: #4a5568;
  line-height: 1.6;
}

.testimonial-author {
  font-weight: 600;
  color: #2d3748;
}

/* Accessibility improvements */
.generate-button:focus,
.cta-button:focus {
  outline: 3px solid #fbbf24;
  outline-offset: 2px;
}

input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Tablet Responsive - 2 videos per row */
@media (max-width: 1024px) {
  .videos-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 700px;
    gap: 35px;
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .benefits-section {
    padding: 60px 24px;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 50px;
  }

  .benefit-icon {
    font-size: 2rem;
  }

  .benefit-title {
    font-size: 1rem;
    line-height: 1.3;
  }

  .benefit-description {
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: 100%;
    padding: 0 10px;
  }

  .inline-video-title {
    font-size: 1.2rem;
    line-height: 1.4;
    margin-bottom: 35px;
    padding: 0 10px;
  }

  .cta-video-title {
    font-size: 1.1rem;
  }

  /* Stack videos on mobile */
  .videos-grid {
    grid-template-columns: 1fr;
    gap: 50px;
    padding: 0 20px;
  }

  .inline-video-wrapper {
    max-width: 100%;
  }

  .inline-video-wrapper.expanded {
    max-width: 100%;
    transform: scale(1.05);
  }

  .inline-video-wrapper.expanded .inline-video-container {
    padding-bottom: 130%; /* Slightly less tall on mobile */
  }

  .occasion-cycling {
    min-width: 150px;
    font-size: 0.95rem;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .videos-grid {
    gap: 30px;
    padding: 0 15px;
  }

  .inline-video-title {
    font-size: 1rem;
    line-height: 1.4;
  }

  .occasion-cycling {
    min-width: 120px;
    font-size: 0.9rem;
  }
}

/* Print styles */
@media print {
  .demo-section,
  .cta-section {
    display: none;
  }
}
