/* --- VARIABLES GLOBALES --- */
:root {
  --primary: #6c63ff;
  --primary-dark: #5a52d5;
  --secondary: #2a2a2a;
  --bg-color: #f8f9fa;
  --text-main: #1a1a2e;
  --text-muted: #6c757d;
  --card-bg: #ffffff;
  --gradient-purple: linear-gradient(135deg, #6c63ff 0%, #a89eff 100%);
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* --- RESET BÁSICO --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Outfit", "Poppins", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden; /* Evita scroll horizontal */
}

/* --- NAVBAR --- */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px); /* Efecto vidrio */
  z-index: 1000;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 15px 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--text-main);
}

.logo-img {
  height: 35px;
  width: 35px;
  border-radius: 8px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 500;
  transition: color 0.3s;
}

.nav-link:hover {
  color: var(--primary);
}

/* --- HERO SECTION --- */
.hero {
  padding: 140px 0 80px;
  background: radial-gradient(
    circle at top right,
    rgba(108, 99, 255, 0.1) 0%,
    transparent 40%
  );
  overflow: hidden;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

.badge-pill {
  display: inline-block;
  background: rgba(108, 99, 255, 0.1);
  color: var(--primary);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.1;
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.text-gradient {
  background: var(--gradient-purple);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 30px;
  max-width: 90%;
}

.hero-cta {
  display: flex;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

/* BOTONES */
.btn-primary {
  background: var(--primary);
  color: white;
  padding: 12px 28px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(108, 99, 255, 0.3);
  background: var(--primary-dark);
}

.btn-primary.small {
  padding: 8px 20px;
  font-size: 0.9rem;
}

.btn-secondary {
  background: white;
  color: var(--text-main);
  padding: 12px 28px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid #ddd;
  transition: all 0.2s;
}

.btn-secondary:hover {
  border-color: var(--text-main);
  background: #f8f9fa;
}

/* ESTADÍSTICAS */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  background: white;
  padding: 15px 25px;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  display: inline-flex;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-item strong {
  font-size: 1.2rem;
  color: var(--text-main);
}

.stat-item span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.divider {
  width: 1px;
  height: 30px;
  background: #eee;
}

/* VISUAL PHONE */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.blob {
  position: absolute;
  width: 300px;
  height: 300px;
  background: var(--primary);
  opacity: 0.1;
  filter: blur(60px);
  border-radius: 50%;
  z-index: -1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.phone-mockup {
  width: 280px;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15));
  transform: rotate(-5deg);
  transition: transform 0.5s ease;
  z-index: 2;
}

.phone-mockup:hover {
  transform: rotate(0deg) scale(1.02);
}

/* Fallback si no carga la imagen del teléfono */
.fallback-phone {
  width: 260px;
  height: 520px;
  background: white;
  border-radius: 40px;
  border: 8px solid #2a2a2a;
  display: none; /* Se activa con JS si falla la imagen */
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transform: rotate(-5deg);
}

.screen-content {
  text-align: center;
}

/* --- BENTO GRID SECCIÓN --- */
.features-section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  font-weight: 800;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  /* Eliminamos grid-template-rows fijo para mejor respuesta */
}

.bento-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
  min-height: 250px;
}

.bento-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* Tamaños de las tarjetas */
.bento-card.large {
  grid-column: span 2;
  background: #1a1a1a;
  color: white;
}

.bento-card.large h3,
.bento-card.large p {
  color: white;
}

.bento-card.large p {
  opacity: 0.8;
  max-width: 70%;
}

.bento-card.medium {
  grid-column: span 1;
}

.bento-card.wide {
  grid-column: span 3;
}

/* Contenido Interno */
.icon-box {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.icon-box span {
  font-size: 28px;
}

.icon-box.purple {
  background: rgba(108, 99, 255, 0.2);
  color: #a89eff;
}
.icon-box.blue {
  background: #e3f2fd;
  color: #2196f3;
}
.icon-box.orange {
  background: #fff3e0;
  color: #ff9800;
}
.icon-box.green {
  background: #e8f5e9;
  color: #4caf50;
}

.bento-card h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.bento-card p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Decoración Visual Bento */
.bento-visual {
  position: absolute;
  bottom: -50px;
  right: -50px;
  width: 250px;
  height: 250px;
  background: var(--gradient-purple);
  filter: blur(80px);
  opacity: 0.4;
  border-radius: 50%;
  pointer-events: none;
}

.row-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.visual-side {
  flex-shrink: 0;
}

.calendar-mock {
  display: flex;
  gap: 10px;
}

.calendar-mock .day {
  background: #f0f0f0;
  padding: 10px 15px;
  border-radius: 12px;
  font-weight: 600;
  color: #aaa;
}

.calendar-mock .day.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 5px 15px rgba(108, 99, 255, 0.3);
}

/* --- DOWNLOAD SECTION --- */
.download-section {
  padding: 50px 0 100px;
}

.download-card {
  background: var(--primary);
  border-radius: 30px;
  padding: 60px;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(108, 99, 255, 0.3);
}

.download-content {
  position: relative;
  z-index: 1;
}

.download-card h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  font-weight: 800;
}

.download-card p {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 30px;
}

.store-btn img {
  height: 60px;
  transition: transform 0.2s;
}

.store-btn:hover img {
  transform: scale(1.05);
}

/* --- FOOTER --- */
.main-footer {
  background: white;
  padding: 60px 0 20px;
  border-top: 1px solid #eee;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand h4 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.footer-links a {
  margin-left: 20px;
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  text-align: center;
  color: #aaa;
  font-size: 0.9rem;
  border-top: 1px solid #f5f5f5;
  padding-top: 20px;
}

/* --- UTILIDADES --- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-cta,
  .hero-stats {
    justify-content: center;
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }

  .bento-card.large,
  .bento-card.medium,
  .bento-card.wide {
    grid-column: span 1;
  }

  .row-layout {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .calendar-mock {
    justify-content: center;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-links a {
    margin: 0 10px;
  }
}
