/* -- 1. VARIABLES GLOBALES Y RESET -- */
:root {
  --color-primary: #007AFF; /* Azul de Sistema */
  --color-secondary: #f4f7fa; /* Gris muy claro */
  --color-dark: #1f2a37; /* Gris oscuro para texto */
  --color-bg-dark: #121c27; /* Fondo oscuro sutil del mockup */
  --color-white: #ffffff;

  --font-main: 'Inter', sans-serif;
  --transition-speed: 0.3s;
}

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

body {
  font-family: var(--font-main);
  color: var(--color-dark);
  line-height: 1.6;
  background: radial-gradient(1200px 800px at 10% 10%, #E6F0FF 0%, transparent 60%),
              radial-gradient(1000px 700px at 90% 20%, #EAFBF5 0%, transparent 55%),
              var(--color-white);
  overflow-x: hidden;
}

#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
  mix-blend-mode: multiply;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

/* -- 2. TIPOGRAFÍA Y ESTILOS GLOBALES -- */
h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--color-primary);
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 2.5rem;
}

/* Botón Primario */
.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 15px 30px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition-speed), transform var(--transition-speed);
}

.btn-primary:hover {
  background-color: #005bb5; /* Tono más oscuro de azul */
  transform: translateY(-2px);
}

/* -- 3. HEADER -- */
header {
  padding: 20px 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--color-dark);
}

/* -- 4. HERO SECTION -- */
.hero {
  background-color: transparent;
  min-height: auto;
  padding: 120px 0 60px;
  display: flex;
  align-items: center;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.hero-text {
  max-width: 760px;
  position: relative;
  z-index: 1;
}

.hero-text h2 {
  color: var(--color-dark);
  font-weight: 300;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  margin-top: 0.5rem;
}

/* Formulario CTA */
.cta-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
  align-items: center;
}

.cta-form input[type="email"] {
  padding: 15px 20px;
  border: 1px solid #ccc;
  border-radius: 8px;
  flex-grow: 1;
  min-width: 250px;
}

/* Visual Central - Animación Flotante del Dispositivo */
/* Eliminado el mockup del dispositivo para una landing más simple */

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.02); }
}

.device-mockup {
  width: 280px;
  height: 550px; /* Altura del mockup del teléfono */
  background-color: var(--color-bg-dark);
  border-radius: 35px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25), 0 0 0 8px var(--color-white);
  padding: 15px; /* Margen interno para simular el borde del teléfono */
  overflow: hidden; /* Muy importante para que la imagen no se salga de los bordes redondeados */
  position: relative;
  display: flex; /* Añadido para centrar la imagen interna */
  justify-content: center; /* Centrar horizontalmente */
  align-items: center; /* Centrar verticalmente */
}

.screen-content {
  height: 100%;
  width: 100%; 
  border-radius: 20px;
  padding: 0; 
  overflow: hidden;
  position: relative;
  display: flex; /* Para centrar la imagen de la app dentro de la pantalla */
  justify-content: center;
  align-items: center;
}

/* Estilos específicos para la captura de pantalla dentro del dispositivo */
.app-screenshot {
  max-width: 100%; /* La imagen no excederá el ancho de la pantalla simulada */
  max-height: 100%; /* La imagen no excederá la altura de la pantalla simulada */
  width: auto; /* Mantener la proporción de la imagen */
  height: auto; /* Mantener la proporción de la imagen */
  display: block; 
  border-radius: 20px; /* Para que coincida con el borde de la pantalla */
  object-fit: contain; /* Asegura que la imagen se vea entera, añadiendo espacio vacío si es necesario */
}


/* -- 5. VALUE SECTION -- */
.value {
  padding: 60px 0;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.value-card {
  padding: 40px;
  background-color: var(--color-secondary);
  border-radius: 12px;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.value-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.value-card h3 {
  margin-top: 10px;
  font-size: 1.35rem;
  color: var(--color-dark);
}

.value-card .icon {
  font-size: 3rem;
  display: block;
  color: var(--color-primary);
}

/* Animación de Revelación - Estado inicial */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Animación de Revelación - Estado final (visible) */
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* -- 6. CTA FINAL -- */
.cta-final {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 50px 0;
  text-align: center;
}

.cta-final h2 {
  color: var(--color-white);
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.cta-final h3 {
  font-size: 1.4rem;
  font-weight: 300;
  margin-bottom: 30px;
}

.cta-form-final {
  display: flex;
  justify-content: center;
  gap: 15px;
  max-width: 600px;
  margin: 0 auto;
}

.cta-form-final input[type="email"] {
  padding: 15px 20px;
  border: none;
  border-radius: 8px;
  min-width: 300px;
  font-size: 1rem;
}

/* -- 7. FOOTER -- */
footer {
  padding: 30px 0;
  text-align: center;
  font-size: 0.9rem;
  border-top: 1px solid #eee;
}

.footer-links a {
  color: var(--color-dark);
  margin: 0 10px;
}

/* -- 8. MEDIA QUERIES (RESPONSIVE DESIGN) -- */
@media (max-width: 900px) {
  .hero-content {
      flex-direction: column;
      text-align: center;
  }

  .hero-text {
      max-width: 100%;
      order: 2; /* Texto abajo en móvil */
  }

  .hero-visual {
      width: 60%;
      order: 1; /* Visual arriba en móvil */
      margin-bottom: 40px;
  }

  h1 {
      font-size: 2.5rem;
  }

  .cta-form, .cta-form-final {
      flex-direction: column;
  }

  .cta-form input[type="email"], .cta-form-final input[type="email"] {
      min-width: 100%;
  }
}

@media (max-width: 600px) {
  h1 {
      font-size: 2rem;
  }

  .section-title {
      font-size: 2rem;
  }
  
  .device-mockup {
      width: 250px;
      height: 480px;
  }
}