/* =========================
   VARIABLES & RESET
   ========================= */
:root {
  --bg-dark: #050505;
  --text-main: #ffffff;
  --text-muted: #a1a1aa;
  --accent: #3b82f6;
  /* Azul Rubiku */
  --glass: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.08);
  --font-main: 'Space Grotesk', system-ui, sans-serif;

  /* Nuevo verde WhatsApp más elegante */
  --wa-dark: #064e3b;
  --wa-light: #10b981;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-main);
  overflow: hidden;
  /* Ocultamos scroll nativo feo */
}

a {
  text-decoration: none;
  color: inherit;
}

/* =========================
   SCROLL SNAP CONTAINER
   ========================= */
.snap-container {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  /* El empujón obligatorio */
  scroll-behavior: smooth;
}

.section {
  height: 100vh;
  width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  /* Fuerza a detenerse en la sección */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 2rem;
}

/* =========================
   ANIMACIÓN REVEAL (FADE IN)
   ========================= */
/* Estado inicial: invisible y un poco abajo */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Estado activo: visible y en su sitio (JS agrega esta clase) */
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   LAYOUT & TIPOGRAFÍA
   ========================= */
.content-box {
  max-width: 1200px;
  width: 100%;
  z-index: 10;
  position: relative;
}

.center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.txt-accent {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.5rem);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.section__title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.section__desc {
  color: var(--text-muted);
  margin-bottom: 3rem;
  font-size: 1.2rem;
}

.muted-text {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* =========================
   HERO VIDEO
   ========================= */
.hero__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.3) 0%, rgba(5, 5, 5, 1) 90%);
  z-index: 2;
}

.hero__logo {
  width: 80px;
  height: 80px;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.6));
}

/* =========================
   BOTONES PRINCIPALES
   ========================= */
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
}

.button--primary {
  background: white;
  color: black;
  border: 1px solid white;
}

.button--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.15);
}

/* BOTÓN WHATSAPP ELEGANTE */
.button--whatsapp {
  background: linear-gradient(135deg, var(--wa-dark) 0%, var(--wa-light) 100%);
  color: #ecfdf5;
  border: 1px solid rgba(16, 185, 129, 0.3);
  box-shadow: 0 10px 30px rgba(5, 150, 105, 0.2);
}

.button--whatsapp:hover {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(16, 185, 129, 0.3);
  color: white;
}

/* =========================
   GRID DE PRODUCTOS (CARDS)
   ========================= */
.grid-products {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  width: 100%;
}

@media(min-width: 900px) {
  .grid-products {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card-product {
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  padding: 2.5rem 2rem;
  border-radius: 24px;
  transition: all 0.4s ease;

  /* Flexbox para alinear contenido */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.card-product:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card__body {
  margin-bottom: 1.5rem;
}

.card__icon-box {
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.card__title {
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  font-weight: 700;
}

.card__text {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.card__status {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Colores de estado */
.status--live {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.status--dev {
  background: rgba(251, 191, 36, 0.15);
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.status--new {
  background: rgba(244, 63, 94, 0.15);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

/* Footer de la tarjeta con botones pequeños */
.card__footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: flex-end;
  /* Alinea botón a la derecha */
}

.button--sm {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  transition: all 0.2s ease;
}

.button--sm:hover {
  background: white;
  color: black;
  transform: translateX(5px);
}

.button--disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.1);
}

.button--disabled:hover {
  background: transparent;
  color: white;
  transform: none;
}

/* =========================
   SOCIAL LINKS
   ========================= */
.social-links {
  display: flex;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.social-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.8rem;
  border-radius: 14px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--glass);
  color: var(--text-muted);
  transition: 0.3s;
}

.social-btn:hover {
  background: white;
  color: black;
  transform: translateY(-2px);
}

/* Footer simple */
.main-footer {
  margin-top: 4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  opacity: 0.5;
}

/* =========================
   CANVAS BACKGROUND
   ========================= */
.sparkle-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}






/* =========================================
   OPTIMIZACIÓN MÓVIL: STACK COMPACTO (LIST VIEW)
   ========================================= */
@media (max-width: 768px) {

  /* 1. Ajustar el contenedor para que NUNCA haga scroll interno */
  .section.products {
    height: 100dvh;
    /* Altura exacta de la pantalla */
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Centrar todo verticalmente */
  }

  /* 2. Reducir tamaño de textos de cabecera para ganar espacio */
  .products .section__title {
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
  }

  .products .section__desc {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }

  /* 3. El Grid ahora es una columna flexible que ocupa el espacio disponible */
  .grid-products {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    /* Espacio entre las tiras */
    height: auto;
  }

  /* 4. TRANSFORMACIÓN DE TARJETA A TIRA (STRIP) */
  .card-product {
    flex-direction: row;
    /* Cambiamos de columna a fila horizontal */
    align-items: center;
    /* Alinear al centro verticalmente */
    padding: 0.8rem 1rem;
    /* Padding comprimido */
    min-height: auto;
    /* Quitamos la altura mínima forzada */
    height: auto;
    gap: 1rem;
  }

  /* 5. Ajustes internos de la Tira */
  .card__body {
    margin-bottom: 0;
    /* Quitamos margen inferior */
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-grow: 1;
    /* Ocupar todo el espacio posible */
  }

  .card__icon-box {
    width: 44px;
    height: 44px;
    margin-bottom: 0;
    /* El icono ya no tiene margen abajo */
    flex-shrink: 0;
    /* Que no se aplaste el icono */
  }

  /* Agrupar Título y Estado verticalmente dentro de la fila */
  .card__content-wrapper {
    /* Nota: Esto asume que el HTML tiene estructura, 
       pero podemos usar flex-wrap si no queremos tocar HTML.
       Truco CSS para alinear sin tocar HTML: */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
  }

  .card__title {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
    line-height: 1;
  }

  /* 6. OCULTAR LA DESCRIPCIÓN EN MÓVIL */
  /* Esta es la clave para que quepan las 3: sacrificamos el texto largo */
  .card__text {
    display: none;
  }

  .card__status {
    font-size: 0.65rem;
    padding: 0.2rem 0.6rem;
  }

  /* 7. El Footer (Botón) se simplifica */
  .card__footer {
    border-top: none;
    /* Quitamos la linea divisoria */
    margin-top: 0;
    padding-top: 0;
    width: auto;
  }

  /* Botón más compacto (solo la flecha o texto corto) */
  .button--sm {
    padding: 0.5rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    /* Lo volvemos un círculo */
    justify-content: center;
  }

  /* Ocultamos el texto "Ingresar" y dejamos solo la flecha */
  .button--sm span {
    display: block;
    /* Asegurar que la flecha se vea */
    font-size: 1.2rem;
  }

  /* Hack para ocultar el texto "Ingresar" pero dejar el span de la flecha si está separado,
     si el texto está junto, mejor reducimos la fuente: */
  .button--sm {
    font-size: 0;
    /* Oculta texto */
  }

  .button--sm span {
    font-size: 1.2rem;
    /* Muestra flecha */
  }

  /* Ajuste especial para el botón "Pronto..." de Spark */
  .button--disabled {
    font-size: 0.7rem;
    /* Ese sí lo mostramos pequeño */
    width: auto;
    height: auto;
    border-radius: 20px;
    padding: 0.4rem 0.8rem;
  }
}


.main-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

.footer__links {
  margin-bottom: 1rem;
}

.footer__links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s;
}

.footer__links a:hover {
  color: var(--txt-accent);
  /* O el color dorado/celeste de tu marca */
}