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

:root {
  /* Light Theme Colors (Default) */
  --bg-color: #FFFFFF;
  --bg-secondary: #F8F9FA;
  --text-primary: #121212;
  --text-secondary: #5F6368;
  --brand-primary: #1B0F54;
  --brand-secondary: #4A3BB1;
  --accent-color: #007AFF;
  --border-color: #E0E0E0;
  --card-bg: #FFFFFF;
  --card-shadow: 0 4px 20px rgba(27, 15, 84, 0.08);
  --header-bg: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] {
  /* Dark Theme Colors */
  --bg-color: #0B081A;
  --bg-secondary: #120D26;
  --text-primary: #FFFFFF;
  --text-secondary: #A0A0BA;
  --brand-primary: #FFFFFF;
  --brand-secondary: #7B6EE5;
  --accent-color: #3399FF;
  --border-color: #2A2542;
  --card-bg: #1B0F54;
  --card-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  --header-bg: rgba(11, 8, 26, 0.9);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Accounts for fixed header */
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.8;
}

img {
  max-width: 100%;
  height: auto;
}

/* i18n Strategy - Super clean CSS toggling based on HTML lang */
html[lang="es"] [lang="en"] { display: none !important; }
html[lang="en"] [lang="es"] { display: none !important; }

/* Layout Components */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Nav */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 72px;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.logo img {
  height: 36px;
  width: 36px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-links a {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--brand-secondary);
}

.nav-controls {
  display: flex;
  gap: 16px;
  align-items: center;
}

.btn-icon {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: var(--bg-secondary);
}

.btn-text {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.2s;
}

.btn-text:hover {
  background: var(--bg-secondary);
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--brand-primary);
  color: var(--bg-color); /* Contrasting text */
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  border: none;
  cursor: pointer;
}

[data-theme="dark"] .btn-primary {
  background-color: var(--brand-secondary);
  color: #FFFFFF;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(27, 15, 84, 0.2);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s;
  border: 1px solid var(--border-color);
  cursor: pointer;
}

.btn-secondary:hover {
  background-color: var(--border-color);
}

/* Hero Section */
.hero {
  padding: 160px 0 80px;
  text-align: center;
  background: radial-gradient(circle at top, var(--bg-secondary) 0%, var(--bg-color) 60%);
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: var(--text-primary);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.1;
}

.hero p {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-badges {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}

.badge {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* App Showcase */
.showcase {
  padding: 40px 0 80px;
  display: flex;
  justify-content: center;
}

.mockup-container {
  position: relative;
  width: 100%;
  max-width: 320px;
  border-radius: 40px;
  box-shadow: 0 25px 60px rgba(27, 15, 84, 0.15);
  background-color: var(--card-bg);
  border: 8px solid var(--text-primary);
  overflow: hidden;
  aspect-ratio: 1 / 2.16;
  margin: 0 auto;
}

[data-theme="dark"] .mockup-container {
  border-color: #2A2542;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

.mockup-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Features Section */
.features {
  padding: 100px 0;
  background-color: var(--bg-secondary);
}

.section-title {
  text-align: center;
  font-size: 2.25rem;
  margin-bottom: 64px;
  font-weight: 700;
}

.feature-card {
  flex: 1 1 300px;
  min-width: 280px;
  scroll-snap-align: center;
  background: var(--card-bg);
  padding: 40px 32px;
  border-radius: 24px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-icon {
  width: 56px;
  height: 56px;
  background: var(--brand-primary);
  color: var(--bg-color);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 24px;
}

[data-theme="dark"] .feature-icon {
  background: var(--brand-secondary);
  color: #FFF;
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 16px;
  font-weight: 600;
}

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

.feature-img-wrapper {
  margin-top: 32px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.feature-img-wrapper img {
  width: 100%;
  display: block;
}

/* Pricing Section */
.pricing {
  padding: 100px 0;
}

.slider-wrapper {
  position: relative;
  display: flex;
  align-items: stretch;
}

.showcase-slider {
  align-items: center; /* For mockups */
}

.slider-arrow {
  display: none; /* Hidden by default on desktop if no scroll needed */
  background: var(--bg-secondary);
  color: var(--text-primary);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: var(--card-shadow);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  transition: all 0.2s;
  justify-content: center;
  align-items: center;
}

.slider-arrow:hover {
  background: var(--card-bg);
  box-shadow: 0 4px 15px rgba(27, 15, 84, 0.1);
}

.slider-arrow.prev { left: -24px; }
.slider-arrow.next { right: -24px; }

.slider-track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  width: 100%;
}

.showcase-slider .slider-track {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.showcase-slide {
  flex: 1 1 320px;
  min-width: 280px;
  scroll-snap-align: center;
  display: flex;
  justify-content: center;
}

.pricing-card {
  flex: 1 1 300px;
  min-width: 280px;
  scroll-snap-align: center;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 40px 32px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.3s ease;
}

.pricing-card:hover {
  transform: translateY(-5px);
}

.pricing-card.popular {
  border: 2px solid var(--brand-secondary);
  box-shadow: 0 10px 40px rgba(74, 59, 177, 0.15);
}

[data-theme="dark"] .pricing-card.popular {
  box-shadow: 0 10px 40px rgba(123, 110, 229, 0.2);
}

.popular-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--brand-secondary);
  color: #FFF;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.pricing-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.pricing-card .price {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 32px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.pricing-card .period {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.pricing-features {
  list-style: none;
  margin-bottom: 40px;
  flex-grow: 1;
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.pricing-features li svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: #10B981; /* Green color for checkmarks */
}

/* Legal Pages Styling */
.legal-content {
  padding: 140px 0 80px;
  max-width: 800px;
  margin: 0 auto;
}

.legal-content h1 {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.legal-content .last-updated {
  color: var(--text-secondary);
  margin-bottom: 48px;
  font-size: 0.95rem;
}

.legal-content h2 {
  font-size: 1.5rem;
  margin: 32px 0 16px;
  color: var(--brand-primary);
}

[data-theme="dark"] .legal-content h2 {
  color: var(--brand-secondary);
}

.legal-content p, .legal-content ul, .legal-content li {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 1.05rem;
}

.legal-content ul {
  padding-left: 24px;
}

.legal-content a {
  color: var(--brand-primary);
  text-decoration: underline;
}

[data-theme="dark"] .legal-content a {
  color: var(--brand-secondary);
}

/* Footer */
footer {
  background-color: var(--bg-color);
  padding: 60px 0 40px;
  border-top: 1px solid var(--border-color);
}

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

.footer-col h4 {
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  color: var(--text-secondary);
  font-weight: 500;
}

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

.copyright {
  text-align: center;
  color: var(--text-secondary);
  margin-top: 60px;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .hero { padding: 160px 0 60px; } /* More top padding accounts for wrapped header */
  .footer-content { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; flex-wrap: wrap; }
  
  .nav-container { padding: 12px 0; justify-content: space-between; gap: 8px; }
  .logo, .nav-controls { flex: 0 0 auto; }
  .nav-links { width: 100%; justify-content: center; order: 3; margin-top: 4px; font-size: 0.9rem; }
}

@media (max-width: 900px) {
  .slider-wrapper {
    padding: 0 48px; /* Room for arrows */
  }
  
  .slider-track, .showcase-slider .slider-track {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 20px 4px; 
    margin: -20px -4px;
    gap: 16px;
    -ms-overflow-style: none;
    scrollbar-width: none;
    justify-content: flex-start;
  }
  
  .slider-track::-webkit-scrollbar, .showcase-slider .slider-track::-webkit-scrollbar {
    display: none;
  }
  .slider-arrow {
    display: flex;
  }
  .slider-arrow.prev { left: 0; }
  .slider-arrow.next { right: 0; }

  .pricing-card, .showcase-slide, .feature-card {
    flex: 0 0 100%; /* Fully scaled between the arrows */
    min-width: 100%;
  }
}
