/* ═══════════════════════════════════════════════════════
   HOME SIREBAI · styles.css
   Identidad terminal/matrix (D-12): verde + morado
   ═══════════════════════════════════════════════════════ */

/* ── 1. Tokens ── */
:root {
  --color-primario: #00FF41;    /* verde matrix: lluvia, tipeo, etiquetas */
  --color-secundario: #8B5CF6;  /* morado: acciones, hovers, badges */
  --color-fondo: #0D0D0D;
  --color-superficie: #1A1A1A;
  --color-texto: #FFFFFF;
  --color-texto-suave: #AAAAAA;
  --color-texto-apagado: #666666;
  --color-whatsapp: #25D366;
  --fuente: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fuente-terminal: ui-monospace, "Courier New", monospace;
  --radio: 16px;
}

/* ── 2. Reset mínimo ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--fuente);
  background: var(--color-fondo);
  color: var(--color-texto);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

::selection { background: rgba(0, 255, 65, 0.25); }

/* ── 3. Lluvia Matrix detrás de todo ── */
#lluvia-matrix {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.22;          /* sutil: el texto siempre gana */
  pointer-events: none;
}

.barra, main, .pie { position: relative; z-index: 1; }

/* ── 4. Utilidades ── */
.contenedor { width: min(1100px, 92%); margin-inline: auto; }
.contenedor.angosto { max-width: 65ch; }

.texto-suave { color: var(--color-texto-suave); }

.acento {
  color: var(--color-primario);
  text-shadow: 0 0 12px rgba(0, 255, 65, 0.35);
}

.etiqueta {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-primario);
}

/* ── 5. Barra superior ── */
.barra {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 5%;
  background: rgba(13, 13, 13, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0, 255, 65, 0.12);
}

.marca { font-weight: 800; letter-spacing: 1px; text-decoration: none; }
.marca::after { content: "."; color: var(--color-primario); }

/* ── 6. Botones (área táctil ≥ 44px) ── */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.8rem 1.8rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.3s ease,
              background-color 0.3s ease, border-color 0.3s ease;
}
.boton:active { transform: scale(0.98); }

.boton-corto { min-height: 44px; padding: 0.45rem 1.2rem; font-size: 0.9rem; }

.boton-primario { background: var(--color-secundario); color: #FFFFFF; }
.boton-primario:hover { box-shadow: 0 8px 28px rgba(139, 92, 246, 0.4); }

.boton-fantasma { border-color: rgba(0, 255, 65, 0.35); color: var(--color-primario); }
.boton-fantasma:hover { border-color: var(--color-primario); box-shadow: 0 8px 28px rgba(0, 255, 65, 0.2); }

.boton-whatsapp { background: var(--color-whatsapp); color: #06301B; }
.boton-whatsapp:hover { box-shadow: 0 8px 28px rgba(37, 211, 102, 0.3); }

/* ── 7. Hero terminal ── */
.terminal {
  font-family: var(--fuente-terminal);
  color: var(--color-primario);
  font-size: 0.95rem;
  letter-spacing: 1px;
  min-height: 1.5em;
}

.heroe {
  min-height: 84vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 1.4rem;
  padding: 5rem 5% 4rem;
}

.heroe h1 {
  font-family: var(--fuente-terminal);
  font-size: clamp(2rem, 7vw, 4.2rem);
  font-weight: 700;
  line-height: 1.15;
  max-width: 24ch;
  min-height: 3.5em;   /* reserva el espacio del tipeo: nada salta */
  text-wrap: balance;
}

/* Cursor parpadeante del tipeo */
.cursor {
  color: var(--color-primario);
  margin-left: 2px;
  animation: parpadear 1s steps(2, start) infinite;
}

@keyframes parpadear { 50% { opacity: 0; } }

.hero-texto {
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  color: var(--color-texto-suave);
  max-width: 55ch;
}

.hero-botones {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.6rem;
}

/* ── 8. Secciones ── */
.seccion { padding: 4.5rem 0; }

.titulo-seccion {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 1rem;
  text-wrap: balance;
}

.nota {
  text-align: center;
  color: var(--color-texto-suave);
  margin-bottom: 0.5rem;
}

/* ── 9. Pastillas (badges) ── */
.pastilla {
  display: inline-block;
  align-self: flex-start;
  padding: 0.25rem 0.85rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.pastilla-app { background: rgba(0, 255, 65, 0.12); color: var(--color-primario); }
.pastilla-servicio { background: rgba(139, 92, 246, 0.16); color: #B794F6; }

/* ── 10. Tarjetas del portafolio ── */
.cuadricula {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.tarjeta {
  background: var(--color-superficie);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radio);
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.tarjeta:hover {
  transform: translateY(-8px);
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow: 0 12px 32px rgba(139, 92, 246, 0.18);
}

.tarjeta-producto {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  text-decoration: none;
  color: inherit;
}

.tarjeta-producto .icono { font-size: 2rem; line-height: 1; }
.tarjeta-producto h3 { font-size: 1.2rem; }
.tarjeta-producto .descripcion {
  color: var(--color-texto-suave);
  font-size: 0.95rem;
  flex-grow: 1;
}
.tarjeta-producto .ver-mas {
  color: var(--color-secundario);
  font-weight: 700;
  font-size: 0.9rem;
}

/* ── 11. Historia y valores ── */
.historia-texto { margin-top: 1.5rem; }
.historia-texto p {
  color: var(--color-texto-suave);
  text-align: center;
  margin-bottom: 1.2rem;
}
.historia-texto p:last-child {
  color: var(--color-texto);
  font-weight: 600;
}

.valores {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-top: 2.5rem;
}

.valor {
  background: var(--color-superficie);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radio);
  padding: 1.8rem;
  text-align: center;
}

.valor .icono { display: block; font-size: 1.8rem; margin-bottom: 0.8rem; }
.valor h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.valor p { color: var(--color-texto-suave); font-size: 0.9rem; }

/* ── 12. CTA final ── */
.cta-final {
  background: var(--color-superficie);
  border: 1px solid rgba(0, 255, 65, 0.15);
  border-radius: var(--radio);
  padding: 4rem 2rem;
  text-align: center;
}

.cta-final .titulo-seccion, .cta-final .texto-suave { margin-bottom: 0.8rem; }
.cta-final .texto-suave { text-align: center; }
.cta-final .boton { margin-top: 1.2rem; }

/* ── 13. Pie de página ── */
.pie {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 2rem 5%;
  text-align: center;
  color: var(--color-texto-apagado);
  font-size: 0.9rem;
}

/* ── 14. Animaciones ── */
@keyframes aparecerArriba {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animar { opacity: 0; animation: aparecerArriba 0.7s ease forwards; }
.retraso-1 { animation-delay: 0.12s; }
/* Sincronizados con el tipeo del título (~2.2s):
   si cambias la velocidad en main.js, ajusta aquí */
.retraso-2 { animation-delay: 2.3s; }
.retraso-3 { animation-delay: 2.5s; }

.revelar {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.revelar.visible { opacity: 1; transform: translateY(0); }

/* ── 15. Si la persona prefiere menos animación, se respeta ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .animar, .revelar { animation: none; transition: none; opacity: 1; transform: none; }
  .tarjeta:hover { transform: none; }
  .cursor { animation: none; }
}

/* ── 16. Móvil ── */
@media (max-width: 768px) {
  .seccion { padding: 3.5rem 0; }
  .heroe { min-height: 78vh; padding-top: 3rem; }
  .heroe h1 { min-height: 4.6em; }
  .cta-final { padding: 3rem 1.5rem; }
}
