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

html {
  background: #1a1a2e;
  overflow-y: scroll;
}

body {
  font-family: "JetBrains Mono", "Fira Code", "Ubuntu Mono", monospace;
  background: transparent;
  color: #fff;
  overflow-x: hidden;
  line-height: 1.6;
  position: relative;
  z-index: 1;
  padding: 2rem 1rem 3rem;
}

/* ========== CANVAS ========== */
#matrix-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: #1e1e1e;
  pointer-events: none;
}

/* ========== HOJA ========== */
.hoja {
  background: #212121;
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 3rem 0.1rem;
  border-radius: 12px;
  box-shadow:
    0 0 0 1px #00ff41,
    0 0 20px rgba(0, 255, 65, 0.3),
    0 20px 60px rgba(0, 0, 0, 0.6);
  position: relative;
  animation: aparecerHoja 0.6s ease;
}

/* ========== TÍTULO MATRIX ========== */
.matrix-text {
  font-family: "JetBrains Mono", monospace;
  color: #2ecc71;
  text-shadow: 0 0 10px #2ecc71;
  height: 64px;
  display: block;
  text-align: center;
  margin: 0 auto;
  margin-top: 1.5rem;
  width: fit-content;
}

/* ========== HEADER ========== */
.hoja-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #2ecc71;
}

.hoja-header .logo {
  width: 180px;
  height: 180px;
  margin-top: -30px;
}

.hoja-header .volver {
  display: flex;
  border: 1px solid #2ecc71;
  border-radius: 30px;
  background-color: rgba(46, 204, 113, 0.1);
  color: #fff;
  font-family: monospace;
  font-size: 1rem;
  padding: 0.5rem 0.5rem;
  white-space: nowrap;
  box-sizing: border-box;
  text-decoration: none;
  margin-top: -100px;
  order: 1;
  transition: all 0.3s ease;
  margin-left: auto;
}

.hoja-header .volver:hover {
  border-color: #00ff41;
  box-shadow: 0 0 15px rgba(46, 204, 113, 0.5);
  transform: translateY(-3px);
  color: #00ff41;
  background: rgba(46, 204, 113, 0.2);
}

.hoja-header #titulo {
  flex-basis: 100%;
  text-align: center;
  margin: -4rem 0 0;
  height: auto;
  white-space: nowrap;
  color: #2ecc71;
  font-size: 2.5rem;
}

/* ========== SUBTÍTULO ========== */
.subtitulo {
  color: #fff;
  text-align: center;
}

/* ========== CAJA (grid de productos) ========== */
.caja {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  justify-content: center;
  gap: 3rem;
  margin: 2rem 0;
  width: 100%;
}

/* ========== CONTENEDOR DE PRODUCTO ========== */
.contenedor {
  display: flex;
  flex-direction: column;
  padding: 0 0 0 2rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  width: 100%;
  max-width: 450px;
  box-sizing: border-box;
  gap: 1rem;
}

/* ========== IMAGEN DE PRODUCTO ========== */
.camaras {
  display: block;
  width: 100%;
  max-width: 400px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 20px;
  background-color: transparent;
  border: 2px solid rgba(46, 204, 113, 1);
  box-shadow: 0 0 10px rgba(46, 204, 113, 0.8);
}

/* ========== TEXTO ========== */
.texto {
  line-height: 1.8;
}

/* ========== LISTA DE CARACTERÍSTICAS ========== */
.producto-caracteristicas {
  color: #ddd;
  padding-left: 1.5rem;
}

.producto-caracteristicas li {
  color: #ddd;
  font-size: 0.9rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(46, 204, 113, 0.15);
  line-height: 1.4;
  list-style: none;
}

.producto-caracteristicas li:last-child {
  border-bottom: none;
}

/* ========== FOOTER ========== */
footer {
  text-align: center;
  padding: 0.5rem;
  background-color: transparent;
  color: #888;
  font-size: 0.9rem;
}

/* ============================================ */
/* ========== RESPONSIVE ========== */
/* ============================================ */

/* Tablets (601px a 1023px) */
@media (max-width: 1023px) {
  .hoja {
    padding: 2rem 1.5rem 0.1rem;
  }

  .hoja-header .logo {
    width: 140px;
    height: 140px;
    margin-top: 0;
  }

  .hoja-header .volver {
    margin-top: 0;
    font-size: 0.9rem;
  }

  .hoja-header #titulo {
    font-size: 2rem;
    white-space: normal;
  }

  .caja {
    gap: 2rem;
  }

  .contenedor {
    padding: 0;
  }
}

/* Móvil (600px o menos) */
@media (max-width: 600px) {
  body {
    padding: 1rem 0.5rem 2rem;
  }

  .hoja {
    padding: 1.5rem 1rem 0.1rem;
    border-radius: 8px;
  }

  /* Header apilado */
  .hoja-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .hoja-header .logo {
    width: 100px;
    height: 100px;
    margin-top: 0;
    order: 0;
  }

  .hoja-header .volver {
    margin-top: 0;
    order: 1;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
  }

  .hoja-header #titulo {
    font-size: 1.5rem;
    white-space: normal;
    order: 2;
    margin-top: 0.5rem;
  }

  .matrix-text {
    font-size: 1.4rem;
    height: auto;
    white-space: normal;
    padding: 0 0.5rem;
  }

  .subtitulo {
    font-size: 1rem;
    padding: 0 0.5rem;
  }

  /* Grid a 1 columna */
  .caja {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin: 1.5rem 0;
  }

  .contenedor {
    max-width: 100%;
    padding: 0;
    align-items: center;
    text-align: center;
  }

  .camaras {
    max-width: 100%;
    height: auto;
  }

  .producto-caracteristicas {
    padding-left: 1rem;
    text-align: left;
  }

  .producto-caracteristicas li {
    font-size: 0.85rem;
    padding: 0.6rem 0;
  }

  footer {
    font-size: 0.8rem;
    padding: 1rem 0.5rem;
  }
}

/* Móviles muy pequeños (400px o menos) */
@media (max-width: 400px) {
  .hoja {
    padding: 1rem 0.75rem 0.1rem;
  }

  .hoja-header #titulo {
    font-size: 1.2rem;
  }

  .matrix-text {
    font-size: 1.1rem;
  }

  .producto-caracteristicas li {
    font-size: 0.8rem;
  }
}
