/* ===== Tokens provisionales: cambia aquí paleta y tipografía ===== */
:root {
  --papel: #f8f9fb;
  --blanco: #ffffff;
  --cuadricula: #e3e8f2;
  --linea: #d5dbe7;
  --tinta: #1e3a8a;
  --tinta-oscura: #152a63;
  --grafito: #262a33;
  --gris: #555b69;
  --margen: #d9534f;
  --marcatexto: #fce762;

  --f-titulo: "Palatino Linotype", "Book Antiqua", Palatino, "Iowan Old Style", Georgia, serif;
  --f-texto: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;

  --radio: 6px;
  --ancho: 72rem;
  --gutter: 1rem;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--papel);
  color: var(--grafito);
  font-family: var(--f-texto);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3 {
  font-family: var(--f-titulo);
  color: var(--tinta-oscura);
  line-height: 1.2;
  margin: 0 0 .5em;
  font-weight: 700;
}
h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

a { color: var(--tinta); text-underline-offset: .2em; }
a:hover { color: var(--tinta-oscura); }

:focus-visible {
  outline: 3px solid var(--tinta);
  outline-offset: 3px;
  border-radius: 2px;
}

.contenedor {
  width: 100%;
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.salto {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  background: var(--tinta);
  color: var(--blanco);
  padding: .5rem 1rem;
  z-index: 100;
}
.salto:focus { top: .5rem; }

.visualmente-oculto {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ===== Aviso de prueba ===== */
.aviso-prueba {
  background: var(--grafito);
  color: var(--blanco);
  font-size: .875rem;
  text-align: center;
  margin: 0;
  padding: .35rem var(--gutter);
}

/* ===== Encabezado ===== */
.encabezado {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--blanco);
  border-bottom: 1px solid var(--linea);
}
.encabezado .contenedor {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
  flex-wrap: wrap;
}
.marca {
  font-family: var(--f-titulo);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--tinta-oscura);
  text-decoration: none;
}
.menu-boton {
  font: inherit;
  font-size: .95rem;
  background: none;
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  padding: .4rem .8rem;
  color: var(--grafito);
  cursor: pointer;
}
.nav {
  display: none;
  width: 100%;
  padding-bottom: .75rem;
}
.nav.abierta { display: block; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav a {
  display: block;
  padding: .6rem 0;
  color: var(--grafito);
  text-decoration: none;
  border-top: 1px solid var(--cuadricula);
}
.nav a:hover { color: var(--tinta); }

@media (min-width: 48rem) {
  .menu-boton { display: none; }
  .nav { display: block; width: auto; padding: 0; }
  .nav ul { display: flex; gap: 1.75rem; }
  .nav a { border: 0; padding: .25rem 0; }
}

/* ===== Botones ===== */
.boton {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  background: var(--tinta);
  color: var(--blanco);
  border: 2px solid var(--tinta);
  border-radius: var(--radio);
  padding: .7rem 1.4rem;
  text-decoration: none;
  cursor: pointer;
}
.boton:hover { background: var(--tinta-oscura); border-color: var(--tinta-oscura); color: var(--blanco); }
.boton[disabled] { background: var(--linea); border-color: var(--linea); color: var(--gris); cursor: not-allowed; }

/* ===== Papel cuadriculado ===== */
.cuadriculado {
  background-color: var(--blanco);
  background-image:
    linear-gradient(var(--cuadricula) 1px, transparent 1px),
    linear-gradient(90deg, var(--cuadricula) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* ===== Inicio ===== */
.inicio {
  position: relative;
  border-bottom: 1px solid var(--linea);
  overflow: hidden;
}
.inicio::before {           /* línea de margen del cuaderno */
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: calc(var(--gutter) * .5);
  width: 2px;
  background: var(--margen);
  opacity: .7;
}
.inicio .contenedor {
  display: grid;
  gap: 2.5rem;
  padding-top: 3rem;
  padding-bottom: 3.5rem;
  padding-left: calc(var(--gutter) * 1.75);
}
.inicio-texto { max-width: 36rem; }
.inicio-marca {
  font-family: var(--f-titulo);
  font-size: 1.15rem;
  color: var(--gris);
  margin-bottom: .75rem;
}
.inicio-bajada { font-size: 1.15rem; color: var(--grafito); max-width: 32rem; }
.niveles { color: var(--gris); font-size: .95rem; margin-top: 1rem; }

.pila {
  position: relative;
  height: 15rem;
  max-width: 26rem;
  width: 100%;
  margin: 0 auto;
}
.pila .hoja {
  position: absolute;
  transform: translateX(var(--mover)) rotate(var(--giro));
  animation: abanico .8s cubic-bezier(.2, .8, .2, 1) .15s both;
}
.pila .hoja svg { width: 100%; height: auto; }
.hoja-reporte { width: 34%; left: 10%; top: 2%; --giro: -8deg; --mover: -12%; }
.hoja-info    { width: 34%; right: 10%; top: 0;  --giro: 7deg;  --mover: 12%; }
.hoja-pres    { width: 72%; left: 14%; top: 34%; --giro: -1.5deg; --mover: 0%; }
@keyframes abanico {
  from { transform: translateX(0) rotate(0); }
  to   { transform: translateX(var(--mover)) rotate(var(--giro)); }
}

@media (min-width: 56rem) {
  .inicio::before { left: 2rem; }
  .inicio .contenedor {
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    padding-top: 5rem;
    padding-bottom: 5.5rem;
    padding-left: 3.5rem;
  }
  .pila { height: 20rem; }
}

/* ===== Secciones ===== */
.seccion { padding: 4rem 0; }
.seccion + .seccion { border-top: 1px solid var(--linea); }
.seccion-intro { max-width: 40rem; color: var(--gris); margin-bottom: 2rem; }

/* ===== Catálogo ===== */
.filtros {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
}
.filtros legend { font-weight: 600; margin-bottom: .5rem; padding: 0; width: 100%; }
.filtro {
  font: inherit;
  font-size: .95rem;
  background: var(--blanco);
  color: var(--grafito);
  border: 1px solid var(--linea);
  border-radius: 999px;
  padding: .4rem 1rem;
  cursor: pointer;
}
.filtro:hover { border-color: var(--tinta); }
.filtro[aria-pressed="true"] { background: var(--tinta); border-color: var(--tinta); color: var(--blanco); }
.conteo { color: var(--gris); font-size: .95rem; margin-bottom: 1.5rem; }

.rejilla {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr));
}
.producto {
  display: flex;
  flex-direction: column;
  background: var(--blanco);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  overflow: hidden;
}
.producto[hidden] { display: none; }
.producto:hover, .producto:focus-within { border-color: var(--tinta); }
.miniatura {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--linea);
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
}
.miniatura svg { width: 100%; height: 100%; }
.producto-cuerpo { padding: 1rem 1.25rem 1.25rem; display: flex; flex-direction: column; flex: 1; }
.etiquetas { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; font-size: .8rem; }
.etiqueta {
  border: 1px solid var(--linea);
  border-radius: 4px;
  padding: .05rem .5rem;
  color: var(--gris);
}
.ejemplo {
  background: var(--marcatexto);
  color: var(--grafito);
  border-radius: 2px;
  padding: .05rem .5rem;
  font-weight: 600;
}
.producto p { color: var(--gris); font-size: .97rem; }
.producto-pie {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.precio { font-family: var(--f-titulo); font-size: 1.25rem; font-weight: 700; color: var(--grafito); }

/* ===== Cómo comprar ===== */
.pasos {
  list-style: none;
  counter-reset: paso;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 48rem) { .pasos { grid-template-columns: repeat(4, 1fr); } }
.pasos li {
  counter-increment: paso;
  border-left: 2px solid var(--margen);
  padding-left: 1rem;
}
.pasos li::before {
  content: counter(paso);
  display: block;
  font-family: var(--f-titulo);
  font-size: 2rem;
  font-weight: 700;
  color: var(--tinta);
  line-height: 1;
  margin-bottom: .5rem;
}
.pasos p { color: var(--gris); font-size: .97rem; }
.por-definir {
  display: inline-block;
  font-size: .8rem;
  border: 1px dashed var(--gris);
  border-radius: 4px;
  padding: 0 .45rem;
  color: var(--gris);
}

/* ===== Preguntas frecuentes ===== */
.preguntas { max-width: 46rem; }
.preguntas details { border-bottom: 1px solid var(--linea); }
.preguntas details:first-child { border-top: 1px solid var(--linea); }
.preguntas summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 2rem 1rem 0;
  font-weight: 600;
  position: relative;
}
.preguntas summary::-webkit-details-marker { display: none; }
.preguntas summary::after {
  content: "+";
  position: absolute;
  right: .25rem;
  top: .8rem;
  font-size: 1.4rem;
  color: var(--tinta);
  line-height: 1;
}
.preguntas details[open] summary::after { content: "−"; }
.preguntas details p { color: var(--gris); padding-right: 2rem; }

/* ===== Contacto ===== */
.contacto-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; max-width: 30rem; }
.contacto-lista li { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.contacto-lista span:first-child { font-weight: 600; min-width: 7rem; }
.marcador { color: var(--gris); font-family: ui-monospace, Consolas, monospace; font-size: .95rem; }

/* ===== Pie ===== */
.pie {
  background: var(--tinta-oscura);
  color: #dfe5f5;
  padding: 2.5rem 0;
  font-size: .95rem;
}
.pie a { color: var(--blanco); }
.pie .contenedor { display: grid; gap: 1rem; }
.pie p { margin: 0; }
@media (min-width: 48rem) {
  .pie .contenedor { grid-template-columns: 1fr auto; align-items: center; }
}

/* ===== Ficha de producto ===== */
.migas { font-size: .95rem; padding: 1.25rem 0 0; }
.ficha {
  display: grid;
  gap: 2rem;
  align-items: start;
  padding: 1.5rem 0 4rem;
}
@media (min-width: 56rem) { .ficha { grid-template-columns: 1.2fr 1fr; gap: 3rem; } }
.ficha-vista {
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  padding: 1.5rem;
}
.ficha-vista > svg { width: 100%; aspect-ratio: 16 / 10; }
.vista-paginas {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
}
.vista-paginas li { background: var(--blanco); border: 1px solid var(--linea); border-radius: 4px; padding: .3rem; }
.vista-paginas svg { width: 100%; aspect-ratio: 16 / 10; }
.ficha-info .precio { font-size: 1.75rem; display: block; margin: 1.5rem 0 .25rem; }
.incluye { padding-left: 1.2rem; }
.incluye li { margin-bottom: .35rem; }
.nota { color: var(--gris); font-size: .95rem; margin-top: .75rem; }
