/* ==========================================================================
   Lapsi.mx - Premium CSS Stylesheet
   Design: Dark Theme, Glassmorphism, Neon Accents, Smooth Animations
   ========================================================================== */

/* Imports */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* Variables */
:root {
  --bg-dark: hsl(222, 47%, 6%);
  --bg-dark-card: hsla(222, 47%, 10%, 0.45);
  --bg-dark-input: hsla(222, 47%, 8%, 0.8);
  --border-light: hsla(220, 14%, 96%, 0.08);
  --border-glow: hsla(270, 95%, 68%, 0.25);
  
  --primary-glow: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(168, 85, 247, 0.05) 50%, transparent 100%);
  --primary: hsl(263, 90%, 65%);       /* Mystic Purple */
  --primary-light: hsl(263, 95%, 75%);
  --secondary: hsl(190, 95%, 45%);     /* Clinical Teal */
  --secondary-light: hsl(190, 95%, 60%);
  --accent: hsl(340, 95%, 60%);        /* Coral Highlight */
  --success: hsl(142, 70%, 50%);       /* Download Safe */

  --text-main: hsl(0, 0%, 100%);
  --text-muted: hsl(215, 20%, 75%);
  --text-dark: hsl(215, 20%, 12%);

  --font-title: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --shadow-glow: 0 8px 32px 0 rgba(168, 85, 247, 0.15);
  --shadow-inner: inset 0 2px 4px 0 rgba(255, 255, 255, 0.05);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius: 16px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Background Glowing Blobs */
body::before {
  content: '';
  position: fixed;
  top: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, hsla(263, 90%, 65%, 0.15) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
  filter: blur(80px);
  animation: floatBlob 20s infinite alternate ease-in-out;
}

body::after {
  content: '';
  position: fixed;
  bottom: -10%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, hsla(190, 95%, 45%, 0.12) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
  filter: blur(80px);
  animation: floatBlob 25s infinite alternate-reverse ease-in-out;
}

@keyframes floatBlob {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(10%, 8%) scale(1.1); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: hsla(263, 90%, 65%, 0.3);
  border-radius: 5px;
  border: 2px solid var(--bg-dark);
}
::-webkit-scrollbar-thumb:hover {
  background: hsla(263, 90%, 65%, 0.5);
}

/* Typography & Titles */
h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Text Gradient Utilities */
.text-gradient {
  background: linear-gradient(135deg, var(--text-main) 30%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-purple {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-teal {
  background: linear-gradient(135deg, var(--secondary-light) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Layout Utilities */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 8rem 0;
  position: relative;
}

/* Glassmorphism Class */
.glass-panel {
  background: var(--bg-dark-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-inner), var(--shadow-glow);
  border-radius: var(--border-radius);
}

/* Header & Navbar */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

.main-header.scrolled {
  background: hsla(222, 47%, 6%, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  transition: var(--transition);
}

.main-header.scrolled .navbar {
  height: 70px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  text-decoration: none;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  font-weight: 800;
  font-size: 1.2rem;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
}

.logo-text span {
  font-weight: 400;
  opacity: 0.8;
}

/* Nav Menu */
.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  padding: 0.5rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--text-main);
}

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

/* Nav CTAs */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.8rem 1.6rem;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--text-main);
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.5);
}

.btn-secondary {
  background: hsla(255, 100%, 100%, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background: hsla(255, 100%, 100%, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-teal {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
  color: var(--bg-dark);
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.25);
  font-weight: 700;
}

.btn-teal:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.45);
}

.btn-outline-purple {
  background: transparent;
  color: var(--primary-light);
  border: 1px solid hsla(263, 90%, 65%, 0.4);
}

.btn-outline-purple:hover {
  background: hsla(263, 90%, 65%, 0.1);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.btn-donation {
  background: #FF9900; /* PayPal Gold */
  color: #1a1a1a;
  box-shadow: 0 4px 15px rgba(255, 153, 0, 0.25);
  font-weight: 700;
}

.btn-donation:hover {
  background: #FFAA22;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 153, 0, 0.4);
}

/* Mobile Nav Toggle */
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero-section {
  min-height: 95vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 10rem;
  padding-bottom: 5rem;
}

.hero-content {
  max-width: 850px;
  margin: 0 auto;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: hsla(263, 90%, 65%, 0.1);
  border: 1px solid hsla(263, 90%, 65%, 0.25);
  color: var(--primary-light);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  margin-bottom: 2rem;
  box-shadow: inset 0 0 10px rgba(168, 85, 247, 0.1);
}

.badge-pill span {
  width: 6px;
  height: 6px;
  background-color: var(--primary-light);
  border-radius: 50%;
  animation: pulseIndicator 1.5s infinite;
}

@keyframes pulseIndicator {
  0% { transform: scale(0.9); opacity: 0.5; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.5; }
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-description {
  font-size: clamp(1.1rem, 2.5vw, 1.25rem);
  max-width: 650px;
  margin: 0 auto 2.5rem auto;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

/* Features Grid (Quick Value Props) */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 5rem;
  text-align: left;
}

.feature-card {
  padding: 2.2rem 1.8rem;
  transition: var(--transition);
  height: 100%;
}

.feature-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-5px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: hsla(263, 90%, 65%, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid hsla(263, 90%, 65%, 0.2);
}

.feature-card:nth-child(2) .feature-icon {
  background: hsla(190, 95%, 45%, 0.1);
  color: var(--secondary-light);
  border-color: hsla(190, 95%, 45%, 0.2);
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.8rem;
}

.feature-card p {
  font-size: 0.95rem;
}

/* Section Header */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem auto;
}

.section-subtitle {
  color: var(--primary-light);
  font-family: var(--font-title);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.8rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 1.2rem;
}

/* Software Showcase Section */
.showcase-grid {
  display: flex;
  flex-direction: column;
  gap: 5rem;
}

.software-item {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
}

.software-item.reverse {
  grid-template-columns: 0.9fr 1.1fr;
}

.software-visual {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), var(--shadow-glow);
  border: 1px solid var(--border-light);
  aspect-ratio: 16 / 10;
  display: flex;
  background-color: var(--bg-dark);
  transition: var(--transition);
}

.software-visual:hover {
  transform: scale(1.02);
  border-color: var(--border-glow);
}

.software-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  transition: transform 6s ease-in-out;
}

.software-visual:hover .software-img {
  transform: translateY(-15%); /* Smooth auto-scroll preview effect on hover */
}

/* Decorative background glowing ring under visual */
.visual-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, hsla(263, 90%, 65%, 0.15) 0%, transparent 65%);
  z-index: -1;
  pointer-events: none;
  filter: blur(20px);
}

.software-item.reverse .visual-glow {
  background: radial-gradient(circle, hsla(190, 95%, 45%, 0.12) 0%, transparent 65%);
}

.software-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.software-tag {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tag-purple {
  background: hsla(263, 90%, 65%, 0.15);
  color: var(--primary-light);
  border: 1px solid hsla(263, 90%, 65%, 0.3);
}

.tag-teal {
  background: hsla(190, 95%, 45%, 0.15);
  color: var(--secondary-light);
  border: 1px solid hsla(190, 95%, 45%, 0.3);
}

.software-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
}

.software-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin: 0.5rem 0 1rem 0;
}

.software-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  font-size: 1rem;
  color: var(--text-muted);
}

.software-bullets li svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 0.2rem;
}

.bullet-purple svg {
  color: var(--primary-light);
}

.bullet-teal svg {
  color: var(--secondary-light);
}

.software-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Donation / Support Section */
.donations-section {
  background: linear-gradient(180deg, var(--bg-dark) 0%, hsla(263, 90%, 20%, 0.08) 50%, var(--bg-dark) 100%);
  position: relative;
}

.donation-card {
  max-width: 650px;
  margin: 0 auto;
  padding: 3.5rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.donation-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
}

.donation-description {
  margin-bottom: 2rem;
}

.donation-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.donation-btn {
  background: hsla(255, 100%, 100%, 0.03);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 1rem 0.5rem;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
}

.donation-btn:hover, .donation-btn.active {
  background: hsla(263, 90%, 65%, 0.15);
  border-color: var(--primary);
  color: var(--primary-light);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.2);
}

.custom-donation-wrapper {
  margin-bottom: 2.5rem;
  position: relative;
}

.custom-donation-input {
  width: 100%;
  background: var(--bg-dark-input);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 1.1rem 1.5rem 1.1rem 2.5rem;
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 10px;
  text-align: center;
  outline: none;
  transition: var(--transition);
}

.custom-donation-input:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.15);
}

.currency-symbol {
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-muted);
}

.donation-footer-text {
  margin-top: 1.2rem;
  font-size: 0.85rem;
  color: hsla(220, 14%, 75%, 0.5);
}

/* Modales e Interfaces de Descarga */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  width: 90%;
  max-width: 480px;
  padding: 3rem 2rem;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--text-main);
}

.download-progress-container {
  margin: 2rem 0;
  background: hsla(255, 100%, 100%, 0.05);
  height: 6px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.download-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 10px;
  transition: width 0.1s linear;
}

.download-status {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Footer */
.main-footer {
  border-top: 1px solid var(--border-light);
  padding: 4rem 0;
  background-color: hsla(222, 47%, 4%, 0.7);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

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

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

/* Responsive Styles */
@media (max-width: 992px) {
  section {
    padding: 6rem 0;
  }
  
  .software-item, .software-item.reverse {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  .software-item.reverse .software-info {
    order: -1;
  }

  .nav-links, .nav-actions {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  /* Mobile drawer structure inside standard navbar toggle */
  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background: var(--bg-dark);
    padding: 2rem;
    border-bottom: 1px solid var(--border-light);
    gap: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  }
}

@media (max-width: 576px) {
  .donation-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .donation-card {
    padding: 2.5rem 1.5rem;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
  
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 1.5rem;
  }
}

/* Floating Scroll Top Trigger */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--bg-dark-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  z-index: 99;
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-top:hover {
  color: var(--text-main);
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}
