/* ==========================================================================
   Pixelalo Lab — arquetipo 05 (Mouse-Reactive Gradient) con detalle de píxeles
   Negro cálido, un solo acento lima neón, todo en monoespaciada.
   ========================================================================== */

:root {
  --bg:      #0b0b0c;
  --bg-2:    #161618;
  --ink:     #f6f5f1;
  --mute:    #a8a6a0;
  --linea:   #2c2b2e;
  --acento:  #d4ff3a;          /* lima neón: el único acento */
  --mancha-1: #ff2e88;         /* colores del degradado de fondo */
  --mancha-2: #7b3cff;
  --mancha-3: #1f8bff;

  --fuente: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --ancho: 1180px;
  --margen: clamp(16px, 5vw, 48px);
  --pixel: 10px;               /* tamaño del «píxel» de los detalles */
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--fuente);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.05; }
p { margin: 0; }

:focus-visible { outline: 3px solid var(--acento); outline-offset: 3px; }

::selection { background: var(--acento); color: var(--bg); }

.saltar {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--acento); color: var(--bg); padding: 10px 14px; font-weight: 700;
}
.saltar:focus { top: 12px; }

/* ----- Fondo que sigue al cursor ----- */
.fondo {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: var(--bg);
  pointer-events: none;
}
.mancha {
  position: absolute; left: 0; top: 0;
  width: 70vmax; height: 70vmax; margin: -35vmax 0 0 -35vmax;
  border-radius: 50%;
  opacity: .55;
  will-change: transform;
  transform: translate3d(var(--x, 50vw), var(--y, 30vh), 0);
}
.mancha-1 { background: radial-gradient(circle, var(--mancha-1) 0%, transparent 62%); --x: 30vw; --y: 25vh; }
.mancha-2 { background: radial-gradient(circle, var(--mancha-2) 0%, transparent 62%); --x: 75vw; --y: 40vh; opacity: .5; }
.mancha-3 { background: radial-gradient(circle, var(--mancha-3) 0%, transparent 62%); --x: 50vw; --y: 90vh; opacity: .35; }
/* Una rejilla de píxeles muy tenue encima del degradado */
.fondo::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(11,11,12,.55) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(11,11,12,.55) 1px, transparent 1px);
  background-size: 6px 6px;
}
/* Debajo de la portada el fondo se oscurece para que se lea bien el texto */
.fondo::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: rgba(11,11,12, var(--velo, 0));
}

/* ----- Barra superior ----- */
.barra {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 14px var(--margen);
  background: rgba(11,11,12,.82);
  border-bottom: 1px solid var(--linea);
}
@supports (backdrop-filter: blur(8px)) {
  .barra { background: rgba(11,11,12,.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
}
.marca {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -.02em;
}
.marca b { color: var(--acento); font-weight: 700; }
.marca-pixel { width: 21px; height: 27px; fill: var(--ink); shape-rendering: crispEdges; }
.marca-pixel .pixel-acento { fill: var(--acento); }
.menu { display: flex; gap: 22px; margin-left: auto; }
.menu a { text-decoration: none; color: var(--mute); font-size: 15px; }
.menu a:hover { color: var(--ink); }

/* ----- Botones ----- */
.boton {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 22px;
  background: var(--acento); color: var(--bg);
  font: 700 16px/1.2 var(--fuente);
  text-decoration: none;
  border: 2px solid var(--acento);
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .15s ease, box-shadow .15s ease;
}
.boton:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.boton:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.boton-linea { background: transparent; color: var(--ink); border-color: var(--ink); box-shadow: 4px 4px 0 var(--acento); }
.boton-linea:hover { box-shadow: 6px 6px 0 var(--acento); }
.boton-linea:active { box-shadow: 2px 2px 0 var(--acento); }
.boton-chico { min-height: 40px; padding: 8px 16px; font-size: 15px; box-shadow: 3px 3px 0 var(--ink); }
.menu + .boton-chico { margin-left: 0; }

/* ----- Portada ----- */
.portada {
  min-height: calc(100vh - 70px);
  min-height: calc(100svh - 70px);
  display: flex; flex-direction: column; justify-content: center;
  padding: 64px var(--margen) 72px;
  max-width: var(--ancho); margin: 0 auto;
}
.antetitulo {
  color: var(--acento); font-weight: 500; font-size: clamp(16px, 2.2vw, 22px);
  margin-bottom: 12px;
}
.titulo-gigante {
  font-size: clamp(56px, 15.5vw, 210px);
  font-weight: 800; letter-spacing: -.06em; line-height: .95;
  margin-left: -.04em;
}
/* El punto final es un píxel cuadrado que parpadea como cursor */
.punto {
  display: inline-block; width: .2em; height: .2em; margin-left: .06em;
  background: var(--acento);
  animation: parpadeo 1.1s steps(1) infinite;
}
@keyframes parpadeo { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .punto { animation: none; } }

.portada-texto {
  max-width: 46ch; margin-top: 28px;
  font-size: clamp(17px, 2vw, 21px); color: var(--ink);
}
.portada-botones { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 36px; }
/* Texto y botones a la izquierda, los tres perros a la derecha */
.portada-pie {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: end; gap: 32px 48px;
}
.portada-perros { display: block; width: 100%; height: auto; max-width: 560px; justify-self: end; }
@media (max-width: 900px) {
  .portada-pie { grid-template-columns: 1fr; }
  .portada-perros { justify-self: center; max-width: 440px; }
}

/* ----- Fila de píxeles que separa secciones ----- */
.pixeles {
  height: var(--pixel); max-width: var(--ancho); margin: 0 auto;
  background:
    linear-gradient(90deg, var(--acento) 0 var(--pixel), transparent var(--pixel)) 0 0 / calc(var(--pixel) * 3) 100% repeat-x;
  opacity: .9;
  width: calc(100% - var(--margen) * 2);
}

/* ----- Manifiesto ----- */
.manifiesto {
  max-width: var(--ancho); margin: 0 auto;
  padding: clamp(72px, 12vw, 140px) var(--margen);
  text-align: center;
}
.etiqueta {
  font-size: 14px; font-weight: 500; text-transform: uppercase; letter-spacing: .14em;
  color: var(--mute); margin-bottom: 24px;
}
.manifiesto-texto {
  max-width: 34ch; margin: 0 auto;
  font-size: clamp(22px, 3.4vw, 38px); line-height: 1.35; font-weight: 500; letter-spacing: -.02em;
  text-wrap: balance;
}
.manifiesto-texto strong { color: var(--acento); font-weight: 700; }
.manifiesto-texto em { font-style: normal; background: var(--acento); color: var(--bg); padding: 0 .2em; }
.manifiesto-chico { max-width: 40ch; font-size: clamp(19px, 2.6vw, 28px); }

/* ----- Secciones con título grande ----- */
.seccion {
  max-width: var(--ancho); margin: 0 auto;
  padding: clamp(72px, 10vw, 120px) var(--margen);
}
.titulo-seccion {
  font-size: clamp(40px, 8vw, 104px); font-weight: 800; letter-spacing: -.05em;
  display: inline-block; padding: 0 .08em; margin-left: -.08em;
  transition: background .2s ease, color .2s ease;
}
/* Al pasar el ratón el título se invierte (firma del arquetipo) */
@media (hover: hover) {
  .invertible:hover { background: var(--ink); color: var(--bg); }
}
/* Encabezado de sección con su perro mascota a la derecha */
.seccion-cabeza {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: end; gap: 24px 40px;
}
.mascota { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.mascota img {
  display: block; width: auto; height: clamp(150px, 17vw, 210px);
  transition: transform .25s steps(3);
}
.mascota figcaption { max-width: 24ch; text-align: center; color: var(--mute); font-size: 14px; line-height: 1.4; }
/* Al pasar el ratón, el perro da un saltito (por pasos, como en los videojuegos) */
@media (hover: hover) {
  .mascota:hover img { transform: translateY(-10px); }
}
@media (prefers-reduced-motion: reduce) { .mascota img { transition: none; } }

.seccion-intro { max-width: 52ch; margin-top: 20px; color: var(--mute); font-size: 18px; }
.nota { margin-top: 32px; color: var(--mute); font-size: 15px; max-width: 70ch; }

/* ----- Servicios ----- */
.servicios {
  list-style: none; padding: 0; margin: 48px 0 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border-top: 1px solid var(--linea);
}
.servicio {
  padding: 32px 28px 36px 0;
  border-bottom: 1px solid var(--linea);
}
.servicio + .servicio { padding-left: 28px; border-left: 1px solid var(--linea); }
.servicio-num {
  display: inline-block; font-weight: 800; font-size: 15px;
  background: var(--acento); color: var(--bg); padding: 2px 8px; margin-bottom: 22px;
}
.servicio h3 { font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -.03em; margin-bottom: 14px; }
.servicio p { color: var(--mute); }

/* ----- Lista de proyectos que se abre ----- */
.proyectos { margin-top: 48px; border-top: 1px solid var(--linea); }
.proyecto { border-bottom: 1px solid var(--linea); }
.proyecto summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) auto 28px;
  align-items: baseline; gap: 24px;
  padding: 26px 0;
  transition: padding .2s ease, color .2s ease;
}
.proyecto summary::-webkit-details-marker { display: none; }
.proyecto summary:hover { padding-left: 12px; }
.proyecto summary:hover .proyecto-nombre { color: var(--acento); }
.proyecto-nombre { font-size: clamp(30px, 4.6vw, 56px); font-weight: 800; letter-spacing: -.04em; line-height: 1; transition: color .2s ease; }
.proyecto-tema { color: var(--mute); }
.proyecto-anio { color: var(--mute); font-size: 15px; }
.proyecto-pronto { color: var(--acento); }
/* Signo + / − hecho con dos rayas */
.proyecto-signo { position: relative; width: 20px; height: 20px; align-self: center; }
.proyecto-signo::before, .proyecto-signo::after {
  content: ""; position: absolute; left: 0; top: 9px; width: 20px; height: 3px; background: var(--ink);
  transition: transform .2s ease;
}
.proyecto-signo::after { transform: rotate(90deg); }
.proyecto[open] .proyecto-signo::after { transform: rotate(0deg); }
.proyecto-cuerpo {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) auto 28px; gap: 24px;
  padding: 0 0 30px;
}
.proyecto-cuerpo p { grid-column: 2 / 4; max-width: 56ch; }
.proyecto-cuerpo .enlace { grid-column: 2 / 4; justify-self: start; }

/* Enlace con subrayado que crece */
.enlace, .contacto-enlace {
  text-decoration: none;
  background: linear-gradient(var(--acento), var(--acento)) 0 100% / 0 3px no-repeat;
  transition: background-size .3s ease, color .2s ease;
  padding-bottom: 2px;
}
.enlace { color: var(--acento); font-weight: 700; background-size: 100% 2px; }
.enlace:hover { background-size: 100% 100%; color: var(--bg); }

/* ----- Cifras ----- */
.cifras {
  max-width: var(--ancho); margin: 0 auto;
  padding: 24px var(--margen) clamp(72px, 10vw, 120px);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.cifra { border-left: var(--pixel) solid var(--acento); padding-left: 20px; }
.cifra-num {
  display: block; font-size: clamp(56px, 9vw, 120px); font-weight: 800; letter-spacing: -.06em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.cifra-texto { display: block; margin-top: 10px; color: var(--mute); }

/* ----- Recomendados ----- */
.recomendados {
  list-style: none; padding: 0; margin: 48px 0 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
}
.producto {
  display: flex; flex-direction: column; gap: 12px;
  padding: 26px; background: rgba(22,22,24,.92); border: 1px solid var(--linea);
}
.producto h3 { font-size: 22px; letter-spacing: -.02em; line-height: 1.2; }
.producto p { color: var(--mute); }
.producto-de {
  align-self: flex-start; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  color: var(--acento);
}
.producto-vendedor { font-size: 14px; }
.producto .boton { margin-top: auto; align-self: flex-start; }

/* ----- Contacto ----- */
.contacto {
  max-width: var(--ancho); margin: 0 auto;
  padding: clamp(96px, 14vw, 180px) var(--margen);
}
.contacto-titulo { font-size: clamp(36px, 7.4vw, 96px); font-weight: 800; letter-spacing: -.05em; line-height: 1.2; }
.contacto-enlace { background-size: 100% 6px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.contacto-enlace:hover { background-size: 100% 100%; color: var(--bg); }
.contacto-texto { margin-top: 28px; color: var(--mute); max-width: 52ch; font-size: 18px; }

/* ----- Pie ----- */
.pie {
  max-width: var(--ancho); margin: 0 auto;
  padding: 32px var(--margen) 48px;
  border-top: 1px solid var(--linea);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  color: var(--mute); font-size: 14px;
}

/* ----- Celular y tableta ----- */
@media (max-width: 900px) {
  .servicios { grid-template-columns: 1fr; }
  .servicio, .servicio + .servicio { padding: 28px 0; border-left: 0; }
  .proyecto summary { grid-template-columns: minmax(0, 1fr) auto 24px; gap: 6px 16px; }
  .proyecto-tema { grid-column: 1 / -1; grid-row: 2; font-size: 15px; }
  .proyecto-cuerpo { grid-template-columns: 1fr; }
  .proyecto-cuerpo p, .proyecto-cuerpo .enlace { grid-column: 1; }
  .recomendados { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .seccion-cabeza { grid-template-columns: 1fr; }
  .mascota { flex-direction: row; justify-content: flex-start; gap: 16px; }
  .mascota img { height: 130px; }
  .mascota figcaption { text-align: left; }
  .menu { display: none; }
  .barra { justify-content: space-between; }
  .cifras { grid-template-columns: 1fr; gap: 36px; }
  .portada { padding-top: 40px; }
  .portada-botones .boton { width: 100%; }
  .pixeles { --pixel: 8px; }
}

@media print {
  .fondo, .barra, .pixeles { display: none; }
  body { background: #fff; color: #000; }
}
